/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 3720: /***/ ((module) => { 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; } module.exports = _arrayLikeToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 9822: /***/ ((module) => { function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } module.exports = _arrayWithHoles; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 1588: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayLikeToArray = __webpack_require__(3720); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return arrayLikeToArray(arr); } module.exports = _arrayWithoutHoles; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 9168: /***/ ((module) => { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 8239: /***/ ((module) => { 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; } module.exports = _defineProperty; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 6164: /***/ ((module) => { function _extends() { module.exports = _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; }; module.exports["default"] = module.exports, module.exports.__esModule = true; return _extends.apply(this, arguments); } module.exports = _extends; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 6856: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var setPrototypeOf = __webpack_require__(4307); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; setPrototypeOf(subClass, superClass); } module.exports = _inheritsLoose; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 9736: /***/ ((module) => { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 3805: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var _typeof = (__webpack_require__(8630)["default"]); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } module.exports = _interopRequireWildcard; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 1325: /***/ ((module) => { function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } module.exports = _iterableToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 8616: /***/ ((module) => { function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } module.exports = _iterableToArrayLimit; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 533: /***/ ((module) => { function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } module.exports = _nonIterableRest; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 333: /***/ ((module) => { function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } module.exports = _nonIterableSpread; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 7509: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var objectWithoutPropertiesLoose = __webpack_require__(9446); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } module.exports = _objectWithoutProperties; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 9446: /***/ ((module) => { function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } module.exports = _objectWithoutPropertiesLoose; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 4307: /***/ ((module) => { function _setPrototypeOf(o, p) { module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; module.exports["default"] = module.exports, module.exports.__esModule = true; return _setPrototypeOf(o, p); } module.exports = _setPrototypeOf; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 6739: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayWithHoles = __webpack_require__(9822); var iterableToArrayLimit = __webpack_require__(8616); var unsupportedIterableToArray = __webpack_require__(7698); var nonIterableRest = __webpack_require__(533); function _slicedToArray(arr, i) { return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); } module.exports = _slicedToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 8669: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayWithoutHoles = __webpack_require__(1588); var iterableToArray = __webpack_require__(1325); var unsupportedIterableToArray = __webpack_require__(7698); var nonIterableSpread = __webpack_require__(333); function _toConsumableArray(arr) { return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); } module.exports = _toConsumableArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 8630: /***/ ((module) => { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { module.exports = _typeof = function _typeof(obj) { return typeof obj; }; module.exports["default"] = module.exports, module.exports.__esModule = true; } else { module.exports = _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; module.exports["default"] = module.exports, module.exports.__esModule = true; } return _typeof(obj); } module.exports = _typeof; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 7698: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var arrayLikeToArray = __webpack_require__(3720); 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(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); } module.exports = _unsupportedIterableToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /***/ 2424: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getComponentName; var _functionPrototype = _interopRequireDefault(__webpack_require__(2763)); var _reactIs = __webpack_require__(5053); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function getComponentName(Component) { if (typeof Component === 'string') { return Component; } if (typeof Component === 'function') { return Component.displayName || (0, _functionPrototype["default"])(Component); } if ((0, _reactIs.isForwardRef)({ type: Component, $$typeof: _reactIs.Element })) { return Component.displayName; } if ((0, _reactIs.isMemo)(Component)) { return getComponentName(Component.type); } return null; } /***/ }), /***/ 814: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _isPlainObject = _interopRequireDefault(__webpack_require__(4530)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var _default = _isPlainObject["default"]; exports["default"] = _default; /***/ }), /***/ 8622: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = wrapValidator; var _object = _interopRequireDefault(__webpack_require__(4011)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function wrapValidator(validator, typeName) { var typeChecker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; return (0, _object["default"])(validator.bind(), { typeName: typeName, typeChecker: typeChecker, isRequired: (0, _object["default"])(validator.isRequired.bind(), { typeName: typeName, typeChecker: typeChecker, typeRequired: true }) }); } /***/ }), /***/ 5096: /***/ ((module) => { "use strict"; function noop() { return null; } noop.isRequired = noop; function noopThunk() { return noop; } module.exports = { and: noopThunk, between: noopThunk, booleanSome: noopThunk, childrenHavePropXorChildren: noopThunk, childrenOf: noopThunk, childrenOfType: noopThunk, childrenSequenceOf: noopThunk, componentWithName: noopThunk, disallowedIf: noopThunk, elementType: noopThunk, empty: noopThunk, explicitNull: noopThunk, forbidExtraProps: Object, integer: noopThunk, keysOf: noopThunk, mutuallyExclusiveProps: noopThunk, mutuallyExclusiveTrueProps: noopThunk, nChildren: noopThunk, nonNegativeInteger: noop, nonNegativeNumber: noopThunk, numericString: noopThunk, object: noopThunk, or: noopThunk, predicate: noopThunk, range: noopThunk, ref: noopThunk, requiredBy: noopThunk, restrictedProp: noopThunk, sequenceOf: noopThunk, shape: noopThunk, stringEndsWith: noopThunk, stringStartsWith: noopThunk, uniqueArray: noopThunk, uniqueArrayOf: noopThunk, valuesOf: noopThunk, withShape: noopThunk }; /***/ }), /***/ 9549: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = __webpack_require__(9196); var _isPlainObject = _interopRequireDefault(__webpack_require__(814)); var _wrapValidator = _interopRequireDefault(__webpack_require__(8622)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var isPrototypeOf = Object.prototype.isPrototypeOf; function isNewRef(prop) { if (!(0, _isPlainObject["default"])(prop)) { return false; } var ownProperties = Object.keys(prop); return ownProperties.length === 1 && ownProperties[0] === 'current'; } function isCallbackRef(prop) { return typeof prop === 'function' && !isPrototypeOf.call(_react.Component, prop) && (!_react.PureComponent || !isPrototypeOf.call(_react.PureComponent, prop)); } function requiredRef(props, propName, componentName) { var propValue = props[propName]; if (isCallbackRef(propValue) || isNewRef(propValue)) { return null; } return new TypeError("".concat(propName, " in ").concat(componentName, " must be a ref")); } function ref(props, propName, componentName) { var propValue = props[propName]; if (propValue == null) { return null; } for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { rest[_key - 3] = arguments[_key]; } return requiredRef.apply(void 0, [props, propName, componentName].concat(rest)); } ref.isRequired = requiredRef; var _default = function _default() { return (0, _wrapValidator["default"])(ref, 'ref'); }; exports["default"] = _default; /***/ }), /***/ 4882: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = true ? __webpack_require__(5096) : 0; /***/ }), /***/ 2507: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var keys = __webpack_require__(806); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { origDefineProperty(obj, 'x', { enumerable: false, value: obj }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax for (var _ in obj) { // jscs:ignore disallowUnusedVariables return false; } return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { origDefineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = concat.call(props, Object.getOwnPropertySymbols(map)); } for (var i = 0; i < props.length; i += 1) { defineProperty(object, props[i], map[props[i]], predicates[props[i]]); } }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /***/ 6003: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var IsCallable = __webpack_require__(1535); var functionsHaveNames = __webpack_require__(7105)(); var callBound = __webpack_require__(7615); var $functionToString = callBound('Function.prototype.toString'); var $stringMatch = callBound('String.prototype.match'); var classRegex = /^class /; var isClass = function isClassConstructor(fn) { if (IsCallable(fn)) { return false; } if (typeof fn !== 'function') { return false; } try { var match = $stringMatch($functionToString(fn), classRegex); return !!match; } catch (e) {} return false; }; var regex = /\s*function\s+([^(\s]*)\s*/; var functionProto = Function.prototype; module.exports = function getName() { if (!isClass(this) && !IsCallable(this)) { throw new TypeError('Function.prototype.name sham getter called on non-function'); } if (functionsHaveNames) { return this.name; } if (this === functionProto) { return ''; } var str = $functionToString(this); var match = $stringMatch(str, regex); var name = match && match[1]; return name; }; /***/ }), /***/ 2763: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(2507); var callBind = __webpack_require__(2550); var implementation = __webpack_require__(6003); var getPolyfill = __webpack_require__(9154); var shim = __webpack_require__(8722); var bound = callBind(implementation); define(bound, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = bound; /***/ }), /***/ 1535: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // http://ecma-international.org/ecma-262/5.1/#sec-9.11 module.exports = __webpack_require__(7720); /***/ }), /***/ 9154: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(6003); module.exports = function getPolyfill() { return implementation; }; /***/ }), /***/ 8722: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var supportsDescriptors = (__webpack_require__(2507).supportsDescriptors); var functionsHaveNames = __webpack_require__(7105)(); var getPolyfill = __webpack_require__(9154); var defineProperty = Object.defineProperty; var TypeErr = TypeError; module.exports = function shimName() { var polyfill = getPolyfill(); if (functionsHaveNames) { return polyfill; } if (!supportsDescriptors) { throw new TypeErr('Shimming Function.prototype.name support requires ES5 property descriptor support.'); } var functionProto = Function.prototype; defineProperty(functionProto, 'name', { configurable: true, enumerable: false, get: function () { var name = polyfill.call(this); if (this !== functionProto) { defineProperty(this, 'name', { configurable: true, enumerable: false, value: name, writable: false }); } return name; } }); return polyfill; }; /***/ }), /***/ 7720: /***/ ((module) => { "use strict"; var fnToStr = Function.prototype.toString; var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; var badArrayLike; var isCallableMarker; if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { try { badArrayLike = Object.defineProperty({}, 'length', { get: function () { throw isCallableMarker; } }); isCallableMarker = {}; // eslint-disable-next-line no-throw-literal reflectApply(function () { throw 42; }, null, badArrayLike); } catch (_) { if (_ !== isCallableMarker) { reflectApply = null; } } } else { reflectApply = null; } var constructorRegex = /^\s*class\b/; var isES6ClassFn = function isES6ClassFunction(value) { try { var fnStr = fnToStr.call(value); return constructorRegex.test(fnStr); } catch (e) { return false; // not a function } }; var tryFunctionObject = function tryFunctionToStr(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }; var toStr = Object.prototype.toString; var fnClass = '[object Function]'; var genClass = '[object GeneratorFunction]'; var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; module.exports = reflectApply ? function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (typeof value === 'function' && !value.prototype) { return true; } try { reflectApply(value, null, badArrayLike); } catch (e) { if (e !== isCallableMarker) { return false; } } return !isES6ClassFn(value); } : function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (typeof value === 'function' && !value.prototype) { return true; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = toStr.call(value); return strClass === fnClass || strClass === genClass; }; /***/ }), /***/ 4536: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b? Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119; function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d; exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t}; exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p}; exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z; /***/ }), /***/ 5053: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(4536); } else {} /***/ }), /***/ 4485: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var ES = __webpack_require__(2176); var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || (Math.pow(2, 53) - 1); // eslint-disable-next-line max-params, max-statements var FlattenIntoArray = function FlattenIntoArray(target, source, sourceLen, start, depth) { var targetIndex = start; var sourceIndex = 0; /* var mapperFunction; if (arguments.length > 5) { mapperFunction = arguments[5]; } */ while (sourceIndex < sourceLen) { var P = ES.ToString(sourceIndex); var exists = ES.HasProperty(source, P); if (exists) { var element = ES.Get(source, P); /* if (typeof mapperFunction !== 'undefined') { if (arguments.length <= 6) { throw new TypeError('Assertion failed: thisArg is required when mapperFunction is provided'); } element = ES.Call(mapperFunction, arguments[6], [element, sourceIndex, source]); } */ var shouldFlatten = false; if (depth > 0) { shouldFlatten = ES.IsArray(element); } if (shouldFlatten) { var elementLen = ES.ToLength(ES.Get(element, 'length')); targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1); } else { if (targetIndex >= MAX_SAFE_INTEGER) { throw new TypeError('index too large'); } ES.CreateDataPropertyOrThrow(target, ES.ToString(targetIndex), element); targetIndex += 1; } } sourceIndex += 1; } return targetIndex; }; module.exports = function flat() { var O = ES.ToObject(this); var sourceLen = ES.ToLength(ES.Get(O, 'length')); var depthNum = 1; if (arguments.length > 0 && typeof arguments[0] !== 'undefined') { depthNum = ES.ToInteger(arguments[0]); } var A = ES.ArraySpeciesCreate(O, 0); FlattenIntoArray(A, O, sourceLen, 0, depthNum); return A; }; /***/ }), /***/ 116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(9170); var bind = __webpack_require__(1930); var implementation = __webpack_require__(4485); var getPolyfill = __webpack_require__(616); var polyfill = getPolyfill(); var shim = __webpack_require__(2059); var boundFlat = bind.call(Function.call, polyfill); define(boundFlat, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = boundFlat; /***/ }), /***/ 616: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(4485); module.exports = function getPolyfill() { return Array.prototype.flat || implementation; }; /***/ }), /***/ 2059: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(9170); var getPolyfill = __webpack_require__(616); module.exports = function shimFlat() { var polyfill = getPolyfill(); define( Array.prototype, { flat: polyfill }, { flat: function () { return Array.prototype.flat !== polyfill; } } ); return polyfill; }; /***/ }), /***/ 7615: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var GetIntrinsic = __webpack_require__(1801); var callBind = __webpack_require__(2550); var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic(name, !!allowMissing); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBind(intrinsic); } return intrinsic; }; /***/ }), /***/ 2550: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(1930); var GetIntrinsic = __webpack_require__(1801); var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); if ($defineProperty) { try { $defineProperty({}, 'a', { value: 1 }); } catch (e) { // IE 8 has a broken defineProperty $defineProperty = null; } } module.exports = function callBind() { return $reflectApply(bind, $call, arguments); }; var applyBind = function applyBind() { return $reflectApply(bind, $apply, arguments); }; if ($defineProperty) { $defineProperty(module.exports, 'apply', { value: applyBind }); } else { module.exports.apply = applyBind; } /***/ }), /***/ 4403: /***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString === Object.prototype.toString) { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } else { classes.push(arg.toString()); } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ 8495: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "addEventListener": () => (/* binding */ addEventListener) /* harmony export */ }); var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // Adapted from Modernizr // https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37 function testPassiveEventListeners() { if (!CAN_USE_DOM) { return false; } if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) { return false; } var supportsPassiveOption = false; try { var opts = Object.defineProperty({}, 'passive', { // eslint-disable-next-line getter-return get: function () { function get() { supportsPassiveOption = true; } return get; }() }); var noop = function noop() {}; window.addEventListener('testPassiveEventSupport', noop, opts); window.removeEventListener('testPassiveEventSupport', noop, opts); } catch (e) { // do nothing } return supportsPassiveOption; } var memoized = void 0; function canUsePassiveEventListeners() { if (memoized === undefined) { memoized = testPassiveEventListeners(); } return memoized; } function normalizeEventOptions(eventOptions) { if (!eventOptions) { return undefined; } if (!canUsePassiveEventListeners()) { // If the browser does not support the passive option, then it is expecting // a boolean for the options argument to specify whether it should use // capture or not. In more modern browsers, this is passed via the `capture` // option, so let's just hoist that value up. return !!eventOptions.capture; } return eventOptions; } /* eslint-disable no-bitwise */ /** * Generate a unique key for any set of event options */ function eventOptionsKey(normalizedEventOptions) { if (!normalizedEventOptions) { return 0; } // If the browser does not support passive event listeners, the normalized // event options will be a boolean. if (normalizedEventOptions === true) { return 100; } // At this point, the browser supports passive event listeners, so we expect // the event options to be an object with possible properties of capture, // passive, and once. // // We want to consistently return the same value, regardless of the order of // these properties, so let's use binary maths to assign each property to a // bit, and then add those together (with an offset to account for the // booleans at the beginning of this function). var capture = normalizedEventOptions.capture << 0; var passive = normalizedEventOptions.passive << 1; var once = normalizedEventOptions.once << 2; return capture + passive + once; } function ensureCanMutateNextEventHandlers(eventHandlers) { if (eventHandlers.handlers === eventHandlers.nextHandlers) { // eslint-disable-next-line no-param-reassign eventHandlers.nextHandlers = eventHandlers.handlers.slice(); } } function TargetEventHandlers(target) { this.target = target; this.events = {}; } TargetEventHandlers.prototype.getEventHandlers = function () { function getEventHandlers(eventName, options) { var key = String(eventName) + ' ' + String(eventOptionsKey(options)); if (!this.events[key]) { this.events[key] = { handlers: [], handleEvent: undefined }; this.events[key].nextHandlers = this.events[key].handlers; } return this.events[key]; } return getEventHandlers; }(); TargetEventHandlers.prototype.handleEvent = function () { function handleEvent(eventName, options, event) { var eventHandlers = this.getEventHandlers(eventName, options); eventHandlers.handlers = eventHandlers.nextHandlers; eventHandlers.handlers.forEach(function (handler) { if (handler) { // We need to check for presence here because a handler function may // cause later handlers to get removed. This can happen if you for // instance have a waypoint that unmounts another waypoint as part of an // onEnter/onLeave handler. handler(event); } }); } return handleEvent; }(); TargetEventHandlers.prototype.add = function () { function add(eventName, listener, options) { var _this = this; // options has already been normalized at this point. var eventHandlers = this.getEventHandlers(eventName, options); ensureCanMutateNextEventHandlers(eventHandlers); if (eventHandlers.nextHandlers.length === 0) { eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options); this.target.addEventListener(eventName, eventHandlers.handleEvent, options); } eventHandlers.nextHandlers.push(listener); var isSubscribed = true; var unsubscribe = function () { function unsubscribe() { if (!isSubscribed) { return; } isSubscribed = false; ensureCanMutateNextEventHandlers(eventHandlers); var index = eventHandlers.nextHandlers.indexOf(listener); eventHandlers.nextHandlers.splice(index, 1); if (eventHandlers.nextHandlers.length === 0) { // All event handlers have been removed, so we want to remove the event // listener from the target node. if (_this.target) { // There can be a race condition where the target may no longer exist // when this function is called, e.g. when a React component is // unmounting. Guarding against this prevents the following error: // // Cannot read property 'removeEventListener' of undefined _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options); } eventHandlers.handleEvent = undefined; } } return unsubscribe; }(); return unsubscribe; } return add; }(); var EVENT_HANDLERS_KEY = '__consolidated_events_handlers__'; // eslint-disable-next-line import/prefer-default-export function addEventListener(target, eventName, listener, options) { if (!target[EVENT_HANDLERS_KEY]) { // eslint-disable-next-line no-param-reassign target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target); } var normalizedEventOptions = normalizeEventOptions(options); return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions); } /***/ }), /***/ 9170: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var keys = __webpack_require__(806); var foreach = __webpack_require__(4175); var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; var toStr = Object.prototype.toString; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); /* eslint-disable no-unused-vars, no-restricted-syntax */ for (var _ in obj) { return false; } /* eslint-enable no-unused-vars, no-restricted-syntax */ return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = Object.defineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { Object.defineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = props.concat(Object.getOwnPropertySymbols(map)); } foreach(props, function (name) { defineProperty(object, name, map[name], predicates[name]); }); }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /***/ 8110: /***/ ((module) => { "use strict"; module.exports = function contains(other) { if (arguments.length < 1) { throw new TypeError('1 argument is required'); } if (typeof other !== 'object') { throw new TypeError('Argument 1 (”other“) to Node.contains must be an instance of Node'); } var node = other; do { if (this === node) { return true; } if (node) { node = node.parentNode; } } while (node); return false; }; /***/ }), /***/ 6789: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(7727); var implementation = __webpack_require__(8110); var getPolyfill = __webpack_require__(8267); var polyfill = getPolyfill(); var shim = __webpack_require__(714); var boundContains = function contains(node, other) { return polyfill.apply(node, [other]); }; define(boundContains, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = boundContains; /***/ }), /***/ 7727: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var keys = __webpack_require__(806); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { origDefineProperty(obj, 'x', { enumerable: false, value: obj }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax for (var _ in obj) { // jscs:ignore disallowUnusedVariables return false; } return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { origDefineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = concat.call(props, Object.getOwnPropertySymbols(map)); } for (var i = 0; i < props.length; i += 1) { defineProperty(object, props[i], map[props[i]], predicates[props[i]]); } }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /***/ 8267: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(8110); module.exports = function getPolyfill() { if (typeof document !== 'undefined') { if (document.contains) { return document.contains; } if (document.body && document.body.contains) { try { if (typeof document.body.contains.call(document, '') === 'boolean') { return document.body.contains; } } catch (e) { /**/ } } } return implementation; }; /***/ }), /***/ 714: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(7727); var getPolyfill = __webpack_require__(8267); module.exports = function shimContains() { var polyfill = getPolyfill(); if (typeof document !== 'undefined') { define( document, { contains: polyfill }, { contains: function () { return document.contains !== polyfill; } } ); if (typeof Element !== 'undefined') { define( Element.prototype, { contains: polyfill }, { contains: function () { return Element.prototype.contains !== polyfill; } } ); } } return polyfill; }; /***/ }), /***/ 1345: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var util = __webpack_require__(5022); function scrollIntoView(elem, container, config) { config = config || {}; // document 归一化到 window if (container.nodeType === 9) { container = util.getWindow(container); } var allowHorizontalScroll = config.allowHorizontalScroll; var onlyScrollIfNeeded = config.onlyScrollIfNeeded; var alignWithTop = config.alignWithTop; var alignWithLeft = config.alignWithLeft; var offsetTop = config.offsetTop || 0; var offsetLeft = config.offsetLeft || 0; var offsetBottom = config.offsetBottom || 0; var offsetRight = config.offsetRight || 0; allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; var isWin = util.isWindow(container); var isFramed = !!(isWin && container.frameElement); var elemOffset = util.offset(elem); var eh = util.outerHeight(elem); var ew = util.outerWidth(elem); var containerOffset = undefined; var ch = undefined; var cw = undefined; var containerScroll = undefined; var diffTop = undefined; var diffBottom = undefined; var win = undefined; var winScroll = undefined; var ww = undefined; var wh = undefined; if (isFramed) { container = container.document.scrollingElement || container.document.body; } if (isWin || isFramed) { win = container; wh = util.height(win); ww = util.width(win); winScroll = { left: util.scrollLeft(win), top: util.scrollTop(win) }; // elem 相对 container 可视视窗的距离 diffTop = { left: elemOffset.left - winScroll.left - offsetLeft, top: elemOffset.top - winScroll.top - offsetTop }; diffBottom = { left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom }; containerScroll = winScroll; } else { containerOffset = util.offset(container); ch = container.clientHeight; cw = container.clientWidth; containerScroll = { left: container.scrollLeft, top: container.scrollTop }; // elem 相对 container 可视视窗的距离 // 注意边框, offset 是边框到根节点 diffTop = { left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop }; diffBottom = { left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom }; } if (diffTop.top < 0 || diffBottom.top > 0) { // 强制向上 if (alignWithTop === true) { util.scrollTop(container, containerScroll.top + diffTop.top); } else if (alignWithTop === false) { util.scrollTop(container, containerScroll.top + diffBottom.top); } else { // 自动调整 if (diffTop.top < 0) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } else { if (!onlyScrollIfNeeded) { alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; if (alignWithTop) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } if (allowHorizontalScroll) { if (diffTop.left < 0 || diffBottom.left > 0) { // 强制向上 if (alignWithLeft === true) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else if (alignWithLeft === false) { util.scrollLeft(container, containerScroll.left + diffBottom.left); } else { // 自动调整 if (diffTop.left < 0) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } else { if (!onlyScrollIfNeeded) { alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; if (alignWithLeft) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } } } module.exports = scrollIntoView; /***/ }), /***/ 5425: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__(1345); /***/ }), /***/ 5022: /***/ ((module) => { "use strict"; 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; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; function getClientPosition(elem) { var box = undefined; var x = undefined; var y = undefined; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, computedStyle_) { var val = ''; var d = elem.ownerDocument; var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } var getComputedStyleX = undefined; if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = undefined; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = undefined; var j = undefined; var i = undefined; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = undefined; if (prop === 'border') { cssProp = prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj != null && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, extra) { if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue == null || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue == null || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } if (borderBoxValueOrIsBorderBox) { var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); return val + (extra === BORDER_INDEX ? 0 : padding); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay(elem) { var val = undefined; var args = arguments; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value += 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, val) { if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); // 设置 elem 相对 elem.ownerDocument 的坐标 function setOffset(elem, offset) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var old = getOffset(elem); var ret = {}; var current = undefined; var key = undefined; for (key in offset) { if (offset.hasOwnProperty(key)) { current = parseFloat(css(elem, key)) || 0; ret[key] = current + offset[key] - old[key]; } } css(elem, ret); } module.exports = _extends({ getWindow: function getWindow(node) { var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value) { if (typeof value !== 'undefined') { setOffset(el, value); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var ret = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (var i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, scrollLeft: function scrollLeft(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollLeft(w); } window.scrollTo(v, getScrollTop(w)); } else { if (v === undefined) { return w.scrollLeft; } w.scrollLeft = v; } }, scrollTop: function scrollTop(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollTop(w); } window.scrollTo(getScrollLeft(w), v); } else { if (v === undefined) { return w.scrollTop; } w.scrollTop = v; } }, viewportWidth: 0, viewportHeight: 0 }, domUtils); /***/ }), /***/ 9214: /***/ ((__unused_webpack_module, exports) => { "use strict"; var __webpack_unused_export__; /** @license React v17.0.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131; if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")} function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;__webpack_unused_export__=h;__webpack_unused_export__=z;__webpack_unused_export__=A;__webpack_unused_export__=B;__webpack_unused_export__=C;__webpack_unused_export__=D;__webpack_unused_export__=E;__webpack_unused_export__=F;__webpack_unused_export__=G;__webpack_unused_export__=H; __webpack_unused_export__=I;__webpack_unused_export__=function(){return!1};__webpack_unused_export__=function(){return!1};__webpack_unused_export__=function(a){return y(a)===h};__webpack_unused_export__=function(a){return y(a)===g};__webpack_unused_export__=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};__webpack_unused_export__=function(a){return y(a)===k};__webpack_unused_export__=function(a){return y(a)===d};__webpack_unused_export__=function(a){return y(a)===p};__webpack_unused_export__=function(a){return y(a)===n}; __webpack_unused_export__=function(a){return y(a)===c};__webpack_unused_export__=function(a){return y(a)===f};__webpack_unused_export__=function(a){return y(a)===e};__webpack_unused_export__=function(a){return y(a)===l};__webpack_unused_export__=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1}; __webpack_unused_export__=y; /***/ }), /***/ 2797: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { /* unused reexport */ __webpack_require__(9214); } else {} /***/ }), /***/ 1980: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports["default"] = shallowEqual; var _objectIs = __webpack_require__(3803); var _objectIs2 = _interopRequireDefault(_objectIs); var _has = __webpack_require__(9284); var _has2 = _interopRequireDefault(_has); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } // adapted from https://github.com/facebook/react/blob/144328fe81719e916b946e22660479e31561bb0b/packages/shared/shallowEqual.js#L36-L68 function shallowEqual(objA, objB) { if ((0, _objectIs2['default'])(objA, objB)) { return true; } if (!objA || !objB || (typeof objA === 'undefined' ? 'undefined' : _typeof(objA)) !== 'object' || (typeof objB === 'undefined' ? 'undefined' : _typeof(objB)) !== 'object') { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } keysA.sort(); keysB.sort(); // Test for A's keys different from B. for (var i = 0; i < keysA.length; i += 1) { if (!(0, _has2['default'])(objB, keysA[i]) || !(0, _objectIs2['default'])(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJzaGFsbG93RXF1YWwiLCJvYmpBIiwib2JqQiIsImtleXNBIiwiT2JqZWN0Iiwia2V5cyIsImtleXNCIiwibGVuZ3RoIiwic29ydCIsImkiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O3FCQUl3QkEsWTs7QUFKeEI7Ozs7QUFDQTs7Ozs7O0FBRUE7QUFDZSxTQUFTQSxZQUFULENBQXNCQyxJQUF0QixFQUE0QkMsSUFBNUIsRUFBa0M7QUFDL0MsTUFBSSwyQkFBR0QsSUFBSCxFQUFTQyxJQUFULENBQUosRUFBb0I7QUFDbEIsV0FBTyxJQUFQO0FBQ0Q7O0FBRUQsTUFBSSxDQUFDRCxJQUFELElBQVMsQ0FBQ0MsSUFBVixJQUFrQixRQUFPRCxJQUFQLHlDQUFPQSxJQUFQLE9BQWdCLFFBQWxDLElBQThDLFFBQU9DLElBQVAseUNBQU9BLElBQVAsT0FBZ0IsUUFBbEUsRUFBNEU7QUFDMUUsV0FBTyxLQUFQO0FBQ0Q7O0FBRUQsTUFBTUMsUUFBUUMsT0FBT0MsSUFBUCxDQUFZSixJQUFaLENBQWQ7QUFDQSxNQUFNSyxRQUFRRixPQUFPQyxJQUFQLENBQVlILElBQVosQ0FBZDs7QUFFQSxNQUFJQyxNQUFNSSxNQUFOLEtBQWlCRCxNQUFNQyxNQUEzQixFQUFtQztBQUNqQyxXQUFPLEtBQVA7QUFDRDs7QUFFREosUUFBTUssSUFBTjtBQUNBRixRQUFNRSxJQUFOOztBQUVBO0FBQ0EsT0FBSyxJQUFJQyxJQUFJLENBQWIsRUFBZ0JBLElBQUlOLE1BQU1JLE1BQTFCLEVBQWtDRSxLQUFLLENBQXZDLEVBQTBDO0FBQ3hDLFFBQUksQ0FBQyxzQkFBSVAsSUFBSixFQUFVQyxNQUFNTSxDQUFOLENBQVYsQ0FBRCxJQUF3QixDQUFDLDJCQUFHUixLQUFLRSxNQUFNTSxDQUFOLENBQUwsQ0FBSCxFQUFtQlAsS0FBS0MsTUFBTU0sQ0FBTixDQUFMLENBQW5CLENBQTdCLEVBQWlFO0FBQy9ELGFBQU8sS0FBUDtBQUNEO0FBQ0Y7O0FBRUQsU0FBTyxJQUFQO0FBQ0QiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaXMgZnJvbSAnb2JqZWN0LWlzJztcbmltcG9ydCBoYXMgZnJvbSAnaGFzJztcblxuLy8gYWRhcHRlZCBmcm9tIGh0dHBzOi8vZ2l0aHViLmNvbS9mYWNlYm9vay9yZWFjdC9ibG9iLzE0NDMyOGZlODE3MTllOTE2Yjk0NmUyMjY2MDQ3OWUzMTU2MWJiMGIvcGFja2FnZXMvc2hhcmVkL3NoYWxsb3dFcXVhbC5qcyNMMzYtTDY4XG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBzaGFsbG93RXF1YWwob2JqQSwgb2JqQikge1xuICBpZiAoaXMob2JqQSwgb2JqQikpIHtcbiAgICByZXR1cm4gdHJ1ZTtcbiAgfVxuXG4gIGlmICghb2JqQSB8fCAhb2JqQiB8fCB0eXBlb2Ygb2JqQSAhPT0gJ29iamVjdCcgfHwgdHlwZW9mIG9iakIgIT09ICdvYmplY3QnKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgY29uc3Qga2V5c0EgPSBPYmplY3Qua2V5cyhvYmpBKTtcbiAgY29uc3Qga2V5c0IgPSBPYmplY3Qua2V5cyhvYmpCKTtcblxuICBpZiAoa2V5c0EubGVuZ3RoICE9PSBrZXlzQi5sZW5ndGgpIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBrZXlzQS5zb3J0KCk7XG4gIGtleXNCLnNvcnQoKTtcblxuICAvLyBUZXN0IGZvciBBJ3Mga2V5cyBkaWZmZXJlbnQgZnJvbSBCLlxuICBmb3IgKGxldCBpID0gMDsgaSA8IGtleXNBLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgaWYgKCFoYXMob2JqQiwga2V5c0FbaV0pIHx8ICFpcyhvYmpBW2tleXNBW2ldXSwgb2JqQltrZXlzQVtpXV0pKSB7XG4gICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHRydWU7XG59XG4iXX0= /***/ }), /***/ 3803: /***/ ((module) => { "use strict"; // http://www.ecma-international.org/ecma-262/6.0/#sec-object.is var numberIsNaN = function (value) { return value !== value; }; module.exports = function is(a, b) { if (a === 0 && b === 0) { return 1 / a === 1 / b; } if (a === b) { return true; } if (numberIsNaN(a) && numberIsNaN(b)) { return true; } return false; }; /***/ }), /***/ 7124: /***/ ((module) => { "use strict"; /* globals Set, Map, WeakSet, WeakMap, Promise, Symbol, Proxy, Atomics, SharedArrayBuffer, ArrayBuffer, DataView, Uint8Array, Float32Array, Float64Array, Int8Array, Int16Array, Int32Array, Uint8ClampedArray, Uint16Array, Uint32Array, */ var undefined; // eslint-disable-line no-shadow-restricted-names var ThrowTypeError = Object.getOwnPropertyDescriptor ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }()) : function () { throw new TypeError(); }; var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto var generator; // = function * () {}; var generatorFunction = generator ? getProto(generator) : undefined; var asyncFn; // async function() {}; var asyncFunction = asyncFn ? asyncFn.constructor : undefined; var asyncGen; // async function * () {}; var asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined; var asyncGenIterator = asyncGen ? asyncGen() : undefined; var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); var INTRINSICS = { '$ %Array%': Array, '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, '$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, '$ %ArrayPrototype%': Array.prototype, '$ %ArrayProto_entries%': Array.prototype.entries, '$ %ArrayProto_forEach%': Array.prototype.forEach, '$ %ArrayProto_keys%': Array.prototype.keys, '$ %ArrayProto_values%': Array.prototype.values, '$ %AsyncFromSyncIteratorPrototype%': undefined, '$ %AsyncFunction%': asyncFunction, '$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, '$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined, '$ %AsyncGeneratorFunction%': asyncGenFunction, '$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined, '$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined, '$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '$ %Boolean%': Boolean, '$ %BooleanPrototype%': Boolean.prototype, '$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView, '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, '$ %Date%': Date, '$ %DatePrototype%': Date.prototype, '$ %decodeURI%': decodeURI, '$ %decodeURIComponent%': decodeURIComponent, '$ %encodeURI%': encodeURI, '$ %encodeURIComponent%': encodeURIComponent, '$ %Error%': Error, '$ %ErrorPrototype%': Error.prototype, '$ %eval%': eval, // eslint-disable-line no-eval '$ %EvalError%': EvalError, '$ %EvalErrorPrototype%': EvalError.prototype, '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, '$ %Function%': Function, '$ %FunctionPrototype%': Function.prototype, '$ %Generator%': generator ? getProto(generator()) : undefined, '$ %GeneratorFunction%': generatorFunction, '$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined, '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, '$ %isFinite%': isFinite, '$ %isNaN%': isNaN, '$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, '$ %JSON%': JSON, '$ %JSONParse%': JSON.parse, '$ %Map%': typeof Map === 'undefined' ? undefined : Map, '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), '$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, '$ %Math%': Math, '$ %Number%': Number, '$ %NumberPrototype%': Number.prototype, '$ %Object%': Object, '$ %ObjectPrototype%': Object.prototype, '$ %ObjProto_toString%': Object.prototype.toString, '$ %ObjProto_valueOf%': Object.prototype.valueOf, '$ %parseFloat%': parseFloat, '$ %parseInt%': parseInt, '$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise, '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, '$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, '$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '$ %RangeError%': RangeError, '$ %RangeErrorPrototype%': RangeError.prototype, '$ %ReferenceError%': ReferenceError, '$ %ReferenceErrorPrototype%': ReferenceError.prototype, '$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '$ %RegExp%': RegExp, '$ %RegExpPrototype%': RegExp.prototype, '$ %Set%': typeof Set === 'undefined' ? undefined : Set, '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), '$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, '$ %String%': String, '$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, '$ %StringPrototype%': String.prototype, '$ %Symbol%': hasSymbols ? Symbol : undefined, '$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, '$ %SyntaxError%': SyntaxError, '$ %SyntaxErrorPrototype%': SyntaxError.prototype, '$ %ThrowTypeError%': ThrowTypeError, '$ %TypedArray%': TypedArray, '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, '$ %TypeError%': TypeError, '$ %TypeErrorPrototype%': TypeError.prototype, '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, '$ %URIError%': URIError, '$ %URIErrorPrototype%': URIError.prototype, '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype }; module.exports = function GetIntrinsic(name, allowMissing) { if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new TypeError('"allowMissing" argument must be a boolean'); } var key = '$ ' + name; if (!(key in INTRINSICS)) { throw new SyntaxError('intrinsic ' + name + ' does not exist!'); } // istanbul ignore if // hopefully this is impossible to test :-) if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) { throw new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return INTRINSICS[key]; }; /***/ }), /***/ 2820: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var has = __webpack_require__(9284); var toPrimitive = __webpack_require__(6120); var GetIntrinsic = __webpack_require__(7124); var $TypeError = GetIntrinsic('%TypeError%'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var $Array = GetIntrinsic('%Array%'); var $String = GetIntrinsic('%String%'); var $Object = GetIntrinsic('%Object%'); var $Number = GetIntrinsic('%Number%'); var $Symbol = GetIntrinsic('%Symbol%', true); var $RegExp = GetIntrinsic('%RegExp%'); var hasSymbols = !!$Symbol; var $isNaN = __webpack_require__(1569); var $isFinite = __webpack_require__(2590); var MAX_SAFE_INTEGER = $Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1; var assign = __webpack_require__(3034); var sign = __webpack_require__(5954); var mod = __webpack_require__(1295); var isPrimitive = __webpack_require__(6777); var parseInteger = parseInt; var bind = __webpack_require__(1930); var arraySlice = bind.call(Function.call, $Array.prototype.slice); var strSlice = bind.call(Function.call, $String.prototype.slice); var isBinary = bind.call(Function.call, $RegExp.prototype.test, /^0b[01]+$/i); var isOctal = bind.call(Function.call, $RegExp.prototype.test, /^0o[0-7]+$/i); var regexExec = bind.call(Function.call, $RegExp.prototype.exec); var nonWS = ['\u0085', '\u200b', '\ufffe'].join(''); var nonWSregex = new $RegExp('[' + nonWS + ']', 'g'); var hasNonWS = bind.call(Function.call, $RegExp.prototype.test, nonWSregex); var invalidHexLiteral = /^[-+]0x[0-9a-f]+$/i; var isInvalidHexLiteral = bind.call(Function.call, $RegExp.prototype.test, invalidHexLiteral); var $charCodeAt = bind.call(Function.call, $String.prototype.charCodeAt); var toStr = bind.call(Function.call, Object.prototype.toString); var $floor = Math.floor; var $abs = Math.abs; var $ObjectCreate = Object.create; var $gOPD = $Object.getOwnPropertyDescriptor; var $isExtensible = $Object.isExtensible; // whitespace from: http://es5.github.io/#x15.5.4.20 // implementation from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js#L1304-L1324 var ws = [ '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003', '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028', '\u2029\uFEFF' ].join(''); var trimRegex = new RegExp('(^[' + ws + ']+)|([' + ws + ']+$)', 'g'); var replace = bind.call(Function.call, $String.prototype.replace); var trim = function (value) { return replace(value, trimRegex, ''); }; var ES5 = __webpack_require__(6112); var hasRegExpMatcher = __webpack_require__(5278); // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-abstract-operations var ES6 = assign(assign({}, ES5), { // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-call-f-v-args Call: function Call(F, V) { var args = arguments.length > 2 ? arguments[2] : []; if (!this.IsCallable(F)) { throw new $TypeError(F + ' is not a function'); } return F.apply(V, args); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toprimitive ToPrimitive: toPrimitive, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toboolean // ToBoolean: ES5.ToBoolean, // https://ecma-international.org/ecma-262/6.0/#sec-tonumber ToNumber: function ToNumber(argument) { var value = isPrimitive(argument) ? argument : toPrimitive(argument, $Number); if (typeof value === 'symbol') { throw new $TypeError('Cannot convert a Symbol value to a number'); } if (typeof value === 'string') { if (isBinary(value)) { return this.ToNumber(parseInteger(strSlice(value, 2), 2)); } else if (isOctal(value)) { return this.ToNumber(parseInteger(strSlice(value, 2), 8)); } else if (hasNonWS(value) || isInvalidHexLiteral(value)) { return NaN; } else { var trimmed = trim(value); if (trimmed !== value) { return this.ToNumber(trimmed); } } } return $Number(value); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tointeger // ToInteger: ES5.ToNumber, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint32 // ToInt32: ES5.ToInt32, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint32 // ToUint32: ES5.ToUint32, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint16 ToInt16: function ToInt16(argument) { var int16bit = this.ToUint16(argument); return int16bit >= 0x8000 ? int16bit - 0x10000 : int16bit; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint16 // ToUint16: ES5.ToUint16, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toint8 ToInt8: function ToInt8(argument) { var int8bit = this.ToUint8(argument); return int8bit >= 0x80 ? int8bit - 0x100 : int8bit; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8 ToUint8: function ToUint8(argument) { var number = this.ToNumber(argument); if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } var posInt = sign(number) * $floor($abs(number)); return mod(posInt, 0x100); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-touint8clamp ToUint8Clamp: function ToUint8Clamp(argument) { var number = this.ToNumber(argument); if ($isNaN(number) || number <= 0) { return 0; } if (number >= 0xFF) { return 0xFF; } var f = $floor(argument); if (f + 0.5 < number) { return f + 1; } if (number < f + 0.5) { return f; } if (f % 2 !== 0) { return f + 1; } return f; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring ToString: function ToString(argument) { if (typeof argument === 'symbol') { throw new $TypeError('Cannot convert a Symbol value to a string'); } return $String(argument); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-toobject ToObject: function ToObject(value) { this.RequireObjectCoercible(value); return $Object(value); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey ToPropertyKey: function ToPropertyKey(argument) { var key = this.ToPrimitive(argument, $String); return typeof key === 'symbol' ? key : this.ToString(key); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength ToLength: function ToLength(argument) { var len = this.ToInteger(argument); if (len <= 0) { return 0; } // includes converting -0 to +0 if (len > MAX_SAFE_INTEGER) { return MAX_SAFE_INTEGER; } return len; }, // https://ecma-international.org/ecma-262/6.0/#sec-canonicalnumericindexstring CanonicalNumericIndexString: function CanonicalNumericIndexString(argument) { if (toStr(argument) !== '[object String]') { throw new $TypeError('must be a string'); } if (argument === '-0') { return -0; } var n = this.ToNumber(argument); if (this.SameValue(this.ToString(n), argument)) { return n; } return void 0; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-requireobjectcoercible RequireObjectCoercible: ES5.CheckObjectCoercible, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray IsArray: $Array.isArray || function IsArray(argument) { return toStr(argument) === '[object Array]'; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-iscallable // IsCallable: ES5.IsCallable, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor IsConstructor: function IsConstructor(argument) { return typeof argument === 'function' && !!argument.prototype; // unfortunately there's no way to truly check this without try/catch `new argument` }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isextensible-o IsExtensible: Object.preventExtensions ? function IsExtensible(obj) { if (isPrimitive(obj)) { return false; } return $isExtensible(obj); } : function isExtensible(obj) { return true; }, // eslint-disable-line no-unused-vars // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isinteger IsInteger: function IsInteger(argument) { if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { return false; } var abs = $abs(argument); return $floor(abs) === abs; }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ispropertykey IsPropertyKey: function IsPropertyKey(argument) { return typeof argument === 'string' || typeof argument === 'symbol'; }, // https://ecma-international.org/ecma-262/6.0/#sec-isregexp IsRegExp: function IsRegExp(argument) { if (!argument || typeof argument !== 'object') { return false; } if (hasSymbols) { var isRegExp = argument[$Symbol.match]; if (typeof isRegExp !== 'undefined') { return ES5.ToBoolean(isRegExp); } } return hasRegExpMatcher(argument); }, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevalue // SameValue: ES5.SameValue, // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero SameValueZero: function SameValueZero(x, y) { return (x === y) || ($isNaN(x) && $isNaN(y)); }, /** * 7.3.2 GetV (V, P) * 1. Assert: IsPropertyKey(P) is true. * 2. Let O be ToObject(V). * 3. ReturnIfAbrupt(O). * 4. Return O.[[Get]](P, V). */ GetV: function GetV(V, P) { // 7.3.2.1 if (!this.IsPropertyKey(P)) { throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); } // 7.3.2.2-3 var O = this.ToObject(V); // 7.3.2.4 return O[P]; }, /** * 7.3.9 - https://ecma-international.org/ecma-262/6.0/#sec-getmethod * 1. Assert: IsPropertyKey(P) is true. * 2. Let func be GetV(O, P). * 3. ReturnIfAbrupt(func). * 4. If func is either undefined or null, return undefined. * 5. If IsCallable(func) is false, throw a TypeError exception. * 6. Return func. */ GetMethod: function GetMethod(O, P) { // 7.3.9.1 if (!this.IsPropertyKey(P)) { throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); } // 7.3.9.2 var func = this.GetV(O, P); // 7.3.9.4 if (func == null) { return void 0; } // 7.3.9.5 if (!this.IsCallable(func)) { throw new $TypeError(P + 'is not a function'); } // 7.3.9.6 return func; }, /** * 7.3.1 Get (O, P) - https://ecma-international.org/ecma-262/6.0/#sec-get-o-p * 1. Assert: Type(O) is Object. * 2. Assert: IsPropertyKey(P) is true. * 3. Return O.[[Get]](P, O). */ Get: function Get(O, P) { // 7.3.1.1 if (this.Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } // 7.3.1.2 if (!this.IsPropertyKey(P)) { throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); } // 7.3.1.3 return O[P]; }, Type: function Type(x) { if (typeof x === 'symbol') { return 'Symbol'; } return ES5.Type(x); }, // https://ecma-international.org/ecma-262/6.0/#sec-speciesconstructor SpeciesConstructor: function SpeciesConstructor(O, defaultConstructor) { if (this.Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } var C = O.constructor; if (typeof C === 'undefined') { return defaultConstructor; } if (this.Type(C) !== 'Object') { throw new $TypeError('O.constructor is not an Object'); } var S = hasSymbols && $Symbol.species ? C[$Symbol.species] : void 0; if (S == null) { return defaultConstructor; } if (this.IsConstructor(S)) { return S; } throw new $TypeError('no constructor found'); }, // https://ecma-international.org/ecma-262/6.0/#sec-completepropertydescriptor CompletePropertyDescriptor: function CompletePropertyDescriptor(Desc) { if (!this.IsPropertyDescriptor(Desc)) { throw new $TypeError('Desc must be a Property Descriptor'); } if (this.IsGenericDescriptor(Desc) || this.IsDataDescriptor(Desc)) { if (!has(Desc, '[[Value]]')) { Desc['[[Value]]'] = void 0; } if (!has(Desc, '[[Writable]]')) { Desc['[[Writable]]'] = false; } } else { if (!has(Desc, '[[Get]]')) { Desc['[[Get]]'] = void 0; } if (!has(Desc, '[[Set]]')) { Desc['[[Set]]'] = void 0; } } if (!has(Desc, '[[Enumerable]]')) { Desc['[[Enumerable]]'] = false; } if (!has(Desc, '[[Configurable]]')) { Desc['[[Configurable]]'] = false; } return Desc; }, // https://ecma-international.org/ecma-262/6.0/#sec-set-o-p-v-throw Set: function Set(O, P, V, Throw) { if (this.Type(O) !== 'Object') { throw new $TypeError('O must be an Object'); } if (!this.IsPropertyKey(P)) { throw new $TypeError('P must be a Property Key'); } if (this.Type(Throw) !== 'Boolean') { throw new $TypeError('Throw must be a Boolean'); } if (Throw) { O[P] = V; return true; } else { try { O[P] = V; } catch (e) { return false; } } }, // https://ecma-international.org/ecma-262/6.0/#sec-hasownproperty HasOwnProperty: function HasOwnProperty(O, P) { if (this.Type(O) !== 'Object') { throw new $TypeError('O must be an Object'); } if (!this.IsPropertyKey(P)) { throw new $TypeError('P must be a Property Key'); } return has(O, P); }, // https://ecma-international.org/ecma-262/6.0/#sec-hasproperty HasProperty: function HasProperty(O, P) { if (this.Type(O) !== 'Object') { throw new $TypeError('O must be an Object'); } if (!this.IsPropertyKey(P)) { throw new $TypeError('P must be a Property Key'); } return P in O; }, // https://ecma-international.org/ecma-262/6.0/#sec-isconcatspreadable IsConcatSpreadable: function IsConcatSpreadable(O) { if (this.Type(O) !== 'Object') { return false; } if (hasSymbols && typeof $Symbol.isConcatSpreadable === 'symbol') { var spreadable = this.Get(O, Symbol.isConcatSpreadable); if (typeof spreadable !== 'undefined') { return this.ToBoolean(spreadable); } } return this.IsArray(O); }, // https://ecma-international.org/ecma-262/6.0/#sec-invoke Invoke: function Invoke(O, P) { if (!this.IsPropertyKey(P)) { throw new $TypeError('P must be a Property Key'); } var argumentsList = arraySlice(arguments, 2); var func = this.GetV(O, P); return this.Call(func, O, argumentsList); }, // https://ecma-international.org/ecma-262/6.0/#sec-getiterator GetIterator: function GetIterator(obj, method) { if (!hasSymbols) { throw new SyntaxError('ES.GetIterator depends on native iterator support.'); } var actualMethod = method; if (arguments.length < 2) { actualMethod = this.GetMethod(obj, $Symbol.iterator); } var iterator = this.Call(actualMethod, obj); if (this.Type(iterator) !== 'Object') { throw new $TypeError('iterator must return an object'); } return iterator; }, // https://ecma-international.org/ecma-262/6.0/#sec-iteratornext IteratorNext: function IteratorNext(iterator, value) { var result = this.Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]); if (this.Type(result) !== 'Object') { throw new $TypeError('iterator next must return an object'); } return result; }, // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete IteratorComplete: function IteratorComplete(iterResult) { if (this.Type(iterResult) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); } return this.ToBoolean(this.Get(iterResult, 'done')); }, // https://ecma-international.org/ecma-262/6.0/#sec-iteratorvalue IteratorValue: function IteratorValue(iterResult) { if (this.Type(iterResult) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterResult) is not Object'); } return this.Get(iterResult, 'value'); }, // https://ecma-international.org/ecma-262/6.0/#sec-iteratorstep IteratorStep: function IteratorStep(iterator) { var result = this.IteratorNext(iterator); var done = this.IteratorComplete(result); return done === true ? false : result; }, // https://ecma-international.org/ecma-262/6.0/#sec-iteratorclose IteratorClose: function IteratorClose(iterator, completion) { if (this.Type(iterator) !== 'Object') { throw new $TypeError('Assertion failed: Type(iterator) is not Object'); } if (!this.IsCallable(completion)) { throw new $TypeError('Assertion failed: completion is not a thunk for a Completion Record'); } var completionThunk = completion; var iteratorReturn = this.GetMethod(iterator, 'return'); if (typeof iteratorReturn === 'undefined') { return completionThunk(); } var completionRecord; try { var innerResult = this.Call(iteratorReturn, iterator, []); } catch (e) { // if we hit here, then "e" is the innerResult completion that needs re-throwing // if the completion is of type "throw", this will throw. completionRecord = completionThunk(); completionThunk = null; // ensure it's not called twice. // if not, then return the innerResult completion throw e; } completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does completionThunk = null; // ensure it's not called twice. if (this.Type(innerResult) !== 'Object') { throw new $TypeError('iterator .return must return an object'); } return completionRecord; }, // https://ecma-international.org/ecma-262/6.0/#sec-createiterresultobject CreateIterResultObject: function CreateIterResultObject(value, done) { if (this.Type(done) !== 'Boolean') { throw new $TypeError('Assertion failed: Type(done) is not Boolean'); } return { value: value, done: done }; }, // https://ecma-international.org/ecma-262/6.0/#sec-regexpexec RegExpExec: function RegExpExec(R, S) { if (this.Type(R) !== 'Object') { throw new $TypeError('R must be an Object'); } if (this.Type(S) !== 'String') { throw new $TypeError('S must be a String'); } var exec = this.Get(R, 'exec'); if (this.IsCallable(exec)) { var result = this.Call(exec, R, [S]); if (result === null || this.Type(result) === 'Object') { return result; } throw new $TypeError('"exec" method must return `null` or an Object'); } return regexExec(R, S); }, // https://ecma-international.org/ecma-262/6.0/#sec-arrayspeciescreate ArraySpeciesCreate: function ArraySpeciesCreate(originalArray, length) { if (!this.IsInteger(length) || length < 0) { throw new $TypeError('Assertion failed: length must be an integer >= 0'); } var len = length === 0 ? 0 : length; var C; var isArray = this.IsArray(originalArray); if (isArray) { C = this.Get(originalArray, 'constructor'); // TODO: figure out how to make a cross-realm normal Array, a same-realm Array // if (this.IsConstructor(C)) { // if C is another realm's Array, C = undefined // Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ? // } if (this.Type(C) === 'Object' && hasSymbols && $Symbol.species) { C = this.Get(C, $Symbol.species); if (C === null) { C = void 0; } } } if (typeof C === 'undefined') { return $Array(len); } if (!this.IsConstructor(C)) { throw new $TypeError('C must be a constructor'); } return new C(len); // this.Construct(C, len); }, CreateDataProperty: function CreateDataProperty(O, P, V) { if (this.Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } if (!this.IsPropertyKey(P)) { throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); } var oldDesc = $gOPD(O, P); var extensible = oldDesc || (typeof $isExtensible !== 'function' || $isExtensible(O)); var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable); if (immutable || !extensible) { return false; } var newDesc = { configurable: true, enumerable: true, value: V, writable: true }; Object.defineProperty(O, P, newDesc); return true; }, // https://ecma-international.org/ecma-262/6.0/#sec-createdatapropertyorthrow CreateDataPropertyOrThrow: function CreateDataPropertyOrThrow(O, P, V) { if (this.Type(O) !== 'Object') { throw new $TypeError('Assertion failed: Type(O) is not Object'); } if (!this.IsPropertyKey(P)) { throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true'); } var success = this.CreateDataProperty(O, P, V); if (!success) { throw new $TypeError('unable to create data property'); } return success; }, // https://www.ecma-international.org/ecma-262/6.0/#sec-objectcreate ObjectCreate: function ObjectCreate(proto, internalSlotsList) { if (proto !== null && this.Type(proto) !== 'Object') { throw new $TypeError('Assertion failed: proto must be null or an object'); } var slots = arguments.length < 2 ? [] : internalSlotsList; if (slots.length > 0) { throw new $SyntaxError('es-abstract does not yet support internal slots'); } if (proto === null && !$ObjectCreate) { throw new $SyntaxError('native Object.create support is required to create null objects'); } return $ObjectCreate(proto); }, // https://ecma-international.org/ecma-262/6.0/#sec-advancestringindex AdvanceStringIndex: function AdvanceStringIndex(S, index, unicode) { if (this.Type(S) !== 'String') { throw new $TypeError('S must be a String'); } if (!this.IsInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) { throw new $TypeError('Assertion failed: length must be an integer >= 0 and <= 2**53'); } if (this.Type(unicode) !== 'Boolean') { throw new $TypeError('Assertion failed: unicode must be a Boolean'); } if (!unicode) { return index + 1; } var length = S.length; if ((index + 1) >= length) { return index + 1; } var first = $charCodeAt(S, index); if (first < 0xD800 || first > 0xDBFF) { return index + 1; } var second = $charCodeAt(S, index + 1); if (second < 0xDC00 || second > 0xDFFF) { return index + 1; } return index + 2; } }); delete ES6.CheckObjectCoercible; // renamed in ES6 to RequireObjectCoercible module.exports = ES6; /***/ }), /***/ 9212: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var ES2015 = __webpack_require__(2820); var assign = __webpack_require__(3034); var ES2016 = assign(assign({}, ES2015), { // https://github.com/tc39/ecma262/pull/60 SameValueNonNumber: function SameValueNonNumber(x, y) { if (typeof x === 'number' || typeof x !== typeof y) { throw new TypeError('SameValueNonNumber requires two non-number values of the same type.'); } return this.SameValue(x, y); } }); module.exports = ES2016; /***/ }), /***/ 2176: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var ES2016 = __webpack_require__(9212); var assign = __webpack_require__(3034); var ES2017 = assign(assign({}, ES2016), { ToIndex: function ToIndex(value) { if (typeof value === 'undefined') { return 0; } var integerIndex = this.ToInteger(value); if (integerIndex < 0) { throw new RangeError('index must be >= 0'); } var index = this.ToLength(integerIndex); if (!this.SameValueZero(integerIndex, index)) { throw new RangeError('index must be >= 0 and < 2 ** 53 - 1'); } return index; } }); delete ES2017.EnumerableOwnNames; // replaced with EnumerableOwnProperties module.exports = ES2017; /***/ }), /***/ 6112: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var GetIntrinsic = __webpack_require__(7124); var $Object = GetIntrinsic('%Object%'); var $TypeError = GetIntrinsic('%TypeError%'); var $String = GetIntrinsic('%String%'); var $isNaN = __webpack_require__(1569); var $isFinite = __webpack_require__(2590); var sign = __webpack_require__(5954); var mod = __webpack_require__(1295); var IsCallable = __webpack_require__(5443); var toPrimitive = __webpack_require__(8023); var has = __webpack_require__(9284); // https://es5.github.io/#x9 var ES5 = { ToPrimitive: toPrimitive, ToBoolean: function ToBoolean(value) { return !!value; }, ToNumber: function ToNumber(value) { return +value; // eslint-disable-line no-implicit-coercion }, ToInteger: function ToInteger(value) { var number = this.ToNumber(value); if ($isNaN(number)) { return 0; } if (number === 0 || !$isFinite(number)) { return number; } return sign(number) * Math.floor(Math.abs(number)); }, ToInt32: function ToInt32(x) { return this.ToNumber(x) >> 0; }, ToUint32: function ToUint32(x) { return this.ToNumber(x) >>> 0; }, ToUint16: function ToUint16(value) { var number = this.ToNumber(value); if ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; } var posInt = sign(number) * Math.floor(Math.abs(number)); return mod(posInt, 0x10000); }, ToString: function ToString(value) { return $String(value); }, ToObject: function ToObject(value) { this.CheckObjectCoercible(value); return $Object(value); }, CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) { /* jshint eqnull:true */ if (value == null) { throw new $TypeError(optMessage || 'Cannot call method on ' + value); } return value; }, IsCallable: IsCallable, SameValue: function SameValue(x, y) { if (x === y) { // 0 === -0, but they are not identical. if (x === 0) { return 1 / x === 1 / y; } return true; } return $isNaN(x) && $isNaN(y); }, // https://www.ecma-international.org/ecma-262/5.1/#sec-8 Type: function Type(x) { if (x === null) { return 'Null'; } if (typeof x === 'undefined') { return 'Undefined'; } if (typeof x === 'function' || typeof x === 'object') { return 'Object'; } if (typeof x === 'number') { return 'Number'; } if (typeof x === 'boolean') { return 'Boolean'; } if (typeof x === 'string') { return 'String'; } }, // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type IsPropertyDescriptor: function IsPropertyDescriptor(Desc) { if (this.Type(Desc) !== 'Object') { return false; } var allowed = { '[[Configurable]]': true, '[[Enumerable]]': true, '[[Get]]': true, '[[Set]]': true, '[[Value]]': true, '[[Writable]]': true }; // jscs:disable for (var key in Desc) { // eslint-disable-line if (has(Desc, key) && !allowed[key]) { return false; } } // jscs:enable var isData = has(Desc, '[[Value]]'); var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]'); if (isData && IsAccessor) { throw new $TypeError('Property Descriptors may not be both accessor and data descriptors'); } return true; }, // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1 IsAccessorDescriptor: function IsAccessorDescriptor(Desc) { if (typeof Desc === 'undefined') { return false; } if (!this.IsPropertyDescriptor(Desc)) { throw new $TypeError('Desc must be a Property Descriptor'); } if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) { return false; } return true; }, // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2 IsDataDescriptor: function IsDataDescriptor(Desc) { if (typeof Desc === 'undefined') { return false; } if (!this.IsPropertyDescriptor(Desc)) { throw new $TypeError('Desc must be a Property Descriptor'); } if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) { return false; } return true; }, // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3 IsGenericDescriptor: function IsGenericDescriptor(Desc) { if (typeof Desc === 'undefined') { return false; } if (!this.IsPropertyDescriptor(Desc)) { throw new $TypeError('Desc must be a Property Descriptor'); } if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) { return true; } return false; }, // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4 FromPropertyDescriptor: function FromPropertyDescriptor(Desc) { if (typeof Desc === 'undefined') { return Desc; } if (!this.IsPropertyDescriptor(Desc)) { throw new $TypeError('Desc must be a Property Descriptor'); } if (this.IsDataDescriptor(Desc)) { return { value: Desc['[[Value]]'], writable: !!Desc['[[Writable]]'], enumerable: !!Desc['[[Enumerable]]'], configurable: !!Desc['[[Configurable]]'] }; } else if (this.IsAccessorDescriptor(Desc)) { return { get: Desc['[[Get]]'], set: Desc['[[Set]]'], enumerable: !!Desc['[[Enumerable]]'], configurable: !!Desc['[[Configurable]]'] }; } else { throw new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor'); } }, // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5 ToPropertyDescriptor: function ToPropertyDescriptor(Obj) { if (this.Type(Obj) !== 'Object') { throw new $TypeError('ToPropertyDescriptor requires an object'); } var desc = {}; if (has(Obj, 'enumerable')) { desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable); } if (has(Obj, 'configurable')) { desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable); } if (has(Obj, 'value')) { desc['[[Value]]'] = Obj.value; } if (has(Obj, 'writable')) { desc['[[Writable]]'] = this.ToBoolean(Obj.writable); } if (has(Obj, 'get')) { var getter = Obj.get; if (typeof getter !== 'undefined' && !this.IsCallable(getter)) { throw new TypeError('getter must be a function'); } desc['[[Get]]'] = getter; } if (has(Obj, 'set')) { var setter = Obj.set; if (typeof setter !== 'undefined' && !this.IsCallable(setter)) { throw new $TypeError('setter must be a function'); } desc['[[Set]]'] = setter; } if ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) { throw new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute'); } return desc; } }; module.exports = ES5; /***/ }), /***/ 3034: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var bind = __webpack_require__(1930); var has = bind.call(Function.call, Object.prototype.hasOwnProperty); var $assign = Object.assign; module.exports = function assign(target, source) { if ($assign) { return $assign(target, source); } for (var key in source) { if (has(source, key)) { target[key] = source[key]; } } return target; }; /***/ }), /***/ 2590: /***/ ((module) => { var $isNaN = Number.isNaN || function (a) { return a !== a; }; module.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; }; /***/ }), /***/ 1569: /***/ ((module) => { module.exports = Number.isNaN || function isNaN(a) { return a !== a; }; /***/ }), /***/ 6777: /***/ ((module) => { module.exports = function isPrimitive(value) { return value === null || (typeof value !== 'function' && typeof value !== 'object'); }; /***/ }), /***/ 1295: /***/ ((module) => { module.exports = function mod(number, modulo) { var remain = number % modulo; return Math.floor(remain >= 0 ? remain : remain + modulo); }; /***/ }), /***/ 5954: /***/ ((module) => { module.exports = function sign(number) { return number >= 0 ? 1 : -1; }; /***/ }), /***/ 8023: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var toStr = Object.prototype.toString; var isPrimitive = __webpack_require__(3777); var isCallable = __webpack_require__(5443); // https://es5.github.io/#x8.12 var ES5internalSlots = { '[[DefaultValue]]': function (O, hint) { var actualHint = hint || (toStr.call(O) === '[object Date]' ? String : Number); if (actualHint === String || actualHint === Number) { var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString']; var value, i; for (i = 0; i < methods.length; ++i) { if (isCallable(O[methods[i]])) { value = O[methods[i]](); if (isPrimitive(value)) { return value; } } } throw new TypeError('No default value'); } throw new TypeError('invalid [[DefaultValue]] hint supplied'); } }; // https://es5.github.io/#x9 module.exports = function ToPrimitive(input, PreferredType) { if (isPrimitive(input)) { return input; } return ES5internalSlots['[[DefaultValue]]'](input, PreferredType); }; /***/ }), /***/ 6120: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol'; var isPrimitive = __webpack_require__(3777); var isCallable = __webpack_require__(5443); var isDate = __webpack_require__(8659); var isSymbol = __webpack_require__(3082); var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) { if (typeof O === 'undefined' || O === null) { throw new TypeError('Cannot call method on ' + O); } if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) { throw new TypeError('hint must be "string" or "number"'); } var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString']; var method, result, i; for (i = 0; i < methodNames.length; ++i) { method = O[methodNames[i]]; if (isCallable(method)) { result = method.call(O); if (isPrimitive(result)) { return result; } } } throw new TypeError('No default value'); }; var GetMethod = function GetMethod(O, P) { var func = O[P]; if (func !== null && typeof func !== 'undefined') { if (!isCallable(func)) { throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function'); } return func; } }; // http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive module.exports = function ToPrimitive(input, PreferredType) { if (isPrimitive(input)) { return input; } var hint = 'default'; if (arguments.length > 1) { if (PreferredType === String) { hint = 'string'; } else if (PreferredType === Number) { hint = 'number'; } } var exoticToPrim; if (hasSymbols) { if (Symbol.toPrimitive) { exoticToPrim = GetMethod(input, Symbol.toPrimitive); } else if (isSymbol(input)) { exoticToPrim = Symbol.prototype.valueOf; } } if (typeof exoticToPrim !== 'undefined') { var result = exoticToPrim.call(input, hint); if (isPrimitive(result)) { return result; } throw new TypeError('unable to convert exotic object to primitive'); } if (hint === 'default' && (isDate(input) || isSymbol(input))) { hint = 'string'; } return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint); }; /***/ }), /***/ 3777: /***/ ((module) => { module.exports = function isPrimitive(value) { return value === null || (typeof value !== 'function' && typeof value !== 'object'); }; /***/ }), /***/ 2920: /***/ ((module) => { // // Main // function memoize (fn, options) { var cache = options && options.cache ? options.cache : cacheDefault var serializer = options && options.serializer ? options.serializer : serializerDefault var strategy = options && options.strategy ? options.strategy : strategyDefault return strategy(fn, { cache: cache, serializer: serializer }) } // // Strategy // function isPrimitive (value) { return value == null || typeof value === 'number' || typeof value === 'boolean' // || typeof value === "string" 'unsafe' primitive for our needs } function monadic (fn, cache, serializer, arg) { var cacheKey = isPrimitive(arg) ? arg : serializer(arg) var computedValue = cache.get(cacheKey) if (typeof computedValue === 'undefined') { computedValue = fn.call(this, arg) cache.set(cacheKey, computedValue) } return computedValue } function variadic (fn, cache, serializer) { var args = Array.prototype.slice.call(arguments, 3) var cacheKey = serializer(args) var computedValue = cache.get(cacheKey) if (typeof computedValue === 'undefined') { computedValue = fn.apply(this, args) cache.set(cacheKey, computedValue) } return computedValue } function assemble (fn, context, strategy, cache, serialize) { return strategy.bind( context, fn, cache, serialize ) } function strategyDefault (fn, options) { var strategy = fn.length === 1 ? monadic : variadic return assemble( fn, this, strategy, options.cache.create(), options.serializer ) } function strategyVariadic (fn, options) { var strategy = variadic return assemble( fn, this, strategy, options.cache.create(), options.serializer ) } function strategyMonadic (fn, options) { var strategy = monadic return assemble( fn, this, strategy, options.cache.create(), options.serializer ) } // // Serializer // function serializerDefault () { return JSON.stringify(arguments) } // // Cache // function ObjectWithoutPrototypeCache () { this.cache = Object.create(null) } ObjectWithoutPrototypeCache.prototype.has = function (key) { return (key in this.cache) } ObjectWithoutPrototypeCache.prototype.get = function (key) { return this.cache[key] } ObjectWithoutPrototypeCache.prototype.set = function (key, value) { this.cache[key] = value } var cacheDefault = { create: function create () { return new ObjectWithoutPrototypeCache() } } // // API // module.exports = memoize module.exports.strategies = { variadic: strategyVariadic, monadic: strategyMonadic } /***/ }), /***/ 4175: /***/ ((module) => { var hasOwn = Object.prototype.hasOwnProperty; var toString = Object.prototype.toString; module.exports = function forEach (obj, fn, ctx) { if (toString.call(fn) !== '[object Function]') { throw new TypeError('iterator must be a function'); } var l = obj.length; if (l === +l) { for (var i = 0; i < l; i++) { fn.call(ctx, obj[i], i, obj); } } else { for (var k in obj) { if (hasOwn.call(obj, k)) { fn.call(ctx, obj[k], k, obj); } } } }; /***/ }), /***/ 9930: /***/ ((module) => { "use strict"; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; var slice = Array.prototype.slice; var toStr = Object.prototype.toString; var funcType = '[object Function]'; module.exports = function bind(that) { var target = this; if (typeof target !== 'function' || toStr.call(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slice.call(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; var boundLength = Math.max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs.push('$' + i); } bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; /***/ }), /***/ 1930: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(9930); module.exports = Function.prototype.bind || implementation; /***/ }), /***/ 7105: /***/ ((module) => { "use strict"; var functionsHaveNames = function functionsHaveNames() { return typeof function f() {}.name === 'string'; }; var gOPD = Object.getOwnPropertyDescriptor; if (gOPD) { try { gOPD([], 'length'); } catch (e) { // IE 8 has a broken gOPD gOPD = null; } } functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { return functionsHaveNames() && gOPD && !!gOPD(function () {}, 'name').configurable; }; var $bind = Function.prototype.bind; functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; }; module.exports = functionsHaveNames; /***/ }), /***/ 1801: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /* globals AggregateError, Atomics, FinalizationRegistry, SharedArrayBuffer, WeakRef, */ var undefined; var $SyntaxError = SyntaxError; var $Function = Function; var $TypeError = TypeError; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { // eslint-disable-next-line no-new-func return Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; var $gOPD = Object.getOwnPropertyDescriptor; if ($gOPD) { try { $gOPD({}, ''); } catch (e) { $gOPD = null; // this is IE 8, which has a broken gOPD } } var throwTypeError = function () { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // IE 8 does not throw here return throwTypeError; } catch (calleeThrows) { try { // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') return $gOPD(arguments, 'callee').get; } catch (gOPDthrows) { return throwTypeError; } } }()) : throwTypeError; var hasSymbols = __webpack_require__(658)(); var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto var asyncGenFunction = getEvalledConstructor('async function* () {}'); var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); var INTRINSICS = { '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': getEvalledConstructor('async function () {}'), '%AsyncGenerator%': asyncGenFunctionPrototype, '%AsyncGeneratorFunction%': asyncGenFunction, '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%Boolean%': Boolean, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': Error, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': EvalError, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, '%GeneratorFunction%': getEvalledConstructor('function* () {}'), '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': Object, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': RangeError, '%ReferenceError%': ReferenceError, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypeError%': $TypeError, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%URIError%': URIError, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; var LEGACY_ALIASES = { '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; var bind = __webpack_require__(1930); var hasOwn = __webpack_require__(9284); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === '%' && last !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; }); return result; }; /* end adaptation */ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = '%' + alias[0] + '%'; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return { alias: alias, name: intrinsicName, value: value }; } throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== 'string' || name.length === 0) { throw new $TypeError('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new $TypeError('"allowMissing" argument must be a boolean'); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $SyntaxError('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += '.' + part; intrinsicRealName = '%' + intrinsicBaseName + '%'; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalValue` property. Here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; /***/ }), /***/ 658: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var origSymbol = __webpack_require__.g.Symbol; var hasSymbolSham = __webpack_require__(8838); module.exports = function hasNativeSymbols() { if (typeof origSymbol !== 'function') { return false; } if (typeof Symbol !== 'function') { return false; } if (typeof origSymbol('foo') !== 'symbol') { return false; } if (typeof Symbol('bar') !== 'symbol') { return false; } return hasSymbolSham(); }; /***/ }), /***/ 8838: /***/ ((module) => { "use strict"; /* eslint complexity: [2, 18], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; /***/ }), /***/ 5371: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(9170); var isSymbol = __webpack_require__(3082); var globalKey = '__ global cache key __'; /* istanbul ignore else */ // eslint-disable-next-line no-restricted-properties if (typeof Symbol === 'function' && isSymbol(Symbol('foo')) && typeof Symbol['for'] === 'function') { // eslint-disable-next-line no-restricted-properties globalKey = Symbol['for'](globalKey); } var trueThunk = function () { return true; }; var ensureCache = function ensureCache() { if (!__webpack_require__.g[globalKey]) { var properties = {}; properties[globalKey] = {}; var predicates = {}; predicates[globalKey] = trueThunk; define(__webpack_require__.g, properties, predicates); } return __webpack_require__.g[globalKey]; }; var cache = ensureCache(); var isPrimitive = function isPrimitive(val) { return val === null || (typeof val !== 'object' && typeof val !== 'function'); }; var getPrimitiveKey = function getPrimitiveKey(val) { if (isSymbol(val)) { return Symbol.prototype.valueOf.call(val); } return typeof val + ' | ' + String(val); }; var requirePrimitiveKey = function requirePrimitiveKey(val) { if (!isPrimitive(val)) { throw new TypeError('key must not be an object'); } }; var globalCache = { clear: function clear() { delete __webpack_require__.g[globalKey]; cache = ensureCache(); }, 'delete': function deleteKey(key) { requirePrimitiveKey(key); delete cache[getPrimitiveKey(key)]; return !globalCache.has(key); }, get: function get(key) { requirePrimitiveKey(key); return cache[getPrimitiveKey(key)]; }, has: function has(key) { requirePrimitiveKey(key); return getPrimitiveKey(key) in cache; }, set: function set(key, value) { requirePrimitiveKey(key); var primitiveKey = getPrimitiveKey(key); var props = {}; props[primitiveKey] = value; var predicates = {}; predicates[primitiveKey] = trueThunk; define(cache, props, predicates); return globalCache.has(key); }, setIfMissingThenGet: function setIfMissingThenGet(key, valueThunk) { if (globalCache.has(key)) { return globalCache.get(key); } var item = valueThunk(); globalCache.set(key, item); return item; } }; module.exports = globalCache; /***/ }), /***/ 7115: /***/ ((__unused_webpack_module, exports) => { // Copyright (c) 2014 Rafael Caricio. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var GradientParser = {}; GradientParser.parse = (function() { var tokens = { linearGradient: /^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i, repeatingLinearGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i, radialGradient: /^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i, repeatingRadialGradient: /^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i, sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i, extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/, positionKeywords: /^(left|center|right|top|bottom)/i, pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/, percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/, emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/, angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/, startCall: /^\(/, endCall: /^\)/, comma: /^,/, hexColor: /^\#([0-9a-fA-F]+)/, literalColor: /^([a-zA-Z]+)/, rgbColor: /^rgb/i, rgbaColor: /^rgba/i, number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/ }; var input = ''; function error(msg) { var err = new Error(input + ': ' + msg); err.source = input; throw err; } function getAST() { var ast = matchListDefinitions(); if (input.length > 0) { error('Invalid input not EOF'); } return ast; } function matchListDefinitions() { return matchListing(matchDefinition); } function matchDefinition() { return matchGradient( 'linear-gradient', tokens.linearGradient, matchLinearOrientation) || matchGradient( 'repeating-linear-gradient', tokens.repeatingLinearGradient, matchLinearOrientation) || matchGradient( 'radial-gradient', tokens.radialGradient, matchListRadialOrientations) || matchGradient( 'repeating-radial-gradient', tokens.repeatingRadialGradient, matchListRadialOrientations); } function matchGradient(gradientType, pattern, orientationMatcher) { return matchCall(pattern, function(captures) { var orientation = orientationMatcher(); if (orientation) { if (!scan(tokens.comma)) { error('Missing comma before color stops'); } } return { type: gradientType, orientation: orientation, colorStops: matchListing(matchColorStop) }; }); } function matchCall(pattern, callback) { var captures = scan(pattern); if (captures) { if (!scan(tokens.startCall)) { error('Missing ('); } result = callback(captures); if (!scan(tokens.endCall)) { error('Missing )'); } return result; } } function matchLinearOrientation() { return matchSideOrCorner() || matchAngle(); } function matchSideOrCorner() { return match('directional', tokens.sideOrCorner, 1); } function matchAngle() { return match('angular', tokens.angleValue, 1); } function matchListRadialOrientations() { var radialOrientations, radialOrientation = matchRadialOrientation(), lookaheadCache; if (radialOrientation) { radialOrientations = []; radialOrientations.push(radialOrientation); lookaheadCache = input; if (scan(tokens.comma)) { radialOrientation = matchRadialOrientation(); if (radialOrientation) { radialOrientations.push(radialOrientation); } else { input = lookaheadCache; } } } return radialOrientations; } function matchRadialOrientation() { var radialType = matchCircle() || matchEllipse(); if (radialType) { radialType.at = matchAtPosition(); } else { var defaultPosition = matchPositioning(); if (defaultPosition) { radialType = { type: 'default-radial', at: defaultPosition }; } } return radialType; } function matchCircle() { var circle = match('shape', /^(circle)/i, 0); if (circle) { circle.style = matchLength() || matchExtentKeyword(); } return circle; } function matchEllipse() { var ellipse = match('shape', /^(ellipse)/i, 0); if (ellipse) { ellipse.style = matchDistance() || matchExtentKeyword(); } return ellipse; } function matchExtentKeyword() { return match('extent-keyword', tokens.extentKeywords, 1); } function matchAtPosition() { if (match('position', /^at/, 0)) { var positioning = matchPositioning(); if (!positioning) { error('Missing positioning value'); } return positioning; } } function matchPositioning() { var location = matchCoordinates(); if (location.x || location.y) { return { type: 'position', value: location }; } } function matchCoordinates() { return { x: matchDistance(), y: matchDistance() }; } function matchListing(matcher) { var captures = matcher(), result = []; if (captures) { result.push(captures); while (scan(tokens.comma)) { captures = matcher(); if (captures) { result.push(captures); } else { error('One extra comma'); } } } return result; } function matchColorStop() { var color = matchColor(); if (!color) { error('Expected color definition'); } color.length = matchDistance(); return color; } function matchColor() { return matchHexColor() || matchRGBAColor() || matchRGBColor() || matchLiteralColor(); } function matchLiteralColor() { return match('literal', tokens.literalColor, 0); } function matchHexColor() { return match('hex', tokens.hexColor, 1); } function matchRGBColor() { return matchCall(tokens.rgbColor, function() { return { type: 'rgb', value: matchListing(matchNumber) }; }); } function matchRGBAColor() { return matchCall(tokens.rgbaColor, function() { return { type: 'rgba', value: matchListing(matchNumber) }; }); } function matchNumber() { return scan(tokens.number)[1]; } function matchDistance() { return match('%', tokens.percentageValue, 1) || matchPositionKeyword() || matchLength(); } function matchPositionKeyword() { return match('position-keyword', tokens.positionKeywords, 1); } function matchLength() { return match('px', tokens.pixelValue, 1) || match('em', tokens.emValue, 1); } function match(type, pattern, captureIndex) { var captures = scan(pattern); if (captures) { return { type: type, value: captures[captureIndex] }; } } function scan(regexp) { var captures, blankCaptures; blankCaptures = /^[\n\r\t\s]+/.exec(input); if (blankCaptures) { consume(blankCaptures[0].length); } captures = regexp.exec(input); if (captures) { consume(captures[0].length); } return captures; } function consume(size) { input = input.substr(size); } return function(code) { input = code.toString(); return getAST(); }; })(); exports.parse = (GradientParser || {}).parse; /***/ }), /***/ 5682: /***/ ((module) => { "use strict"; /* eslint complexity: [2, 17], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; /***/ }), /***/ 9284: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var bind = __webpack_require__(1930); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); /***/ }), /***/ 3138: /***/ ((module) => { module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_187__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __nested_webpack_require_187__.m = modules; /******/ /******/ // expose the module cache /******/ __nested_webpack_require_187__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __nested_webpack_require_187__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __nested_webpack_require_187__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __nested_webpack_require_1468__) { module.exports = __nested_webpack_require_1468__(1); /***/ }), /* 1 */ /***/ (function(module, exports, __nested_webpack_require_1587__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __nested_webpack_require_1587__(2); Object.defineProperty(exports, 'combineChunks', { enumerable: true, get: function get() { return _utils.combineChunks; } }); Object.defineProperty(exports, 'fillInChunks', { enumerable: true, get: function get() { return _utils.fillInChunks; } }); Object.defineProperty(exports, 'findAll', { enumerable: true, get: function get() { return _utils.findAll; } }); Object.defineProperty(exports, 'findChunks', { enumerable: true, get: function get() { return _utils.findChunks; } }); /***/ }), /* 2 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * Creates an array of chunk objects representing both higlightable and non highlightable pieces of text that match each search word. * @return Array of "chunks" (where a Chunk is { start:number, end:number, highlight:boolean }) */ var findAll = exports.findAll = function findAll(_ref) { var autoEscape = _ref.autoEscape, _ref$caseSensitive = _ref.caseSensitive, caseSensitive = _ref$caseSensitive === undefined ? false : _ref$caseSensitive, _ref$findChunks = _ref.findChunks, findChunks = _ref$findChunks === undefined ? defaultFindChunks : _ref$findChunks, sanitize = _ref.sanitize, searchWords = _ref.searchWords, textToHighlight = _ref.textToHighlight; return fillInChunks({ chunksToHighlight: combineChunks({ chunks: findChunks({ autoEscape: autoEscape, caseSensitive: caseSensitive, sanitize: sanitize, searchWords: searchWords, textToHighlight: textToHighlight }) }), totalLength: textToHighlight ? textToHighlight.length : 0 }); }; /** * Takes an array of {start:number, end:number} objects and combines chunks that overlap into single chunks. * @return {start:number, end:number}[] */ var combineChunks = exports.combineChunks = function combineChunks(_ref2) { var chunks = _ref2.chunks; chunks = chunks.sort(function (first, second) { return first.start - second.start; }).reduce(function (processedChunks, nextChunk) { // First chunk just goes straight in the array... if (processedChunks.length === 0) { return [nextChunk]; } else { // ... subsequent chunks get checked to see if they overlap... var prevChunk = processedChunks.pop(); if (nextChunk.start <= prevChunk.end) { // It may be the case that prevChunk completely surrounds nextChunk, so take the // largest of the end indeces. var endIndex = Math.max(prevChunk.end, nextChunk.end); processedChunks.push({ highlight: false, start: prevChunk.start, end: endIndex }); } else { processedChunks.push(prevChunk, nextChunk); } return processedChunks; } }, []); return chunks; }; /** * Examine text for any matches. * If we find matches, add them to the returned array as a "chunk" object ({start:number, end:number}). * @return {start:number, end:number}[] */ var defaultFindChunks = function defaultFindChunks(_ref3) { var autoEscape = _ref3.autoEscape, caseSensitive = _ref3.caseSensitive, _ref3$sanitize = _ref3.sanitize, sanitize = _ref3$sanitize === undefined ? defaultSanitize : _ref3$sanitize, searchWords = _ref3.searchWords, textToHighlight = _ref3.textToHighlight; textToHighlight = sanitize(textToHighlight); return searchWords.filter(function (searchWord) { return searchWord; }) // Remove empty words .reduce(function (chunks, searchWord) { searchWord = sanitize(searchWord); if (autoEscape) { searchWord = escapeRegExpFn(searchWord); } var regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi'); var match = void 0; while (match = regex.exec(textToHighlight)) { var _start = match.index; var _end = regex.lastIndex; // We do not return zero-length matches if (_end > _start) { chunks.push({ highlight: false, start: _start, end: _end }); } // Prevent browsers like Firefox from getting stuck in an infinite loop // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/ if (match.index === regex.lastIndex) { regex.lastIndex++; } } return chunks; }, []); }; // Allow the findChunks to be overridden in findAll, // but for backwards compatibility we export as the old name exports.findChunks = defaultFindChunks; /** * Given a set of chunks to highlight, create an additional set of chunks * to represent the bits of text between the highlighted text. * @param chunksToHighlight {start:number, end:number}[] * @param totalLength number * @return {start:number, end:number, highlight:boolean}[] */ var fillInChunks = exports.fillInChunks = function fillInChunks(_ref4) { var chunksToHighlight = _ref4.chunksToHighlight, totalLength = _ref4.totalLength; var allChunks = []; var append = function append(start, end, highlight) { if (end - start > 0) { allChunks.push({ start: start, end: end, highlight: highlight }); } }; if (chunksToHighlight.length === 0) { append(0, totalLength, false); } else { var lastIndex = 0; chunksToHighlight.forEach(function (chunk) { append(lastIndex, chunk.start, false); append(chunk.start, chunk.end, true); lastIndex = chunk.end; }); append(lastIndex, totalLength, false); } return allChunks; }; function defaultSanitize(string) { return string; } function escapeRegExpFn(string) { return string.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); } /***/ }) /******/ ]); /***/ }), /***/ 1281: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var reactIs = __webpack_require__(338); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ 5443: /***/ ((module) => { "use strict"; var fnToStr = Function.prototype.toString; var constructorRegex = /^\s*class\b/; var isES6ClassFn = function isES6ClassFunction(value) { try { var fnStr = fnToStr.call(value); return constructorRegex.test(fnStr); } catch (e) { return false; // not a function } }; var tryFunctionObject = function tryFunctionToStr(value) { try { if (isES6ClassFn(value)) { return false; } fnToStr.call(value); return true; } catch (e) { return false; } }; var toStr = Object.prototype.toString; var fnClass = '[object Function]'; var genClass = '[object GeneratorFunction]'; var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; module.exports = function isCallable(value) { if (!value) { return false; } if (typeof value !== 'function' && typeof value !== 'object') { return false; } if (typeof value === 'function' && !value.prototype) { return true; } if (hasToStringTag) { return tryFunctionObject(value); } if (isES6ClassFn(value)) { return false; } var strClass = toStr.call(value); return strClass === fnClass || strClass === genClass; }; /***/ }), /***/ 8659: /***/ ((module) => { "use strict"; var getDay = Date.prototype.getDay; var tryDateObject = function tryDateObject(value) { try { getDay.call(value); return true; } catch (e) { return false; } }; var toStr = Object.prototype.toString; var dateClass = '[object Date]'; var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; module.exports = function isDateObject(value) { if (typeof value !== 'object' || value === null) { return false; } return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; }; /***/ }), /***/ 5278: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var has = __webpack_require__(9284); var regexExec = RegExp.prototype.exec; var gOPD = Object.getOwnPropertyDescriptor; var tryRegexExecCall = function tryRegexExec(value) { try { var lastIndex = value.lastIndex; value.lastIndex = 0; regexExec.call(value); return true; } catch (e) { return false; } finally { value.lastIndex = lastIndex; } }; var toStr = Object.prototype.toString; var regexClass = '[object RegExp]'; var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; module.exports = function isRegex(value) { if (!value || typeof value !== 'object') { return false; } if (!hasToStringTag) { return toStr.call(value) === regexClass; } var descriptor = gOPD(value, 'lastIndex'); var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); if (!hasLastIndexDataProperty) { return false; } return tryRegexExecCall(value); }; /***/ }), /***/ 3082: /***/ ((module) => { "use strict"; var toStr = Object.prototype.toString; var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol'; if (hasSymbols) { var symToStr = Symbol.prototype.toString; var symStringRegex = /^Symbol\(.*\)$/; var isSymbolObject = function isSymbolObject(value) { if (typeof value.valueOf() !== 'symbol') { return false; } return symStringRegex.test(symToStr.call(value)); }; module.exports = function isSymbol(value) { if (typeof value === 'symbol') { return true; } if (toStr.call(value) !== '[object Symbol]') { return false; } try { return isSymbolObject(value); } catch (e) { return false; } }; } else { module.exports = function isSymbol(value) { // this environment does not support Symbols. return false; }; } /***/ }), /***/ 5834: /***/ ((module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isTouchDevice; function isTouchDevice() { return !!(typeof window !== 'undefined' && ('ontouchstart' in window || window.DocumentTouch && typeof document !== 'undefined' && document instanceof window.DocumentTouch)) || !!(typeof navigator !== 'undefined' && (navigator.maxTouchPoints || navigator.msMaxTouchPoints)); } module.exports = exports['default']; /***/ }), /***/ 4937: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(158); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /***/ 194: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(4937), getRawTag = __webpack_require__(5401), objectToString = __webpack_require__(2445); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /***/ 2383: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var trimmedEndIndex = __webpack_require__(8725); /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** * The base implementation of `_.trim`. * * @private * @param {string} string The string to trim. * @returns {string} Returns the trimmed string. */ function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string; } module.exports = baseTrim; /***/ }), /***/ 4528: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; module.exports = freeGlobal; /***/ }), /***/ 5401: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var Symbol = __webpack_require__(4937); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ 2445: /***/ ((module) => { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ 158: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var freeGlobal = __webpack_require__(4528); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /***/ 8725: /***/ ((module) => { /** Used to match a single whitespace character. */ var reWhitespace = /\s/; /** * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace * character of `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the index of the last non-whitespace character. */ function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) {} return index; } module.exports = trimmedEndIndex; /***/ }), /***/ 6897: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var isObject = __webpack_require__(3619), now = __webpack_require__(8253), toNumber = __webpack_require__(4360); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce; /***/ }), /***/ 3619: /***/ ((module) => { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /***/ 1653: /***/ ((module) => { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /***/ 1878: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseGetTag = __webpack_require__(194), isObjectLike = __webpack_require__(1653); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /***/ 8253: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var root = __webpack_require__(158); /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; module.exports = now; /***/ }), /***/ 8172: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var debounce = __webpack_require__(6897), isObject = __webpack_require__(3619); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a throttled function that only invokes `func` at most once per * every `wait` milliseconds. The throttled function comes with a `cancel` * method to cancel delayed `func` invocations and a `flush` method to * immediately invoke them. Provide `options` to indicate whether `func` * should be invoked on the leading and/or trailing edge of the `wait` * timeout. The `func` is invoked with the last arguments provided to the * throttled function. Subsequent calls to the throttled function return the * result of the last `func` invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the throttled function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.throttle` and `_.debounce`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to throttle. * @param {number} [wait=0] The number of milliseconds to throttle invocations to. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=true] * Specify invoking on the leading edge of the timeout. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new throttled function. * @example * * // Avoid excessively updating the position while scrolling. * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); * jQuery(element).on('click', throttled); * * // Cancel the trailing throttled invocation. * jQuery(window).on('popstate', throttled.cancel); */ function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } if (isObject(options)) { leading = 'leading' in options ? !!options.leading : leading; trailing = 'trailing' in options ? !!options.trailing : trailing; } return debounce(func, wait, { 'leading': leading, 'maxWait': wait, 'trailing': trailing }); } module.exports = throttle; /***/ }), /***/ 4360: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var baseTrim = __webpack_require__(2383), isObject = __webpack_require__(3619), isSymbol = __webpack_require__(1878); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /***/ 9756: /***/ ((module) => { /** * Memize options object. * * @typedef MemizeOptions * * @property {number} [maxSize] Maximum size of the cache. */ /** * Internal cache entry. * * @typedef MemizeCacheNode * * @property {?MemizeCacheNode|undefined} [prev] Previous node. * @property {?MemizeCacheNode|undefined} [next] Next node. * @property {Array<*>} args Function arguments for cache * entry. * @property {*} val Function result. */ /** * Properties of the enhanced function for controlling cache. * * @typedef MemizeMemoizedFunction * * @property {()=>void} clear Clear the cache. */ /** * Accepts a function to be memoized, and returns a new memoized function, with * optional options. * * @template {Function} F * * @param {F} fn Function to memoize. * @param {MemizeOptions} [options] Options object. * * @return {F & MemizeMemoizedFunction} Memoized function. */ function memize( fn, options ) { var size = 0; /** @type {?MemizeCacheNode|undefined} */ var head; /** @type {?MemizeCacheNode|undefined} */ var tail; options = options || {}; function memoized( /* ...args */ ) { var node = head, len = arguments.length, args, i; searchCache: while ( node ) { // Perform a shallow equality test to confirm that whether the node // under test is a candidate for the arguments passed. Two arrays // are shallowly equal if their length matches and each entry is // strictly equal between the two sets. Avoid abstracting to a // function which could incur an arguments leaking deoptimization. // Check whether node arguments match arguments length if ( node.args.length !== arguments.length ) { node = node.next; continue; } // Check whether node arguments match arguments values for ( i = 0; i < len; i++ ) { if ( node.args[ i ] !== arguments[ i ] ) { node = node.next; continue searchCache; } } // At this point we can assume we've found a match // Surface matched node to head if not already if ( node !== head ) { // As tail, shift to previous. Must only shift if not also // head, since if both head and tail, there is no previous. if ( node === tail ) { tail = node.prev; } // Adjust siblings to point to each other. If node was tail, // this also handles new tail's empty `next` assignment. /** @type {MemizeCacheNode} */ ( node.prev ).next = node.next; if ( node.next ) { node.next.prev = node.prev; } node.next = head; node.prev = null; /** @type {MemizeCacheNode} */ ( head ).prev = node; head = node; } // Return immediately return node.val; } // No cached value found. Continue to insertion phase: // Create a copy of arguments (avoid leaking deoptimization) args = new Array( len ); for ( i = 0; i < len; i++ ) { args[ i ] = arguments[ i ]; } node = { args: args, // Generate the result from original function val: fn.apply( null, args ), }; // Don't need to check whether node is already head, since it would // have been returned above already if it was // Shift existing head down list if ( head ) { head.prev = node; node.next = head; } else { // If no head, follows that there's no tail (at initial or reset) tail = node; } // Trim tail if we're reached max size and are pending cache insertion if ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) { tail = /** @type {MemizeCacheNode} */ ( tail ).prev; /** @type {MemizeCacheNode} */ ( tail ).next = null; } else { size++; } head = node; return node.val; } memoized.clear = function() { head = null; tail = null; size = 0; }; if ( false ) {} // Ignore reason: There's not a clear solution to create an intersection of // the function with additional properties, where the goal is to retain the // function signature of the incoming argument and add control properties // on the return value. // @ts-ignore return memoized; } module.exports = memize; /***/ }), /***/ 8383: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var keysShim; if (!Object.keys) { // modified from https://github.com/es-shims/es5-shim var has = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var isArgs = __webpack_require__(4418); // eslint-disable-line global-require var isEnumerable = Object.prototype.propertyIsEnumerable; var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); var dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; var equalsConstructorPrototype = function (o) { var ctor = o.constructor; return ctor && ctor.prototype === o; }; var excludedKeys = { $applicationCache: true, $console: true, $external: true, $frame: true, $frameElement: true, $frames: true, $innerHeight: true, $innerWidth: true, $onmozfullscreenchange: true, $onmozfullscreenerror: true, $outerHeight: true, $outerWidth: true, $pageXOffset: true, $pageYOffset: true, $parent: true, $scrollLeft: true, $scrollTop: true, $scrollX: true, $scrollY: true, $self: true, $webkitIndexedDB: true, $webkitStorageInfo: true, $window: true }; var hasAutomationEqualityBug = (function () { /* global window */ if (typeof window === 'undefined') { return false; } for (var k in window) { try { if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { try { equalsConstructorPrototype(window[k]); } catch (e) { return true; } } } catch (e) { return true; } } return false; }()); var equalsConstructorPrototypeIfNotBuggy = function (o) { /* global window */ if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(o); } try { return equalsConstructorPrototype(o); } catch (e) { return false; } }; keysShim = function keys(object) { var isObject = object !== null && typeof object === 'object'; var isFunction = toStr.call(object) === '[object Function]'; var isArguments = isArgs(object); var isString = isObject && toStr.call(object) === '[object String]'; var theKeys = []; if (!isObject && !isFunction && !isArguments) { throw new TypeError('Object.keys called on a non-object'); } var skipProto = hasProtoEnumBug && isFunction; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); } } if (isArguments && object.length > 0) { for (var j = 0; j < object.length; ++j) { theKeys.push(String(j)); } } else { for (var name in object) { if (!(skipProto && name === 'prototype') && has.call(object, name)) { theKeys.push(String(name)); } } } if (hasDontEnumBug) { var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); for (var k = 0; k < dontEnums.length; ++k) { if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { theKeys.push(dontEnums[k]); } } } return theKeys; }; } module.exports = keysShim; /***/ }), /***/ 806: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var slice = Array.prototype.slice; var isArgs = __webpack_require__(4418); var origKeys = Object.keys; var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8383); var originalKeys = Object.keys; keysShim.shim = function shimObjectKeys() { if (Object.keys) { var keysWorksWithArguments = (function () { // Safari 5.0 bug var args = Object.keys(arguments); return args && args.length === arguments.length; }(1, 2)); if (!keysWorksWithArguments) { Object.keys = function keys(object) { // eslint-disable-line func-name-matching if (isArgs(object)) { return originalKeys(slice.call(object)); } return originalKeys(object); }; } } else { Object.keys = keysShim; } return Object.keys || keysShim; }; module.exports = keysShim; /***/ }), /***/ 4418: /***/ ((module) => { "use strict"; var toStr = Object.prototype.toString; module.exports = function isArguments(value) { var str = toStr.call(value); var isArgs = str === '[object Arguments]'; if (!isArgs) { isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]'; } return isArgs; }; /***/ }), /***/ 2148: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; // modified from https://github.com/es-shims/es6-shim var keys = __webpack_require__(806); var bind = __webpack_require__(1930); var canBeObject = function (obj) { return typeof obj !== 'undefined' && obj !== null; }; var hasSymbols = __webpack_require__(5682)(); var toObject = Object; var push = bind.call(Function.call, Array.prototype.push); var propIsEnumerable = bind.call(Function.call, Object.prototype.propertyIsEnumerable); var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null; module.exports = function assign(target, source1) { if (!canBeObject(target)) { throw new TypeError('target must be an object'); } var objTarget = toObject(target); var s, source, i, props, syms, value, key; for (s = 1; s < arguments.length; ++s) { source = toObject(arguments[s]); props = keys(source); var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols); if (getSymbols) { syms = getSymbols(source); for (i = 0; i < syms.length; ++i) { key = syms[i]; if (propIsEnumerable(source, key)) { push(props, key); } } } for (i = 0; i < props.length; ++i) { key = props[i]; value = source[key]; if (propIsEnumerable(source, key)) { objTarget[key] = value; } } } return objTarget; }; /***/ }), /***/ 4011: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var defineProperties = __webpack_require__(9170); var implementation = __webpack_require__(2148); var getPolyfill = __webpack_require__(293); var shim = __webpack_require__(2666); var polyfill = getPolyfill(); defineProperties(polyfill, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = polyfill; /***/ }), /***/ 293: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(2148); var lacksProperEnumerationOrder = function () { if (!Object.assign) { return false; } // v8, specifically in node 4.x, has a bug with incorrect property enumeration order // note: this does not detect the bug unless there's 20 characters var str = 'abcdefghijklmnopqrst'; var letters = str.split(''); var map = {}; for (var i = 0; i < letters.length; ++i) { map[letters[i]] = letters[i]; } var obj = Object.assign({}, map); var actual = ''; for (var k in obj) { actual += k; } return str !== actual; }; var assignHasPendingExceptions = function () { if (!Object.assign || !Object.preventExtensions) { return false; } // Firefox 37 still has "pending exception" logic in its Object.assign implementation, // which is 72% slower than our shim, and Firefox 40's native implementation. var thrower = Object.preventExtensions({ 1: 2 }); try { Object.assign(thrower, 'xy'); } catch (e) { return thrower[1] === 'y'; } return false; }; module.exports = function getPolyfill() { if (!Object.assign) { return implementation; } if (lacksProperEnumerationOrder()) { return implementation; } if (assignHasPendingExceptions()) { return implementation; } return Object.assign; }; /***/ }), /***/ 2666: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(9170); var getPolyfill = __webpack_require__(293); module.exports = function shimAssign() { var polyfill = getPolyfill(); define( Object, { assign: polyfill }, { assign: function () { return Object.assign !== polyfill; } } ); return polyfill; }; /***/ }), /***/ 1631: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var has = __webpack_require__(9284); var RequireObjectCoercible = __webpack_require__(604); var callBound = __webpack_require__(7615); var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable'); module.exports = function values(O) { var obj = RequireObjectCoercible(O); var vals = []; for (var key in obj) { if (has(obj, key) && $isEnumerable(obj, key)) { vals.push(obj[key]); } } return vals; }; /***/ }), /***/ 5861: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var define = __webpack_require__(7057); var callBind = __webpack_require__(2550); var implementation = __webpack_require__(1631); var getPolyfill = __webpack_require__(779); var shim = __webpack_require__(7256); var polyfill = callBind(getPolyfill(), Object); define(polyfill, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = polyfill; /***/ }), /***/ 7057: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var keys = __webpack_require__(806); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { origDefineProperty(obj, 'x', { enumerable: false, value: obj }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax for (var _ in obj) { // jscs:ignore disallowUnusedVariables return false; } return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { origDefineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = concat.call(props, Object.getOwnPropertySymbols(map)); } for (var i = 0; i < props.length; i += 1) { defineProperty(object, props[i], map[props[i]], predicates[props[i]]); } }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /***/ 604: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__(2559); /***/ }), /***/ 2559: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var GetIntrinsic = __webpack_require__(1801); var $TypeError = GetIntrinsic('%TypeError%'); // http://ecma-international.org/ecma-262/5.1/#sec-9.10 module.exports = function CheckObjectCoercible(value, optMessage) { if (value == null) { throw new $TypeError(optMessage || ('Cannot call method on ' + value)); } return value; }; /***/ }), /***/ 779: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var implementation = __webpack_require__(1631); module.exports = function getPolyfill() { return typeof Object.values === 'function' ? Object.values : implementation; }; /***/ }), /***/ 7256: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var getPolyfill = __webpack_require__(779); var define = __webpack_require__(7057); module.exports = function shimValues() { var polyfill = getPolyfill(); define(Object, { values: polyfill }, { values: function testValues() { return Object.values !== polyfill; } }); return polyfill; }; /***/ }), /***/ 6279: /***/ (function(module) { // Generated by CoffeeScript 1.12.2 (function() { var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; if ((typeof performance !== "undefined" && performance !== null) && performance.now) { module.exports = function() { return performance.now(); }; } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { module.exports = function() { return (getNanoSeconds() - nodeLoadTime) / 1e6; }; hrtime = process.hrtime; getNanoSeconds = function() { var hr; hr = hrtime(); return hr[0] * 1e9 + hr[1]; }; moduleLoadTime = getNanoSeconds(); upTime = process.uptime() * 1e9; nodeLoadTime = moduleLoadTime - upTime; } else if (Date.now) { module.exports = function() { return Date.now() - loadTime; }; loadTime = Date.now(); } else { module.exports = function() { return new Date().getTime() - loadTime; }; loadTime = new Date().getTime(); } }).call(this); /***/ }), /***/ 4530: /***/ ((module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports["default"] = isPlainObject; function isPlainObject(x) { return x && (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && !Array.isArray(x); } module.exports = exports['default']; /***/ }), /***/ 5372: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = __webpack_require__(9567); function emptyFunction() {} function emptyFunctionWithReset() {} emptyFunctionWithReset.resetWarningCache = emptyFunction; module.exports = function() { function shim(props, propName, componentName, location, propFullName, secret) { if (secret === ReactPropTypesSecret) { // It is still safe when called from React. return; } var err = new Error( 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types' ); err.name = 'Invariant Violation'; throw err; }; shim.isRequired = shim; function getShim() { return shim; }; // Important! // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. var ReactPropTypes = { array: shim, bool: shim, func: shim, number: shim, object: shim, string: shim, symbol: shim, any: shim, arrayOf: getShim, element: shim, elementType: shim, instanceOf: getShim, node: shim, objectOf: getShim, oneOf: getShim, oneOfType: getShim, shape: getShim, exact: getShim, checkPropTypes: emptyFunctionWithReset, resetWarningCache: emptyFunction }; ReactPropTypes.PropTypes = ReactPropTypes; return ReactPropTypes; }; /***/ }), /***/ 2652: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(5372)(); } /***/ }), /***/ 9567: /***/ ((module) => { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ 1666: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var now = __webpack_require__(6279) , root = typeof window === 'undefined' ? __webpack_require__.g : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /***/ }), /***/ 4821: /***/ ((__unused_webpack_module, exports) => { "use strict"; /** @license React v16.8.4 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(exports, "__esModule", ({value:!0})); var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"): 60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n; exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k}; exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f}; exports.isSuspense=function(a){return t(a)===p}; /***/ }), /***/ 338: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; if (true) { module.exports = __webpack_require__(4821); } else {} /***/ }), /***/ 9217: /***/ ((module) => { var messages = { invalidPredicate: '`predicate` must be a function', invalidPropValidator: '`propValidator` must be a function', requiredCore: 'is marked as required', invalidTypeCore: 'Invalid input type', predicateFailureCore: 'Failed to succeed with predicate', anonymousMessage: '<>', baseInvalidMessage: 'Invalid ', }; function constructPropValidatorVariations(propValidator) { if (typeof propValidator !== 'function') { throw new Error(messages.invalidPropValidator); } var requiredPropValidator = propValidator.bind(null, false, null); requiredPropValidator.isRequired = propValidator.bind(null, true, null); requiredPropValidator.withPredicate = function predicateApplication(predicate) { if (typeof predicate !== 'function') { throw new Error(messages.invalidPredicate); } var basePropValidator = propValidator.bind(null, false, predicate); basePropValidator.isRequired = propValidator.bind(null, true, predicate); return basePropValidator; }; return requiredPropValidator; } function createInvalidRequiredErrorMessage(propName, componentName, value) { return new Error( 'The prop `' + propName + '` ' + messages.requiredCore + ' in `' + componentName + '`, but its value is `' + value + '`.' ); } var independentGuardianValue = -1; function preValidationRequireCheck(isRequired, componentName, propFullName, propValue) { var isPropValueUndefined = typeof propValue === 'undefined'; var isPropValueNull = propValue === null; if (isRequired) { if (isPropValueUndefined) { return createInvalidRequiredErrorMessage(propFullName, componentName, 'undefined'); } else if (isPropValueNull) { return createInvalidRequiredErrorMessage(propFullName, componentName, 'null'); } } if (isPropValueUndefined || isPropValueNull) { return null; } return independentGuardianValue; } function createMomentChecker(type, typeValidator, validator, momentType) { function propValidator( isRequired, // Bound parameter to indicate with the propType is required predicate, // Bound parameter to allow user to add dynamic validation props, propName, componentName, location, propFullName ) { var propValue = props[ propName ]; var propType = typeof propValue; componentName = componentName || messages.anonymousMessage; propFullName = propFullName || propName; var preValidationRequireCheckValue = preValidationRequireCheck( isRequired, componentName, propFullName, propValue ); if (preValidationRequireCheckValue !== independentGuardianValue) { return preValidationRequireCheckValue; } if (typeValidator && !typeValidator(propValue)) { return new Error( messages.invalidTypeCore + ': `' + propName + '` of type `' + propType + '` ' + 'supplied to `' + componentName + '`, expected `' + type + '`.' ); } if (!validator(propValue)) { return new Error( messages.baseInvalidMessage + location + ' `' + propName + '` of type `' + propType + '` ' + 'supplied to `' + componentName + '`, expected `' + momentType + '`.' ); } if (predicate && !predicate(propValue)) { var predicateName = predicate.name || messages.anonymousMessage; return new Error( messages.baseInvalidMessage + location + ' `' + propName + '` of type `' + propType + '` ' + 'supplied to `' + componentName + '`. ' + messages.predicateFailureCore + ' `' + predicateName + '`.' ); } return null; } return constructPropValidatorVariations(propValidator); } module.exports = { constructPropValidatorVariations: constructPropValidatorVariations, createMomentChecker: createMomentChecker, messages: messages, }; /***/ }), /***/ 6150: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var moment = __webpack_require__(6292); var momentValidationWrapper = __webpack_require__(3416); var core = __webpack_require__(9217); module.exports = { momentObj : core.createMomentChecker( 'object', function(obj) { return typeof obj === 'object'; }, function isValid(value) { return momentValidationWrapper.isValidMoment(value); }, 'Moment' ), momentString : core.createMomentChecker( 'string', function(str) { return typeof str === 'string'; }, function isValid(value) { return momentValidationWrapper.isValidMoment(moment(value)); }, 'Moment' ), momentDurationObj : core.createMomentChecker( 'object', function(obj) { return typeof obj === 'object'; }, function isValid(value) { return moment.isDuration(value); }, 'Duration' ), }; /***/ }), /***/ 3416: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var moment = __webpack_require__(6292); function isValidMoment(testMoment) { if (typeof moment.isMoment === 'function' && !moment.isMoment(testMoment)) { return false; } /* istanbul ignore else */ if (typeof testMoment.isValid === 'function') { // moment 1.7.0+ return testMoment.isValid(); } /* istanbul ignore next */ return !isNaN(testMoment); } module.exports = { isValidMoment : isValidMoment, }; /***/ }), /***/ 2239: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); 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; }; }(); var _react = __webpack_require__(9196); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(2652); var _propTypes2 = _interopRequireDefault(_propTypes); var _airbnbPropTypes = __webpack_require__(4882); var _consolidatedEvents = __webpack_require__(8495); var _object = __webpack_require__(5861); var _object2 = _interopRequireDefault(_object); var _document = __webpack_require__(6789); var _document2 = _interopRequireDefault(_document); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 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; } 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; } var DISPLAY = { BLOCK: 'block', FLEX: 'flex', INLINE: 'inline', INLINE_BLOCK: 'inline-block', CONTENTS: 'contents' }; var propTypes = (0, _airbnbPropTypes.forbidExtraProps)({ children: _propTypes2['default'].node.isRequired, onOutsideClick: _propTypes2['default'].func.isRequired, disabled: _propTypes2['default'].bool, useCapture: _propTypes2['default'].bool, display: _propTypes2['default'].oneOf((0, _object2['default'])(DISPLAY)) }); var defaultProps = { disabled: false, // `useCapture` is set to true by default so that a `stopPropagation` in the // children will not prevent all outside click handlers from firing - maja useCapture: true, display: DISPLAY.BLOCK }; var OutsideClickHandler = function (_React$Component) { _inherits(OutsideClickHandler, _React$Component); function OutsideClickHandler() { var _ref; _classCallCheck(this, OutsideClickHandler); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var _this = _possibleConstructorReturn(this, (_ref = OutsideClickHandler.__proto__ || Object.getPrototypeOf(OutsideClickHandler)).call.apply(_ref, [this].concat(args))); _this.onMouseDown = _this.onMouseDown.bind(_this); _this.onMouseUp = _this.onMouseUp.bind(_this); _this.setChildNodeRef = _this.setChildNodeRef.bind(_this); return _this; } _createClass(OutsideClickHandler, [{ key: 'componentDidMount', value: function () { function componentDidMount() { var _props = this.props, disabled = _props.disabled, useCapture = _props.useCapture; if (!disabled) this.addMouseDownEventListener(useCapture); } return componentDidMount; }() }, { key: 'componentDidUpdate', value: function () { function componentDidUpdate(_ref2) { var prevDisabled = _ref2.disabled; var _props2 = this.props, disabled = _props2.disabled, useCapture = _props2.useCapture; if (prevDisabled !== disabled) { if (disabled) { this.removeEventListeners(); } else { this.addMouseDownEventListener(useCapture); } } } return componentDidUpdate; }() }, { key: 'componentWillUnmount', value: function () { function componentWillUnmount() { this.removeEventListeners(); } return componentWillUnmount; }() // Use mousedown/mouseup to enforce that clicks remain outside the root's // descendant tree, even when dragged. This should also get triggered on // touch devices. }, { key: 'onMouseDown', value: function () { function onMouseDown(e) { var useCapture = this.props.useCapture; var isDescendantOfRoot = this.childNode && (0, _document2['default'])(this.childNode, e.target); if (!isDescendantOfRoot) { if (this.removeMouseUp) { this.removeMouseUp(); this.removeMouseUp = null; } this.removeMouseUp = (0, _consolidatedEvents.addEventListener)(document, 'mouseup', this.onMouseUp, { capture: useCapture }); } } return onMouseDown; }() // Use mousedown/mouseup to enforce that clicks remain outside the root's // descendant tree, even when dragged. This should also get triggered on // touch devices. }, { key: 'onMouseUp', value: function () { function onMouseUp(e) { var onOutsideClick = this.props.onOutsideClick; var isDescendantOfRoot = this.childNode && (0, _document2['default'])(this.childNode, e.target); if (this.removeMouseUp) { this.removeMouseUp(); this.removeMouseUp = null; } if (!isDescendantOfRoot) { onOutsideClick(e); } } return onMouseUp; }() }, { key: 'setChildNodeRef', value: function () { function setChildNodeRef(ref) { this.childNode = ref; } return setChildNodeRef; }() }, { key: 'addMouseDownEventListener', value: function () { function addMouseDownEventListener(useCapture) { this.removeMouseDown = (0, _consolidatedEvents.addEventListener)(document, 'mousedown', this.onMouseDown, { capture: useCapture }); } return addMouseDownEventListener; }() }, { key: 'removeEventListeners', value: function () { function removeEventListeners() { if (this.removeMouseDown) this.removeMouseDown(); if (this.removeMouseUp) this.removeMouseUp(); } return removeEventListeners; }() }, { key: 'render', value: function () { function render() { var _props3 = this.props, children = _props3.children, display = _props3.display; return _react2['default'].createElement( 'div', { ref: this.setChildNodeRef, style: display !== DISPLAY.BLOCK && (0, _object2['default'])(DISPLAY).includes(display) ? { display: display } : undefined }, children ); } return render; }() }]); return OutsideClickHandler; }(_react2['default'].Component); exports["default"] = OutsideClickHandler; OutsideClickHandler.propTypes = propTypes; OutsideClickHandler.defaultProps = defaultProps; /***/ }), /***/ 6606: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // eslint-disable-next-line import/no-unresolved module.exports = __webpack_require__(2239); /***/ }), /***/ 5080: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var CHANNEL = exports.CHANNEL = '__direction__'; var DIRECTIONS = exports.DIRECTIONS = { LTR: 'ltr', RTL: 'rtl' }; /***/ }), /***/ 6640: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _propTypes = __webpack_require__(2652); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports["default"] = _propTypes2['default'].shape({ getState: _propTypes2['default'].func, setState: _propTypes2['default'].func, subscribe: _propTypes2['default'].func }); /***/ }), /***/ 1601: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); var _object = __webpack_require__(5861); var _object2 = _interopRequireDefault(_object); var _propTypes = __webpack_require__(2652); var _propTypes2 = _interopRequireDefault(_propTypes); var _constants = __webpack_require__(5080); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports["default"] = _propTypes2['default'].oneOf((0, _object2['default'])(_constants.DIRECTIONS)); /***/ }), /***/ 7818: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.withDirectionPropTypes = exports.DIRECTIONS = undefined; 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; }; 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; }; }(); exports["default"] = withDirection; var _react = __webpack_require__(9196); var _react2 = _interopRequireDefault(_react); var _hoistNonReactStatics = __webpack_require__(7015); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _deepmerge = __webpack_require__(3933); var _deepmerge2 = _interopRequireDefault(_deepmerge); var _getComponentName = __webpack_require__(2424); var _getComponentName2 = _interopRequireDefault(_getComponentName); var _constants = __webpack_require__(5080); var _brcast = __webpack_require__(6640); var _brcast2 = _interopRequireDefault(_brcast); var _direction = __webpack_require__(1601); var _direction2 = _interopRequireDefault(_direction); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 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; } 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; } 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-disable react/forbid-foreign-prop-types */ // This higher-order component consumes a string from React context that is // provided by the DirectionProvider component. // We can use this to conditionally switch layout/direction for right-to-left layouts. var contextTypes = _defineProperty({}, _constants.CHANNEL, _brcast2['default']); exports.DIRECTIONS = _constants.DIRECTIONS; // set a default direction so that a component wrapped with this HOC can be // used even without a DirectionProvider ancestor in its react tree. var defaultDirection = _constants.DIRECTIONS.LTR; // export for convenience, in order for components to spread these onto their propTypes var withDirectionPropTypes = exports.withDirectionPropTypes = { direction: _direction2['default'].isRequired }; function withDirection(WrappedComponent) { var WithDirection = function (_React$Component) { _inherits(WithDirection, _React$Component); function WithDirection(props, context) { _classCallCheck(this, WithDirection); var _this = _possibleConstructorReturn(this, (WithDirection.__proto__ || Object.getPrototypeOf(WithDirection)).call(this, props, context)); _this.state = { direction: context[_constants.CHANNEL] ? context[_constants.CHANNEL].getState() : defaultDirection }; return _this; } _createClass(WithDirection, [{ key: 'componentDidMount', value: function () { function componentDidMount() { var _this2 = this; if (this.context[_constants.CHANNEL]) { // subscribe to future direction changes this.channelUnsubscribe = this.context[_constants.CHANNEL].subscribe(function (direction) { _this2.setState({ direction: direction }); }); } } return componentDidMount; }() }, { key: 'componentWillUnmount', value: function () { function componentWillUnmount() { if (this.channelUnsubscribe) { this.channelUnsubscribe(); } } return componentWillUnmount; }() }, { key: 'render', value: function () { function render() { var direction = this.state.direction; return _react2['default'].createElement(WrappedComponent, _extends({}, this.props, { direction: direction })); } return render; }() }]); return WithDirection; }(_react2['default'].Component); var wrappedComponentName = (0, _getComponentName2['default'])(WrappedComponent) || 'Component'; WithDirection.WrappedComponent = WrappedComponent; WithDirection.contextTypes = contextTypes; WithDirection.displayName = 'withDirection(' + String(wrappedComponentName) + ')'; if (WrappedComponent.propTypes) { WithDirection.propTypes = (0, _deepmerge2['default'])({}, WrappedComponent.propTypes); delete WithDirection.propTypes.direction; } if (WrappedComponent.defaultProps) { WithDirection.defaultProps = (0, _deepmerge2['default'])({}, WrappedComponent.defaultProps); } return (0, _hoistNonReactStatics2['default'])(WithDirection, WrappedComponent); } /***/ }), /***/ 3933: /***/ ((module) => { "use strict"; var isMergeableObject = function isMergeableObject(value) { return isNonNullObject(value) && !isSpecial(value) }; function isNonNullObject(value) { return !!value && typeof value === 'object' } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value) } // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 var canUseSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE } function emptyTarget(val) { return Array.isArray(val) ? [] : {} } function cloneIfNecessary(value, optionsArgument) { var clone = optionsArgument && optionsArgument.clone === true; return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value } function defaultArrayMerge(target, source, optionsArgument) { var destination = target.slice(); source.forEach(function(e, i) { if (typeof destination[i] === 'undefined') { destination[i] = cloneIfNecessary(e, optionsArgument); } else if (isMergeableObject(e)) { destination[i] = deepmerge(target[i], e, optionsArgument); } else if (target.indexOf(e) === -1) { destination.push(cloneIfNecessary(e, optionsArgument)); } }); return destination } function mergeObject(target, source, optionsArgument) { var destination = {}; if (isMergeableObject(target)) { Object.keys(target).forEach(function(key) { destination[key] = cloneIfNecessary(target[key], optionsArgument); }); } Object.keys(source).forEach(function(key) { if (!isMergeableObject(source[key]) || !target[key]) { destination[key] = cloneIfNecessary(source[key], optionsArgument); } else { destination[key] = deepmerge(target[key], source[key], optionsArgument); } }); return destination } function deepmerge(target, source, optionsArgument) { var sourceIsArray = Array.isArray(source); var targetIsArray = Array.isArray(target); var options = optionsArgument || { arrayMerge: defaultArrayMerge }; var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; if (!sourceAndTargetTypesMatch) { return cloneIfNecessary(source, optionsArgument) } else if (sourceIsArray) { var arrayMerge = options.arrayMerge || defaultArrayMerge; return arrayMerge(target, source, optionsArgument) } else { return mergeObject(target, source, optionsArgument) } } deepmerge.all = function deepmergeAll(array, optionsArgument) { if (!Array.isArray(array) || array.length < 2) { throw new Error('first argument should be an array with at least two elements') } // we are sure there are at least 2 values, so it is safe to have no initial value return array.reduce(function(prev, next) { return deepmerge(prev, next, optionsArgument) }) }; var deepmerge_1 = deepmerge; module.exports = deepmerge_1; /***/ }), /***/ 7015: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var reactIs = __webpack_require__(338); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ 4793: /***/ ((module) => { var characterMap = { "À": "A", "Á": "A", "Â": "A", "Ã": "A", "Ä": "A", "Å": "A", "Ấ": "A", "Ắ": "A", "Ẳ": "A", "Ẵ": "A", "Ặ": "A", "Æ": "AE", "Ầ": "A", "Ằ": "A", "Ȃ": "A", "Ç": "C", "Ḉ": "C", "È": "E", "É": "E", "Ê": "E", "Ë": "E", "Ế": "E", "Ḗ": "E", "Ề": "E", "Ḕ": "E", "Ḝ": "E", "Ȇ": "E", "Ì": "I", "Í": "I", "Î": "I", "Ï": "I", "Ḯ": "I", "Ȋ": "I", "Ð": "D", "Ñ": "N", "Ò": "O", "Ó": "O", "Ô": "O", "Õ": "O", "Ö": "O", "Ø": "O", "Ố": "O", "Ṍ": "O", "Ṓ": "O", "Ȏ": "O", "Ù": "U", "Ú": "U", "Û": "U", "Ü": "U", "Ý": "Y", "à": "a", "á": "a", "â": "a", "ã": "a", "ä": "a", "å": "a", "ấ": "a", "ắ": "a", "ẳ": "a", "ẵ": "a", "ặ": "a", "æ": "ae", "ầ": "a", "ằ": "a", "ȃ": "a", "ç": "c", "ḉ": "c", "è": "e", "é": "e", "ê": "e", "ë": "e", "ế": "e", "ḗ": "e", "ề": "e", "ḕ": "e", "ḝ": "e", "ȇ": "e", "ì": "i", "í": "i", "î": "i", "ï": "i", "ḯ": "i", "ȋ": "i", "ð": "d", "ñ": "n", "ò": "o", "ó": "o", "ô": "o", "õ": "o", "ö": "o", "ø": "o", "ố": "o", "ṍ": "o", "ṓ": "o", "ȏ": "o", "ù": "u", "ú": "u", "û": "u", "ü": "u", "ý": "y", "ÿ": "y", "Ā": "A", "ā": "a", "Ă": "A", "ă": "a", "Ą": "A", "ą": "a", "Ć": "C", "ć": "c", "Ĉ": "C", "ĉ": "c", "Ċ": "C", "ċ": "c", "Č": "C", "č": "c", "C̆": "C", "c̆": "c", "Ď": "D", "ď": "d", "Đ": "D", "đ": "d", "Ē": "E", "ē": "e", "Ĕ": "E", "ĕ": "e", "Ė": "E", "ė": "e", "Ę": "E", "ę": "e", "Ě": "E", "ě": "e", "Ĝ": "G", "Ǵ": "G", "ĝ": "g", "ǵ": "g", "Ğ": "G", "ğ": "g", "Ġ": "G", "ġ": "g", "Ģ": "G", "ģ": "g", "Ĥ": "H", "ĥ": "h", "Ħ": "H", "ħ": "h", "Ḫ": "H", "ḫ": "h", "Ĩ": "I", "ĩ": "i", "Ī": "I", "ī": "i", "Ĭ": "I", "ĭ": "i", "Į": "I", "į": "i", "İ": "I", "ı": "i", "IJ": "IJ", "ij": "ij", "Ĵ": "J", "ĵ": "j", "Ķ": "K", "ķ": "k", "Ḱ": "K", "ḱ": "k", "K̆": "K", "k̆": "k", "Ĺ": "L", "ĺ": "l", "Ļ": "L", "ļ": "l", "Ľ": "L", "ľ": "l", "Ŀ": "L", "ŀ": "l", "Ł": "l", "ł": "l", "Ḿ": "M", "ḿ": "m", "M̆": "M", "m̆": "m", "Ń": "N", "ń": "n", "Ņ": "N", "ņ": "n", "Ň": "N", "ň": "n", "ʼn": "n", "N̆": "N", "n̆": "n", "Ō": "O", "ō": "o", "Ŏ": "O", "ŏ": "o", "Ő": "O", "ő": "o", "Œ": "OE", "œ": "oe", "P̆": "P", "p̆": "p", "Ŕ": "R", "ŕ": "r", "Ŗ": "R", "ŗ": "r", "Ř": "R", "ř": "r", "R̆": "R", "r̆": "r", "Ȓ": "R", "ȓ": "r", "Ś": "S", "ś": "s", "Ŝ": "S", "ŝ": "s", "Ş": "S", "Ș": "S", "ș": "s", "ş": "s", "Š": "S", "š": "s", "Ţ": "T", "ţ": "t", "ț": "t", "Ț": "T", "Ť": "T", "ť": "t", "Ŧ": "T", "ŧ": "t", "T̆": "T", "t̆": "t", "Ũ": "U", "ũ": "u", "Ū": "U", "ū": "u", "Ŭ": "U", "ŭ": "u", "Ů": "U", "ů": "u", "Ű": "U", "ű": "u", "Ų": "U", "ų": "u", "Ȗ": "U", "ȗ": "u", "V̆": "V", "v̆": "v", "Ŵ": "W", "ŵ": "w", "Ẃ": "W", "ẃ": "w", "X̆": "X", "x̆": "x", "Ŷ": "Y", "ŷ": "y", "Ÿ": "Y", "Y̆": "Y", "y̆": "y", "Ź": "Z", "ź": "z", "Ż": "Z", "ż": "z", "Ž": "Z", "ž": "z", "ſ": "s", "ƒ": "f", "Ơ": "O", "ơ": "o", "Ư": "U", "ư": "u", "Ǎ": "A", "ǎ": "a", "Ǐ": "I", "ǐ": "i", "Ǒ": "O", "ǒ": "o", "Ǔ": "U", "ǔ": "u", "Ǖ": "U", "ǖ": "u", "Ǘ": "U", "ǘ": "u", "Ǚ": "U", "ǚ": "u", "Ǜ": "U", "ǜ": "u", "Ứ": "U", "ứ": "u", "Ṹ": "U", "ṹ": "u", "Ǻ": "A", "ǻ": "a", "Ǽ": "AE", "ǽ": "ae", "Ǿ": "O", "ǿ": "o", "Þ": "TH", "þ": "th", "Ṕ": "P", "ṕ": "p", "Ṥ": "S", "ṥ": "s", "X́": "X", "x́": "x", "Ѓ": "Г", "ѓ": "г", "Ќ": "К", "ќ": "к", "A̋": "A", "a̋": "a", "E̋": "E", "e̋": "e", "I̋": "I", "i̋": "i", "Ǹ": "N", "ǹ": "n", "Ồ": "O", "ồ": "o", "Ṑ": "O", "ṑ": "o", "Ừ": "U", "ừ": "u", "Ẁ": "W", "ẁ": "w", "Ỳ": "Y", "ỳ": "y", "Ȁ": "A", "ȁ": "a", "Ȅ": "E", "ȅ": "e", "Ȉ": "I", "ȉ": "i", "Ȍ": "O", "ȍ": "o", "Ȑ": "R", "ȑ": "r", "Ȕ": "U", "ȕ": "u", "B̌": "B", "b̌": "b", "Č̣": "C", "č̣": "c", "Ê̌": "E", "ê̌": "e", "F̌": "F", "f̌": "f", "Ǧ": "G", "ǧ": "g", "Ȟ": "H", "ȟ": "h", "J̌": "J", "ǰ": "j", "Ǩ": "K", "ǩ": "k", "M̌": "M", "m̌": "m", "P̌": "P", "p̌": "p", "Q̌": "Q", "q̌": "q", "Ř̩": "R", "ř̩": "r", "Ṧ": "S", "ṧ": "s", "V̌": "V", "v̌": "v", "W̌": "W", "w̌": "w", "X̌": "X", "x̌": "x", "Y̌": "Y", "y̌": "y", "A̧": "A", "a̧": "a", "B̧": "B", "b̧": "b", "Ḑ": "D", "ḑ": "d", "Ȩ": "E", "ȩ": "e", "Ɛ̧": "E", "ɛ̧": "e", "Ḩ": "H", "ḩ": "h", "I̧": "I", "i̧": "i", "Ɨ̧": "I", "ɨ̧": "i", "M̧": "M", "m̧": "m", "O̧": "O", "o̧": "o", "Q̧": "Q", "q̧": "q", "U̧": "U", "u̧": "u", "X̧": "X", "x̧": "x", "Z̧": "Z", "z̧": "z", }; var chars = Object.keys(characterMap).join('|'); var allAccents = new RegExp(chars, 'g'); var firstAccent = new RegExp(chars, ''); var removeAccents = function(string) { return string.replace(allAccents, function(match) { return characterMap[match]; }); }; var hasAccents = function(string) { return !!string.match(firstAccent); }; module.exports = removeAccents; module.exports.has = hasAccents; module.exports.remove = removeAccents; /***/ }), /***/ 2150: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { // eslint-disable-next-line import/no-unresolved __webpack_require__(8039); /***/ }), /***/ 5293: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.PureCalendarDay = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(6150)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _moment = _interopRequireDefault(__webpack_require__(6292)); var _raf = _interopRequireDefault(__webpack_require__(1666)); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _getCalendarDaySettings = _interopRequireDefault(__webpack_require__(4246)); var _ModifiersShape = _interopRequireDefault(__webpack_require__(975)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { day: (0, _moment["default"])(), daySize: _constants.DAY_SIZE, isOutsideDay: false, modifiers: new Set(), isFocused: false, tabIndex: -1, onDayClick: function onDayClick() {}, onDayMouseEnter: function onDayMouseEnter() {}, onDayMouseLeave: function onDayMouseLeave() {}, renderDayContents: null, ariaLabelFormat: 'dddd, LL', // internationalization phrases: _defaultPhrases.CalendarDayPhrases }; var CalendarDay = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(CalendarDay, _ref); var _proto = CalendarDay.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function CalendarDay() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _ref.call.apply(_ref, [this].concat(args)) || this; _this.setButtonRef = _this.setButtonRef.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var _this2 = this; var _this$props = this.props, isFocused = _this$props.isFocused, tabIndex = _this$props.tabIndex; if (tabIndex === 0) { if (isFocused || tabIndex !== prevProps.tabIndex) { (0, _raf["default"])(function () { if (_this2.buttonRef) { _this2.buttonRef.focus(); } }); } } }; _proto.onDayClick = function onDayClick(day, e) { var onDayClick = this.props.onDayClick; onDayClick(day, e); }; _proto.onDayMouseEnter = function onDayMouseEnter(day, e) { var onDayMouseEnter = this.props.onDayMouseEnter; onDayMouseEnter(day, e); }; _proto.onDayMouseLeave = function onDayMouseLeave(day, e) { var onDayMouseLeave = this.props.onDayMouseLeave; onDayMouseLeave(day, e); }; _proto.onKeyDown = function onKeyDown(day, e) { var onDayClick = this.props.onDayClick; var key = e.key; if (key === 'Enter' || key === ' ') { onDayClick(day, e); } }; _proto.setButtonRef = function setButtonRef(ref) { this.buttonRef = ref; }; _proto.render = function render() { var _this3 = this; var _this$props2 = this.props, day = _this$props2.day, ariaLabelFormat = _this$props2.ariaLabelFormat, daySize = _this$props2.daySize, isOutsideDay = _this$props2.isOutsideDay, modifiers = _this$props2.modifiers, renderDayContents = _this$props2.renderDayContents, tabIndex = _this$props2.tabIndex, styles = _this$props2.styles, phrases = _this$props2.phrases; if (!day) return _react["default"].createElement("td", null); var _getCalendarDaySettin = (0, _getCalendarDaySettings["default"])(day, ariaLabelFormat, daySize, modifiers, phrases), daySizeStyles = _getCalendarDaySettin.daySizeStyles, useDefaultCursor = _getCalendarDaySettin.useDefaultCursor, selected = _getCalendarDaySettin.selected, hoveredSpan = _getCalendarDaySettin.hoveredSpan, isOutsideRange = _getCalendarDaySettin.isOutsideRange, ariaLabel = _getCalendarDaySettin.ariaLabel; return _react["default"].createElement("td", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarDay, useDefaultCursor && styles.CalendarDay__defaultCursor, styles.CalendarDay__default, isOutsideDay && styles.CalendarDay__outside, modifiers.has('today') && styles.CalendarDay__today, modifiers.has('first-day-of-week') && styles.CalendarDay__firstDayOfWeek, modifiers.has('last-day-of-week') && styles.CalendarDay__lastDayOfWeek, modifiers.has('hovered-offset') && styles.CalendarDay__hovered_offset, modifiers.has('hovered-start-first-possible-end') && styles.CalendarDay__hovered_start_first_possible_end, modifiers.has('hovered-start-blocked-minimum-nights') && styles.CalendarDay__hovered_start_blocked_min_nights, modifiers.has('highlighted-calendar') && styles.CalendarDay__highlighted_calendar, modifiers.has('blocked-minimum-nights') && styles.CalendarDay__blocked_minimum_nights, modifiers.has('blocked-calendar') && styles.CalendarDay__blocked_calendar, hoveredSpan && styles.CalendarDay__hovered_span, modifiers.has('after-hovered-start') && styles.CalendarDay__after_hovered_start, modifiers.has('selected-span') && styles.CalendarDay__selected_span, modifiers.has('selected-start') && styles.CalendarDay__selected_start, modifiers.has('selected-end') && styles.CalendarDay__selected_end, selected && !modifiers.has('selected-span') && styles.CalendarDay__selected, modifiers.has('before-hovered-end') && styles.CalendarDay__before_hovered_end, modifiers.has('no-selected-start-before-selected-end') && styles.CalendarDay__no_selected_start_before_selected_end, modifiers.has('selected-start-in-hovered-span') && styles.CalendarDay__selected_start_in_hovered_span, modifiers.has('selected-end-in-hovered-span') && styles.CalendarDay__selected_end_in_hovered_span, modifiers.has('selected-start-no-selected-end') && styles.CalendarDay__selected_start_no_selected_end, modifiers.has('selected-end-no-selected-start') && styles.CalendarDay__selected_end_no_selected_start, isOutsideRange && styles.CalendarDay__blocked_out_of_range, daySizeStyles), { role: "button" // eslint-disable-line jsx-a11y/no-noninteractive-element-to-interactive-role , ref: this.setButtonRef, "aria-disabled": modifiers.has('blocked'), "aria-label": ariaLabel, onMouseEnter: function onMouseEnter(e) { _this3.onDayMouseEnter(day, e); }, onMouseLeave: function onMouseLeave(e) { _this3.onDayMouseLeave(day, e); }, onMouseUp: function onMouseUp(e) { e.currentTarget.blur(); }, onClick: function onClick(e) { _this3.onDayClick(day, e); }, onKeyDown: function onKeyDown(e) { _this3.onKeyDown(day, e); }, tabIndex: tabIndex }), renderDayContents ? renderDayContents(day, modifiers) : day.format('D')); }; return CalendarDay; }(_react["default"].PureComponent || _react["default"].Component); exports.PureCalendarDay = CalendarDay; CalendarDay.propTypes = false ? 0 : {}; CalendarDay.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { var _ref2$reactDates = _ref2.reactDates, color = _ref2$reactDates.color, font = _ref2$reactDates.font; return { CalendarDay: { boxSizing: 'border-box', cursor: 'pointer', fontSize: font.size, textAlign: 'center', ':active': { outline: 0 } }, CalendarDay__defaultCursor: { cursor: 'default' }, CalendarDay__default: { border: "1px solid ".concat(color.core.borderLight), color: color.text, background: color.background, ':hover': { background: color.core.borderLight, border: "1px solid ".concat(color.core.borderLight), color: 'inherit' } }, CalendarDay__hovered_offset: { background: color.core.borderBright, border: "1px double ".concat(color.core.borderLight), color: 'inherit' }, CalendarDay__outside: { border: 0, background: color.outside.backgroundColor, color: color.outside.color, ':hover': { border: 0 } }, CalendarDay__blocked_minimum_nights: { background: color.minimumNights.backgroundColor, border: "1px solid ".concat(color.minimumNights.borderColor), color: color.minimumNights.color, ':hover': { background: color.minimumNights.backgroundColor_hover, color: color.minimumNights.color_active }, ':active': { background: color.minimumNights.backgroundColor_active, color: color.minimumNights.color_active } }, CalendarDay__highlighted_calendar: { background: color.highlighted.backgroundColor, color: color.highlighted.color, ':hover': { background: color.highlighted.backgroundColor_hover, color: color.highlighted.color_active }, ':active': { background: color.highlighted.backgroundColor_active, color: color.highlighted.color_active } }, CalendarDay__selected_span: { background: color.selectedSpan.backgroundColor, border: "1px double ".concat(color.selectedSpan.borderColor), color: color.selectedSpan.color, ':hover': { background: color.selectedSpan.backgroundColor_hover, border: "1px double ".concat(color.selectedSpan.borderColor), color: color.selectedSpan.color_active }, ':active': { background: color.selectedSpan.backgroundColor_active, border: "1px double ".concat(color.selectedSpan.borderColor), color: color.selectedSpan.color_active } }, CalendarDay__selected: { background: color.selected.backgroundColor, border: "1px double ".concat(color.selected.borderColor), color: color.selected.color, ':hover': { background: color.selected.backgroundColor_hover, border: "1px double ".concat(color.selected.borderColor), color: color.selected.color_active }, ':active': { background: color.selected.backgroundColor_active, border: "1px double ".concat(color.selected.borderColor), color: color.selected.color_active } }, CalendarDay__hovered_span: { background: color.hoveredSpan.backgroundColor, border: "1px double ".concat(color.hoveredSpan.borderColor), color: color.hoveredSpan.color, ':hover': { background: color.hoveredSpan.backgroundColor_hover, border: "1px double ".concat(color.hoveredSpan.borderColor), color: color.hoveredSpan.color_active }, ':active': { background: color.hoveredSpan.backgroundColor_active, border: "1px double ".concat(color.hoveredSpan.borderColor), color: color.hoveredSpan.color_active } }, CalendarDay__blocked_calendar: { background: color.blocked_calendar.backgroundColor, border: "1px solid ".concat(color.blocked_calendar.borderColor), color: color.blocked_calendar.color, ':hover': { background: color.blocked_calendar.backgroundColor_hover, border: "1px solid ".concat(color.blocked_calendar.borderColor), color: color.blocked_calendar.color_active }, ':active': { background: color.blocked_calendar.backgroundColor_active, border: "1px solid ".concat(color.blocked_calendar.borderColor), color: color.blocked_calendar.color_active } }, CalendarDay__blocked_out_of_range: { background: color.blocked_out_of_range.backgroundColor, border: "1px solid ".concat(color.blocked_out_of_range.borderColor), color: color.blocked_out_of_range.color, ':hover': { background: color.blocked_out_of_range.backgroundColor_hover, border: "1px solid ".concat(color.blocked_out_of_range.borderColor), color: color.blocked_out_of_range.color_active }, ':active': { background: color.blocked_out_of_range.backgroundColor_active, border: "1px solid ".concat(color.blocked_out_of_range.borderColor), color: color.blocked_out_of_range.color_active } }, CalendarDay__hovered_start_first_possible_end: { background: color.core.borderLighter, border: "1px double ".concat(color.core.borderLighter) }, CalendarDay__hovered_start_blocked_min_nights: { background: color.core.borderLighter, border: "1px double ".concat(color.core.borderLight) }, CalendarDay__selected_start: {}, CalendarDay__selected_end: {}, CalendarDay__today: {}, CalendarDay__firstDayOfWeek: {}, CalendarDay__lastDayOfWeek: {}, CalendarDay__after_hovered_start: {}, CalendarDay__before_hovered_end: {}, CalendarDay__no_selected_start_before_selected_end: {}, CalendarDay__selected_start_in_hovered_span: {}, CalendarDay__selected_end_in_hovered_span: {}, CalendarDay__selected_start_no_selected_end: {}, CalendarDay__selected_end_no_selected_start: {} }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(CalendarDay); exports["default"] = _default; /***/ }), /***/ 3105: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(6150)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _moment = _interopRequireDefault(__webpack_require__(6292)); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _CalendarWeek = _interopRequireDefault(__webpack_require__(7485)); var _CalendarDay = _interopRequireDefault(__webpack_require__(5293)); var _calculateDimension = _interopRequireDefault(__webpack_require__(7399)); var _getCalendarMonthWeeks = _interopRequireDefault(__webpack_require__(2793)); var _isSameDay = _interopRequireDefault(__webpack_require__(2455)); var _toISODateString = _interopRequireDefault(__webpack_require__(6135)); var _ModifiersShape = _interopRequireDefault(__webpack_require__(975)); var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(2302)); var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { month: (0, _moment["default"])(), horizontalMonthPadding: 13, isVisible: true, enableOutsideDays: false, modifiers: {}, orientation: _constants.HORIZONTAL_ORIENTATION, daySize: _constants.DAY_SIZE, onDayClick: function onDayClick() {}, onDayMouseEnter: function onDayMouseEnter() {}, onDayMouseLeave: function onDayMouseLeave() {}, onMonthSelect: function onMonthSelect() {}, onYearSelect: function onYearSelect() {}, renderMonthText: null, renderCalendarDay: function renderCalendarDay(props) { return _react["default"].createElement(_CalendarDay["default"], props); }, renderDayContents: null, renderMonthElement: null, firstDayOfWeek: null, setMonthTitleHeight: null, focusedDate: null, isFocused: false, // i18n monthFormat: 'MMMM YYYY', // english locale phrases: _defaultPhrases.CalendarDayPhrases, dayAriaLabelFormat: undefined, verticalBorderSpacing: undefined }; var CalendarMonth = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(CalendarMonth, _ref); var _proto = CalendarMonth.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function CalendarMonth(props) { var _this; _this = _ref.call(this, props) || this; _this.state = { weeks: (0, _getCalendarMonthWeeks["default"])(props.month, props.enableOutsideDays, props.firstDayOfWeek == null ? _moment["default"].localeData().firstDayOfWeek() : props.firstDayOfWeek) }; _this.setCaptionRef = _this.setCaptionRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.setMonthTitleHeight = _this.setMonthTitleHeight.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentDidMount = function componentDidMount() { this.setMonthTitleHeightTimeout = setTimeout(this.setMonthTitleHeight, 0); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var month = nextProps.month, enableOutsideDays = nextProps.enableOutsideDays, firstDayOfWeek = nextProps.firstDayOfWeek; var _this$props = this.props, prevMonth = _this$props.month, prevEnableOutsideDays = _this$props.enableOutsideDays, prevFirstDayOfWeek = _this$props.firstDayOfWeek; if (!month.isSame(prevMonth) || enableOutsideDays !== prevEnableOutsideDays || firstDayOfWeek !== prevFirstDayOfWeek) { this.setState({ weeks: (0, _getCalendarMonthWeeks["default"])(month, enableOutsideDays, firstDayOfWeek == null ? _moment["default"].localeData().firstDayOfWeek() : firstDayOfWeek) }); } }; _proto.componentWillUnmount = function componentWillUnmount() { if (this.setMonthTitleHeightTimeout) { clearTimeout(this.setMonthTitleHeightTimeout); } }; _proto.setMonthTitleHeight = function setMonthTitleHeight() { var setMonthTitleHeight = this.props.setMonthTitleHeight; if (setMonthTitleHeight) { var captionHeight = (0, _calculateDimension["default"])(this.captionRef, 'height', true, true); setMonthTitleHeight(captionHeight); } }; _proto.setCaptionRef = function setCaptionRef(ref) { this.captionRef = ref; }; _proto.render = function render() { var _this$props2 = this.props, dayAriaLabelFormat = _this$props2.dayAriaLabelFormat, daySize = _this$props2.daySize, focusedDate = _this$props2.focusedDate, horizontalMonthPadding = _this$props2.horizontalMonthPadding, isFocused = _this$props2.isFocused, isVisible = _this$props2.isVisible, modifiers = _this$props2.modifiers, month = _this$props2.month, monthFormat = _this$props2.monthFormat, onDayClick = _this$props2.onDayClick, onDayMouseEnter = _this$props2.onDayMouseEnter, onDayMouseLeave = _this$props2.onDayMouseLeave, onMonthSelect = _this$props2.onMonthSelect, onYearSelect = _this$props2.onYearSelect, orientation = _this$props2.orientation, phrases = _this$props2.phrases, renderCalendarDay = _this$props2.renderCalendarDay, renderDayContents = _this$props2.renderDayContents, renderMonthElement = _this$props2.renderMonthElement, renderMonthText = _this$props2.renderMonthText, styles = _this$props2.styles, verticalBorderSpacing = _this$props2.verticalBorderSpacing; var weeks = this.state.weeks; var monthTitle = renderMonthText ? renderMonthText(month) : month.format(monthFormat); var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; return _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarMonth, { padding: "0 ".concat(horizontalMonthPadding, "px") }), { "data-visible": isVisible }), _react["default"].createElement("div", (0, _extends2["default"])({ ref: this.setCaptionRef }, (0, _reactWithStyles.css)(styles.CalendarMonth_caption, verticalScrollable && styles.CalendarMonth_caption__verticalScrollable)), renderMonthElement ? renderMonthElement({ month: month, onMonthSelect: onMonthSelect, onYearSelect: onYearSelect, isVisible: isVisible }) : _react["default"].createElement("strong", null, monthTitle)), _react["default"].createElement("table", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(!verticalBorderSpacing && styles.CalendarMonth_table, verticalBorderSpacing && styles.CalendarMonth_verticalSpacing, verticalBorderSpacing && { borderSpacing: "0px ".concat(verticalBorderSpacing, "px") }), { role: "presentation" }), _react["default"].createElement("tbody", null, weeks.map(function (week, i) { return _react["default"].createElement(_CalendarWeek["default"], { key: i }, week.map(function (day, dayOfWeek) { return renderCalendarDay({ key: dayOfWeek, day: day, daySize: daySize, isOutsideDay: !day || day.month() !== month.month(), tabIndex: isVisible && (0, _isSameDay["default"])(day, focusedDate) ? 0 : -1, isFocused: isFocused, onDayMouseEnter: onDayMouseEnter, onDayMouseLeave: onDayMouseLeave, onDayClick: onDayClick, renderDayContents: renderDayContents, phrases: phrases, modifiers: modifiers[(0, _toISODateString["default"])(day)], ariaLabelFormat: dayAriaLabelFormat }); })); })))); }; return CalendarMonth; }(_react["default"].PureComponent || _react["default"].Component); CalendarMonth.propTypes = false ? 0 : {}; CalendarMonth.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { var _ref2$reactDates = _ref2.reactDates, color = _ref2$reactDates.color, font = _ref2$reactDates.font, spacing = _ref2$reactDates.spacing; return { CalendarMonth: { background: color.background, textAlign: 'center', verticalAlign: 'top', userSelect: 'none' }, CalendarMonth_table: { borderCollapse: 'collapse', borderSpacing: 0 }, CalendarMonth_verticalSpacing: { borderCollapse: 'separate' }, CalendarMonth_caption: { color: color.text, fontSize: font.captionSize, textAlign: 'center', paddingTop: spacing.captionPaddingTop, paddingBottom: spacing.captionPaddingBottom, captionSide: 'initial' }, CalendarMonth_caption__verticalScrollable: { paddingTop: 12, paddingBottom: 7 } }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(CalendarMonth); exports["default"] = _default; /***/ }), /***/ 4624: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(6150)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _moment = _interopRequireDefault(__webpack_require__(6292)); var _consolidatedEvents = __webpack_require__(8495); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _noflip = _interopRequireDefault(__webpack_require__(9780)); var _CalendarMonth = _interopRequireDefault(__webpack_require__(3105)); var _isTransitionEndSupported = _interopRequireDefault(__webpack_require__(336)); var _getTransformStyles = _interopRequireDefault(__webpack_require__(8421)); var _getCalendarMonthWidth = _interopRequireDefault(__webpack_require__(5127)); var _toISOMonthString = _interopRequireDefault(__webpack_require__(2476)); var _isPrevMonth = _interopRequireDefault(__webpack_require__(4302)); var _isNextMonth = _interopRequireDefault(__webpack_require__(2831)); var _ModifiersShape = _interopRequireDefault(__webpack_require__(975)); var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(2302)); var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { enableOutsideDays: false, firstVisibleMonthIndex: 0, horizontalMonthPadding: 13, initialMonth: (0, _moment["default"])(), isAnimating: false, numberOfMonths: 1, modifiers: {}, orientation: _constants.HORIZONTAL_ORIENTATION, onDayClick: function onDayClick() {}, onDayMouseEnter: function onDayMouseEnter() {}, onDayMouseLeave: function onDayMouseLeave() {}, onMonthChange: function onMonthChange() {}, onYearChange: function onYearChange() {}, onMonthTransitionEnd: function onMonthTransitionEnd() {}, renderMonthText: null, renderCalendarDay: undefined, renderDayContents: null, translationValue: null, renderMonthElement: null, daySize: _constants.DAY_SIZE, focusedDate: null, isFocused: false, firstDayOfWeek: null, setMonthTitleHeight: null, isRTL: false, transitionDuration: 200, verticalBorderSpacing: undefined, // i18n monthFormat: 'MMMM YYYY', // english locale phrases: _defaultPhrases.CalendarDayPhrases, dayAriaLabelFormat: undefined }; function getMonths(initialMonth, numberOfMonths, withoutTransitionMonths) { var month = initialMonth.clone(); if (!withoutTransitionMonths) month = month.subtract(1, 'month'); var months = []; for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { months.push(month); month = month.clone().add(1, 'month'); } return months; } var CalendarMonthGrid = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(CalendarMonthGrid, _ref); var _proto = CalendarMonthGrid.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function CalendarMonthGrid(props) { var _this; _this = _ref.call(this, props) || this; var withoutTransitionMonths = props.orientation === _constants.VERTICAL_SCROLLABLE; _this.state = { months: getMonths(props.initialMonth, props.numberOfMonths, withoutTransitionMonths) }; _this.isTransitionEndSupported = (0, _isTransitionEndSupported["default"])(); _this.onTransitionEnd = _this.onTransitionEnd.bind((0, _assertThisInitialized2["default"])(_this)); _this.setContainerRef = _this.setContainerRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.locale = _moment["default"].locale(); _this.onMonthSelect = _this.onMonthSelect.bind((0, _assertThisInitialized2["default"])(_this)); _this.onYearSelect = _this.onYearSelect.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentDidMount = function componentDidMount() { this.removeEventListener = (0, _consolidatedEvents.addEventListener)(this.container, 'transitionend', this.onTransitionEnd); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this2 = this; var initialMonth = nextProps.initialMonth, numberOfMonths = nextProps.numberOfMonths, orientation = nextProps.orientation; var months = this.state.months; var _this$props = this.props, prevInitialMonth = _this$props.initialMonth, prevNumberOfMonths = _this$props.numberOfMonths; var hasMonthChanged = !prevInitialMonth.isSame(initialMonth, 'month'); var hasNumberOfMonthsChanged = prevNumberOfMonths !== numberOfMonths; var newMonths = months; if (hasMonthChanged && !hasNumberOfMonthsChanged) { if ((0, _isNextMonth["default"])(prevInitialMonth, initialMonth)) { newMonths = months.slice(1); newMonths.push(months[months.length - 1].clone().add(1, 'month')); } else if ((0, _isPrevMonth["default"])(prevInitialMonth, initialMonth)) { newMonths = months.slice(0, months.length - 1); newMonths.unshift(months[0].clone().subtract(1, 'month')); } else { var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; newMonths = getMonths(initialMonth, numberOfMonths, withoutTransitionMonths); } } if (hasNumberOfMonthsChanged) { var _withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; newMonths = getMonths(initialMonth, numberOfMonths, _withoutTransitionMonths); } var momentLocale = _moment["default"].locale(); if (this.locale !== momentLocale) { this.locale = momentLocale; newMonths = newMonths.map(function (m) { return m.locale(_this2.locale); }); } this.setState({ months: newMonths }); }; _proto.componentDidUpdate = function componentDidUpdate() { var _this$props2 = this.props, isAnimating = _this$props2.isAnimating, transitionDuration = _this$props2.transitionDuration, onMonthTransitionEnd = _this$props2.onMonthTransitionEnd; // For IE9, immediately call onMonthTransitionEnd instead of // waiting for the animation to complete. Similarly, if transitionDuration // is set to 0, also immediately invoke the onMonthTransitionEnd callback if ((!this.isTransitionEndSupported || !transitionDuration) && isAnimating) { onMonthTransitionEnd(); } }; _proto.componentWillUnmount = function componentWillUnmount() { if (this.removeEventListener) this.removeEventListener(); }; _proto.onTransitionEnd = function onTransitionEnd() { var onMonthTransitionEnd = this.props.onMonthTransitionEnd; onMonthTransitionEnd(); }; _proto.onMonthSelect = function onMonthSelect(currentMonth, newMonthVal) { var newMonth = currentMonth.clone(); var _this$props3 = this.props, onMonthChange = _this$props3.onMonthChange, orientation = _this$props3.orientation; var months = this.state.months; var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; var initialMonthSubtraction = months.indexOf(currentMonth); if (!withoutTransitionMonths) { initialMonthSubtraction -= 1; } newMonth.set('month', newMonthVal).subtract(initialMonthSubtraction, 'months'); onMonthChange(newMonth); }; _proto.onYearSelect = function onYearSelect(currentMonth, newYearVal) { var newMonth = currentMonth.clone(); var _this$props4 = this.props, onYearChange = _this$props4.onYearChange, orientation = _this$props4.orientation; var months = this.state.months; var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; var initialMonthSubtraction = months.indexOf(currentMonth); if (!withoutTransitionMonths) { initialMonthSubtraction -= 1; } newMonth.set('year', newYearVal).subtract(initialMonthSubtraction, 'months'); onYearChange(newMonth); }; _proto.setContainerRef = function setContainerRef(ref) { this.container = ref; }; _proto.render = function render() { var _this3 = this; var _this$props5 = this.props, enableOutsideDays = _this$props5.enableOutsideDays, firstVisibleMonthIndex = _this$props5.firstVisibleMonthIndex, horizontalMonthPadding = _this$props5.horizontalMonthPadding, isAnimating = _this$props5.isAnimating, modifiers = _this$props5.modifiers, numberOfMonths = _this$props5.numberOfMonths, monthFormat = _this$props5.monthFormat, orientation = _this$props5.orientation, translationValue = _this$props5.translationValue, daySize = _this$props5.daySize, onDayMouseEnter = _this$props5.onDayMouseEnter, onDayMouseLeave = _this$props5.onDayMouseLeave, onDayClick = _this$props5.onDayClick, renderMonthText = _this$props5.renderMonthText, renderCalendarDay = _this$props5.renderCalendarDay, renderDayContents = _this$props5.renderDayContents, renderMonthElement = _this$props5.renderMonthElement, onMonthTransitionEnd = _this$props5.onMonthTransitionEnd, firstDayOfWeek = _this$props5.firstDayOfWeek, focusedDate = _this$props5.focusedDate, isFocused = _this$props5.isFocused, isRTL = _this$props5.isRTL, styles = _this$props5.styles, phrases = _this$props5.phrases, dayAriaLabelFormat = _this$props5.dayAriaLabelFormat, transitionDuration = _this$props5.transitionDuration, verticalBorderSpacing = _this$props5.verticalBorderSpacing, setMonthTitleHeight = _this$props5.setMonthTitleHeight; var months = this.state.months; var isVertical = orientation === _constants.VERTICAL_ORIENTATION; var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; var isHorizontal = orientation === _constants.HORIZONTAL_ORIENTATION; var calendarMonthWidth = (0, _getCalendarMonthWidth["default"])(daySize, horizontalMonthPadding); var width = isVertical || isVerticalScrollable ? calendarMonthWidth : (numberOfMonths + 2) * calendarMonthWidth; var transformType = isVertical || isVerticalScrollable ? 'translateY' : 'translateX'; var transformValue = "".concat(transformType, "(").concat(translationValue, "px)"); return _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.CalendarMonthGrid, isHorizontal && styles.CalendarMonthGrid__horizontal, isVertical && styles.CalendarMonthGrid__vertical, isVerticalScrollable && styles.CalendarMonthGrid__vertical_scrollable, isAnimating && styles.CalendarMonthGrid__animating, isAnimating && transitionDuration && { transition: "transform ".concat(transitionDuration, "ms ease-in-out") }, _objectSpread({}, (0, _getTransformStyles["default"])(transformValue), { width: width })), { ref: this.setContainerRef, onTransitionEnd: onMonthTransitionEnd }), months.map(function (month, i) { var isVisible = i >= firstVisibleMonthIndex && i < firstVisibleMonthIndex + numberOfMonths; var hideForAnimation = i === 0 && !isVisible; var showForAnimation = i === 0 && isAnimating && isVisible; var monthString = (0, _toISOMonthString["default"])(month); return _react["default"].createElement("div", (0, _extends2["default"])({ key: monthString }, (0, _reactWithStyles.css)(isHorizontal && styles.CalendarMonthGrid_month__horizontal, hideForAnimation && styles.CalendarMonthGrid_month__hideForAnimation, showForAnimation && !isVertical && !isRTL && { position: 'absolute', left: -calendarMonthWidth }, showForAnimation && !isVertical && isRTL && { position: 'absolute', right: 0 }, showForAnimation && isVertical && { position: 'absolute', top: -translationValue }, !isVisible && !isAnimating && styles.CalendarMonthGrid_month__hidden)), _react["default"].createElement(_CalendarMonth["default"], { month: month, isVisible: isVisible, enableOutsideDays: enableOutsideDays, modifiers: modifiers[monthString], monthFormat: monthFormat, orientation: orientation, onDayMouseEnter: onDayMouseEnter, onDayMouseLeave: onDayMouseLeave, onDayClick: onDayClick, onMonthSelect: _this3.onMonthSelect, onYearSelect: _this3.onYearSelect, renderMonthText: renderMonthText, renderCalendarDay: renderCalendarDay, renderDayContents: renderDayContents, renderMonthElement: renderMonthElement, firstDayOfWeek: firstDayOfWeek, daySize: daySize, focusedDate: isVisible ? focusedDate : null, isFocused: isFocused, phrases: phrases, setMonthTitleHeight: setMonthTitleHeight, dayAriaLabelFormat: dayAriaLabelFormat, verticalBorderSpacing: verticalBorderSpacing, horizontalMonthPadding: horizontalMonthPadding })); })); }; return CalendarMonthGrid; }(_react["default"].PureComponent || _react["default"].Component); CalendarMonthGrid.propTypes = false ? 0 : {}; CalendarMonthGrid.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { var _ref2$reactDates = _ref2.reactDates, color = _ref2$reactDates.color, spacing = _ref2$reactDates.spacing, zIndex = _ref2$reactDates.zIndex; return { CalendarMonthGrid: { background: color.background, textAlign: (0, _noflip["default"])('left'), zIndex: zIndex }, CalendarMonthGrid__animating: { zIndex: zIndex + 1 }, CalendarMonthGrid__horizontal: { position: 'absolute', left: (0, _noflip["default"])(spacing.dayPickerHorizontalPadding) }, CalendarMonthGrid__vertical: { margin: '0 auto' }, CalendarMonthGrid__vertical_scrollable: { margin: '0 auto' }, CalendarMonthGrid_month__horizontal: { display: 'inline-block', verticalAlign: 'top', minHeight: '100%' }, CalendarMonthGrid_month__hideForAnimation: { position: 'absolute', zIndex: zIndex - 1, opacity: 0, pointerEvents: 'none' }, CalendarMonthGrid_month__hidden: { visibility: 'hidden' } }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(CalendarMonthGrid); exports["default"] = _default; /***/ }), /***/ 7485: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = CalendarWeek; var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var propTypes = false ? 0 : {}; function CalendarWeek(_ref) { var children = _ref.children; return _react["default"].createElement("tr", null, children); } CalendarWeek.propTypes = false ? 0 : {}; /***/ }), /***/ 8294: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(9196)); var ChevronDown = function ChevronDown(props) { return _react["default"].createElement("svg", props, _react["default"].createElement("path", { d: "M968 289L514 741c-11 11-21 11-32 0L29 289c-4-5-6-11-6-16 0-13 10-23 23-23 6 0 11 2 15 7l437 436 438-436c4-5 9-7 16-7 6 0 11 2 16 7 9 10 9 21 0 32z" })); }; ChevronDown.defaultProps = { focusable: "false", viewBox: "0 0 1000 1000" }; var _default = ChevronDown; exports["default"] = _default; /***/ }), /***/ 7287: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(9196)); var ChevronUp = function ChevronUp(props) { return _react["default"].createElement("svg", props, _react["default"].createElement("path", { d: "M32 713l453-453c11-11 21-11 32 0l453 453c5 5 7 10 7 16 0 13-10 23-22 23-7 0-12-2-16-7L501 309 64 745c-4 5-9 7-15 7-7 0-12-2-17-7-9-11-9-21 0-32z" })); }; ChevronUp.defaultProps = { focusable: "false", viewBox: "0 0 1000 1000" }; var _default = ChevronUp; exports["default"] = _default; /***/ }), /***/ 4718: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(9196)); var CloseButton = function CloseButton(props) { return _react["default"].createElement("svg", props, _react["default"].createElement("path", { fillRule: "evenodd", d: "M11.53.47a.75.75 0 0 0-1.061 0l-4.47 4.47L1.529.47A.75.75 0 1 0 .468 1.531l4.47 4.47-4.47 4.47a.75.75 0 1 0 1.061 1.061l4.47-4.47 4.47 4.47a.75.75 0 1 0 1.061-1.061l-4.47-4.47 4.47-4.47a.75.75 0 0 0 0-1.061z" })); }; CloseButton.defaultProps = { focusable: "false", viewBox: "0 0 12 12" }; var _default = CloseButton; exports["default"] = _default; /***/ }), /***/ 5618: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireWildcard = __webpack_require__(3805); var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.PureDayPicker = exports.defaultProps = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(8669)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _moment = _interopRequireDefault(__webpack_require__(6292)); var _throttle = _interopRequireDefault(__webpack_require__(8172)); var _isTouchDevice = _interopRequireDefault(__webpack_require__(5834)); var _reactOutsideClickHandler = _interopRequireDefault(__webpack_require__(6606)); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _noflip = _interopRequireDefault(__webpack_require__(9780)); var _CalendarMonthGrid = _interopRequireDefault(__webpack_require__(4624)); var _DayPickerNavigation = _interopRequireDefault(__webpack_require__(3768)); var _DayPickerKeyboardShortcuts = _interopRequireWildcard(__webpack_require__(4185)); var _getNumberOfCalendarMonthWeeks = _interopRequireDefault(__webpack_require__(3472)); var _getCalendarMonthWidth = _interopRequireDefault(__webpack_require__(5127)); var _calculateDimension = _interopRequireDefault(__webpack_require__(7399)); var _getActiveElement = _interopRequireDefault(__webpack_require__(1268)); var _isDayVisible = _interopRequireDefault(__webpack_require__(6979)); var _isSameMonth = _interopRequireDefault(__webpack_require__(4387)); var _ModifiersShape = _interopRequireDefault(__webpack_require__(975)); var _NavPositionShape = _interopRequireDefault(__webpack_require__(3476)); var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(2302)); var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(5547)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } var MONTH_PADDING = 23; var PREV_TRANSITION = 'prev'; var NEXT_TRANSITION = 'next'; var MONTH_SELECTION_TRANSITION = 'month_selection'; var YEAR_SELECTION_TRANSITION = 'year_selection'; var PREV_NAV = 'prev_nav'; var NEXT_NAV = 'next_nav'; var propTypes = false ? 0 : {}; var defaultProps = { // calendar presentation props enableOutsideDays: false, numberOfMonths: 2, orientation: _constants.HORIZONTAL_ORIENTATION, withPortal: false, onOutsideClick: function onOutsideClick() {}, hidden: false, initialVisibleMonth: function initialVisibleMonth() { return (0, _moment["default"])(); }, firstDayOfWeek: null, renderCalendarInfo: null, calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, hideKeyboardShortcutsPanel: false, daySize: _constants.DAY_SIZE, isRTL: false, verticalHeight: null, noBorder: false, transitionDuration: undefined, verticalBorderSpacing: undefined, horizontalMonthPadding: 13, renderKeyboardShortcutsButton: undefined, renderKeyboardShortcutsPanel: undefined, // navigation props dayPickerNavigationInlineStyles: null, disablePrev: false, disableNext: false, navPosition: _constants.NAV_POSITION_TOP, navPrev: null, navNext: null, renderNavPrevButton: null, renderNavNextButton: null, noNavButtons: false, noNavNextButton: false, noNavPrevButton: false, onPrevMonthClick: function onPrevMonthClick() {}, onNextMonthClick: function onNextMonthClick() {}, onMonthChange: function onMonthChange() {}, onYearChange: function onYearChange() {}, onGetNextScrollableMonths: function onGetNextScrollableMonths() {}, onGetPrevScrollableMonths: function onGetPrevScrollableMonths() {}, // month props renderMonthText: null, renderMonthElement: null, renderWeekHeaderElement: null, // day props modifiers: {}, renderCalendarDay: undefined, renderDayContents: null, onDayClick: function onDayClick() {}, onDayMouseEnter: function onDayMouseEnter() {}, onDayMouseLeave: function onDayMouseLeave() {}, // accessibility props isFocused: false, getFirstFocusableDay: null, onBlur: function onBlur() {}, showKeyboardShortcuts: false, onTab: function onTab() {}, onShiftTab: function onShiftTab() {}, // internationalization monthFormat: 'MMMM YYYY', weekDayFormat: 'dd', phrases: _defaultPhrases.DayPickerPhrases, dayAriaLabelFormat: undefined }; exports.defaultProps = defaultProps; var DayPicker = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(DayPicker, _ref); var _proto = DayPicker.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function DayPicker(props) { var _this; _this = _ref.call(this, props) || this; var currentMonth = props.hidden ? (0, _moment["default"])() : props.initialVisibleMonth(); var focusedDate = currentMonth.clone().startOf('month'); if (props.getFirstFocusableDay) { focusedDate = props.getFirstFocusableDay(currentMonth); } var horizontalMonthPadding = props.horizontalMonthPadding; var translationValue = props.isRTL && _this.isHorizontal() ? -(0, _getCalendarMonthWidth["default"])(props.daySize, horizontalMonthPadding) : 0; _this.hasSetInitialVisibleMonth = !props.hidden; _this.state = { currentMonthScrollTop: null, currentMonth: currentMonth, monthTransition: null, translationValue: translationValue, scrollableMonthMultiple: 1, calendarMonthWidth: (0, _getCalendarMonthWidth["default"])(props.daySize, horizontalMonthPadding), focusedDate: !props.hidden || props.isFocused ? focusedDate : null, nextFocusedDate: null, showKeyboardShortcuts: props.showKeyboardShortcuts, onKeyboardShortcutsPanelClose: function onKeyboardShortcutsPanelClose() {}, isTouchDevice: (0, _isTouchDevice["default"])(), withMouseInteractions: true, calendarInfoWidth: 0, monthTitleHeight: null, hasSetHeight: false }; _this.setCalendarMonthWeeks(currentMonth); _this.calendarMonthGridHeight = 0; _this.setCalendarInfoWidthTimeout = null; _this.setCalendarMonthGridHeightTimeout = null; _this.onKeyDown = _this.onKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); _this.throttledKeyDown = (0, _throttle["default"])(_this.onFinalKeyDown, 200, { trailing: false }); _this.onPrevMonthClick = _this.onPrevMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.onPrevMonthTransition = _this.onPrevMonthTransition.bind((0, _assertThisInitialized2["default"])(_this)); _this.onNextMonthClick = _this.onNextMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.onNextMonthTransition = _this.onNextMonthTransition.bind((0, _assertThisInitialized2["default"])(_this)); _this.onMonthChange = _this.onMonthChange.bind((0, _assertThisInitialized2["default"])(_this)); _this.onYearChange = _this.onYearChange.bind((0, _assertThisInitialized2["default"])(_this)); _this.getNextScrollableMonths = _this.getNextScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); _this.getPrevScrollableMonths = _this.getPrevScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); _this.updateStateAfterMonthTransition = _this.updateStateAfterMonthTransition.bind((0, _assertThisInitialized2["default"])(_this)); _this.openKeyboardShortcutsPanel = _this.openKeyboardShortcutsPanel.bind((0, _assertThisInitialized2["default"])(_this)); _this.closeKeyboardShortcutsPanel = _this.closeKeyboardShortcutsPanel.bind((0, _assertThisInitialized2["default"])(_this)); _this.setCalendarInfoRef = _this.setCalendarInfoRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.setContainerRef = _this.setContainerRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.setTransitionContainerRef = _this.setTransitionContainerRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.setMonthTitleHeight = _this.setMonthTitleHeight.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentDidMount = function componentDidMount() { var orientation = this.props.orientation; var currentMonth = this.state.currentMonth; var calendarInfoWidth = this.calendarInfo ? (0, _calculateDimension["default"])(this.calendarInfo, 'width', true, true) : 0; var currentMonthScrollTop = this.transitionContainer && orientation === _constants.VERTICAL_SCROLLABLE ? this.transitionContainer.scrollHeight - this.transitionContainer.scrollTop : null; this.setState({ isTouchDevice: (0, _isTouchDevice["default"])(), calendarInfoWidth: calendarInfoWidth, currentMonthScrollTop: currentMonthScrollTop }); this.setCalendarMonthWeeks(currentMonth); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextState) { var hidden = nextProps.hidden, isFocused = nextProps.isFocused, showKeyboardShortcuts = nextProps.showKeyboardShortcuts, onBlur = nextProps.onBlur, orientation = nextProps.orientation, renderMonthText = nextProps.renderMonthText, horizontalMonthPadding = nextProps.horizontalMonthPadding; var currentMonth = this.state.currentMonth; var nextCurrentMonth = nextState.currentMonth; if (!hidden) { if (!this.hasSetInitialVisibleMonth) { this.hasSetInitialVisibleMonth = true; this.setState({ currentMonth: nextProps.initialVisibleMonth() }); } } var _this$props = this.props, daySize = _this$props.daySize, prevIsFocused = _this$props.isFocused, prevRenderMonthText = _this$props.renderMonthText; if (nextProps.daySize !== daySize) { this.setState({ calendarMonthWidth: (0, _getCalendarMonthWidth["default"])(nextProps.daySize, horizontalMonthPadding) }); } if (isFocused !== prevIsFocused) { if (isFocused) { var focusedDate = this.getFocusedDay(currentMonth); var onKeyboardShortcutsPanelClose = this.state.onKeyboardShortcutsPanelClose; if (nextProps.showKeyboardShortcuts) { // the ? shortcut came from the input and we should return input there once it is close onKeyboardShortcutsPanelClose = onBlur; } this.setState({ showKeyboardShortcuts: showKeyboardShortcuts, onKeyboardShortcutsPanelClose: onKeyboardShortcutsPanelClose, focusedDate: focusedDate, withMouseInteractions: false }); } else { this.setState({ focusedDate: null }); } } if (renderMonthText !== prevRenderMonthText) { this.setState({ monthTitleHeight: null }); } // Capture the scroll position so when previous months are rendered above the current month // we can adjust scroll after the component has updated and the previous current month // stays in view. if (orientation === _constants.VERTICAL_SCROLLABLE && this.transitionContainer && !(0, _isSameMonth["default"])(currentMonth, nextCurrentMonth)) { this.setState({ currentMonthScrollTop: this.transitionContainer.scrollHeight - this.transitionContainer.scrollTop }); } }; _proto.componentWillUpdate = function componentWillUpdate() { var _this2 = this; var transitionDuration = this.props.transitionDuration; // Calculating the dimensions trigger a DOM repaint which // breaks the CSS transition. // The setTimeout will wait until the transition ends. if (this.calendarInfo) { this.setCalendarInfoWidthTimeout = setTimeout(function () { var calendarInfoWidth = _this2.state.calendarInfoWidth; var calendarInfoPanelWidth = (0, _calculateDimension["default"])(_this2.calendarInfo, 'width', true, true); if (calendarInfoWidth !== calendarInfoPanelWidth) { _this2.setState({ calendarInfoWidth: calendarInfoPanelWidth }); } }, transitionDuration); } }; _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) { var _this$props2 = this.props, orientation = _this$props2.orientation, daySize = _this$props2.daySize, isFocused = _this$props2.isFocused, numberOfMonths = _this$props2.numberOfMonths; var _this$state = this.state, currentMonth = _this$state.currentMonth, currentMonthScrollTop = _this$state.currentMonthScrollTop, focusedDate = _this$state.focusedDate, monthTitleHeight = _this$state.monthTitleHeight; if (this.isHorizontal() && (orientation !== prevProps.orientation || daySize !== prevProps.daySize)) { var visibleCalendarWeeks = this.calendarMonthWeeks.slice(1, numberOfMonths + 1); var calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat((0, _toConsumableArray2["default"])(visibleCalendarWeeks))) * (daySize - 1); var newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; this.adjustDayPickerHeight(newMonthHeight); } if (!prevProps.isFocused && isFocused && !focusedDate) { this.container.focus(); } // If orientation is VERTICAL_SCROLLABLE and currentMonth has changed adjust scrollTop so the // new months rendered above the current month don't push the current month out of view. if (orientation === _constants.VERTICAL_SCROLLABLE && !(0, _isSameMonth["default"])(prevState.currentMonth, currentMonth) && currentMonthScrollTop && this.transitionContainer) { this.transitionContainer.scrollTop = this.transitionContainer.scrollHeight - currentMonthScrollTop; } }; _proto.componentWillUnmount = function componentWillUnmount() { clearTimeout(this.setCalendarInfoWidthTimeout); clearTimeout(this.setCalendarMonthGridHeightTimeout); }; _proto.onKeyDown = function onKeyDown(e) { e.stopPropagation(); if (!_constants.MODIFIER_KEY_NAMES.has(e.key)) { this.throttledKeyDown(e); } }; _proto.onFinalKeyDown = function onFinalKeyDown(e) { this.setState({ withMouseInteractions: false }); var _this$props3 = this.props, onBlur = _this$props3.onBlur, onTab = _this$props3.onTab, onShiftTab = _this$props3.onShiftTab, isRTL = _this$props3.isRTL; var _this$state2 = this.state, focusedDate = _this$state2.focusedDate, showKeyboardShortcuts = _this$state2.showKeyboardShortcuts; if (!focusedDate) return; var newFocusedDate = focusedDate.clone(); var didTransitionMonth = false; // focus might be anywhere when the keyboard shortcuts panel is opened so we want to // return it to wherever it was before when the panel was opened var activeElement = (0, _getActiveElement["default"])(); var onKeyboardShortcutsPanelClose = function onKeyboardShortcutsPanelClose() { if (activeElement) activeElement.focus(); }; switch (e.key) { case 'ArrowUp': e.preventDefault(); newFocusedDate.subtract(1, 'week'); didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); break; case 'ArrowLeft': e.preventDefault(); if (isRTL) { newFocusedDate.add(1, 'day'); } else { newFocusedDate.subtract(1, 'day'); } didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); break; case 'Home': e.preventDefault(); newFocusedDate.startOf('week'); didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); break; case 'PageUp': e.preventDefault(); newFocusedDate.subtract(1, 'month'); didTransitionMonth = this.maybeTransitionPrevMonth(newFocusedDate); break; case 'ArrowDown': e.preventDefault(); newFocusedDate.add(1, 'week'); didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); break; case 'ArrowRight': e.preventDefault(); if (isRTL) { newFocusedDate.subtract(1, 'day'); } else { newFocusedDate.add(1, 'day'); } didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); break; case 'End': e.preventDefault(); newFocusedDate.endOf('week'); didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); break; case 'PageDown': e.preventDefault(); newFocusedDate.add(1, 'month'); didTransitionMonth = this.maybeTransitionNextMonth(newFocusedDate); break; case '?': this.openKeyboardShortcutsPanel(onKeyboardShortcutsPanelClose); break; case 'Escape': if (showKeyboardShortcuts) { this.closeKeyboardShortcutsPanel(); } else { onBlur(e); } break; case 'Tab': if (e.shiftKey) { onShiftTab(); } else { onTab(e); } break; default: break; } // If there was a month transition, do not update the focused date until the transition has // completed. Otherwise, attempting to focus on a DOM node may interrupt the CSS animation. If // didTransitionMonth is true, the focusedDate gets updated in #updateStateAfterMonthTransition if (!didTransitionMonth) { this.setState({ focusedDate: newFocusedDate }); } }; _proto.onPrevMonthClick = function onPrevMonthClick(e) { if (e) e.preventDefault(); this.onPrevMonthTransition(); }; _proto.onPrevMonthTransition = function onPrevMonthTransition(nextFocusedDate) { var _this$props4 = this.props, daySize = _this$props4.daySize, isRTL = _this$props4.isRTL, numberOfMonths = _this$props4.numberOfMonths; var _this$state3 = this.state, calendarMonthWidth = _this$state3.calendarMonthWidth, monthTitleHeight = _this$state3.monthTitleHeight; var translationValue; if (this.isVertical()) { var calendarMonthWeeksHeight = this.calendarMonthWeeks[0] * (daySize - 1); translationValue = monthTitleHeight + calendarMonthWeeksHeight + 1; } else if (this.isHorizontal()) { translationValue = calendarMonthWidth; if (isRTL) { translationValue = -2 * calendarMonthWidth; } var visibleCalendarWeeks = this.calendarMonthWeeks.slice(0, numberOfMonths); var _calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat((0, _toConsumableArray2["default"])(visibleCalendarWeeks))) * (daySize - 1); var newMonthHeight = monthTitleHeight + _calendarMonthWeeksHeight + 1; this.adjustDayPickerHeight(newMonthHeight); } this.setState({ monthTransition: PREV_TRANSITION, translationValue: translationValue, focusedDate: null, nextFocusedDate: nextFocusedDate }); }; _proto.onMonthChange = function onMonthChange(currentMonth) { this.setCalendarMonthWeeks(currentMonth); this.calculateAndSetDayPickerHeight(); // Translation value is a hack to force an invisible transition that // properly rerenders the CalendarMonthGrid this.setState({ monthTransition: MONTH_SELECTION_TRANSITION, translationValue: 0.00001, focusedDate: null, nextFocusedDate: currentMonth, currentMonth: currentMonth }); }; _proto.onYearChange = function onYearChange(currentMonth) { this.setCalendarMonthWeeks(currentMonth); this.calculateAndSetDayPickerHeight(); // Translation value is a hack to force an invisible transition that // properly rerenders the CalendarMonthGrid this.setState({ monthTransition: YEAR_SELECTION_TRANSITION, translationValue: 0.0001, focusedDate: null, nextFocusedDate: currentMonth, currentMonth: currentMonth }); }; _proto.onNextMonthClick = function onNextMonthClick(e) { if (e) e.preventDefault(); this.onNextMonthTransition(); }; _proto.onNextMonthTransition = function onNextMonthTransition(nextFocusedDate) { var _this$props5 = this.props, isRTL = _this$props5.isRTL, numberOfMonths = _this$props5.numberOfMonths, daySize = _this$props5.daySize; var _this$state4 = this.state, calendarMonthWidth = _this$state4.calendarMonthWidth, monthTitleHeight = _this$state4.monthTitleHeight; var translationValue; if (this.isVertical()) { var firstVisibleMonthWeeks = this.calendarMonthWeeks[1]; var calendarMonthWeeksHeight = firstVisibleMonthWeeks * (daySize - 1); translationValue = -(monthTitleHeight + calendarMonthWeeksHeight + 1); } if (this.isHorizontal()) { translationValue = -calendarMonthWidth; if (isRTL) { translationValue = 0; } var visibleCalendarWeeks = this.calendarMonthWeeks.slice(2, numberOfMonths + 2); var _calendarMonthWeeksHeight2 = Math.max.apply(Math, [0].concat((0, _toConsumableArray2["default"])(visibleCalendarWeeks))) * (daySize - 1); var newMonthHeight = monthTitleHeight + _calendarMonthWeeksHeight2 + 1; this.adjustDayPickerHeight(newMonthHeight); } this.setState({ monthTransition: NEXT_TRANSITION, translationValue: translationValue, focusedDate: null, nextFocusedDate: nextFocusedDate }); }; _proto.getFirstDayOfWeek = function getFirstDayOfWeek() { var firstDayOfWeek = this.props.firstDayOfWeek; if (firstDayOfWeek == null) { return _moment["default"].localeData().firstDayOfWeek(); } return firstDayOfWeek; }; _proto.getWeekHeaders = function getWeekHeaders() { var weekDayFormat = this.props.weekDayFormat; var currentMonth = this.state.currentMonth; var firstDayOfWeek = this.getFirstDayOfWeek(); var weekHeaders = []; for (var i = 0; i < 7; i += 1) { weekHeaders.push(currentMonth.clone().day((i + firstDayOfWeek) % 7).format(weekDayFormat)); } return weekHeaders; }; _proto.getFirstVisibleIndex = function getFirstVisibleIndex() { var orientation = this.props.orientation; var monthTransition = this.state.monthTransition; if (orientation === _constants.VERTICAL_SCROLLABLE) return 0; var firstVisibleMonthIndex = 1; if (monthTransition === PREV_TRANSITION) { firstVisibleMonthIndex -= 1; } else if (monthTransition === NEXT_TRANSITION) { firstVisibleMonthIndex += 1; } return firstVisibleMonthIndex; }; _proto.getFocusedDay = function getFocusedDay(newMonth) { var _this$props6 = this.props, getFirstFocusableDay = _this$props6.getFirstFocusableDay, numberOfMonths = _this$props6.numberOfMonths; var focusedDate; if (getFirstFocusableDay) { focusedDate = getFirstFocusableDay(newMonth); } if (newMonth && (!focusedDate || !(0, _isDayVisible["default"])(focusedDate, newMonth, numberOfMonths))) { focusedDate = newMonth.clone().startOf('month'); } return focusedDate; }; _proto.setMonthTitleHeight = function setMonthTitleHeight(monthTitleHeight) { var _this3 = this; this.setState({ monthTitleHeight: monthTitleHeight }, function () { _this3.calculateAndSetDayPickerHeight(); }); }; _proto.setCalendarMonthWeeks = function setCalendarMonthWeeks(currentMonth) { var numberOfMonths = this.props.numberOfMonths; this.calendarMonthWeeks = []; var month = currentMonth.clone().subtract(1, 'months'); var firstDayOfWeek = this.getFirstDayOfWeek(); for (var i = 0; i < numberOfMonths + 2; i += 1) { var numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks["default"])(month, firstDayOfWeek); this.calendarMonthWeeks.push(numberOfWeeks); month = month.add(1, 'months'); } }; _proto.setContainerRef = function setContainerRef(ref) { this.container = ref; }; _proto.setCalendarInfoRef = function setCalendarInfoRef(ref) { this.calendarInfo = ref; }; _proto.setTransitionContainerRef = function setTransitionContainerRef(ref) { this.transitionContainer = ref; }; _proto.getNextScrollableMonths = function getNextScrollableMonths(e) { var onGetNextScrollableMonths = this.props.onGetNextScrollableMonths; if (e) e.preventDefault(); if (onGetNextScrollableMonths) onGetNextScrollableMonths(e); this.setState(function (_ref2) { var scrollableMonthMultiple = _ref2.scrollableMonthMultiple; return { scrollableMonthMultiple: scrollableMonthMultiple + 1 }; }); }; _proto.getPrevScrollableMonths = function getPrevScrollableMonths(e) { var _this$props7 = this.props, numberOfMonths = _this$props7.numberOfMonths, onGetPrevScrollableMonths = _this$props7.onGetPrevScrollableMonths; if (e) e.preventDefault(); if (onGetPrevScrollableMonths) onGetPrevScrollableMonths(e); this.setState(function (_ref3) { var currentMonth = _ref3.currentMonth, scrollableMonthMultiple = _ref3.scrollableMonthMultiple; return { currentMonth: currentMonth.clone().subtract(numberOfMonths, 'month'), scrollableMonthMultiple: scrollableMonthMultiple + 1 }; }); }; _proto.maybeTransitionNextMonth = function maybeTransitionNextMonth(newFocusedDate) { var numberOfMonths = this.props.numberOfMonths; var _this$state5 = this.state, currentMonth = _this$state5.currentMonth, focusedDate = _this$state5.focusedDate; var newFocusedDateMonth = newFocusedDate.month(); var focusedDateMonth = focusedDate.month(); var isNewFocusedDateVisible = (0, _isDayVisible["default"])(newFocusedDate, currentMonth, numberOfMonths); if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) { this.onNextMonthTransition(newFocusedDate); return true; } return false; }; _proto.maybeTransitionPrevMonth = function maybeTransitionPrevMonth(newFocusedDate) { var numberOfMonths = this.props.numberOfMonths; var _this$state6 = this.state, currentMonth = _this$state6.currentMonth, focusedDate = _this$state6.focusedDate; var newFocusedDateMonth = newFocusedDate.month(); var focusedDateMonth = focusedDate.month(); var isNewFocusedDateVisible = (0, _isDayVisible["default"])(newFocusedDate, currentMonth, numberOfMonths); if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) { this.onPrevMonthTransition(newFocusedDate); return true; } return false; }; _proto.isHorizontal = function isHorizontal() { var orientation = this.props.orientation; return orientation === _constants.HORIZONTAL_ORIENTATION; }; _proto.isVertical = function isVertical() { var orientation = this.props.orientation; return orientation === _constants.VERTICAL_ORIENTATION || orientation === _constants.VERTICAL_SCROLLABLE; }; _proto.updateStateAfterMonthTransition = function updateStateAfterMonthTransition() { var _this4 = this; var _this$props8 = this.props, onPrevMonthClick = _this$props8.onPrevMonthClick, onNextMonthClick = _this$props8.onNextMonthClick, numberOfMonths = _this$props8.numberOfMonths, onMonthChange = _this$props8.onMonthChange, onYearChange = _this$props8.onYearChange, isRTL = _this$props8.isRTL; var _this$state7 = this.state, currentMonth = _this$state7.currentMonth, monthTransition = _this$state7.monthTransition, focusedDate = _this$state7.focusedDate, nextFocusedDate = _this$state7.nextFocusedDate, withMouseInteractions = _this$state7.withMouseInteractions, calendarMonthWidth = _this$state7.calendarMonthWidth; if (!monthTransition) return; var newMonth = currentMonth.clone(); var firstDayOfWeek = this.getFirstDayOfWeek(); if (monthTransition === PREV_TRANSITION) { newMonth.subtract(1, 'month'); if (onPrevMonthClick) onPrevMonthClick(newMonth); var newInvisibleMonth = newMonth.clone().subtract(1, 'month'); var numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks["default"])(newInvisibleMonth, firstDayOfWeek); this.calendarMonthWeeks = [numberOfWeeks].concat((0, _toConsumableArray2["default"])(this.calendarMonthWeeks.slice(0, -1))); } else if (monthTransition === NEXT_TRANSITION) { newMonth.add(1, 'month'); if (onNextMonthClick) onNextMonthClick(newMonth); var _newInvisibleMonth = newMonth.clone().add(numberOfMonths, 'month'); var _numberOfWeeks = (0, _getNumberOfCalendarMonthWeeks["default"])(_newInvisibleMonth, firstDayOfWeek); this.calendarMonthWeeks = [].concat((0, _toConsumableArray2["default"])(this.calendarMonthWeeks.slice(1)), [_numberOfWeeks]); } else if (monthTransition === MONTH_SELECTION_TRANSITION) { if (onMonthChange) onMonthChange(newMonth); } else if (monthTransition === YEAR_SELECTION_TRANSITION) { if (onYearChange) onYearChange(newMonth); } var newFocusedDate = null; if (nextFocusedDate) { newFocusedDate = nextFocusedDate; } else if (!focusedDate && !withMouseInteractions) { newFocusedDate = this.getFocusedDay(newMonth); } this.setState({ currentMonth: newMonth, monthTransition: null, translationValue: isRTL && this.isHorizontal() ? -calendarMonthWidth : 0, nextFocusedDate: null, focusedDate: newFocusedDate }, function () { // we don't want to focus on the relevant calendar day after a month transition // if the user is navigating around using a mouse if (withMouseInteractions) { var activeElement = (0, _getActiveElement["default"])(); if (activeElement && activeElement !== document.body && _this4.container.contains(activeElement) && activeElement.blur) { activeElement.blur(); } } }); }; _proto.adjustDayPickerHeight = function adjustDayPickerHeight(newMonthHeight) { var _this5 = this; var monthHeight = newMonthHeight + MONTH_PADDING; if (monthHeight !== this.calendarMonthGridHeight) { this.transitionContainer.style.height = "".concat(monthHeight, "px"); if (!this.calendarMonthGridHeight) { this.setCalendarMonthGridHeightTimeout = setTimeout(function () { _this5.setState({ hasSetHeight: true }); }, 0); } this.calendarMonthGridHeight = monthHeight; } }; _proto.calculateAndSetDayPickerHeight = function calculateAndSetDayPickerHeight() { var _this$props9 = this.props, daySize = _this$props9.daySize, numberOfMonths = _this$props9.numberOfMonths; var monthTitleHeight = this.state.monthTitleHeight; var visibleCalendarWeeks = this.calendarMonthWeeks.slice(1, numberOfMonths + 1); var calendarMonthWeeksHeight = Math.max.apply(Math, [0].concat((0, _toConsumableArray2["default"])(visibleCalendarWeeks))) * (daySize - 1); var newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; if (this.isHorizontal()) { this.adjustDayPickerHeight(newMonthHeight); } }; _proto.openKeyboardShortcutsPanel = function openKeyboardShortcutsPanel(onCloseCallBack) { this.setState({ showKeyboardShortcuts: true, onKeyboardShortcutsPanelClose: onCloseCallBack }); }; _proto.closeKeyboardShortcutsPanel = function closeKeyboardShortcutsPanel() { var onKeyboardShortcutsPanelClose = this.state.onKeyboardShortcutsPanelClose; if (onKeyboardShortcutsPanelClose) { onKeyboardShortcutsPanelClose(); } this.setState({ onKeyboardShortcutsPanelClose: null, showKeyboardShortcuts: false }); }; _proto.renderNavigation = function renderNavigation(navDirection) { var _this$props10 = this.props, dayPickerNavigationInlineStyles = _this$props10.dayPickerNavigationInlineStyles, disablePrev = _this$props10.disablePrev, disableNext = _this$props10.disableNext, navPosition = _this$props10.navPosition, navPrev = _this$props10.navPrev, navNext = _this$props10.navNext, noNavButtons = _this$props10.noNavButtons, noNavNextButton = _this$props10.noNavNextButton, noNavPrevButton = _this$props10.noNavPrevButton, orientation = _this$props10.orientation, phrases = _this$props10.phrases, renderNavPrevButton = _this$props10.renderNavPrevButton, renderNavNextButton = _this$props10.renderNavNextButton, isRTL = _this$props10.isRTL; if (noNavButtons) { return null; } var onPrevMonthClick = orientation === _constants.VERTICAL_SCROLLABLE ? this.getPrevScrollableMonths : this.onPrevMonthClick; var onNextMonthClick = orientation === _constants.VERTICAL_SCROLLABLE ? this.getNextScrollableMonths : this.onNextMonthClick; return _react["default"].createElement(_DayPickerNavigation["default"], { disablePrev: disablePrev, disableNext: disableNext, inlineStyles: dayPickerNavigationInlineStyles, onPrevMonthClick: onPrevMonthClick, onNextMonthClick: onNextMonthClick, navPosition: navPosition, navPrev: navPrev, navNext: navNext, renderNavPrevButton: renderNavPrevButton, renderNavNextButton: renderNavNextButton, orientation: orientation, phrases: phrases, isRTL: isRTL, showNavNextButton: !(noNavNextButton || orientation === _constants.VERTICAL_SCROLLABLE && navDirection === PREV_NAV), showNavPrevButton: !(noNavPrevButton || orientation === _constants.VERTICAL_SCROLLABLE && navDirection === NEXT_NAV) }); }; _proto.renderWeekHeader = function renderWeekHeader(index) { var _this$props11 = this.props, daySize = _this$props11.daySize, horizontalMonthPadding = _this$props11.horizontalMonthPadding, orientation = _this$props11.orientation, renderWeekHeaderElement = _this$props11.renderWeekHeaderElement, styles = _this$props11.styles; var calendarMonthWidth = this.state.calendarMonthWidth; var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; var horizontalStyle = { left: index * calendarMonthWidth }; var verticalStyle = { marginLeft: -calendarMonthWidth / 2 }; var weekHeaderStyle = {}; // no styles applied to the vertical-scrollable orientation if (this.isHorizontal()) { weekHeaderStyle = horizontalStyle; } else if (this.isVertical() && !verticalScrollable) { weekHeaderStyle = verticalStyle; } var weekHeaders = this.getWeekHeaders(); var header = weekHeaders.map(function (day) { return _react["default"].createElement("li", (0, _extends2["default"])({ key: day }, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader_li, { width: daySize })), renderWeekHeaderElement ? renderWeekHeaderElement(day) : _react["default"].createElement("small", null, day)); }); return _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeader, this.isVertical() && styles.DayPicker_weekHeader__vertical, verticalScrollable && styles.DayPicker_weekHeader__verticalScrollable, weekHeaderStyle, { padding: "0 ".concat(horizontalMonthPadding, "px") }), { key: "week-".concat(index) }), _react["default"].createElement("ul", (0, _reactWithStyles.css)(styles.DayPicker_weekHeader_ul), header)); }; _proto.render = function render() { var _this6 = this; var _this$state8 = this.state, calendarMonthWidth = _this$state8.calendarMonthWidth, currentMonth = _this$state8.currentMonth, monthTransition = _this$state8.monthTransition, translationValue = _this$state8.translationValue, scrollableMonthMultiple = _this$state8.scrollableMonthMultiple, focusedDate = _this$state8.focusedDate, showKeyboardShortcuts = _this$state8.showKeyboardShortcuts, isTouch = _this$state8.isTouchDevice, hasSetHeight = _this$state8.hasSetHeight, calendarInfoWidth = _this$state8.calendarInfoWidth, monthTitleHeight = _this$state8.monthTitleHeight; var _this$props12 = this.props, enableOutsideDays = _this$props12.enableOutsideDays, numberOfMonths = _this$props12.numberOfMonths, orientation = _this$props12.orientation, modifiers = _this$props12.modifiers, withPortal = _this$props12.withPortal, onDayClick = _this$props12.onDayClick, onDayMouseEnter = _this$props12.onDayMouseEnter, onDayMouseLeave = _this$props12.onDayMouseLeave, firstDayOfWeek = _this$props12.firstDayOfWeek, renderMonthText = _this$props12.renderMonthText, renderCalendarDay = _this$props12.renderCalendarDay, renderDayContents = _this$props12.renderDayContents, renderCalendarInfo = _this$props12.renderCalendarInfo, renderMonthElement = _this$props12.renderMonthElement, renderKeyboardShortcutsButton = _this$props12.renderKeyboardShortcutsButton, renderKeyboardShortcutsPanel = _this$props12.renderKeyboardShortcutsPanel, calendarInfoPosition = _this$props12.calendarInfoPosition, hideKeyboardShortcutsPanel = _this$props12.hideKeyboardShortcutsPanel, onOutsideClick = _this$props12.onOutsideClick, monthFormat = _this$props12.monthFormat, daySize = _this$props12.daySize, isFocused = _this$props12.isFocused, isRTL = _this$props12.isRTL, styles = _this$props12.styles, theme = _this$props12.theme, phrases = _this$props12.phrases, verticalHeight = _this$props12.verticalHeight, dayAriaLabelFormat = _this$props12.dayAriaLabelFormat, noBorder = _this$props12.noBorder, transitionDuration = _this$props12.transitionDuration, verticalBorderSpacing = _this$props12.verticalBorderSpacing, horizontalMonthPadding = _this$props12.horizontalMonthPadding, navPosition = _this$props12.navPosition; var dayPickerHorizontalPadding = theme.reactDates.spacing.dayPickerHorizontalPadding; var isHorizontal = this.isHorizontal(); var numOfWeekHeaders = this.isVertical() ? 1 : numberOfMonths; var weekHeaders = []; for (var i = 0; i < numOfWeekHeaders; i += 1) { weekHeaders.push(this.renderWeekHeader(i)); } var verticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; var height; if (isHorizontal) { height = this.calendarMonthGridHeight; } else if (this.isVertical() && !verticalScrollable && !withPortal) { // If the user doesn't set a desired height, // we default back to this kind of made-up value that generally looks good height = verticalHeight || 1.75 * calendarMonthWidth; } var isCalendarMonthGridAnimating = monthTransition !== null; var shouldFocusDate = !isCalendarMonthGridAnimating && isFocused; var keyboardShortcutButtonLocation = _DayPickerKeyboardShortcuts.BOTTOM_RIGHT; if (this.isVertical()) { keyboardShortcutButtonLocation = withPortal ? _DayPickerKeyboardShortcuts.TOP_LEFT : _DayPickerKeyboardShortcuts.TOP_RIGHT; } var shouldAnimateHeight = isHorizontal && hasSetHeight; var calendarInfoPositionTop = calendarInfoPosition === _constants.INFO_POSITION_TOP; var calendarInfoPositionBottom = calendarInfoPosition === _constants.INFO_POSITION_BOTTOM; var calendarInfoPositionBefore = calendarInfoPosition === _constants.INFO_POSITION_BEFORE; var calendarInfoPositionAfter = calendarInfoPosition === _constants.INFO_POSITION_AFTER; var calendarInfoIsInline = calendarInfoPositionBefore || calendarInfoPositionAfter; var calendarInfo = renderCalendarInfo && _react["default"].createElement("div", (0, _extends2["default"])({ ref: this.setCalendarInfoRef }, (0, _reactWithStyles.css)(calendarInfoIsInline && styles.DayPicker_calendarInfo__horizontal)), renderCalendarInfo()); var calendarInfoPanelWidth = renderCalendarInfo && calendarInfoIsInline ? calendarInfoWidth : 0; var firstVisibleMonthIndex = this.getFirstVisibleIndex(); var wrapperHorizontalWidth = calendarMonthWidth * numberOfMonths + 2 * dayPickerHorizontalPadding; // Adding `1px` because of whitespace between 2 inline-block var fullHorizontalWidth = wrapperHorizontalWidth + calendarInfoPanelWidth + 1; var transitionContainerStyle = { width: isHorizontal && wrapperHorizontalWidth, height: height }; var dayPickerWrapperStyle = { width: isHorizontal && wrapperHorizontalWidth }; var dayPickerStyle = { width: isHorizontal && fullHorizontalWidth, // These values are to center the datepicker (approximately) on the page marginLeft: isHorizontal && withPortal ? -fullHorizontalWidth / 2 : null, marginTop: isHorizontal && withPortal ? -calendarMonthWidth / 2 : null }; return _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.DayPicker, isHorizontal && styles.DayPicker__horizontal, verticalScrollable && styles.DayPicker__verticalScrollable, isHorizontal && withPortal && styles.DayPicker_portal__horizontal, this.isVertical() && withPortal && styles.DayPicker_portal__vertical, dayPickerStyle, !monthTitleHeight && styles.DayPicker__hidden, !noBorder && styles.DayPicker__withBorder), _react["default"].createElement(_reactOutsideClickHandler["default"], { onOutsideClick: onOutsideClick }, (calendarInfoPositionTop || calendarInfoPositionBefore) && calendarInfo, _react["default"].createElement("div", (0, _reactWithStyles.css)(dayPickerWrapperStyle, calendarInfoIsInline && isHorizontal && styles.DayPicker_wrapper__horizontal), _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPicker_weekHeaders, isHorizontal && styles.DayPicker_weekHeaders__horizontal), { "aria-hidden": "true", role: "presentation" }), weekHeaders), _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPicker_focusRegion), { ref: this.setContainerRef, onClick: function onClick(e) { e.stopPropagation(); }, onKeyDown: this.onKeyDown, onMouseUp: function onMouseUp() { _this6.setState({ withMouseInteractions: true }); }, tabIndex: -1, role: "application", "aria-roledescription": phrases.roleDescription, "aria-label": phrases.calendarLabel }), !verticalScrollable && navPosition === _constants.NAV_POSITION_TOP && this.renderNavigation(), _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPicker_transitionContainer, shouldAnimateHeight && styles.DayPicker_transitionContainer__horizontal, this.isVertical() && styles.DayPicker_transitionContainer__vertical, verticalScrollable && styles.DayPicker_transitionContainer__verticalScrollable, transitionContainerStyle), { ref: this.setTransitionContainerRef }), verticalScrollable && this.renderNavigation(PREV_NAV), _react["default"].createElement(_CalendarMonthGrid["default"], { setMonthTitleHeight: !monthTitleHeight ? this.setMonthTitleHeight : undefined, translationValue: translationValue, enableOutsideDays: enableOutsideDays, firstVisibleMonthIndex: firstVisibleMonthIndex, initialMonth: currentMonth, isAnimating: isCalendarMonthGridAnimating, modifiers: modifiers, orientation: orientation, numberOfMonths: numberOfMonths * scrollableMonthMultiple, onDayClick: onDayClick, onDayMouseEnter: onDayMouseEnter, onDayMouseLeave: onDayMouseLeave, onMonthChange: this.onMonthChange, onYearChange: this.onYearChange, renderMonthText: renderMonthText, renderCalendarDay: renderCalendarDay, renderDayContents: renderDayContents, renderMonthElement: renderMonthElement, onMonthTransitionEnd: this.updateStateAfterMonthTransition, monthFormat: monthFormat, daySize: daySize, firstDayOfWeek: firstDayOfWeek, isFocused: shouldFocusDate, focusedDate: focusedDate, phrases: phrases, isRTL: isRTL, dayAriaLabelFormat: dayAriaLabelFormat, transitionDuration: transitionDuration, verticalBorderSpacing: verticalBorderSpacing, horizontalMonthPadding: horizontalMonthPadding }), verticalScrollable && this.renderNavigation(NEXT_NAV)), !verticalScrollable && navPosition === _constants.NAV_POSITION_BOTTOM && this.renderNavigation(), !isTouch && !hideKeyboardShortcutsPanel && _react["default"].createElement(_DayPickerKeyboardShortcuts["default"], { block: this.isVertical() && !withPortal, buttonLocation: keyboardShortcutButtonLocation, showKeyboardShortcutsPanel: showKeyboardShortcuts, openKeyboardShortcutsPanel: this.openKeyboardShortcutsPanel, closeKeyboardShortcutsPanel: this.closeKeyboardShortcutsPanel, phrases: phrases, renderKeyboardShortcutsButton: renderKeyboardShortcutsButton, renderKeyboardShortcutsPanel: renderKeyboardShortcutsPanel }))), (calendarInfoPositionBottom || calendarInfoPositionAfter) && calendarInfo)); }; return DayPicker; }(_react["default"].PureComponent || _react["default"].Component); exports.PureDayPicker = DayPicker; DayPicker.propTypes = false ? 0 : {}; DayPicker.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref4) { var _ref4$reactDates = _ref4.reactDates, color = _ref4$reactDates.color, font = _ref4$reactDates.font, noScrollBarOnVerticalScrollable = _ref4$reactDates.noScrollBarOnVerticalScrollable, spacing = _ref4$reactDates.spacing, zIndex = _ref4$reactDates.zIndex; return { DayPicker: { background: color.background, position: 'relative', textAlign: (0, _noflip["default"])('left') }, DayPicker__horizontal: { background: color.background }, DayPicker__verticalScrollable: { height: '100%' }, DayPicker__hidden: { visibility: 'hidden' }, DayPicker__withBorder: { boxShadow: (0, _noflip["default"])('0 2px 6px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.07)'), borderRadius: 3 }, DayPicker_portal__horizontal: { boxShadow: 'none', position: 'absolute', left: (0, _noflip["default"])('50%'), top: '50%' }, DayPicker_portal__vertical: { position: 'initial' }, DayPicker_focusRegion: { outline: 'none' }, DayPicker_calendarInfo__horizontal: { display: 'inline-block', verticalAlign: 'top' }, DayPicker_wrapper__horizontal: { display: 'inline-block', verticalAlign: 'top' }, DayPicker_weekHeaders: { position: 'relative' }, DayPicker_weekHeaders__horizontal: { marginLeft: (0, _noflip["default"])(spacing.dayPickerHorizontalPadding) }, DayPicker_weekHeader: { color: color.placeholderText, position: 'absolute', top: 62, zIndex: zIndex + 2, textAlign: (0, _noflip["default"])('left') }, DayPicker_weekHeader__vertical: { left: (0, _noflip["default"])('50%') }, DayPicker_weekHeader__verticalScrollable: { top: 0, display: 'table-row', borderBottom: "1px solid ".concat(color.core.border), background: color.background, marginLeft: (0, _noflip["default"])(0), left: (0, _noflip["default"])(0), width: '100%', textAlign: 'center' }, DayPicker_weekHeader_ul: { listStyle: 'none', margin: '1px 0', paddingLeft: (0, _noflip["default"])(0), paddingRight: (0, _noflip["default"])(0), fontSize: font.size }, DayPicker_weekHeader_li: { display: 'inline-block', textAlign: 'center' }, DayPicker_transitionContainer: { position: 'relative', overflow: 'hidden', borderRadius: 3 }, DayPicker_transitionContainer__horizontal: { transition: 'height 0.2s ease-in-out' }, DayPicker_transitionContainer__vertical: { width: '100%' }, DayPicker_transitionContainer__verticalScrollable: _objectSpread({ paddingTop: 20, height: '100%', position: 'absolute', top: 0, bottom: 0, right: (0, _noflip["default"])(0), left: (0, _noflip["default"])(0), overflowY: 'scroll' }, noScrollBarOnVerticalScrollable && { '-webkitOverflowScrolling': 'touch', '::-webkit-scrollbar': { '-webkit-appearance': 'none', display: 'none' } }) }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(DayPicker); exports["default"] = _default; /***/ }), /***/ 4185: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.BOTTOM_RIGHT = exports.TOP_RIGHT = exports.TOP_LEFT = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _KeyboardShortcutRow = _interopRequireDefault(__webpack_require__(1726)); var _CloseButton = _interopRequireDefault(__webpack_require__(4718)); 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; } 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) { (0, _defineProperty2["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; } var TOP_LEFT = 'top-left'; exports.TOP_LEFT = TOP_LEFT; var TOP_RIGHT = 'top-right'; exports.TOP_RIGHT = TOP_RIGHT; var BOTTOM_RIGHT = 'bottom-right'; exports.BOTTOM_RIGHT = BOTTOM_RIGHT; var propTypes = false ? 0 : {}; var defaultProps = { block: false, buttonLocation: BOTTOM_RIGHT, showKeyboardShortcutsPanel: false, openKeyboardShortcutsPanel: function openKeyboardShortcutsPanel() {}, closeKeyboardShortcutsPanel: function closeKeyboardShortcutsPanel() {}, phrases: _defaultPhrases.DayPickerKeyboardShortcutsPhrases, renderKeyboardShortcutsButton: undefined, renderKeyboardShortcutsPanel: undefined }; function getKeyboardShortcuts(phrases) { return [{ unicode: '↵', label: phrases.enterKey, action: phrases.selectFocusedDate }, { unicode: '←/→', label: phrases.leftArrowRightArrow, action: phrases.moveFocusByOneDay }, { unicode: '↑/↓', label: phrases.upArrowDownArrow, action: phrases.moveFocusByOneWeek }, { unicode: 'PgUp/PgDn', label: phrases.pageUpPageDown, action: phrases.moveFocusByOneMonth }, { unicode: 'Home/End', label: phrases.homeEnd, action: phrases.moveFocustoStartAndEndOfWeek }, { unicode: 'Esc', label: phrases.escape, action: phrases.returnFocusToInput }, { unicode: '?', label: phrases.questionMark, action: phrases.openThisPanel }]; } var DayPickerKeyboardShortcuts = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(DayPickerKeyboardShortcuts, _ref); var _proto = DayPickerKeyboardShortcuts.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function DayPickerKeyboardShortcuts() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _ref.call.apply(_ref, [this].concat(args)) || this; var phrases = _this.props.phrases; _this.keyboardShortcuts = getKeyboardShortcuts(phrases); _this.onShowKeyboardShortcutsButtonClick = _this.onShowKeyboardShortcutsButtonClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.setShowKeyboardShortcutsButtonRef = _this.setShowKeyboardShortcutsButtonRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.setHideKeyboardShortcutsButtonRef = _this.setHideKeyboardShortcutsButtonRef.bind((0, _assertThisInitialized2["default"])(_this)); _this.handleFocus = _this.handleFocus.bind((0, _assertThisInitialized2["default"])(_this)); _this.onKeyDown = _this.onKeyDown.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var phrases = this.props.phrases; if (nextProps.phrases !== phrases) { this.keyboardShortcuts = getKeyboardShortcuts(nextProps.phrases); } }; _proto.componentDidUpdate = function componentDidUpdate() { this.handleFocus(); }; _proto.onKeyDown = function onKeyDown(e) { e.stopPropagation(); var closeKeyboardShortcutsPanel = this.props.closeKeyboardShortcutsPanel; // Because the close button is the only focusable element inside of the panel, this // amounts to a very basic focus trap. The user can exit the panel by "pressing" the // close button or hitting escape switch (e.key) { case 'Escape': closeKeyboardShortcutsPanel(); break; // do nothing - this allows the up and down arrows continue their // default behavior of scrolling the content of the Keyboard Shortcuts Panel // which is needed when only a single month is shown for instance. case 'ArrowUp': case 'ArrowDown': break; // completely block the rest of the keys that have functionality outside of this panel case 'Tab': case 'Home': case 'End': case 'PageUp': case 'PageDown': case 'ArrowLeft': case 'ArrowRight': e.preventDefault(); break; default: break; } }; _proto.onShowKeyboardShortcutsButtonClick = function onShowKeyboardShortcutsButtonClick() { var _this2 = this; var openKeyboardShortcutsPanel = this.props.openKeyboardShortcutsPanel; // we want to return focus to this button after closing the keyboard shortcuts panel openKeyboardShortcutsPanel(function () { _this2.showKeyboardShortcutsButton.focus(); }); }; _proto.setShowKeyboardShortcutsButtonRef = function setShowKeyboardShortcutsButtonRef(ref) { this.showKeyboardShortcutsButton = ref; }; _proto.setHideKeyboardShortcutsButtonRef = function setHideKeyboardShortcutsButtonRef(ref) { this.hideKeyboardShortcutsButton = ref; }; _proto.handleFocus = function handleFocus() { if (this.hideKeyboardShortcutsButton) { // automatically move focus into the dialog by moving // to the only interactive element, the hide button this.hideKeyboardShortcutsButton.focus(); } }; _proto.render = function render() { var _this$props = this.props, block = _this$props.block, buttonLocation = _this$props.buttonLocation, showKeyboardShortcutsPanel = _this$props.showKeyboardShortcutsPanel, closeKeyboardShortcutsPanel = _this$props.closeKeyboardShortcutsPanel, styles = _this$props.styles, phrases = _this$props.phrases, renderKeyboardShortcutsButton = _this$props.renderKeyboardShortcutsButton, renderKeyboardShortcutsPanel = _this$props.renderKeyboardShortcutsPanel; var toggleButtonText = showKeyboardShortcutsPanel ? phrases.hideKeyboardShortcutsPanel : phrases.showKeyboardShortcutsPanel; var bottomRight = buttonLocation === BOTTOM_RIGHT; var topRight = buttonLocation === TOP_RIGHT; var topLeft = buttonLocation === TOP_LEFT; return _react["default"].createElement("div", null, renderKeyboardShortcutsButton && renderKeyboardShortcutsButton({ // passing in context-specific props ref: this.setShowKeyboardShortcutsButtonRef, onClick: this.onShowKeyboardShortcutsButtonClick, ariaLabel: toggleButtonText }), !renderKeyboardShortcutsButton && _react["default"].createElement("button", (0, _extends2["default"])({ ref: this.setShowKeyboardShortcutsButtonRef }, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_buttonReset, styles.DayPickerKeyboardShortcuts_show, bottomRight && styles.DayPickerKeyboardShortcuts_show__bottomRight, topRight && styles.DayPickerKeyboardShortcuts_show__topRight, topLeft && styles.DayPickerKeyboardShortcuts_show__topLeft), { type: "button", "aria-label": toggleButtonText, onClick: this.onShowKeyboardShortcutsButtonClick, onMouseUp: function onMouseUp(e) { e.currentTarget.blur(); } }), _react["default"].createElement("span", (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_showSpan, bottomRight && styles.DayPickerKeyboardShortcuts_showSpan__bottomRight, topRight && styles.DayPickerKeyboardShortcuts_showSpan__topRight, topLeft && styles.DayPickerKeyboardShortcuts_showSpan__topLeft), "?")), showKeyboardShortcutsPanel && (renderKeyboardShortcutsPanel ? renderKeyboardShortcutsPanel({ closeButtonAriaLabel: phrases.hideKeyboardShortcutsPanel, keyboardShortcuts: this.keyboardShortcuts, onCloseButtonClick: closeKeyboardShortcutsPanel, onKeyDown: this.onKeyDown, title: phrases.keyboardShortcuts }) : _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_panel), { role: "dialog", "aria-labelledby": "DayPickerKeyboardShortcuts_title", "aria-describedby": "DayPickerKeyboardShortcuts_description" }), _react["default"].createElement("div", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_title), { id: "DayPickerKeyboardShortcuts_title" }), phrases.keyboardShortcuts), _react["default"].createElement("button", (0, _extends2["default"])({ ref: this.setHideKeyboardShortcutsButtonRef }, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_buttonReset, styles.DayPickerKeyboardShortcuts_close), { type: "button", tabIndex: "0", "aria-label": phrases.hideKeyboardShortcutsPanel, onClick: closeKeyboardShortcutsPanel, onKeyDown: this.onKeyDown }), _react["default"].createElement(_CloseButton["default"], (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_closeSvg))), _react["default"].createElement("ul", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.DayPickerKeyboardShortcuts_list), { id: "DayPickerKeyboardShortcuts_description" }), this.keyboardShortcuts.map(function (_ref2) { var unicode = _ref2.unicode, label = _ref2.label, action = _ref2.action; return _react["default"].createElement(_KeyboardShortcutRow["default"], { key: label, unicode: unicode, label: label, action: action, block: block }); }))))); }; return DayPickerKeyboardShortcuts; }(_react["default"].PureComponent || _react["default"].Component); DayPickerKeyboardShortcuts.propTypes = false ? 0 : {}; DayPickerKeyboardShortcuts.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref3) { var _ref3$reactDates = _ref3.reactDates, color = _ref3$reactDates.color, font = _ref3$reactDates.font, zIndex = _ref3$reactDates.zIndex; return { DayPickerKeyboardShortcuts_buttonReset: { background: 'none', border: 0, borderRadius: 0, color: 'inherit', font: 'inherit', lineHeight: 'normal', overflow: 'visible', padding: 0, cursor: 'pointer', fontSize: font.size, ':active': { outline: 'none' } }, DayPickerKeyboardShortcuts_show: { width: 33, height: 26, position: 'absolute', zIndex: zIndex + 2, '::before': { content: '""', display: 'block', position: 'absolute' } }, DayPickerKeyboardShortcuts_show__bottomRight: { bottom: 0, right: 0, '::before': { borderTop: '26px solid transparent', borderRight: "33px solid ".concat(color.core.primary), bottom: 0, right: 0 }, ':hover::before': { borderRight: "33px solid ".concat(color.core.primary_dark) } }, DayPickerKeyboardShortcuts_show__topRight: { top: 0, right: 0, '::before': { borderBottom: '26px solid transparent', borderRight: "33px solid ".concat(color.core.primary), top: 0, right: 0 }, ':hover::before': { borderRight: "33px solid ".concat(color.core.primary_dark) } }, DayPickerKeyboardShortcuts_show__topLeft: { top: 0, left: 0, '::before': { borderBottom: '26px solid transparent', borderLeft: "33px solid ".concat(color.core.primary), top: 0, left: 0 }, ':hover::before': { borderLeft: "33px solid ".concat(color.core.primary_dark) } }, DayPickerKeyboardShortcuts_showSpan: { color: color.core.white, position: 'absolute' }, DayPickerKeyboardShortcuts_showSpan__bottomRight: { bottom: 0, right: 5 }, DayPickerKeyboardShortcuts_showSpan__topRight: { top: 1, right: 5 }, DayPickerKeyboardShortcuts_showSpan__topLeft: { top: 1, left: 5 }, DayPickerKeyboardShortcuts_panel: { overflow: 'auto', background: color.background, border: "1px solid ".concat(color.core.border), borderRadius: 2, position: 'absolute', top: 0, bottom: 0, right: 0, left: 0, zIndex: zIndex + 2, padding: 22, margin: 33, textAlign: 'left' // TODO: investigate use of text-align throughout the library }, DayPickerKeyboardShortcuts_title: { fontSize: 16, fontWeight: 'bold', margin: 0 }, DayPickerKeyboardShortcuts_list: { listStyle: 'none', padding: 0, fontSize: font.size }, DayPickerKeyboardShortcuts_close: { position: 'absolute', right: 22, top: 22, zIndex: zIndex + 2, ':active': { outline: 'none' } }, DayPickerKeyboardShortcuts_closeSvg: { height: 15, width: 15, fill: color.core.grayLighter, ':hover': { fill: color.core.grayLight }, ':focus': { fill: color.core.grayLight } } }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(DayPickerKeyboardShortcuts); exports["default"] = _default; /***/ }), /***/ 3768: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(8669)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _noflip = _interopRequireDefault(__webpack_require__(9780)); var _LeftArrow = _interopRequireDefault(__webpack_require__(2300)); var _RightArrow = _interopRequireDefault(__webpack_require__(7360)); var _ChevronUp = _interopRequireDefault(__webpack_require__(7287)); var _ChevronDown = _interopRequireDefault(__webpack_require__(8294)); var _NavPositionShape = _interopRequireDefault(__webpack_require__(3476)); var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(2302)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { disablePrev: false, disableNext: false, inlineStyles: null, isRTL: false, navPosition: _constants.NAV_POSITION_TOP, navPrev: null, navNext: null, orientation: _constants.HORIZONTAL_ORIENTATION, onPrevMonthClick: function onPrevMonthClick() {}, onNextMonthClick: function onNextMonthClick() {}, // internationalization phrases: _defaultPhrases.DayPickerNavigationPhrases, renderNavPrevButton: null, renderNavNextButton: null, showNavPrevButton: true, showNavNextButton: true }; var DayPickerNavigation = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(DayPickerNavigation, _ref); function DayPickerNavigation() { return _ref.apply(this, arguments) || this; } var _proto = DayPickerNavigation.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; _proto.render = function render() { var _this$props = this.props, inlineStyles = _this$props.inlineStyles, isRTL = _this$props.isRTL, disablePrev = _this$props.disablePrev, disableNext = _this$props.disableNext, navPosition = _this$props.navPosition, navPrev = _this$props.navPrev, navNext = _this$props.navNext, onPrevMonthClick = _this$props.onPrevMonthClick, onNextMonthClick = _this$props.onNextMonthClick, orientation = _this$props.orientation, phrases = _this$props.phrases, renderNavPrevButton = _this$props.renderNavPrevButton, renderNavNextButton = _this$props.renderNavNextButton, showNavPrevButton = _this$props.showNavPrevButton, showNavNextButton = _this$props.showNavNextButton, styles = _this$props.styles; if (!showNavNextButton && !showNavPrevButton) { return null; } var isHorizontal = orientation === _constants.HORIZONTAL_ORIENTATION; var isVertical = orientation !== _constants.HORIZONTAL_ORIENTATION; var isVerticalScrollable = orientation === _constants.VERTICAL_SCROLLABLE; var isBottomNavPosition = navPosition === _constants.NAV_POSITION_BOTTOM; var hasInlineStyles = !!inlineStyles; var navPrevIcon = navPrev; var navNextIcon = navNext; var isDefaultNavPrev = false; var isDefaultNavNext = false; var navPrevTabIndex = {}; var navNextTabIndex = {}; if (!navPrevIcon && !renderNavPrevButton && showNavPrevButton) { navPrevTabIndex = { tabIndex: '0' }; isDefaultNavPrev = true; var Icon = isVertical ? _ChevronUp["default"] : _LeftArrow["default"]; if (isRTL && !isVertical) { Icon = _RightArrow["default"]; } navPrevIcon = _react["default"].createElement(Icon, (0, _reactWithStyles.css)(isHorizontal && styles.DayPickerNavigation_svg__horizontal, isVertical && styles.DayPickerNavigation_svg__vertical, disablePrev && styles.DayPickerNavigation_svg__disabled)); } if (!navNextIcon && !renderNavNextButton && showNavNextButton) { navNextTabIndex = { tabIndex: '0' }; isDefaultNavNext = true; var _Icon = isVertical ? _ChevronDown["default"] : _RightArrow["default"]; if (isRTL && !isVertical) { _Icon = _LeftArrow["default"]; } navNextIcon = _react["default"].createElement(_Icon, (0, _reactWithStyles.css)(isHorizontal && styles.DayPickerNavigation_svg__horizontal, isVertical && styles.DayPickerNavigation_svg__vertical, disableNext && styles.DayPickerNavigation_svg__disabled)); } var isDefaultNav = isDefaultNavNext || isDefaultNavPrev; return _react["default"].createElement("div", _reactWithStyles.css.apply(void 0, [styles.DayPickerNavigation, isHorizontal && styles.DayPickerNavigation__horizontal].concat((0, _toConsumableArray2["default"])(isVertical ? [styles.DayPickerNavigation__vertical, isDefaultNav && styles.DayPickerNavigation__verticalDefault] : []), (0, _toConsumableArray2["default"])(isVerticalScrollable ? [styles.DayPickerNavigation__verticalScrollable, isDefaultNav && styles.DayPickerNavigation__verticalScrollableDefault, showNavPrevButton && styles.DayPickerNavigation__verticalScrollable_prevNav] : []), (0, _toConsumableArray2["default"])(isBottomNavPosition ? [styles.DayPickerNavigation__bottom, isDefaultNav && styles.DayPickerNavigation__bottomDefault] : []), [hasInlineStyles && inlineStyles])), showNavPrevButton && (renderNavPrevButton ? renderNavPrevButton({ ariaLabel: phrases.jumpToPrevMonth, disabled: disablePrev, onClick: disablePrev ? undefined : onPrevMonthClick, onKeyUp: disablePrev ? undefined : function (e) { var key = e.key; if (key === 'Enter' || key === ' ') { onPrevMonthClick(e); } }, onMouseUp: disablePrev ? undefined : function (e) { e.currentTarget.blur(); } }) : _react["default"].createElement("div", (0, _extends2["default"])({ // eslint-disable-line jsx-a11y/interactive-supports-focus role: "button" }, navPrevTabIndex, _reactWithStyles.css.apply(void 0, [styles.DayPickerNavigation_button, isDefaultNavPrev && styles.DayPickerNavigation_button__default, disablePrev && styles.DayPickerNavigation_button__disabled].concat((0, _toConsumableArray2["default"])(isHorizontal ? [styles.DayPickerNavigation_button__horizontal].concat((0, _toConsumableArray2["default"])(isDefaultNavPrev ? [styles.DayPickerNavigation_button__horizontalDefault, isBottomNavPosition && styles.DayPickerNavigation_bottomButton__horizontalDefault, !isRTL && styles.DayPickerNavigation_leftButton__horizontalDefault, isRTL && styles.DayPickerNavigation_rightButton__horizontalDefault] : [])) : []), (0, _toConsumableArray2["default"])(isVertical ? [styles.DayPickerNavigation_button__vertical].concat((0, _toConsumableArray2["default"])(isDefaultNavPrev ? [styles.DayPickerNavigation_button__verticalDefault, styles.DayPickerNavigation_prevButton__verticalDefault, isVerticalScrollable && styles.DayPickerNavigation_prevButton__verticalScrollableDefault] : [])) : []))), { "aria-disabled": disablePrev ? true : undefined, "aria-label": phrases.jumpToPrevMonth, onClick: disablePrev ? undefined : onPrevMonthClick, onKeyUp: disablePrev ? undefined : function (e) { var key = e.key; if (key === 'Enter' || key === ' ') { onPrevMonthClick(e); } }, onMouseUp: disablePrev ? undefined : function (e) { e.currentTarget.blur(); } }), navPrevIcon)), showNavNextButton && (renderNavNextButton ? renderNavNextButton({ ariaLabel: phrases.jumpToNextMonth, disabled: disableNext, onClick: disableNext ? undefined : onNextMonthClick, onKeyUp: disableNext ? undefined : function (e) { var key = e.key; if (key === 'Enter' || key === ' ') { onNextMonthClick(e); } }, onMouseUp: disableNext ? undefined : function (e) { e.currentTarget.blur(); } }) : _react["default"].createElement("div", (0, _extends2["default"])({ // eslint-disable-line jsx-a11y/interactive-supports-focus role: "button" }, navNextTabIndex, _reactWithStyles.css.apply(void 0, [styles.DayPickerNavigation_button, isDefaultNavNext && styles.DayPickerNavigation_button__default, disableNext && styles.DayPickerNavigation_button__disabled].concat((0, _toConsumableArray2["default"])(isHorizontal ? [styles.DayPickerNavigation_button__horizontal].concat((0, _toConsumableArray2["default"])(isDefaultNavNext ? [styles.DayPickerNavigation_button__horizontalDefault, isBottomNavPosition && styles.DayPickerNavigation_bottomButton__horizontalDefault, isRTL && styles.DayPickerNavigation_leftButton__horizontalDefault, !isRTL && styles.DayPickerNavigation_rightButton__horizontalDefault] : [])) : []), (0, _toConsumableArray2["default"])(isVertical ? [styles.DayPickerNavigation_button__vertical].concat((0, _toConsumableArray2["default"])(isDefaultNavNext ? [styles.DayPickerNavigation_button__verticalDefault, styles.DayPickerNavigation_nextButton__verticalDefault, isVerticalScrollable && styles.DayPickerNavigation_nextButton__verticalScrollableDefault] : [])) : []))), { "aria-disabled": disableNext ? true : undefined, "aria-label": phrases.jumpToNextMonth, onClick: disableNext ? undefined : onNextMonthClick, onKeyUp: disableNext ? undefined : function (e) { var key = e.key; if (key === 'Enter' || key === ' ') { onNextMonthClick(e); } }, onMouseUp: disableNext ? undefined : function (e) { e.currentTarget.blur(); } }), navNextIcon))); }; return DayPickerNavigation; }(_react["default"].PureComponent || _react["default"].Component); DayPickerNavigation.propTypes = false ? 0 : {}; DayPickerNavigation.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { var _ref2$reactDates = _ref2.reactDates, color = _ref2$reactDates.color, zIndex = _ref2$reactDates.zIndex; return { DayPickerNavigation: { position: 'relative', zIndex: zIndex + 2 }, DayPickerNavigation__horizontal: { height: 0 }, DayPickerNavigation__vertical: {}, DayPickerNavigation__verticalScrollable: {}, DayPickerNavigation__verticalScrollable_prevNav: { zIndex: zIndex + 1 // zIndex + 2 causes the button to show on top of the day of week headers }, DayPickerNavigation__verticalDefault: { position: 'absolute', width: '100%', height: 52, bottom: 0, left: (0, _noflip["default"])(0) }, DayPickerNavigation__verticalScrollableDefault: { position: 'relative' }, DayPickerNavigation__bottom: { height: 'auto' }, DayPickerNavigation__bottomDefault: { display: 'flex', justifyContent: 'space-between' }, DayPickerNavigation_button: { cursor: 'pointer', userSelect: 'none', border: 0, padding: 0, margin: 0 }, DayPickerNavigation_button__default: { border: "1px solid ".concat(color.core.borderLight), backgroundColor: color.background, color: color.placeholderText, ':focus': { border: "1px solid ".concat(color.core.borderMedium) }, ':hover': { border: "1px solid ".concat(color.core.borderMedium) }, ':active': { background: color.backgroundDark } }, DayPickerNavigation_button__disabled: { cursor: 'default', border: "1px solid ".concat(color.disabled), ':focus': { border: "1px solid ".concat(color.disabled) }, ':hover': { border: "1px solid ".concat(color.disabled) }, ':active': { background: 'none' } }, DayPickerNavigation_button__horizontal: {}, DayPickerNavigation_button__horizontalDefault: { position: 'absolute', top: 18, lineHeight: 0.78, borderRadius: 3, padding: '6px 9px' }, DayPickerNavigation_bottomButton__horizontalDefault: { position: 'static', marginLeft: 22, marginRight: 22, marginBottom: 30, marginTop: -10 }, DayPickerNavigation_leftButton__horizontalDefault: { left: (0, _noflip["default"])(22) }, DayPickerNavigation_rightButton__horizontalDefault: { right: (0, _noflip["default"])(22) }, DayPickerNavigation_button__vertical: {}, DayPickerNavigation_button__verticalDefault: { padding: 5, background: color.background, boxShadow: (0, _noflip["default"])('0 0 5px 2px rgba(0, 0, 0, 0.1)'), position: 'relative', display: 'inline-block', textAlign: 'center', height: '100%', width: '50%' }, DayPickerNavigation_prevButton__verticalDefault: {}, DayPickerNavigation_nextButton__verticalDefault: { borderLeft: (0, _noflip["default"])(0) }, DayPickerNavigation_nextButton__verticalScrollableDefault: { width: '100%' }, DayPickerNavigation_prevButton__verticalScrollableDefault: { width: '100%' }, DayPickerNavigation_svg__horizontal: { height: 19, width: 19, fill: color.core.grayLight, display: 'block' }, DayPickerNavigation_svg__vertical: { height: 42, width: 42, fill: color.text }, DayPickerNavigation_svg__disabled: { fill: color.disabled } }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(DayPickerNavigation); exports["default"] = _default; /***/ }), /***/ 4916: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; var _interopRequireDefault = __webpack_require__(9736); __webpack_unused_export__ = ({ value: true }); exports.Z = void 0; var _enzymeShallowEqual = _interopRequireDefault(__webpack_require__(1980)); var _slicedToArray2 = _interopRequireDefault(__webpack_require__(6739)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(9168)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _reactMomentProptypes = _interopRequireDefault(__webpack_require__(6150)); var _airbnbPropTypes = __webpack_require__(4882); var _moment = _interopRequireDefault(__webpack_require__(6292)); var _object = _interopRequireDefault(__webpack_require__(5861)); var _isTouchDevice = _interopRequireDefault(__webpack_require__(5834)); var _defaultPhrases = __webpack_require__(1764); var _getPhrasePropTypes = _interopRequireDefault(__webpack_require__(3312)); var _isSameDay = _interopRequireDefault(__webpack_require__(2455)); var _isAfterDay = _interopRequireDefault(__webpack_require__(9720)); var _getVisibleDays = _interopRequireDefault(__webpack_require__(9867)); var _toISODateString = _interopRequireDefault(__webpack_require__(6135)); var _modifiers = __webpack_require__(1887); var _ScrollableOrientationShape = _interopRequireDefault(__webpack_require__(2302)); var _DayOfWeekShape = _interopRequireDefault(__webpack_require__(135)); var _CalendarInfoPositionShape = _interopRequireDefault(__webpack_require__(5547)); var _NavPositionShape = _interopRequireDefault(__webpack_require__(3476)); var _constants = __webpack_require__(5724); var _DayPicker = _interopRequireDefault(__webpack_require__(5618)); var _getPooledMoment = _interopRequireDefault(__webpack_require__(5550)); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { date: undefined, // TODO: use null onDateChange: function onDateChange() {}, focused: false, onFocusChange: function onFocusChange() {}, onClose: function onClose() {}, keepOpenOnDateSelect: false, isOutsideRange: function isOutsideRange() {}, isDayBlocked: function isDayBlocked() {}, isDayHighlighted: function isDayHighlighted() {}, // DayPicker props renderMonthText: null, renderWeekHeaderElement: null, enableOutsideDays: false, numberOfMonths: 1, orientation: _constants.HORIZONTAL_ORIENTATION, withPortal: false, hideKeyboardShortcutsPanel: false, initialVisibleMonth: null, firstDayOfWeek: null, daySize: _constants.DAY_SIZE, verticalHeight: null, noBorder: false, verticalBorderSpacing: undefined, transitionDuration: undefined, horizontalMonthPadding: 13, dayPickerNavigationInlineStyles: null, navPosition: _constants.NAV_POSITION_TOP, navPrev: null, navNext: null, renderNavPrevButton: null, renderNavNextButton: null, noNavButtons: false, noNavNextButton: false, noNavPrevButton: false, onPrevMonthClick: function onPrevMonthClick() {}, onNextMonthClick: function onNextMonthClick() {}, onOutsideClick: function onOutsideClick() {}, renderCalendarDay: undefined, renderDayContents: null, renderCalendarInfo: null, renderMonthElement: null, calendarInfoPosition: _constants.INFO_POSITION_BOTTOM, // accessibility onBlur: function onBlur() {}, isFocused: false, showKeyboardShortcuts: false, onTab: function onTab() {}, onShiftTab: function onShiftTab() {}, // i18n monthFormat: 'MMMM YYYY', weekDayFormat: 'dd', phrases: _defaultPhrases.DayPickerPhrases, dayAriaLabelFormat: undefined, isRTL: false }; var DayPickerSingleDateController = /*#__PURE__*/ function (_ref) { (0, _inheritsLoose2["default"])(DayPickerSingleDateController, _ref); var _proto = DayPickerSingleDateController.prototype; _proto[!_react["default"].PureComponent && "shouldComponentUpdate"] = function (nextProps, nextState) { return !(0, _enzymeShallowEqual["default"])(this.props, nextProps) || !(0, _enzymeShallowEqual["default"])(this.state, nextState); }; function DayPickerSingleDateController(props) { var _this; _this = _ref.call(this, props) || this; _this.isTouchDevice = false; _this.today = (0, _moment["default"])(); _this.modifiers = { today: function today(day) { return _this.isToday(day); }, blocked: function blocked(day) { return _this.isBlocked(day); }, 'blocked-calendar': function blockedCalendar(day) { return props.isDayBlocked(day); }, 'blocked-out-of-range': function blockedOutOfRange(day) { return props.isOutsideRange(day); }, 'highlighted-calendar': function highlightedCalendar(day) { return props.isDayHighlighted(day); }, valid: function valid(day) { return !_this.isBlocked(day); }, hovered: function hovered(day) { return _this.isHovered(day); }, selected: function selected(day) { return _this.isSelected(day); }, 'first-day-of-week': function firstDayOfWeek(day) { return _this.isFirstDayOfWeek(day); }, 'last-day-of-week': function lastDayOfWeek(day) { return _this.isLastDayOfWeek(day); } }; var _this$getStateForNewM = _this.getStateForNewMonth(props), currentMonth = _this$getStateForNewM.currentMonth, visibleDays = _this$getStateForNewM.visibleDays; _this.state = { hoverDate: null, currentMonth: currentMonth, visibleDays: visibleDays }; _this.onDayMouseEnter = _this.onDayMouseEnter.bind((0, _assertThisInitialized2["default"])(_this)); _this.onDayMouseLeave = _this.onDayMouseLeave.bind((0, _assertThisInitialized2["default"])(_this)); _this.onDayClick = _this.onDayClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.onPrevMonthClick = _this.onPrevMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.onNextMonthClick = _this.onNextMonthClick.bind((0, _assertThisInitialized2["default"])(_this)); _this.onMonthChange = _this.onMonthChange.bind((0, _assertThisInitialized2["default"])(_this)); _this.onYearChange = _this.onYearChange.bind((0, _assertThisInitialized2["default"])(_this)); _this.onGetNextScrollableMonths = _this.onGetNextScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); _this.onGetPrevScrollableMonths = _this.onGetPrevScrollableMonths.bind((0, _assertThisInitialized2["default"])(_this)); _this.getFirstFocusableDay = _this.getFirstFocusableDay.bind((0, _assertThisInitialized2["default"])(_this)); return _this; } _proto.componentDidMount = function componentDidMount() { this.isTouchDevice = (0, _isTouchDevice["default"])(); }; _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this2 = this; var date = nextProps.date, focused = nextProps.focused, isOutsideRange = nextProps.isOutsideRange, isDayBlocked = nextProps.isDayBlocked, isDayHighlighted = nextProps.isDayHighlighted, initialVisibleMonth = nextProps.initialVisibleMonth, numberOfMonths = nextProps.numberOfMonths, enableOutsideDays = nextProps.enableOutsideDays; var _this$props = this.props, prevIsOutsideRange = _this$props.isOutsideRange, prevIsDayBlocked = _this$props.isDayBlocked, prevIsDayHighlighted = _this$props.isDayHighlighted, prevNumberOfMonths = _this$props.numberOfMonths, prevEnableOutsideDays = _this$props.enableOutsideDays, prevInitialVisibleMonth = _this$props.initialVisibleMonth, prevFocused = _this$props.focused, prevDate = _this$props.date; var visibleDays = this.state.visibleDays; var recomputeOutsideRange = false; var recomputeDayBlocked = false; var recomputeDayHighlighted = false; if (isOutsideRange !== prevIsOutsideRange) { this.modifiers['blocked-out-of-range'] = function (day) { return isOutsideRange(day); }; recomputeOutsideRange = true; } if (isDayBlocked !== prevIsDayBlocked) { this.modifiers['blocked-calendar'] = function (day) { return isDayBlocked(day); }; recomputeDayBlocked = true; } if (isDayHighlighted !== prevIsDayHighlighted) { this.modifiers['highlighted-calendar'] = function (day) { return isDayHighlighted(day); }; recomputeDayHighlighted = true; } var recomputePropModifiers = recomputeOutsideRange || recomputeDayBlocked || recomputeDayHighlighted; if (numberOfMonths !== prevNumberOfMonths || enableOutsideDays !== prevEnableOutsideDays || initialVisibleMonth !== prevInitialVisibleMonth && !prevFocused && focused) { var newMonthState = this.getStateForNewMonth(nextProps); var currentMonth = newMonthState.currentMonth; visibleDays = newMonthState.visibleDays; this.setState({ currentMonth: currentMonth, visibleDays: visibleDays }); } var didDateChange = date !== prevDate; var didFocusChange = focused !== prevFocused; var modifiers = {}; if (didDateChange) { modifiers = this.deleteModifier(modifiers, prevDate, 'selected'); modifiers = this.addModifier(modifiers, date, 'selected'); } if (didFocusChange || recomputePropModifiers) { (0, _object["default"])(visibleDays).forEach(function (days) { Object.keys(days).forEach(function (day) { var momentObj = (0, _getPooledMoment["default"])(day); if (_this2.isBlocked(momentObj)) { modifiers = _this2.addModifier(modifiers, momentObj, 'blocked'); } else { modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked'); } if (didFocusChange || recomputeOutsideRange) { if (isOutsideRange(momentObj)) { modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-out-of-range'); } else { modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-out-of-range'); } } if (didFocusChange || recomputeDayBlocked) { if (isDayBlocked(momentObj)) { modifiers = _this2.addModifier(modifiers, momentObj, 'blocked-calendar'); } else { modifiers = _this2.deleteModifier(modifiers, momentObj, 'blocked-calendar'); } } if (didFocusChange || recomputeDayHighlighted) { if (isDayHighlighted(momentObj)) { modifiers = _this2.addModifier(modifiers, momentObj, 'highlighted-calendar'); } else { modifiers = _this2.deleteModifier(modifiers, momentObj, 'highlighted-calendar'); } } }); }); } var today = (0, _moment["default"])(); if (!(0, _isSameDay["default"])(this.today, today)) { modifiers = this.deleteModifier(modifiers, this.today, 'today'); modifiers = this.addModifier(modifiers, today, 'today'); this.today = today; } if (Object.keys(modifiers).length > 0) { this.setState({ visibleDays: _objectSpread({}, visibleDays, {}, modifiers) }); } }; _proto.componentWillUpdate = function componentWillUpdate() { this.today = (0, _moment["default"])(); }; _proto.onDayClick = function onDayClick(day, e) { if (e) e.preventDefault(); if (this.isBlocked(day)) return; var _this$props2 = this.props, onDateChange = _this$props2.onDateChange, keepOpenOnDateSelect = _this$props2.keepOpenOnDateSelect, onFocusChange = _this$props2.onFocusChange, onClose = _this$props2.onClose; onDateChange(day); if (!keepOpenOnDateSelect) { onFocusChange({ focused: false }); onClose({ date: day }); } }; _proto.onDayMouseEnter = function onDayMouseEnter(day) { if (this.isTouchDevice) return; var _this$state = this.state, hoverDate = _this$state.hoverDate, visibleDays = _this$state.visibleDays; var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); modifiers = this.addModifier(modifiers, day, 'hovered'); this.setState({ hoverDate: day, visibleDays: _objectSpread({}, visibleDays, {}, modifiers) }); }; _proto.onDayMouseLeave = function onDayMouseLeave() { var _this$state2 = this.state, hoverDate = _this$state2.hoverDate, visibleDays = _this$state2.visibleDays; if (this.isTouchDevice || !hoverDate) return; var modifiers = this.deleteModifier({}, hoverDate, 'hovered'); this.setState({ hoverDate: null, visibleDays: _objectSpread({}, visibleDays, {}, modifiers) }); }; _proto.onPrevMonthClick = function onPrevMonthClick() { var _this$props3 = this.props, onPrevMonthClick = _this$props3.onPrevMonthClick, numberOfMonths = _this$props3.numberOfMonths, enableOutsideDays = _this$props3.enableOutsideDays; var _this$state3 = this.state, currentMonth = _this$state3.currentMonth, visibleDays = _this$state3.visibleDays; var newVisibleDays = {}; Object.keys(visibleDays).sort().slice(0, numberOfMonths + 1).forEach(function (month) { newVisibleDays[month] = visibleDays[month]; }); var prevMonth = currentMonth.clone().subtract(1, 'month'); var prevMonthVisibleDays = (0, _getVisibleDays["default"])(prevMonth, 1, enableOutsideDays); this.setState({ currentMonth: prevMonth, visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(prevMonthVisibleDays)) }, function () { onPrevMonthClick(prevMonth.clone()); }); }; _proto.onNextMonthClick = function onNextMonthClick() { var _this$props4 = this.props, onNextMonthClick = _this$props4.onNextMonthClick, numberOfMonths = _this$props4.numberOfMonths, enableOutsideDays = _this$props4.enableOutsideDays; var _this$state4 = this.state, currentMonth = _this$state4.currentMonth, visibleDays = _this$state4.visibleDays; var newVisibleDays = {}; Object.keys(visibleDays).sort().slice(1).forEach(function (month) { newVisibleDays[month] = visibleDays[month]; }); var nextMonth = currentMonth.clone().add(numberOfMonths, 'month'); var nextMonthVisibleDays = (0, _getVisibleDays["default"])(nextMonth, 1, enableOutsideDays); var newCurrentMonth = currentMonth.clone().add(1, 'month'); this.setState({ currentMonth: newCurrentMonth, visibleDays: _objectSpread({}, newVisibleDays, {}, this.getModifiers(nextMonthVisibleDays)) }, function () { onNextMonthClick(newCurrentMonth.clone()); }); }; _proto.onMonthChange = function onMonthChange(newMonth) { var _this$props5 = this.props, numberOfMonths = _this$props5.numberOfMonths, enableOutsideDays = _this$props5.enableOutsideDays, orientation = _this$props5.orientation; var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); this.setState({ currentMonth: newMonth.clone(), visibleDays: this.getModifiers(newVisibleDays) }); }; _proto.onYearChange = function onYearChange(newMonth) { var _this$props6 = this.props, numberOfMonths = _this$props6.numberOfMonths, enableOutsideDays = _this$props6.enableOutsideDays, orientation = _this$props6.orientation; var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; var newVisibleDays = (0, _getVisibleDays["default"])(newMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths); this.setState({ currentMonth: newMonth.clone(), visibleDays: this.getModifiers(newVisibleDays) }); }; _proto.onGetNextScrollableMonths = function onGetNextScrollableMonths() { var _this$props7 = this.props, numberOfMonths = _this$props7.numberOfMonths, enableOutsideDays = _this$props7.enableOutsideDays; var _this$state5 = this.state, currentMonth = _this$state5.currentMonth, visibleDays = _this$state5.visibleDays; var numberOfVisibleMonths = Object.keys(visibleDays).length; var nextMonth = currentMonth.clone().add(numberOfVisibleMonths, 'month'); var newVisibleDays = (0, _getVisibleDays["default"])(nextMonth, numberOfMonths, enableOutsideDays, true); this.setState({ visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) }); }; _proto.onGetPrevScrollableMonths = function onGetPrevScrollableMonths() { var _this$props8 = this.props, numberOfMonths = _this$props8.numberOfMonths, enableOutsideDays = _this$props8.enableOutsideDays; var _this$state6 = this.state, currentMonth = _this$state6.currentMonth, visibleDays = _this$state6.visibleDays; var firstPreviousMonth = currentMonth.clone().subtract(numberOfMonths, 'month'); var newVisibleDays = (0, _getVisibleDays["default"])(firstPreviousMonth, numberOfMonths, enableOutsideDays, true); this.setState({ currentMonth: firstPreviousMonth.clone(), visibleDays: _objectSpread({}, visibleDays, {}, this.getModifiers(newVisibleDays)) }); }; _proto.getFirstFocusableDay = function getFirstFocusableDay(newMonth) { var _this3 = this; var _this$props9 = this.props, date = _this$props9.date, numberOfMonths = _this$props9.numberOfMonths; var focusedDate = newMonth.clone().startOf('month'); if (date) { focusedDate = date.clone(); } if (this.isBlocked(focusedDate)) { var days = []; var lastVisibleDay = newMonth.clone().add(numberOfMonths - 1, 'months').endOf('month'); var currentDay = focusedDate.clone(); while (!(0, _isAfterDay["default"])(currentDay, lastVisibleDay)) { currentDay = currentDay.clone().add(1, 'day'); days.push(currentDay); } var viableDays = days.filter(function (day) { return !_this3.isBlocked(day) && (0, _isAfterDay["default"])(day, focusedDate); }); if (viableDays.length > 0) { var _viableDays = (0, _slicedToArray2["default"])(viableDays, 1); focusedDate = _viableDays[0]; } } return focusedDate; }; _proto.getModifiers = function getModifiers(visibleDays) { var _this4 = this; var modifiers = {}; Object.keys(visibleDays).forEach(function (month) { modifiers[month] = {}; visibleDays[month].forEach(function (day) { modifiers[month][(0, _toISODateString["default"])(day)] = _this4.getModifiersForDay(day); }); }); return modifiers; }; _proto.getModifiersForDay = function getModifiersForDay(day) { var _this5 = this; return new Set(Object.keys(this.modifiers).filter(function (modifier) { return _this5.modifiers[modifier](day); })); }; _proto.getStateForNewMonth = function getStateForNewMonth(nextProps) { var _this6 = this; var initialVisibleMonth = nextProps.initialVisibleMonth, date = nextProps.date, numberOfMonths = nextProps.numberOfMonths, orientation = nextProps.orientation, enableOutsideDays = nextProps.enableOutsideDays; var initialVisibleMonthThunk = initialVisibleMonth || (date ? function () { return date; } : function () { return _this6.today; }); var currentMonth = initialVisibleMonthThunk(); var withoutTransitionMonths = orientation === _constants.VERTICAL_SCROLLABLE; var visibleDays = this.getModifiers((0, _getVisibleDays["default"])(currentMonth, numberOfMonths, enableOutsideDays, withoutTransitionMonths)); return { currentMonth: currentMonth, visibleDays: visibleDays }; }; _proto.addModifier = function addModifier(updatedDays, day, modifier) { return (0, _modifiers.addModifier)(updatedDays, day, modifier, this.props, this.state); }; _proto.deleteModifier = function deleteModifier(updatedDays, day, modifier) { return (0, _modifiers.deleteModifier)(updatedDays, day, modifier, this.props, this.state); }; _proto.isBlocked = function isBlocked(day) { var _this$props10 = this.props, isDayBlocked = _this$props10.isDayBlocked, isOutsideRange = _this$props10.isOutsideRange; return isDayBlocked(day) || isOutsideRange(day); }; _proto.isHovered = function isHovered(day) { var _ref2 = this.state || {}, hoverDate = _ref2.hoverDate; return (0, _isSameDay["default"])(day, hoverDate); }; _proto.isSelected = function isSelected(day) { var date = this.props.date; return (0, _isSameDay["default"])(day, date); }; _proto.isToday = function isToday(day) { return (0, _isSameDay["default"])(day, this.today); }; _proto.isFirstDayOfWeek = function isFirstDayOfWeek(day) { var firstDayOfWeek = this.props.firstDayOfWeek; return day.day() === (firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()); }; _proto.isLastDayOfWeek = function isLastDayOfWeek(day) { var firstDayOfWeek = this.props.firstDayOfWeek; return day.day() === ((firstDayOfWeek || _moment["default"].localeData().firstDayOfWeek()) + 6) % 7; }; _proto.render = function render() { var _this$props11 = this.props, numberOfMonths = _this$props11.numberOfMonths, orientation = _this$props11.orientation, monthFormat = _this$props11.monthFormat, renderMonthText = _this$props11.renderMonthText, renderWeekHeaderElement = _this$props11.renderWeekHeaderElement, dayPickerNavigationInlineStyles = _this$props11.dayPickerNavigationInlineStyles, navPosition = _this$props11.navPosition, navPrev = _this$props11.navPrev, navNext = _this$props11.navNext, renderNavPrevButton = _this$props11.renderNavPrevButton, renderNavNextButton = _this$props11.renderNavNextButton, noNavButtons = _this$props11.noNavButtons, noNavPrevButton = _this$props11.noNavPrevButton, noNavNextButton = _this$props11.noNavNextButton, onOutsideClick = _this$props11.onOutsideClick, onShiftTab = _this$props11.onShiftTab, onTab = _this$props11.onTab, withPortal = _this$props11.withPortal, focused = _this$props11.focused, enableOutsideDays = _this$props11.enableOutsideDays, hideKeyboardShortcutsPanel = _this$props11.hideKeyboardShortcutsPanel, daySize = _this$props11.daySize, firstDayOfWeek = _this$props11.firstDayOfWeek, renderCalendarDay = _this$props11.renderCalendarDay, renderDayContents = _this$props11.renderDayContents, renderCalendarInfo = _this$props11.renderCalendarInfo, renderMonthElement = _this$props11.renderMonthElement, calendarInfoPosition = _this$props11.calendarInfoPosition, isFocused = _this$props11.isFocused, isRTL = _this$props11.isRTL, phrases = _this$props11.phrases, dayAriaLabelFormat = _this$props11.dayAriaLabelFormat, onBlur = _this$props11.onBlur, showKeyboardShortcuts = _this$props11.showKeyboardShortcuts, weekDayFormat = _this$props11.weekDayFormat, verticalHeight = _this$props11.verticalHeight, noBorder = _this$props11.noBorder, transitionDuration = _this$props11.transitionDuration, verticalBorderSpacing = _this$props11.verticalBorderSpacing, horizontalMonthPadding = _this$props11.horizontalMonthPadding; var _this$state7 = this.state, currentMonth = _this$state7.currentMonth, visibleDays = _this$state7.visibleDays; return _react["default"].createElement(_DayPicker["default"], { orientation: orientation, enableOutsideDays: enableOutsideDays, modifiers: visibleDays, numberOfMonths: numberOfMonths, onDayClick: this.onDayClick, onDayMouseEnter: this.onDayMouseEnter, onDayMouseLeave: this.onDayMouseLeave, onPrevMonthClick: this.onPrevMonthClick, onNextMonthClick: this.onNextMonthClick, onMonthChange: this.onMonthChange, onYearChange: this.onYearChange, onGetNextScrollableMonths: this.onGetNextScrollableMonths, onGetPrevScrollableMonths: this.onGetPrevScrollableMonths, monthFormat: monthFormat, withPortal: withPortal, hidden: !focused, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, initialVisibleMonth: function initialVisibleMonth() { return currentMonth; }, firstDayOfWeek: firstDayOfWeek, onOutsideClick: onOutsideClick, dayPickerNavigationInlineStyles: dayPickerNavigationInlineStyles, navPosition: navPosition, navPrev: navPrev, navNext: navNext, renderNavPrevButton: renderNavPrevButton, renderNavNextButton: renderNavNextButton, noNavButtons: noNavButtons, noNavNextButton: noNavNextButton, noNavPrevButton: noNavPrevButton, renderMonthText: renderMonthText, renderWeekHeaderElement: renderWeekHeaderElement, renderCalendarDay: renderCalendarDay, renderDayContents: renderDayContents, renderCalendarInfo: renderCalendarInfo, renderMonthElement: renderMonthElement, calendarInfoPosition: calendarInfoPosition, isFocused: isFocused, getFirstFocusableDay: this.getFirstFocusableDay, onBlur: onBlur, onTab: onTab, onShiftTab: onShiftTab, phrases: phrases, daySize: daySize, isRTL: isRTL, showKeyboardShortcuts: showKeyboardShortcuts, weekDayFormat: weekDayFormat, dayAriaLabelFormat: dayAriaLabelFormat, verticalHeight: verticalHeight, noBorder: noBorder, transitionDuration: transitionDuration, verticalBorderSpacing: verticalBorderSpacing, horizontalMonthPadding: horizontalMonthPadding }); }; return DayPickerSingleDateController; }(_react["default"].PureComponent || _react["default"].Component); exports.Z = DayPickerSingleDateController; DayPickerSingleDateController.propTypes = false ? 0 : {}; DayPickerSingleDateController.defaultProps = defaultProps; /***/ }), /***/ 1726: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var _reactWithStyles = __webpack_require__(7928); 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; } 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) { (0, _defineProperty2["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; } var propTypes = false ? 0 : {}; var defaultProps = { block: false }; function KeyboardShortcutRow(_ref) { var unicode = _ref.unicode, label = _ref.label, action = _ref.action, block = _ref.block, styles = _ref.styles; return _react["default"].createElement("li", (0, _reactWithStyles.css)(styles.KeyboardShortcutRow, block && styles.KeyboardShortcutRow__block), _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_keyContainer, block && styles.KeyboardShortcutRow_keyContainer__block), _react["default"].createElement("span", (0, _extends2["default"])({}, (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_key), { role: "img", "aria-label": "".concat(label, ",") // add comma so screen readers will pause before reading action }), unicode)), _react["default"].createElement("div", (0, _reactWithStyles.css)(styles.KeyboardShortcutRow_action), action)); } KeyboardShortcutRow.propTypes = false ? 0 : {}; KeyboardShortcutRow.defaultProps = defaultProps; var _default = (0, _reactWithStyles.withStyles)(function (_ref2) { var color = _ref2.reactDates.color; return { KeyboardShortcutRow: { listStyle: 'none', margin: '6px 0' }, KeyboardShortcutRow__block: { marginBottom: 16 }, KeyboardShortcutRow_keyContainer: { display: 'inline-block', whiteSpace: 'nowrap', textAlign: 'right', // is not handled by isRTL marginRight: 6 // is not handled by isRTL }, KeyboardShortcutRow_keyContainer__block: { textAlign: 'left', // is not handled by isRTL display: 'inline' }, KeyboardShortcutRow_key: { fontFamily: 'monospace', fontSize: 12, textTransform: 'uppercase', background: color.core.grayLightest, padding: '2px 6px' }, KeyboardShortcutRow_action: { display: 'inline', wordBreak: 'break-word', marginLeft: 8 // is not handled by isRTL } }; }, { pureComponent: typeof _react["default"].PureComponent !== 'undefined' })(KeyboardShortcutRow); exports["default"] = _default; /***/ }), /***/ 2300: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(9196)); var LeftArrow = function LeftArrow(props) { return _react["default"].createElement("svg", props, _react["default"].createElement("path", { d: "M336 275L126 485h806c13 0 23 10 23 23s-10 23-23 23H126l210 210c11 11 11 21 0 32-5 5-10 7-16 7s-11-2-16-7L55 524c-11-11-11-21 0-32l249-249c21-22 53 10 32 32z" })); }; LeftArrow.defaultProps = { focusable: "false", viewBox: "0 0 1000 1000" }; var _default = LeftArrow; exports["default"] = _default; /***/ }), /***/ 7360: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _react = _interopRequireDefault(__webpack_require__(9196)); var RightArrow = function RightArrow(props) { return _react["default"].createElement("svg", props, _react["default"].createElement("path", { d: "M694 242l249 250c12 11 12 21 1 32L694 773c-5 5-10 7-16 7s-11-2-16-7c-11-11-11-21 0-32l210-210H68c-13 0-23-10-23-23s10-23 23-23h806L662 275c-21-22 11-54 32-33z" })); }; RightArrow.defaultProps = { focusable: "false", viewBox: "0 0 1000 1000" }; var _default = RightArrow; exports["default"] = _default; /***/ }), /***/ 5724: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MODIFIER_KEY_NAMES = exports.DEFAULT_VERTICAL_SPACING = exports.FANG_HEIGHT_PX = exports.FANG_WIDTH_PX = exports.WEEKDAYS = exports.BLOCKED_MODIFIER = exports.DAY_SIZE = exports.OPEN_UP = exports.OPEN_DOWN = exports.ANCHOR_RIGHT = exports.ANCHOR_LEFT = exports.INFO_POSITION_AFTER = exports.INFO_POSITION_BEFORE = exports.INFO_POSITION_BOTTOM = exports.INFO_POSITION_TOP = exports.ICON_AFTER_POSITION = exports.ICON_BEFORE_POSITION = exports.NAV_POSITION_TOP = exports.NAV_POSITION_BOTTOM = exports.VERTICAL_SCROLLABLE = exports.VERTICAL_ORIENTATION = exports.HORIZONTAL_ORIENTATION = exports.END_DATE = exports.START_DATE = exports.ISO_MONTH_FORMAT = exports.ISO_FORMAT = exports.DISPLAY_FORMAT = void 0; var DISPLAY_FORMAT = 'L'; exports.DISPLAY_FORMAT = DISPLAY_FORMAT; var ISO_FORMAT = 'YYYY-MM-DD'; exports.ISO_FORMAT = ISO_FORMAT; var ISO_MONTH_FORMAT = 'YYYY-MM'; // TODO delete this line of dead code on next breaking change exports.ISO_MONTH_FORMAT = ISO_MONTH_FORMAT; var START_DATE = 'startDate'; exports.START_DATE = START_DATE; var END_DATE = 'endDate'; exports.END_DATE = END_DATE; var HORIZONTAL_ORIENTATION = 'horizontal'; exports.HORIZONTAL_ORIENTATION = HORIZONTAL_ORIENTATION; var VERTICAL_ORIENTATION = 'vertical'; exports.VERTICAL_ORIENTATION = VERTICAL_ORIENTATION; var VERTICAL_SCROLLABLE = 'verticalScrollable'; exports.VERTICAL_SCROLLABLE = VERTICAL_SCROLLABLE; var NAV_POSITION_BOTTOM = 'navPositionBottom'; exports.NAV_POSITION_BOTTOM = NAV_POSITION_BOTTOM; var NAV_POSITION_TOP = 'navPositionTop'; exports.NAV_POSITION_TOP = NAV_POSITION_TOP; var ICON_BEFORE_POSITION = 'before'; exports.ICON_BEFORE_POSITION = ICON_BEFORE_POSITION; var ICON_AFTER_POSITION = 'after'; exports.ICON_AFTER_POSITION = ICON_AFTER_POSITION; var INFO_POSITION_TOP = 'top'; exports.INFO_POSITION_TOP = INFO_POSITION_TOP; var INFO_POSITION_BOTTOM = 'bottom'; exports.INFO_POSITION_BOTTOM = INFO_POSITION_BOTTOM; var INFO_POSITION_BEFORE = 'before'; exports.INFO_POSITION_BEFORE = INFO_POSITION_BEFORE; var INFO_POSITION_AFTER = 'after'; exports.INFO_POSITION_AFTER = INFO_POSITION_AFTER; var ANCHOR_LEFT = 'left'; exports.ANCHOR_LEFT = ANCHOR_LEFT; var ANCHOR_RIGHT = 'right'; exports.ANCHOR_RIGHT = ANCHOR_RIGHT; var OPEN_DOWN = 'down'; exports.OPEN_DOWN = OPEN_DOWN; var OPEN_UP = 'up'; exports.OPEN_UP = OPEN_UP; var DAY_SIZE = 39; exports.DAY_SIZE = DAY_SIZE; var BLOCKED_MODIFIER = 'blocked'; exports.BLOCKED_MODIFIER = BLOCKED_MODIFIER; var WEEKDAYS = [0, 1, 2, 3, 4, 5, 6]; exports.WEEKDAYS = WEEKDAYS; var FANG_WIDTH_PX = 20; exports.FANG_WIDTH_PX = FANG_WIDTH_PX; var FANG_HEIGHT_PX = 10; exports.FANG_HEIGHT_PX = FANG_HEIGHT_PX; var DEFAULT_VERTICAL_SPACING = 22; exports.DEFAULT_VERTICAL_SPACING = DEFAULT_VERTICAL_SPACING; var MODIFIER_KEY_NAMES = new Set(['Shift', 'Control', 'Alt', 'Meta']); exports.MODIFIER_KEY_NAMES = MODIFIER_KEY_NAMES; /***/ }), /***/ 1764: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.CalendarDayPhrases = exports.DayPickerNavigationPhrases = exports.DayPickerKeyboardShortcutsPhrases = exports.DayPickerPhrases = exports.SingleDatePickerInputPhrases = exports.SingleDatePickerPhrases = exports.DateRangePickerInputPhrases = exports.DateRangePickerPhrases = exports["default"] = void 0; var calendarLabel = 'Calendar'; var roleDescription = 'datepicker'; var closeDatePicker = 'Close'; var focusStartDate = 'Interact with the calendar and add the check-in date for your trip.'; var clearDate = 'Clear Date'; var clearDates = 'Clear Dates'; var jumpToPrevMonth = 'Move backward to switch to the previous month.'; var jumpToNextMonth = 'Move forward to switch to the next month.'; var keyboardShortcuts = 'Keyboard Shortcuts'; var showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.'; var hideKeyboardShortcutsPanel = 'Close the shortcuts panel.'; var openThisPanel = 'Open this panel.'; var enterKey = 'Enter key'; var leftArrowRightArrow = 'Right and left arrow keys'; var upArrowDownArrow = 'up and down arrow keys'; var pageUpPageDown = 'page up and page down keys'; var homeEnd = 'Home and end keys'; var escape = 'Escape key'; var questionMark = 'Question mark'; var selectFocusedDate = 'Select the date in focus.'; var moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.'; var moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.'; var moveFocusByOneMonth = 'Switch months.'; var moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.'; var returnFocusToInput = 'Return to the date input field.'; var keyboardForwardNavigationInstructions = 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.'; var keyboardBackwardNavigationInstructions = 'Navigate backward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.'; var chooseAvailableStartDate = function chooseAvailableStartDate(_ref) { var date = _ref.date; return "Choose ".concat(date, " as your check-in date. It\u2019s available."); }; var chooseAvailableEndDate = function chooseAvailableEndDate(_ref2) { var date = _ref2.date; return "Choose ".concat(date, " as your check-out date. It\u2019s available."); }; var chooseAvailableDate = function chooseAvailableDate(_ref3) { var date = _ref3.date; return date; }; var dateIsUnavailable = function dateIsUnavailable(_ref4) { var date = _ref4.date; return "Not available. ".concat(date); }; var dateIsSelected = function dateIsSelected(_ref5) { var date = _ref5.date; return "Selected. ".concat(date); }; var dateIsSelectedAsStartDate = function dateIsSelectedAsStartDate(_ref6) { var date = _ref6.date; return "Selected as start date. ".concat(date); }; var dateIsSelectedAsEndDate = function dateIsSelectedAsEndDate(_ref7) { var date = _ref7.date; return "Selected as end date. ".concat(date); }; var _default = { calendarLabel: calendarLabel, roleDescription: roleDescription, closeDatePicker: closeDatePicker, focusStartDate: focusStartDate, clearDate: clearDate, clearDates: clearDates, jumpToPrevMonth: jumpToPrevMonth, jumpToNextMonth: jumpToNextMonth, keyboardShortcuts: keyboardShortcuts, showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, openThisPanel: openThisPanel, enterKey: enterKey, leftArrowRightArrow: leftArrowRightArrow, upArrowDownArrow: upArrowDownArrow, pageUpPageDown: pageUpPageDown, homeEnd: homeEnd, escape: escape, questionMark: questionMark, selectFocusedDate: selectFocusedDate, moveFocusByOneDay: moveFocusByOneDay, moveFocusByOneWeek: moveFocusByOneWeek, moveFocusByOneMonth: moveFocusByOneMonth, moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, returnFocusToInput: returnFocusToInput, keyboardForwardNavigationInstructions: keyboardForwardNavigationInstructions, keyboardBackwardNavigationInstructions: keyboardBackwardNavigationInstructions, chooseAvailableStartDate: chooseAvailableStartDate, chooseAvailableEndDate: chooseAvailableEndDate, dateIsUnavailable: dateIsUnavailable, dateIsSelected: dateIsSelected, dateIsSelectedAsStartDate: dateIsSelectedAsStartDate, dateIsSelectedAsEndDate: dateIsSelectedAsEndDate }; exports["default"] = _default; var DateRangePickerPhrases = { calendarLabel: calendarLabel, roleDescription: roleDescription, closeDatePicker: closeDatePicker, clearDates: clearDates, focusStartDate: focusStartDate, jumpToPrevMonth: jumpToPrevMonth, jumpToNextMonth: jumpToNextMonth, keyboardShortcuts: keyboardShortcuts, showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, openThisPanel: openThisPanel, enterKey: enterKey, leftArrowRightArrow: leftArrowRightArrow, upArrowDownArrow: upArrowDownArrow, pageUpPageDown: pageUpPageDown, homeEnd: homeEnd, escape: escape, questionMark: questionMark, selectFocusedDate: selectFocusedDate, moveFocusByOneDay: moveFocusByOneDay, moveFocusByOneWeek: moveFocusByOneWeek, moveFocusByOneMonth: moveFocusByOneMonth, moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, returnFocusToInput: returnFocusToInput, keyboardForwardNavigationInstructions: keyboardForwardNavigationInstructions, keyboardBackwardNavigationInstructions: keyboardBackwardNavigationInstructions, chooseAvailableStartDate: chooseAvailableStartDate, chooseAvailableEndDate: chooseAvailableEndDate, dateIsUnavailable: dateIsUnavailable, dateIsSelected: dateIsSelected, dateIsSelectedAsStartDate: dateIsSelectedAsStartDate, dateIsSelectedAsEndDate: dateIsSelectedAsEndDate }; exports.DateRangePickerPhrases = DateRangePickerPhrases; var DateRangePickerInputPhrases = { focusStartDate: focusStartDate, clearDates: clearDates, keyboardForwardNavigationInstructions: keyboardForwardNavigationInstructions, keyboardBackwardNavigationInstructions: keyboardBackwardNavigationInstructions }; exports.DateRangePickerInputPhrases = DateRangePickerInputPhrases; var SingleDatePickerPhrases = { calendarLabel: calendarLabel, roleDescription: roleDescription, closeDatePicker: closeDatePicker, clearDate: clearDate, jumpToPrevMonth: jumpToPrevMonth, jumpToNextMonth: jumpToNextMonth, keyboardShortcuts: keyboardShortcuts, showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, openThisPanel: openThisPanel, enterKey: enterKey, leftArrowRightArrow: leftArrowRightArrow, upArrowDownArrow: upArrowDownArrow, pageUpPageDown: pageUpPageDown, homeEnd: homeEnd, escape: escape, questionMark: questionMark, selectFocusedDate: selectFocusedDate, moveFocusByOneDay: moveFocusByOneDay, moveFocusByOneWeek: moveFocusByOneWeek, moveFocusByOneMonth: moveFocusByOneMonth, moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, returnFocusToInput: returnFocusToInput, keyboardForwardNavigationInstructions: keyboardForwardNavigationInstructions, keyboardBackwardNavigationInstructions: keyboardBackwardNavigationInstructions, chooseAvailableDate: chooseAvailableDate, dateIsUnavailable: dateIsUnavailable, dateIsSelected: dateIsSelected }; exports.SingleDatePickerPhrases = SingleDatePickerPhrases; var SingleDatePickerInputPhrases = { clearDate: clearDate, keyboardForwardNavigationInstructions: keyboardForwardNavigationInstructions, keyboardBackwardNavigationInstructions: keyboardBackwardNavigationInstructions }; exports.SingleDatePickerInputPhrases = SingleDatePickerInputPhrases; var DayPickerPhrases = { calendarLabel: calendarLabel, roleDescription: roleDescription, jumpToPrevMonth: jumpToPrevMonth, jumpToNextMonth: jumpToNextMonth, keyboardShortcuts: keyboardShortcuts, showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, openThisPanel: openThisPanel, enterKey: enterKey, leftArrowRightArrow: leftArrowRightArrow, upArrowDownArrow: upArrowDownArrow, pageUpPageDown: pageUpPageDown, homeEnd: homeEnd, escape: escape, questionMark: questionMark, selectFocusedDate: selectFocusedDate, moveFocusByOneDay: moveFocusByOneDay, moveFocusByOneWeek: moveFocusByOneWeek, moveFocusByOneMonth: moveFocusByOneMonth, moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, returnFocusToInput: returnFocusToInput, chooseAvailableStartDate: chooseAvailableStartDate, chooseAvailableEndDate: chooseAvailableEndDate, chooseAvailableDate: chooseAvailableDate, dateIsUnavailable: dateIsUnavailable, dateIsSelected: dateIsSelected, dateIsSelectedAsStartDate: dateIsSelectedAsStartDate, dateIsSelectedAsEndDate: dateIsSelectedAsEndDate }; exports.DayPickerPhrases = DayPickerPhrases; var DayPickerKeyboardShortcutsPhrases = { keyboardShortcuts: keyboardShortcuts, showKeyboardShortcutsPanel: showKeyboardShortcutsPanel, hideKeyboardShortcutsPanel: hideKeyboardShortcutsPanel, openThisPanel: openThisPanel, enterKey: enterKey, leftArrowRightArrow: leftArrowRightArrow, upArrowDownArrow: upArrowDownArrow, pageUpPageDown: pageUpPageDown, homeEnd: homeEnd, escape: escape, questionMark: questionMark, selectFocusedDate: selectFocusedDate, moveFocusByOneDay: moveFocusByOneDay, moveFocusByOneWeek: moveFocusByOneWeek, moveFocusByOneMonth: moveFocusByOneMonth, moveFocustoStartAndEndOfWeek: moveFocustoStartAndEndOfWeek, returnFocusToInput: returnFocusToInput }; exports.DayPickerKeyboardShortcutsPhrases = DayPickerKeyboardShortcutsPhrases; var DayPickerNavigationPhrases = { jumpToPrevMonth: jumpToPrevMonth, jumpToNextMonth: jumpToNextMonth }; exports.DayPickerNavigationPhrases = DayPickerNavigationPhrases; var CalendarDayPhrases = { chooseAvailableDate: chooseAvailableDate, dateIsUnavailable: dateIsUnavailable, dateIsSelected: dateIsSelected, dateIsSelectedAsStartDate: dateIsSelectedAsStartDate, dateIsSelectedAsEndDate: dateIsSelectedAsEndDate }; exports.CalendarDayPhrases = CalendarDayPhrases; /***/ }), /***/ 8039: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); var _registerCSSInterfaceWithDefaultTheme = _interopRequireDefault(__webpack_require__(5479)); (0, _registerCSSInterfaceWithDefaultTheme["default"])(); /***/ }), /***/ 5547: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _constants = __webpack_require__(5724); var _default = _propTypes["default"].oneOf([_constants.INFO_POSITION_TOP, _constants.INFO_POSITION_BOTTOM, _constants.INFO_POSITION_BEFORE, _constants.INFO_POSITION_AFTER]); exports["default"] = _default; /***/ }), /***/ 135: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _constants = __webpack_require__(5724); var _default = _propTypes["default"].oneOf(_constants.WEEKDAYS); exports["default"] = _default; /***/ }), /***/ 975: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(8669)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _airbnbPropTypes = __webpack_require__(4882); var _default = (0, _airbnbPropTypes.and)([_propTypes["default"].instanceOf(Set), function modifiers(props, propName) { for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { rest[_key - 2] = arguments[_key]; } var propValue = props[propName]; var firstError; (0, _toConsumableArray2["default"])(propValue).some(function (v, i) { var _PropTypes$string; var fakePropName = "".concat(propName, ": index ").concat(i); firstError = (_PropTypes$string = _propTypes["default"].string).isRequired.apply(_PropTypes$string, [(0, _defineProperty2["default"])({}, fakePropName, v), fakePropName].concat(rest)); return firstError != null; }); return firstError == null ? null : firstError; }], 'Modifiers (Set of Strings)'); exports["default"] = _default; /***/ }), /***/ 3476: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _constants = __webpack_require__(5724); var _default = _propTypes["default"].oneOf([_constants.NAV_POSITION_BOTTOM, _constants.NAV_POSITION_TOP]); exports["default"] = _default; /***/ }), /***/ 2302: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _constants = __webpack_require__(5724); var _default = _propTypes["default"].oneOf([_constants.HORIZONTAL_ORIENTATION, _constants.VERTICAL_ORIENTATION, _constants.VERTICAL_SCROLLABLE]); exports["default"] = _default; /***/ }), /***/ 2251: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var core = { white: '#fff', gray: '#484848', grayLight: '#82888a', grayLighter: '#cacccd', grayLightest: '#f2f2f2', borderMedium: '#c4c4c4', border: '#dbdbdb', borderLight: '#e4e7e7', borderLighter: '#eceeee', borderBright: '#f4f5f5', primary: '#00a699', primaryShade_1: '#33dacd', primaryShade_2: '#66e2da', primaryShade_3: '#80e8e0', primaryShade_4: '#b2f1ec', primary_dark: '#008489', secondary: '#007a87', yellow: '#ffe8bc', yellow_dark: '#ffce71' }; var _default = { reactDates: { zIndex: 0, border: { input: { border: 0, borderTop: 0, borderRight: 0, borderBottom: '2px solid transparent', borderLeft: 0, outlineFocused: 0, borderFocused: 0, borderTopFocused: 0, borderLeftFocused: 0, borderBottomFocused: "2px solid ".concat(core.primary_dark), borderRightFocused: 0, borderRadius: 0 }, pickerInput: { borderWidth: 1, borderStyle: 'solid', borderRadius: 2 } }, color: { core: core, disabled: core.grayLightest, background: core.white, backgroundDark: '#f2f2f2', backgroundFocused: core.white, border: 'rgb(219, 219, 219)', text: core.gray, textDisabled: core.border, textFocused: '#007a87', placeholderText: '#757575', outside: { backgroundColor: core.white, backgroundColor_active: core.white, backgroundColor_hover: core.white, color: core.gray, color_active: core.gray, color_hover: core.gray }, highlighted: { backgroundColor: core.yellow, backgroundColor_active: core.yellow_dark, backgroundColor_hover: core.yellow_dark, color: core.gray, color_active: core.gray, color_hover: core.gray }, minimumNights: { backgroundColor: core.white, backgroundColor_active: core.white, backgroundColor_hover: core.white, borderColor: core.borderLighter, color: core.grayLighter, color_active: core.grayLighter, color_hover: core.grayLighter }, hoveredSpan: { backgroundColor: core.primaryShade_4, backgroundColor_active: core.primaryShade_3, backgroundColor_hover: core.primaryShade_4, borderColor: core.primaryShade_3, borderColor_active: core.primaryShade_3, borderColor_hover: core.primaryShade_3, color: core.secondary, color_active: core.secondary, color_hover: core.secondary }, selectedSpan: { backgroundColor: core.primaryShade_2, backgroundColor_active: core.primaryShade_1, backgroundColor_hover: core.primaryShade_1, borderColor: core.primaryShade_1, borderColor_active: core.primary, borderColor_hover: core.primary, color: core.white, color_active: core.white, color_hover: core.white }, selected: { backgroundColor: core.primary, backgroundColor_active: core.primary, backgroundColor_hover: core.primary, borderColor: core.primary, borderColor_active: core.primary, borderColor_hover: core.primary, color: core.white, color_active: core.white, color_hover: core.white }, blocked_calendar: { backgroundColor: core.grayLighter, backgroundColor_active: core.grayLighter, backgroundColor_hover: core.grayLighter, borderColor: core.grayLighter, borderColor_active: core.grayLighter, borderColor_hover: core.grayLighter, color: core.grayLight, color_active: core.grayLight, color_hover: core.grayLight }, blocked_out_of_range: { backgroundColor: core.white, backgroundColor_active: core.white, backgroundColor_hover: core.white, borderColor: core.borderLight, borderColor_active: core.borderLight, borderColor_hover: core.borderLight, color: core.grayLighter, color_active: core.grayLighter, color_hover: core.grayLighter } }, spacing: { dayPickerHorizontalPadding: 9, captionPaddingTop: 22, captionPaddingBottom: 37, inputPadding: 0, displayTextPaddingVertical: undefined, displayTextPaddingTop: 11, displayTextPaddingBottom: 9, displayTextPaddingHorizontal: undefined, displayTextPaddingLeft: 11, displayTextPaddingRight: 11, displayTextPaddingVertical_small: undefined, displayTextPaddingTop_small: 7, displayTextPaddingBottom_small: 5, displayTextPaddingHorizontal_small: undefined, displayTextPaddingLeft_small: 7, displayTextPaddingRight_small: 7 }, sizing: { inputWidth: 130, inputWidth_small: 97, arrowWidth: 24 }, noScrollBarOnVerticalScrollable: false, font: { size: 14, captionSize: 18, input: { size: 19, weight: 200, lineHeight: '24px', size_small: 15, lineHeight_small: '18px', letterSpacing_small: '0.2px', styleDisabled: 'italic' } } } }; exports["default"] = _default; /***/ }), /***/ 7399: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = calculateDimension; function calculateDimension(el, axis) { var borderBox = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var withMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (!el) { return 0; } var axisStart = axis === 'width' ? 'Left' : 'Top'; var axisEnd = axis === 'width' ? 'Right' : 'Bottom'; // Only read styles if we need to var style = !borderBox || withMargin ? window.getComputedStyle(el) : null; // Offset includes border and padding var offsetWidth = el.offsetWidth, offsetHeight = el.offsetHeight; var size = axis === 'width' ? offsetWidth : offsetHeight; // Get the inner size if (!borderBox) { size -= parseFloat(style["padding".concat(axisStart)]) + parseFloat(style["padding".concat(axisEnd)]) + parseFloat(style["border".concat(axisStart, "Width")]) + parseFloat(style["border".concat(axisEnd, "Width")]); } // Apply margin if (withMargin) { size += parseFloat(style["margin".concat(axisStart)]) + parseFloat(style["margin".concat(axisEnd)]); } return size; } /***/ }), /***/ 1268: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getActiveElement; function getActiveElement() { return typeof document !== 'undefined' && document.activeElement; } /***/ }), /***/ 4246: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getCalendarDaySettings; var _getPhrase = _interopRequireDefault(__webpack_require__(5064)); var _constants = __webpack_require__(5724); function isSelected(modifiers) { return modifiers.has('selected') || modifiers.has('selected-span') || modifiers.has('selected-start') || modifiers.has('selected-end'); } function shouldUseDefaultCursor(modifiers) { return modifiers.has('blocked-minimum-nights') || modifiers.has('blocked-calendar') || modifiers.has('blocked-out-of-range'); } function isHoveredSpan(modifiers) { if (isSelected(modifiers)) return false; return modifiers.has('hovered-span') || modifiers.has('after-hovered-start') || modifiers.has('before-hovered-end'); } function getAriaLabel(phrases, modifiers, day, ariaLabelFormat) { var chooseAvailableDate = phrases.chooseAvailableDate, dateIsUnavailable = phrases.dateIsUnavailable, dateIsSelected = phrases.dateIsSelected, dateIsSelectedAsStartDate = phrases.dateIsSelectedAsStartDate, dateIsSelectedAsEndDate = phrases.dateIsSelectedAsEndDate; var formattedDate = { date: day.format(ariaLabelFormat) }; if (modifiers.has('selected-start') && dateIsSelectedAsStartDate) { return (0, _getPhrase["default"])(dateIsSelectedAsStartDate, formattedDate); } if (modifiers.has('selected-end') && dateIsSelectedAsEndDate) { return (0, _getPhrase["default"])(dateIsSelectedAsEndDate, formattedDate); } if (isSelected(modifiers) && dateIsSelected) { return (0, _getPhrase["default"])(dateIsSelected, formattedDate); } if (modifiers.has(_constants.BLOCKED_MODIFIER)) { return (0, _getPhrase["default"])(dateIsUnavailable, formattedDate); } return (0, _getPhrase["default"])(chooseAvailableDate, formattedDate); } function getCalendarDaySettings(day, ariaLabelFormat, daySize, modifiers, phrases) { return { ariaLabel: getAriaLabel(phrases, modifiers, day, ariaLabelFormat), hoveredSpan: isHoveredSpan(modifiers), isOutsideRange: modifiers.has('blocked-out-of-range'), selected: isSelected(modifiers), useDefaultCursor: shouldUseDefaultCursor(modifiers), daySizeStyles: { width: daySize, height: daySize - 1 } }; } /***/ }), /***/ 2793: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getCalendarMonthWeeks; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _constants = __webpack_require__(5724); function getCalendarMonthWeeks(month, enableOutsideDays) { var firstDayOfWeek = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _moment["default"].localeData().firstDayOfWeek(); if (!_moment["default"].isMoment(month) || !month.isValid()) { throw new TypeError('`month` must be a valid moment object'); } if (_constants.WEEKDAYS.indexOf(firstDayOfWeek) === -1) { throw new TypeError('`firstDayOfWeek` must be an integer between 0 and 6'); } // set utc offset to get correct dates in future (when timezone changes) var firstOfMonth = month.clone().startOf('month').hour(12); var lastOfMonth = month.clone().endOf('month').hour(12); // calculate the exact first and last days to fill the entire matrix // (considering days outside month) var prevDays = (firstOfMonth.day() + 7 - firstDayOfWeek) % 7; var nextDays = (firstDayOfWeek + 6 - lastOfMonth.day()) % 7; var firstDay = firstOfMonth.clone().subtract(prevDays, 'day'); var lastDay = lastOfMonth.clone().add(nextDays, 'day'); var totalDays = lastDay.diff(firstDay, 'days') + 1; var currentDay = firstDay.clone(); var weeksInMonth = []; for (var i = 0; i < totalDays; i += 1) { if (i % 7 === 0) { weeksInMonth.push([]); } var day = null; if (i >= prevDays && i < totalDays - nextDays || enableOutsideDays) { day = currentDay.clone(); } weeksInMonth[weeksInMonth.length - 1].push(day); currentDay.add(1, 'day'); } return weeksInMonth; } /***/ }), /***/ 5127: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getCalendarMonthWidth; function getCalendarMonthWidth(daySize) { var calendarMonthPadding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; return 7 * daySize + 2 * calendarMonthPadding + 1; } /***/ }), /***/ 3472: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getNumberOfCalendarMonthWeeks; var _moment = _interopRequireDefault(__webpack_require__(6292)); function getBlankDaysBeforeFirstDay(firstDayOfMonth, firstDayOfWeek) { var weekDayDiff = firstDayOfMonth.day() - firstDayOfWeek; return (weekDayDiff + 7) % 7; } function getNumberOfCalendarMonthWeeks(month) { var firstDayOfWeek = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _moment["default"].localeData().firstDayOfWeek(); var firstDayOfMonth = month.clone().startOf('month'); var numBlankDays = getBlankDaysBeforeFirstDay(firstDayOfMonth, firstDayOfWeek); return Math.ceil((numBlankDays + month.daysInMonth()) / 7); } /***/ }), /***/ 5064: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getPhrase; function getPhrase(phrase, args) { if (typeof phrase === 'string') return phrase; if (typeof phrase === 'function') { return phrase(args); } return ''; } /***/ }), /***/ 3312: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getPhrasePropTypes; var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); 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; } 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) { (0, _defineProperty2["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; } function getPhrasePropTypes(defaultPhrases) { return Object.keys(defaultPhrases).reduce(function (phrases, key) { return _objectSpread({}, phrases, (0, _defineProperty2["default"])({}, key, _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func, _propTypes["default"].node]))); }, {}); } /***/ }), /***/ 5550: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getPooledMoment; var _moment = _interopRequireDefault(__webpack_require__(6292)); var momentPool = new Map(); function getPooledMoment(dayString) { if (!momentPool.has(dayString)) { momentPool.set(dayString, (0, _moment["default"])(dayString)); } return momentPool.get(dayString); } /***/ }), /***/ 4641: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getPreviousMonthMemoLast; var getPreviousMonthMemoKey; var getPreviousMonthMemoValue; function getPreviousMonthMemoLast(month) { if (month !== getPreviousMonthMemoKey) { getPreviousMonthMemoKey = month; getPreviousMonthMemoValue = month.clone().subtract(1, 'month'); } return getPreviousMonthMemoValue; } /***/ }), /***/ 8421: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getTransformStyles; function getTransformStyles(transformValue) { return { transform: transformValue, msTransform: transformValue, MozTransform: transformValue, WebkitTransform: transformValue }; } /***/ }), /***/ 9867: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getVisibleDays; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _toISOMonthString = _interopRequireDefault(__webpack_require__(2476)); function getVisibleDays(month, numberOfMonths, enableOutsideDays, withoutTransitionMonths) { if (!_moment["default"].isMoment(month)) return {}; var visibleDaysByMonth = {}; var currentMonth = withoutTransitionMonths ? month.clone() : month.clone().subtract(1, 'month'); for (var i = 0; i < (withoutTransitionMonths ? numberOfMonths : numberOfMonths + 2); i += 1) { var visibleDays = []; // set utc offset to get correct dates in future (when timezone changes) var baseDate = currentMonth.clone(); var firstOfMonth = baseDate.clone().startOf('month').hour(12); var lastOfMonth = baseDate.clone().endOf('month').hour(12); var currentDay = firstOfMonth.clone(); // days belonging to the previous month if (enableOutsideDays) { for (var j = 0; j < currentDay.weekday(); j += 1) { var prevDay = currentDay.clone().subtract(j + 1, 'day'); visibleDays.unshift(prevDay); } } while (currentDay < lastOfMonth) { visibleDays.push(currentDay.clone()); currentDay.add(1, 'day'); } if (enableOutsideDays) { // weekday() returns the index of the day of the week according to the locale // this means if the week starts on Monday, weekday() will return 0 for a Monday date, not 1 if (currentDay.weekday() !== 0) { // days belonging to the next month for (var k = currentDay.weekday(), count = 0; k < 7; k += 1, count += 1) { var nextDay = currentDay.clone().add(count, 'day'); visibleDays.push(nextDay); } } } visibleDaysByMonth[(0, _toISOMonthString["default"])(currentMonth)] = visibleDays; currentMonth = currentMonth.clone().add(1, 'month'); } return visibleDaysByMonth; } /***/ }), /***/ 9720: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isAfterDay; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _isBeforeDay = _interopRequireDefault(__webpack_require__(443)); var _isSameDay = _interopRequireDefault(__webpack_require__(2455)); function isAfterDay(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; return !(0, _isBeforeDay["default"])(a, b) && !(0, _isSameDay["default"])(a, b); } /***/ }), /***/ 443: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isBeforeDay; var _moment = _interopRequireDefault(__webpack_require__(6292)); function isBeforeDay(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; var aYear = a.year(); var aMonth = a.month(); var bYear = b.year(); var bMonth = b.month(); var isSameYear = aYear === bYear; var isSameMonth = aMonth === bMonth; if (isSameYear && isSameMonth) return a.date() < b.date(); if (isSameYear) return aMonth < bMonth; return aYear < bYear; } /***/ }), /***/ 6979: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isDayVisible; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _isBeforeDay = _interopRequireDefault(__webpack_require__(443)); var _isAfterDay = _interopRequireDefault(__webpack_require__(9720)); var _toISOMonthString = _interopRequireDefault(__webpack_require__(2476)); var startCacheOutsideDays = new Map(); var endCacheOutsideDays = new Map(); var startCacheInsideDays = new Map(); var endCacheInsideDays = new Map(); function isDayVisible(day, month, numberOfMonths, enableOutsideDays) { if (!_moment["default"].isMoment(day)) return false; // Cloning is a little expensive, so we want to do it as little as possible. var startKey = (0, _toISOMonthString["default"])(month); // eslint-disable-next-line prefer-template var endKey = startKey + '+' + numberOfMonths; if (enableOutsideDays) { if (!startCacheOutsideDays.has(startKey)) { startCacheOutsideDays.set(startKey, month.clone().startOf('month').startOf('week')); } if ((0, _isBeforeDay["default"])(day, startCacheOutsideDays.get(startKey))) return false; if (!endCacheOutsideDays.has(endKey)) { endCacheOutsideDays.set(endKey, month.clone().endOf('week').add(numberOfMonths - 1, 'months').endOf('month').endOf('week')); } return !(0, _isAfterDay["default"])(day, endCacheOutsideDays.get(endKey)); } // !enableOutsideDays if (!startCacheInsideDays.has(startKey)) { startCacheInsideDays.set(startKey, month.clone().startOf('month')); } if ((0, _isBeforeDay["default"])(day, startCacheInsideDays.get(startKey))) return false; if (!endCacheInsideDays.has(endKey)) { endCacheInsideDays.set(endKey, month.clone().add(numberOfMonths - 1, 'months').endOf('month')); } return !(0, _isAfterDay["default"])(day, endCacheInsideDays.get(endKey)); } /***/ }), /***/ 2831: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isNextMonth; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _isSameMonth = _interopRequireDefault(__webpack_require__(4387)); function isNextMonth(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; return (0, _isSameMonth["default"])(a.clone().add(1, 'month'), b); } /***/ }), /***/ 4302: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isPrevMonth; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _isSameMonth = _interopRequireDefault(__webpack_require__(4387)); function isPrevMonth(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; return (0, _isSameMonth["default"])(a.clone().subtract(1, 'month'), b); } /***/ }), /***/ 2455: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isSameDay; var _moment = _interopRequireDefault(__webpack_require__(6292)); function isSameDay(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; // Compare least significant, most likely to change units first // Moment's isSame clones moment inputs and is a tad slow return a.date() === b.date() && a.month() === b.month() && a.year() === b.year(); } /***/ }), /***/ 4387: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isSameMonth; var _moment = _interopRequireDefault(__webpack_require__(6292)); function isSameMonth(a, b) { if (!_moment["default"].isMoment(a) || !_moment["default"].isMoment(b)) return false; // Compare least significant, most likely to change units first // Moment's isSame clones moment inputs and is a tad slow return a.month() === b.month() && a.year() === b.year(); } /***/ }), /***/ 336: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = isTransitionEndSupported; function isTransitionEndSupported() { return !!(typeof window !== 'undefined' && 'TransitionEvent' in window); } /***/ }), /***/ 1887: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.addModifier = addModifier; exports.deleteModifier = deleteModifier; var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _isDayVisible = _interopRequireDefault(__webpack_require__(6979)); var _toISODateString = _interopRequireDefault(__webpack_require__(6135)); var _toISOMonthString = _interopRequireDefault(__webpack_require__(2476)); var _getPreviousMonthMemoLast = _interopRequireDefault(__webpack_require__(4641)); var _constants = __webpack_require__(5724); 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; } 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) { (0, _defineProperty2["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; } function addModifier(updatedDays, day, modifier, props, state) { var numberOfVisibleMonths = props.numberOfMonths, enableOutsideDays = props.enableOutsideDays, orientation = props.orientation; var firstVisibleMonth = state.currentMonth, visibleDays = state.visibleDays; var currentMonth = firstVisibleMonth; var numberOfMonths = numberOfVisibleMonths; if (orientation === _constants.VERTICAL_SCROLLABLE) { numberOfMonths = Object.keys(visibleDays).length; } else { currentMonth = (0, _getPreviousMonthMemoLast["default"])(currentMonth); numberOfMonths += 2; } if (!day || !(0, _isDayVisible["default"])(day, currentMonth, numberOfMonths, enableOutsideDays)) { return updatedDays; } var iso = (0, _toISODateString["default"])(day); var updatedDaysAfterAddition = _objectSpread({}, updatedDays); if (enableOutsideDays) { var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; }); updatedDaysAfterAddition = monthsToUpdate.reduce(function (acc, monthIso) { var month = updatedDays[monthIso] || visibleDays[monthIso]; if (!month[iso] || !month[iso].has(modifier)) { var modifiers = new Set(month[iso]); modifiers.add(modifier); acc[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); } return acc; }, updatedDaysAfterAddition); } else { var monthIso = (0, _toISOMonthString["default"])(day); var month = updatedDays[monthIso] || visibleDays[monthIso] || {}; if (!month[iso] || !month[iso].has(modifier)) { var modifiers = new Set(month[iso]); modifiers.add(modifier); updatedDaysAfterAddition[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); } } return updatedDaysAfterAddition; } function deleteModifier(updatedDays, day, modifier, props, state) { var numberOfVisibleMonths = props.numberOfMonths, enableOutsideDays = props.enableOutsideDays, orientation = props.orientation; var firstVisibleMonth = state.currentMonth, visibleDays = state.visibleDays; var currentMonth = firstVisibleMonth; var numberOfMonths = numberOfVisibleMonths; if (orientation === _constants.VERTICAL_SCROLLABLE) { numberOfMonths = Object.keys(visibleDays).length; } else { currentMonth = (0, _getPreviousMonthMemoLast["default"])(currentMonth); numberOfMonths += 2; } if (!day || !(0, _isDayVisible["default"])(day, currentMonth, numberOfMonths, enableOutsideDays)) { return updatedDays; } var iso = (0, _toISODateString["default"])(day); var updatedDaysAfterDeletion = _objectSpread({}, updatedDays); if (enableOutsideDays) { var monthsToUpdate = Object.keys(visibleDays).filter(function (monthKey) { return Object.keys(visibleDays[monthKey]).indexOf(iso) > -1; }); updatedDaysAfterDeletion = monthsToUpdate.reduce(function (acc, monthIso) { var month = updatedDays[monthIso] || visibleDays[monthIso]; if (month[iso] && month[iso].has(modifier)) { var modifiers = new Set(month[iso]); modifiers["delete"](modifier); acc[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); } return acc; }, updatedDaysAfterDeletion); } else { var monthIso = (0, _toISOMonthString["default"])(day); var month = updatedDays[monthIso] || visibleDays[monthIso] || {}; if (month[iso] && month[iso].has(modifier)) { var modifiers = new Set(month[iso]); modifiers["delete"](modifier); updatedDaysAfterDeletion[monthIso] = _objectSpread({}, month, (0, _defineProperty2["default"])({}, iso, modifiers)); } } return updatedDaysAfterDeletion; } /***/ }), /***/ 9780: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = noflip; var NOFLIP = '/* @noflip */'; // Appends a noflip comment to a style rule in order to prevent it from being automatically // flipped in RTL contexts. This should be used only in situations where the style must remain // unflipped regardless of direction context. See: https://github.com/kentcdodds/rtl-css-js#usage function noflip(value) { if (typeof value === 'number') return "".concat(value, "px ").concat(NOFLIP); if (typeof value === 'string') return "".concat(value, " ").concat(NOFLIP); throw new TypeError('noflip expects a string or a number'); } /***/ }), /***/ 5479: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = registerCSSInterfaceWithDefaultTheme; var _reactWithStylesInterfaceCss = _interopRequireDefault(__webpack_require__(6331)); var _registerInterfaceWithDefaultTheme = _interopRequireDefault(__webpack_require__(9979)); function registerCSSInterfaceWithDefaultTheme() { (0, _registerInterfaceWithDefaultTheme["default"])(_reactWithStylesInterfaceCss["default"]); } /***/ }), /***/ 9979: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = registerInterfaceWithDefaultTheme; var _ThemedStyleSheet = _interopRequireDefault(__webpack_require__(9997)); var _DefaultTheme = _interopRequireDefault(__webpack_require__(2251)); function registerInterfaceWithDefaultTheme(reactWithStylesInterface) { _ThemedStyleSheet["default"].registerInterface(reactWithStylesInterface); _ThemedStyleSheet["default"].registerTheme(_DefaultTheme["default"]); } /***/ }), /***/ 6135: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = toISODateString; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _toMomentObject = _interopRequireDefault(__webpack_require__(7526)); function toISODateString(date, currentFormat) { var dateObj = _moment["default"].isMoment(date) ? date : (0, _toMomentObject["default"])(date, currentFormat); if (!dateObj) return null; // Template strings compiled in strict mode uses concat, which is slow. Since // this code is in a hot path and we want it to be as fast as possible, we // want to use old-fashioned +. // eslint-disable-next-line prefer-template return dateObj.year() + '-' + String(dateObj.month() + 1).padStart(2, '0') + '-' + String(dateObj.date()).padStart(2, '0'); } /***/ }), /***/ 2476: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = toISOMonthString; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _toMomentObject = _interopRequireDefault(__webpack_require__(7526)); function toISOMonthString(date, currentFormat) { var dateObj = _moment["default"].isMoment(date) ? date : (0, _toMomentObject["default"])(date, currentFormat); if (!dateObj) return null; // Template strings compiled in strict mode uses concat, which is slow. Since // this code is in a hot path and we want it to be as fast as possible, we // want to use old-fashioned +. // eslint-disable-next-line prefer-template return dateObj.year() + '-' + String(dateObj.month() + 1).padStart(2, '0'); } /***/ }), /***/ 7526: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = toMomentObject; var _moment = _interopRequireDefault(__webpack_require__(6292)); var _constants = __webpack_require__(5724); function toMomentObject(dateString, customFormat) { var dateFormats = customFormat ? [customFormat, _constants.DISPLAY_FORMAT, _constants.ISO_FORMAT] : [_constants.DISPLAY_FORMAT, _constants.ISO_FORMAT]; var date = (0, _moment["default"])(dateString, dateFormats, true); return date.isValid() ? date.hour(12) : null; } /***/ }), /***/ 5930: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var __webpack_unused_export__; var _interopRequireDefault = __webpack_require__(9736); __webpack_unused_export__ = ({ value: true }); exports["default"] = void 0; var _arrayPrototype = _interopRequireDefault(__webpack_require__(116)); var _globalCache = _interopRequireDefault(__webpack_require__(5371)); var _constants = __webpack_require__(9486); var _getClassName = _interopRequireDefault(__webpack_require__(3848)); var _separateStyles2 = _interopRequireDefault(__webpack_require__(6526)); /** * Function required as part of the react-with-styles interface. Parses the styles provided by * react-with-styles to produce class names based on the style name and optionally the namespace if * available. * * stylesObject {Object} The styles object passed to withStyles. * * Return an object mapping style names to class names. */ function create(stylesObject) { var stylesToClasses = {}; var styleNames = Object.keys(stylesObject); var sharedState = _globalCache["default"].get(_constants.GLOBAL_CACHE_KEY) || {}; var _sharedState$namespac = sharedState.namespace, namespace = _sharedState$namespac === void 0 ? '' : _sharedState$namespac; styleNames.forEach(function (styleName) { var className = (0, _getClassName["default"])(namespace, styleName); stylesToClasses[styleName] = className; }); return stylesToClasses; } /** * Process styles to be consumed by a component. * * stylesArray {Array} Array of the following: values returned by create, plain JavaScript objects * representing inline styles, or arrays thereof. * * Return an object with optional className and style properties to be spread on a component. */ function resolve(stylesArray) { var flattenedStyles = (0, _arrayPrototype["default"])(stylesArray, Infinity); var _separateStyles = (0, _separateStyles2["default"])(flattenedStyles), classNames = _separateStyles.classNames, hasInlineStyles = _separateStyles.hasInlineStyles, inlineStyles = _separateStyles.inlineStyles; var specificClassNames = classNames.map(function (name, index) { return "".concat(name, " ").concat(name, "_").concat(index + 1); }); var className = specificClassNames.join(' '); var result = { className: className }; if (hasInlineStyles) result.style = inlineStyles; return result; } var _default = { create: create, resolve: resolve }; exports["default"] = _default; /***/ }), /***/ 9486: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.MAX_SPECIFICITY = exports.GLOBAL_CACHE_KEY = void 0; var GLOBAL_CACHE_KEY = 'reactWithStylesInterfaceCSS'; exports.GLOBAL_CACHE_KEY = GLOBAL_CACHE_KEY; var MAX_SPECIFICITY = 20; exports.MAX_SPECIFICITY = MAX_SPECIFICITY; /***/ }), /***/ 3848: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = getClassName; /** * Construct a class name. * * namespace {String} Used to construct unique class names. * styleName {String} Name identifying the specific style. * * Return the class name. */ function getClassName(namespace, styleName) { var namespaceSegment = namespace.length > 0 ? "".concat(namespace, "__") : ''; return "".concat(namespaceSegment).concat(styleName); } /***/ }), /***/ 6526: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; // This function takes an array of styles and separates them into styles that // are handled by Aphrodite and inline styles. function separateStyles(stylesArray) { var classNames = []; // Since determining if an Object is empty requires collecting all of its // keys, and we want the best performance in this code because we are in the // render path, we are going to do a little bookkeeping ourselves. var hasInlineStyles = false; var inlineStyles = {}; // This is run on potentially every node in the tree when rendering, where // performance is critical. Normally we would prefer using `forEach`, but // old-fashioned for loops are faster so that's what we have chosen here. for (var i = 0; i < stylesArray.length; i++) { // eslint-disable-line no-plusplus var style = stylesArray[i]; // If this style is falsy, we just want to disregard it. This allows for // syntax like: // // css(isFoo && styles.foo) if (style) { if (typeof style === 'string') { classNames.push(style); } else { Object.assign(inlineStyles, style); hasInlineStyles = true; } } } return { classNames: classNames, hasInlineStyles: hasInlineStyles, inlineStyles: inlineStyles }; } var _default = separateStyles; exports["default"] = _default; /***/ }), /***/ 6331: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // eslint-disable-next-line import/no-unresolved module.exports = __webpack_require__(5930)["default"]; /***/ }), /***/ 9997: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports._getInterface = _getInterface; exports._getTheme = get; exports["default"] = void 0; var styleInterface; var styleTheme; var START_MARK = 'react-with-styles.resolve.start'; var END_MARK = 'react-with-styles.resolve.end'; var MEASURE_MARK = "\uD83D\uDC69\u200D\uD83C\uDFA8 [resolve]"; function registerTheme(theme) { styleTheme = theme; } function registerInterface(interfaceToRegister) { styleInterface = interfaceToRegister; } function create(makeFromTheme, createWithDirection) { var styles = createWithDirection(makeFromTheme(styleTheme)); return function () { return styles; }; } function createLTR(makeFromTheme) { return create(makeFromTheme, styleInterface.createLTR || styleInterface.create); } function createRTL(makeFromTheme) { return create(makeFromTheme, styleInterface.createRTL || styleInterface.create); } function get() { return styleTheme; } function resolve() { if (false) {} for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) { styles[_key] = arguments[_key]; } var result = styleInterface.resolve(styles); if (false) {} return result; } function resolveLTR() { for (var _len2 = arguments.length, styles = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { styles[_key2] = arguments[_key2]; } if (styleInterface.resolveLTR) { return styleInterface.resolveLTR(styles); } return resolve(styles); } function resolveRTL() { for (var _len3 = arguments.length, styles = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { styles[_key3] = arguments[_key3]; } if (styleInterface.resolveRTL) { return styleInterface.resolveRTL(styles); } return resolve(styles); } function flush() { if (styleInterface.flush) { styleInterface.flush(); } } // Exported until we deprecate this API completely // eslint-disable-next-line no-underscore-dangle function _getInterface() { return styleInterface; } // Exported until we deprecate this API completely var _default = { registerTheme: registerTheme, registerInterface: registerInterface, create: createLTR, createLTR: createLTR, createRTL: createRTL, get: get, resolve: resolveLTR, resolveLTR: resolveLTR, resolveRTL: resolveRTL, flush: flush }; exports["default"] = _default; /***/ }), /***/ 2258: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "DIRECTIONS", ({ enumerable: true, get: function get() { return _reactWithDirection.DIRECTIONS; } })); exports["default"] = void 0; var _react = __webpack_require__(9196); var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var _reactWithDirection = __webpack_require__(7818); function detectAndCreateContext(defaultValue) { if (_react.createContext) { return /*#__PURE__*/(0, _react.createContext)(defaultValue); } return { Provider: function Provider() { throw new ReferenceError('WithStylesContext requires React 16.3 or later'); }, Consumer: function Consumer() { throw new ReferenceError('WithStylesContext requires React 16.3 or later'); } }; } var WithStylesContext = detectAndCreateContext({ stylesInterface: null, stylesTheme: null, direction: null }); WithStylesContext.Provider.propTypes = { stylesInterface: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types stylesTheme: _propTypes["default"].object, // eslint-disable-line react/forbid-prop-types direction: _propTypes["default"].oneOf([_reactWithDirection.DIRECTIONS.LTR, _reactWithDirection.DIRECTIONS.RTL]) }; var _default = WithStylesContext; exports["default"] = _default; /***/ }), /***/ 3174: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; var EMPTY_STYLES = {}; var EMPTY_STYLES_FN = function EMPTY_STYLES_FN() { return EMPTY_STYLES; }; var _default = EMPTY_STYLES_FN; exports["default"] = _default; /***/ }), /***/ 6161: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.perfStart = perfStart; exports.perfEnd = perfEnd; exports["default"] = withPerf; function perfStart(startMark) { if (typeof performance !== 'undefined' && performance.mark !== undefined && typeof performance.clearMarks === 'function' && startMark) { performance.clearMarks(startMark); performance.mark(startMark); } } function perfEnd(startMark, endMark, measureName) { if (typeof performance !== 'undefined' && performance.mark !== undefined && typeof performance.clearMarks === 'function') { performance.clearMarks(endMark); performance.mark(endMark); performance.measure(measureName, startMark, endMark); performance.clearMarks(measureName); } } function withPerf(methodName) { var startMark = "react-with-styles.".concat(methodName, ".start"); var endMark = "react-with-styles.".concat(methodName, ".end"); var measureName = "\uD83D\uDC69\u200D\uD83C\uDFA8 [".concat(methodName, "]"); return function (fn) { return function () { if (false) {} var result = fn.apply(void 0, arguments); if (false) {} return result; }; }; } /***/ }), /***/ 7928: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireWildcard = __webpack_require__(3805); var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.withStyles = withStyles; Object.defineProperty(exports, "withStylesPropTypes", ({ enumerable: true, get: function get() { return _withStylesPropTypes.withStylesPropTypes; } })); exports.css = exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(6164)); var _defineProperty2 = _interopRequireDefault(__webpack_require__(8239)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(7509)); var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(6856)); var _react = _interopRequireDefault(__webpack_require__(9196)); var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(1281)); var _getComponentName = _interopRequireDefault(__webpack_require__(2424)); var _ref3 = _interopRequireDefault(__webpack_require__(9549)); var _emptyStylesFn = _interopRequireDefault(__webpack_require__(3174)); var _perf = _interopRequireDefault(__webpack_require__(6161)); var _WithStylesContext = _interopRequireWildcard(__webpack_require__(2258)); var _ThemedStyleSheet = _interopRequireWildcard(__webpack_require__(9997)); var _withStylesPropTypes = __webpack_require__(9351); 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; } 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) { (0, _defineProperty2["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; } /** * A higher order function that returns a higher order class component that injects * CSS-in-JS props derived from the react-with-styles theme, interface, and * direction provided through the WithStylesContext provider. * * The function should be used as follows: * `withStyles((theme) => styles, options)(Component)` * * Options can be used to rename the injected props, memoize the component, and flush * the styles to the styles tag (or whatever the interface implements as flush) before * rendering. * * @export * @param {Function|null|undefined} [stylesFn=EMPTY_STYLES_FN] * @param {Object} [{ * stylesPropName = 'styles', * themePropName = 'theme', * cssPropName = 'css', * flushBefore = false, * pureComponent = false, * }={}] * @returns a higher order component that wraps the provided component and injects * the react-with-styles css, styles, and theme props. */ function withStyles() { var stylesFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _emptyStylesFn["default"]; var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$stylesPropName = _ref.stylesPropName, stylesPropName = _ref$stylesPropName === void 0 ? 'styles' : _ref$stylesPropName, _ref$themePropName = _ref.themePropName, themePropName = _ref$themePropName === void 0 ? 'theme' : _ref$themePropName, _ref$cssPropName = _ref.cssPropName, cssPropName = _ref$cssPropName === void 0 ? 'css' : _ref$cssPropName, _ref$flushBefore = _ref.flushBefore, flushBefore = _ref$flushBefore === void 0 ? false : _ref$flushBefore, _ref$pureComponent = _ref.pureComponent, pureComponent = _ref$pureComponent === void 0 ? false : _ref$pureComponent; stylesFn = stylesFn || _emptyStylesFn["default"]; var BaseClass = pureComponent ? _react["default"].PureComponent : _react["default"].Component; /** Cache for storing the result of stylesFn(theme) for all themes. */ var stylesFnResultCacheMap = typeof WeakMap === 'undefined' ? new Map() : new WeakMap(); function getOrCreateStylesFnResultCache(theme) { // Get and store the result in the stylesFnResultsCache for the component // -- not the instance -- so we only apply the theme to the stylesFn // once per theme for this component. var cachedResultForTheme = stylesFnResultCacheMap.get(theme); var stylesFnResult = cachedResultForTheme || stylesFn(theme) || {}; stylesFnResultCacheMap.set(theme, stylesFnResult); // cache the result of stylesFn(theme) return stylesFnResult; } /** * Cache for storing the results of computations: * `WeakMap>` * Falling back to `Map` whenever `WeakMap` is not supported */ var withStylesCache = typeof WeakMap === 'undefined' ? new Map() : new WeakMap(); function getComponentCache(theme, component, direction) { var themeCache = withStylesCache.get(theme); if (!themeCache) { return null; } var componentCache = themeCache.get(component); if (!componentCache) { return null; } return componentCache[direction]; } function updateComponentCache(theme, component, direction, results) { var themeCache = withStylesCache.get(theme); if (!themeCache) { themeCache = typeof WeakMap === 'undefined' ? new Map() : new WeakMap(); withStylesCache.set(theme, themeCache); } var componentCache = themeCache.get(component); if (!componentCache) { componentCache = { ltr: {}, rtl: {} }; themeCache.set(component, componentCache); } componentCache[direction] = results; } /** Derive the create function from the interface and direction */ function makeCreateFn(direction, stylesInterface) { var directionSelector = direction === _WithStylesContext.DIRECTIONS.RTL ? 'RTL' : 'LTR'; var create = stylesInterface["create".concat(directionSelector)] || stylesInterface.create; var original = create; if (false) {} return { create: create, original: original }; } /** Derive the resolve function from the interface and direction */ function makeResolveFn(direction, stylesInterface) { var directionSelector = direction === _WithStylesContext.DIRECTIONS.RTL ? 'RTL' : 'LTR'; var resolve = stylesInterface["resolve".concat(directionSelector)] || stylesInterface.resolve; var original = resolve; if (false) {} return { resolve: resolve, original: original }; } // The function that wraps the provided component in a wrapper // component that injects the withStyles props return function withStylesHOC(WrappedComponent) { var wrappedComponentName = (0, _getComponentName["default"])(WrappedComponent); // The wrapper component that injects the withStyles props var WithStyles = /*#__PURE__*/function (_BaseClass) { (0, _inheritsLoose2["default"])(WithStyles, _BaseClass); function WithStyles() { return _BaseClass.apply(this, arguments) || this; } var _proto = WithStyles.prototype; _proto.getCurrentInterface = function getCurrentInterface() { // Fallback to the singleton implementation return this.context && this.context.stylesInterface || (0, _ThemedStyleSheet._getInterface)(); }; _proto.getCurrentTheme = function getCurrentTheme() { // Fallback to the singleton implementation return this.context && this.context.stylesTheme || (0, _ThemedStyleSheet._getTheme)(); }; _proto.getCurrentDirection = function getCurrentDirection() { return this.context && this.context.direction || _WithStylesContext.DIRECTIONS.LTR; }; _proto.getProps = function getProps() { // Get the styles interface, theme, and direction from context var stylesInterface = this.getCurrentInterface(); var theme = this.getCurrentTheme(); var direction = this.getCurrentDirection(); // Use a cache to store the interface methods and created styles by direction. // This way, if the theme and the interface don't change, we do not recalculate // styles or any other interface derivations. They are effectively only calculated // once per direction, until the theme or interface change. // Assume: always an object. var componentCache = getComponentCache(theme, WithStyles, direction); // Determine what's changed var interfaceChanged = !componentCache || !componentCache.stylesInterface || stylesInterface && componentCache.stylesInterface !== stylesInterface; var themeChanged = !componentCache || componentCache.theme !== theme; // If the interface and theme haven't changed for this direction, // we return the cached props immediately. if (!interfaceChanged && !themeChanged) { return componentCache.props; } // If the theme or the interface changed, then there are some values // we need to recalculate. We avoid recalculating the ones we already // calculated in the past if the objects they're derived from have not // changed. var createFn = interfaceChanged && makeCreateFn(direction, stylesInterface) || componentCache.create; var resolveFn = interfaceChanged && makeResolveFn(direction, stylesInterface) || componentCache.resolve; var create = createFn.create; var resolve = resolveFn.resolve; // Determine if create or resolve functions have changed, which will then // determine if we need to create new styles or css props var createChanged = !componentCache || !componentCache.create || createFn.original !== componentCache.create.original; var resolveChanged = !componentCache || !componentCache.resolve || resolveFn.original !== componentCache.resolve.original; // Derive the css function prop: recalculate it if resolve changed var css = resolveChanged && function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return resolve(args); } || componentCache.props.css; // Get or calculate the themed styles from the stylesFn: // Uses a separate cache at the component level, not at the instance level, // to only apply the theme to the stylesFn once per component class per theme. var stylesFnResult = getOrCreateStylesFnResultCache(theme); // Derive the styles prop: recalculate it if create changed, or stylesFnResult changed var styles = (createChanged || stylesFnResult !== componentCache.stylesFnResult) && create(stylesFnResult) || componentCache.props.styles; // Put the new props together var props = { css: css, styles: styles, theme: theme }; // Update the cache with all the new values updateComponentCache(theme, WithStyles, direction, { stylesInterface: stylesInterface, theme: theme, create: createFn, resolve: resolveFn, stylesFnResult: stylesFnResult, props: props }); return props; }; _proto.flush = function flush() { var stylesInterface = this.getCurrentInterface(); if (stylesInterface && stylesInterface.flush) { stylesInterface.flush(); } }; _proto.render = function render() { var _ref2; // We only want to re-render if the theme, stylesInterface, or direction change. // These values are in context so we're listening for their updates. // this.getProps() derives the props from the theme, stylesInterface, and direction in // context, and memoizes them on the instance per direction. var _this$getProps = this.getProps(), theme = _this$getProps.theme, styles = _this$getProps.styles, css = _this$getProps.css; // Flush if specified if (flushBefore) { this.flush(); } var _this$props = this.props, forwardedRef = _this$props.forwardedRef, rest = (0, _objectWithoutProperties2["default"])(_this$props, ["forwardedRef"]); return /*#__PURE__*/_react["default"].createElement(WrappedComponent // TODO: remove conditional once breaking change to only support React 16.3+ // ref: https://github.com/airbnb/react-with-styles/pull/240#discussion_r533497857 , (0, _extends2["default"])({ ref: typeof _react["default"].forwardRef === 'undefined' ? undefined : forwardedRef }, typeof _react["default"].forwardRef === 'undefined' ? this.props : rest, (_ref2 = {}, (0, _defineProperty2["default"])(_ref2, themePropName, theme), (0, _defineProperty2["default"])(_ref2, stylesPropName, styles), (0, _defineProperty2["default"])(_ref2, cssPropName, css), _ref2))); }; return WithStyles; }(BaseClass); // TODO: remove conditional once breaking change to only support React 16.3+ // ref: https://github.com/airbnb/react-with-styles/pull/240#discussion_r533497857 if (typeof _react["default"].forwardRef !== 'undefined') { WithStyles.propTypes = { forwardedRef: (0, _ref3["default"])() }; } // TODO: remove conditional once breaking change to only support React 16.3+ // ref: https://github.com/airbnb/react-with-styles/pull/240#discussion_r533497857 var ForwardedWithStyles = typeof _react["default"].forwardRef === 'undefined' ? WithStyles : /*#__PURE__*/_react["default"].forwardRef(function (props, forwardedRef) { return /*#__PURE__*/_react["default"].createElement(WithStyles, (0, _extends2["default"])({}, props, { forwardedRef: forwardedRef })); }); // Copy the wrapped component's prop types and default props on WithStyles if (WrappedComponent.propTypes) { ForwardedWithStyles.propTypes = _objectSpread({}, WrappedComponent.propTypes); delete ForwardedWithStyles.propTypes[stylesPropName]; delete ForwardedWithStyles.propTypes[themePropName]; delete ForwardedWithStyles.propTypes[cssPropName]; } if (WrappedComponent.defaultProps) { ForwardedWithStyles.defaultProps = _objectSpread({}, WrappedComponent.defaultProps); } WithStyles.contextType = _WithStylesContext["default"]; ForwardedWithStyles.WrappedComponent = WrappedComponent; ForwardedWithStyles.displayName = "withStyles(".concat(wrappedComponentName, ")"); return (0, _hoistNonReactStatics["default"])(ForwardedWithStyles, WrappedComponent); }; } var _default = withStyles; /** * Deprecated: Do not use directly. Please wrap your component in `withStyles` and use the `css` * prop injected via props instead. */ exports["default"] = _default; var css = _ThemedStyleSheet["default"].resolveLTR; exports.css = css; /***/ }), /***/ 9351: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; var _interopRequireDefault = __webpack_require__(9736); Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = exports.withStylesPropTypes = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(2652)); var withStylesPropTypes = { styles: _propTypes["default"].object.isRequired, theme: _propTypes["default"].object.isRequired, css: _propTypes["default"].func.isRequired }; exports.withStylesPropTypes = withStylesPropTypes; var _default = withStylesPropTypes; exports["default"] = _default; /***/ }), /***/ 9196: /***/ ((module) => { "use strict"; module.exports = window["React"]; /***/ }), /***/ 6292: /***/ ((module) => { "use strict"; module.exports = window["moment"]; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "AnglePickerControl": () => (/* reexport */ AnglePickerControl), "Animate": () => (/* reexport */ Animate), "Autocomplete": () => (/* reexport */ Autocomplete), "BaseControl": () => (/* reexport */ base_control), "BlockQuotation": () => (/* reexport */ external_wp_primitives_namespaceObject.BlockQuotation), "Button": () => (/* reexport */ build_module_button), "ButtonGroup": () => (/* reexport */ button_group), "Card": () => (/* reexport */ card_component), "CardBody": () => (/* reexport */ card_body_component), "CardDivider": () => (/* reexport */ card_divider_component), "CardFooter": () => (/* reexport */ card_footer_component), "CardHeader": () => (/* reexport */ card_header_component), "CardMedia": () => (/* reexport */ card_media_component), "CheckboxControl": () => (/* reexport */ checkbox_control), "Circle": () => (/* reexport */ external_wp_primitives_namespaceObject.Circle), "ClipboardButton": () => (/* reexport */ ClipboardButton), "ColorIndicator": () => (/* reexport */ color_indicator), "ColorPalette": () => (/* reexport */ ColorPalette), "ColorPicker": () => (/* reexport */ LegacyAdapter), "ComboboxControl": () => (/* reexport */ combobox_control), "CustomGradientPicker": () => (/* reexport */ CustomGradientPicker), "CustomSelectControl": () => (/* reexport */ CustomSelectControl), "Dashicon": () => (/* reexport */ dashicon), "DatePicker": () => (/* reexport */ date), "DateTimePicker": () => (/* reexport */ build_module_date_time), "Disabled": () => (/* reexport */ disabled), "Draggable": () => (/* reexport */ Draggable), "DropZone": () => (/* reexport */ DropZoneComponent), "DropZoneProvider": () => (/* reexport */ DropZoneProvider), "Dropdown": () => (/* reexport */ Dropdown), "DropdownMenu": () => (/* reexport */ dropdown_menu), "DuotonePicker": () => (/* reexport */ duotone_picker), "DuotoneSwatch": () => (/* reexport */ duotone_swatch), "ExternalLink": () => (/* reexport */ external_link), "Fill": () => (/* reexport */ slot_fill_Fill), "Flex": () => (/* reexport */ flex_component), "FlexBlock": () => (/* reexport */ flex_block_component), "FlexItem": () => (/* reexport */ flex_item_component), "FocalPointPicker": () => (/* reexport */ focal_point_picker), "FocusReturnProvider": () => (/* reexport */ with_focus_return_Provider), "FocusableIframe": () => (/* reexport */ FocusableIframe), "FontSizePicker": () => (/* reexport */ font_size_picker), "FormFileUpload": () => (/* reexport */ form_file_upload), "FormToggle": () => (/* reexport */ form_toggle), "FormTokenField": () => (/* reexport */ form_token_field), "G": () => (/* reexport */ external_wp_primitives_namespaceObject.G), "GradientPicker": () => (/* reexport */ GradientPicker), "Guide": () => (/* reexport */ Guide), "GuidePage": () => (/* reexport */ GuidePage), "HorizontalRule": () => (/* reexport */ external_wp_primitives_namespaceObject.HorizontalRule), "Icon": () => (/* reexport */ build_module_icon), "IconButton": () => (/* reexport */ deprecated), "IsolatedEventContainer": () => (/* reexport */ isolated_event_container), "KeyboardShortcuts": () => (/* reexport */ keyboard_shortcuts), "MenuGroup": () => (/* reexport */ menu_group), "MenuItem": () => (/* reexport */ menu_item), "MenuItemsChoice": () => (/* reexport */ MenuItemsChoice), "Modal": () => (/* reexport */ modal), "NavigableMenu": () => (/* reexport */ navigable_container_menu), "Notice": () => (/* reexport */ build_module_notice), "NoticeList": () => (/* reexport */ list), "Panel": () => (/* reexport */ panel), "PanelBody": () => (/* reexport */ body), "PanelHeader": () => (/* reexport */ panel_header), "PanelRow": () => (/* reexport */ row), "Path": () => (/* reexport */ external_wp_primitives_namespaceObject.Path), "Placeholder": () => (/* reexport */ placeholder), "Polygon": () => (/* reexport */ external_wp_primitives_namespaceObject.Polygon), "Popover": () => (/* reexport */ popover), "QueryControls": () => (/* reexport */ QueryControls), "RadioControl": () => (/* reexport */ radio_control), "RangeControl": () => (/* reexport */ range_control), "Rect": () => (/* reexport */ external_wp_primitives_namespaceObject.Rect), "ResizableBox": () => (/* reexport */ resizable_box), "ResponsiveWrapper": () => (/* reexport */ responsive_wrapper), "SVG": () => (/* reexport */ external_wp_primitives_namespaceObject.SVG), "SandBox": () => (/* reexport */ Sandbox), "ScrollLock": () => (/* reexport */ scroll_lock), "SearchControl": () => (/* reexport */ search_control), "SelectControl": () => (/* reexport */ select_control), "Slot": () => (/* reexport */ slot_fill_Slot), "SlotFillProvider": () => (/* reexport */ Provider), "Snackbar": () => (/* reexport */ snackbar), "SnackbarList": () => (/* reexport */ snackbar_list), "Spinner": () => (/* reexport */ spinner), "TabPanel": () => (/* reexport */ TabPanel), "TabbableContainer": () => (/* reexport */ tabbable), "TextControl": () => (/* reexport */ text_control), "TextHighlight": () => (/* reexport */ text_highlight), "TextareaControl": () => (/* reexport */ textarea_control), "TimePicker": () => (/* reexport */ time), "Tip": () => (/* reexport */ build_module_tip), "ToggleControl": () => (/* reexport */ ToggleControl), "Toolbar": () => (/* reexport */ toolbar), "ToolbarButton": () => (/* reexport */ toolbar_button), "ToolbarDropdownMenu": () => (/* reexport */ toolbar_dropdown_menu), "ToolbarGroup": () => (/* reexport */ toolbar_group), "ToolbarItem": () => (/* reexport */ toolbar_item), "Tooltip": () => (/* reexport */ tooltip), "TreeSelect": () => (/* reexport */ tree_select), "VisuallyHidden": () => (/* reexport */ visually_hidden_component), "__experimentalAlignmentMatrixControl": () => (/* reexport */ AlignmentMatrixControl), "__experimentalApplyValueToSides": () => (/* reexport */ applyValueToSides), "__experimentalBorderBoxControl": () => (/* reexport */ border_box_control_component), "__experimentalBorderControl": () => (/* reexport */ border_control_component), "__experimentalBoxControl": () => (/* reexport */ BoxControl), "__experimentalConfirmDialog": () => (/* reexport */ confirm_dialog_component), "__experimentalDimensionControl": () => (/* reexport */ dimension_control), "__experimentalDivider": () => (/* reexport */ divider_component), "__experimentalDropdownContentWrapper": () => (/* reexport */ dropdown_content_wrapper), "__experimentalElevation": () => (/* reexport */ elevation_component), "__experimentalGrid": () => (/* reexport */ grid_component), "__experimentalHStack": () => (/* reexport */ h_stack_component), "__experimentalHasSplitBorders": () => (/* reexport */ hasSplitBorders), "__experimentalHeading": () => (/* reexport */ heading_component), "__experimentalInputControl": () => (/* reexport */ input_control), "__experimentalInputControlPrefixWrapper": () => (/* reexport */ input_prefix_wrapper), "__experimentalInputControlSuffixWrapper": () => (/* reexport */ input_suffix_wrapper), "__experimentalIsDefinedBorder": () => (/* reexport */ isDefinedBorder), "__experimentalIsEmptyBorder": () => (/* reexport */ isEmptyBorder), "__experimentalItem": () => (/* reexport */ item_component), "__experimentalItemGroup": () => (/* reexport */ item_group_component), "__experimentalNavigation": () => (/* reexport */ Navigation), "__experimentalNavigationBackButton": () => (/* reexport */ back_button), "__experimentalNavigationGroup": () => (/* reexport */ NavigationGroup), "__experimentalNavigationItem": () => (/* reexport */ NavigationItem), "__experimentalNavigationMenu": () => (/* reexport */ NavigationMenu), "__experimentalNavigatorBackButton": () => (/* reexport */ navigator_back_button_component), "__experimentalNavigatorButton": () => (/* reexport */ navigator_button_component), "__experimentalNavigatorProvider": () => (/* reexport */ navigator_provider_component), "__experimentalNavigatorScreen": () => (/* reexport */ navigator_screen_component), "__experimentalNumberControl": () => (/* reexport */ number_control), "__experimentalPaletteEdit": () => (/* reexport */ PaletteEdit), "__experimentalParseQuantityAndUnitFromRawValue": () => (/* reexport */ parseQuantityAndUnitFromRawValue), "__experimentalRadio": () => (/* reexport */ build_module_radio), "__experimentalRadioGroup": () => (/* reexport */ radio_group), "__experimentalScrollable": () => (/* reexport */ scrollable_component), "__experimentalSpacer": () => (/* reexport */ spacer_component), "__experimentalStyleProvider": () => (/* reexport */ style_provider), "__experimentalSurface": () => (/* reexport */ surface_component), "__experimentalText": () => (/* reexport */ text_component), "__experimentalToggleGroupControl": () => (/* reexport */ toggle_group_control_component), "__experimentalToggleGroupControlOption": () => (/* reexport */ ToggleGroupControlOption), "__experimentalToggleGroupControlOptionIcon": () => (/* reexport */ ToggleGroupControlOptionIcon), "__experimentalToolbarContext": () => (/* reexport */ toolbar_context), "__experimentalToolsPanel": () => (/* reexport */ tools_panel_component), "__experimentalToolsPanelContext": () => (/* reexport */ ToolsPanelContext), "__experimentalToolsPanelItem": () => (/* reexport */ tools_panel_item_component), "__experimentalTreeGrid": () => (/* reexport */ tree_grid), "__experimentalTreeGridCell": () => (/* reexport */ cell), "__experimentalTreeGridItem": () => (/* reexport */ tree_grid_item), "__experimentalTreeGridRow": () => (/* reexport */ tree_grid_row), "__experimentalTruncate": () => (/* reexport */ truncate_component), "__experimentalUnitControl": () => (/* reexport */ unit_control), "__experimentalUseCustomUnits": () => (/* reexport */ useCustomUnits), "__experimentalUseNavigator": () => (/* reexport */ use_navigator), "__experimentalUseSlot": () => (/* reexport */ use_slot_useSlot), "__experimentalVStack": () => (/* reexport */ v_stack_component), "__experimentalView": () => (/* reexport */ component), "__experimentalZStack": () => (/* reexport */ z_stack_component), "__unstableComposite": () => (/* reexport */ Composite), "__unstableCompositeGroup": () => (/* reexport */ CompositeGroup), "__unstableCompositeItem": () => (/* reexport */ CompositeItem), "__unstableDisclosureContent": () => (/* reexport */ DisclosureContent), "__unstableGetAnimateClassName": () => (/* reexport */ getAnimateClassName), "__unstableMotion": () => (/* reexport */ motion), "__unstableUseAutocompleteProps": () => (/* reexport */ useAutocompleteProps), "__unstableUseCompositeState": () => (/* reexport */ useCompositeState), "__unstableUseNavigateRegions": () => (/* reexport */ useNavigateRegions), "createSlotFill": () => (/* reexport */ createSlotFill), "navigateRegions": () => (/* reexport */ navigate_regions), "withConstrainedTabbing": () => (/* reexport */ with_constrained_tabbing), "withFallbackStyles": () => (/* reexport */ with_fallback_styles), "withFilters": () => (/* reexport */ withFilters), "withFocusOutside": () => (/* reexport */ with_focus_outside), "withFocusReturn": () => (/* reexport */ with_focus_return), "withNotices": () => (/* reexport */ with_notices), "withSpokenMessages": () => (/* reexport */ with_spoken_messages) }); // NAMESPACE OBJECT: ./packages/components/build-module/text/styles.js var text_styles_namespaceObject = {}; __webpack_require__.r(text_styles_namespaceObject); __webpack_require__.d(text_styles_namespaceObject, { "Text": () => (Text), "block": () => (styles_block), "destructive": () => (destructive), "highlighterText": () => (highlighterText), "muted": () => (muted), "positive": () => (positive), "upperCase": () => (upperCase) }); // NAMESPACE OBJECT: ./packages/components/build-module/ui/tooltip/styles.js var tooltip_styles_namespaceObject = {}; __webpack_require__.r(tooltip_styles_namespaceObject); __webpack_require__.d(tooltip_styles_namespaceObject, { "TooltipContent": () => (TooltipContent), "TooltipPopoverView": () => (TooltipPopoverView), "TooltipShortcut": () => (TooltipShortcut), "noOutline": () => (noOutline) }); // NAMESPACE OBJECT: ./packages/components/build-module/toggle-group-control/toggle-group-control-option-base/styles.js var toggle_group_control_option_base_styles_namespaceObject = {}; __webpack_require__.r(toggle_group_control_option_base_styles_namespaceObject); __webpack_require__.d(toggle_group_control_option_base_styles_namespaceObject, { "ButtonContentView": () => (ButtonContentView), "LabelView": () => (LabelView), "buttonActive": () => (buttonActive), "buttonView": () => (buttonView), "labelBlock": () => (labelBlock), "separatorActive": () => (separatorActive) }); ;// CONCATENATED MODULE: external ["wp","primitives"] const external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function extends_extends() { extends_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; }; return extends_extends.apply(this, arguments); } ;// CONCATENATED MODULE: external ["wp","element"] const external_wp_element_namespaceObject = window["wp"]["element"]; // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__(4403); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); ;// CONCATENATED MODULE: external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// CONCATENATED MODULE: external ["wp","compose"] const external_wp_compose_namespaceObject = window["wp"]["compose"]; ;// CONCATENATED MODULE: ./node_modules/reakit/es/_rollupPluginBabelHelpers-1f0bf8c2.js 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; } 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; } function _objectSpread2(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) { _defineProperty(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; } function _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } 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(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 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; } function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } // EXTERNAL MODULE: external "React" var external_React_ = __webpack_require__(9196); var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_); ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/_rollupPluginBabelHelpers-0c84a174.js function _rollupPluginBabelHelpers_0c84a174_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; } function _rollupPluginBabelHelpers_0c84a174_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; } function _rollupPluginBabelHelpers_0c84a174_objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source), true).forEach(function (key) { _rollupPluginBabelHelpers_0c84a174_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { _rollupPluginBabelHelpers_0c84a174_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _rollupPluginBabelHelpers_0c84a174_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _rollupPluginBabelHelpers_0c84a174_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(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _rollupPluginBabelHelpers_0c84a174_arrayLikeToArray(o, minLen); } function _rollupPluginBabelHelpers_0c84a174_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; } function _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_0c84a174_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/SystemContext.js var SystemContext = /*#__PURE__*/(0,external_React_.createContext)({}); ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useCreateElement.js function isRenderProp(children) { return typeof children === "function"; } /** * Custom hook that will call `children` if it's a function. If * `useCreateElement` has been passed to the context, it'll be used instead. * * @example * import React from "react"; * import { SystemProvider, useCreateElement } from "reakit-system"; * * const system = { * useCreateElement(type, props, children = props.children) { * // very similar to what `useCreateElement` does already * if (typeof children === "function") { * const { children: _, ...rest } = props; * return children(rest); * } * return React.createElement(type, props, children); * }, * }; * * function Component(props) { * return useCreateElement("div", props); * } * * function App() { * return ( * * {({ url }) => link} * * ); * } */ var useCreateElement = function useCreateElement(type, props, children) { if (children === void 0) { children = props.children; } var context = (0,external_React_.useContext)(SystemContext); if (context.useCreateElement) { return context.useCreateElement(type, props, children); } if (typeof type === "string" && isRenderProp(children)) { var _ = props.children, rest = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(props, ["children"]); return children(rest); } return /*#__PURE__*/(0,external_React_.createElement)(type, props, children); }; ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/_rollupPluginBabelHelpers-1f0bf8c2.js function _rollupPluginBabelHelpers_1f0bf8c2_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; } function _rollupPluginBabelHelpers_1f0bf8c2_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; } function _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source), true).forEach(function (key) { _rollupPluginBabelHelpers_1f0bf8c2_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { _rollupPluginBabelHelpers_1f0bf8c2_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function es_rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _rollupPluginBabelHelpers_1f0bf8c2_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _rollupPluginBabelHelpers_1f0bf8c2_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(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _rollupPluginBabelHelpers_1f0bf8c2_arrayLikeToArray(o, minLen); } function _rollupPluginBabelHelpers_1f0bf8c2_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; } function _rollupPluginBabelHelpers_1f0bf8c2_createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _rollupPluginBabelHelpers_1f0bf8c2_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } it = o[Symbol.iterator](); return it.next.bind(it); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isObject.js /** * Checks whether `arg` is an object or not. * * @returns {boolean} */ function isObject_isObject(arg) { return typeof arg === "object" && arg != null; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPlainObject.js /** * Checks whether `arg` is a plain object or not. * * @returns {boolean} */ function isPlainObject(arg) { var _proto$constructor; if (!isObject_isObject(arg)) return false; var proto = Object.getPrototypeOf(arg); if (proto == null) return true; return ((_proto$constructor = proto.constructor) === null || _proto$constructor === void 0 ? void 0 : _proto$constructor.toString()) === Object.toString(); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/splitProps.js /** * Splits an object (`props`) into a tuple where the first item is an object * with the passed `keys`, and the second item is an object with these keys * omitted. * * @deprecated will be removed in version 2 * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] */ function __deprecatedSplitProps(props, keys) { var propsKeys = Object.keys(props); var picked = {}; var omitted = {}; for (var _i = 0, _propsKeys = propsKeys; _i < _propsKeys.length; _i++) { var key = _propsKeys[_i]; if (keys.indexOf(key) >= 0) { picked[key] = props[key]; } else { omitted[key] = props[key]; } } return [picked, omitted]; } /** * Splits an object (`props`) into a tuple where the first item * is the `state` property, and the second item is the rest of the properties. * * It is also backward compatible with version 1. If `keys` are passed then * splits an object (`props`) into a tuple where the first item is an object * with the passed `keys`, and the second item is an object with these keys * omitted. * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ a: "a", b: "b" }, ["a"]); // [{ a: "a" }, { b: "b" }] * * @example * import { splitProps } from "reakit-utils"; * * splitProps({ state: { a: "a" }, b: "b" }); // [{ a: "a" }, { b: "b" }] */ function splitProps(props, keys) { if (keys === void 0) { keys = []; } if (!isPlainObject(props.state)) { return __deprecatedSplitProps(props, keys); } var _deprecatedSplitProp = __deprecatedSplitProps(props, [].concat(keys, ["state"])), picked = _deprecatedSplitProp[0], omitted = _deprecatedSplitProp[1]; var state = picked.state, restPicked = es_rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(picked, ["state"]); return [_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, state), restPicked), omitted]; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/shallowEqual.js /** * Compares two objects. * * @example * import { shallowEqual } from "reakit-utils"; * * shallowEqual({ a: "a" }, {}); // false * shallowEqual({ a: "a" }, { b: "b" }); // false * shallowEqual({ a: "a" }, { a: "a" }); // true * shallowEqual({ a: "a" }, { a: "a", b: "b" }); // false */ function shallowEqual(objA, objB) { if (objA === objB) return true; if (!objA) return false; if (!objB) return false; if (typeof objA !== "object") return false; if (typeof objB !== "object") return false; var aKeys = Object.keys(objA); var bKeys = Object.keys(objB); var length = aKeys.length; if (bKeys.length !== length) return false; for (var _i = 0, _aKeys = aKeys; _i < _aKeys.length; _i++) { var key = _aKeys[_i]; if (objA[key] !== objB[key]) { return false; } } return true; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/normalizePropsAreEqual.js /** * This higher order functions take `propsAreEqual` function and * returns a new function which normalizes the props. * * Normalizing in our case is making sure the `propsAreEqual` works with * both version 1 (object spreading) and version 2 (state object) state passing. * * To achieve this, the returned function in case of a state object * will spread the state object in both `prev` and `next props. * * Other case it just returns the function as is which makes sure * that we are still backward compatible */ function normalizePropsAreEqual(propsAreEqual) { if (propsAreEqual.name === "normalizePropsAreEqualInner") { return propsAreEqual; } return function normalizePropsAreEqualInner(prev, next) { if (!isPlainObject(prev.state) || !isPlainObject(next.state)) { return propsAreEqual(prev, next); } return propsAreEqual(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, prev.state), prev), _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, next.state), next)); }; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createComponent.js function createComponent_forwardRef(component) { return /*#__PURE__*/(0,external_React_.forwardRef)(component); } function memo(component, propsAreEqual) { return /*#__PURE__*/(0,external_React_.memo)(component, propsAreEqual); } /** * Creates a React component. * * @example * import { createComponent } from "reakit-system"; * * const A = createComponent({ as: "a" }); * * @param options */ function createComponent(_ref) { var type = _ref.as, useHook = _ref.useHook, shouldMemo = _ref.memo, _ref$propsAreEqual = _ref.propsAreEqual, propsAreEqual = _ref$propsAreEqual === void 0 ? useHook === null || useHook === void 0 ? void 0 : useHook.unstable_propsAreEqual : _ref$propsAreEqual, _ref$keys = _ref.keys, keys = _ref$keys === void 0 ? (useHook === null || useHook === void 0 ? void 0 : useHook.__keys) || [] : _ref$keys, _ref$useCreateElement = _ref.useCreateElement, useCreateElement$1 = _ref$useCreateElement === void 0 ? useCreateElement : _ref$useCreateElement; var Comp = function Comp(_ref2, ref) { var _ref2$as = _ref2.as, as = _ref2$as === void 0 ? type : _ref2$as, props = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_ref2, ["as"]); if (useHook) { var _as$render; var _splitProps = splitProps(props, keys), _options = _splitProps[0], htmlProps = _splitProps[1]; var _useHook = useHook(_options, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ ref: ref }, htmlProps)), wrapElement = _useHook.wrapElement, elementProps = _rollupPluginBabelHelpers_0c84a174_objectWithoutPropertiesLoose(_useHook, ["wrapElement"]); // @ts-ignore var asKeys = ((_as$render = as.render) === null || _as$render === void 0 ? void 0 : _as$render.__keys) || as.__keys; var asOptions = asKeys && splitProps(props, asKeys)[0]; var allProps = asOptions ? _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, elementProps), asOptions) : elementProps; var _element = useCreateElement$1(as, allProps); if (wrapElement) { return wrapElement(_element); } return _element; } return useCreateElement$1(as, _rollupPluginBabelHelpers_0c84a174_objectSpread2({ ref: ref }, props)); }; if (false) {} Comp = createComponent_forwardRef(Comp); if (shouldMemo) { Comp = memo(Comp, propsAreEqual && normalizePropsAreEqual(propsAreEqual)); } Comp.__keys = keys; Comp.unstable_propsAreEqual = normalizePropsAreEqual(propsAreEqual || shallowEqual); return Comp; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useToken.js /** * React custom hook that returns the value of any token defined in the * SystemContext. It's mainly used internally in [`useOptions`](#useoptions) * and [`useProps`](#useprops). * * @example * import { SystemProvider, useToken } from "reakit-system"; * * const system = { * token: "value", * }; * * function Component(props) { * const token = useToken("token", "default value"); * return
{token}
; * } * * function App() { * return ( * * * * ); * } */ function useToken(token, defaultValue) { (0,external_React_.useDebugValue)(token); var context = (0,external_React_.useContext)(SystemContext); return context[token] != null ? context[token] : defaultValue; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useProps.js /** * React custom hook that returns the props returned by a given * `use${name}Props` in the SystemContext. * * @example * import { SystemProvider, useProps } from "reakit-system"; * * const system = { * useAProps(options, htmlProps) { * return { * ...htmlProps, * href: options.url, * }; * }, * }; * * function A({ url, ...htmlProps }) { * const props = useProps("A", { url }, htmlProps); * return ; * } * * function App() { * return ( * * It will convert url into href in useAProps * * ); * } */ function useProps(name, options, htmlProps) { if (options === void 0) { options = {}; } if (htmlProps === void 0) { htmlProps = {}; } var hookName = "use" + name + "Props"; (0,external_React_.useDebugValue)(hookName); var useHook = useToken(hookName); if (useHook) { return useHook(options, htmlProps); } return htmlProps; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/useOptions.js /** * React custom hook that returns the options returned by a given * `use${name}Options` in the SystemContext. * * @example * import React from "react"; * import { SystemProvider, useOptions } from "reakit-system"; * * const system = { * useAOptions(options, htmlProps) { * return { * ...options, * url: htmlProps.href, * }; * }, * }; * * function A({ url, ...htmlProps }) { * const options = useOptions("A", { url }, htmlProps); * return ; * } * * function App() { * return ( * * * It will convert href into url in useAOptions and then url into href in A * * * ); * } */ function useOptions(name, options, htmlProps) { if (options === void 0) { options = {}; } if (htmlProps === void 0) { htmlProps = {}; } var hookName = "use" + name + "Options"; (0,external_React_.useDebugValue)(hookName); var useHook = useToken(hookName); if (useHook) { return _rollupPluginBabelHelpers_0c84a174_objectSpread2(_rollupPluginBabelHelpers_0c84a174_objectSpread2({}, options), useHook(options, htmlProps)); } return options; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/toArray.js /** * Transforms `arg` into an array if it's not already. * * @example * import { toArray } from "reakit-utils"; * * toArray("a"); // ["a"] * toArray(["a"]); // ["a"] */ function toArray(arg) { if (Array.isArray(arg)) { return arg; } return typeof arg !== "undefined" ? [arg] : []; } ;// CONCATENATED MODULE: ./node_modules/reakit-system/es/createHook.js /** * Creates a React custom hook that will return component props. * * @example * import { createHook } from "reakit-system"; * * const useA = createHook({ * name: "A", * keys: ["url"], // custom props/options keys * useProps(options, htmlProps) { * return { * ...htmlProps, * href: options.url, * }; * }, * }); * * function A({ url, ...htmlProps }) { * const props = useA({ url }, htmlProps); * return ; * } * * @param options */ function createHook(options) { var _options$useState, _composedHooks$; var composedHooks = toArray(options.compose); var __useOptions = function __useOptions(hookOptions, htmlProps) { // Call the current hook's useOptions first if (options.useOptions) { hookOptions = options.useOptions(hookOptions, htmlProps); } // If there's name, call useOptions from the system context if (options.name) { hookOptions = useOptions(options.name, hookOptions, htmlProps); } // Run composed hooks useOptions if (options.compose) { for (var _iterator = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step; !(_step = _iterator()).done;) { var hook = _step.value; hookOptions = hook.__useOptions(hookOptions, htmlProps); } } return hookOptions; }; var useHook = function useHook(hookOptions, htmlProps, unstable_ignoreUseOptions) { if (hookOptions === void 0) { hookOptions = {}; } if (htmlProps === void 0) { htmlProps = {}; } if (unstable_ignoreUseOptions === void 0) { unstable_ignoreUseOptions = false; } // This won't execute when useHook was called from within another useHook if (!unstable_ignoreUseOptions) { hookOptions = __useOptions(hookOptions, htmlProps); } // Call the current hook's useProps if (options.useProps) { htmlProps = options.useProps(hookOptions, htmlProps); } // If there's name, call useProps from the system context if (options.name) { htmlProps = useProps(options.name, hookOptions, htmlProps); } if (options.compose) { if (options.useComposeOptions) { hookOptions = options.useComposeOptions(hookOptions, htmlProps); } if (options.useComposeProps) { htmlProps = options.useComposeProps(hookOptions, htmlProps); } else { for (var _iterator2 = _rollupPluginBabelHelpers_0c84a174_createForOfIteratorHelperLoose(composedHooks), _step2; !(_step2 = _iterator2()).done;) { var hook = _step2.value; htmlProps = hook(hookOptions, htmlProps, true); } } } // Remove undefined values from htmlProps var finalHTMLProps = {}; var definedHTMLProps = htmlProps || {}; for (var prop in definedHTMLProps) { if (definedHTMLProps[prop] !== undefined) { finalHTMLProps[prop] = definedHTMLProps[prop]; } } return finalHTMLProps; }; useHook.__useOptions = __useOptions; var composedKeys = composedHooks.reduce(function (keys, hook) { keys.push.apply(keys, hook.__keys || []); return keys; }, []); // It's used by createComponent to split option props (keys) and html props useHook.__keys = [].concat(composedKeys, ((_options$useState = options.useState) === null || _options$useState === void 0 ? void 0 : _options$useState.__keys) || [], options.keys || []); useHook.unstable_propsAreEqual = options.propsAreEqual || ((_composedHooks$ = composedHooks[0]) === null || _composedHooks$ === void 0 ? void 0 : _composedHooks$.unstable_propsAreEqual) || shallowEqual; if (false) {} return useHook; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useForkRef.js // https://github.com/mui-org/material-ui/blob/2bcc874cf07b81202968f769cb9c2398c7c11311/packages/material-ui/src/utils/useForkRef.js function setRef(ref, value) { if (value === void 0) { value = null; } if (!ref) return; if (typeof ref === "function") { ref(value); } else { ref.current = value; } } /** * Merges up to two React Refs into a single memoized function React Ref so you * can pass it to an element. * * @example * import React from "react"; * import { useForkRef } from "reakit-utils"; * * const Component = React.forwardRef((props, ref) => { * const internalRef = React.useRef(); * return
; * }); */ function useForkRef(refA, refB) { return (0,external_React_.useMemo)(function () { if (refA == null && refB == null) { return null; } return function (value) { setRef(refA, value); setRef(refB, value); }; }, [refA, refB]); } ;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/useWarning.js function isRefObject(ref) { return isObject(ref) && "current" in ref; } /** * Logs `messages` to the console using `console.warn` based on a `condition`. * This should be used inside components. */ function useWarning(condition) { for (var _len = arguments.length, messages = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { messages[_key - 1] = arguments[_key]; } if (false) {} } ;// CONCATENATED MODULE: ./node_modules/reakit-warning/es/index.js ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getDocument.js /** * Returns `element.ownerDocument || document`. */ function getDocument(element) { return element ? element.ownerDocument || element : document; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getWindow.js // Thanks to Fluent UI for doing the [research on IE11 memery leak](https://github.com/microsoft/fluentui/pull/9010#issuecomment-490768427) var _window; // Note: Accessing "window" in IE11 is somewhat expensive, and calling "typeof window" // hits a memory leak, whereas aliasing it and calling "typeof _window" does not. // Caching the window value at the file scope lets us minimize the impact. try { _window = window; } catch (e) { /* no-op */ } /** * Returns `element.ownerDocument.defaultView || window`. */ function getWindow(element) { if (!element) { return _window; } return getDocument(element).defaultView || _window; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/canUseDOM.js function checkIsBrowser() { var _window = getWindow(); return Boolean(typeof _window !== "undefined" && _window.document && _window.document.createElement); } /** * It's `true` if it is running in a browser environment or `false` if it is not (SSR). * * @example * import { canUseDOM } from "reakit-utils"; * * const title = canUseDOM ? document.title : ""; */ var canUseDOM = checkIsBrowser(); ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useIsomorphicEffect.js /** * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side * rendering. */ var useIsomorphicEffect = !canUseDOM ? external_React_.useEffect : external_React_.useLayoutEffect; ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useLiveRef.js /** * A `React.Ref` that keeps track of the passed `value`. */ function useLiveRef(value) { var ref = (0,external_React_.useRef)(value); useIsomorphicEffect(function () { ref.current = value; }); return ref; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isSelfTarget.js /** * Returns `true` if `event.target` and `event.currentTarget` are the same. */ function isSelfTarget(event) { return event.target === event.currentTarget; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getActiveElement.js /** * Returns `element.ownerDocument.activeElement`. */ function getActiveElement_getActiveElement(element) { var _getDocument = getDocument(element), activeElement = _getDocument.activeElement; if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) { // In IE11, activeElement might be an empty object if we're interacting // with elements inside of an iframe. return null; } return activeElement; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/contains.js /** * Similar to `Element.prototype.contains`, but a little bit faster when * `element` is the same as `child`. * * @example * import { contains } from "reakit-utils"; * * contains(document.getElementById("parent"), document.getElementById("child")); */ function contains(parent, child) { return parent === child || parent.contains(child); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocusWithin.js /** * Checks if `element` has focus within. Elements that are referenced by * `aria-activedescendant` are also considered. * * @example * import { hasFocusWithin } from "reakit-utils"; * * hasFocusWithin(document.getElementById("id")); */ function hasFocusWithin(element) { var activeElement = getActiveElement_getActiveElement(element); if (!activeElement) return false; if (contains(element, activeElement)) return true; var activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; if (activeDescendant === element.id) return true; return !!element.querySelector("#" + activeDescendant); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isPortalEvent.js /** * Returns `true` if `event` has been fired within a React Portal element. */ function isPortalEvent(event) { return !contains(event.currentTarget, event.target); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isButton.js var buttonInputTypes = ["button", "color", "file", "image", "reset", "submit"]; /** * Checks whether `element` is a native HTML button element. * * @example * import { isButton } from "reakit-utils"; * * isButton(document.querySelector("button")); // true * isButton(document.querySelector("input[type='button']")); // true * isButton(document.querySelector("div")); // false * isButton(document.querySelector("input[type='text']")); // false * isButton(document.querySelector("div[role='button']")); // false * * @returns {boolean} */ function isButton(element) { if (element.tagName === "BUTTON") return true; if (element.tagName === "INPUT") { var input = element; return buttonInputTypes.indexOf(input.type) !== -1; } return false; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/dom.js /** * Checks if a given string exists in the user agent string. */ function isUA(string) { if (!canUseDOM) return false; return window.navigator.userAgent.indexOf(string) !== -1; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/matches.js /** * Ponyfill for `Element.prototype.matches` * * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches */ function matches(element, selectors) { if ("matches" in element) { return element.matches(selectors); } if ("msMatchesSelector" in element) { return element.msMatchesSelector(selectors); } return element.webkitMatchesSelector(selectors); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/tabbable.js /** @module tabbable */ 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'])"; function isVisible(element) { var htmlElement = element; return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0; } function hasNegativeTabIndex(element) { var tabIndex = parseInt(element.getAttribute("tabindex") || "0", 10); return tabIndex < 0; } /** * Checks whether `element` is focusable or not. * * @memberof tabbable * * @example * import { isFocusable } from "reakit-utils"; * * isFocusable(document.querySelector("input")); // true * isFocusable(document.querySelector("input[tabindex='-1']")); // true * isFocusable(document.querySelector("input[hidden]")); // false * isFocusable(document.querySelector("input:disabled")); // false */ function isFocusable(element) { return matches(element, selector) && isVisible(element); } /** * Checks whether `element` is tabbable or not. * * @memberof tabbable * * @example * import { isTabbable } from "reakit-utils"; * * isTabbable(document.querySelector("input")); // true * isTabbable(document.querySelector("input[tabindex='-1']")); // false * isTabbable(document.querySelector("input[hidden]")); // false * isTabbable(document.querySelector("input:disabled")); // false */ function isTabbable(element) { return isFocusable(element) && !hasNegativeTabIndex(element); } /** * Returns all the focusable elements in `container`. * * @memberof tabbable * * @param {Element} container * * @returns {Element[]} */ function getAllFocusableIn(container) { var allFocusable = Array.from(container.querySelectorAll(selector)); allFocusable.unshift(container); return allFocusable.filter(isFocusable); } /** * Returns the first focusable element in `container`. * * @memberof tabbable * * @param {Element} container * * @returns {Element|null} */ function getFirstFocusableIn(container) { var _getAllFocusableIn = getAllFocusableIn(container), first = _getAllFocusableIn[0]; return first || null; } /** * Returns all the tabbable elements in `container`, including the container * itself. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return focusable elements if there are no tabbable ones. * * @returns {Element[]} */ function getAllTabbableIn(container, fallbackToFocusable) { var allFocusable = Array.from(container.querySelectorAll(selector)); var allTabbable = allFocusable.filter(isTabbable); if (isTabbable(container)) { allTabbable.unshift(container); } if (!allTabbable.length && fallbackToFocusable) { return allFocusable; } return allTabbable; } /** * Returns the first tabbable element in `container`, including the container * itself if it's tabbable. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the first focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getFirstTabbableIn(container, fallbackToFocusable) { var _getAllTabbableIn = getAllTabbableIn(container, fallbackToFocusable), first = _getAllTabbableIn[0]; return first || null; } /** * Returns the last tabbable element in `container`, including the container * itself if it's tabbable. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the last focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getLastTabbableIn(container, fallbackToFocusable) { var allTabbable = getAllTabbableIn(container, fallbackToFocusable); return allTabbable[allTabbable.length - 1] || null; } /** * Returns the next tabbable element in `container`. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the next focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getNextTabbableIn(container, fallbackToFocusable) { var activeElement = getActiveElement(container); var allFocusable = getAllFocusableIn(container); var index = allFocusable.indexOf(activeElement); var slice = allFocusable.slice(index + 1); return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); } /** * Returns the previous tabbable element in `container`. * * @memberof tabbable * * @param {Element} container * @param fallbackToFocusable If `true`, it'll return the previous focusable element if there are no tabbable ones. * * @returns {Element|null} */ function getPreviousTabbableIn(container, fallbackToFocusable) { var activeElement = getActiveElement(container); var allFocusable = getAllFocusableIn(container).reverse(); var index = allFocusable.indexOf(activeElement); var slice = allFocusable.slice(index + 1); return slice.find(isTabbable) || allFocusable.find(isTabbable) || (fallbackToFocusable ? slice[0] : null); } /** * Returns the closest focusable element. * * @memberof tabbable * * @param {Element} container * * @returns {Element|null} */ function getClosestFocusable(element) { while (element && !isFocusable(element)) { element = closest(element, selector); } return element; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Role/Role.js // Automatically generated var ROLE_KEYS = ["unstable_system"]; var useRole = createHook({ name: "Role", keys: ROLE_KEYS, propsAreEqual: function propsAreEqual(prev, next) { var prevSystem = prev.unstable_system, prevProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(prev, ["unstable_system"]); var nextSystem = next.unstable_system, nextProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(next, ["unstable_system"]); if (prevSystem !== nextSystem && !shallowEqual(prevSystem, nextSystem)) { return false; } return shallowEqual(prevProps, nextProps); } }); var Role = createComponent({ as: "div", useHook: useRole }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Tabbable/Tabbable.js // Automatically generated var TABBABLE_KEYS = ["disabled", "focusable"]; var isSafariOrFirefoxOnMac = isUA("Mac") && !isUA("Chrome") && (isUA("Safari") || isUA("Firefox")); function focusIfNeeded(element) { if (!hasFocusWithin(element) && isFocusable(element)) { element.focus(); } } function isNativeTabbable(element) { return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA" || element.tagName === "A"; } function supportsDisabledAttribute(element) { return element.tagName === "BUTTON" || element.tagName === "INPUT" || element.tagName === "SELECT" || element.tagName === "TEXTAREA"; } function getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex) { if (trulyDisabled) { if (nativeTabbable && !supportsDisabled) { // Anchor, audio and video tags don't support the `disabled` attribute. // We must pass tabIndex={-1} so they don't receive focus on tab. return -1; } // Elements that support the `disabled` attribute don't need tabIndex. return undefined; } if (nativeTabbable) { // If the element is enabled and it's natively tabbable, we don't need to // specify a tabIndex attribute unless it's explicitly set by the user. return htmlTabIndex; } // If the element is enabled and is not natively tabbable, we have to // fallback tabIndex={0}. return htmlTabIndex || 0; } function useDisableEvent(htmlEventRef, disabled) { return (0,external_React_.useCallback)(function (event) { var _htmlEventRef$current; (_htmlEventRef$current = htmlEventRef.current) === null || _htmlEventRef$current === void 0 ? void 0 : _htmlEventRef$current.call(htmlEventRef, event); if (event.defaultPrevented) return; if (disabled) { event.stopPropagation(); event.preventDefault(); } }, [htmlEventRef, disabled]); } var useTabbable = createHook({ name: "Tabbable", compose: useRole, keys: TABBABLE_KEYS, useOptions: function useOptions(options, _ref) { var disabled = _ref.disabled; return _objectSpread2({ disabled: disabled }, options); }, useProps: function useProps(options, _ref2) { var htmlRef = _ref2.ref, htmlTabIndex = _ref2.tabIndex, htmlOnClickCapture = _ref2.onClickCapture, htmlOnMouseDownCapture = _ref2.onMouseDownCapture, htmlOnMouseDown = _ref2.onMouseDown, htmlOnKeyPressCapture = _ref2.onKeyPressCapture, htmlStyle = _ref2.style, htmlProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref2, ["ref", "tabIndex", "onClickCapture", "onMouseDownCapture", "onMouseDown", "onKeyPressCapture", "style"]); var ref = (0,external_React_.useRef)(null); var onClickCaptureRef = useLiveRef(htmlOnClickCapture); var onMouseDownCaptureRef = useLiveRef(htmlOnMouseDownCapture); var onMouseDownRef = useLiveRef(htmlOnMouseDown); var onKeyPressCaptureRef = useLiveRef(htmlOnKeyPressCapture); var trulyDisabled = !!options.disabled && !options.focusable; var _React$useState = (0,external_React_.useState)(true), nativeTabbable = _React$useState[0], setNativeTabbable = _React$useState[1]; var _React$useState2 = (0,external_React_.useState)(true), supportsDisabled = _React$useState2[0], setSupportsDisabled = _React$useState2[1]; var style = options.disabled ? _objectSpread2({ pointerEvents: "none" }, htmlStyle) : htmlStyle; useIsomorphicEffect(function () { var tabbable = ref.current; if (!tabbable) { false ? 0 : void 0; return; } if (!isNativeTabbable(tabbable)) { setNativeTabbable(false); } if (!supportsDisabledAttribute(tabbable)) { setSupportsDisabled(false); } }, []); var onClickCapture = useDisableEvent(onClickCaptureRef, options.disabled); var onMouseDownCapture = useDisableEvent(onMouseDownCaptureRef, options.disabled); var onKeyPressCapture = useDisableEvent(onKeyPressCaptureRef, options.disabled); var onMouseDown = (0,external_React_.useCallback)(function (event) { var _onMouseDownRef$curre; (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); var element = event.currentTarget; if (event.defaultPrevented) return; // Safari and Firefox on MacOS don't focus on buttons on mouse down // like other browsers/platforms. Instead, they focus on the closest // focusable ancestor element, which is ultimately the body element. So // we make sure to give focus to the tabbable element on mouse down so // it works consistently across browsers. if (!isSafariOrFirefoxOnMac) return; if (isPortalEvent(event)) return; if (!isButton(element)) return; // We can't focus right away after on mouse down, otherwise it would // prevent drag events from happening. So we schedule the focus to the // next animation frame. var raf = requestAnimationFrame(function () { element.removeEventListener("mouseup", focusImmediately, true); focusIfNeeded(element); }); // If mouseUp happens before the next animation frame (which is common // on touch screens or by just tapping the trackpad on MacBook's), we // cancel the animation frame and immediately focus on the element. var focusImmediately = function focusImmediately() { cancelAnimationFrame(raf); focusIfNeeded(element); }; // By listening to the event in the capture phase, we make sure the // focus event is fired before the onMouseUp and onMouseUpCapture React // events, which is aligned with the default browser behavior. element.addEventListener("mouseup", focusImmediately, { once: true, capture: true }); }, []); return _objectSpread2({ ref: useForkRef(ref, htmlRef), style: style, tabIndex: getTabIndex(trulyDisabled, nativeTabbable, supportsDisabled, htmlTabIndex), disabled: trulyDisabled && supportsDisabled ? true : undefined, "aria-disabled": options.disabled ? true : undefined, onClickCapture: onClickCapture, onMouseDownCapture: onMouseDownCapture, onMouseDown: onMouseDown, onKeyPressCapture: onKeyPressCapture }, htmlProps); } }); var Tabbable = createComponent({ as: "div", useHook: useTabbable }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Clickable/Clickable.js // Automatically generated var CLICKABLE_KEYS = ["unstable_clickOnEnter", "unstable_clickOnSpace"]; function isNativeClick(event) { var element = event.currentTarget; if (!event.isTrusted) return false; // istanbul ignore next: can't test trusted events yet return isButton(element) || element.tagName === "INPUT" || element.tagName === "TEXTAREA" || element.tagName === "A" || element.tagName === "SELECT"; } var useClickable = createHook({ name: "Clickable", compose: useTabbable, keys: CLICKABLE_KEYS, useOptions: function useOptions(_ref) { var _ref$unstable_clickOn = _ref.unstable_clickOnEnter, unstable_clickOnEnter = _ref$unstable_clickOn === void 0 ? true : _ref$unstable_clickOn, _ref$unstable_clickOn2 = _ref.unstable_clickOnSpace, unstable_clickOnSpace = _ref$unstable_clickOn2 === void 0 ? true : _ref$unstable_clickOn2, options = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref, ["unstable_clickOnEnter", "unstable_clickOnSpace"]); return _objectSpread2({ unstable_clickOnEnter: unstable_clickOnEnter, unstable_clickOnSpace: unstable_clickOnSpace }, options); }, useProps: function useProps(options, _ref2) { var htmlOnKeyDown = _ref2.onKeyDown, htmlOnKeyUp = _ref2.onKeyUp, htmlProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref2, ["onKeyDown", "onKeyUp"]); var _React$useState = (0,external_React_.useState)(false), active = _React$useState[0], setActive = _React$useState[1]; var onKeyDownRef = useLiveRef(htmlOnKeyDown); var onKeyUpRef = useLiveRef(htmlOnKeyUp); var onKeyDown = (0,external_React_.useCallback)(function (event) { var _onKeyDownRef$current; (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); if (event.defaultPrevented) return; if (options.disabled) return; if (event.metaKey) return; if (!isSelfTarget(event)) return; var isEnter = options.unstable_clickOnEnter && event.key === "Enter"; var isSpace = options.unstable_clickOnSpace && event.key === " "; if (isEnter || isSpace) { if (isNativeClick(event)) return; event.preventDefault(); if (isEnter) { event.currentTarget.click(); } else if (isSpace) { setActive(true); } } }, [options.disabled, options.unstable_clickOnEnter, options.unstable_clickOnSpace]); var onKeyUp = (0,external_React_.useCallback)(function (event) { var _onKeyUpRef$current; (_onKeyUpRef$current = onKeyUpRef.current) === null || _onKeyUpRef$current === void 0 ? void 0 : _onKeyUpRef$current.call(onKeyUpRef, event); if (event.defaultPrevented) return; if (options.disabled) return; if (event.metaKey) return; var isSpace = options.unstable_clickOnSpace && event.key === " "; if (active && isSpace) { setActive(false); event.currentTarget.click(); } }, [options.disabled, options.unstable_clickOnSpace, active]); return _objectSpread2({ "data-active": active || undefined, onKeyDown: onKeyDown, onKeyUp: onKeyUp }, htmlProps); } }); var Clickable = createComponent({ as: "button", memo: true, useHook: useClickable }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/getCurrentId-5aa9849e.js function findFirstEnabledItem(items, excludeId) { if (excludeId) { return items.find(function (item) { return !item.disabled && item.id !== excludeId; }); } return items.find(function (item) { return !item.disabled; }); } function getCurrentId(options, passedId) { var _findFirstEnabledItem; if (passedId || passedId === null) { return passedId; } if (options.currentId || options.currentId === null) { return options.currentId; } return (_findFirstEnabledItem = findFirstEnabledItem(options.items || [])) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/__keys-6742f591.js // Automatically generated var COMPOSITE_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget"]; var COMPOSITE_KEYS = COMPOSITE_STATE_KEYS; var COMPOSITE_GROUP_KEYS = COMPOSITE_KEYS; var COMPOSITE_ITEM_KEYS = COMPOSITE_GROUP_KEYS; var COMPOSITE_ITEM_WIDGET_KEYS = (/* unused pure expression or super */ null && (COMPOSITE_ITEM_KEYS)); ;// CONCATENATED MODULE: ./node_modules/reakit/es/userFocus-e16425e3.js function userFocus(element) { element.userFocus = true; element.focus(); element.userFocus = false; } function hasUserFocus(element) { return !!element.userFocus; } function setUserFocus(element, value) { element.userFocus = value; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/isTextField.js /** * Check whether the given element is a text field, where text field is defined * by the ability to select within the input, or that it is contenteditable. * * @example * import { isTextField } from "reakit-utils"; * * isTextField(document.querySelector("div")); // false * isTextField(document.querySelector("input")); // true * isTextField(document.querySelector("input[type='button']")); // false * isTextField(document.querySelector("textarea")); // true * isTextField(document.querySelector("div[contenteditable='true']")); // true */ function isTextField(element) { try { var isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null; var isTextArea = element.tagName === "TEXTAREA"; var isContentEditable = element.contentEditable === "true"; return isTextInput || isTextArea || isContentEditable || false; } catch (error) { // Safari throws an exception when trying to get `selectionStart` // on non-text elements (which, understandably, don't // have the text selection API). We catch this via a try/catch // block, as opposed to a more explicit check of the element's // input types, because of Safari's non-standard behavior. This // also means we don't have to worry about the list of input // types that support `selectionStart` changing as the HTML spec // evolves over time. return false; } } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/hasFocus.js /** * Checks if `element` has focus. Elements that are referenced by * `aria-activedescendant` are also considered. * * @example * import { hasFocus } from "reakit-utils"; * * hasFocus(document.getElementById("id")); */ function hasFocus(element) { var activeElement = getActiveElement_getActiveElement(element); if (!activeElement) return false; if (activeElement === element) return true; var activeDescendant = activeElement.getAttribute("aria-activedescendant"); if (!activeDescendant) return false; return activeDescendant === element.id; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/ensureFocus.js /** * Ensures `element` will receive focus if it's not already. * * @example * import { ensureFocus } from "reakit-utils"; * * ensureFocus(document.activeElement); // does nothing * * const element = document.querySelector("input"); * * ensureFocus(element); // focuses element * ensureFocus(element, { preventScroll: true }); // focuses element preventing scroll jump * * function isActive(el) { * return el.dataset.active === "true"; * } * * ensureFocus(document.querySelector("[data-active='true']"), { isActive }); // does nothing * * @returns {number} `requestAnimationFrame` call ID so it can be passed to `cancelAnimationFrame` if needed. */ function ensureFocus(element, _temp) { var _ref = _temp === void 0 ? {} : _temp, preventScroll = _ref.preventScroll, _ref$isActive = _ref.isActive, isActive = _ref$isActive === void 0 ? hasFocus : _ref$isActive; if (isActive(element)) return -1; element.focus({ preventScroll: preventScroll }); if (isActive(element)) return -1; return requestAnimationFrame(function () { element.focus({ preventScroll: preventScroll }); }); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/IdProvider.js var defaultPrefix = "id"; function generateRandomString(prefix) { if (prefix === void 0) { prefix = defaultPrefix; } return "" + (prefix ? prefix + "-" : "") + Math.random().toString(32).substr(2, 6); } var unstable_IdContext = /*#__PURE__*/(0,external_React_.createContext)(generateRandomString); function unstable_IdProvider(_ref) { var children = _ref.children, _ref$prefix = _ref.prefix, prefix = _ref$prefix === void 0 ? defaultPrefix : _ref$prefix; var count = useRef(0); var generateId = useCallback(function (localPrefix) { if (localPrefix === void 0) { localPrefix = prefix; } return "" + (localPrefix ? localPrefix + "-" : "") + ++count.current; }, [prefix]); return /*#__PURE__*/createElement(unstable_IdContext.Provider, { value: generateId }, children); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/Id.js // Automatically generated var ID_STATE_KEYS = ["baseId", "unstable_idCountRef", "setBaseId"]; var ID_KEYS = [].concat(ID_STATE_KEYS, ["id"]); var unstable_useId = createHook({ keys: ID_KEYS, useOptions: function useOptions(options, htmlProps) { var generateId = (0,external_React_.useContext)(unstable_IdContext); var _React$useState = (0,external_React_.useState)(function () { // This comes from useIdState if (options.unstable_idCountRef) { options.unstable_idCountRef.current += 1; return "-" + options.unstable_idCountRef.current; } // If there's no useIdState, we check if `baseId` was passed (as a prop, // not from useIdState). if (options.baseId) { return "-" + generateId(""); } return ""; }), suffix = _React$useState[0]; // `baseId` will be the prop passed directly as a prop or via useIdState. // If there's neither, then it'll fallback to Context's generateId. // This generateId can result in a sequential ID (if there's a Provider) // or a random string (without Provider). var baseId = (0,external_React_.useMemo)(function () { return options.baseId || generateId(); }, [options.baseId, generateId]); var id = htmlProps.id || options.id || "" + baseId + suffix; return _objectSpread2(_objectSpread2({}, options), {}, { id: id }); }, useProps: function useProps(options, htmlProps) { return _objectSpread2({ id: options.id }, htmlProps); } }); var unstable_Id = createComponent({ as: "div", useHook: unstable_useId }); ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/createEvent.js /** * Creates an `Event` in a way that also works on IE 11. * * @example * import { createEvent } from "reakit-utils"; * * const el = document.getElementById("id"); * el.dispatchEvent(createEvent(el, "blur", { bubbles: false })); */ function createEvent(element, type, eventInit) { if (typeof Event === "function") { return new Event(type, eventInit); } // IE 11 doesn't support Event constructors var event = getDocument(element).createEvent("Event"); event.initEvent(type, eventInit === null || eventInit === void 0 ? void 0 : eventInit.bubbles, eventInit === null || eventInit === void 0 ? void 0 : eventInit.cancelable); return event; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireEvent.js /** * Creates and dispatches `Event` in a way that also works on IE 11. * * @example * import { fireEvent } from "reakit-utils"; * * fireEvent(document.getElementById("id"), "blur", { * bubbles: true, * cancelable: true, * }); */ function fireEvent(element, type, eventInit) { return element.dispatchEvent(createEvent(element, type, eventInit)); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/setTextFieldValue-0a221f4e.js function setTextFieldValue(element, value) { if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) { var _Object$getOwnPropert; var proto = Object.getPrototypeOf(element); var setValue = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(proto, "value")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.set; if (setValue) { setValue.call(element, value); fireEvent(element, "input", { bubbles: true }); } } } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeItem.js function getWidget(itemElement) { return itemElement.querySelector("[data-composite-item-widget]"); } function useItem(options) { return (0,external_React_.useMemo)(function () { var _options$items; return (_options$items = options.items) === null || _options$items === void 0 ? void 0 : _options$items.find(function (item) { return options.id && item.id === options.id; }); }, [options.items, options.id]); } function targetIsAnotherItem(event, items) { if (isSelfTarget(event)) return false; for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) { var item = _step.value; if (item.ref.current === event.target) { return true; } } return false; } var useCompositeItem = createHook({ name: "CompositeItem", compose: [useClickable, unstable_useId], keys: COMPOSITE_ITEM_KEYS, propsAreEqual: function propsAreEqual(prev, next) { if (!next.id || prev.id !== next.id) { return useClickable.unstable_propsAreEqual(prev, next); } var prevCurrentId = prev.currentId, prevMoves = prev.unstable_moves, prevProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(prev, ["currentId", "unstable_moves"]); var nextCurrentId = next.currentId, nextMoves = next.unstable_moves, nextProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(next, ["currentId", "unstable_moves"]); if (nextCurrentId !== prevCurrentId) { if (next.id === nextCurrentId || next.id === prevCurrentId) { return false; } } else if (prevMoves !== nextMoves) { return false; } return useClickable.unstable_propsAreEqual(prevProps, nextProps); }, useOptions: function useOptions(options) { return _objectSpread2(_objectSpread2({}, options), {}, { id: options.id, currentId: getCurrentId(options), unstable_clickOnSpace: options.unstable_hasActiveWidget ? false : options.unstable_clickOnSpace }); }, useProps: function useProps(options, _ref) { var _options$items2; var htmlRef = _ref.ref, _ref$tabIndex = _ref.tabIndex, htmlTabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex, htmlOnMouseDown = _ref.onMouseDown, htmlOnFocus = _ref.onFocus, htmlOnBlurCapture = _ref.onBlurCapture, htmlOnKeyDown = _ref.onKeyDown, htmlOnClick = _ref.onClick, htmlProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref, ["ref", "tabIndex", "onMouseDown", "onFocus", "onBlurCapture", "onKeyDown", "onClick"]); var ref = (0,external_React_.useRef)(null); var id = options.id; var trulyDisabled = options.disabled && !options.focusable; var isCurrentItem = options.currentId === id; var isCurrentItemRef = useLiveRef(isCurrentItem); var hasFocusedComposite = (0,external_React_.useRef)(false); var item = useItem(options); var onMouseDownRef = useLiveRef(htmlOnMouseDown); var onFocusRef = useLiveRef(htmlOnFocus); var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture); var onKeyDownRef = useLiveRef(htmlOnKeyDown); var onClickRef = useLiveRef(htmlOnClick); var shouldTabIndex = !options.unstable_virtual && !options.unstable_hasActiveWidget && isCurrentItem || // We don't want to set tabIndex="-1" when using CompositeItem as a // standalone component, without state props. !((_options$items2 = options.items) !== null && _options$items2 !== void 0 && _options$items2.length); (0,external_React_.useEffect)(function () { var _options$registerItem; if (!id) return undefined; (_options$registerItem = options.registerItem) === null || _options$registerItem === void 0 ? void 0 : _options$registerItem.call(options, { id: id, ref: ref, disabled: !!trulyDisabled }); return function () { var _options$unregisterIt; (_options$unregisterIt = options.unregisterItem) === null || _options$unregisterIt === void 0 ? void 0 : _options$unregisterIt.call(options, id); }; }, [id, trulyDisabled, options.registerItem, options.unregisterItem]); (0,external_React_.useEffect)(function () { var element = ref.current; if (!element) { false ? 0 : void 0; return; } // `moves` will be incremented whenever next, previous, up, down, first, // last or move have been called. This means that the composite item will // be focused whenever some of these functions are called. We're using // isCurrentItemRef instead of isCurrentItem because we don't want to // focus the item if isCurrentItem changes (and options.moves doesn't). if (options.unstable_moves && isCurrentItemRef.current) { userFocus(element); } }, [options.unstable_moves]); var onMouseDown = (0,external_React_.useCallback)(function (event) { var _onMouseDownRef$curre; (_onMouseDownRef$curre = onMouseDownRef.current) === null || _onMouseDownRef$curre === void 0 ? void 0 : _onMouseDownRef$curre.call(onMouseDownRef, event); setUserFocus(event.currentTarget, true); }, []); var onFocus = (0,external_React_.useCallback)(function (event) { var _onFocusRef$current, _options$setCurrentId; var shouldFocusComposite = hasUserFocus(event.currentTarget); setUserFocus(event.currentTarget, false); (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event); if (event.defaultPrevented) return; if (isPortalEvent(event)) return; if (!id) return; if (targetIsAnotherItem(event, options.items)) return; (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, id); // When using aria-activedescendant, we want to make sure that the // composite container receives focus, not the composite item. // But we don't want to do this if the target is another focusable // element inside the composite item, such as CompositeItemWidget. if (shouldFocusComposite && options.unstable_virtual && options.baseId && isSelfTarget(event)) { var target = event.target; var composite = getDocument(target).getElementById(options.baseId); if (composite) { hasFocusedComposite.current = true; ensureFocus(composite); } } }, [id, options.items, options.setCurrentId, options.unstable_virtual, options.baseId]); var onBlurCapture = (0,external_React_.useCallback)(function (event) { var _onBlurCaptureRef$cur; (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event); if (event.defaultPrevented) return; if (options.unstable_virtual && hasFocusedComposite.current) { // When hasFocusedComposite is true, composite has been focused right // after focusing this item. This is an intermediate blur event, so // we ignore it. hasFocusedComposite.current = false; event.preventDefault(); event.stopPropagation(); } }, [options.unstable_virtual]); var onKeyDown = (0,external_React_.useCallback)(function (event) { var _onKeyDownRef$current; if (!isSelfTarget(event)) return; var isVertical = options.orientation !== "horizontal"; var isHorizontal = options.orientation !== "vertical"; var isGrid = !!(item !== null && item !== void 0 && item.groupId); var keyMap = { ArrowUp: (isGrid || isVertical) && options.up, ArrowRight: (isGrid || isHorizontal) && options.next, ArrowDown: (isGrid || isVertical) && options.down, ArrowLeft: (isGrid || isHorizontal) && options.previous, Home: function Home() { if (!isGrid || event.ctrlKey) { var _options$first; (_options$first = options.first) === null || _options$first === void 0 ? void 0 : _options$first.call(options); } else { var _options$previous; (_options$previous = options.previous) === null || _options$previous === void 0 ? void 0 : _options$previous.call(options, true); } }, End: function End() { if (!isGrid || event.ctrlKey) { var _options$last; (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options); } else { var _options$next; (_options$next = options.next) === null || _options$next === void 0 ? void 0 : _options$next.call(options, true); } }, PageUp: function PageUp() { if (isGrid) { var _options$up; (_options$up = options.up) === null || _options$up === void 0 ? void 0 : _options$up.call(options, true); } else { var _options$first2; (_options$first2 = options.first) === null || _options$first2 === void 0 ? void 0 : _options$first2.call(options); } }, PageDown: function PageDown() { if (isGrid) { var _options$down; (_options$down = options.down) === null || _options$down === void 0 ? void 0 : _options$down.call(options, true); } else { var _options$last2; (_options$last2 = options.last) === null || _options$last2 === void 0 ? void 0 : _options$last2.call(options); } } }; var action = keyMap[event.key]; if (action) { event.preventDefault(); action(); return; } (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); if (event.defaultPrevented) return; if (event.key.length === 1 && event.key !== " ") { var widget = getWidget(event.currentTarget); if (widget && isTextField(widget)) { widget.focus(); setTextFieldValue(widget, ""); } } else if (event.key === "Delete" || event.key === "Backspace") { var _widget = getWidget(event.currentTarget); if (_widget && isTextField(_widget)) { event.preventDefault(); setTextFieldValue(_widget, ""); } } }, [options.orientation, item, options.up, options.next, options.down, options.previous, options.first, options.last]); var onClick = (0,external_React_.useCallback)(function (event) { var _onClickRef$current; (_onClickRef$current = onClickRef.current) === null || _onClickRef$current === void 0 ? void 0 : _onClickRef$current.call(onClickRef, event); if (event.defaultPrevented) return; var element = event.currentTarget; var widget = getWidget(element); if (widget && !hasFocusWithin(widget)) { // If there's a widget inside the composite item, we make sure it's // focused when pressing enter, space or clicking on the composite item. widget.focus(); } }, []); return _objectSpread2({ ref: useForkRef(ref, htmlRef), id: id, tabIndex: shouldTabIndex ? htmlTabIndex : -1, "aria-selected": options.unstable_virtual && isCurrentItem ? true : undefined, onMouseDown: onMouseDown, onFocus: onFocus, onBlurCapture: onBlurCapture, onKeyDown: onKeyDown, onClick: onClick }, htmlProps); } }); var CompositeItem = createComponent({ as: "button", memo: true, useHook: useCompositeItem }); ;// CONCATENATED MODULE: external "lodash" const external_lodash_namespaceObject = window["lodash"]; ;// CONCATENATED MODULE: ./node_modules/@floating-ui/core/dist/floating-ui.core.esm.min.js function t(t){return t.split("-")[0]}function floating_ui_core_esm_min_e(t){return t.split("-")[1]}function floating_ui_core_esm_min_n(e){return["top","bottom"].includes(t(e))?"x":"y"}function r(t){return"y"===t?"height":"width"}function i(i,o,a){let{reference:l,floating:s}=i;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=floating_ui_core_esm_min_n(o),m=r(u),g=l[m]/2-s[m]/2,d="x"===u;let p;switch(t(o)){case"top":p={x:c,y:l.y-s.height};break;case"bottom":p={x:c,y:l.y+l.height};break;case"right":p={x:l.x+l.width,y:f};break;case"left":p={x:l.x-s.width,y:f};break;default:p={x:l.x,y:l.y}}switch(floating_ui_core_esm_min_e(o)){case"start":p[u]-=g*(a&&d?-1:1);break;case"end":p[u]+=g*(a&&d?-1:1)}return p}const floating_ui_core_esm_min_o=async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:l}=n,s=await(null==l.isRTL?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:o}),{x:f,y:u}=i(c,r,s),m=r,g={};for(let n=0;n({name:"arrow",options:t,async fn(e){const{element:i,padding:o=0}=null!=t?t:{},{x:l,y:s,placement:c,rects:f,platform:m}=e;if(null==i)return{};const g=floating_ui_core_esm_min_a(o),d={x:l,y:s},p=floating_ui_core_esm_min_n(c),h=r(p),y=await m.getDimensions(i),x="y"===p?"top":"left",w="y"===p?"bottom":"right",v=f.reference[h]+f.reference[p]-d[p]-f.floating[h],b=d[p]-f.reference[p],R=await(null==m.getOffsetParent?void 0:m.getOffsetParent(i)),A=R?"y"===p?R.clientHeight||0:R.clientWidth||0:0,P=v/2-b/2,T=g[x],O=A-y[h]-g[w],D=A/2-y[h]/2+P,L=u(T,D,O);return{data:{[p]:L,centerOffset:D-L}}}}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function d(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function p(t,i,o){void 0===o&&(o=!1);const a=floating_ui_core_esm_min_e(t),l=floating_ui_core_esm_min_n(t),s=r(l);let c="x"===l?a===(o?"end":"start")?"right":"left":"start"===a?"bottom":"top";return i.reference[s]>i.floating[s]&&(c=d(c)),{main:c,cross:d(c)}}const h={start:"end",end:"start"};function y(t){return t.replace(/start|end/g,(t=>h[t]))}const x=["top","right","bottom","left"],w=x.reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]);const v=function(n){return void 0===n&&(n={}),{name:"autoPlacement",options:n,async fn(r){var i,o,a,l,c;const{x:f,y:u,rects:m,middlewareData:g,placement:d,platform:h,elements:x}=r,{alignment:v=null,allowedPlacements:b=w,autoAlignment:R=!0,...A}=n,P=function(n,r,i){return(n?[...i.filter((t=>floating_ui_core_esm_min_e(t)===n)),...i.filter((t=>floating_ui_core_esm_min_e(t)!==n))]:i.filter((e=>t(e)===e))).filter((t=>!n||floating_ui_core_esm_min_e(t)===n||!!r&&y(t)!==t))}(v,R,b),T=await s(r,A),O=null!=(i=null==(o=g.autoPlacement)?void 0:o.index)?i:0,D=P[O];if(null==D)return{};const{main:L,cross:k}=p(D,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==D)return{x:f,y:u,reset:{placement:P[0]}};const E=[T[t(D)],T[L],T[k]],C=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:D,overflows:E}],B=P[O+1];if(B)return{data:{index:O+1,overflows:C},reset:{placement:B}};const H=C.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=H.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,F=null!=V?V:H[0].placement;return F!==d?{data:{index:O+1,overflows:C},reset:{placement:F}}:{}}}};const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(n){var r;const{placement:i,middlewareData:o,rects:a,initialPlacement:l,platform:c,elements:f}=n,{mainAxis:u=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",flipAlignment:x=!0,...w}=e,v=t(i),b=g||(v===l||!x?[d(l)]:function(t){const e=d(t);return[y(t),e,y(e)]}(l)),R=[l,...b],A=await s(n,w),P=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&P.push(A[v]),m){const{main:t,cross:e}=p(i,a,await(null==c.isRTL?void 0:c.isRTL(f.floating)));P.push(A[t],A[e])}if(T=[...T,{placement:i,overflows:P}],!P.every((t=>t<=0))){var O,D;const t=(null!=(O=null==(D=o.flip)?void 0:D.index)?O:0)+1,e=R[t];if(e)return{data:{index:t,overflows:T},reset:{placement:e}};let n="bottom";switch(h){case"bestFit":{var L;const t=null==(L=T.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:L[0].placement;t&&(n=t);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}};function R(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function A(t){return x.some((e=>t[e]>=0))}const P=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:r}=t;switch(e){case"referenceHidden":{const e=R(await s(t,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:A(e)}}}case"escaped":{const e=R(await s(t,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:A(e)}}}default:return{}}}}};const T=function(r){return void 0===r&&(r=0),{name:"offset",options:r,async fn(i){const{x:o,y:a,placement:l,rects:s,platform:c,elements:f}=i,u=function(r,i,o,a){void 0===a&&(a=!1);const l=t(r),s=floating_ui_core_esm_min_e(r),c="x"===floating_ui_core_esm_min_n(r),f=["left","top"].includes(l)?-1:1,u=a&&c?-1:1,m="function"==typeof o?o({...i,placement:r}):o;let{mainAxis:g,crossAxis:d,alignmentAxis:p}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return s&&"number"==typeof p&&(d="end"===s?-1*p:p),c?{x:d*u,y:g*f}:{x:g*f,y:d*u}}(l,s,r,await(null==c.isRTL?void 0:c.isRTL(f.floating)));return{x:o+u.x,y:a+u.y,data:u}}}};function O(t){return"x"===t?"y":"x"}const D=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(r){const{x:i,y:o,placement:a}=r,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...m}=e,g={x:i,y:o},d=await s(r,m),p=floating_ui_core_esm_min_n(t(a)),h=O(p);let y=g[p],x=g[h];if(l){const t="y"===p?"bottom":"right";y=u(y+d["y"===p?"top":"left"],y,y-d[t])}if(c){const t="y"===h?"bottom":"right";x=u(x+d["y"===h?"top":"left"],x,x-d[t])}const w=f.fn({...r,[p]:y,[h]:x});return{...w,data:{x:w.x-i,y:w.y-o}}}}},L=function(e){return void 0===e&&(e={}),{options:e,fn(r){const{x:i,y:o,placement:a,rects:l,middlewareData:s}=r,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=e,m={x:i,y:o},g=floating_ui_core_esm_min_n(a),d=O(g);let p=m[g],h=m[d];const y="function"==typeof c?c({...l,placement:a}):c,x="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const t="y"===g?"height":"width",e=l.reference[g]-l.floating[t]+x.mainAxis,n=l.reference[g]+l.reference[t]-x.mainAxis;pn&&(p=n)}if(u){var w,v,b,R;const e="y"===g?"width":"height",n=["top","left"].includes(t(a)),r=l.reference[d]-l.floating[e]+(n&&null!=(w=null==(v=s.offset)?void 0:v[d])?w:0)+(n?0:x.crossAxis),i=l.reference[d]+l.reference[e]+(n?0:null!=(b=null==(R=s.offset)?void 0:R[d])?b:0)-(n?x.crossAxis:0);hi&&(h=i)}return{[g]:p,[d]:h}}}},k=function(n){return void 0===n&&(n={}),{name:"size",options:n,async fn(r){const{placement:i,rects:o,platform:a,elements:l}=r,{apply:c,...u}=n,m=await s(r,u),g=t(i),d=floating_ui_core_esm_min_e(i);let p,h;"top"===g||"bottom"===g?(p=g,h=d===(await(null==a.isRTL?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(h=g,p="end"===d?"top":"bottom");const y=f(m.left,0),x=f(m.right,0),w=f(m.top,0),v=f(m.bottom,0),b={height:o.floating.height-(["left","right"].includes(i)?2*(0!==w||0!==v?w+v:f(m.top,m.bottom)):m[p]),width:o.floating.width-(["top","bottom"].includes(i)?2*(0!==y||0!==x?y+x:f(m.left,m.right)):m[h])},R=await a.getDimensions(l.floating);null==c||c({...b,...o});const A=await a.getDimensions(l.floating);return R.width!==A.width||R.height!==A.height?{reset:{rects:!0}}:{}}}},E=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(r){var i;const{placement:o,elements:s,rects:u,platform:m,strategy:g}=r,{padding:d=2,x:p,y:h}=e,y=l(m.convertOffsetParentRelativeRectToViewportRelativeRect?await m.convertOffsetParentRelativeRectToViewportRelativeRect({rect:u.reference,offsetParent:await(null==m.getOffsetParent?void 0:m.getOffsetParent(s.floating)),strategy:g}):u.reference),x=null!=(i=await(null==m.getClientRects?void 0:m.getClientRects(s.reference)))?i:[],w=floating_ui_core_esm_min_a(d);const v=await m.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===x.length&&x[0].left>x[1].right&&null!=p&&null!=h)return null!=(e=x.find((t=>p>t.left-w.left&&pt.top-w.top&&h=2){if("x"===floating_ui_core_esm_min_n(o)){const e=x[0],n=x[x.length-1],r="top"===t(o),i=e.top,a=n.bottom,l=r?e.left:n.left,s=r?e.right:n.right;return{top:i,bottom:a,left:l,right:s,width:s-l,height:a-i,x:l,y:i}}const e="left"===t(o),r=f(...x.map((t=>t.right))),i=c(...x.map((t=>t.left))),a=x.filter((t=>e?t.left===i:t.right===r)),l=a[0].top,s=a[a.length-1].bottom;return{top:l,bottom:s,left:i,right:r,width:r-i,height:s-l,x:i,y:l}}return y}},floating:s.floating,strategy:g});return u.reference.x!==v.reference.x||u.reference.y!==v.reference.y||u.reference.width!==v.reference.width||u.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}}; ;// CONCATENATED MODULE: ./node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.min.js function floating_ui_dom_esm_min_n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function floating_ui_dom_esm_min_o(t){if(null==t)return window;if(!floating_ui_dom_esm_min_n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function floating_ui_dom_esm_min_i(t){return floating_ui_dom_esm_min_o(t).getComputedStyle(t)}function floating_ui_dom_esm_min_r(t){return floating_ui_dom_esm_min_n(t)?"":t?(t.nodeName||"").toLowerCase():""}function floating_ui_dom_esm_min_l(t){return t instanceof floating_ui_dom_esm_min_o(t).HTMLElement}function floating_ui_dom_esm_min_c(t){return t instanceof floating_ui_dom_esm_min_o(t).Element}function floating_ui_dom_esm_min_f(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof floating_ui_dom_esm_min_o(t).ShadowRoot||t instanceof ShadowRoot}function floating_ui_dom_esm_min_s(t){const{overflow:e,overflowX:n,overflowY:o}=floating_ui_dom_esm_min_i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function floating_ui_dom_esm_min_u(t){return["table","td","th"].includes(floating_ui_dom_esm_min_r(t))}function floating_ui_dom_esm_min_d(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=floating_ui_dom_esm_min_i(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function floating_ui_dom_esm_min_h(){return!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}const floating_ui_dom_esm_min_a=Math.min,floating_ui_dom_esm_min_g=Math.max,floating_ui_dom_esm_min_p=Math.round;function floating_ui_dom_esm_min_m(t,e,n){var i,r,f,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let d=1,a=1;e&&floating_ui_dom_esm_min_l(t)&&(d=t.offsetWidth>0&&floating_ui_dom_esm_min_p(u.width)/t.offsetWidth||1,a=t.offsetHeight>0&&floating_ui_dom_esm_min_p(u.height)/t.offsetHeight||1);const g=floating_ui_dom_esm_min_c(t)?floating_ui_dom_esm_min_o(t):window,m=!floating_ui_dom_esm_min_h()&&n,w=(u.left+(m&&null!=(i=null==(r=g.visualViewport)?void 0:r.offsetLeft)?i:0))/d,v=(u.top+(m&&null!=(f=null==(s=g.visualViewport)?void 0:s.offsetTop)?f:0))/a,y=u.width/d,x=u.height/a;return{width:y,height:x,top:v,right:w+y,bottom:v+x,left:w,x:w,y:v}}function floating_ui_dom_esm_min_w(t){return(e=t,(e instanceof floating_ui_dom_esm_min_o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function floating_ui_dom_esm_min_v(t){return floating_ui_dom_esm_min_c(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function floating_ui_dom_esm_min_y(t){return floating_ui_dom_esm_min_m(floating_ui_dom_esm_min_w(t)).left+floating_ui_dom_esm_min_v(t).scrollLeft}function floating_ui_dom_esm_min_x(t,e,n){const o=floating_ui_dom_esm_min_l(e),i=floating_ui_dom_esm_min_w(e),c=floating_ui_dom_esm_min_m(t,o&&function(t){const e=floating_ui_dom_esm_min_m(t);return floating_ui_dom_esm_min_p(e.width)!==t.offsetWidth||floating_ui_dom_esm_min_p(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==floating_ui_dom_esm_min_r(e)||floating_ui_dom_esm_min_s(i))&&(f=floating_ui_dom_esm_min_v(e)),floating_ui_dom_esm_min_l(e)){const t=floating_ui_dom_esm_min_m(e,!0);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else i&&(u.x=floating_ui_dom_esm_min_y(i));return{x:c.left+f.scrollLeft-u.x,y:c.top+f.scrollTop-u.y,width:c.width,height:c.height}}function floating_ui_dom_esm_min_L(t){return"html"===floating_ui_dom_esm_min_r(t)?t:t.assignedSlot||t.parentNode||(floating_ui_dom_esm_min_f(t)?t.host:null)||floating_ui_dom_esm_min_w(t)}function floating_ui_dom_esm_min_b(t){return floating_ui_dom_esm_min_l(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function floating_ui_dom_esm_min_R(t){const e=floating_ui_dom_esm_min_o(t);let n=floating_ui_dom_esm_min_b(t);for(;n&&floating_ui_dom_esm_min_u(n)&&"static"===getComputedStyle(n).position;)n=floating_ui_dom_esm_min_b(n);return n&&("html"===floating_ui_dom_esm_min_r(n)||"body"===floating_ui_dom_esm_min_r(n)&&"static"===getComputedStyle(n).position&&!floating_ui_dom_esm_min_d(n))?e:n||function(t){let e=floating_ui_dom_esm_min_L(t);for(floating_ui_dom_esm_min_f(e)&&(e=e.host);floating_ui_dom_esm_min_l(e)&&!["html","body"].includes(floating_ui_dom_esm_min_r(e));){if(floating_ui_dom_esm_min_d(e))return e;e=e.parentNode}return null}(t)||e}function floating_ui_dom_esm_min_T(t){if(floating_ui_dom_esm_min_l(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=floating_ui_dom_esm_min_m(t);return{width:e.width,height:e.height}}function W(t){const e=floating_ui_dom_esm_min_L(t);return["html","body","#document"].includes(floating_ui_dom_esm_min_r(e))?t.ownerDocument.body:floating_ui_dom_esm_min_l(e)&&floating_ui_dom_esm_min_s(e)?e:W(e)}function C(t,e){var n;void 0===e&&(e=[]);const i=W(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=floating_ui_dom_esm_min_o(i),c=r?[l].concat(l.visualViewport||[],floating_ui_dom_esm_min_s(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(C(c))}function floating_ui_dom_esm_min_E(e,n,r){return"viewport"===n?l(function(t,e){const n=floating_ui_dom_esm_min_o(t),i=floating_ui_dom_esm_min_w(t),r=n.visualViewport;let l=i.clientWidth,c=i.clientHeight,f=0,s=0;if(r){l=r.width,c=r.height;const t=floating_ui_dom_esm_min_h();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,s=r.offsetTop)}return{width:l,height:c,x:f,y:s}}(e,r)):floating_ui_dom_esm_min_c(n)?function(t,e){const n=floating_ui_dom_esm_min_m(t,!1,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft;return{top:o,left:i,x:i,y:o,right:i+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,r):l(function(t){var e;const n=floating_ui_dom_esm_min_w(t),o=floating_ui_dom_esm_min_v(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=floating_ui_dom_esm_min_g(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=floating_ui_dom_esm_min_g(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+floating_ui_dom_esm_min_y(t);const s=-o.scrollTop;return"rtl"===floating_ui_dom_esm_min_i(r||n).direction&&(f+=floating_ui_dom_esm_min_g(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:s}}(floating_ui_dom_esm_min_w(e)))}function H(t){const e=C(t),n=["absolute","fixed"].includes(floating_ui_dom_esm_min_i(t).position)&&floating_ui_dom_esm_min_l(t)?floating_ui_dom_esm_min_R(t):t;return floating_ui_dom_esm_min_c(n)?e.filter((t=>floating_ui_dom_esm_min_c(t)&&function(t,e){const n=null==e||null==e.getRootNode?void 0:e.getRootNode();if(null!=t&&t.contains(e))return!0;if(n&&floating_ui_dom_esm_min_f(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==floating_ui_dom_esm_min_r(t))):[]}const S={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?H(e):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=floating_ui_dom_esm_min_E(e,n,i);return t.top=floating_ui_dom_esm_min_g(o.top,t.top),t.right=floating_ui_dom_esm_min_a(o.right,t.right),t.bottom=floating_ui_dom_esm_min_a(o.bottom,t.bottom),t.left=floating_ui_dom_esm_min_g(o.left,t.left),t}),floating_ui_dom_esm_min_E(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=floating_ui_dom_esm_min_l(n),c=floating_ui_dom_esm_min_w(n);if(n===c)return e;let f={scrollLeft:0,scrollTop:0};const u={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==floating_ui_dom_esm_min_r(n)||floating_ui_dom_esm_min_s(c))&&(f=floating_ui_dom_esm_min_v(n)),floating_ui_dom_esm_min_l(n))){const t=floating_ui_dom_esm_min_m(n,!0);u.x=t.x+n.clientLeft,u.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+u.x,y:e.y-f.scrollTop+u.y}},isElement:floating_ui_dom_esm_min_c,getDimensions:floating_ui_dom_esm_min_T,getOffsetParent:floating_ui_dom_esm_min_R,getDocumentElement:floating_ui_dom_esm_min_w,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:floating_ui_dom_esm_min_x(e,floating_ui_dom_esm_min_R(n),o),floating:{...floating_ui_dom_esm_min_T(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===floating_ui_dom_esm_min_i(t).direction};function floating_ui_dom_esm_min_D(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:f=!1}=o;let s=!1;const u=i&&!f,d=r&&!f,h=l&&!f,a=u||d?[...floating_ui_dom_esm_min_c(t)?C(t):[],...C(e)]:[];a.forEach((t=>{u&&t.addEventListener("scroll",n,{passive:!0}),d&&t.addEventListener("resize",n)}));let g,p=null;h&&(p=new ResizeObserver(n),floating_ui_dom_esm_min_c(t)&&p.observe(t),p.observe(e));let w=f?floating_ui_dom_esm_min_m(t):null;return f&&function e(){if(s)return;const o=floating_ui_dom_esm_min_m(t);!w||o.x===w.x&&o.y===w.y&&o.width===w.width&&o.height===w.height||n();w=o,g=requestAnimationFrame(e)}(),()=>{var t;s=!0,a.forEach((t=>{u&&t.removeEventListener("scroll",n),d&&t.removeEventListener("resize",n)})),null==(t=p)||t.disconnect(),p=null,f&&cancelAnimationFrame(g)}}const N=(t,n,o)=>floating_ui_core_esm_min_o(t,n,{platform:S,...o}); ;// CONCATENATED MODULE: external "ReactDOM" const external_ReactDOM_namespaceObject = window["ReactDOM"]; ;// CONCATENATED MODULE: ./node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js var index = typeof document !== 'undefined' ? external_React_.useLayoutEffect : external_React_.useEffect; // Fork of `fast-deep-equal` that only does the comparisons we need and compares // functions // @ts-nocheck function deepEqual(a, b) { if (a === b) { return true; } if (typeof a !== typeof b) { return false; } if (typeof a === 'function' && a.toString() === b.toString()) { return true; } let length, i, keys; if (a && b && typeof a == 'object') { if (Array.isArray(a)) { length = a.length; if (length != b.length) return false; for (i = length; i-- !== 0;) { if (!deepEqual(a[i], b[i])) { return false; } } return true; } keys = Object.keys(a); length = keys.length; if (length !== Object.keys(b).length) { return false; } for (i = length; i-- !== 0;) { if (!Object.prototype.hasOwnProperty.call(b, keys[i])) { return false; } } for (i = length; i-- !== 0;) { const key = keys[i]; if (key === '_owner' && a.$$typeof) { continue; } if (!deepEqual(a[key], b[key])) { return false; } } return true; } return a !== a && b !== b; } function useFloating(_temp) { let { middleware, placement = 'bottom', strategy = 'absolute' } = _temp === void 0 ? {} : _temp; const reference = (0,external_React_.useRef)(null); const floating = (0,external_React_.useRef)(null); const [data, setData] = (0,external_React_.useState)({ // Setting these to `null` will allow the consumer to determine if // `computePosition()` has run yet x: null, y: null, strategy, placement, middlewareData: {} }); const [latestMiddleware, setLatestMiddleware] = (0,external_React_.useState)(middleware); if (!deepEqual(latestMiddleware == null ? void 0 : latestMiddleware.map(_ref => { let { options } = _ref; return options; }), middleware == null ? void 0 : middleware.map(_ref2 => { let { options } = _ref2; return options; }))) { setLatestMiddleware(middleware); } const isMountedRef = (0,external_React_.useRef)(true); index(() => { isMountedRef.current = true; return () => { isMountedRef.current = false; }; }, []); const update = (0,external_React_.useCallback)(() => { if (!reference.current || !floating.current) { return; } N(reference.current, floating.current, { middleware: latestMiddleware, placement, strategy }).then(data => { if (isMountedRef.current) { (0,external_ReactDOM_namespaceObject.flushSync)(() => { setData(data); }); } }); }, [latestMiddleware, placement, strategy]); index(update, [update]); const setReference = (0,external_React_.useCallback)(node => { reference.current = node; update(); }, [update]); const setFloating = (0,external_React_.useCallback)(node => { floating.current = node; update(); }, [update]); const refs = (0,external_React_.useMemo)(() => ({ reference, floating }), []); return (0,external_React_.useMemo)(() => ({ ...data, update, refs, reference: setReference, floating: setFloating }), [data, update, refs, setReference, setFloating]); } const arrow = options => { const { element, padding } = options; function isRef(value) { return Object.prototype.hasOwnProperty.call(value, 'current'); } return { name: 'arrow', options, fn(args) { if (isRef(element)) { if (element.current != null) { return m({ element: element.current, padding }).fn(args); } return {}; } else if (element) { return m({ element, padding }).fn(args); } return {}; } }; }; ;// CONCATENATED MODULE: ./packages/icons/build-module/library/close.js /** * WordPress dependencies */ const close_close = (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" })); /* harmony default export */ const library_close = (close_close); ;// CONCATENATED MODULE: external ["wp","deprecated"] const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"]; var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject); ;// CONCATENATED MODULE: ./packages/components/build-module/dashicon/index.js /** * @typedef OwnProps * * @property {import('./types').IconKey} icon Icon name * @property {string} [className] Class name */ /** @typedef {import('react').ComponentPropsWithoutRef<'span'> & OwnProps} Props */ /** * @param {Props} props * @return {JSX.Element} Element */ function Dashicon(_ref) { let { icon, className, ...extraProps } = _ref; const iconClass = ['dashicon', 'dashicons', 'dashicons-' + icon, className].filter(Boolean).join(' '); return (0,external_wp_element_namespaceObject.createElement)("span", extends_extends({ className: iconClass }, extraProps)); } /* harmony default export */ const dashicon = (Dashicon); ;// CONCATENATED MODULE: ./packages/components/build-module/icon/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ function Icon(_ref) { let { icon = null, size = 24, ...additionalProps } = _ref; if ('string' === typeof icon) { return (0,external_wp_element_namespaceObject.createElement)(dashicon, extends_extends({ icon: icon }, additionalProps)); } if ((0,external_wp_element_namespaceObject.isValidElement)(icon) && dashicon === icon.type) { return (0,external_wp_element_namespaceObject.cloneElement)(icon, { ...additionalProps }); } if ('function' === typeof icon) { if (icon.prototype instanceof external_wp_element_namespaceObject.Component) { return (0,external_wp_element_namespaceObject.createElement)(icon, { size, ...additionalProps }); } return icon({ size, ...additionalProps }); } if (icon && (icon.type === 'svg' || icon.type === external_wp_primitives_namespaceObject.SVG)) { const appliedProps = { width: size, height: size, ...icon.props, ...additionalProps }; return (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, appliedProps); } if ((0,external_wp_element_namespaceObject.isValidElement)(icon)) { return (0,external_wp_element_namespaceObject.cloneElement)(icon, { // @ts-ignore Just forwarding the size prop along size, ...additionalProps }); } return icon; } /* harmony default export */ const build_module_icon = (Icon); ;// CONCATENATED MODULE: external ["wp","warning"] const external_wp_warning_namespaceObject = window["wp"]["warning"]; ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/context-system-provider.js /** * External dependencies */ /** * WordPress dependencies */ const ComponentsContext = (0,external_wp_element_namespaceObject.createContext)( /** @type {Record} */ {}); const useComponentsContext = () => (0,external_wp_element_namespaceObject.useContext)(ComponentsContext); /** * Runs an effect only on update (i.e., ignores the first render) * * @param {import('react').EffectCallback} effect * @param {import('react').DependencyList} deps */ function useUpdateEffect(effect, deps) { const mounted = (0,external_wp_element_namespaceObject.useRef)(false); (0,external_wp_element_namespaceObject.useEffect)(() => { if (mounted.current) { return effect(); } mounted.current = true; return undefined; }, deps); } /** * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value. * * Note: This function will warn if it detects an un-memoized `value` * * @param {Object} props * @param {Record} props.value * @return {Record} The consolidated value. */ function useContextSystemBridge(_ref) { let { value } = _ref; const parentContext = useComponentsContext(); const valueRef = (0,external_wp_element_namespaceObject.useRef)(value); useUpdateEffect(() => { if ( // Objects are equivalent. (0,external_lodash_namespaceObject.isEqual)(valueRef.current, value) && // But not the same reference. valueRef.current !== value) { typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0; } }, [value]); // `parentContext` will always be memoized (i.e., the result of this hook itself) // or the default value from when the `ComponentsContext` was originally // initialized (which will never change, it's a static variable) // so this memoization will prevent `merge` and `cloneDeep` from rerunning unless // the references to `value` change OR the `parentContext` has an actual material change // (because again, it's guaranteed to be memoized or a static reference to the empty object // so we know that the only changes for `parentContext` are material ones... i.e., why we // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are // correctly warning when the `value` isn't being properly memoized. All of that to say // that this should be super safe to assume that `useMemo` will only run on actual // changes to the two dependencies, therefore saving us calls to `merge` and `cloneDeep`! const config = (0,external_wp_element_namespaceObject.useMemo)(() => { return (0,external_lodash_namespaceObject.merge)((0,external_lodash_namespaceObject.cloneDeep)(parentContext), value); }, [parentContext, value]); return config; } /** * A Provider component that can modify props for connected components within * the Context system. * * @example * ```jsx * * * * ``` * * @template {Record} T * @param {Object} options * @param {import('react').ReactNode} options.children Children to render. * @param {T} options.value Props to render into connected components. * @return {JSX.Element} A Provider wrapped component. */ const BaseContextSystemProvider = _ref2 => { let { children, value } = _ref2; const contextValue = useContextSystemBridge({ value }); return (0,external_wp_element_namespaceObject.createElement)(ComponentsContext.Provider, { value: contextValue }, children); }; const ContextSystemProvider = (0,external_wp_element_namespaceObject.memo)(BaseContextSystemProvider); ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/constants.js const REACT_TYPEOF_KEY = '$$typeof'; const COMPONENT_NAMESPACE = 'data-wp-component'; const CONNECTED_NAMESPACE = 'data-wp-c16t'; const CONTEXT_COMPONENT_NAMESPACE = 'data-wp-c5tc8t'; /** * Special key where the connected namespaces are stored. * This is attached to Context connected components as a static property. */ const CONNECT_STATIC_NAMESPACE = '__contextSystemKey__'; ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/utils.js /** * Internal dependencies */ /** * Creates a dedicated context namespace HTML attribute for components. * ns is short for "namespace" * * @example * ```jsx *
* ``` * * @param {string} componentName The name for the component. * @return {Record} A props object with the namespaced HTML attribute. */ function getNamespace(componentName) { return { [COMPONENT_NAMESPACE]: componentName }; } /** * Creates a dedicated connected context namespace HTML attribute for components. * ns is short for "namespace" * * @example * ```jsx *
* ``` * * @return {Record} A props object with the namespaced HTML attribute. */ function getConnectedNamespace() { return { [CONNECTED_NAMESPACE]: true }; } // EXTERNAL MODULE: ./node_modules/memize/index.js var memize = __webpack_require__(9756); var memize_default = /*#__PURE__*/__webpack_require__.n(memize); ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/get-styled-class-name-from-key.js /** * External dependencies */ /** * Generates the connected component CSS className based on the namespace. * * @param namespace The name of the connected component. * @return The generated CSS className. */ function getStyledClassName(namespace) { const kebab = (0,external_lodash_namespaceObject.kebabCase)(namespace); return `components-${kebab}`; } const getStyledClassNameFromKey = memize_default()(getStyledClassName); ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js /* Based off glamor's StyleSheet, thanks Sunil ❤️ high performance StyleSheet for css-in-js systems - uses multiple style tags behind the scenes for millions of rules - uses `insertRule` for appending in production for *much* faster performance // usage import { StyleSheet } from '@emotion/sheet' let styleSheet = new StyleSheet({ key: '', container: document.head }) styleSheet.insert('#box { border: 1px solid red; }') - appends a css rule into the stylesheet styleSheet.flush() - empties the stylesheet of all its contents */ // $FlowFixMe function sheetForTag(tag) { if (tag.sheet) { // $FlowFixMe return tag.sheet; } // this weirdness brought to you by firefox /* istanbul ignore next */ for (var i = 0; i < document.styleSheets.length; i++) { if (document.styleSheets[i].ownerNode === tag) { // $FlowFixMe return document.styleSheets[i]; } } } function createStyleElement(options) { var tag = document.createElement('style'); tag.setAttribute('data-emotion', options.key); if (options.nonce !== undefined) { tag.setAttribute('nonce', options.nonce); } tag.appendChild(document.createTextNode('')); tag.setAttribute('data-s', ''); return tag; } var emotion_sheet_browser_esm_StyleSheet = /*#__PURE__*/function () { function StyleSheet(options) { var _this = this; this._insertTag = function (tag) { var before; if (_this.tags.length === 0) { if (_this.insertionPoint) { before = _this.insertionPoint.nextSibling; } else if (_this.prepend) { before = _this.container.firstChild; } else { before = _this.before; } } else { before = _this.tags[_this.tags.length - 1].nextSibling; } _this.container.insertBefore(tag, before); _this.tags.push(tag); }; this.isSpeedy = options.speedy === undefined ? "production" === 'production' : options.speedy; this.tags = []; this.ctr = 0; this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets this.key = options.key; this.container = options.container; this.prepend = options.prepend; this.insertionPoint = options.insertionPoint; this.before = null; } var _proto = StyleSheet.prototype; _proto.hydrate = function hydrate(nodes) { nodes.forEach(this._insertTag); }; _proto.insert = function insert(rule) { // the max length is how many rules we have per style tag, it's 65000 in speedy mode // it's 1 in dev because we insert source maps that map a single rule to a location // and you can only have one source map per style tag if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) { this._insertTag(createStyleElement(this)); } var tag = this.tags[this.tags.length - 1]; if (false) { var isImportRule; } if (this.isSpeedy) { var sheet = sheetForTag(tag); try { // this is the ultrafast version, works across browsers // the big drawback is that the css won't be editable in devtools sheet.insertRule(rule, sheet.cssRules.length); } catch (e) { if (false) {} } } else { tag.appendChild(document.createTextNode(rule)); } this.ctr++; }; _proto.flush = function flush() { // $FlowFixMe this.tags.forEach(function (tag) { return tag.parentNode && tag.parentNode.removeChild(tag); }); this.tags = []; this.ctr = 0; if (false) {} }; return StyleSheet; }(); ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Utility.js /** * @param {number} * @return {number} */ var abs = Math.abs /** * @param {number} * @return {string} */ var Utility_from = String.fromCharCode /** * @param {object} * @return {object} */ var Utility_assign = Object.assign /** * @param {string} value * @param {number} length * @return {number} */ function hash (value, length) { return (((((((length << 2) ^ Utility_charat(value, 0)) << 2) ^ Utility_charat(value, 1)) << 2) ^ Utility_charat(value, 2)) << 2) ^ Utility_charat(value, 3) } /** * @param {string} value * @return {string} */ function trim (value) { return value.trim() } /** * @param {string} value * @param {RegExp} pattern * @return {string?} */ function match (value, pattern) { return (value = pattern.exec(value)) ? value[0] : value } /** * @param {string} value * @param {(string|RegExp)} pattern * @param {string} replacement * @return {string} */ function replace (value, pattern, replacement) { return value.replace(pattern, replacement) } /** * @param {string} value * @param {string} search * @return {number} */ function indexof (value, search) { return value.indexOf(search) } /** * @param {string} value * @param {number} index * @return {number} */ function Utility_charat (value, index) { return value.charCodeAt(index) | 0 } /** * @param {string} value * @param {number} begin * @param {number} end * @return {string} */ function Utility_substr (value, begin, end) { return value.slice(begin, end) } /** * @param {string} value * @return {number} */ function Utility_strlen (value) { return value.length } /** * @param {any[]} value * @return {number} */ function Utility_sizeof (value) { return value.length } /** * @param {any} value * @param {any[]} array * @return {any} */ function Utility_append (value, array) { return array.push(value), value } /** * @param {string[]} array * @param {function} callback * @return {string} */ function Utility_combine (array, callback) { return array.map(callback).join('') } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Tokenizer.js var line = 1 var column = 1 var Tokenizer_length = 0 var position = 0 var character = 0 var characters = '' /** * @param {string} value * @param {object | null} root * @param {object | null} parent * @param {string} type * @param {string[] | string} props * @param {object[] | string} children * @param {number} length */ function node (value, root, parent, type, props, children, length) { return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''} } /** * @param {object} root * @param {object} props * @return {object} */ function copy (root, props) { return Utility_assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props) } /** * @return {number} */ function Tokenizer_char () { return character } /** * @return {number} */ function prev () { character = position > 0 ? Utility_charat(characters, --position) : 0 if (column--, character === 10) column = 1, line-- return character } /** * @return {number} */ function next () { character = position < Tokenizer_length ? Utility_charat(characters, position++) : 0 if (column++, character === 10) column = 1, line++ return character } /** * @return {number} */ function peek () { return Utility_charat(characters, position) } /** * @return {number} */ function caret () { return position } /** * @param {number} begin * @param {number} end * @return {string} */ function slice (begin, end) { return Utility_substr(characters, begin, end) } /** * @param {number} type * @return {number} */ function token (type) { switch (type) { // \0 \t \n \r \s whitespace token case 0: case 9: case 10: case 13: case 32: return 5 // ! + , / > @ ~ isolate token case 33: case 43: case 44: case 47: case 62: case 64: case 126: // ; { } breakpoint token case 59: case 123: case 125: return 4 // : accompanied token case 58: return 3 // " ' ( [ opening delimit token case 34: case 39: case 40: case 91: return 2 // ) ] closing delimit token case 41: case 93: return 1 } return 0 } /** * @param {string} value * @return {any[]} */ function alloc (value) { return line = column = 1, Tokenizer_length = Utility_strlen(characters = value), position = 0, [] } /** * @param {any} value * @return {any} */ function dealloc (value) { return characters = '', value } /** * @param {number} type * @return {string} */ function delimit (type) { return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type))) } /** * @param {string} value * @return {string[]} */ function Tokenizer_tokenize (value) { return dealloc(tokenizer(alloc(value))) } /** * @param {number} type * @return {string} */ function whitespace (type) { while (character = peek()) if (character < 33) next() else break return token(type) > 2 || token(character) > 3 ? '' : ' ' } /** * @param {string[]} children * @return {string[]} */ function tokenizer (children) { while (next()) switch (token(character)) { case 0: append(identifier(position - 1), children) break case 2: append(delimit(character), children) break default: append(from(character), children) } return children } /** * @param {number} index * @param {number} count * @return {string} */ function escaping (index, count) { while (--count && next()) // not 0-9 A-F a-f if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97)) break return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32)) } /** * @param {number} type * @return {number} */ function delimiter (type) { while (next()) switch (character) { // ] ) " ' case type: return position // " ' case 34: case 39: if (type !== 34 && type !== 39) delimiter(character) break // ( case 40: if (type === 41) delimiter(type) break // \ case 92: next() break } return position } /** * @param {number} type * @param {number} index * @return {number} */ function commenter (type, index) { while (next()) // // if (type + character === 47 + 10) break // /* else if (type + character === 42 + 42 && peek() === 47) break return '/*' + slice(index, position - 1) + '*' + Utility_from(type === 47 ? type : next()) } /** * @param {number} index * @return {string} */ function identifier (index) { while (!token(peek())) next() return slice(index, position) } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Enum.js var MS = '-ms-' var MOZ = '-moz-' var WEBKIT = '-webkit-' var COMMENT = 'comm' var Enum_RULESET = 'rule' var DECLARATION = 'decl' var PAGE = '@page' var MEDIA = '@media' var IMPORT = '@import' var CHARSET = '@charset' var VIEWPORT = '@viewport' var SUPPORTS = '@supports' var DOCUMENT = '@document' var NAMESPACE = '@namespace' var KEYFRAMES = '@keyframes' var FONT_FACE = '@font-face' var COUNTER_STYLE = '@counter-style' var FONT_FEATURE_VALUES = '@font-feature-values' ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Serializer.js /** * @param {object[]} children * @param {function} callback * @return {string} */ function serialize (children, callback) { var output = '' var length = Utility_sizeof(children) for (var i = 0; i < length; i++) output += callback(children[i], i, children, callback) || '' return output } /** * @param {object} element * @param {number} index * @param {object[]} children * @param {function} callback * @return {string} */ function stringify (element, index, children, callback) { switch (element.type) { case IMPORT: case DECLARATION: return element.return = element.return || element.value case COMMENT: return '' case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}' case Enum_RULESET: element.value = element.props.join(',') } return Utility_strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : '' } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Prefixer.js /** * @param {string} value * @param {number} length * @return {string} */ function prefix (value, length) { switch (hash(value, length)) { // color-adjust case 5103: return WEBKIT + 'print-' + value + value // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function) case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break case 5572: case 6356: case 5844: case 3191: case 6645: case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite, case 6391: case 5879: case 5623: case 6135: case 4599: case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width) case 4215: case 6389: case 5109: case 5365: case 5621: case 3829: return WEBKIT + value + value // appearance, user-select, transform, hyphens, text-size-adjust case 5349: case 4246: case 4810: case 6968: case 2756: return WEBKIT + value + MOZ + value + MS + value + value // flex, flex-direction case 6828: case 4268: return WEBKIT + value + MS + value + value // order case 6165: return WEBKIT + value + MS + 'flex-' + value + value // align-items case 5187: return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value // align-self case 5443: return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value // align-content case 4675: return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value // flex-shrink case 5548: return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value // flex-basis case 5292: return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value // flex-grow case 6060: return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value // transition case 4554: return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value // cursor case 6187: return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value // background, background-image case 5495: case 3959: return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1') // justify-content case 4968: return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value // (margin|padding)-inline-(start|end) case 4095: case 3583: case 4068: case 2532: return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value // (min|max)?(width|height|inline-size|block-size) case 8116: case 7059: case 5753: case 5535: case 5445: case 5701: case 4933: case 4677: case 5533: case 5789: case 5021: case 4765: // stretch, max-content, min-content, fill-available if (Utility_strlen(value) - 1 - length > 6) switch (Utility_charat(value, length + 1)) { // (m)ax-content, (m)in-content case 109: // - if (Utility_charat(value, length + 4) !== 45) break // (f)ill-available, (f)it-content case 102: return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (Utility_charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value // (s)tretch case 115: return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value } break // position: sticky case 4949: // (s)ticky? if (Utility_charat(value, length + 1) !== 115) break // display: (flex|inline-flex) case 6444: switch (Utility_charat(value, Utility_strlen(value) - 3 - (~indexof(value, '!important') && 10))) { // stic(k)y case 107: return replace(value, ':', ':' + WEBKIT) + value // (inline-)?fl(e)x case 101: return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (Utility_charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value } break // writing-mode case 5936: switch (Utility_charat(value, length + 11)) { // vertical-l(r) case 114: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value // vertical-r(l) case 108: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value // horizontal(-)tb case 45: return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value } return WEBKIT + value + MS + value + value } return value } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Middleware.js /** * @param {function[]} collection * @return {function} */ function middleware (collection) { var length = Utility_sizeof(collection) return function (element, index, children, callback) { var output = '' for (var i = 0; i < length; i++) output += collection[i](element, index, children, callback) || '' return output } } /** * @param {function} callback * @return {function} */ function rulesheet (callback) { return function (element) { if (!element.root) if (element = element.return) callback(element) } } /** * @param {object} element * @param {number} index * @param {object[]} children * @param {function} callback */ function prefixer (element, index, children, callback) { if (element.length > -1) if (!element.return) switch (element.type) { case DECLARATION: element.return = prefix(element.value, element.length) break case KEYFRAMES: return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback) case Enum_RULESET: if (element.length) return Utility_combine(element.props, function (value) { switch (match(value, /(::plac\w+|:read-\w+)/)) { // :read-(only|write) case ':read-only': case ':read-write': return serialize([copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]})], callback) // :placeholder case '::placeholder': return serialize([ copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}), copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}), copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]}) ], callback) } return '' }) } } /** * @param {object} element * @param {number} index * @param {object[]} children */ function namespace (element) { switch (element.type) { case RULESET: element.props = element.props.map(function (value) { return combine(tokenize(value), function (value, index, children) { switch (charat(value, 0)) { // \f case 12: return substr(value, 1, strlen(value)) // \0 ( + > ~ case 0: case 40: case 43: case 62: case 126: return value // : case 58: if (children[++index] === 'global') children[index] = '', children[++index] = '\f' + substr(children[index], index = 1, -1) // \s case 32: return index === 1 ? '' : value default: switch (index) { case 0: element = value return sizeof(children) > 1 ? '' : value case index = sizeof(children) - 1: case 2: return index === 2 ? value + element + element : value + element default: return value } } }) }) } } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/node_modules/stylis/src/Parser.js /** * @param {string} value * @return {object[]} */ function compile (value) { return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value)) } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {string[]} rule * @param {string[]} rules * @param {string[]} rulesets * @param {number[]} pseudo * @param {number[]} points * @param {string[]} declarations * @return {object} */ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) { var index = 0 var offset = 0 var length = pseudo var atrule = 0 var property = 0 var previous = 0 var variable = 1 var scanning = 1 var ampersand = 1 var character = 0 var type = '' var props = rules var children = rulesets var reference = rule var characters = type while (scanning) switch (previous = character, character = next()) { // ( case 40: if (previous != 108 && characters.charCodeAt(length - 1) == 58) { if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1) ampersand = -1 break } // " ' [ case 34: case 39: case 91: characters += delimit(character) break // \t \n \r \s case 9: case 10: case 13: case 32: characters += whitespace(previous) break // \ case 92: characters += escaping(caret() - 1, 7) continue // / case 47: switch (peek()) { case 42: case 47: Utility_append(comment(commenter(next(), caret()), root, parent), declarations) break default: characters += '/' } break // { case 123 * variable: points[index++] = Utility_strlen(characters) * ampersand // } ; \0 case 125 * variable: case 59: case 0: switch (character) { // \0 } case 0: case 125: scanning = 0 // ; case 59 + offset: if (property > 0 && (Utility_strlen(characters) - length)) Utility_append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations) break // @ ; case 59: characters += ';' // { rule/at-rule default: Utility_append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets) if (character === 123) if (offset === 0) parse(characters, root, reference, reference, props, rulesets, length, points, children) else switch (atrule) { // d m s case 100: case 109: case 115: parse(value, reference, reference, rule && Utility_append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children) break default: parse(characters, reference, reference, reference, [''], children, 0, points, children) } } index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo break // : case 58: length = 1 + Utility_strlen(characters), property = previous default: if (variable < 1) if (character == 123) --variable else if (character == 125 && variable++ == 0 && prev() == 125) continue switch (characters += Utility_from(character), character * variable) { // & case 38: ampersand = offset > 0 ? 1 : (characters += '\f', -1) break // , case 44: points[index++] = (Utility_strlen(characters) - 1) * ampersand, ampersand = 1 break // @ case 64: // - if (peek() === 45) characters += delimit(next()) atrule = peek(), offset = length = Utility_strlen(type = characters += identifier(caret())), character++ break // - case 45: if (previous === 45 && Utility_strlen(characters) == 2) variable = 0 } } return rulesets } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {number} index * @param {number} offset * @param {string[]} rules * @param {number[]} points * @param {string} type * @param {string[]} props * @param {string[]} children * @param {number} length * @return {object} */ function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) { var post = offset - 1 var rule = offset === 0 ? rules : [''] var size = Utility_sizeof(rule) for (var i = 0, j = 0, k = 0; i < index; ++i) for (var x = 0, y = Utility_substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x) if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x]))) props[k++] = z return node(value, root, parent, offset === 0 ? Enum_RULESET : type, props, children, length) } /** * @param {number} value * @param {object} root * @param {object?} parent * @return {object} */ function comment (value, root, parent) { return node(value, root, parent, COMMENT, Utility_from(Tokenizer_char()), Utility_substr(value, 2, -2), 0) } /** * @param {string} value * @param {object} root * @param {object?} parent * @param {number} length * @return {object} */ function declaration (value, root, parent, length) { return node(value, root, parent, DECLARATION, Utility_substr(value, 0, length), Utility_substr(value, length + 1, -1), length) } ;// CONCATENATED MODULE: ./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js var last = function last(arr) { return arr.length ? arr[arr.length - 1] : null; }; // based on https://github.com/thysultan/stylis.js/blob/e6843c373ebcbbfade25ebcc23f540ed8508da0a/src/Tokenizer.js#L239-L244 var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) { var previous = 0; var character = 0; while (true) { previous = character; character = peek(); // &\f if (previous === 38 && character === 12) { points[index] = 1; } if (token(character)) { break; } next(); } return slice(begin, position); }; var toRules = function toRules(parsed, points) { // pretend we've started with a comma var index = -1; var character = 44; do { switch (token(character)) { case 0: // &\f if (character === 38 && peek() === 12) { // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings // stylis inserts \f after & to know when & where it should replace this sequence with the context selector // and when it should just concatenate the outer and inner selectors // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here points[index] = 1; } parsed[index] += identifierWithPointTracking(position - 1, points, index); break; case 2: parsed[index] += delimit(character); break; case 4: // comma if (character === 44) { // colon parsed[++index] = peek() === 58 ? '&\f' : ''; points[index] = parsed[index].length; break; } // fallthrough default: parsed[index] += Utility_from(character); } } while (character = next()); return parsed; }; var getRules = function getRules(value, points) { return dealloc(toRules(alloc(value), points)); }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11 var fixedElements = /* #__PURE__ */new WeakMap(); var compat = function compat(element) { if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo // negative .length indicates that this rule has been already prefixed element.length < 1) { return; } var value = element.value, parent = element.parent; var isImplicitRule = element.column === parent.column && element.line === parent.line; while (parent.type !== 'rule') { parent = parent.parent; if (!parent) return; } // short-circuit for the simplest case if (element.props.length === 1 && value.charCodeAt(0) !== 58 /* colon */ && !fixedElements.get(parent)) { return; } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level) // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent" if (isImplicitRule) { return; } fixedElements.set(element, true); var points = []; var rules = getRules(value, points); var parentRules = parent.props; for (var i = 0, k = 0; i < rules.length; i++) { for (var j = 0; j < parentRules.length; j++, k++) { element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i]; } } }; var removeLabel = function removeLabel(element) { if (element.type === 'decl') { var value = element.value; if ( // charcode for l value.charCodeAt(0) === 108 && // charcode for b value.charCodeAt(2) === 98) { // this ignores label element["return"] = ''; element.value = ''; } } }; var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason'; var isIgnoringComment = function isIgnoringComment(element) { return !!element && element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1; }; var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) { return function (element, index, children) { if (element.type !== 'rule') return; var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g); if (unsafePseudoClasses && cache.compat !== true) { var prevElement = index > 0 ? children[index - 1] : null; if (prevElement && isIgnoringComment(last(prevElement.children))) { return; } unsafePseudoClasses.forEach(function (unsafePseudoClass) { console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\"."); }); } }; }; var isImportRule = function isImportRule(element) { return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64; }; var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) { for (var i = index - 1; i >= 0; i--) { if (!isImportRule(children[i])) { return true; } } return false; }; // use this to remove incorrect elements from further processing // so they don't get handed to the `sheet` (or anything else) // as that could potentially lead to additional logs which in turn could be overhelming to the user var nullifyElement = function nullifyElement(element) { element.type = ''; element.value = ''; element["return"] = ''; element.children = ''; element.props = ''; }; var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) { if (!isImportRule(element)) { return; } if (element.parent) { console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."); nullifyElement(element); } else if (isPrependedWithRegularRules(index, children)) { console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."); nullifyElement(element); } }; var defaultStylisPlugins = [prefixer]; var createCache = function createCache(options) { var key = options.key; if (false) {} if ( key === 'css') { var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be) // note this very very intentionally targets all style elements regardless of the key to ensure // that creating a cache works inside of render of a React component Array.prototype.forEach.call(ssrStyles, function (node) { // we want to only move elements which have a space in the data-emotion attribute value // because that indicates that it is an Emotion 11 server-side rendered style elements // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes) // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles // will not result in the Emotion 10 styles being destroyed var dataEmotionAttribute = node.getAttribute('data-emotion'); if (dataEmotionAttribute.indexOf(' ') === -1) { return; } document.head.appendChild(node); node.setAttribute('data-s', ''); }); } var stylisPlugins = options.stylisPlugins || defaultStylisPlugins; if (false) {} var inserted = {}; // $FlowFixMe var container; var nodesToHydrate = []; { container = options.container || document.head; Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which // means that the style elements we're looking at are only Emotion 11 server-rendered style elements document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) { var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe for (var i = 1; i < attrib.length; i++) { inserted[attrib[i]] = true; } nodesToHydrate.push(node); }); } var _insert; var omnipresentPlugins = [compat, removeLabel]; if (false) {} { var currentSheet; var finalizingPlugins = [stringify, false ? 0 : rulesheet(function (rule) { currentSheet.insert(rule); })]; var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins)); var stylis = function stylis(styles) { return serialize(compile(styles), serializer); }; _insert = function insert(selector, serialized, sheet, shouldCache) { currentSheet = sheet; if (false) {} stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles); if (shouldCache) { cache.inserted[serialized.name] = true; } }; } var cache = { key: key, sheet: new emotion_sheet_browser_esm_StyleSheet({ key: key, container: container, nonce: options.nonce, speedy: options.speedy, prepend: options.prepend, insertionPoint: options.insertionPoint }), nonce: options.nonce, inserted: inserted, registered: {}, insert: _insert }; cache.sheet.hydrate(nodesToHydrate); return cache; }; /* harmony default export */ const emotion_cache_browser_esm = (createCache); ;// CONCATENATED MODULE: ./node_modules/@emotion/hash/dist/hash.browser.esm.js /* eslint-disable */ // Inspired by https://github.com/garycourt/murmurhash-js // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 function murmur2(str) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. // const m = 0x5bd1e995; // const r = 24; // Initialize the hash var h = 0; // Mix 4 bytes at a time into the hash var k, i = 0, len = str.length; for (; len >= 4; ++i, len -= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Handle the last few bytes of the input array switch (len) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Do a few final mixes of the hash to ensure the last few // bytes are well-incorporated. h ^= h >>> 13; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); return ((h ^ h >>> 15) >>> 0).toString(36); } /* harmony default export */ const hash_browser_esm = (murmur2); ;// CONCATENATED MODULE: ./node_modules/@emotion/unitless/dist/unitless.browser.esm.js var unitlessKeys = { animationIterationCount: 1, borderImageOutset: 1, borderImageSlice: 1, borderImageWidth: 1, boxFlex: 1, boxFlexGroup: 1, boxOrdinalGroup: 1, columnCount: 1, columns: 1, flex: 1, flexGrow: 1, flexPositive: 1, flexShrink: 1, flexNegative: 1, flexOrder: 1, gridRow: 1, gridRowEnd: 1, gridRowSpan: 1, gridRowStart: 1, gridColumn: 1, gridColumnEnd: 1, gridColumnSpan: 1, gridColumnStart: 1, msGridRow: 1, msGridRowSpan: 1, msGridColumn: 1, msGridColumnSpan: 1, fontWeight: 1, lineHeight: 1, opacity: 1, order: 1, orphans: 1, tabSize: 1, widows: 1, zIndex: 1, zoom: 1, WebkitLineClamp: 1, // SVG-related properties fillOpacity: 1, floodOpacity: 1, stopOpacity: 1, strokeDasharray: 1, strokeDashoffset: 1, strokeMiterlimit: 1, strokeOpacity: 1, strokeWidth: 1 }; /* harmony default export */ const unitless_browser_esm = (unitlessKeys); ;// CONCATENATED MODULE: ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js function memoize(fn) { var cache = {}; return function (arg) { if (cache[arg] === undefined) cache[arg] = fn(arg); return cache[arg]; }; } /* harmony default export */ const memoize_browser_esm = (memoize); ;// CONCATENATED MODULE: ./node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."; var hyphenateRegex = /[A-Z]|^ms/g; var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g; var isCustomProperty = function isCustomProperty(property) { return property.charCodeAt(1) === 45; }; var isProcessableValue = function isProcessableValue(value) { return value != null && typeof value !== 'boolean'; }; var processStyleName = /* #__PURE__ */memoize_browser_esm(function (styleName) { return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase(); }); var processStyleValue = function processStyleValue(key, value) { switch (key) { case 'animation': case 'animationName': { if (typeof value === 'string') { return value.replace(animationRegex, function (match, p1, p2) { cursor = { name: p1, styles: p2, next: cursor }; return p1; }); } } } if (unitless_browser_esm[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) { return value + 'px'; } return value; }; if (false) { var hyphenatedCache, hyphenPattern, msPattern, oldProcessStyleValue, contentValues, contentValuePattern; } function handleInterpolation(mergedProps, registered, interpolation) { if (interpolation == null) { return ''; } if (interpolation.__emotion_styles !== undefined) { if (false) {} return interpolation; } switch (typeof interpolation) { case 'boolean': { return ''; } case 'object': { if (interpolation.anim === 1) { cursor = { name: interpolation.name, styles: interpolation.styles, next: cursor }; return interpolation.name; } if (interpolation.styles !== undefined) { var next = interpolation.next; if (next !== undefined) { // not the most efficient thing ever but this is a pretty rare case // and there will be very few iterations of this generally while (next !== undefined) { cursor = { name: next.name, styles: next.styles, next: cursor }; next = next.next; } } var styles = interpolation.styles + ";"; if (false) {} return styles; } return createStringFromObject(mergedProps, registered, interpolation); } case 'function': { if (mergedProps !== undefined) { var previousCursor = cursor; var result = interpolation(mergedProps); cursor = previousCursor; return handleInterpolation(mergedProps, registered, result); } else if (false) {} break; } case 'string': if (false) { var replaced, matched; } break; } // finalize string values (regular strings and functions interpolated into css calls) if (registered == null) { return interpolation; } var cached = registered[interpolation]; return cached !== undefined ? cached : interpolation; } function createStringFromObject(mergedProps, registered, obj) { var string = ''; if (Array.isArray(obj)) { for (var i = 0; i < obj.length; i++) { string += handleInterpolation(mergedProps, registered, obj[i]) + ";"; } } else { for (var _key in obj) { var value = obj[_key]; if (typeof value !== 'object') { if (registered != null && registered[value] !== undefined) { string += _key + "{" + registered[value] + "}"; } else if (isProcessableValue(value)) { string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";"; } } else { if (_key === 'NO_COMPONENT_SELECTOR' && "production" !== 'production') {} if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) { for (var _i = 0; _i < value.length; _i++) { if (isProcessableValue(value[_i])) { string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";"; } } } else { var interpolated = handleInterpolation(mergedProps, registered, value); switch (_key) { case 'animation': case 'animationName': { string += processStyleName(_key) + ":" + interpolated + ";"; break; } default: { if (false) {} string += _key + "{" + interpolated + "}"; } } } } } } return string; } var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g; var sourceMapPattern; if (false) {} // this is the cursor for keyframes // keyframes are stored on the SerializedStyles object as a linked list var cursor; var emotion_serialize_browser_esm_serializeStyles = function serializeStyles(args, registered, mergedProps) { if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) { return args[0]; } var stringMode = true; var styles = ''; cursor = undefined; var strings = args[0]; if (strings == null || strings.raw === undefined) { stringMode = false; styles += handleInterpolation(mergedProps, registered, strings); } else { if (false) {} styles += strings[0]; } // we start at 1 since we've already handled the first arg for (var i = 1; i < args.length; i++) { styles += handleInterpolation(mergedProps, registered, args[i]); if (stringMode) { if (false) {} styles += strings[i]; } } var sourceMap; if (false) {} // using a global regex with .exec is stateful so lastIndex has to be reset each time labelPattern.lastIndex = 0; var identifierName = ''; var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5 while ((match = labelPattern.exec(styles)) !== null) { identifierName += '-' + // $FlowFixMe we know it's not null match[1]; } var name = hash_browser_esm(styles) + identifierName; if (false) {} return { name: name, styles: styles, next: cursor }; }; ;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-element-699e6908.browser.esm.js var emotion_element_699e6908_browser_esm_hasOwnProperty = {}.hasOwnProperty; var EmotionCacheContext = /* #__PURE__ */(0,external_React_.createContext)( // we're doing this to avoid preconstruct's dead code elimination in this one case // because this module is primarily intended for the browser and node // but it's also required in react native and similar environments sometimes // and we could have a special build just for that // but this is much easier and the native packages // might use a different theme context in the future anyway typeof HTMLElement !== 'undefined' ? /* #__PURE__ */emotion_cache_browser_esm({ key: 'css' }) : null); if (false) {} var CacheProvider = EmotionCacheContext.Provider; var __unsafe_useEmotionCache = function useEmotionCache() { return (0,external_React_.useContext)(EmotionCacheContext); }; var emotion_element_699e6908_browser_esm_withEmotionCache = function withEmotionCache(func) { // $FlowFixMe return /*#__PURE__*/(0,external_React_.forwardRef)(function (props, ref) { // the cache will never be null in the browser var cache = (0,external_React_.useContext)(EmotionCacheContext); return func(props, cache, ref); }); }; var emotion_element_699e6908_browser_esm_ThemeContext = /* #__PURE__ */(0,external_React_.createContext)({}); if (false) {} var useTheme = function useTheme() { return useContext(emotion_element_699e6908_browser_esm_ThemeContext); }; var getTheme = function getTheme(outerTheme, theme) { if (typeof theme === 'function') { var mergedTheme = theme(outerTheme); if (false) {} return mergedTheme; } if (false) {} return _extends({}, outerTheme, theme); }; var createCacheWithTheme = /* #__PURE__ */(/* unused pure expression or super */ null && (weakMemoize(function (outerTheme) { return weakMemoize(function (theme) { return getTheme(outerTheme, theme); }); }))); var ThemeProvider = function ThemeProvider(props) { var theme = useContext(emotion_element_699e6908_browser_esm_ThemeContext); if (props.theme !== theme) { theme = createCacheWithTheme(theme)(props.theme); } return /*#__PURE__*/createElement(emotion_element_699e6908_browser_esm_ThemeContext.Provider, { value: theme }, props.children); }; function withTheme(Component) { var componentName = Component.displayName || Component.name || 'Component'; var render = function render(props, ref) { var theme = useContext(emotion_element_699e6908_browser_esm_ThemeContext); return /*#__PURE__*/createElement(Component, _extends({ theme: theme, ref: ref }, props)); }; // $FlowFixMe var WithTheme = /*#__PURE__*/forwardRef(render); WithTheme.displayName = "WithTheme(" + componentName + ")"; return hoistNonReactStatics(WithTheme, Component); } var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) { // V8 var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line); if (match) { // The match may be something like 'Object.createEmotionProps' var parts = match[1].split('.'); return parts[parts.length - 1]; } // Safari / Firefox match = /^([A-Za-z0-9$.]+)@/.exec(line); if (match) return match[1]; return undefined; }; var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS // identifiers, thus we only need to replace what is a valid character for JS, // but not for CSS. var sanitizeIdentifier = function sanitizeIdentifier(identifier) { return identifier.replace(/\$/g, '-'); }; var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) { if (!stackTrace) return undefined; var lines = stackTrace.split('\n'); for (var i = 0; i < lines.length; i++) { var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error" if (!functionName) continue; // If we reach one of these, we have gone too far and should quit if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an // uppercase letter if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName); } return undefined; }; var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__'; var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__'; var emotion_element_699e6908_browser_esm_createEmotionProps = function createEmotionProps(type, props) { if (false) {} var newProps = {}; for (var key in props) { if (emotion_element_699e6908_browser_esm_hasOwnProperty.call(props, key)) { newProps[key] = props[key]; } } newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when // the label hasn't already been computed if (false) { var label; } return newProps; }; var Noop = function Noop() { return null; }; var emotion_element_699e6908_browser_esm_Emotion = /* #__PURE__ */(/* unused pure expression or super */ null && (emotion_element_699e6908_browser_esm_withEmotionCache(function (props, cache, ref) { var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works // not passing the registered cache to serializeStyles because it would // make certain babel optimisations not possible if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) { cssProp = cache.registered[cssProp]; } var type = props[typePropName]; var registeredStyles = [cssProp]; var className = ''; if (typeof props.className === 'string') { className = getRegisteredStyles(cache.registered, registeredStyles, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = serializeStyles(registeredStyles, undefined, useContext(emotion_element_699e6908_browser_esm_ThemeContext)); if (false) { var labelFromStack; } var rules = insertStyles(cache, serialized, typeof type === 'string'); className += cache.key + "-" + serialized.name; var newProps = {}; for (var key in props) { if (emotion_element_699e6908_browser_esm_hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( true || 0)) { newProps[key] = props[key]; } } newProps.ref = ref; newProps.className = className; var ele = /*#__PURE__*/createElement(type, newProps); var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null); return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele); }))); if (false) {} ;// CONCATENATED MODULE: ./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js var isBrowser = "object" !== 'undefined'; function emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, classNames) { var rawClassName = ''; classNames.split(' ').forEach(function (className) { if (registered[className] !== undefined) { registeredStyles.push(registered[className] + ";"); } else { rawClassName += className + " "; } }); return rawClassName; } var emotion_utils_browser_esm_insertStyles = function insertStyles(cache, serialized, isStringTag) { var className = cache.key + "-" + serialized.name; if ( // we only need to add the styles to the registered cache if the // class name could be used further down // the tree but if it's a string tag, we know it won't // so we don't have to add it to registered cache. // this improves memory usage since we can avoid storing the whole style string (isStringTag === false || // we need to always store it if we're in compat mode and // in node since emotion-server relies on whether a style is in // the registered cache to know whether a style is global or not // also, note that this check will be dead code eliminated in the browser isBrowser === false ) && cache.registered[className] === undefined) { cache.registered[className] = serialized.styles; } if (cache.inserted[serialized.name] === undefined) { var current = serialized; do { var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true); current = current.next; } while (current !== undefined); } }; ;// CONCATENATED MODULE: ./node_modules/@emotion/css/create-instance/dist/emotion-css-create-instance.esm.js function insertWithoutScoping(cache, serialized) { if (cache.inserted[serialized.name] === undefined) { return cache.insert('', serialized, cache.sheet, true); } } function merge(registered, css, className) { var registeredStyles = []; var rawClassName = emotion_utils_browser_esm_getRegisteredStyles(registered, registeredStyles, className); if (registeredStyles.length < 2) { return className; } return rawClassName + css(registeredStyles); } var createEmotion = function createEmotion(options) { var cache = emotion_cache_browser_esm(options); // $FlowFixMe cache.sheet.speedy = function (value) { if (false) {} this.isSpeedy = value; }; cache.compat = true; var css = function css() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered, undefined); emotion_utils_browser_esm_insertStyles(cache, serialized, false); return cache.key + "-" + serialized.name; }; var keyframes = function keyframes() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered); var animation = "animation-" + serialized.name; insertWithoutScoping(cache, { name: serialized.name, styles: "@keyframes " + animation + "{" + serialized.styles + "}" }); return animation; }; var injectGlobal = function injectGlobal() { for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { args[_key3] = arguments[_key3]; } var serialized = emotion_serialize_browser_esm_serializeStyles(args, cache.registered); insertWithoutScoping(cache, serialized); }; var cx = function cx() { for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { args[_key4] = arguments[_key4]; } return merge(cache.registered, css, emotion_css_create_instance_esm_classnames(args)); }; return { css: css, cx: cx, injectGlobal: injectGlobal, keyframes: keyframes, hydrate: function hydrate(ids) { ids.forEach(function (key) { cache.inserted[key] = true; }); }, flush: function flush() { cache.registered = {}; cache.inserted = {}; cache.sheet.flush(); }, // $FlowFixMe sheet: cache.sheet, cache: cache, getRegisteredStyles: emotion_utils_browser_esm_getRegisteredStyles.bind(null, cache.registered), merge: merge.bind(null, cache.registered, css) }; }; var emotion_css_create_instance_esm_classnames = function classnames(args) { var cls = ''; for (var i = 0; i < args.length; i++) { var arg = args[i]; if (arg == null) continue; var toAdd = void 0; switch (typeof arg) { case 'boolean': break; case 'object': { if (Array.isArray(arg)) { toAdd = classnames(arg); } else { toAdd = ''; for (var k in arg) { if (arg[k] && k) { toAdd && (toAdd += ' '); toAdd += k; } } } break; } default: { toAdd = arg; } } if (toAdd) { cls && (cls += ' '); cls += toAdd; } } return cls; }; /* harmony default export */ const emotion_css_create_instance_esm = (createEmotion); ;// CONCATENATED MODULE: ./node_modules/@emotion/css/dist/emotion-css.esm.js var _createEmotion = emotion_css_create_instance_esm({ key: 'css' }), flush = _createEmotion.flush, hydrate = _createEmotion.hydrate, emotion_css_esm_cx = _createEmotion.cx, emotion_css_esm_merge = _createEmotion.merge, emotion_css_esm_getRegisteredStyles = _createEmotion.getRegisteredStyles, injectGlobal = _createEmotion.injectGlobal, keyframes = _createEmotion.keyframes, css = _createEmotion.css, sheet = _createEmotion.sheet, cache = _createEmotion.cache; ;// CONCATENATED MODULE: ./packages/components/build-module/utils/hooks/use-cx.js /** * External dependencies */ // eslint-disable-next-line no-restricted-imports /** * WordPress dependencies */ const isSerializedStyles = o => typeof o !== 'undefined' && o !== null && ['name', 'styles'].every(p => typeof o[p] !== 'undefined'); /** * Retrieve a `cx` function that knows how to handle `SerializedStyles` * returned by the `@emotion/react` `css` function in addition to what * `cx` normally knows how to handle. It also hooks into the Emotion * Cache, allowing `css` calls to work inside iframes. * * @example * import { css } from '@emotion/react'; * * const styles = css` * color: red * `; * * function RedText( { className, ...props } ) { * const cx = useCx(); * * const classes = cx(styles, className); * * return ; * } */ const useCx = () => { const cache = __unsafe_useEmotionCache(); const cx = (0,external_wp_element_namespaceObject.useCallback)(function () { if (cache === null) { throw new Error('The `useCx` hook should be only used within a valid Emotion Cache Context'); } for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) { classNames[_key] = arguments[_key]; } return emotion_css_esm_cx(...classNames.map(arg => { if (isSerializedStyles(arg)) { emotion_utils_browser_esm_insertStyles(cache, arg, false); return `${cache.key}-${arg.name}`; } return arg; })); }, [cache]); return cx; }; ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/use-context-system.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * @template TProps * @typedef {TProps & { className: string }} ConnectedProps */ /** * Custom hook that derives registered props from the Context system. * These derived props are then consolidated with incoming component props. * * @template {{ className?: string }} P * @param {P} props Incoming props from the component. * @param {string} namespace The namespace to register and to derive context props from. * @return {ConnectedProps

} The connected props. */ function useContextSystem(props, namespace) { const contextSystemProps = useComponentsContext(); if (typeof namespace === 'undefined') { typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0; } const contextProps = (contextSystemProps === null || contextSystemProps === void 0 ? void 0 : contextSystemProps[namespace]) || {}; /* eslint-disable jsdoc/no-undefined-types */ /** @type {ConnectedProps

} */ // @ts-ignore We fill in the missing properties below const finalComponentProps = { ...getConnectedNamespace(), ...getNamespace(namespace) }; /* eslint-enable jsdoc/no-undefined-types */ const { _overrides: overrideProps, ...otherContextProps } = contextProps; const initialMergedProps = Object.entries(otherContextProps).length ? Object.assign({}, otherContextProps, props) : props; const cx = useCx(); const classes = cx(getStyledClassNameFromKey(namespace), props.className); // Provides the ability to customize the render of the component. const rendered = typeof initialMergedProps.renderChildren === 'function' ? initialMergedProps.renderChildren(initialMergedProps) : initialMergedProps.children; for (const key in initialMergedProps) { // @ts-ignore filling in missing props finalComponentProps[key] = initialMergedProps[key]; } for (const key in overrideProps) { // @ts-ignore filling in missing props finalComponentProps[key] = overrideProps[key]; } // Setting an `undefined` explicitly can cause unintended overwrites // when a `cloneElement()` is involved. if (rendered !== undefined) { // @ts-ignore finalComponentProps.children = rendered; } finalComponentProps.className = classes; return finalComponentProps; } ;// CONCATENATED MODULE: ./packages/components/build-module/ui/context/context-connect.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Forwards ref (React.ForwardRef) and "Connects" (or registers) a component * within the Context system under a specified namespace. * * This is an (experimental) evolution of the initial connect() HOC. * The hope is that we can improve render performance by removing functional * component wrappers. * * @param Component The component to register into the Context system. * @param namespace The namespace to register the component under. * @param options * @return The connected WordPressComponent */ function contextConnect(Component, namespace) { let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; const { memo: memoProp = false } = options; let WrappedComponent = (0,external_wp_element_namespaceObject.forwardRef)(Component); if (memoProp) { // @ts-ignore WrappedComponent = (0,external_wp_element_namespaceObject.memo)(WrappedComponent); } if (typeof namespace === 'undefined') { typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0; } // @ts-ignore internal property let mergedNamespace = WrappedComponent[CONNECT_STATIC_NAMESPACE] || [namespace]; /** * Consolidate (merge) namespaces before attaching it to the WrappedComponent. */ if (Array.isArray(namespace)) { mergedNamespace = [...mergedNamespace, ...namespace]; } if (typeof namespace === 'string') { mergedNamespace = [...mergedNamespace, namespace]; } WrappedComponent.displayName = namespace; // @ts-ignore internal property WrappedComponent[CONNECT_STATIC_NAMESPACE] = (0,external_lodash_namespaceObject.uniq)(mergedNamespace); // @ts-ignore WordPressComponent property WrappedComponent.selector = `.${getStyledClassNameFromKey(namespace)}`; // @ts-ignore return WrappedComponent; } /** * Attempts to retrieve the connected namespace from a component. * * @param Component The component to retrieve a namespace from. * @return The connected namespaces. */ function getConnectNamespace(Component) { if (!Component) return []; let namespaces = []; // @ts-ignore internal property if (Component[CONNECT_STATIC_NAMESPACE]) { // @ts-ignore internal property namespaces = Component[CONNECT_STATIC_NAMESPACE]; } // @ts-ignore if (Component.type && Component.type[CONNECT_STATIC_NAMESPACE]) { // @ts-ignore namespaces = Component.type[CONNECT_STATIC_NAMESPACE]; } return namespaces; } /** * Checks to see if a component is connected within the Context system. * * @param Component The component to retrieve a namespace from. * @param match The namespace to check. */ function hasConnectNamespace(Component, match) { if (!Component) return false; if (typeof match === 'string') { return getConnectNamespace(Component).includes(match); } if (Array.isArray(match)) { return match.some(result => getConnectNamespace(Component).includes(result)); } return false; } ;// CONCATENATED MODULE: ./packages/components/build-module/visually-hidden/styles.js /** * External dependencies */ const visuallyHidden = { border: 0, clip: 'rect(1px, 1px, 1px, 1px)', WebkitClipPath: 'inset( 50% )', clipPath: 'inset( 50% )', height: '1px', margin: '-1px', overflow: 'hidden', padding: 0, position: 'absolute', width: '1px', wordWrap: 'normal' }; ;// CONCATENATED MODULE: ./node_modules/@emotion/styled/node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.browser.esm.js var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 var isPropValid = /* #__PURE__ */memoize_browser_esm(function (prop) { return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 /* o */ && prop.charCodeAt(1) === 110 /* n */ && prop.charCodeAt(2) < 91; } /* Z+1 */ ); /* harmony default export */ const emotion_is_prop_valid_browser_esm = (isPropValid); ;// CONCATENATED MODULE: ./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js var testOmitPropsOnStringTag = emotion_is_prop_valid_browser_esm; var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) { return key !== 'theme'; }; var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) { return typeof tag === 'string' && // 96 is one less than the char code // for "a" so this is checking that // it's a lowercase character tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent; }; var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) { var shouldForwardProp; if (options) { var optionsShouldForwardProp = options.shouldForwardProp; shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) { return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName); } : optionsShouldForwardProp; } if (typeof shouldForwardProp !== 'function' && isReal) { shouldForwardProp = tag.__emotion_forwardProp; } return shouldForwardProp; }; var emotion_styled_base_browser_esm_ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences"; var emotion_styled_base_browser_esm_Noop = function Noop() { return null; }; var createStyled = function createStyled(tag, options) { if (false) {} var isReal = tag.__emotion_real === tag; var baseTag = isReal && tag.__emotion_base || tag; var identifierName; var targetClassName; if (options !== undefined) { identifierName = options.label; targetClassName = options.target; } var shouldForwardProp = composeShouldForwardProps(tag, options, isReal); var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag); var shouldUseAs = !defaultShouldForwardProp('as'); return function () { var args = arguments; var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : []; if (identifierName !== undefined) { styles.push("label:" + identifierName + ";"); } if (args[0] == null || args[0].raw === undefined) { styles.push.apply(styles, args); } else { if (false) {} styles.push(args[0][0]); var len = args.length; var i = 1; for (; i < len; i++) { if (false) {} styles.push(args[i], args[0][i]); } } // $FlowFixMe: we need to cast StatelessFunctionalComponent to our PrivateStyledComponent class var Styled = emotion_element_699e6908_browser_esm_withEmotionCache(function (props, cache, ref) { var finalTag = shouldUseAs && props.as || baseTag; var className = ''; var classInterpolations = []; var mergedProps = props; if (props.theme == null) { mergedProps = {}; for (var key in props) { mergedProps[key] = props[key]; } mergedProps.theme = (0,external_React_.useContext)(emotion_element_699e6908_browser_esm_ThemeContext); } if (typeof props.className === 'string') { className = emotion_utils_browser_esm_getRegisteredStyles(cache.registered, classInterpolations, props.className); } else if (props.className != null) { className = props.className + " "; } var serialized = emotion_serialize_browser_esm_serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps); var rules = emotion_utils_browser_esm_insertStyles(cache, serialized, typeof finalTag === 'string'); className += cache.key + "-" + serialized.name; if (targetClassName !== undefined) { className += " " + targetClassName; } var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(finalTag) : defaultShouldForwardProp; var newProps = {}; for (var _key in props) { if (shouldUseAs && _key === 'as') continue; if ( // $FlowFixMe finalShouldForwardProp(_key)) { newProps[_key] = props[_key]; } } newProps.className = className; newProps.ref = ref; var ele = /*#__PURE__*/(0,external_React_.createElement)(finalTag, newProps); var possiblyStyleElement = /*#__PURE__*/(0,external_React_.createElement)(emotion_styled_base_browser_esm_Noop, null); return /*#__PURE__*/(0,external_React_.createElement)(external_React_.Fragment, null, possiblyStyleElement, ele); }); Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")"; Styled.defaultProps = tag.defaultProps; Styled.__emotion_real = Styled; Styled.__emotion_base = baseTag; Styled.__emotion_styles = styles; Styled.__emotion_forwardProp = shouldForwardProp; Object.defineProperty(Styled, 'toString', { value: function value() { if (targetClassName === undefined && "production" !== 'production') {} // $FlowFixMe: coerce undefined to string return "." + targetClassName; } }); Styled.withComponent = function (nextTag, nextOptions) { return createStyled(nextTag, extends_extends({}, options, nextOptions, { shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true) })).apply(void 0, styles); }; return Styled; }; }; /* harmony default export */ const emotion_styled_base_browser_esm = (createStyled); ;// CONCATENATED MODULE: ./packages/components/build-module/view/component.js /** * External dependencies */ /** * `View` is a core component that renders everything in the library. * It is the principle component in the entire library. * * @example * ```jsx * import { View } from `@wordpress/components`; * * function Example() { * return ( * * Code is Poetry * * ); * } * ``` * * @type {import('../ui/context').WordPressComponent<'div', { children?: import('react').ReactNode }, true>} */ // @ts-ignore const View = emotion_styled_base_browser_esm("div", true ? { target: "em57xhy0" } : 0)( true ? "" : 0); View.selector = '.components-view'; View.displayName = 'View'; /* harmony default export */ const component = (View); ;// CONCATENATED MODULE: ./packages/components/build-module/visually-hidden/component.js /** * External dependencies */ /** * Internal dependencies */ function UnconnectedVisuallyHidden(props, forwardedRef) { const { style: styleProp, ...contextProps } = useContextSystem(props, 'VisuallyHidden'); return (0,external_wp_element_namespaceObject.createElement)(component, extends_extends({ ref: forwardedRef }, contextProps, { style: { ...visuallyHidden, ...(styleProp || {}) } })); } /** * `VisuallyHidden` is a component used to render text intended to be visually * hidden, but will show for alternate devices, for example a screen reader. * * ```jsx * import { VisuallyHidden } from `@wordpress/components`; * * function Example() { * return ( * * * * ); * } * ``` */ const VisuallyHidden = contextConnect(UnconnectedVisuallyHidden, 'VisuallyHidden'); /* harmony default export */ const visually_hidden_component = (VisuallyHidden); ;// CONCATENATED MODULE: ./packages/components/build-module/button/index.js // @ts-nocheck /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const disabledEventsOnDisabledButton = ['onMouseDown', 'onClick']; function useDeprecatedProps(_ref) { let { isDefault, isPrimary, isSecondary, isTertiary, isLink, variant, ...otherProps } = _ref; let computedVariant = variant; if (isPrimary) { var _computedVariant; (_computedVariant = computedVariant) !== null && _computedVariant !== void 0 ? _computedVariant : computedVariant = 'primary'; } if (isTertiary) { var _computedVariant2; (_computedVariant2 = computedVariant) !== null && _computedVariant2 !== void 0 ? _computedVariant2 : computedVariant = 'tertiary'; } if (isSecondary) { var _computedVariant3; (_computedVariant3 = computedVariant) !== null && _computedVariant3 !== void 0 ? _computedVariant3 : computedVariant = 'secondary'; } if (isDefault) { var _computedVariant4; external_wp_deprecated_default()('Button isDefault prop', { since: '5.4', alternative: 'variant="secondary"', version: '6.2' }); (_computedVariant4 = computedVariant) !== null && _computedVariant4 !== void 0 ? _computedVariant4 : computedVariant = 'secondary'; } if (isLink) { var _computedVariant5; (_computedVariant5 = computedVariant) !== null && _computedVariant5 !== void 0 ? _computedVariant5 : computedVariant = 'link'; } return { ...otherProps, variant: computedVariant }; } function Button(props, ref) { const { href, target, isSmall, isPressed, isBusy, isDestructive, className, disabled, icon, iconPosition = 'left', iconSize, showTooltip, tooltipPosition, shortcut, label, children, text, variant, __experimentalIsFocusable: isFocusable, describedBy, ...additionalProps } = useDeprecatedProps(props); const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(Button, 'components-button__description'); const classes = classnames_default()('components-button', className, { 'is-secondary': variant === 'secondary', 'is-primary': variant === 'primary', 'is-small': isSmall, 'is-tertiary': variant === 'tertiary', 'is-pressed': isPressed, 'is-busy': isBusy, 'is-link': variant === 'link', 'is-destructive': isDestructive, 'has-text': !!icon && !!children, 'has-icon': !!icon }); const trulyDisabled = disabled && !isFocusable; const Tag = href !== undefined && !trulyDisabled ? 'a' : 'button'; const tagProps = Tag === 'a' ? { href, target } : { type: 'button', disabled: trulyDisabled, 'aria-pressed': isPressed }; if (disabled && isFocusable) { // In this case, the button will be disabled, but still focusable and // perceivable by screen reader users. tagProps['aria-disabled'] = true; for (const disabledEvent of disabledEventsOnDisabledButton) { additionalProps[disabledEvent] = event => { event.stopPropagation(); event.preventDefault(); }; } } // Should show the tooltip if... const shouldShowTooltip = !trulyDisabled && ( // An explicit tooltip is passed or... showTooltip && label || // There's a shortcut or... shortcut || // There's a label and... !!label && // The children are empty and... !(children !== null && children !== void 0 && children.length) && // The tooltip is not explicitly disabled. false !== showTooltip); const descriptionId = describedBy ? instanceId : null; const describedById = additionalProps['aria-describedby'] || descriptionId; const element = (0,external_wp_element_namespaceObject.createElement)(Tag, extends_extends({}, tagProps, additionalProps, { className: classes, "aria-label": additionalProps['aria-label'] || label, "aria-describedby": describedById, ref: ref }), icon && iconPosition === 'left' && (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { icon: icon, size: iconSize }), text && (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, text), icon && iconPosition === 'right' && (0,external_wp_element_namespaceObject.createElement)(build_module_icon, { icon: icon, size: iconSize }), children); if (!shouldShowTooltip) { return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, element, describedBy && (0,external_wp_element_namespaceObject.createElement)(visually_hidden_component, null, (0,external_wp_element_namespaceObject.createElement)("span", { id: descriptionId }, describedBy))); } return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(tooltip, { text: children !== null && children !== void 0 && children.length && describedBy ? describedBy : label, shortcut: shortcut, position: tooltipPosition }, element), describedBy && (0,external_wp_element_namespaceObject.createElement)(visually_hidden_component, null, (0,external_wp_element_namespaceObject.createElement)("span", { id: descriptionId }, describedBy))); } /* harmony default export */ const build_module_button = ((0,external_wp_element_namespaceObject.forwardRef)(Button)); ;// CONCATENATED MODULE: ./packages/components/build-module/scroll-lock/index.js /** * WordPress dependencies */ /* * Setting `overflow: hidden` on html and body elements resets body scroll in iOS. * Save scroll top so we can restore it after locking scroll. * * NOTE: It would be cleaner and possibly safer to find a localized solution such * as preventing default on certain touchmove events. */ let previousScrollTop = 0; function setLocked(locked) { const scrollingElement = document.scrollingElement || document.body; if (locked) { previousScrollTop = scrollingElement.scrollTop; } const methodName = locked ? 'add' : 'remove'; scrollingElement.classList[methodName]('lockscroll'); // Adding the class to the document element seems to be necessary in iOS. document.documentElement.classList[methodName]('lockscroll'); if (!locked) { scrollingElement.scrollTop = previousScrollTop; } } let lockCounter = 0; /** * ScrollLock is a content-free React component for declaratively preventing * scroll bleed from modal UI to the page body. This component applies a * `lockscroll` class to the `document.documentElement` and * `document.scrollingElement` elements to stop the body from scrolling. When it * is present, the lock is applied. * * ```jsx * import { ScrollLock, Button } from '@wordpress/components'; * import { useState } from '@wordpress/element'; * * const MyScrollLock = () => { * const [ isScrollLocked, setIsScrollLocked ] = useState( false ); * * const toggleLock = () => { * setIsScrollLocked( ( locked ) => ! locked ) ); * }; * * return ( *

* * { isScrollLocked && } *

* Scroll locked: * { isScrollLocked ? 'Yes' : 'No' } *

*
* ); * }; * ``` */ function ScrollLock() { (0,external_wp_element_namespaceObject.useEffect)(() => { if (lockCounter === 0) { setLocked(true); } ++lockCounter; return () => { if (lockCounter === 1) { setLocked(false); } --lockCounter; }; }, []); return null; } /* harmony default export */ const scroll_lock = (ScrollLock); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/context.js // @ts-nocheck /** * WordPress dependencies */ const SlotFillContext = (0,external_wp_element_namespaceObject.createContext)({ registerSlot: () => {}, unregisterSlot: () => {}, registerFill: () => {}, unregisterFill: () => {}, getSlot: () => {}, getFills: () => {}, subscribe: () => {} }); /* harmony default export */ const context = (SlotFillContext); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/use-slot.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ /** * React hook returning the active slot given a name. * * @param {string} name Slot name. * @return {Object} Slot object. */ const useSlot = name => { const { getSlot, subscribe } = (0,external_wp_element_namespaceObject.useContext)(context); const [slot, setSlot] = (0,external_wp_element_namespaceObject.useState)(getSlot(name)); (0,external_wp_element_namespaceObject.useEffect)(() => { setSlot(getSlot(name)); const unsubscribe = subscribe(() => { setSlot(getSlot(name)); }); return unsubscribe; }, [name]); return slot; }; /* harmony default export */ const use_slot = (useSlot); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/fill.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function FillComponent(_ref) { let { name, children, registerFill, unregisterFill } = _ref; const slot = use_slot(name); const ref = (0,external_wp_element_namespaceObject.useRef)({ name, children }); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { registerFill(name, ref.current); return () => unregisterFill(name, ref.current); }, []); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { ref.current.children = children; if (slot) { slot.forceUpdate(); } }, [children]); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (name === ref.current.name) { // Ignore initial effect. return; } unregisterFill(ref.current.name, ref.current); ref.current.name = name; registerFill(name, ref.current); }, [name]); if (!slot || !slot.node) { return null; } // If a function is passed as a child, provide it with the fillProps. if (typeof children === 'function') { children = children(slot.props.fillProps); } return (0,external_wp_element_namespaceObject.createPortal)(children, slot.node); } const Fill = props => (0,external_wp_element_namespaceObject.createElement)(context.Consumer, null, _ref2 => { let { registerFill, unregisterFill } = _ref2; return (0,external_wp_element_namespaceObject.createElement)(FillComponent, extends_extends({}, props, { registerFill: registerFill, unregisterFill: unregisterFill })); }); /* harmony default export */ const fill = (Fill); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/slot.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ /** * Whether the argument is a function. * * @param {*} maybeFunc The argument to check. * @return {boolean} True if the argument is a function, false otherwise. */ function isFunction(maybeFunc) { return typeof maybeFunc === 'function'; } class SlotComponent extends external_wp_element_namespaceObject.Component { constructor() { super(...arguments); this.isUnmounted = false; this.bindNode = this.bindNode.bind(this); } componentDidMount() { const { registerSlot } = this.props; registerSlot(this.props.name, this); } componentWillUnmount() { const { unregisterSlot } = this.props; this.isUnmounted = true; unregisterSlot(this.props.name, this); } componentDidUpdate(prevProps) { const { name, unregisterSlot, registerSlot } = this.props; if (prevProps.name !== name) { unregisterSlot(prevProps.name); registerSlot(name, this); } } bindNode(node) { this.node = node; } forceUpdate() { if (this.isUnmounted) { return; } super.forceUpdate(); } render() { var _getFills; const { children, name, fillProps = {}, getFills } = this.props; const fills = ((_getFills = getFills(name, this)) !== null && _getFills !== void 0 ? _getFills : []).map(fill => { const fillChildren = isFunction(fill.children) ? fill.children(fillProps) : fill.children; return external_wp_element_namespaceObject.Children.map(fillChildren, (child, childIndex) => { if (!child || typeof child === 'string') { return child; } const childKey = child.key || childIndex; return (0,external_wp_element_namespaceObject.cloneElement)(child, { key: childKey }); }); }).filter( // In some cases fills are rendered only when some conditions apply. // This ensures that we only use non-empty fills when rendering, i.e., // it allows us to render wrappers only when the fills are actually present. element => !(0,external_wp_element_namespaceObject.isEmptyElement)(element)); return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, isFunction(children) ? children(fills) : fills); } } const Slot = props => (0,external_wp_element_namespaceObject.createElement)(context.Consumer, null, _ref => { let { registerSlot, unregisterSlot, getFills } = _ref; return (0,external_wp_element_namespaceObject.createElement)(SlotComponent, extends_extends({}, props, { registerSlot: registerSlot, unregisterSlot: unregisterSlot, getFills: getFills })); }); /* harmony default export */ const slot = (Slot); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/bubbles-virtually/slot-fill-context.js // @ts-nocheck /** * WordPress dependencies */ const slot_fill_context_SlotFillContext = (0,external_wp_element_namespaceObject.createContext)({ slots: {}, fills: {}, registerSlot: () => { typeof process !== "undefined" && process.env && "production" !== "production" ? 0 : void 0; }, updateSlot: () => {}, unregisterSlot: () => {}, registerFill: () => {}, unregisterFill: () => {} }); /* harmony default export */ const slot_fill_context = (slot_fill_context_SlotFillContext); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/bubbles-virtually/use-slot.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function use_slot_useSlot(name) { const registry = (0,external_wp_element_namespaceObject.useContext)(slot_fill_context); const slot = registry.slots[name] || {}; const slotFills = registry.fills[name]; const fills = (0,external_wp_element_namespaceObject.useMemo)(() => slotFills || [], [slotFills]); const updateSlot = (0,external_wp_element_namespaceObject.useCallback)(fillProps => { registry.updateSlot(name, fillProps); }, [name, registry.updateSlot]); const unregisterSlot = (0,external_wp_element_namespaceObject.useCallback)(slotRef => { registry.unregisterSlot(name, slotRef); }, [name, registry.unregisterSlot]); const registerFill = (0,external_wp_element_namespaceObject.useCallback)(fillRef => { registry.registerFill(name, fillRef); }, [name, registry.registerFill]); const unregisterFill = (0,external_wp_element_namespaceObject.useCallback)(fillRef => { registry.unregisterFill(name, fillRef); }, [name, registry.unregisterFill]); return { ...slot, updateSlot, unregisterSlot, fills, registerFill, unregisterFill }; } ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js // Unique ID creation requires a high quality random # generator. In the browser we therefore // require the crypto API and do not support built-in fallback to lower quality random number // generators (like Math.random()). // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, // find the complete implementation of crypto (msCrypto) on IE11. var getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); var rnds8 = new Uint8Array(16); function rng() { if (!getRandomValues) { throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); } return getRandomValues(rnds8); } ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js /* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i); ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js function validate(uuid) { return typeof uuid === 'string' && regex.test(uuid); } /* harmony default export */ const esm_browser_validate = (validate); ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js /** * Convert array of 16 byte values to UUID string format of the form: * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ var byteToHex = []; for (var stringify_i = 0; stringify_i < 256; ++stringify_i) { byteToHex.push((stringify_i + 0x100).toString(16).substr(1)); } function stringify_stringify(arr) { var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; // Note: Be careful editing this code! It's been tuned for performance // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one // of the following: // - One or more input array values don't map to a hex octet (leading to // "undefined" in the uuid) // - Invalid input values for the RFC `version` or `variant` fields if (!esm_browser_validate(uuid)) { throw TypeError('Stringified UUID is invalid'); } return uuid; } /* harmony default export */ const esm_browser_stringify = (stringify_stringify); ;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js function v4(options, buf, offset) { options = options || {}; var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` rnds[6] = rnds[6] & 0x0f | 0x40; rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided if (buf) { offset = offset || 0; for (var i = 0; i < 16; ++i) { buf[offset + i] = rnds[i]; } return buf; } return esm_browser_stringify(rnds); } /* harmony default export */ const esm_browser_v4 = (v4); ;// CONCATENATED MODULE: ./packages/components/build-module/style-provider/index.js /** * External dependencies */ /** * Internal dependencies */ const uuidCache = new Set(); const memoizedCreateCacheWithContainer = memize_default()(container => { // Emotion only accepts alphabetical and hyphenated keys so we just // strip the numbers from the UUID. It _should_ be fine. let key = esm_browser_v4().replace(/[0-9]/g, ''); while (uuidCache.has(key)) { key = esm_browser_v4().replace(/[0-9]/g, ''); } uuidCache.add(key); return emotion_cache_browser_esm({ container, key }); }); function StyleProvider(props) { const { children, document } = props; if (!document) { return null; } const cache = memoizedCreateCacheWithContainer(document.head); return (0,external_wp_element_namespaceObject.createElement)(CacheProvider, { value: cache }, children); } /* harmony default export */ const style_provider = (StyleProvider); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/bubbles-virtually/fill.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function useForceUpdate() { const [, setState] = (0,external_wp_element_namespaceObject.useState)({}); const mounted = (0,external_wp_element_namespaceObject.useRef)(true); (0,external_wp_element_namespaceObject.useEffect)(() => { return () => { mounted.current = false; }; }, []); return () => { if (mounted.current) { setState({}); } }; } function fill_Fill(_ref) { let { name, children } = _ref; const slot = use_slot_useSlot(name); const ref = (0,external_wp_element_namespaceObject.useRef)({ rerender: useForceUpdate() }); (0,external_wp_element_namespaceObject.useEffect)(() => { // We register fills so we can keep track of their existance. // Some Slot implementations need to know if there're already fills // registered so they can choose to render themselves or not. slot.registerFill(ref); return () => { slot.unregisterFill(ref); }; }, [slot.registerFill, slot.unregisterFill]); if (!slot.ref || !slot.ref.current) { return null; } if (typeof children === 'function') { children = children(slot.fillProps); } // When using a `Fill`, the `children` will be rendered in the document of the // `Slot`. This means that we need to wrap the `children` in a `StyleProvider` // to make sure we're referencing the right document/iframe (instead of the // context of the `Fill`'s parent). const wrappedChildren = (0,external_wp_element_namespaceObject.createElement)(style_provider, { document: slot.ref.current.ownerDocument }, children); return (0,external_wp_element_namespaceObject.createPortal)(wrappedChildren, slot.ref.current); } ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/bubbles-virtually/slot.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function slot_Slot(_ref, forwardedRef) { let { name, fillProps = {}, as: Component = 'div', ...props } = _ref; const registry = (0,external_wp_element_namespaceObject.useContext)(slot_fill_context); const ref = (0,external_wp_element_namespaceObject.useRef)(); (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { registry.registerSlot(name, ref, fillProps); return () => { registry.unregisterSlot(name, ref); }; // We are not including fillProps in the deps because we don't want to // unregister and register the slot whenever fillProps change, which would // cause the fill to be re-mounted. We are only considering the initial value // of fillProps. }, [registry.registerSlot, registry.unregisterSlot, name]); // fillProps may be an update that interacts with the layout, so we // useLayoutEffect. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { registry.updateSlot(name, fillProps); }); return (0,external_wp_element_namespaceObject.createElement)(Component, extends_extends({ ref: (0,external_wp_compose_namespaceObject.useMergeRefs)([forwardedRef, ref]) }, props)); } /* harmony default export */ const bubbles_virtually_slot = ((0,external_wp_element_namespaceObject.forwardRef)(slot_Slot)); ;// CONCATENATED MODULE: external ["wp","isShallowEqual"] const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"]; var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject); ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function useSlotRegistry() { const [slots, setSlots] = (0,external_wp_element_namespaceObject.useState)({}); const [fills, setFills] = (0,external_wp_element_namespaceObject.useState)({}); const registerSlot = (0,external_wp_element_namespaceObject.useCallback)((name, ref, fillProps) => { setSlots(prevSlots => { const slot = prevSlots[name] || {}; return { ...prevSlots, [name]: { ...slot, ref: ref || slot.ref, fillProps: fillProps || slot.fillProps || {} } }; }); }, []); const unregisterSlot = (0,external_wp_element_namespaceObject.useCallback)((name, ref) => { setSlots(prevSlots => { const { [name]: slot, ...nextSlots } = prevSlots; // Make sure we're not unregistering a slot registered by another element // See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412 if ((slot === null || slot === void 0 ? void 0 : slot.ref) === ref) { return nextSlots; } return prevSlots; }); }, []); const updateSlot = (0,external_wp_element_namespaceObject.useCallback)((name, fillProps) => { const slot = slots[name]; if (!slot) { return; } if (!external_wp_isShallowEqual_default()(slot.fillProps, fillProps)) { slot.fillProps = fillProps; const slotFills = fills[name]; if (slotFills) { // Force update fills. slotFills.map(fill => fill.current.rerender()); } } }, [slots, fills]); const registerFill = (0,external_wp_element_namespaceObject.useCallback)((name, ref) => { setFills(prevFills => ({ ...prevFills, [name]: [...(prevFills[name] || []), ref] })); }, []); const unregisterFill = (0,external_wp_element_namespaceObject.useCallback)((name, ref) => { setFills(prevFills => { if (prevFills[name]) { return { ...prevFills, [name]: prevFills[name].filter(fillRef => fillRef !== ref) }; } return prevFills; }); }, []); // Memoizing the return value so it can be directly passed to Provider value const registry = (0,external_wp_element_namespaceObject.useMemo)(() => ({ slots, fills, registerSlot, updateSlot, unregisterSlot, registerFill, unregisterFill }), [slots, fills, registerSlot, updateSlot, unregisterSlot, registerFill, unregisterFill]); return registry; } function SlotFillProvider(_ref) { let { children } = _ref; const registry = useSlotRegistry(); return (0,external_wp_element_namespaceObject.createElement)(slot_fill_context.Provider, { value: registry }, children); } ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/provider.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ class provider_SlotFillProvider extends external_wp_element_namespaceObject.Component { constructor() { super(...arguments); this.registerSlot = this.registerSlot.bind(this); this.registerFill = this.registerFill.bind(this); this.unregisterSlot = this.unregisterSlot.bind(this); this.unregisterFill = this.unregisterFill.bind(this); this.getSlot = this.getSlot.bind(this); this.getFills = this.getFills.bind(this); this.hasFills = this.hasFills.bind(this); this.subscribe = this.subscribe.bind(this); this.slots = {}; this.fills = {}; this.listeners = []; this.contextValue = { registerSlot: this.registerSlot, unregisterSlot: this.unregisterSlot, registerFill: this.registerFill, unregisterFill: this.unregisterFill, getSlot: this.getSlot, getFills: this.getFills, hasFills: this.hasFills, subscribe: this.subscribe }; } registerSlot(name, slot) { const previousSlot = this.slots[name]; this.slots[name] = slot; this.triggerListeners(); // Sometimes the fills are registered after the initial render of slot // But before the registerSlot call, we need to rerender the slot. this.forceUpdateSlot(name); // If a new instance of a slot is being mounted while another with the // same name exists, force its update _after_ the new slot has been // assigned into the instance, such that its own rendering of children // will be empty (the new Slot will subsume all fills for this name). if (previousSlot) { previousSlot.forceUpdate(); } } registerFill(name, instance) { this.fills[name] = [...(this.fills[name] || []), instance]; this.forceUpdateSlot(name); } unregisterSlot(name, instance) { // If a previous instance of a Slot by this name unmounts, do nothing, // as the slot and its fills should only be removed for the current // known instance. if (this.slots[name] !== instance) { return; } delete this.slots[name]; this.triggerListeners(); } unregisterFill(name, instance) { var _this$fills$name$filt, _this$fills$name; this.fills[name] = (_this$fills$name$filt = (_this$fills$name = this.fills[name]) === null || _this$fills$name === void 0 ? void 0 : _this$fills$name.filter(fill => fill !== instance)) !== null && _this$fills$name$filt !== void 0 ? _this$fills$name$filt : []; this.forceUpdateSlot(name); } getSlot(name) { return this.slots[name]; } getFills(name, slotInstance) { // Fills should only be returned for the current instance of the slot // in which they occupy. if (this.slots[name] !== slotInstance) { return []; } return this.fills[name]; } hasFills(name) { return this.fills[name] && !!this.fills[name].length; } forceUpdateSlot(name) { const slot = this.getSlot(name); if (slot) { slot.forceUpdate(); } } triggerListeners() { this.listeners.forEach(listener => listener()); } subscribe(listener) { this.listeners.push(listener); return () => { this.listeners = this.listeners.filter(l => l !== listener); }; } render() { return (0,external_wp_element_namespaceObject.createElement)(context.Provider, { value: this.contextValue }, this.props.children); } } ;// CONCATENATED MODULE: ./packages/components/build-module/slot-fill/index.js // @ts-nocheck /** * WordPress dependencies */ /** * Internal dependencies */ function slot_fill_Fill(props) { // We're adding both Fills here so they can register themselves before // their respective slot has been registered. Only the Fill that has a slot // will render. The other one will return null. return (0,external_wp_element_namespaceObject.createElement)(external_wp_element_namespaceObject.Fragment, null, (0,external_wp_element_namespaceObject.createElement)(fill, props), (0,external_wp_element_namespaceObject.createElement)(fill_Fill, props)); } const slot_fill_Slot = (0,external_wp_element_namespaceObject.forwardRef)((_ref, ref) => { let { bubblesVirtually, ...props } = _ref; if (bubblesVirtually) { return (0,external_wp_element_namespaceObject.createElement)(bubbles_virtually_slot, extends_extends({}, props, { ref: ref })); } return (0,external_wp_element_namespaceObject.createElement)(slot, props); }); function Provider(_ref2) { let { children, ...props } = _ref2; return (0,external_wp_element_namespaceObject.createElement)(provider_SlotFillProvider, props, (0,external_wp_element_namespaceObject.createElement)(SlotFillProvider, null, children)); } function createSlotFill(name) { const FillComponent = props => (0,external_wp_element_namespaceObject.createElement)(slot_fill_Fill, extends_extends({ name: name }, props)); FillComponent.displayName = name + 'Fill'; const SlotComponent = props => (0,external_wp_element_namespaceObject.createElement)(slot_fill_Slot, extends_extends({ name: name }, props)); SlotComponent.displayName = name + 'Slot'; SlotComponent.__unstableName = name; return { Fill: FillComponent, Slot: SlotComponent }; } ;// CONCATENATED MODULE: ./packages/components/build-module/animate/index.js /** * External dependencies */ /** * @typedef {'top' | 'top left' | 'top right' | 'middle' | 'middle left' | 'middle right' | 'bottom' | 'bottom left' | 'bottom right'} AppearOrigin * @typedef {'left' | 'right'} SlideInOrigin * @typedef {{ type: 'appear'; origin?: AppearOrigin }} AppearOptions * @typedef {{ type: 'slide-in'; origin?: SlideInOrigin }} SlideInOptions * @typedef {{ type: 'loading' }} LoadingOptions * @typedef {AppearOptions | SlideInOptions | LoadingOptions} GetAnimateOptions */ /* eslint-disable jsdoc/valid-types */ /** * @param {GetAnimateOptions['type']} type The animation type * @return {'top' | 'left'} Default origin */ function getDefaultOrigin(type) { return type === 'appear' ? 'top' : 'left'; } /* eslint-enable jsdoc/valid-types */ /** * @param {GetAnimateOptions} options * * @return {string | void} ClassName that applies the animations */ function getAnimateClassName(options) { if (options.type === 'loading') { return classnames_default()('components-animate__loading'); } const { type, origin = getDefaultOrigin(type) } = options; if (type === 'appear') { const [yAxis, xAxis = 'center'] = origin.split(' '); return classnames_default()('components-animate__appear', { ['is-from-' + xAxis]: xAxis !== 'center', ['is-from-' + yAxis]: yAxis !== 'middle' }); } if (type === 'slide-in') { return classnames_default()('components-animate__slide-in', 'is-from-' + origin); } } // @ts-ignore Reason: Planned for deprecation function Animate(_ref) { let { type, options = {}, children } = _ref; return children({ className: getAnimateClassName({ type, ...options }) }); } ;// CONCATENATED MODULE: ./packages/components/build-module/popover/index.js // @ts-nocheck /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Name of slot in which popover should fill. * * @type {string} */ const SLOT_NAME = 'Popover'; // An SVG displaying a triangle facing down, filled with a solid // color and bordered in such a way to create an arrow-like effect. // Keeping the SVG's viewbox squared simplify the arrow positioning // calculations. const ArrowTriangle = props => (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.SVG, extends_extends({}, props, { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 100 100`, className: "components-popover__triangle", role: "presentation" }), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { className: "components-popover__triangle-bg", d: "M 0 0 L 50 50 L 100 0" }), (0,external_wp_element_namespaceObject.createElement)(external_wp_primitives_namespaceObject.Path, { className: "components-popover__triangle-border", d: "M 0 0 L 50 50 L 100 0", vectorEffect: "non-scaling-stroke" })); const slotNameContext = (0,external_wp_element_namespaceObject.createContext)(); const positionToPlacement = position => { const [x, y, z] = position.split(' '); if (['top', 'bottom'].includes(x)) { let suffix = ''; if (!!z && z === 'left' || y === 'right') { suffix = '-start'; } else if (!!z && z === 'right' || y === 'left') { suffix = '-end'; } return x + suffix; } return y; }; const placementToAnimationOrigin = placement => { const [a, b] = placement.split('-'); let x, y; if (a === 'top' || a === 'bottom') { x = a === 'top' ? 'bottom' : 'top'; y = 'middle'; if (b === 'start') { y = 'left'; } else if (b === 'end') { y = 'right'; } } if (a === 'left' || a === 'right') { x = 'center'; y = a === 'left' ? 'right' : 'left'; if (b === 'start') { x = 'top'; } else if (b === 'end') { x = 'bottom'; } } return x + ' ' + y; }; const Popover = (_ref, forwardedRef) => { let { range, animate = true, headerTitle, onClose, children, className, noArrow = true, isAlternate, position, placement: placementProp = 'bottom-start', offset, focusOnMount = 'firstElement', anchorRef, anchorRect, getAnchorRect, expandOnMobile, onFocusOutside, __unstableSlotName = SLOT_NAME, __unstableObserveElement, __unstableForcePosition = false, __unstableShift = false, ...contentProps } = _ref; if (range) { external_wp_deprecated_default()('range prop in Popover component', { since: '6.1', version: '6.3' }); } const arrowRef = (0,external_wp_element_namespaceObject.useRef)(null); const anchorRefFallback = (0,external_wp_element_namespaceObject.useRef)(null); const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<'); const isExpanded = expandOnMobile && isMobileViewport; const hasArrow = !isExpanded && !noArrow; const normalizedPlacementFromProps = position ? positionToPlacement(position) : placementProp; const ownerDocument = (0,external_wp_element_namespaceObject.useMemo)(() => { var _documentToReturn; let documentToReturn; if (anchorRef !== null && anchorRef !== void 0 && anchorRef.top) { documentToReturn = anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.top.ownerDocument; } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.startContainer) { documentToReturn = anchorRef.startContainer.ownerDocument; } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.current) { documentToReturn = anchorRef.current.ownerDocument; } else if (anchorRef) { // This one should be deprecated. documentToReturn = anchorRef.ownerDocument; } else if (anchorRect && anchorRect !== null && anchorRect !== void 0 && anchorRect.ownerDocument) { documentToReturn = anchorRect.ownerDocument; } else if (getAnchorRect) { var _getAnchorRect; documentToReturn = (_getAnchorRect = getAnchorRect(anchorRefFallback.current)) === null || _getAnchorRect === void 0 ? void 0 : _getAnchorRect.ownerDocument; } return (_documentToReturn = documentToReturn) !== null && _documentToReturn !== void 0 ? _documentToReturn : document; }, [anchorRef, anchorRect, getAnchorRect]); /** * Offsets the position of the popover when the anchor is inside an iframe. */ const frameOffset = (0,external_wp_element_namespaceObject.useMemo)(() => { const { defaultView } = ownerDocument; const { frameElement } = defaultView; if (!frameElement || ownerDocument === document) { return undefined; } const iframeRect = frameElement.getBoundingClientRect(); return { x: iframeRect.left, y: iframeRect.top }; }, [ownerDocument]); const middleware = [frameOffset || offset ? T(_ref2 => { let { placement: currentPlacement } = _ref2; if (!frameOffset) { return offset; } const isTopBottomPlacement = currentPlacement.includes('top') || currentPlacement.includes('bottom'); // The main axis should represent the gap between the // floating element and the reference element. The cross // axis is always perpendicular to the main axis. const mainAxis = isTopBottomPlacement ? 'y' : 'x'; const crossAxis = mainAxis === 'x' ? 'y' : 'x'; // When the popover is before the reference, subtract the offset, // of the main axis else add it. const hasBeforePlacement = currentPlacement.includes('top') || currentPlacement.includes('left'); const mainAxisModifier = hasBeforePlacement ? -1 : 1; const normalizedOffset = offset ? offset : 0; return { mainAxis: normalizedOffset + frameOffset[mainAxis] * mainAxisModifier, crossAxis: frameOffset[crossAxis] }; }) : undefined, __unstableForcePosition ? undefined : b(), __unstableForcePosition ? undefined : k({ apply(sizeProps) { const { height } = sizeProps; if (!refs.floating.current) return; // Reduce the height of the popover to the available space. Object.assign(refs.floating.current.firstChild.style, { maxHeight: `${height}px`, overflow: 'auto' }); } }), __unstableShift ? D({ crossAxis: true, limiter: L(), padding: 1 // Necessary to avoid flickering at the edge of the viewport. }) : undefined, hasArrow ? arrow({ element: arrowRef }) : undefined].filter(m => !!m); const slotName = (0,external_wp_element_namespaceObject.useContext)(slotNameContext) || __unstableSlotName; const slot = use_slot_useSlot(slotName); let onDialogClose; if (onClose || onFocusOutside) { onDialogClose = (type, event) => { // Ideally the popover should have just a single onClose prop and // not three props that potentially do the same thing. if (type === 'focus-outside' && onFocusOutside) { onFocusOutside(event); } else if (onClose) { onClose(); } }; } const [dialogRef, dialogProps] = (0,external_wp_compose_namespaceObject.__experimentalUseDialog)({ focusOnMount, __unstableOnClose: onDialogClose, onClose: onDialogClose }); const { // Positioning coordinates x, y, // Callback refs (not regular refs). This allows the position to be updated. // when either elements change. reference, floating, // Object with "regular" refs to both "reference" and "floating" refs, // Type of CSS position property to use (absolute or fixed) strategy, update, placement: computedPlacement, middlewareData: { arrow: arrowData = {} } } = useFloating({ placement: normalizedPlacementFromProps, middleware }); // Update the `reference`'s ref. // // In floating-ui's terms: // - "reference" refers to the popover's anchor element. // - "floating" refers the floating popover's element. // A floating element can also be positioned relative to a virtual element, // instead of a real one. A virtual element is represented by an object // with the `getBoundingClientRect()` function (like real elements). // See https://floating-ui.com/docs/virtual-elements for more info. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { let resultingReferenceRef; if (anchorRef !== null && anchorRef !== void 0 && anchorRef.top) { // Create a virtual element for the ref. The expectation is that // if anchorRef.top is defined, then anchorRef.bottom is defined too. resultingReferenceRef = { getBoundingClientRect() { const topRect = anchorRef.top.getBoundingClientRect(); const bottomRect = anchorRef.bottom.getBoundingClientRect(); return new window.DOMRect(topRect.x, topRect.y, topRect.width, bottomRect.bottom - topRect.top); } }; } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.current) { // Standard React ref. resultingReferenceRef = anchorRef.current; } else if (anchorRef) { // If `anchorRef` holds directly the element's value (no `current` key) // This is a weird scenario and should be deprecated. resultingReferenceRef = anchorRef; } else if (anchorRect) { // Create a virtual element for the ref. resultingReferenceRef = { getBoundingClientRect() { return anchorRect; } }; } else if (getAnchorRect) { // Create a virtual element for the ref. resultingReferenceRef = { getBoundingClientRect() { var _rect$x, _rect$y, _rect$width, _rect$height; const rect = getAnchorRect(anchorRefFallback.current); return new window.DOMRect((_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left, (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top, (_rect$width = rect.width) !== null && _rect$width !== void 0 ? _rect$width : rect.right - rect.left, (_rect$height = rect.height) !== null && _rect$height !== void 0 ? _rect$height : rect.bottom - rect.top); } }; } else if (anchorRefFallback.current) { // If no explicit ref is passed via props, fall back to // anchoring to the popover's parent node. resultingReferenceRef = anchorRefFallback.current.parentNode; } if (!resultingReferenceRef) { return; } reference(resultingReferenceRef); if (!refs.floating.current) { return; } return floating_ui_dom_esm_min_D(resultingReferenceRef, refs.floating.current, update); }, [anchorRef, anchorRect, getAnchorRect]); // This is only needed for a smooth transition when moving blocks. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (!__unstableObserveElement) { return; } const observer = new window.MutationObserver(update); observer.observe(__unstableObserveElement, { attributes: true }); return () => { observer.disconnect(); }; }, [__unstableObserveElement]); // If the reference element is in a different ownerDocument (e.g. iFrame), // we need to manually update the floating's position as the reference's owner // document scrolls. (0,external_wp_element_namespaceObject.useLayoutEffect)(() => { if (ownerDocument === document) { return; } ownerDocument.addEventListener('scroll', update); return () => ownerDocument.removeEventListener('scroll', update); }, [ownerDocument]); /** @type {false | string} */ const animateClassName = !!animate && getAnimateClassName({ type: 'appear', origin: placementToAnimationOrigin(computedPlacement) }); const mergedFloatingRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([floating, dialogRef, forwardedRef]); // Disable reason: We care to capture the _bubbled_ events from inputs // within popover as inferring close intent. let content = // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions // eslint-disable-next-line jsx-a11y/no-static-element-interactions (0,external_wp_element_namespaceObject.createElement)("div", extends_extends({ className: classnames_default()('components-popover', className, animateClassName, { 'is-expanded': isExpanded, 'is-alternate': isAlternate }) }, contentProps, { ref: mergedFloatingRef }, dialogProps, { tabIndex: "-1", style: isExpanded ? undefined : { position: strategy, left: Number.isNaN(x) ? 0 : x, top: Number.isNaN(y) ? 0 : y } }), isExpanded && (0,external_wp_element_namespaceObject.createElement)(scroll_lock, null), isExpanded && (0,external_wp_element_namespaceObject.createElement)("div", { className: "components-popover__header" }, (0,external_wp_element_namespaceObject.createElement)("span", { className: "components-popover__header-title" }, headerTitle), (0,external_wp_element_namespaceObject.createElement)(build_module_button, { className: "components-popover__close", icon: library_close, onClick: onClose })), (0,external_wp_element_namespaceObject.createElement)("div", { className: "components-popover__content" }, children), hasArrow && (0,external_wp_element_namespaceObject.createElement)("div", { ref: arrowRef, className: ['components-popover__arrow', `is-${computedPlacement.split('-')[0]}`].join(' '), style: { left: Number.isFinite(arrowData === null || arrowData === void 0 ? void 0 : arrowData.x) ? `${arrowData.x}px` : '', top: Number.isFinite(arrowData === null || arrowData === void 0 ? void 0 : arrowData.y) ? `${arrowData.y}px` : '' } }, (0,external_wp_element_namespaceObject.createElement)(ArrowTriangle, null))); if (slot.ref) { content = (0,external_wp_element_namespaceObject.createElement)(slot_fill_Fill, { name: slotName }, content); } if (anchorRef || anchorRect) { return content; } return (0,external_wp_element_namespaceObject.createElement)("span", { ref: anchorRefFallback }, content); }; const PopoverContainer = (0,external_wp_element_namespaceObject.forwardRef)(Popover); function PopoverSlot(_ref3, ref) { let { name = SLOT_NAME } = _ref3; return (0,external_wp_element_namespaceObject.createElement)(slot_fill_Slot, { bubblesVirtually: true, name: name, className: "popover-slot", ref: ref }); } PopoverContainer.Slot = (0,external_wp_element_namespaceObject.forwardRef)(PopoverSlot); PopoverContainer.__unstableSlotNameProvider = slotNameContext.Provider; /* harmony default export */ const popover = (PopoverContainer); ;// CONCATENATED MODULE: ./packages/components/build-module/shortcut/index.js /** * Internal dependencies */ function Shortcut(props) { const { shortcut, className } = props; if (!shortcut) { return null; } let displayText; let ariaLabel; if (typeof shortcut === 'string') { displayText = shortcut; } if (shortcut !== null && typeof shortcut === 'object') { displayText = shortcut.display; ariaLabel = shortcut.ariaLabel; } return (0,external_wp_element_namespaceObject.createElement)("span", { className: className, "aria-label": ariaLabel }, displayText); } /* harmony default export */ const build_module_shortcut = (Shortcut); ;// CONCATENATED MODULE: ./packages/components/build-module/tooltip/index.js // @ts-nocheck /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ /** * Time over children to wait before showing tooltip * * @type {number} */ const TOOLTIP_DELAY = 700; const eventCatcher = (0,external_wp_element_namespaceObject.createElement)("div", { className: "event-catcher" }); const getDisabledElement = _ref => { let { eventHandlers, child, childrenWithPopover, mergedRefs } = _ref; return (0,external_wp_element_namespaceObject.cloneElement)((0,external_wp_element_namespaceObject.createElement)("span", { className: "disabled-element-wrapper" }, (0,external_wp_element_namespaceObject.cloneElement)(eventCatcher, eventHandlers), (0,external_wp_element_namespaceObject.cloneElement)(child, { children: childrenWithPopover, ref: mergedRefs })), { ...eventHandlers }); }; const getRegularElement = _ref2 => { let { child, eventHandlers, childrenWithPopover, mergedRefs } = _ref2; return (0,external_wp_element_namespaceObject.cloneElement)(child, { ...eventHandlers, children: childrenWithPopover, ref: mergedRefs }); }; const addPopoverToGrandchildren = _ref3 => { let { anchorRef, grandchildren, isOver, offset, position, shortcut, text } = _ref3; return (0,external_wp_element_namespaceObject.concatChildren)(grandchildren, isOver && (0,external_wp_element_namespaceObject.createElement)(popover, { focusOnMount: false, position: position, className: "components-tooltip", "aria-hidden": "true", animate: false, offset: offset, anchorRef: anchorRef, __unstableShift: true }, text, (0,external_wp_element_namespaceObject.createElement)(build_module_shortcut, { className: "components-tooltip__shortcut", shortcut: shortcut }))); }; const emitToChild = (children, eventName, event) => { if (external_wp_element_namespaceObject.Children.count(children) !== 1) { return; } const child = external_wp_element_namespaceObject.Children.only(children); // If the underlying element is disabled, do not emit the event. if (child.props.disabled) { return; } if (typeof child.props[eventName] === 'function') { child.props[eventName](event); } }; function Tooltip(props) { var _Children$toArray$; const { children, position = 'bottom middle', text, shortcut, delay = TOOLTIP_DELAY } = props; /** * Whether a mouse is currently pressed, used in determining whether * to handle a focus event as displaying the tooltip immediately. * * @type {boolean} */ const [isMouseDown, setIsMouseDown] = (0,external_wp_element_namespaceObject.useState)(false); const [isOver, setIsOver] = (0,external_wp_element_namespaceObject.useState)(false); const delayedSetIsOver = (0,external_wp_compose_namespaceObject.useDebounce)(setIsOver, delay); // Create a reference to the Tooltip's child, to be passed to the Popover // so that the Tooltip can be correctly positioned. Also, merge with the // existing ref for the first child, so that its ref is preserved. const childRef = (0,external_wp_element_namespaceObject.useRef)(null); const existingChildRef = (_Children$toArray$ = external_wp_element_namespaceObject.Children.toArray(children)[0]) === null || _Children$toArray$ === void 0 ? void 0 : _Children$toArray$.ref; const mergedChildRefs = (0,external_wp_compose_namespaceObject.useMergeRefs)([childRef, existingChildRef]); const createMouseDown = event => { // In firefox, the mouse down event is also fired when the select // list is chosen. // Cancel further processing because re-rendering of child components // causes onChange to be triggered with the old value. // See https://github.com/WordPress/gutenberg/pull/42483 if (event.target.tagName === 'OPTION') { return; } // Preserve original child callback behavior. emitToChild(children, 'onMouseDown', event); // On mouse down, the next `mouseup` should revert the value of the // instance property and remove its own event handler. The bind is // made on the document since the `mouseup` might not occur within // the bounds of the element. document.addEventListener('mouseup', cancelIsMouseDown); setIsMouseDown(true); }; const createMouseUp = event => { // In firefox, the mouse up event is also fired when the select // list is chosen. // Cancel further processing because re-rendering of child components // causes onChange to be triggered with the old value. // See https://github.com/WordPress/gutenberg/pull/42483 if (event.target.tagName === 'OPTION') { return; } emitToChild(children, 'onMouseUp', event); document.removeEventListener('mouseup', cancelIsMouseDown); setIsMouseDown(false); }; const createMouseEvent = type => { if (type === 'mouseUp') return createMouseUp; if (type === 'mouseDown') return createMouseDown; }; /** * Prebound `isInMouseDown` handler, created as a constant reference to * assure ability to remove in component unmount. * * @type {Function} */ const cancelIsMouseDown = createMouseEvent('mouseUp'); const createToggleIsOver = (eventName, isDelayed) => { return event => { // Preserve original child callback behavior. emitToChild(children, eventName, event); // Mouse events behave unreliably in React for disabled elements, // firing on mouseenter but not mouseleave. Further, the default // behavior for disabled elements in some browsers is to ignore // mouse events. Don't bother trying to handle them. // // See: https://github.com/facebook/react/issues/4251 if (event.currentTarget.disabled) { return; } // A focus event will occur as a result of a mouse click, but it // should be disambiguated between interacting with the button and // using an explicit focus shift as a cue to display the tooltip. if ('focus' === event.type && isMouseDown) { return; } // Needed in case unsetting is over while delayed set pending, i.e. // quickly blur/mouseleave before delayedSetIsOver is called. delayedSetIsOver.cancel(); const _isOver = (0,external_lodash_namespaceObject.includes)(['focus', 'mouseenter'], event.type); if (_isOver === isOver) { return; } if (isDelayed) { delayedSetIsOver(_isOver); } else { setIsOver(_isOver); } }; }; const clearOnUnmount = () => { delayedSetIsOver.cancel(); document.removeEventListener('mouseup', cancelIsMouseDown); }; (0,external_wp_element_namespaceObject.useEffect)(() => clearOnUnmount, []); if (external_wp_element_namespaceObject.Children.count(children) !== 1) { if (false) {} return children; } const eventHandlers = { onMouseEnter: createToggleIsOver('onMouseEnter', true), onMouseLeave: createToggleIsOver('onMouseLeave'), onClick: createToggleIsOver('onClick'), onFocus: createToggleIsOver('onFocus'), onBlur: createToggleIsOver('onBlur'), onMouseDown: createMouseEvent('mouseDown') }; const child = external_wp_element_namespaceObject.Children.only(children); const { children: grandchildren, disabled } = child.props; const getElementWithPopover = disabled ? getDisabledElement : getRegularElement; const popoverData = { anchorRef: childRef, isOver, offset: 4, position, shortcut, text }; const childrenWithPopover = addPopoverToGrandchildren({ grandchildren, ...popoverData }); return getElementWithPopover({ child, eventHandlers, childrenWithPopover, mergedRefs: mergedChildRefs }); } /* harmony default export */ const tooltip = (Tooltip); ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/utils.js /** * WordPress dependencies */ const GRID = [['top left', 'top center', 'top right'], ['center left', 'center center', 'center right'], ['bottom left', 'bottom center', 'bottom right']]; // Stored as map as i18n __() only accepts strings (not variables) const ALIGNMENT_LABEL = { 'top left': (0,external_wp_i18n_namespaceObject.__)('Top Left'), 'top center': (0,external_wp_i18n_namespaceObject.__)('Top Center'), 'top right': (0,external_wp_i18n_namespaceObject.__)('Top Right'), 'center left': (0,external_wp_i18n_namespaceObject.__)('Center Left'), 'center center': (0,external_wp_i18n_namespaceObject.__)('Center Center'), 'center right': (0,external_wp_i18n_namespaceObject.__)('Center Right'), 'bottom left': (0,external_wp_i18n_namespaceObject.__)('Bottom Left'), 'bottom center': (0,external_wp_i18n_namespaceObject.__)('Bottom Center'), 'bottom right': (0,external_wp_i18n_namespaceObject.__)('Bottom Right') }; // Transforms GRID into a flat Array of values. const ALIGNMENTS = GRID.flat(); /** * Parses and transforms an incoming value to better match the alignment values * * @param {string} value An alignment value to parse. * * @return {string} The parsed value. */ function transformValue(value) { const nextValue = value === 'center' ? 'center center' : value; return nextValue.replace('-', ' '); } /** * Creates an item ID based on a prefix ID and an alignment value. * * @param {string} prefixId An ID to prefix. * @param {string} value An alignment value. * * @return {string} The item id. */ function getItemId(prefixId, value) { const valueId = transformValue(value).replace(' ', '-'); return `${prefixId}-${valueId}`; } /** * Retrieves the alignment index from a value. * * @param {string} alignment Value to check. * * @return {number} The index of a matching alignment. */ function getAlignmentIndex() { let alignment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'center'; const item = transformValue(alignment).replace('-', ' '); const index = ALIGNMENTS.indexOf(item); return index > -1 ? index : undefined; } // EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js var hoist_non_react_statics_cjs = __webpack_require__(1281); ;// CONCATENATED MODULE: ./node_modules/@emotion/react/dist/emotion-react.browser.esm.js var pkg = { name: "@emotion/react", version: "11.7.1", main: "dist/emotion-react.cjs.js", module: "dist/emotion-react.esm.js", browser: { "./dist/emotion-react.cjs.js": "./dist/emotion-react.browser.cjs.js", "./dist/emotion-react.esm.js": "./dist/emotion-react.browser.esm.js" }, types: "types/index.d.ts", files: [ "src", "dist", "jsx-runtime", "jsx-dev-runtime", "_isolated-hnrs", "types/*.d.ts", "macro.js", "macro.d.ts", "macro.js.flow" ], sideEffects: false, author: "mitchellhamilton ", license: "MIT", scripts: { "test:typescript": "dtslint types" }, dependencies: { "@babel/runtime": "^7.13.10", "@emotion/cache": "^11.7.1", "@emotion/serialize": "^1.0.2", "@emotion/sheet": "^1.1.0", "@emotion/utils": "^1.0.0", "@emotion/weak-memoize": "^0.2.5", "hoist-non-react-statics": "^3.3.1" }, peerDependencies: { "@babel/core": "^7.0.0", react: ">=16.8.0" }, peerDependenciesMeta: { "@babel/core": { optional: true }, "@types/react": { optional: true } }, devDependencies: { "@babel/core": "^7.13.10", "@emotion/css": "11.7.1", "@emotion/css-prettifier": "1.0.1", "@emotion/server": "11.4.0", "@emotion/styled": "11.6.0", "@types/react": "^16.9.11", dtslint: "^0.3.0", "html-tag-names": "^1.1.2", react: "16.14.0", "svg-tag-names": "^1.1.1" }, repository: "https://github.com/emotion-js/emotion/tree/main/packages/react", publishConfig: { access: "public" }, "umd:main": "dist/emotion-react.umd.min.js", preconstruct: { entrypoints: [ "./index.js", "./jsx-runtime.js", "./jsx-dev-runtime.js", "./_isolated-hnrs.js" ], umdName: "emotionReact" } }; var jsx = function jsx(type, props) { var args = arguments; if (props == null || !hasOwnProperty.call(props, 'css')) { // $FlowFixMe return createElement.apply(undefined, args); } var argsLength = args.length; var createElementArgArray = new Array(argsLength); createElementArgArray[0] = Emotion; createElementArgArray[1] = createEmotionProps(type, props); for (var i = 2; i < argsLength; i++) { createElementArgArray[i] = args[i]; } // $FlowFixMe return createElement.apply(null, createElementArgArray); }; var warnedAboutCssPropForGlobal = false; // maintain place over rerenders. // initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild // initial client-side render from SSR, use place of hydrating tag var Global = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) { if (false) {} var styles = props.styles; var serialized = serializeStyles([styles], undefined, useContext(ThemeContext)); // but it is based on a constant that will never change at runtime // it's effectively like having two implementations and switching them out // so it's not actually breaking anything var sheetRef = useRef(); useLayoutEffect(function () { var key = cache.key + "-global"; var sheet = new StyleSheet({ key: key, nonce: cache.sheet.nonce, container: cache.sheet.container, speedy: cache.sheet.isSpeedy }); var rehydrating = false; // $FlowFixMe var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]"); if (cache.sheet.tags.length) { sheet.before = cache.sheet.tags[0]; } if (node !== null) { rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s node.setAttribute('data-emotion', key); sheet.hydrate([node]); } sheetRef.current = [sheet, rehydrating]; return function () { sheet.flush(); }; }, [cache]); useLayoutEffect(function () { var sheetRefCurrent = sheetRef.current; var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1]; if (rehydrating) { sheetRefCurrent[1] = false; return; } if (serialized.next !== undefined) { // insert keyframes insertStyles(cache, serialized.next, true); } if (sheet.tags.length) { // if this doesn't exist then it will be null so the style element will be appended var element = sheet.tags[sheet.tags.length - 1].nextElementSibling; sheet.before = element; sheet.flush(); } cache.insert("", serialized, sheet, false); }, [cache, serialized.name]); return null; }))); if (false) {} function emotion_react_browser_esm_css() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return emotion_serialize_browser_esm_serializeStyles(args); } var emotion_react_browser_esm_keyframes = function keyframes() { var insertable = emotion_react_browser_esm_css.apply(void 0, arguments); var name = "animation-" + insertable.name; // $FlowFixMe return { name: name, styles: "@keyframes " + name + "{" + insertable.styles + "}", anim: 1, toString: function toString() { return "_EMO_" + this.name + "_" + this.styles + "_EMO_"; } }; }; var emotion_react_browser_esm_classnames = function classnames(args) { var len = args.length; var i = 0; var cls = ''; for (; i < len; i++) { var arg = args[i]; if (arg == null) continue; var toAdd = void 0; switch (typeof arg) { case 'boolean': break; case 'object': { if (Array.isArray(arg)) { toAdd = classnames(arg); } else { if (false) {} toAdd = ''; for (var k in arg) { if (arg[k] && k) { toAdd && (toAdd += ' '); toAdd += k; } } } break; } default: { toAdd = arg; } } if (toAdd) { cls && (cls += ' '); cls += toAdd; } } return cls; }; function emotion_react_browser_esm_merge(registered, css, className) { var registeredStyles = []; var rawClassName = getRegisteredStyles(registered, registeredStyles, className); if (registeredStyles.length < 2) { return className; } return rawClassName + css(registeredStyles); } var emotion_react_browser_esm_Noop = function Noop() { return null; }; var ClassNames = /* #__PURE__ */(/* unused pure expression or super */ null && (withEmotionCache(function (props, cache) { var hasRendered = false; var css = function css() { if (hasRendered && "production" !== 'production') {} for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var serialized = serializeStyles(args, cache.registered); { insertStyles(cache, serialized, false); } return cache.key + "-" + serialized.name; }; var cx = function cx() { if (hasRendered && "production" !== 'production') {} for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return emotion_react_browser_esm_merge(cache.registered, css, emotion_react_browser_esm_classnames(args)); }; var content = { css: css, cx: cx, theme: useContext(ThemeContext) }; var ele = props.children(content); hasRendered = true; var possiblyStyleElement = /*#__PURE__*/createElement(emotion_react_browser_esm_Noop, null); return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele); }))); if (false) {} if (false) { var globalKey, globalContext, isJest, emotion_react_browser_esm_isBrowser; } ;// CONCATENATED MODULE: ./packages/components/node_modules/colord/index.mjs var colord_r={grad:.9,turn:360,rad:360/(2*Math.PI)},colord_t=function(r){return"string"==typeof r?r.length>0:"number"==typeof r},colord_n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},colord_e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},colord_u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},colord_a=function(r){return{r:colord_e(r.r,0,255),g:colord_e(r.g,0,255),b:colord_e(r.b,0,255),a:colord_e(r.a)}},colord_o=function(r){return{r:colord_n(r.r),g:colord_n(r.g),b:colord_n(r.b),a:colord_n(r.a,3)}},colord_i=/^#([0-9a-f]{3,8})$/i,colord_s=function(r){var t=r.toString(16);return t.length<2?"0"+t:t},colord_h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},colord_b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},colord_g=function(r){return{h:colord_u(r.h),s:colord_e(r.s,0,100),l:colord_e(r.l,0,100),a:colord_e(r.a)}},colord_d=function(r){return{h:colord_n(r.h),s:colord_n(r.s),l:colord_n(r.l),a:colord_n(r.a,3)}},colord_f=function(r){return colord_b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},colord_c=function(r){return{h:(t=colord_h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},colord_l=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_p=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_v=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_m=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,colord_y={string:[[function(r){var t=colord_i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?colord_n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?colord_n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var t=colord_v.exec(r)||colord_m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:colord_a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(t){var n=colord_l.exec(t)||colord_p.exec(t);if(!n)return null;var e,u,a=colord_g({h:(e=n[1],u=n[2],void 0===u&&(u="deg"),Number(e)*(colord_r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return colord_f(a)},"hsl"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return colord_t(n)&&colord_t(e)&&colord_t(u)?colord_a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},"rgb"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!colord_t(n)||!colord_t(e)||!colord_t(u))return null;var i=colord_g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return colord_f(i)},"hsl"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!colord_t(n)||!colord_t(a)||!colord_t(o))return null;var h=function(r){return{h:colord_u(r.h),s:colord_e(r.s,0,100),v:colord_e(r.v,0,100),a:colord_e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return colord_b(h)},"hsv"]]},colord_N=function(r,t){for(var n=0;n=.5},r.prototype.toHex=function(){return r=colord_o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?colord_s(colord_n(255*a)):"","#"+colord_s(t)+colord_s(e)+colord_s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return colord_o(this.rgba)},r.prototype.toRgbString=function(){return r=colord_o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?"rgba("+t+", "+n+", "+e+", "+u+")":"rgb("+t+", "+n+", "+e+")";var r,t,n,e,u},r.prototype.toHsl=function(){return colord_d(colord_c(this.rgba))},r.prototype.toHslString=function(){return r=colord_d(colord_c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?"hsla("+t+", "+n+"%, "+e+"%, "+u+")":"hsl("+t+", "+n+"%, "+e+"%)";var r,t,n,e,u},r.prototype.toHsv=function(){return r=colord_h(this.rgba),{h:colord_n(r.h),s:colord_n(r.s),v:colord_n(r.v),a:colord_n(r.a,3)};var r},r.prototype.invert=function(){return colord_w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),colord_w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),colord_w(M(this.rgba,-r))},r.prototype.grayscale=function(){return colord_w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),colord_w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),colord_w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return"number"==typeof r?colord_w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):colord_n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=colord_c(this.rgba);return"number"==typeof r?colord_w({h:r,s:t.s,l:t.l,a:t.a}):colord_n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===colord_w(r).toHex()},r}(),colord_w=function(r){return r instanceof j?r:new j(r)},colord_S=[],colord_k=function(r){r.forEach(function(r){colord_S.indexOf(r)<0&&(r(j,colord_y),colord_S.push(r))})},colord_E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})}; ;// CONCATENATED MODULE: ./packages/components/node_modules/colord/plugins/names.mjs /* harmony default export */ function names(e,f){var a={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b="black";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u 0 && arguments[0] !== undefined ? arguments[0] : ''; let alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; return colord_w(hexValue).alpha(alpha).toRgbString(); } ;// CONCATENATED MODULE: ./packages/components/build-module/utils/colors-values.js /** * External dependencies */ /** * Internal dependencies */ const BASE = { black: '#000', white: '#fff' }; const G2 = { blue: { medium: { focus: '#007cba', focusDark: '#fff' } }, gray: { 900: '#1e1e1e', 700: '#757575', // Meets 4.6:1 text contrast against white. 600: '#949494', // Meets 3:1 UI or large text contrast against white. 400: '#ccc', 300: '#ddd', // Used for most borders. 200: '#e0e0e0', // Used sparingly for light borders. 100: '#f0f0f0' // Used for light gray backgrounds. }, mediumGray: { text: '#757575' }, lightGray: { ui: '#949494', secondary: '#ccc', tertiary: '#e7e8e9' } }; const DARK_GRAY = { 900: '#191e23', 800: '#23282d', 700: '#32373c', 600: '#40464d', 500: '#555d66', // Use this most of the time for dark items. 400: '#606a73', 300: '#6c7781', // Lightest gray that can be used for AA text contrast. 200: '#7e8993', 150: '#8d96a0', // Lightest gray that can be used for AA non-text contrast. 100: '#8f98a1', placeholder: rgba(G2.gray[900], 0.62) }; const DARK_OPACITY = { 900: rgba('#000510', 0.9), 800: rgba('#00000a', 0.85), 700: rgba('#06060b', 0.8), 600: rgba('#000913', 0.75), 500: rgba('#0a1829', 0.7), 400: rgba('#0a1829', 0.65), 300: rgba('#0e1c2e', 0.62), 200: rgba('#162435', 0.55), 100: rgba('#223443', 0.5), backgroundFill: rgba(DARK_GRAY[700], 0.7) }; const DARK_OPACITY_LIGHT = { 900: rgba('#304455', 0.45), 800: rgba('#425863', 0.4), 700: rgba('#667886', 0.35), 600: rgba('#7b86a2', 0.3), 500: rgba('#9197a2', 0.25), 400: rgba('#95959c', 0.2), 300: rgba('#829493', 0.15), 200: rgba('#8b8b96', 0.1), 100: rgba('#747474', 0.05) }; const LIGHT_GRAY = { 900: '#a2aab2', 800: '#b5bcc2', 700: '#ccd0d4', 600: '#d7dade', 500: '#e2e4e7', // Good for "grayed" items and borders. 400: '#e8eaeb', // Good for "readonly" input fields and special text selection. 300: '#edeff0', 200: '#f3f4f5', 100: '#f8f9f9', placeholder: rgba(BASE.white, 0.65) }; const LIGHT_OPACITY_LIGHT = { 900: rgba(BASE.white, 0.5), 800: rgba(BASE.white, 0.45), 700: rgba(BASE.white, 0.4), 600: rgba(BASE.white, 0.35), 500: rgba(BASE.white, 0.3), 400: rgba(BASE.white, 0.25), 300: rgba(BASE.white, 0.2), 200: rgba(BASE.white, 0.15), 100: rgba(BASE.white, 0.1), backgroundFill: rgba(LIGHT_GRAY[300], 0.8) }; // Additional colors. // Some are from https://make.wordpress.org/design/handbook/foundations/colors/. const BLUE = { wordpress: { 700: '#00669b' }, dark: { 900: '#0071a1' }, medium: { 900: '#006589', 800: '#00739c', 700: '#007fac', 600: '#008dbe', 500: '#00a0d2', 400: '#33b3db', 300: '#66c6e4', 200: '#bfe7f3', 100: '#e5f5fa', highlight: '#b3e7fe', focus: '#007cba' } }; const ALERT = { yellow: '#f0b849', red: '#d94f4f', green: '#4ab866' }; const ADMIN = { theme: `var( --wp-admin-theme-color, ${BLUE.wordpress[700]})`, themeDark10: `var( --wp-admin-theme-color-darker-10, ${BLUE.medium.focus})` }; // Namespaced values for raw colors hex codes. const UI = { theme: ADMIN.theme, background: BASE.white, backgroundDisabled: LIGHT_GRAY[200], border: G2.gray[700], borderHover: G2.gray[700], borderFocus: ADMIN.themeDark10, borderDisabled: G2.gray[400], borderLight: G2.gray[300], label: DARK_GRAY[500], textDisabled: DARK_GRAY[150], textDark: BASE.white, textLight: BASE.black }; // Using Object.assign instead of { ...spread } syntax helps TypeScript // to extract the correct type defs here. const COLORS = Object.assign({}, BASE, { darkGray: DARK_GRAY, darkOpacity: DARK_OPACITY, darkOpacityLight: DARK_OPACITY_LIGHT, mediumGray: G2.mediumGray, /** * The main gray color object (since Apr 16, 2022). * * We are in the process of simplifying the colors in this file, * please prefer this `gray` object in the meantime. */ gray: G2.gray, lightGray: (0,external_lodash_namespaceObject.merge)({}, LIGHT_GRAY, G2.lightGray), lightGrayLight: LIGHT_OPACITY_LIGHT, blue: (0,external_lodash_namespaceObject.merge)({}, BLUE, G2.blue), alert: ALERT, admin: ADMIN, ui: UI }); /* harmony default export */ const colors_values = ((/* unused pure expression or super */ null && (COLORS))); ;// CONCATENATED MODULE: ./packages/components/build-module/utils/reduce-motion.js /** * Allows users to opt-out of animations via OS-level preferences. * * @param {'transition' | 'animation' | string} [prop='transition'] CSS Property name * @return {string} Generated CSS code for the reduced style */ function reduceMotion() { let prop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transition'; let style; switch (prop) { case 'transition': style = 'transition-duration: 0ms;'; break; case 'animation': style = 'animation-duration: 1ms;'; break; default: style = ` animation-duration: 1ms; transition-duration: 0ms; `; } return ` @media ( prefers-reduced-motion: reduce ) { ${style}; } `; } ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /** * External dependencies */ /** * Internal dependencies */ var _ref = true ? { name: "lp9rn7", styles: "border-radius:2px;box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr );outline:none" } : 0; const rootBase = () => { return _ref; }; const rootSize = _ref2 => { let { size = 92 } = _ref2; return /*#__PURE__*/emotion_react_browser_esm_css("grid-template-rows:repeat( 3, calc( ", size, "px / 3 ) );width:", size, "px;" + ( true ? "" : 0), true ? "" : 0); }; const Root = emotion_styled_base_browser_esm("div", true ? { target: "e1od1u4s3" } : 0)(rootBase, ";border:1px solid transparent;cursor:pointer;grid-template-columns:auto;", rootSize, ";" + ( true ? "" : 0)); const Row = emotion_styled_base_browser_esm("div", true ? { target: "e1od1u4s2" } : 0)( true ? { name: "1x5gbbj", styles: "box-sizing:border-box;display:grid;grid-template-columns:repeat( 3, 1fr )" } : 0); const pointActive = _ref3 => { let { isActive } = _ref3; const boxShadow = isActive ? `0 0 0 2px ${COLORS.gray[900]}` : null; const pointColor = isActive ? COLORS.gray[900] : COLORS.lightGray[800]; const pointColorHover = isActive ? COLORS.gray[900] : COLORS.blue.medium.focus; return /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:", boxShadow, ";color:", pointColor, ";*:hover>&{color:", pointColorHover, ";}" + ( true ? "" : 0), true ? "" : 0); }; const pointBase = props => { return /*#__PURE__*/emotion_react_browser_esm_css("background:currentColor;box-sizing:border-box;display:grid;margin:auto;transition:all 120ms linear;", reduceMotion('transition'), " ", pointActive(props), ";" + ( true ? "" : 0), true ? "" : 0); }; const Point = emotion_styled_base_browser_esm("span", true ? { target: "e1od1u4s1" } : 0)("height:6px;width:6px;", pointBase, ";" + ( true ? "" : 0)); const Cell = emotion_styled_base_browser_esm("span", true ? { target: "e1od1u4s0" } : 0)( true ? { name: "rjf3ub", styles: "appearance:none;border:none;box-sizing:border-box;margin:0;display:flex;position:relative;outline:none;align-items:center;justify-content:center;padding:0" } : 0); ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/cell.js /** * Internal dependencies */ /** * Internal dependencies */ function cell_Cell(_ref) { let { isActive = false, value, ...props } = _ref; const tooltipText = ALIGNMENT_LABEL[value]; return (0,external_wp_element_namespaceObject.createElement)(tooltip, { text: tooltipText }, (0,external_wp_element_namespaceObject.createElement)(CompositeItem, extends_extends({ as: Cell, role: "gridcell" }, props), (0,external_wp_element_namespaceObject.createElement)(visually_hidden_component, null, value), (0,external_wp_element_namespaceObject.createElement)(Point, { isActive: isActive, role: "presentation" }))); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/useSealedState.js /** * React custom hook that returns the very first value passed to `initialState`, * even if it changes between re-renders. */ function useSealedState(initialState) { var _React$useState = (0,external_React_.useState)(initialState), sealed = _React$useState[0]; return sealed; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/reverse-30eaa122.js function groupItems(items) { var groups = [[]]; var _loop = function _loop() { var item = _step.value; var group = groups.find(function (g) { return !g[0] || g[0].groupId === item.groupId; }); if (group) { group.push(item); } else { groups.push([item]); } }; for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) { _loop(); } return groups; } function flatten(grid) { var flattened = []; for (var _iterator = _createForOfIteratorHelperLoose(grid), _step; !(_step = _iterator()).done;) { var row = _step.value; flattened.push.apply(flattened, row); } return flattened; } function reverse(array) { return array.slice().reverse(); } ;// CONCATENATED MODULE: ./node_modules/reakit/es/findEnabledItemById-8ddca752.js function findEnabledItemById(items, id) { if (!id) return undefined; return items === null || items === void 0 ? void 0 : items.find(function (item) { return item.id === id && !item.disabled; }); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/applyState.js function isUpdater(argument) { return typeof argument === "function"; } /** * Receives a `setState` argument and calls it with `currentValue` if it's a * function. Otherwise return the argument as the new value. * * @example * import { applyState } from "reakit-utils"; * * applyState((value) => value + 1, 1); // 2 * applyState(2, 1); // 2 */ function applyState(argument, currentValue) { if (isUpdater(argument)) { return argument(currentValue); } return argument; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Id/IdState.js function unstable_useIdState(initialState) { if (initialState === void 0) { initialState = {}; } var _useSealedState = useSealedState(initialState), initialBaseId = _useSealedState.baseId; var generateId = (0,external_React_.useContext)(unstable_IdContext); var idCountRef = (0,external_React_.useRef)(0); var _React$useState = (0,external_React_.useState)(function () { return initialBaseId || generateId(); }), baseId = _React$useState[0], setBaseId = _React$useState[1]; return { baseId: baseId, setBaseId: setBaseId, unstable_idCountRef: idCountRef }; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeState.js function isElementPreceding(element1, element2) { return Boolean(element2.compareDocumentPosition(element1) & Node.DOCUMENT_POSITION_PRECEDING); } function findDOMIndex(items, item) { return items.findIndex(function (currentItem) { if (!currentItem.ref.current || !item.ref.current) { return false; } return isElementPreceding(item.ref.current, currentItem.ref.current); }); } function getMaxLength(rows) { var maxLength = 0; for (var _iterator = _createForOfIteratorHelperLoose(rows), _step; !(_step = _iterator()).done;) { var length = _step.value.length; if (length > maxLength) { maxLength = length; } } return maxLength; } /** * Turns [row1, row1, row2, row2] into [row1, row2, row1, row2] */ function verticalizeItems(items) { var groups = groupItems(items); var maxLength = getMaxLength(groups); var verticalized = []; for (var i = 0; i < maxLength; i += 1) { for (var _iterator = _createForOfIteratorHelperLoose(groups), _step; !(_step = _iterator()).done;) { var group = _step.value; if (group[i]) { verticalized.push(_objectSpread2(_objectSpread2({}, group[i]), {}, { // If there's no groupId, it means that it's not a grid composite, // but a single row instead. So, instead of verticalizing it, that // is, assigning a different groupId based on the column index, we // keep it undefined so they will be part of the same group. // It's useful when using up/down on one-dimensional composites. groupId: group[i].groupId ? "" + i : undefined })); } } } return verticalized; } function createEmptyItem(groupId) { return { id: "__EMPTY_ITEM__", disabled: true, ref: { current: null }, groupId: groupId }; } /** * Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]] */ function fillGroups(groups, currentId, shift) { var maxLength = getMaxLength(groups); for (var _iterator = _createForOfIteratorHelperLoose(groups), _step; !(_step = _iterator()).done;) { var group = _step.value; for (var i = 0; i < maxLength; i += 1) { var item = group[i]; if (!item || shift && item.disabled) { var isFrist = i === 0; var previousItem = isFrist && shift ? findFirstEnabledItem(group) : group[i - 1]; group[i] = previousItem && currentId !== (previousItem === null || previousItem === void 0 ? void 0 : previousItem.id) && shift ? previousItem : createEmptyItem(previousItem === null || previousItem === void 0 ? void 0 : previousItem.groupId); } } } return groups; } var nullItem = { id: null, ref: { current: null } }; function placeItemsAfter(items, id, shouldInsertNullItem) { var index = items.findIndex(function (item) { return item.id === id; }); return [].concat(items.slice(index + 1), shouldInsertNullItem ? [nullItem] : [], items.slice(0, index)); } function getItemsInGroup(items, groupId) { return items.filter(function (item) { return item.groupId === groupId; }); } var map = { horizontal: "vertical", vertical: "horizontal" }; function getOppositeOrientation(orientation) { return orientation && map[orientation]; } function addItemAtIndex(array, item, index) { if (!(index in array)) { return [].concat(array, [item]); } return [].concat(array.slice(0, index), [item], array.slice(index)); } function sortBasedOnDOMPosition(items) { var pairs = items.map(function (item, index) { return [index, item]; }); var isOrderDifferent = false; pairs.sort(function (_ref, _ref2) { var indexA = _ref[0], a = _ref[1]; var indexB = _ref2[0], b = _ref2[1]; var elementA = a.ref.current; var elementB = b.ref.current; if (!elementA || !elementB) return 0; // a before b if (isElementPreceding(elementA, elementB)) { if (indexA > indexB) { isOrderDifferent = true; } return -1; } // a after b if (indexA < indexB) { isOrderDifferent = true; } return 1; }); if (isOrderDifferent) { return pairs.map(function (_ref3) { var _ = _ref3[0], item = _ref3[1]; return item; }); } return items; } function setItemsBasedOnDOMPosition(items, setItems) { var sortedItems = sortBasedOnDOMPosition(items); if (items !== sortedItems) { setItems(sortedItems); } } function getCommonParent(items) { var _firstItem$ref$curren; var firstItem = items[0], nextItems = items.slice(1); var parentElement = firstItem === null || firstItem === void 0 ? void 0 : (_firstItem$ref$curren = firstItem.ref.current) === null || _firstItem$ref$curren === void 0 ? void 0 : _firstItem$ref$curren.parentElement; var _loop = function _loop() { var parent = parentElement; if (nextItems.every(function (item) { return parent.contains(item.ref.current); })) { return { v: parentElement }; } parentElement = parentElement.parentElement; }; while (parentElement) { var _ret = _loop(); if (typeof _ret === "object") return _ret.v; } return getDocument(parentElement).body; } // istanbul ignore next: JSDOM doesn't support IntersectionObverser // See https://github.com/jsdom/jsdom/issues/2032 function useIntersectionObserver(items, setItems) { var previousItems = (0,external_React_.useRef)([]); (0,external_React_.useEffect)(function () { var callback = function callback() { var hasPreviousItems = !!previousItems.current.length; // We don't want to sort items if items have been just registered. if (hasPreviousItems) { setItemsBasedOnDOMPosition(items, setItems); } previousItems.current = items; }; var root = getCommonParent(items); var observer = new IntersectionObserver(callback, { root: root }); for (var _iterator = _createForOfIteratorHelperLoose(items), _step; !(_step = _iterator()).done;) { var item = _step.value; if (item.ref.current) { observer.observe(item.ref.current); } } return function () { observer.disconnect(); }; }, [items]); } function useTimeoutObserver(items, setItems) { (0,external_React_.useEffect)(function () { var callback = function callback() { return setItemsBasedOnDOMPosition(items, setItems); }; var timeout = setTimeout(callback, 250); return function () { return clearTimeout(timeout); }; }); } function useSortBasedOnDOMPosition(items, setItems) { if (typeof IntersectionObserver === "function") { useIntersectionObserver(items, setItems); } else { useTimeoutObserver(items, setItems); } } function reducer(state, action) { var virtual = state.unstable_virtual, rtl = state.rtl, orientation = state.orientation, items = state.items, groups = state.groups, currentId = state.currentId, loop = state.loop, wrap = state.wrap, pastIds = state.pastIds, shift = state.shift, moves = state.unstable_moves, includesBaseElement = state.unstable_includesBaseElement, initialVirtual = state.initialVirtual, initialRTL = state.initialRTL, initialOrientation = state.initialOrientation, initialCurrentId = state.initialCurrentId, initialLoop = state.initialLoop, initialWrap = state.initialWrap, initialShift = state.initialShift, hasSetCurrentId = state.hasSetCurrentId; switch (action.type) { case "registerGroup": { var _group = action.group; // If there are no groups yet, just add it as the first one if (groups.length === 0) { return _objectSpread2(_objectSpread2({}, state), {}, { groups: [_group] }); } // Finds the group index based on DOM position var index = findDOMIndex(groups, _group); return _objectSpread2(_objectSpread2({}, state), {}, { groups: addItemAtIndex(groups, _group, index) }); } case "unregisterGroup": { var _id = action.id; var nextGroups = groups.filter(function (group) { return group.id !== _id; }); // The group isn't registered, so do nothing if (nextGroups.length === groups.length) { return state; } return _objectSpread2(_objectSpread2({}, state), {}, { groups: nextGroups }); } case "registerItem": { var _item = action.item; // Finds the item group based on the DOM hierarchy var _group2 = groups.find(function (r) { var _r$ref$current; return (_r$ref$current = r.ref.current) === null || _r$ref$current === void 0 ? void 0 : _r$ref$current.contains(_item.ref.current); }); // Group will be null if it's a one-dimensional composite var nextItem = _objectSpread2({ groupId: _group2 === null || _group2 === void 0 ? void 0 : _group2.id }, _item); var _index = findDOMIndex(items, nextItem); var nextState = _objectSpread2(_objectSpread2({}, state), {}, { items: addItemAtIndex(items, nextItem, _index) }); if (!hasSetCurrentId && !moves && initialCurrentId === undefined) { var _findFirstEnabledItem; // Sets currentId to the first enabled item. This runs whenever an item // is registered because the first enabled item may be registered // asynchronously. return _objectSpread2(_objectSpread2({}, nextState), {}, { currentId: (_findFirstEnabledItem = findFirstEnabledItem(nextState.items)) === null || _findFirstEnabledItem === void 0 ? void 0 : _findFirstEnabledItem.id }); } return nextState; } case "unregisterItem": { var _id2 = action.id; var nextItems = items.filter(function (item) { return item.id !== _id2; }); // The item isn't registered, so do nothing if (nextItems.length === items.length) { return state; } // Filters out the item that is being removed from the pastIds list var nextPastIds = pastIds.filter(function (pastId) { return pastId !== _id2; }); var _nextState = _objectSpread2(_objectSpread2({}, state), {}, { pastIds: nextPastIds, items: nextItems }); // If the current item is the item that is being removed, focus pastId if (currentId && currentId === _id2) { var nextId = includesBaseElement ? null : getCurrentId(_objectSpread2(_objectSpread2({}, _nextState), {}, { currentId: nextPastIds[0] })); return _objectSpread2(_objectSpread2({}, _nextState), {}, { currentId: nextId }); } return _nextState; } case "move": { var _id3 = action.id; // move() does nothing if (_id3 === undefined) { return state; } // Removes the current item and the item that is receiving focus from the // pastIds list var filteredPastIds = pastIds.filter(function (pastId) { return pastId !== currentId && pastId !== _id3; }); // If there's a currentId, add it to the pastIds list so it can be focused // if the new item gets removed or disabled var _nextPastIds = currentId ? [currentId].concat(filteredPastIds) : filteredPastIds; var _nextState2 = _objectSpread2(_objectSpread2({}, state), {}, { pastIds: _nextPastIds }); // move(null) will focus the composite element itself, not an item if (_id3 === null) { return _objectSpread2(_objectSpread2({}, _nextState2), {}, { unstable_moves: moves + 1, currentId: getCurrentId(_nextState2, _id3) }); } var _item2 = findEnabledItemById(items, _id3); return _objectSpread2(_objectSpread2({}, _nextState2), {}, { unstable_moves: _item2 ? moves + 1 : moves, currentId: getCurrentId(_nextState2, _item2 === null || _item2 === void 0 ? void 0 : _item2.id) }); } case "next": { // If there's no item focused, we just move the first one if (currentId == null) { return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "first" })); } // RTL doesn't make sense on vertical navigation var isHorizontal = orientation !== "vertical"; var isRTL = rtl && isHorizontal; var allItems = isRTL ? reverse(items) : items; var currentItem = allItems.find(function (item) { return item.id === currentId; }); // If there's no item focused, we just move the first one if (!currentItem) { return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "first" })); } var isGrid = !!currentItem.groupId; var currentIndex = allItems.indexOf(currentItem); var _nextItems = allItems.slice(currentIndex + 1); var nextItemsInGroup = getItemsInGroup(_nextItems, currentItem.groupId); // Home, End if (action.allTheWay) { // We reverse so we can get the last enabled item in the group. If it's // RTL, nextItems and nextItemsInGroup are already reversed and don't // have the items before the current one anymore. So we have to get // items in group again with allItems. var _nextItem2 = findFirstEnabledItem(isRTL ? getItemsInGroup(allItems, currentItem.groupId) : reverse(nextItemsInGroup)); return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: _nextItem2 === null || _nextItem2 === void 0 ? void 0 : _nextItem2.id })); } var oppositeOrientation = getOppositeOrientation( // If it's a grid and orientation is not set, it's a next/previous // call, which is inherently horizontal. up/down will call next with // orientation set to vertical by default (see below on up/down cases). isGrid ? orientation || "horizontal" : orientation); var canLoop = loop && loop !== oppositeOrientation; var canWrap = isGrid && wrap && wrap !== oppositeOrientation; var hasNullItem = // `previous` and `up` will set action.hasNullItem, but when calling // next directly, hasNullItem will only be true if it's not a grid and // loop is set to true, which means that pressing right or down keys on // grids will never focus the composite element. On one-dimensional // composites that don't loop, pressing right or down keys also doesn't // focus the composite element. action.hasNullItem || !isGrid && canLoop && includesBaseElement; if (canLoop) { var loopItems = canWrap && !hasNullItem ? allItems : getItemsInGroup(allItems, currentItem.groupId); // Turns [0, 1, current, 3, 4] into [3, 4, 0, 1] var sortedItems = placeItemsAfter(loopItems, currentId, hasNullItem); var _nextItem3 = findFirstEnabledItem(sortedItems, currentId); return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: _nextItem3 === null || _nextItem3 === void 0 ? void 0 : _nextItem3.id })); } if (canWrap) { var _nextItem4 = findFirstEnabledItem( // We can use nextItems, which contains all the next items, including // items from other groups, to wrap between groups. However, if there // is a null item (the composite element), we'll only use the next // items in the group. So moving next from the last item will focus // the composite element (null). On grid composites, horizontal // navigation never focuses the composite element, only vertical. hasNullItem ? nextItemsInGroup : _nextItems, currentId); var _nextId = hasNullItem ? (_nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id) || null : _nextItem4 === null || _nextItem4 === void 0 ? void 0 : _nextItem4.id; return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: _nextId })); } var _nextItem = findFirstEnabledItem(nextItemsInGroup, currentId); if (!_nextItem && hasNullItem) { return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: null })); } return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: _nextItem === null || _nextItem === void 0 ? void 0 : _nextItem.id })); } case "previous": { // If currentId is initially set to null, the composite element will be // focusable while navigating with arrow keys. But, if it's a grid, we // don't want to focus the composite element with horizontal navigation. var _isGrid = !!groups.length; var _hasNullItem = !_isGrid && includesBaseElement; var _nextState3 = reducer(_objectSpread2(_objectSpread2({}, state), {}, { items: reverse(items) }), _objectSpread2(_objectSpread2({}, action), {}, { type: "next", hasNullItem: _hasNullItem })); return _objectSpread2(_objectSpread2({}, _nextState3), {}, { items: items }); } case "down": { var shouldShift = shift && !action.allTheWay; // First, we make sure groups have the same number of items by filling it // with disabled fake items. Then, we reorganize the items list so // [1-1, 1-2, 2-1, 2-2] becomes [1-1, 2-1, 1-2, 2-2]. var verticalItems = verticalizeItems(flatten(fillGroups(groupItems(items), currentId, shouldShift))); var _canLoop = loop && loop !== "horizontal"; // Pressing down arrow key will only focus the composite element if loop // is true or vertical. var _hasNullItem2 = _canLoop && includesBaseElement; var _nextState4 = reducer(_objectSpread2(_objectSpread2({}, state), {}, { orientation: "vertical", items: verticalItems }), _objectSpread2(_objectSpread2({}, action), {}, { type: "next", hasNullItem: _hasNullItem2 })); return _objectSpread2(_objectSpread2({}, _nextState4), {}, { orientation: orientation, items: items }); } case "up": { var _shouldShift = shift && !action.allTheWay; var _verticalItems = verticalizeItems(reverse(flatten(fillGroups(groupItems(items), currentId, _shouldShift)))); // If currentId is initially set to null, we'll always focus the // composite element when the up arrow key is pressed in the first row. var _hasNullItem3 = includesBaseElement; var _nextState5 = reducer(_objectSpread2(_objectSpread2({}, state), {}, { orientation: "vertical", items: _verticalItems }), _objectSpread2(_objectSpread2({}, action), {}, { type: "next", hasNullItem: _hasNullItem3 })); return _objectSpread2(_objectSpread2({}, _nextState5), {}, { orientation: orientation, items: items }); } case "first": { var firstItem = findFirstEnabledItem(items); return reducer(state, _objectSpread2(_objectSpread2({}, action), {}, { type: "move", id: firstItem === null || firstItem === void 0 ? void 0 : firstItem.id })); } case "last": { var _nextState6 = reducer(_objectSpread2(_objectSpread2({}, state), {}, { items: reverse(items) }), _objectSpread2(_objectSpread2({}, action), {}, { type: "first" })); return _objectSpread2(_objectSpread2({}, _nextState6), {}, { items: items }); } case "sort": { return _objectSpread2(_objectSpread2({}, state), {}, { items: sortBasedOnDOMPosition(items), groups: sortBasedOnDOMPosition(groups) }); } case "setVirtual": return _objectSpread2(_objectSpread2({}, state), {}, { unstable_virtual: applyState(action.virtual, virtual) }); case "setRTL": return _objectSpread2(_objectSpread2({}, state), {}, { rtl: applyState(action.rtl, rtl) }); case "setOrientation": return _objectSpread2(_objectSpread2({}, state), {}, { orientation: applyState(action.orientation, orientation) }); case "setCurrentId": { var nextCurrentId = getCurrentId(_objectSpread2(_objectSpread2({}, state), {}, { currentId: applyState(action.currentId, currentId) })); return _objectSpread2(_objectSpread2({}, state), {}, { currentId: nextCurrentId, hasSetCurrentId: true }); } case "setLoop": return _objectSpread2(_objectSpread2({}, state), {}, { loop: applyState(action.loop, loop) }); case "setWrap": return _objectSpread2(_objectSpread2({}, state), {}, { wrap: applyState(action.wrap, wrap) }); case "setShift": return _objectSpread2(_objectSpread2({}, state), {}, { shift: applyState(action.shift, shift) }); case "setIncludesBaseElement": { return _objectSpread2(_objectSpread2({}, state), {}, { unstable_includesBaseElement: applyState(action.includesBaseElement, includesBaseElement) }); } case "reset": return _objectSpread2(_objectSpread2({}, state), {}, { unstable_virtual: initialVirtual, rtl: initialRTL, orientation: initialOrientation, currentId: getCurrentId(_objectSpread2(_objectSpread2({}, state), {}, { currentId: initialCurrentId })), loop: initialLoop, wrap: initialWrap, shift: initialShift, unstable_moves: 0, pastIds: [] }); case "setItems": { return _objectSpread2(_objectSpread2({}, state), {}, { items: action.items }); } default: throw new Error(); } } function useAction(fn) { return (0,external_React_.useCallback)(fn, []); } function useIsUnmountedRef() { var isUnmountedRef = (0,external_React_.useRef)(false); useIsomorphicEffect(function () { return function () { isUnmountedRef.current = true; }; }, []); return isUnmountedRef; } function useCompositeState(initialState) { if (initialState === void 0) { initialState = {}; } var _useSealedState = useSealedState(initialState), _useSealedState$unsta = _useSealedState.unstable_virtual, virtual = _useSealedState$unsta === void 0 ? false : _useSealedState$unsta, _useSealedState$rtl = _useSealedState.rtl, rtl = _useSealedState$rtl === void 0 ? false : _useSealedState$rtl, orientation = _useSealedState.orientation, currentId = _useSealedState.currentId, _useSealedState$loop = _useSealedState.loop, loop = _useSealedState$loop === void 0 ? false : _useSealedState$loop, _useSealedState$wrap = _useSealedState.wrap, wrap = _useSealedState$wrap === void 0 ? false : _useSealedState$wrap, _useSealedState$shift = _useSealedState.shift, shift = _useSealedState$shift === void 0 ? false : _useSealedState$shift, unstable_includesBaseElement = _useSealedState.unstable_includesBaseElement, sealed = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_useSealedState, ["unstable_virtual", "rtl", "orientation", "currentId", "loop", "wrap", "shift", "unstable_includesBaseElement"]); var idState = unstable_useIdState(sealed); var _React$useReducer = (0,external_React_.useReducer)(reducer, { unstable_virtual: virtual, rtl: rtl, orientation: orientation, items: [], groups: [], currentId: currentId, loop: loop, wrap: wrap, shift: shift, unstable_moves: 0, pastIds: [], unstable_includesBaseElement: unstable_includesBaseElement != null ? unstable_includesBaseElement : currentId === null, initialVirtual: virtual, initialRTL: rtl, initialOrientation: orientation, initialCurrentId: currentId, initialLoop: loop, initialWrap: wrap, initialShift: shift }), _React$useReducer$ = _React$useReducer[0], pastIds = _React$useReducer$.pastIds, initialVirtual = _React$useReducer$.initialVirtual, initialRTL = _React$useReducer$.initialRTL, initialOrientation = _React$useReducer$.initialOrientation, initialCurrentId = _React$useReducer$.initialCurrentId, initialLoop = _React$useReducer$.initialLoop, initialWrap = _React$useReducer$.initialWrap, initialShift = _React$useReducer$.initialShift, hasSetCurrentId = _React$useReducer$.hasSetCurrentId, state = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_React$useReducer$, ["pastIds", "initialVirtual", "initialRTL", "initialOrientation", "initialCurrentId", "initialLoop", "initialWrap", "initialShift", "hasSetCurrentId"]), dispatch = _React$useReducer[1]; var _React$useState = (0,external_React_.useState)(false), hasActiveWidget = _React$useState[0], setHasActiveWidget = _React$useState[1]; // register/unregister may be called when this component is unmounted. We // store the unmounted state here so we don't update the state if it's true. // This only happens in a very specific situation. // See https://github.com/reakit/reakit/issues/650 var isUnmountedRef = useIsUnmountedRef(); var setItems = (0,external_React_.useCallback)(function (items) { return dispatch({ type: "setItems", items: items }); }, []); useSortBasedOnDOMPosition(state.items, setItems); return _objectSpread2(_objectSpread2(_objectSpread2({}, idState), state), {}, { unstable_hasActiveWidget: hasActiveWidget, unstable_setHasActiveWidget: setHasActiveWidget, registerItem: useAction(function (item) { if (isUnmountedRef.current) return; dispatch({ type: "registerItem", item: item }); }), unregisterItem: useAction(function (id) { if (isUnmountedRef.current) return; dispatch({ type: "unregisterItem", id: id }); }), registerGroup: useAction(function (group) { if (isUnmountedRef.current) return; dispatch({ type: "registerGroup", group: group }); }), unregisterGroup: useAction(function (id) { if (isUnmountedRef.current) return; dispatch({ type: "unregisterGroup", id: id }); }), move: useAction(function (id) { return dispatch({ type: "move", id: id }); }), next: useAction(function (allTheWay) { return dispatch({ type: "next", allTheWay: allTheWay }); }), previous: useAction(function (allTheWay) { return dispatch({ type: "previous", allTheWay: allTheWay }); }), up: useAction(function (allTheWay) { return dispatch({ type: "up", allTheWay: allTheWay }); }), down: useAction(function (allTheWay) { return dispatch({ type: "down", allTheWay: allTheWay }); }), first: useAction(function () { return dispatch({ type: "first" }); }), last: useAction(function () { return dispatch({ type: "last" }); }), sort: useAction(function () { return dispatch({ type: "sort" }); }), unstable_setVirtual: useAction(function (value) { return dispatch({ type: "setVirtual", virtual: value }); }), setRTL: useAction(function (value) { return dispatch({ type: "setRTL", rtl: value }); }), setOrientation: useAction(function (value) { return dispatch({ type: "setOrientation", orientation: value }); }), setCurrentId: useAction(function (value) { return dispatch({ type: "setCurrentId", currentId: value }); }), setLoop: useAction(function (value) { return dispatch({ type: "setLoop", loop: value }); }), setWrap: useAction(function (value) { return dispatch({ type: "setWrap", wrap: value }); }), setShift: useAction(function (value) { return dispatch({ type: "setShift", shift: value }); }), unstable_setIncludesBaseElement: useAction(function (value) { return dispatch({ type: "setIncludesBaseElement", includesBaseElement: value }); }), reset: useAction(function () { return dispatch({ type: "reset" }); }) }); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireBlurEvent.js function createFocusEvent(element, type, eventInit) { if (eventInit === void 0) { eventInit = {}; } if (typeof FocusEvent === "function") { return new FocusEvent(type, eventInit); } return createEvent(element, type, eventInit); } /** * Creates and dispatches a blur event in a way that also works on IE 11. * * @example * import { fireBlurEvent } from "reakit-utils"; * * fireBlurEvent(document.getElementById("id")); */ function fireBlurEvent(element, eventInit) { var event = createFocusEvent(element, "blur", eventInit); var defaultAllowed = element.dispatchEvent(event); var bubbleInit = _rollupPluginBabelHelpers_1f0bf8c2_objectSpread2(_rollupPluginBabelHelpers_1f0bf8c2_objectSpread2({}, eventInit), {}, { bubbles: true }); element.dispatchEvent(createFocusEvent(element, "focusout", bubbleInit)); return defaultAllowed; } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/fireKeyboardEvent.js function createKeyboardEvent(element, type, eventInit) { if (eventInit === void 0) { eventInit = {}; } if (typeof KeyboardEvent === "function") { return new KeyboardEvent(type, eventInit); } // IE 11 doesn't support Event constructors var event = getDocument(element).createEvent("KeyboardEvent"); event.initKeyboardEvent(type, eventInit.bubbles, eventInit.cancelable, getWindow(element), eventInit.key, eventInit.location, eventInit.ctrlKey, eventInit.altKey, eventInit.shiftKey, eventInit.metaKey); return event; } /** * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11. * * @example * import { fireKeyboardEvent } from "reakit-utils"; * * fireKeyboardEvent(document.getElementById("id"), "keydown", { * key: "ArrowDown", * shiftKey: true, * }); */ function fireKeyboardEvent(element, type, eventInit) { return element.dispatchEvent(createKeyboardEvent(element, type, eventInit)); } ;// CONCATENATED MODULE: ./node_modules/reakit-utils/es/getNextActiveElementOnBlur.js var isIE11 = canUseDOM && "msCrypto" in window; /** * Cross-browser method that returns the next active element (the element that * is receiving focus) after a blur event is dispatched. It receives the blur * event object as the argument. * * @example * import { getNextActiveElementOnBlur } from "reakit-utils"; * * const element = document.getElementById("id"); * element.addEventListener("blur", (event) => { * const nextActiveElement = getNextActiveElementOnBlur(event); * }); */ function getNextActiveElementOnBlur(event) { // IE 11 doesn't support event.relatedTarget on blur. // document.activeElement points the the next active element. // On modern browsers, document.activeElement points to the current target. if (isIE11) { var activeElement = getActiveElement_getActiveElement(event.currentTarget); return activeElement; } return event.relatedTarget; } ;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/Composite.js var Composite_isIE11 = canUseDOM && "msCrypto" in window; function canProxyKeyboardEvent(event) { if (!isSelfTarget(event)) return false; if (event.metaKey) return false; if (event.key === "Tab") return false; return true; } function useKeyboardEventProxy(virtual, currentItem, htmlEventHandler) { var eventHandlerRef = useLiveRef(htmlEventHandler); return (0,external_React_.useCallback)(function (event) { var _eventHandlerRef$curr; (_eventHandlerRef$curr = eventHandlerRef.current) === null || _eventHandlerRef$curr === void 0 ? void 0 : _eventHandlerRef$curr.call(eventHandlerRef, event); if (event.defaultPrevented) return; if (virtual && canProxyKeyboardEvent(event)) { var currentElement = currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current; if (currentElement) { if (!fireKeyboardEvent(currentElement, event.type, event)) { event.preventDefault(); } // The event will be triggered on the composite item and then // propagated up to this composite element again, so we can pretend // that it wasn't called on this component in the first place. if (event.currentTarget.contains(currentElement)) { event.stopPropagation(); } } } }, [virtual, currentItem]); } // istanbul ignore next function useActiveElementRef(elementRef) { var activeElementRef = (0,external_React_.useRef)(null); (0,external_React_.useEffect)(function () { var document = getDocument(elementRef.current); var onFocus = function onFocus(event) { var target = event.target; activeElementRef.current = target; }; document.addEventListener("focus", onFocus, true); return function () { document.removeEventListener("focus", onFocus, true); }; }, []); return activeElementRef; } function findFirstEnabledItemInTheLastRow(items) { return findFirstEnabledItem(flatten(reverse(groupItems(items)))); } function isItem(items, element) { return items === null || items === void 0 ? void 0 : items.some(function (item) { return !!element && item.ref.current === element; }); } function useScheduleUserFocus(currentItem) { var currentItemRef = useLiveRef(currentItem); var _React$useReducer = (0,external_React_.useReducer)(function (n) { return n + 1; }, 0), scheduled = _React$useReducer[0], schedule = _React$useReducer[1]; (0,external_React_.useEffect)(function () { var _currentItemRef$curre; var currentElement = (_currentItemRef$curre = currentItemRef.current) === null || _currentItemRef$curre === void 0 ? void 0 : _currentItemRef$curre.ref.current; if (scheduled && currentElement) { userFocus(currentElement); } }, [scheduled]); return schedule; } var useComposite = createHook({ name: "Composite", compose: [useTabbable], keys: COMPOSITE_KEYS, useOptions: function useOptions(options) { return _objectSpread2(_objectSpread2({}, options), {}, { currentId: getCurrentId(options) }); }, useProps: function useProps(options, _ref) { var htmlRef = _ref.ref, htmlOnFocusCapture = _ref.onFocusCapture, htmlOnFocus = _ref.onFocus, htmlOnBlurCapture = _ref.onBlurCapture, htmlOnKeyDown = _ref.onKeyDown, htmlOnKeyDownCapture = _ref.onKeyDownCapture, htmlOnKeyUpCapture = _ref.onKeyUpCapture, htmlProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref, ["ref", "onFocusCapture", "onFocus", "onBlurCapture", "onKeyDown", "onKeyDownCapture", "onKeyUpCapture"]); var ref = (0,external_React_.useRef)(null); var currentItem = findEnabledItemById(options.items, options.currentId); var previousElementRef = (0,external_React_.useRef)(null); var onFocusCaptureRef = useLiveRef(htmlOnFocusCapture); var onFocusRef = useLiveRef(htmlOnFocus); var onBlurCaptureRef = useLiveRef(htmlOnBlurCapture); var onKeyDownRef = useLiveRef(htmlOnKeyDown); var scheduleUserFocus = useScheduleUserFocus(currentItem); // IE 11 doesn't support event.relatedTarget, so we use the active element // ref instead. var activeElementRef = Composite_isIE11 ? useActiveElementRef(ref) : undefined; (0,external_React_.useEffect)(function () { var element = ref.current; if (options.unstable_moves && !currentItem) { false ? 0 : void 0; // If composite.move(null) has been called, the composite container // will receive focus. element === null || element === void 0 ? void 0 : element.focus(); } }, [options.unstable_moves, currentItem]); var onKeyDownCapture = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyDownCapture); var onKeyUpCapture = useKeyboardEventProxy(options.unstable_virtual, currentItem, htmlOnKeyUpCapture); var onFocusCapture = (0,external_React_.useCallback)(function (event) { var _onFocusCaptureRef$cu; (_onFocusCaptureRef$cu = onFocusCaptureRef.current) === null || _onFocusCaptureRef$cu === void 0 ? void 0 : _onFocusCaptureRef$cu.call(onFocusCaptureRef, event); if (event.defaultPrevented) return; if (!options.unstable_virtual) return; // IE11 doesn't support event.relatedTarget, so we use the active // element ref instead. var previousActiveElement = (activeElementRef === null || activeElementRef === void 0 ? void 0 : activeElementRef.current) || event.relatedTarget; var previousActiveElementWasItem = isItem(options.items, previousActiveElement); if (isSelfTarget(event) && previousActiveElementWasItem) { // Composite has been focused as a result of an item receiving focus. // The composite item will move focus back to the composite // container. In this case, we don't want to propagate this // additional event nor call the onFocus handler passed to // . event.stopPropagation(); // We keep track of the previous active item element so we can // manually fire a blur event on it later when the focus is moved to // another item on the onBlurCapture event below. previousElementRef.current = previousActiveElement; } }, [options.unstable_virtual, options.items]); var onFocus = (0,external_React_.useCallback)(function (event) { var _onFocusRef$current; (_onFocusRef$current = onFocusRef.current) === null || _onFocusRef$current === void 0 ? void 0 : _onFocusRef$current.call(onFocusRef, event); if (event.defaultPrevented) return; if (options.unstable_virtual) { if (isSelfTarget(event)) { // This means that the composite element has been focused while the // composite item has not. For example, by clicking on the // composite element without touching any item, or by tabbing into // the composite element. In this case, we want to trigger focus on // the item, just like it would happen with roving tabindex. // When it receives focus, the composite item will put focus back // on the composite element, in which case hasItemWithFocus will be // true. scheduleUserFocus(); } } else if (isSelfTarget(event)) { var _options$setCurrentId; // When the roving tabindex composite gets intentionally focused (for // example, by clicking directly on it, and not on an item), we make // sure to set the current id to null (which means the composite // itself is focused). (_options$setCurrentId = options.setCurrentId) === null || _options$setCurrentId === void 0 ? void 0 : _options$setCurrentId.call(options, null); } }, [options.unstable_virtual, options.setCurrentId]); var onBlurCapture = (0,external_React_.useCallback)(function (event) { var _onBlurCaptureRef$cur; (_onBlurCaptureRef$cur = onBlurCaptureRef.current) === null || _onBlurCaptureRef$cur === void 0 ? void 0 : _onBlurCaptureRef$cur.call(onBlurCaptureRef, event); if (event.defaultPrevented) return; if (!options.unstable_virtual) return; // When virtual is set to true, we move focus from the composite // container (this component) to the composite item that is being // selected. Then we move focus back to the composite container. This // is so we can provide the same API as the roving tabindex method, // which means people can attach onFocus/onBlur handlers on the // CompositeItem component regardless of whether it's virtual or not. // This sequence of blurring and focusing items and composite may be // confusing, so we ignore intermediate focus and blurs by stopping its // propagation and not calling the passed onBlur handler (htmlOnBlur). var currentElement = (currentItem === null || currentItem === void 0 ? void 0 : currentItem.ref.current) || null; var nextActiveElement = getNextActiveElementOnBlur(event); var nextActiveElementIsItem = isItem(options.items, nextActiveElement); if (isSelfTarget(event) && nextActiveElementIsItem) { // This is an intermediate blur event: blurring the composite // container to focus an item (nextActiveElement). if (nextActiveElement === currentElement) { // The next active element will be the same as the current item in // the state in two scenarios: // - Moving focus with keyboard: the state is updated before the // blur event is triggered, so here the current item is already // pointing to the next active element. // - Clicking on the current active item with a pointer: this // will trigger blur on the composite element and then the next // active element will be the same as the current item. Clicking on // an item other than the current one doesn't end up here as the // currentItem state will be updated only after it. if (previousElementRef.current && previousElementRef.current !== nextActiveElement) { // If there's a previous active item and it's not a click action, // then we fire a blur event on it so it will work just like if // it had DOM focus before (like when using roving tabindex). fireBlurEvent(previousElementRef.current, event); } } else if (currentElement) { // This will be true when the next active element is not the // current element, but there's a current item. This will only // happen when clicking with a pointer on a different item, when // there's already an item selected, in which case currentElement // is the item that is getting blurred, and nextActiveElement is // the item that is being clicked. fireBlurEvent(currentElement, event); } // We want to ignore intermediate blur events, so we stop its // propagation and return early so onFocus will not be called. event.stopPropagation(); } else { var targetIsItem = isItem(options.items, event.target); if (!targetIsItem && currentElement) { // If target is not a composite item, it may be the composite // element itself (isSelfTarget) or a tabbable element inside the // composite widget. This may be triggered by clicking outside the // composite widget or by tabbing out of it. In either cases we // want to fire a blur event on the current item. fireBlurEvent(currentElement, event); } } }, [options.unstable_virtual, options.items, currentItem]); var onKeyDown = (0,external_React_.useCallback)(function (event) { var _onKeyDownRef$current, _options$groups; (_onKeyDownRef$current = onKeyDownRef.current) === null || _onKeyDownRef$current === void 0 ? void 0 : _onKeyDownRef$current.call(onKeyDownRef, event); if (event.defaultPrevented) return; if (options.currentId !== null) return; if (!isSelfTarget(event)) return; var isVertical = options.orientation !== "horizontal"; var isHorizontal = options.orientation !== "vertical"; var isGrid = !!((_options$groups = options.groups) !== null && _options$groups !== void 0 && _options$groups.length); var up = function up() { if (isGrid) { var item = findFirstEnabledItemInTheLastRow(options.items); if (item !== null && item !== void 0 && item.id) { var _options$move; (_options$move = options.move) === null || _options$move === void 0 ? void 0 : _options$move.call(options, item.id); } } else { var _options$last; (_options$last = options.last) === null || _options$last === void 0 ? void 0 : _options$last.call(options); } }; var keyMap = { ArrowUp: (isGrid || isVertical) && up, ArrowRight: (isGrid || isHorizontal) && options.first, ArrowDown: (isGrid || isVertical) && options.first, ArrowLeft: (isGrid || isHorizontal) && options.last, Home: options.first, End: options.last, PageUp: options.first, PageDown: options.last }; var action = keyMap[event.key]; if (action) { event.preventDefault(); action(); } }, [options.currentId, options.orientation, options.groups, options.items, options.move, options.last, options.first]); return _objectSpread2({ ref: useForkRef(ref, htmlRef), id: options.baseId, onFocus: onFocus, onFocusCapture: onFocusCapture, onBlurCapture: onBlurCapture, onKeyDownCapture: onKeyDownCapture, onKeyDown: onKeyDown, onKeyUpCapture: onKeyUpCapture, "aria-activedescendant": options.unstable_virtual ? (currentItem === null || currentItem === void 0 ? void 0 : currentItem.id) || undefined : undefined }, htmlProps); }, useComposeProps: function useComposeProps(options, htmlProps) { htmlProps = useRole(options, htmlProps, true); var tabbableHTMLProps = useTabbable(options, htmlProps, true); if (options.unstable_virtual || options.currentId === null) { // Composite will only be tabbable by default if the focus is managed // using aria-activedescendant, which requires DOM focus on the container // element (the composite) return _objectSpread2({ tabIndex: 0 }, tabbableHTMLProps); } return _objectSpread2(_objectSpread2({}, htmlProps), {}, { ref: tabbableHTMLProps.ref }); } }); var Composite = createComponent({ as: "div", useHook: useComposite, useCreateElement: function useCreateElement$1(type, props, children) { false ? 0 : void 0; return useCreateElement(type, props, children); } }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Group/Group.js // Automatically generated var GROUP_KEYS = []; var useGroup = createHook({ name: "Group", compose: useRole, keys: GROUP_KEYS, useProps: function useProps(_, htmlProps) { return _objectSpread2({ role: "group" }, htmlProps); } }); var Group = createComponent({ as: "div", useHook: useGroup }); ;// CONCATENATED MODULE: ./node_modules/reakit/es/Composite/CompositeGroup.js var useCompositeGroup = createHook({ name: "CompositeGroup", compose: [useGroup, unstable_useId], keys: COMPOSITE_GROUP_KEYS, propsAreEqual: function propsAreEqual(prev, next) { if (!next.id || prev.id !== next.id) { return useGroup.unstable_propsAreEqual(prev, next); } var prevCurrentId = prev.currentId, prevMoves = prev.unstable_moves, prevProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(prev, ["currentId", "unstable_moves"]); var nextCurrentId = next.currentId, nextMoves = next.unstable_moves, nextProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(next, ["currentId", "unstable_moves"]); if (prev.items && next.items) { var prevCurrentItem = findEnabledItemById(prev.items, prevCurrentId); var nextCurrentItem = findEnabledItemById(next.items, nextCurrentId); var prevGroupId = prevCurrentItem === null || prevCurrentItem === void 0 ? void 0 : prevCurrentItem.groupId; var nextGroupId = nextCurrentItem === null || nextCurrentItem === void 0 ? void 0 : nextCurrentItem.groupId; if (next.id === nextGroupId || next.id === prevGroupId) { return false; } } return useGroup.unstable_propsAreEqual(prevProps, nextProps); }, useProps: function useProps(options, _ref) { var htmlRef = _ref.ref, htmlProps = _rollupPluginBabelHelpers_1f0bf8c2_objectWithoutPropertiesLoose(_ref, ["ref"]); var ref = (0,external_React_.useRef)(null); var id = options.id; // We need this to be called before CompositeItems' register useIsomorphicEffect(function () { var _options$registerGrou; if (!id) return undefined; (_options$registerGrou = options.registerGroup) === null || _options$registerGrou === void 0 ? void 0 : _options$registerGrou.call(options, { id: id, ref: ref }); return function () { var _options$unregisterGr; (_options$unregisterGr = options.unregisterGroup) === null || _options$unregisterGr === void 0 ? void 0 : _options$unregisterGr.call(options, id); }; }, [id, options.registerGroup, options.unregisterGroup]); return _objectSpread2({ ref: useForkRef(ref, htmlRef) }, htmlProps); } }); var CompositeGroup = createComponent({ as: "div", useHook: useCompositeGroup }); ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js function alignment_matrix_control_icon_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /** * External dependencies */ /** * Internal dependencies */ const alignment_matrix_control_icon_styles_rootSize = () => { const padding = 1.5; const size = 24; return /*#__PURE__*/emotion_react_browser_esm_css({ gridTemplateRows: `repeat( 3, calc( ${size - padding * 2}px / 3))`, padding, maxHeight: size, maxWidth: size }, true ? "" : 0, true ? "" : 0); }; const rootPointerEvents = _ref => { let { disablePointerEvents } = _ref; return /*#__PURE__*/emotion_react_browser_esm_css({ pointerEvents: disablePointerEvents ? 'none' : null }, true ? "" : 0, true ? "" : 0); }; const Wrapper = emotion_styled_base_browser_esm("div", true ? { target: "elqsdmc2" } : 0)( true ? { name: "ogl07i", styles: "box-sizing:border-box;padding:2px" } : 0); const alignment_matrix_control_icon_styles_Root = emotion_styled_base_browser_esm("div", true ? { target: "elqsdmc1" } : 0)("transform-origin:top left;height:100%;width:100%;", rootBase, ";", alignment_matrix_control_icon_styles_rootSize, ";", rootPointerEvents, ";" + ( true ? "" : 0)); const alignment_matrix_control_icon_styles_pointActive = _ref2 => { let { isActive } = _ref2; const boxShadow = isActive ? `0 0 0 1px currentColor` : null; return /*#__PURE__*/emotion_react_browser_esm_css("box-shadow:", boxShadow, ";color:currentColor;*:hover>&{color:currentColor;}" + ( true ? "" : 0), true ? "" : 0); }; const alignment_matrix_control_icon_styles_Point = emotion_styled_base_browser_esm("span", true ? { target: "elqsdmc0" } : 0)("height:2px;width:2px;", pointBase, ";", alignment_matrix_control_icon_styles_pointActive, ";" + ( true ? "" : 0)); const alignment_matrix_control_icon_styles_Cell = Cell; ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/icon.js /** * External dependencies */ /** * Internal dependencies */ const BASE_SIZE = 24; function AlignmentMatrixControlIcon(_ref) { let { className, disablePointerEvents = true, size = BASE_SIZE, style = {}, value = 'center', ...props } = _ref; const alignIndex = getAlignmentIndex(value); const scale = (size / BASE_SIZE).toFixed(2); const classes = classnames_default()('component-alignment-matrix-control-icon', className); const styles = { ...style, transform: `scale(${scale})` }; return (0,external_wp_element_namespaceObject.createElement)(alignment_matrix_control_icon_styles_Root, extends_extends({}, props, { className: classes, disablePointerEvents: disablePointerEvents, role: "presentation", size: size, style: styles }), ALIGNMENTS.map((align, index) => { const isActive = alignIndex === index; return (0,external_wp_element_namespaceObject.createElement)(alignment_matrix_control_icon_styles_Cell, { key: align }, (0,external_wp_element_namespaceObject.createElement)(alignment_matrix_control_icon_styles_Point, { isActive: isActive })); })); } ;// CONCATENATED MODULE: ./packages/components/build-module/alignment-matrix-control/index.js /** * External dependencies */ /** * WordPress dependencies */ /** * Internal dependencies */ const noop = () => {}; function useBaseId(id) { const instanceId = (0,external_wp_compose_namespaceObject.useInstanceId)(AlignmentMatrixControl, 'alignment-matrix-control'); return id || instanceId; } function AlignmentMatrixControl(_ref) { let { className, id, label = (0,external_wp_i18n_namespaceObject.__)('Alignment Matrix Control'), defaultValue = 'center center', value, onChange = noop, width = 92, ...props } = _ref; const [immutableDefaultValue] = (0,external_wp_element_namespaceObject.useState)(value !== null && value !== void 0 ? value : defaultValue); const baseId = useBaseId(id); const initialCurrentId = getItemId(baseId, immutableDefaultValue); const composite = useCompositeState({ baseId, currentId: initialCurrentId, rtl: (0,external_wp_i18n_namespaceObject.isRTL)() }); const handleOnChange = nextValue => { onChange(nextValue); }; const { setCurrentId } = composite; (0,external_wp_element_namespaceObject.useEffect)(() => { if (typeof value !== 'undefined') { setCurrentId(getItemId(baseId, value)); } }, [value, setCurrentId, baseId]); const classes = classnames_default()('component-alignment-matrix-control', className); return (0,external_wp_element_namespaceObject.createElement)(Composite, extends_extends({}, props, composite, { "aria-label": label, as: Root, className: classes, role: "grid", width: width }), GRID.map((cells, index) => (0,external_wp_element_namespaceObject.createElement)(CompositeGroup, extends_extends({}, composite, { as: Row, role: "row", key: index }), cells.map(cell => { const cellId = getItemId(baseId, cell); const isActive = composite.currentId === cellId; return (0,external_wp_element_namespaceObject.createElement)(cell_Cell, extends_extends({}, composite, { id: cellId, isActive: isActive, key: cell, value: cell, onFocus: () => handleOnChange(cell), tabIndex: isActive ? 0 : -1 })); })))); } AlignmentMatrixControl.Icon = AlignmentMatrixControlIcon; ;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.js /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ /* global Reflect, Promise */ var extendStatics = function(d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; function __extends(d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var __assign = function() { __assign = Object.assign || function __assign(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; } return __assign.apply(this, arguments); } function __rest(s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; } function __decorate(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; } function __param(paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } } function __metadata(metadataKey, metadataValue) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); } function __generator(thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } } var __createBinding = Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; }); function __exportStar(m, o) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); } function __values(o) { var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; if (m) return m.call(o); if (o && typeof o.length === "number") return { next: function () { if (o && i >= o.length) o = void 0; return { value: o && o[i++], done: !o }; } }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); } function tslib_es6_read(o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; } /** @deprecated */ function __spread() { for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(tslib_es6_read(arguments[i])); return ar; } /** @deprecated */ function __spreadArrays() { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; } function tslib_es6_spreadArray(to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || from); } function __await(v) { return this instanceof __await ? (this.v = v, this) : new __await(v); } function __asyncGenerator(thisArg, _arguments, generator) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var g = generator.apply(thisArg, _arguments || []), i, q = []; return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } function fulfill(value) { resume("next", value); } function reject(value) { resume("throw", value); } function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } } function __asyncDelegator(o) { var i, p; return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } } function __asyncValues(o) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var m = o[Symbol.asyncIterator], i; return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } } function __makeTemplateObject(cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __setModuleDefault = Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }; function __importStar(mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; } function __importDefault(mod) { return (mod && mod.__esModule) ? mod : { default: mod }; } function __classPrivateFieldGet(receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); } function __classPrivateFieldSet(receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/definitions.mjs var createDefinition = function (propNames) { return ({ isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); }, }); }; var featureDefinitions = { measureLayout: createDefinition(["layout", "layoutId", "drag"]), animation: createDefinition([ "animate", "exit", "variants", "whileHover", "whileTap", "whileFocus", "whileDrag", "whileInView", ]), exit: createDefinition(["exit"]), drag: createDefinition(["drag", "dragControls"]), focus: createDefinition(["whileFocus"]), hover: createDefinition(["whileHover", "onHoverStart", "onHoverEnd"]), tap: createDefinition(["whileTap", "onTap", "onTapStart", "onTapCancel"]), pan: createDefinition([ "onPan", "onPanStart", "onPanSessionStart", "onPanEnd", ]), inView: createDefinition([ "whileInView", "onViewportEnter", "onViewportLeave", ]), }; function loadFeatures(features) { for (var key in features) { if (features[key] === null) continue; if (key === "projectionNodeConstructor") { featureDefinitions.projectionNodeConstructor = features[key]; } else { featureDefinitions[key].Component = features[key]; } } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LazyContext.mjs var LazyContext = (0,external_React_.createContext)({ strict: false }); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/use-features.mjs var featureNames = Object.keys(featureDefinitions); var numFeatures = featureNames.length; /** * Load features via renderless components based on the provided MotionProps. */ function useFeatures(props, visualElement, preloadedFeatures) { var features = []; var lazyContext = (0,external_React_.useContext)(LazyContext); if (!visualElement) return null; /** * If we're in development mode, check to make sure we're not rendering a motion component * as a child of LazyMotion, as this will break the file-size benefits of using it. */ if (false) {} for (var i = 0; i < numFeatures; i++) { var name_1 = featureNames[i]; var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component; /** * It might be possible in the future to use this moment to * dynamically request functionality. In initial tests this * was producing a lot of duplication amongst bundles. */ if (isEnabled(props) && Component) { features.push(external_React_.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement }))); } } return features; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs /** * @public */ var MotionConfigContext = (0,external_React_.createContext)({ transformPagePoint: function (p) { return p; }, isStatic: false, reducedMotion: "never", }); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs var MotionContext = (0,external_React_.createContext)({}); function useVisualElementContext() { return (0,external_React_.useContext)(MotionContext).visualElement; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/PresenceContext.mjs /** * @public */ var PresenceContext_PresenceContext = (0,external_React_.createContext)(null); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-browser.mjs var is_browser_isBrowser = typeof window !== "undefined"; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs var useIsomorphicLayoutEffect = is_browser_isBrowser ? external_React_.useLayoutEffect : external_React_.useEffect; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs // Does this device prefer reduced motion? Returns `null` server-side. var prefersReducedMotion = { current: null }; var hasDetected = false; function initPrefersReducedMotion() { hasDetected = true; if (typeof window === "undefined") return; if (window.matchMedia) { var motionMediaQuery_1 = window.matchMedia("(prefers-reduced-motion)"); var setReducedMotionPreferences = function () { return (prefersReducedMotion.current = motionMediaQuery_1.matches); }; motionMediaQuery_1.addListener(setReducedMotionPreferences); setReducedMotionPreferences(); } else { prefersReducedMotion.current = false; } } /** * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting. * * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion. * * It will actively respond to changes and re-render your components with the latest setting. * * ```jsx * export function Sidebar({ isOpen }) { * const shouldReduceMotion = useReducedMotion() * const closedX = shouldReduceMotion ? 0 : "-100%" * * return ( * * ) * } * ``` * * @return boolean * * @public */ function useReducedMotion() { /** * Lazy initialisation of prefersReducedMotion */ !hasDetected && initPrefersReducedMotion(); var _a = tslib_es6_read((0,external_React_.useState)(prefersReducedMotion.current), 1), shouldReduceMotion = _a[0]; /** * TODO See if people miss automatically updating shouldReduceMotion setting */ return shouldReduceMotion; } function useReducedMotionConfig() { var reducedMotionPreference = useReducedMotion(); var reducedMotion = (0,external_React_.useContext)(MotionConfigContext).reducedMotion; if (reducedMotion === "never") { return false; } else if (reducedMotion === "always") { return true; } else { return reducedMotionPreference; } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs function useVisualElement(Component, visualState, props, createVisualElement) { var lazyContext = (0,external_React_.useContext)(LazyContext); var parent = useVisualElementContext(); var presenceContext = (0,external_React_.useContext)(PresenceContext_PresenceContext); var shouldReduceMotion = useReducedMotionConfig(); var visualElementRef = (0,external_React_.useRef)(undefined); /** * If we haven't preloaded a renderer, check to see if we have one lazy-loaded */ if (!createVisualElement) createVisualElement = lazyContext.renderer; if (!visualElementRef.current && createVisualElement) { visualElementRef.current = createVisualElement(Component, { visualState: visualState, parent: parent, props: props, presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id, blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false, shouldReduceMotion: shouldReduceMotion, }); } var visualElement = visualElementRef.current; useIsomorphicLayoutEffect(function () { visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender(); }); (0,external_React_.useEffect)(function () { var _a; (_a = visualElement === null || visualElement === void 0 ? void 0 : visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges(); }); useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []); return visualElement; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-ref-object.mjs function is_ref_object_isRefObject(ref) { return (typeof ref === "object" && Object.prototype.hasOwnProperty.call(ref, "current")); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs /** * Creates a ref function that, when called, hydrates the provided * external ref and VisualElement. */ function useMotionRef(visualState, visualElement, externalRef) { return (0,external_React_.useCallback)(function (instance) { var _a; instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance)); if (visualElement) { instance ? visualElement.mount(instance) : visualElement.unmount(); } if (externalRef) { if (typeof externalRef === "function") { externalRef(instance); } else if (is_ref_object_isRefObject(externalRef)) { externalRef.current = instance; } } }, /** * Only pass a new ref callback to React if we've received a visual element * factory. Otherwise we'll be mounting/remounting every time externalRef * or other dependencies change. */ [visualElement]); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/variants.mjs /** * Decides if the supplied variable is an array of variant labels */ function isVariantLabels(v) { return Array.isArray(v); } /** * Decides if the supplied variable is variant label */ function isVariantLabel(v) { return typeof v === "string" || isVariantLabels(v); } /** * Creates an object containing the latest state of every MotionValue on a VisualElement */ function getCurrent(visualElement) { var current = {}; visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); }); return current; } /** * Creates an object containing the latest velocity of every MotionValue on a VisualElement */ function getVelocity(visualElement) { var velocity = {}; visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); }); return velocity; } function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) { var _a; if (currentValues === void 0) { currentValues = {}; } if (currentVelocity === void 0) { currentVelocity = {}; } /** * If the variant definition is a function, resolve. */ if (typeof definition === "function") { definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity); } /** * If the variant definition is a variant label, or * the function returned a variant label, resolve. */ if (typeof definition === "string") { definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition]; } /** * At this point we've resolved both functions and variant labels, * but the resolved variant label might itself have been a function. * If so, resolve. This can only have returned a valid target object. */ if (typeof definition === "function") { definition = definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity); } return definition; } function resolveVariant(visualElement, definition, custom) { var props = visualElement.getProps(); return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement)); } function checkIfControllingVariants(props) { var _a; return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" || isVariantLabel(props.initial) || isVariantLabel(props.animate) || isVariantLabel(props.whileHover) || isVariantLabel(props.whileDrag) || isVariantLabel(props.whileTap) || isVariantLabel(props.whileFocus) || isVariantLabel(props.exit)); } function checkIfVariantNode(props) { return Boolean(checkIfControllingVariants(props) || props.variants); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs function getCurrentTreeVariants(props, context) { if (checkIfControllingVariants(props)) { var initial = props.initial, animate = props.animate; return { initial: initial === false || isVariantLabel(initial) ? initial : undefined, animate: isVariantLabel(animate) ? animate : undefined, }; } return props.inherit !== false ? context : {}; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/create.mjs function useCreateMotionContext(props) { var _a = getCurrentTreeVariants(props, (0,external_React_.useContext)(MotionContext)), initial = _a.initial, animate = _a.animate; return (0,external_React_.useMemo)(function () { return ({ initial: initial, animate: animate }); }, [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]); } function variantLabelsAsDependency(prop) { return Array.isArray(prop) ? prop.join(" ") : prop; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-constant.mjs /** * Creates a constant value over the lifecycle of a component. * * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer * a guarantee that it won't re-run for performance reasons later on. By using `useConstant` * you can ensure that initialisers don't execute twice or more. */ function useConstant(init) { var ref = (0,external_React_.useRef)(null); if (ref.current === null) { ref.current = init(); } return ref.current; } ;// CONCATENATED MODULE: ./node_modules/framesync/dist/es/on-next-frame.mjs const defaultTimestep = (1 / 60) * 1000; const getCurrentTime = typeof performance !== "undefined" ? () => performance.now() : () => Date.now(); const onNextFrame = typeof window !== "undefined" ? (callback) => window.requestAnimationFrame(callback) : (callback) => setTimeout(() => callback(getCurrentTime()), defaultTimestep); ;// CONCATENATED MODULE: ./node_modules/framesync/dist/es/create-render-step.mjs function createRenderStep(runNextFrame) { let toRun = []; let toRunNextFrame = []; let numToRun = 0; let isProcessing = false; let flushNextFrame = false; const toKeepAlive = new WeakSet(); const step = { schedule: (callback, keepAlive = false, immediate = false) => { const addToCurrentFrame = immediate && isProcessing; const buffer = addToCurrentFrame ? toRun : toRunNextFrame; if (keepAlive) toKeepAlive.add(callback); if (buffer.indexOf(callback) === -1) { buffer.push(callback); if (addToCurrentFrame && isProcessing) numToRun = toRun.length; } return callback; }, cancel: (callback) => { const index = toRunNextFrame.indexOf(callback); if (index !== -1) toRunNextFrame.splice(index, 1); toKeepAlive.delete(callback); }, process: (frameData) => { if (isProcessing) { flushNextFrame = true; return; } isProcessing = true; [toRun, toRunNextFrame] = [toRunNextFrame, toRun]; toRunNextFrame.length = 0; numToRun = toRun.length; if (numToRun) { for (let i = 0; i < numToRun; i++) { const callback = toRun[i]; callback(frameData); if (toKeepAlive.has(callback)) { step.schedule(callback); runNextFrame(); } } } isProcessing = false; if (flushNextFrame) { flushNextFrame = false; step.process(frameData); } }, }; return step; } ;// CONCATENATED MODULE: ./node_modules/framesync/dist/es/index.mjs const maxElapsed = 40; let useDefaultElapsed = true; let runNextFrame = false; let isProcessing = false; const es_frame = { delta: 0, timestamp: 0, }; const stepsOrder = [ "read", "update", "preRender", "render", "postRender", ]; const steps = stepsOrder.reduce((acc, key) => { acc[key] = createRenderStep(() => (runNextFrame = true)); return acc; }, {}); const sync = stepsOrder.reduce((acc, key) => { const step = steps[key]; acc[key] = (process, keepAlive = false, immediate = false) => { if (!runNextFrame) startLoop(); return step.schedule(process, keepAlive, immediate); }; return acc; }, {}); const cancelSync = stepsOrder.reduce((acc, key) => { acc[key] = steps[key].cancel; return acc; }, {}); const flushSync = stepsOrder.reduce((acc, key) => { acc[key] = () => steps[key].process(es_frame); return acc; }, {}); const processStep = (stepId) => steps[stepId].process(es_frame); const processFrame = (timestamp) => { runNextFrame = false; es_frame.delta = useDefaultElapsed ? defaultTimestep : Math.max(Math.min(timestamp - es_frame.timestamp, maxElapsed), 1); es_frame.timestamp = timestamp; isProcessing = true; stepsOrder.forEach(processStep); isProcessing = false; if (runNextFrame) { useDefaultElapsed = false; onNextFrame(processFrame); } }; const startLoop = () => { runNextFrame = true; useDefaultElapsed = true; if (!isProcessing) onNextFrame(processFrame); }; const getFrameData = () => es_frame; /* harmony default export */ const es = (sync); ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix.mjs const mix = (from, to, progress) => -progress * from + progress * to + from; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/velocity-per-second.mjs function velocityPerSecond(velocity, frameDuration) { return frameDuration ? velocity * (1000 / frameDuration) : 0; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/array.mjs function addUniqueItem(arr, item) { arr.indexOf(item) === -1 && arr.push(item); } function removeItem(arr, item) { var index = arr.indexOf(item); index > -1 && arr.splice(index, 1); } // Adapted from array-move function moveItem(_a, fromIndex, toIndex) { var _b = __read(_a), arr = _b.slice(0); var startIndex = fromIndex < 0 ? arr.length + fromIndex : fromIndex; if (startIndex >= 0 && startIndex < arr.length) { var endIndex = toIndex < 0 ? arr.length + toIndex : toIndex; var _c = __read(arr.splice(fromIndex, 1), 1), item = _c[0]; arr.splice(endIndex, 0, item); } return arr; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/subscription-manager.mjs var SubscriptionManager = /** @class */ (function () { function SubscriptionManager() { this.subscriptions = []; } SubscriptionManager.prototype.add = function (handler) { var _this = this; addUniqueItem(this.subscriptions, handler); return function () { return removeItem(_this.subscriptions, handler); }; }; SubscriptionManager.prototype.notify = function (a, b, c) { var numSubscriptions = this.subscriptions.length; if (!numSubscriptions) return; if (numSubscriptions === 1) { /** * If there's only a single handler we can just call it without invoking a loop. */ this.subscriptions[0](a, b, c); } else { for (var i = 0; i < numSubscriptions; i++) { /** * Check whether the handler exists before firing as it's possible * the subscriptions were modified during this loop running. */ var handler = this.subscriptions[i]; handler && handler(a, b, c); } } }; SubscriptionManager.prototype.getSize = function () { return this.subscriptions.length; }; SubscriptionManager.prototype.clear = function () { this.subscriptions.length = 0; }; return SubscriptionManager; }()); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/index.mjs var isFloat = function (value) { return !isNaN(parseFloat(value)); }; /** * `MotionValue` is used to track the state and velocity of motion values. * * @public */ var MotionValue = /** @class */ (function () { /** * @param init - The initiating value * @param config - Optional configuration options * * - `transformer`: A function to transform incoming values with. * * @internal */ function MotionValue(init) { var _this = this; /** * Duration, in milliseconds, since last updating frame. * * @internal */ this.timeDelta = 0; /** * Timestamp of the last time this `MotionValue` was updated. * * @internal */ this.lastUpdated = 0; /** * Functions to notify when the `MotionValue` updates. * * @internal */ this.updateSubscribers = new SubscriptionManager(); /** * Functions to notify when the velocity updates. * * @internal */ this.velocityUpdateSubscribers = new SubscriptionManager(); /** * Functions to notify when the `MotionValue` updates and `render` is set to `true`. * * @internal */ this.renderSubscribers = new SubscriptionManager(); /** * Tracks whether this value can output a velocity. Currently this is only true * if the value is numerical, but we might be able to widen the scope here and support * other value types. * * @internal */ this.canTrackVelocity = false; this.updateAndNotify = function (v, render) { if (render === void 0) { render = true; } _this.prev = _this.current; _this.current = v; // Update timestamp var _a = getFrameData(), delta = _a.delta, timestamp = _a.timestamp; if (_this.lastUpdated !== timestamp) { _this.timeDelta = delta; _this.lastUpdated = timestamp; es.postRender(_this.scheduleVelocityCheck); } // Update update subscribers if (_this.prev !== _this.current) { _this.updateSubscribers.notify(_this.current); } // Update velocity subscribers if (_this.velocityUpdateSubscribers.getSize()) { _this.velocityUpdateSubscribers.notify(_this.getVelocity()); } // Update render subscribers if (render) { _this.renderSubscribers.notify(_this.current); } }; /** * Schedule a velocity check for the next frame. * * This is an instanced and bound function to prevent generating a new * function once per frame. * * @internal */ this.scheduleVelocityCheck = function () { return es.postRender(_this.velocityCheck); }; /** * Updates `prev` with `current` if the value hasn't been updated this frame. * This ensures velocity calculations return `0`. * * This is an instanced and bound function to prevent generating a new * function once per frame. * * @internal */ this.velocityCheck = function (_a) { var timestamp = _a.timestamp; if (timestamp !== _this.lastUpdated) { _this.prev = _this.current; _this.velocityUpdateSubscribers.notify(_this.getVelocity()); } }; this.hasAnimated = false; this.prev = this.current = init; this.canTrackVelocity = isFloat(this.current); } /** * Adds a function that will be notified when the `MotionValue` is updated. * * It returns a function that, when called, will cancel the subscription. * * When calling `onChange` inside a React component, it should be wrapped with the * `useEffect` hook. As it returns an unsubscribe function, this should be returned * from the `useEffect` function to ensure you don't add duplicate subscribers.. * * ```jsx * export const MyComponent = () => { * const x = useMotionValue(0) * const y = useMotionValue(0) * const opacity = useMotionValue(1) * * useEffect(() => { * function updateOpacity() { * const maxXY = Math.max(x.get(), y.get()) * const newOpacity = transform(maxXY, [0, 100], [1, 0]) * opacity.set(newOpacity) * } * * const unsubscribeX = x.onChange(updateOpacity) * const unsubscribeY = y.onChange(updateOpacity) * * return () => { * unsubscribeX() * unsubscribeY() * } * }, []) * * return * } * ``` * * @internalremarks * * We could look into a `useOnChange` hook if the above lifecycle management proves confusing. * * ```jsx * useOnChange(x, () => {}) * ``` * * @param subscriber - A function that receives the latest value. * @returns A function that, when called, will cancel this subscription. * * @public */ MotionValue.prototype.onChange = function (subscription) { return this.updateSubscribers.add(subscription); }; MotionValue.prototype.clearListeners = function () { this.updateSubscribers.clear(); }; /** * Adds a function that will be notified when the `MotionValue` requests a render. * * @param subscriber - A function that's provided the latest value. * @returns A function that, when called, will cancel this subscription. * * @internal */ MotionValue.prototype.onRenderRequest = function (subscription) { // Render immediately subscription(this.get()); return this.renderSubscribers.add(subscription); }; /** * Attaches a passive effect to the `MotionValue`. * * @internal */ MotionValue.prototype.attach = function (passiveEffect) { this.passiveEffect = passiveEffect; }; /** * Sets the state of the `MotionValue`. * * @remarks * * ```jsx * const x = useMotionValue(0) * x.set(10) * ``` * * @param latest - Latest value to set. * @param render - Whether to notify render subscribers. Defaults to `true` * * @public */ MotionValue.prototype.set = function (v, render) { if (render === void 0) { render = true; } if (!render || !this.passiveEffect) { this.updateAndNotify(v, render); } else { this.passiveEffect(v, this.updateAndNotify); } }; /** * Returns the latest state of `MotionValue` * * @returns - The latest state of `MotionValue` * * @public */ MotionValue.prototype.get = function () { return this.current; }; /** * @public */ MotionValue.prototype.getPrevious = function () { return this.prev; }; /** * Returns the latest velocity of `MotionValue` * * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical. * * @public */ MotionValue.prototype.getVelocity = function () { // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful return this.canTrackVelocity ? // These casts could be avoided if parseFloat would be typed better velocityPerSecond(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta) : 0; }; /** * Registers a new animation to control this `MotionValue`. Only one * animation can drive a `MotionValue` at one time. * * ```jsx * value.start() * ``` * * @param animation - A function that starts the provided animation * * @internal */ MotionValue.prototype.start = function (animation) { var _this = this; this.stop(); return new Promise(function (resolve) { _this.hasAnimated = true; _this.stopAnimation = animation(resolve); }).then(function () { return _this.clearAnimation(); }); }; /** * Stop the currently active animation. * * @public */ MotionValue.prototype.stop = function () { if (this.stopAnimation) this.stopAnimation(); this.clearAnimation(); }; /** * Returns `true` if this value is currently animating. * * @public */ MotionValue.prototype.isAnimating = function () { return !!this.stopAnimation; }; MotionValue.prototype.clearAnimation = function () { this.stopAnimation = null; }; /** * Destroy and clean up subscribers to this `MotionValue`. * * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually * created a `MotionValue` via the `motionValue` function. * * @public */ MotionValue.prototype.destroy = function () { this.updateSubscribers.clear(); this.renderSubscribers.clear(); this.stop(); }; return MotionValue; }()); /** * @internal */ function motionValue(init) { return new MotionValue(init); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs var isMotionValue = function (value) { return Boolean(value !== null && typeof value === "object" && value.getVelocity); }; ;// CONCATENATED MODULE: ./node_modules/hey-listen/dist/hey-listen.es.js var warning = function () { }; var invariant = function () { }; if (false) {} ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/clamp.mjs const clamp = (min, max, v) => Math.min(Math.max(v, min), max); ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/find-spring.mjs const safeMin = 0.001; const minDuration = 0.01; const maxDuration = 10.0; const minDamping = 0.05; const maxDamping = 1; function findSpring({ duration = 800, bounce = 0.25, velocity = 0, mass = 1, }) { let envelope; let derivative; warning(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less"); let dampingRatio = 1 - bounce; dampingRatio = clamp(minDamping, maxDamping, dampingRatio); duration = clamp(minDuration, maxDuration, duration / 1000); if (dampingRatio < 1) { envelope = (undampedFreq) => { const exponentialDecay = undampedFreq * dampingRatio; const delta = exponentialDecay * duration; const a = exponentialDecay - velocity; const b = calcAngularFreq(undampedFreq, dampingRatio); const c = Math.exp(-delta); return safeMin - (a / b) * c; }; derivative = (undampedFreq) => { const exponentialDecay = undampedFreq * dampingRatio; const delta = exponentialDecay * duration; const d = delta * velocity + velocity; const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration; const f = Math.exp(-delta); const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio); const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1; return (factor * ((d - e) * f)) / g; }; } else { envelope = (undampedFreq) => { const a = Math.exp(-undampedFreq * duration); const b = (undampedFreq - velocity) * duration + 1; return -safeMin + a * b; }; derivative = (undampedFreq) => { const a = Math.exp(-undampedFreq * duration); const b = (velocity - undampedFreq) * (duration * duration); return a * b; }; } const initialGuess = 5 / duration; const undampedFreq = approximateRoot(envelope, derivative, initialGuess); duration = duration * 1000; if (isNaN(undampedFreq)) { return { stiffness: 100, damping: 10, duration, }; } else { const stiffness = Math.pow(undampedFreq, 2) * mass; return { stiffness, damping: dampingRatio * 2 * Math.sqrt(mass * stiffness), duration, }; } } const rootIterations = 12; function approximateRoot(envelope, derivative, initialGuess) { let result = initialGuess; for (let i = 1; i < rootIterations; i++) { result = result - envelope(result) / derivative(result); } return result; } function calcAngularFreq(undampedFreq, dampingRatio) { return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio); } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/spring.mjs const durationKeys = ["duration", "bounce"]; const physicsKeys = ["stiffness", "damping", "mass"]; function isSpringType(options, keys) { return keys.some((key) => options[key] !== undefined); } function getSpringOptions(options) { let springOptions = Object.assign({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options); if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) { const derived = findSpring(options); springOptions = Object.assign(Object.assign(Object.assign({}, springOptions), derived), { velocity: 0.0, mass: 1.0 }); springOptions.isResolvedFromDuration = true; } return springOptions; } function spring(_a) { var { from = 0.0, to = 1.0, restSpeed = 2, restDelta } = _a, options = __rest(_a, ["from", "to", "restSpeed", "restDelta"]); const state = { done: false, value: from }; let { stiffness, damping, mass, velocity, duration, isResolvedFromDuration, } = getSpringOptions(options); let resolveSpring = zero; let resolveVelocity = zero; function createSpring() { const initialVelocity = velocity ? -(velocity / 1000) : 0.0; const initialDelta = to - from; const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass)); const undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000; if (restDelta === undefined) { restDelta = Math.min(Math.abs(to - from) / 100, 0.4); } if (dampingRatio < 1) { const angularFreq = calcAngularFreq(undampedAngularFreq, dampingRatio); resolveSpring = (t) => { const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); return (to - envelope * (((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) / angularFreq) * Math.sin(angularFreq * t) + initialDelta * Math.cos(angularFreq * t))); }; resolveVelocity = (t) => { const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); return (dampingRatio * undampedAngularFreq * envelope * ((Math.sin(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta)) / angularFreq + initialDelta * Math.cos(angularFreq * t)) - envelope * (Math.cos(angularFreq * t) * (initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) - angularFreq * initialDelta * Math.sin(angularFreq * t))); }; } else if (dampingRatio === 1) { resolveSpring = (t) => to - Math.exp(-undampedAngularFreq * t) * (initialDelta + (initialVelocity + undampedAngularFreq * initialDelta) * t); } else { const dampedAngularFreq = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1); resolveSpring = (t) => { const envelope = Math.exp(-dampingRatio * undampedAngularFreq * t); const freqForT = Math.min(dampedAngularFreq * t, 300); return (to - (envelope * ((initialVelocity + dampingRatio * undampedAngularFreq * initialDelta) * Math.sinh(freqForT) + dampedAngularFreq * initialDelta * Math.cosh(freqForT))) / dampedAngularFreq); }; } } createSpring(); return { next: (t) => { const current = resolveSpring(t); if (!isResolvedFromDuration) { const currentVelocity = resolveVelocity(t) * 1000; const isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed; const isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta; state.done = isBelowVelocityThreshold && isBelowDisplacementThreshold; } else { state.done = t >= duration; } state.value = state.done ? to : current; return state; }, flipTarget: () => { velocity = -velocity; [from, to] = [to, from]; createSpring(); }, }; } spring.needsInterpolation = (a, b) => typeof a === "string" || typeof b === "string"; const zero = (_t) => 0; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/progress.mjs const progress = (from, to, value) => { const toFromDifference = to - from; return toFromDifference === 0 ? 1 : (value - from) / toFromDifference; }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/utils.mjs const utils_clamp = (min, max) => (v) => Math.max(Math.min(v, max), min); const sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v); const floatRegex = /(-)?([\d]*\.?[\d])+/g; const colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi; const singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i; function isString(v) { return typeof v === 'string'; } ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/numbers/index.mjs const number = { test: (v) => typeof v === 'number', parse: parseFloat, transform: (v) => v, }; const alpha = Object.assign(Object.assign({}, number), { transform: utils_clamp(0, 1) }); const scale = Object.assign(Object.assign({}, number), { default: 1 }); ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/utils.mjs const isColorString = (type, testProp) => (v) => { return Boolean((isString(v) && singleColorRegex.test(v) && v.startsWith(type)) || (testProp && Object.prototype.hasOwnProperty.call(v, testProp))); }; const splitColor = (aName, bName, cName) => (v) => { if (!isString(v)) return v; const [a, b, c, alpha] = v.match(floatRegex); return { [aName]: parseFloat(a), [bName]: parseFloat(b), [cName]: parseFloat(c), alpha: alpha !== undefined ? parseFloat(alpha) : 1, }; }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/rgba.mjs const clampRgbUnit = utils_clamp(0, 255); const rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) }); const rgba_rgba = { test: isColorString('rgb', 'red'), parse: splitColor('red', 'green', 'blue'), transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => 'rgba(' + rgbUnit.transform(red) + ', ' + rgbUnit.transform(green) + ', ' + rgbUnit.transform(blue) + ', ' + sanitize(alpha.transform(alpha$1)) + ')', }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/hex.mjs function parseHex(v) { let r = ''; let g = ''; let b = ''; let a = ''; if (v.length > 5) { r = v.substr(1, 2); g = v.substr(3, 2); b = v.substr(5, 2); a = v.substr(7, 2); } else { r = v.substr(1, 1); g = v.substr(2, 1); b = v.substr(3, 1); a = v.substr(4, 1); r += r; g += g; b += b; a += a; } return { red: parseInt(r, 16), green: parseInt(g, 16), blue: parseInt(b, 16), alpha: a ? parseInt(a, 16) / 255 : 1, }; } const hex = { test: isColorString('#'), parse: parseHex, transform: rgba_rgba.transform, }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/numbers/units.mjs const createUnitType = (unit) => ({ test: (v) => isString(v) && v.endsWith(unit) && v.split(' ').length === 1, parse: parseFloat, transform: (v) => `${v}${unit}`, }); const degrees = createUnitType('deg'); const percent = createUnitType('%'); const px = createUnitType('px'); const vh = createUnitType('vh'); const vw = createUnitType('vw'); const progressPercentage = Object.assign(Object.assign({}, percent), { parse: (v) => percent.parse(v) / 100, transform: (v) => percent.transform(v * 100) }); ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/hsla.mjs const hsla = { test: isColorString('hsl', 'hue'), parse: splitColor('hue', 'saturation', 'lightness'), transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => { return ('hsla(' + Math.round(hue) + ', ' + percent.transform(sanitize(saturation)) + ', ' + percent.transform(sanitize(lightness)) + ', ' + sanitize(alpha.transform(alpha$1)) + ')'); }, }; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs function hueToRgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; if (t < 1 / 6) return p + (q - p) * 6 * t; if (t < 1 / 2) return q; if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } function hslaToRgba({ hue, saturation, lightness, alpha }) { hue /= 360; saturation /= 100; lightness /= 100; let red = 0; let green = 0; let blue = 0; if (!saturation) { red = green = blue = lightness; } else { const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation; const p = 2 * lightness - q; red = hueToRgb(p, q, hue + 1 / 3); green = hueToRgb(p, q, hue); blue = hueToRgb(p, q, hue - 1 / 3); } return { red: Math.round(red * 255), green: Math.round(green * 255), blue: Math.round(blue * 255), alpha, }; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix-color.mjs const mixLinearColor = (from, to, v) => { const fromExpo = from * from; const toExpo = to * to; return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo)); }; const colorTypes = [hex, rgba_rgba, hsla]; const getColorType = (v) => colorTypes.find((type) => type.test(v)); const notAnimatable = (color) => `'${color}' is not an animatable color. Use the equivalent color code instead.`; const mixColor = (from, to) => { let fromColorType = getColorType(from); let toColorType = getColorType(to); invariant(!!fromColorType, notAnimatable(from)); invariant(!!toColorType, notAnimatable(to)); let fromColor = fromColorType.parse(from); let toColor = toColorType.parse(to); if (fromColorType === hsla) { fromColor = hslaToRgba(fromColor); fromColorType = rgba_rgba; } if (toColorType === hsla) { toColor = hslaToRgba(toColor); toColorType = rgba_rgba; } const blended = Object.assign({}, fromColor); return (v) => { for (const key in blended) { if (key !== "alpha") { blended[key] = mixLinearColor(fromColor[key], toColor[key], v); } } blended.alpha = mix(fromColor.alpha, toColor.alpha, v); return fromColorType.transform(blended); }; }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/color/index.mjs const color = { test: (v) => rgba_rgba.test(v) || hex.test(v) || hsla.test(v), parse: (v) => { if (rgba_rgba.test(v)) { return rgba_rgba.parse(v); } else if (hsla.test(v)) { return hsla.parse(v); } else { return hex.parse(v); } }, transform: (v) => { return isString(v) ? v : v.hasOwnProperty('red') ? rgba_rgba.transform(v) : hsla.transform(v); }, }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/complex/index.mjs const colorToken = '${c}'; const numberToken = '${n}'; function test(v) { var _a, _b, _c, _d; return (isNaN(v) && isString(v) && ((_b = (_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0); } function analyse(v) { if (typeof v === 'number') v = `${v}`; const values = []; let numColors = 0; const colors = v.match(colorRegex); if (colors) { numColors = colors.length; v = v.replace(colorRegex, colorToken); values.push(...colors.map(color.parse)); } const numbers = v.match(floatRegex); if (numbers) { v = v.replace(floatRegex, numberToken); values.push(...numbers.map(number.parse)); } return { values, numColors, tokenised: v }; } function complex_parse(v) { return analyse(v).values; } function createTransformer(v) { const { values, numColors, tokenised } = analyse(v); const numValues = values.length; return (v) => { let output = tokenised; for (let i = 0; i < numValues; i++) { output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? color.transform(v[i]) : sanitize(v[i])); } return output; }; } const convertNumbersToZero = (v) => typeof v === 'number' ? 0 : v; function getAnimatableNone(v) { const parsed = complex_parse(v); const transformer = createTransformer(v); return transformer(parsed.map(convertNumbersToZero)); } const complex = { test, parse: complex_parse, createTransformer, getAnimatableNone }; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/inc.mjs const zeroPoint = { x: 0, y: 0, z: 0 }; const isNum = (v) => typeof v === 'number'; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/pipe.mjs const combineFunctions = (a, b) => (v) => b(a(v)); const pipe = (...transformers) => transformers.reduce(combineFunctions); ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/mix-complex.mjs function getMixer(origin, target) { if (isNum(origin)) { return (v) => mix(origin, target, v); } else if (color.test(origin)) { return mixColor(origin, target); } else { return mixComplex(origin, target); } } const mixArray = (from, to) => { const output = [...from]; const numValues = output.length; const blendValue = from.map((fromThis, i) => getMixer(fromThis, to[i])); return (v) => { for (let i = 0; i < numValues; i++) { output[i] = blendValue[i](v); } return output; }; }; const mixObject = (origin, target) => { const output = Object.assign(Object.assign({}, origin), target); const blendValue = {}; for (const key in output) { if (origin[key] !== undefined && target[key] !== undefined) { blendValue[key] = getMixer(origin[key], target[key]); } } return (v) => { for (const key in blendValue) { output[key] = blendValue[key](v); } return output; }; }; function mix_complex_analyse(value) { const parsed = complex.parse(value); const numValues = parsed.length; let numNumbers = 0; let numRGB = 0; let numHSL = 0; for (let i = 0; i < numValues; i++) { if (numNumbers || typeof parsed[i] === "number") { numNumbers++; } else { if (parsed[i].hue !== undefined) { numHSL++; } else { numRGB++; } } } return { parsed, numNumbers, numRGB, numHSL }; } const mixComplex = (origin, target) => { const template = complex.createTransformer(target); const originStats = mix_complex_analyse(origin); const targetStats = mix_complex_analyse(target); const canInterpolate = originStats.numHSL === targetStats.numHSL && originStats.numRGB === targetStats.numRGB && originStats.numNumbers >= targetStats.numNumbers; if (canInterpolate) { return pipe(mixArray(originStats.parsed, targetStats.parsed), template); } else { warning(true, `Complex values '${origin}' and '${target}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`); return (p) => `${p > 0 ? target : origin}`; } }; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/interpolate.mjs const mixNumber = (from, to) => (p) => mix(from, to, p); function detectMixerFactory(v) { if (typeof v === 'number') { return mixNumber; } else if (typeof v === 'string') { if (color.test(v)) { return mixColor; } else { return mixComplex; } } else if (Array.isArray(v)) { return mixArray; } else if (typeof v === 'object') { return mixObject; } } function createMixers(output, ease, customMixer) { const mixers = []; const mixerFactory = customMixer || detectMixerFactory(output[0]); const numMixers = output.length - 1; for (let i = 0; i < numMixers; i++) { let mixer = mixerFactory(output[i], output[i + 1]); if (ease) { const easingFunction = Array.isArray(ease) ? ease[i] : ease; mixer = pipe(easingFunction, mixer); } mixers.push(mixer); } return mixers; } function fastInterpolate([from, to], [mixer]) { return (v) => mixer(progress(from, to, v)); } function slowInterpolate(input, mixers) { const inputLength = input.length; const lastInputIndex = inputLength - 1; return (v) => { let mixerIndex = 0; let foundMixerIndex = false; if (v <= input[0]) { foundMixerIndex = true; } else if (v >= input[lastInputIndex]) { mixerIndex = lastInputIndex - 1; foundMixerIndex = true; } if (!foundMixerIndex) { let i = 1; for (; i < inputLength; i++) { if (input[i] > v || i === lastInputIndex) { break; } } mixerIndex = i - 1; } const progressInRange = progress(input[mixerIndex], input[mixerIndex + 1], v); return mixers[mixerIndex](progressInRange); }; } function interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) { const inputLength = input.length; invariant(inputLength === output.length, 'Both input and output ranges must be the same length'); invariant(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.'); if (input[0] > input[inputLength - 1]) { input = [].concat(input); output = [].concat(output); input.reverse(); output.reverse(); } const mixers = createMixers(output, ease, mixer); const interpolator = inputLength === 2 ? fastInterpolate(input, mixers) : slowInterpolate(input, mixers); return isClamp ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v)) : interpolator; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/utils.mjs const reverseEasing = easing => p => 1 - easing(1 - p); const mirrorEasing = easing => p => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2; const createExpoIn = (power) => p => Math.pow(p, power); const createBackIn = (power) => p => p * p * ((power + 1) * p - power); const createAnticipate = (power) => { const backEasing = createBackIn(power); return p => (p *= 2) < 1 ? 0.5 * backEasing(p) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); }; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/index.mjs const DEFAULT_OVERSHOOT_STRENGTH = 1.525; const BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0; const BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0; const BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0; const linear = p => p; const easeIn = createExpoIn(2); const easeOut = reverseEasing(easeIn); const easeInOut = mirrorEasing(easeIn); const circIn = p => 1 - Math.sin(Math.acos(p)); const circOut = reverseEasing(circIn); const circInOut = mirrorEasing(circOut); const backIn = createBackIn(DEFAULT_OVERSHOOT_STRENGTH); const backOut = reverseEasing(backIn); const backInOut = mirrorEasing(backIn); const anticipate = createAnticipate(DEFAULT_OVERSHOOT_STRENGTH); const ca = 4356.0 / 361.0; const cb = 35442.0 / 1805.0; const cc = 16061.0 / 1805.0; const bounceOut = (p) => { if (p === 1 || p === 0) return p; const p2 = p * p; return p < BOUNCE_FIRST_THRESHOLD ? 7.5625 * p2 : p < BOUNCE_SECOND_THRESHOLD ? 9.075 * p2 - 9.9 * p + 3.4 : p < BOUNCE_THIRD_THRESHOLD ? ca * p2 - cb * p + cc : 10.8 * p * p - 20.52 * p + 10.72; }; const bounceIn = reverseEasing(bounceOut); const bounceInOut = (p) => p < 0.5 ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0)) : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/keyframes.mjs function defaultEasing(values, easing) { return values.map(() => easing || easeInOut).splice(0, values.length - 1); } function defaultOffset(values) { const numValues = values.length; return values.map((_value, i) => i !== 0 ? i / (numValues - 1) : 0); } function convertOffsetToTimes(offset, duration) { return offset.map((o) => o * duration); } function keyframes_keyframes({ from = 0, to = 1, ease, offset, duration = 300, }) { const state = { done: false, value: from }; const values = Array.isArray(to) ? to : [from, to]; const times = convertOffsetToTimes(offset && offset.length === values.length ? offset : defaultOffset(values), duration); function createInterpolator() { return interpolate(times, values, { ease: Array.isArray(ease) ? ease : defaultEasing(values, ease), }); } let interpolator = createInterpolator(); return { next: (t) => { state.value = interpolator(t); state.done = t >= duration; return state; }, flipTarget: () => { values.reverse(); interpolator = createInterpolator(); }, }; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/generators/decay.mjs function decay({ velocity = 0, from = 0, power = 0.8, timeConstant = 350, restDelta = 0.5, modifyTarget, }) { const state = { done: false, value: from }; let amplitude = power * velocity; const ideal = from + amplitude; const target = modifyTarget === undefined ? ideal : modifyTarget(ideal); if (target !== ideal) amplitude = target - from; return { next: (t) => { const delta = -amplitude * Math.exp(-t / timeConstant); state.done = !(delta > restDelta || delta < -restDelta); state.value = state.done ? target : target + delta; return state; }, flipTarget: () => { }, }; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs const types = { keyframes: keyframes_keyframes, spring: spring, decay: decay }; function detectAnimationFromOptions(config) { if (Array.isArray(config.to)) { return keyframes_keyframes; } else if (types[config.type]) { return types[config.type]; } const keys = new Set(Object.keys(config)); if (keys.has("ease") || (keys.has("duration") && !keys.has("dampingRatio"))) { return keyframes_keyframes; } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) { return spring; } return keyframes_keyframes; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/utils/elapsed.mjs function loopElapsed(elapsed, duration, delay = 0) { return elapsed - duration - delay; } function reverseElapsed(elapsed, duration, delay = 0, isForwardPlayback = true) { return isForwardPlayback ? loopElapsed(duration + -elapsed, duration, delay) : duration - (elapsed - duration) + delay; } function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) { return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/index.mjs const framesync = (update) => { const passTimestamp = ({ delta }) => update(delta); return { start: () => es.update(passTimestamp, true), stop: () => cancelSync.update(passTimestamp), }; }; function animate(_a) { var _b, _c; var { from, autoplay = true, driver = framesync, elapsed = 0, repeat: repeatMax = 0, repeatType = "loop", repeatDelay = 0, onPlay, onStop, onComplete, onRepeat, onUpdate } = _a, options = __rest(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]); let { to } = options; let driverControls; let repeatCount = 0; let computedDuration = options.duration; let latest; let isComplete = false; let isForwardPlayback = true; let interpolateFromNumber; const animator = detectAnimationFromOptions(options); if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) { interpolateFromNumber = interpolate([0, 100], [from, to], { clamp: false, }); from = 0; to = 100; } const animation = animator(Object.assign(Object.assign({}, options), { from, to })); function repeat() { repeatCount++; if (repeatType === "reverse") { isForwardPlayback = repeatCount % 2 === 0; elapsed = reverseElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback); } else { elapsed = loopElapsed(elapsed, computedDuration, repeatDelay); if (repeatType === "mirror") animation.flipTarget(); } isComplete = false; onRepeat && onRepeat(); } function complete() { driverControls.stop(); onComplete && onComplete(); } function update(delta) { if (!isForwardPlayback) delta = -delta; elapsed += delta; if (!isComplete) { const state = animation.next(Math.max(0, elapsed)); latest = state.value; if (interpolateFromNumber) latest = interpolateFromNumber(latest); isComplete = isForwardPlayback ? state.done : elapsed <= 0; } onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest); if (isComplete) { if (repeatCount === 0) computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed); if (repeatCount < repeatMax) { hasRepeatDelayElapsed(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat(); } else { complete(); } } } function play() { onPlay === null || onPlay === void 0 ? void 0 : onPlay(); driverControls = driver(update); driverControls.start(); } autoplay && play(); return { stop: () => { onStop === null || onStop === void 0 ? void 0 : onStop(); driverControls.stop(); }, }; } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/animations/inertia.mjs function inertia({ from = 0, velocity = 0, min, max, power = 0.8, timeConstant = 750, bounceStiffness = 500, bounceDamping = 10, restDelta = 1, modifyTarget, driver, onUpdate, onComplete, onStop, }) { let currentAnimation; function isOutOfBounds(v) { return (min !== undefined && v < min) || (max !== undefined && v > max); } function boundaryNearest(v) { if (min === undefined) return max; if (max === undefined) return min; return Math.abs(min - v) < Math.abs(max - v) ? min : max; } function startAnimation(options) { currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); currentAnimation = animate(Object.assign(Object.assign({}, options), { driver, onUpdate: (v) => { var _a; onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v); (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v); }, onComplete, onStop })); } function startSpring(options) { startAnimation(Object.assign({ type: "spring", stiffness: bounceStiffness, damping: bounceDamping, restDelta }, options)); } if (isOutOfBounds(from)) { startSpring({ from, velocity, to: boundaryNearest(from) }); } else { let target = power * velocity + from; if (typeof modifyTarget !== "undefined") target = modifyTarget(target); const boundary = boundaryNearest(target); const heading = boundary === min ? -1 : 1; let prev; let current; const checkBoundary = (v) => { prev = current; current = v; velocity = velocityPerSecond(v - prev, getFrameData().delta); if ((heading === 1 && v > boundary) || (heading === -1 && v < boundary)) { startSpring({ from: v, to: boundary, velocity }); } }; startAnimation({ type: "decay", from, velocity, timeConstant, power, restDelta, modifyTarget, onUpdate: isOutOfBounds(target) ? checkBoundary : undefined, }); } return { stop: () => currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(), }; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/time-conversion.mjs /** * Converts seconds to milliseconds * * @param seconds - Time in seconds. * @return milliseconds - Converted time in milliseconds. */ var secondsToMilliseconds = function (seconds) { return seconds * 1000; }; ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/easing/cubic-bezier.mjs const cubic_bezier_a = (a1, a2) => 1.0 - 3.0 * a2 + 3.0 * a1; const cubic_bezier_b = (a1, a2) => 3.0 * a2 - 6.0 * a1; const cubic_bezier_c = (a1) => 3.0 * a1; const calcBezier = (t, a1, a2) => ((cubic_bezier_a(a1, a2) * t + cubic_bezier_b(a1, a2)) * t + cubic_bezier_c(a1)) * t; const getSlope = (t, a1, a2) => 3.0 * cubic_bezier_a(a1, a2) * t * t + 2.0 * cubic_bezier_b(a1, a2) * t + cubic_bezier_c(a1); const subdivisionPrecision = 0.0000001; const subdivisionMaxIterations = 10; function binarySubdivide(aX, aA, aB, mX1, mX2) { let currentX; let currentT; let i = 0; do { currentT = aA + (aB - aA) / 2.0; currentX = calcBezier(currentT, mX1, mX2) - aX; if (currentX > 0.0) { aB = currentT; } else { aA = currentT; } } while (Math.abs(currentX) > subdivisionPrecision && ++i < subdivisionMaxIterations); return currentT; } const newtonIterations = 8; const newtonMinSlope = 0.001; function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { for (let i = 0; i < newtonIterations; ++i) { const currentSlope = getSlope(aGuessT, mX1, mX2); if (currentSlope === 0.0) { return aGuessT; } const currentX = calcBezier(aGuessT, mX1, mX2) - aX; aGuessT -= currentX / currentSlope; } return aGuessT; } const kSplineTableSize = 11; const kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); function cubicBezier(mX1, mY1, mX2, mY2) { if (mX1 === mY1 && mX2 === mY2) return linear; const sampleValues = new Float32Array(kSplineTableSize); for (let i = 0; i < kSplineTableSize; ++i) { sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); } function getTForX(aX) { let intervalStart = 0.0; let currentSample = 1; const lastSample = kSplineTableSize - 1; for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) { intervalStart += kSampleStepSize; } --currentSample; const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]); const guessForT = intervalStart + dist * kSampleStepSize; const initialSlope = getSlope(guessForT, mX1, mX2); if (initialSlope >= newtonMinSlope) { return newtonRaphsonIterate(aX, guessForT, mX1, mX2); } else if (initialSlope === 0.0) { return guessForT; } else { return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); } } return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/easing.mjs var easingLookup = { linear: linear, easeIn: easeIn, easeInOut: easeInOut, easeOut: easeOut, circIn: circIn, circInOut: circInOut, circOut: circOut, backIn: backIn, backInOut: backInOut, backOut: backOut, anticipate: anticipate, bounceIn: bounceIn, bounceInOut: bounceInOut, bounceOut: bounceOut, }; var easingDefinitionToFunction = function (definition) { if (Array.isArray(definition)) { // If cubic bezier definition, create bezier curve invariant(definition.length === 4, "Cubic bezier arrays must contain four numerical values."); var _a = tslib_es6_read(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3]; return cubicBezier(x1, y1, x2, y2); } else if (typeof definition === "string") { // Else lookup from table invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'")); return easingLookup[definition]; } return definition; }; var isEasingArray = function (ease) { return Array.isArray(ease) && typeof ease[0] !== "number"; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs /** * Check if a value is animatable. Examples: * * ✅: 100, "100px", "#fff" * ❌: "block", "url(2.jpg)" * @param value * * @internal */ var isAnimatable = function (key, value) { // If the list of keys tat might be non-animatable grows, replace with Set if (key === "zIndex") return false; // If it's a number or a keyframes array, we can animate it. We might at some point // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this, // but for now lets leave it like this for performance reasons if (typeof value === "number" || Array.isArray(value)) return true; if (typeof value === "string" && // It's animatable if we have a string complex.test(value) && // And it contains numbers and/or colors !value.startsWith("url(") // Unless it starts with "url(" ) { return true; } return false; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs var isKeyframesTarget = function (v) { return Array.isArray(v); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs var underDampedSpring = function () { return ({ type: "spring", stiffness: 500, damping: 25, restSpeed: 10, }); }; var criticallyDampedSpring = function (to) { return ({ type: "spring", stiffness: 550, damping: to === 0 ? 2 * Math.sqrt(550) : 30, restSpeed: 10, }); }; var linearTween = function () { return ({ type: "keyframes", ease: "linear", duration: 0.3, }); }; var default_transitions_keyframes = function (values) { return ({ type: "keyframes", duration: 0.8, values: values, }); }; var defaultTransitions = { x: underDampedSpring, y: underDampedSpring, z: underDampedSpring, rotate: underDampedSpring, rotateX: underDampedSpring, rotateY: underDampedSpring, rotateZ: underDampedSpring, scaleX: criticallyDampedSpring, scaleY: criticallyDampedSpring, scale: criticallyDampedSpring, opacity: linearTween, backgroundColor: linearTween, color: linearTween, default: criticallyDampedSpring, }; var getDefaultTransition = function (valueKey, to) { var transitionFactory; if (isKeyframesTarget(to)) { transitionFactory = default_transitions_keyframes; } else { transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default; } return __assign({ to: to }, transitionFactory(to)); }; ;// CONCATENATED MODULE: ./node_modules/style-value-types/dist/es/complex/filter.mjs const maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']); function applyDefaultFilter(v) { let [name, value] = v.slice(0, -1).split('('); if (name === 'drop-shadow') return v; const [number] = value.match(floatRegex) || []; if (!number) return v; const unit = value.replace(number, ''); let defaultValue = maxDefaults.has(name) ? 1 : 0; if (number !== value) defaultValue *= 100; return name + '(' + defaultValue + unit + ')'; } const functionRegex = /([a-z-]*)\(.*?\)/g; const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v) => { const functions = v.match(functionRegex); return functions ? functions.map(applyDefaultFilter).join(' ') : v; } }); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs var type_int_int = __assign(__assign({}, number), { transform: Math.round }); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs var numberValueTypes = { // Border props borderWidth: px, borderTopWidth: px, borderRightWidth: px, borderBottomWidth: px, borderLeftWidth: px, borderRadius: px, radius: px, borderTopLeftRadius: px, borderTopRightRadius: px, borderBottomRightRadius: px, borderBottomLeftRadius: px, // Positioning props width: px, maxWidth: px, height: px, maxHeight: px, size: px, top: px, right: px, bottom: px, left: px, // Spacing props padding: px, paddingTop: px, paddingRight: px, paddingBottom: px, paddingLeft: px, margin: px, marginTop: px, marginRight: px, marginBottom: px, marginLeft: px, // Transform props rotate: degrees, rotateX: degrees, rotateY: degrees, rotateZ: degrees, scale: scale, scaleX: scale, scaleY: scale, scaleZ: scale, skew: degrees, skewX: degrees, skewY: degrees, distance: px, translateX: px, translateY: px, translateZ: px, x: px, y: px, z: px, perspective: px, transformPerspective: px, opacity: alpha, originX: progressPercentage, originY: progressPercentage, originZ: px, // Misc zIndex: type_int_int, // SVG fillOpacity: alpha, strokeOpacity: alpha, numOctaves: type_int_int, }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs /** * A map of default value types for common values */ var defaultValueTypes = __assign(__assign({}, numberValueTypes), { // Color props color: color, backgroundColor: color, outlineColor: color, fill: color, stroke: color, // Border props borderColor: color, borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, filter: filter, WebkitFilter: filter }); /** * Gets the default ValueType for the provided value key */ var getDefaultValueType = function (key) { return defaultValueTypes[key]; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs function animatable_none_getAnimatableNone(key, value) { var _a; var defaultValueType = getDefaultValueType(key); if (defaultValueType !== filter) defaultValueType = complex; // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs var instantAnimationState = { current: false, }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/resolve-value.mjs var isCustomValue = function (v) { return Boolean(v && typeof v === "object" && v.mix && v.toValue); }; var resolveFinalValueInKeyframes = function (v) { // TODO maybe throw if v.length - 1 is placeholder token? return isKeyframesTarget(v) ? v[v.length - 1] || 0 : v; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/transitions.mjs /** * Decide whether a transition is defined on a given Transition. * This filters out orchestration options and returns true * if any options are left. */ function isTransitionDefined(_a) { _a.when; _a.delay; _a.delayChildren; _a.staggerChildren; _a.staggerDirection; _a.repeat; _a.repeatType; _a.repeatDelay; _a.from; var transition = __rest(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]); return !!Object.keys(transition).length; } var legacyRepeatWarning = false; /** * Convert Framer Motion's Transition type into Popmotion-compatible options. */ function convertTransitionToAnimationOptions(_a) { var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = __rest(_a, ["ease", "times", "yoyo", "flip", "loop"]); var options = __assign({}, transition); if (times) options["offset"] = times; /** * Convert any existing durations from seconds to milliseconds */ if (transition.duration) options["duration"] = secondsToMilliseconds(transition.duration); if (transition.repeatDelay) options.repeatDelay = secondsToMilliseconds(transition.repeatDelay); /** * Map easing names to Popmotion's easing functions */ if (ease) { options["ease"] = isEasingArray(ease) ? ease.map(easingDefinitionToFunction) : easingDefinitionToFunction(ease); } /** * Support legacy transition API */ if (transition.type === "tween") options.type = "keyframes"; /** * TODO: These options are officially removed from the API. */ if (yoyo || loop || flip) { warning(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."); legacyRepeatWarning = true; if (yoyo) { options.repeatType = "reverse"; } else if (loop) { options.repeatType = "loop"; } else if (flip) { options.repeatType = "mirror"; } options.repeat = loop || yoyo || flip || transition.repeat; } /** * TODO: Popmotion 9 has the ability to automatically detect whether to use * a keyframes or spring animation, but does so by detecting velocity and other spring options. * It'd be good to introduce a similar thing here. */ if (transition.type !== "spring") options.type = "keyframes"; return options; } /** * Get the delay for a value by checking Transition with decreasing specificity. */ function getDelayFromTransition(transition, key) { var _a, _b; var valueTransition = getValueTransition(transition, key) || {}; return (_b = (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : transition.delay) !== null && _b !== void 0 ? _b : 0; } function hydrateKeyframes(options) { if (Array.isArray(options.to) && options.to[0] === null) { options.to = tslib_es6_spreadArray([], tslib_es6_read(options.to), false); options.to[0] = options.from; } return options; } function getPopmotionAnimationOptions(transition, options, key) { var _a; if (Array.isArray(options.to)) { (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8); } hydrateKeyframes(options); /** * Get a default transition if none is determined to be defined. */ if (!isTransitionDefined(transition)) { transition = __assign(__assign({}, transition), getDefaultTransition(key, options.to)); } return __assign(__assign({}, options), convertTransitionToAnimationOptions(transition)); } /** * */ function getAnimation(key, value, target, transition, onComplete) { var _a; var valueTransition = getValueTransition(transition, key); var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get(); var isTargetAnimatable = isAnimatable(key, target); if (origin === "none" && isTargetAnimatable && typeof target === "string") { /** * If we're trying to animate from "none", try and get an animatable version * of the target. This could be improved to work both ways. */ origin = animatable_none_getAnimatableNone(key, target); } else if (isZero(origin) && typeof target === "string") { origin = getZeroUnit(target); } else if (!Array.isArray(target) && isZero(target) && typeof origin === "string") { target = getZeroUnit(origin); } var isOriginAnimatable = isAnimatable(key, origin); warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property.")); function start() { var options = { from: origin, to: target, velocity: value.getVelocity(), onComplete: onComplete, onUpdate: function (v) { return value.set(v); }, }; return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign(__assign({}, options), valueTransition)) : animate(__assign(__assign({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) { var _a; options.onUpdate(v); (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v); }, onComplete: function () { var _a; options.onComplete(); (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition); } })); } function set() { var _a, _b; var finalTarget = resolveFinalValueInKeyframes(target); value.set(finalTarget); onComplete(); (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, finalTarget); (_b = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _b === void 0 ? void 0 : _b.call(valueTransition); return { stop: function () { } }; } return !isOriginAnimatable || !isTargetAnimatable || valueTransition.type === false ? set : start; } function isZero(value) { return (value === 0 || (typeof value === "string" && parseFloat(value) === 0 && value.indexOf(" ") === -1)); } function getZeroUnit(potentialUnitType) { return typeof potentialUnitType === "number" ? 0 : animatable_none_getAnimatableNone("", potentialUnitType); } function getValueTransition(transition, key) { return transition[key] || transition["default"] || transition; } /** * Start animation on a MotionValue. This function is an interface between * Framer Motion and Popmotion * * @internal */ function startAnimation(key, value, target, transition) { if (transition === void 0) { transition = {}; } if (instantAnimationState.current) { transition = { type: false }; } return value.start(function (onComplete) { var delayTimer; var controls; var animation = getAnimation(key, value, target, transition, onComplete); var delay = getDelayFromTransition(transition, key); var start = function () { return (controls = animation()); }; if (delay) { delayTimer = window.setTimeout(start, secondsToMilliseconds(delay)); } else { start(); } return function () { clearTimeout(delayTimer); controls === null || controls === void 0 ? void 0 : controls.stop(); }; }); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/animate.mjs /** * Animate a single value or a `MotionValue`. * * The first argument is either a `MotionValue` to animate, or an initial animation value. * * The second is either a value to animate to, or an array of keyframes to animate through. * * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`. * * Returns `AnimationPlaybackControls`, currently just a `stop` method. * * ```javascript * const x = useMotionValue(0) * * useEffect(() => { * const controls = animate(x, 100, { * type: "spring", * stiffness: 2000, * onComplete: v => {} * }) * * return controls.stop * }) * ``` * * @public */ function animate_animate(from, to, transition) { if (transition === void 0) { transition = {}; } var value = isMotionValue(from) ? from : motionValue(from); startAnimation("", value, to, transition); return { stop: function () { return value.stop(); }, isAnimating: function () { return value.isAnimating(); }, }; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"]; var numBorders = borders.length; var asNumber = function (value) { return typeof value === "string" ? parseFloat(value) : value; }; var isPx = function (value) { return typeof value === "number" || px.test(value); }; function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnlyMember) { var _a, _b, _c, _d; if (shouldCrossfadeOpacity) { target.opacity = mix(0, // (follow?.opacity as number) ?? 0, // TODO Reinstate this if only child (_a = lead.opacity) !== null && _a !== void 0 ? _a : 1, easeCrossfadeIn(progress)); target.opacityExit = mix((_b = follow.opacity) !== null && _b !== void 0 ? _b : 1, 0, easeCrossfadeOut(progress)); } else if (isOnlyMember) { target.opacity = mix((_c = follow.opacity) !== null && _c !== void 0 ? _c : 1, (_d = lead.opacity) !== null && _d !== void 0 ? _d : 1, progress); } /** * Mix border radius */ for (var i = 0; i < numBorders; i++) { var borderLabel = "border".concat(borders[i], "Radius"); var followRadius = getRadius(follow, borderLabel); var leadRadius = getRadius(lead, borderLabel); if (followRadius === undefined && leadRadius === undefined) continue; followRadius || (followRadius = 0); leadRadius || (leadRadius = 0); var canMix = followRadius === 0 || leadRadius === 0 || isPx(followRadius) === isPx(leadRadius); if (canMix) { target[borderLabel] = Math.max(mix(asNumber(followRadius), asNumber(leadRadius), progress), 0); if (percent.test(leadRadius) || percent.test(followRadius)) { target[borderLabel] += "%"; } } else { target[borderLabel] = leadRadius; } } /** * Mix rotation */ if (follow.rotate || lead.rotate) { target.rotate = mix(follow.rotate || 0, lead.rotate || 0, progress); } } function getRadius(values, radiusName) { var _a; return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius; } // /** // * We only want to mix the background color if there's a follow element // * that we're not crossfading opacity between. For instance with switch // * AnimateSharedLayout animations, this helps the illusion of a continuous // * element being animated but also cuts down on the number of paints triggered // * for elements where opacity is doing that work for us. // */ // if ( // !hasFollowElement && // latestLeadValues.backgroundColor && // latestFollowValues.backgroundColor // ) { // /** // * This isn't ideal performance-wise as mixColor is creating a new function every frame. // * We could probably create a mixer that runs at the start of the animation but // * the idea behind the crossfader is that it runs dynamically between two potentially // * changing targets (ie opacity or borderRadius may be animating independently via variants) // */ // leadState.backgroundColor = followState.backgroundColor = mixColor( // latestFollowValues.backgroundColor as string, // latestLeadValues.backgroundColor as string // )(p) // } var easeCrossfadeIn = compress(0, 0.5, circOut); var easeCrossfadeOut = compress(0.5, 0.95, linear); function compress(min, max, easing) { return function (p) { // Could replace ifs with clamp if (p < min) return 0; if (p > max) return 1; return easing(progress(min, max, p)); }; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/copy.mjs /** * Reset an axis to the provided origin box. * * This is a mutative operation. */ function copyAxisInto(axis, originAxis) { axis.min = originAxis.min; axis.max = originAxis.max; } /** * Reset a box to the provided origin box. * * This is a mutative operation. */ function copyBoxInto(box, originBox) { copyAxisInto(box.x, originBox.x); copyAxisInto(box.y, originBox.y); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs function isIdentityScale(scale) { return scale === undefined || scale === 1; } function hasScale(_a) { var scale = _a.scale, scaleX = _a.scaleX, scaleY = _a.scaleY; return (!isIdentityScale(scale) || !isIdentityScale(scaleX) || !isIdentityScale(scaleY)); } function hasTransform(values) { return (hasScale(values) || hasTranslate(values.x) || hasTranslate(values.y) || values.z || values.rotate || values.rotateX || values.rotateY); } function hasTranslate(value) { return value && value !== "0%"; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs /** * Scales a point based on a factor and an originPoint */ function scalePoint(point, scale, originPoint) { var distanceFromOrigin = point - originPoint; var scaled = scale * distanceFromOrigin; return originPoint + scaled; } /** * Applies a translate/scale delta to a point */ function applyPointDelta(point, translate, scale, originPoint, boxScale) { if (boxScale !== undefined) { point = scalePoint(point, boxScale, originPoint); } return scalePoint(point, scale, originPoint) + translate; } /** * Applies a translate/scale delta to an axis */ function applyAxisDelta(axis, translate, scale, originPoint, boxScale) { if (translate === void 0) { translate = 0; } if (scale === void 0) { scale = 1; } axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale); axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale); } /** * Applies a translate/scale delta to a box */ function applyBoxDelta(box, _a) { var x = _a.x, y = _a.y; applyAxisDelta(box.x, x.translate, x.scale, x.originPoint); applyAxisDelta(box.y, y.translate, y.scale, y.originPoint); } /** * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms * in a tree upon our box before then calculating how to project it into our desired viewport-relative box * * This is the final nested loop within updateLayoutDelta for future refactoring */ function applyTreeDeltas(box, treeScale, treePath, isSharedTransition) { var _a, _b; if (isSharedTransition === void 0) { isSharedTransition = false; } var treeLength = treePath.length; if (!treeLength) return; // Reset the treeScale treeScale.x = treeScale.y = 1; var node; var delta; for (var i = 0; i < treeLength; i++) { node = treePath[i]; delta = node.projectionDelta; if (((_b = (_a = node.instance) === null || _a === void 0 ? void 0 : _a.style) === null || _b === void 0 ? void 0 : _b.display) === "contents") continue; if (isSharedTransition && node.options.layoutScroll && node.scroll && node !== node.root) { transformBox(box, { x: -node.scroll.x, y: -node.scroll.y }); } if (delta) { // Incoporate each ancestor's scale into a culmulative treeScale for this component treeScale.x *= delta.x.scale; treeScale.y *= delta.y.scale; // Apply each ancestor's calculated delta into this component's recorded layout box applyBoxDelta(box, delta); } if (isSharedTransition && hasTransform(node.latestValues)) { transformBox(box, node.latestValues); } } } function translateAxis(axis, distance) { axis.min = axis.min + distance; axis.max = axis.max + distance; } /** * Apply a transform to an axis from the latest resolved motion values. * This function basically acts as a bridge between a flat motion value map * and applyAxisDelta */ function transformAxis(axis, transforms, _a) { var _b = tslib_es6_read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2]; var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5; var originPoint = mix(axis.min, axis.max, axisOrigin); // Apply the axis delta to the final axis applyAxisDelta(axis, transforms[key], transforms[scaleKey], originPoint, transforms.scale); } /** * The names of the motion values we want to apply as translation, scale and origin. */ var xKeys = ["x", "scaleX", "originX"]; var yKeys = ["y", "scaleY", "originY"]; /** * Apply a transform to a box from the latest resolved motion values. */ function transformBox(box, transform) { transformAxis(box.x, transform, xKeys); transformAxis(box.y, transform, yKeys); } ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/is-point.mjs const isPoint = (point) => point.hasOwnProperty('x') && point.hasOwnProperty('y'); ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/is-point-3d.mjs const isPoint3D = (point) => isPoint(point) && point.hasOwnProperty('z'); ;// CONCATENATED MODULE: ./node_modules/popmotion/dist/es/utils/distance.mjs const distance1D = (a, b) => Math.abs(a - b); function distance(a, b) { if (isNum(a) && isNum(b)) { return distance1D(a, b); } else if (isPoint(a) && isPoint(b)) { const xDelta = distance1D(a.x, b.x); const yDelta = distance1D(a.y, b.y); const zDelta = isPoint3D(a) && isPoint3D(b) ? distance1D(a.z, b.z) : 0; return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2)); } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs function calcLength(axis) { return axis.max - axis.min; } function isNear(value, target, maxDistance) { if (target === void 0) { target = 0; } if (maxDistance === void 0) { maxDistance = 0.01; } return distance(value, target) < maxDistance; } function calcAxisDelta(delta, source, target, origin) { if (origin === void 0) { origin = 0.5; } delta.origin = origin; delta.originPoint = mix(source.min, source.max, delta.origin); delta.scale = calcLength(target) / calcLength(source); if (isNear(delta.scale, 1, 0.0001) || isNaN(delta.scale)) delta.scale = 1; delta.translate = mix(target.min, target.max, delta.origin) - delta.originPoint; if (isNear(delta.translate) || isNaN(delta.translate)) delta.translate = 0; } function calcBoxDelta(delta, source, target, origin) { calcAxisDelta(delta.x, source.x, target.x, origin === null || origin === void 0 ? void 0 : origin.originX); calcAxisDelta(delta.y, source.y, target.y, origin === null || origin === void 0 ? void 0 : origin.originY); } function calcRelativeAxis(target, relative, parent) { target.min = parent.min + relative.min; target.max = target.min + calcLength(relative); } function calcRelativeBox(target, relative, parent) { calcRelativeAxis(target.x, relative.x, parent.x); calcRelativeAxis(target.y, relative.y, parent.y); } function calcRelativeAxisPosition(target, layout, parent) { target.min = layout.min - parent.min; target.max = target.min + calcLength(layout); } function calcRelativePosition(target, layout, parent) { calcRelativeAxisPosition(target.x, layout.x, parent.x); calcRelativeAxisPosition(target.y, layout.y, parent.y); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs /** * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse */ function removePointDelta(point, translate, scale, originPoint, boxScale) { point -= translate; point = scalePoint(point, 1 / scale, originPoint); if (boxScale !== undefined) { point = scalePoint(point, 1 / boxScale, originPoint); } return point; } /** * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse */ function removeAxisDelta(axis, translate, scale, origin, boxScale, originAxis, sourceAxis) { if (translate === void 0) { translate = 0; } if (scale === void 0) { scale = 1; } if (origin === void 0) { origin = 0.5; } if (originAxis === void 0) { originAxis = axis; } if (sourceAxis === void 0) { sourceAxis = axis; } if (percent.test(translate)) { translate = parseFloat(translate); var relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100); translate = relativeProgress - sourceAxis.min; } if (typeof translate !== "number") return; var originPoint = mix(originAxis.min, originAxis.max, origin); if (axis === originAxis) originPoint -= translate; axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale); axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale); } /** * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse * and acts as a bridge between motion values and removeAxisDelta */ function removeAxisTransforms(axis, transforms, _a, origin, sourceAxis) { var _b = tslib_es6_read(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2]; removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis); } /** * The names of the motion values we want to apply as translation, scale and origin. */ var delta_remove_xKeys = ["x", "scaleX", "originX"]; var delta_remove_yKeys = ["y", "scaleY", "originY"]; /** * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse * and acts as a bridge between motion values and removeAxisDelta */ function removeBoxTransforms(box, transforms, originBox, sourceBox) { removeAxisTransforms(box.x, transforms, delta_remove_xKeys, originBox === null || originBox === void 0 ? void 0 : originBox.x, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.x); removeAxisTransforms(box.y, transforms, delta_remove_yKeys, originBox === null || originBox === void 0 ? void 0 : originBox.y, sourceBox === null || sourceBox === void 0 ? void 0 : sourceBox.y); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/models.mjs var createAxisDelta = function () { return ({ translate: 0, scale: 1, origin: 0, originPoint: 0, }); }; var createDelta = function () { return ({ x: createAxisDelta(), y: createAxisDelta(), }); }; var createAxis = function () { return ({ min: 0, max: 0 }); }; var createBox = function () { return ({ x: createAxis(), y: createAxis(), }); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/geometry/utils.mjs function isAxisDeltaZero(delta) { return delta.translate === 0 && delta.scale === 1; } function isDeltaZero(delta) { return isAxisDeltaZero(delta.x) && isAxisDeltaZero(delta.y); } function boxEquals(a, b) { return (a.x.min === b.x.min && a.x.max === b.x.max && a.y.min === b.y.min && a.y.max === b.y.max); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/shared/stack.mjs var NodeStack = /** @class */ (function () { function NodeStack() { this.members = []; } NodeStack.prototype.add = function (node) { addUniqueItem(this.members, node); node.scheduleRender(); }; NodeStack.prototype.remove = function (node) { removeItem(this.members, node); if (node === this.prevLead) { this.prevLead = undefined; } if (node === this.lead) { var prevLead = this.members[this.members.length - 1]; if (prevLead) { this.promote(prevLead); } } }; NodeStack.prototype.relegate = function (node) { var indexOfNode = this.members.findIndex(function (member) { return node === member; }); if (indexOfNode === 0) return false; /** * Find the next projection node that is present */ var prevLead; for (var i = indexOfNode; i >= 0; i--) { var member = this.members[i]; if (member.isPresent !== false) { prevLead = member; break; } } if (prevLead) { this.promote(prevLead); return true; } else { return false; } }; NodeStack.prototype.promote = function (node, preserveFollowOpacity) { var _a; var prevLead = this.lead; if (node === prevLead) return; this.prevLead = prevLead; this.lead = node; node.show(); if (prevLead) { prevLead.instance && prevLead.scheduleRender(); node.scheduleRender(); node.resumeFrom = prevLead; if (preserveFollowOpacity) { node.resumeFrom.preserveOpacity = true; } if (prevLead.snapshot) { node.snapshot = prevLead.snapshot; node.snapshot.latestValues = prevLead.animationValues || prevLead.latestValues; node.snapshot.isShared = true; } if ((_a = node.root) === null || _a === void 0 ? void 0 : _a.isUpdating) { node.isLayoutDirty = true; } var crossfade = node.options.crossfade; if (crossfade === false) { prevLead.hide(); } /** * TODO: * - Test border radius when previous node was deleted * - boxShadow mixing * - Shared between element A in scrolled container and element B (scroll stays the same or changes) * - Shared between element A in transformed container and element B (transform stays the same or changes) * - Shared between element A in scrolled page and element B (scroll stays the same or changes) * --- * - Crossfade opacity of root nodes * - layoutId changes after animation * - layoutId changes mid animation */ } }; NodeStack.prototype.exitAnimationComplete = function () { this.members.forEach(function (node) { var _a, _b, _c, _d, _e; (_b = (_a = node.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a); (_e = (_c = node.resumingFrom) === null || _c === void 0 ? void 0 : (_d = _c.options).onExitComplete) === null || _e === void 0 ? void 0 : _e.call(_d); }); }; NodeStack.prototype.scheduleRender = function () { this.members.forEach(function (node) { node.instance && node.scheduleRender(false); }); }; /** * Clear any leads that have been removed this render to prevent them from being * used in future animations and to prevent memory leaks */ NodeStack.prototype.removeLeadSnapshot = function () { if (this.lead && this.lead.snapshot) { this.lead.snapshot = undefined; } }; return NodeStack; }()); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs var scaleCorrectors = {}; function addScaleCorrector(correctors) { Object.assign(scaleCorrectors, correctors); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/styles/transform.mjs var identityProjection = "translate3d(0px, 0px, 0) scale(1, 1)"; function buildProjectionTransform(delta, treeScale, latestTransform) { /** * The translations we use to calculate are always relative to the viewport coordinate space. * But when we apply scales, we also scale the coordinate space of an element and its children. * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need * to move an element 100 pixels, we actually need to move it 200 in within that scaled space. */ var xTranslate = delta.x.translate / treeScale.x; var yTranslate = delta.y.translate / treeScale.y; var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) "); if (latestTransform) { var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY; if (rotate) transform += "rotate(".concat(rotate, "deg) "); if (rotateX) transform += "rotateX(".concat(rotateX, "deg) "); if (rotateY) transform += "rotateY(".concat(rotateY, "deg) "); } transform += "scale(".concat(delta.x.scale, ", ").concat(delta.y.scale, ")"); return transform === identityProjection ? "none" : transform; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs function eachAxis(callback) { return [callback("x"), callback("y")]; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/transform.mjs /** * A list of all transformable axes. We'll use this list to generated a version * of each axes for each transform. */ var transformAxes = ["", "X", "Y", "Z"]; /** * An ordered array of each transformable value. By default, transform values * will be sorted to this order. */ var order = ["translate", "scale", "rotate", "skew"]; /** * Generate a list of every possible transform key. */ var transformProps = ["transformPerspective", "x", "y", "z"]; order.forEach(function (operationKey) { return transformAxes.forEach(function (axesKey) { return transformProps.push(operationKey + axesKey); }); }); /** * A function to use with Array.sort to sort transform keys by their default order. */ function sortTransformProps(a, b) { return transformProps.indexOf(a) - transformProps.indexOf(b); } /** * A quick lookup for transform props. */ var transformPropSet = new Set(transformProps); function isTransformProp(key) { return transformPropSet.has(key); } /** * A quick lookup for transform origin props */ var transformOriginProps = new Set(["originX", "originY", "originZ"]); function isTransformOriginProp(key) { return transformOriginProps.has(key); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs var compareByDepth = function (a, b) { return a.depth - b.depth; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs var FlatTree = /** @class */ (function () { function FlatTree() { this.children = []; this.isDirty = false; } FlatTree.prototype.add = function (child) { addUniqueItem(this.children, child); this.isDirty = true; }; FlatTree.prototype.remove = function (child) { removeItem(this.children, child); this.isDirty = true; }; FlatTree.prototype.forEach = function (callback) { this.isDirty && this.children.sort(compareByDepth); this.isDirty = false; this.children.forEach(callback); }; return FlatTree; }()); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs /** * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself * * TODO: Remove and move to library * * @internal */ function resolveMotionValue(value) { var unwrappedValue = isMotionValue(value) ? value.get() : value; return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs /** * We use 1000 as the animation target as 0-1000 maps better to pixels than 0-1 * which has a noticeable difference in spring animations */ var animationTarget = 1000; /** * This should only ever be modified on the client otherwise it'll * persist through server requests. If we need instanced states we * could lazy-init via root. */ var globalProjectionState = { /** * Global flag as to whether the tree has animated since the last time * we resized the window */ hasAnimatedSinceResize: true, /** * We set this to true once, on the first update. Any nodes added to the tree beyond that * update will be given a `data-projection-id` attribute. */ hasEverUpdated: false, }; function createProjectionNode(_a) { var attachResizeListener = _a.attachResizeListener, defaultParent = _a.defaultParent, measureScroll = _a.measureScroll, resetTransform = _a.resetTransform; return /** @class */ (function () { function ProjectionNode(id, latestValues, parent) { var _this = this; if (latestValues === void 0) { latestValues = {}; } if (parent === void 0) { parent = defaultParent === null || defaultParent === void 0 ? void 0 : defaultParent(); } /** * A Set containing all this component's children. This is used to iterate * through the children. * * TODO: This could be faster to iterate as a flat array stored on the root node. */ this.children = new Set(); /** * Options for the node. We use this to configure what kind of layout animations * we should perform (if any). */ this.options = {}; /** * We use this to detect when its safe to shut down part of a projection tree. * We have to keep projecting children for scale correction and relative projection * until all their parents stop performing layout animations. */ this.isTreeAnimating = false; this.isAnimationBlocked = false; /** * Flag to true if we think this layout has been changed. We can't always know this, * currently we set it to true every time a component renders, or if it has a layoutDependency * if that has changed between renders. Additionally, components can be grouped by LayoutGroup * and if one node is dirtied, they all are. */ this.isLayoutDirty = false; /** * Block layout updates for instant layout transitions throughout the tree. */ this.updateManuallyBlocked = false; this.updateBlockedByResize = false; /** * Set to true between the start of the first `willUpdate` call and the end of the `didUpdate` * call. */ this.isUpdating = false; /** * If this is an SVG element we currently disable projection transforms */ this.isSVG = false; /** * Flag to true (during promotion) if a node doing an instant layout transition needs to reset * its projection styles. */ this.needsReset = false; /** * Flags whether this node should have its transform reset prior to measuring. */ this.shouldResetTransform = false; /** * An object representing the calculated contextual/accumulated/tree scale. * This will be used to scale calculcated projection transforms, as these are * calculated in screen-space but need to be scaled for elements to actually * make it to their calculated destinations. * * TODO: Lazy-init */ this.treeScale = { x: 1, y: 1 }; /** * */ this.eventHandlers = new Map(); // Note: Currently only running on root node this.potentialNodes = new Map(); this.checkUpdateFailed = function () { if (_this.isUpdating) { _this.isUpdating = false; _this.clearAllSnapshots(); } }; this.updateProjection = function () { _this.nodes.forEach(resolveTargetDelta); _this.nodes.forEach(calcProjection); }; this.hasProjected = false; this.isVisible = true; this.animationProgress = 0; /** * Shared layout */ // TODO Only running on root node this.sharedNodes = new Map(); this.id = id; this.latestValues = latestValues; this.root = parent ? parent.root || parent : this; this.path = parent ? tslib_es6_spreadArray(tslib_es6_spreadArray([], tslib_es6_read(parent.path), false), [parent], false) : []; this.parent = parent; this.depth = parent ? parent.depth + 1 : 0; id && this.root.registerPotentialNode(id, this); for (var i = 0; i < this.path.length; i++) { this.path[i].shouldResetTransform = true; } if (this.root === this) this.nodes = new FlatTree(); } ProjectionNode.prototype.addEventListener = function (name, handler) { if (!this.eventHandlers.has(name)) { this.eventHandlers.set(name, new SubscriptionManager()); } return this.eventHandlers.get(name).add(handler); }; ProjectionNode.prototype.notifyListeners = function (name) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } var subscriptionManager = this.eventHandlers.get(name); subscriptionManager === null || subscriptionManager === void 0 ? void 0 : subscriptionManager.notify.apply(subscriptionManager, tslib_es6_spreadArray([], tslib_es6_read(args), false)); }; ProjectionNode.prototype.hasListeners = function (name) { return this.eventHandlers.has(name); }; ProjectionNode.prototype.registerPotentialNode = function (id, node) { this.potentialNodes.set(id, node); }; /** * Lifecycles */ ProjectionNode.prototype.mount = function (instance, isLayoutDirty) { var _this = this; var _a; if (isLayoutDirty === void 0) { isLayoutDirty = false; } if (this.instance) return; this.isSVG = instance instanceof SVGElement && instance.tagName !== "svg"; this.instance = instance; var _b = this.options, layoutId = _b.layoutId, layout = _b.layout, visualElement = _b.visualElement; if (visualElement && !visualElement.getInstance()) { visualElement.mount(instance); } this.root.nodes.add(this); (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children.add(this); this.id && this.root.potentialNodes.delete(this.id); if (isLayoutDirty && (layout || layoutId)) { this.isLayoutDirty = true; } if (attachResizeListener) { var unblockTimeout_1; var resizeUnblockUpdate_1 = function () { return (_this.root.updateBlockedByResize = false); }; attachResizeListener(instance, function () { _this.root.updateBlockedByResize = true; clearTimeout(unblockTimeout_1); unblockTimeout_1 = window.setTimeout(resizeUnblockUpdate_1, 250); if (globalProjectionState.hasAnimatedSinceResize) { globalProjectionState.hasAnimatedSinceResize = false; _this.nodes.forEach(finishAnimation); } }); } if (layoutId) { this.root.registerSharedNode(layoutId, this); } // Only register the handler if it requires layout animation if (this.options.animate !== false && visualElement && (layoutId || layout)) { this.addEventListener("didUpdate", function (_a) { var _b, _c, _d, _e, _f; var delta = _a.delta, hasLayoutChanged = _a.hasLayoutChanged, hasRelativeTargetChanged = _a.hasRelativeTargetChanged, newLayout = _a.layout; if (_this.isTreeAnimationBlocked()) { _this.target = undefined; _this.relativeTarget = undefined; return; } // TODO: Check here if an animation exists var layoutTransition = (_c = (_b = _this.options.transition) !== null && _b !== void 0 ? _b : visualElement.getDefaultTransition()) !== null && _c !== void 0 ? _c : defaultLayoutTransition; var onLayoutAnimationComplete = visualElement.getProps().onLayoutAnimationComplete; /** * The target layout of the element might stay the same, * but its position relative to its parent has changed. */ var targetChanged = !_this.targetLayout || !boxEquals(_this.targetLayout, newLayout) || hasRelativeTargetChanged; /** * If the layout hasn't seemed to have changed, it might be that the * element is visually in the same place in the document but its position * relative to its parent has indeed changed. So here we check for that. */ var hasOnlyRelativeTargetChanged = !hasLayoutChanged && hasRelativeTargetChanged; if (((_d = _this.resumeFrom) === null || _d === void 0 ? void 0 : _d.instance) || hasOnlyRelativeTargetChanged || (hasLayoutChanged && (targetChanged || !_this.currentAnimation))) { if (_this.resumeFrom) { _this.resumingFrom = _this.resumeFrom; _this.resumingFrom.resumingFrom = undefined; } _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged); var animationOptions = __assign(__assign({}, getValueTransition(layoutTransition, "layout")), { onComplete: onLayoutAnimationComplete }); if (visualElement.shouldReduceMotion) { animationOptions.delay = 0; animationOptions.type = false; } _this.startAnimation(animationOptions); } else { /** * If the layout hasn't changed and we have an animation that hasn't started yet, * finish it immediately. Otherwise it will be animating from a location * that was probably never commited to screen and look like a jumpy box. */ if (!hasLayoutChanged && _this.animationProgress === 0) { _this.finishAnimation(); } _this.isLead() && ((_f = (_e = _this.options).onExitComplete) === null || _f === void 0 ? void 0 : _f.call(_e)); } _this.targetLayout = newLayout; }); } }; ProjectionNode.prototype.unmount = function () { var _a, _b; this.options.layoutId && this.willUpdate(); this.root.nodes.remove(this); (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.remove(this); (_b = this.parent) === null || _b === void 0 ? void 0 : _b.children.delete(this); this.instance = undefined; cancelSync.preRender(this.updateProjection); }; // only on the root ProjectionNode.prototype.blockUpdate = function () { this.updateManuallyBlocked = true; }; ProjectionNode.prototype.unblockUpdate = function () { this.updateManuallyBlocked = false; }; ProjectionNode.prototype.isUpdateBlocked = function () { return this.updateManuallyBlocked || this.updateBlockedByResize; }; ProjectionNode.prototype.isTreeAnimationBlocked = function () { var _a; return (this.isAnimationBlocked || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimationBlocked()) || false); }; // Note: currently only running on root node ProjectionNode.prototype.startUpdate = function () { var _a; if (this.isUpdateBlocked()) return; this.isUpdating = true; (_a = this.nodes) === null || _a === void 0 ? void 0 : _a.forEach(resetRotation); }; ProjectionNode.prototype.willUpdate = function (shouldNotifyListeners) { var _a, _b, _c; if (shouldNotifyListeners === void 0) { shouldNotifyListeners = true; } if (this.root.isUpdateBlocked()) { (_b = (_a = this.options).onExitComplete) === null || _b === void 0 ? void 0 : _b.call(_a); return; } !this.root.isUpdating && this.root.startUpdate(); if (this.isLayoutDirty) return; this.isLayoutDirty = true; for (var i = 0; i < this.path.length; i++) { var node = this.path[i]; node.shouldResetTransform = true; /** * TODO: Check we haven't updated the scroll * since the last didUpdate */ node.updateScroll(); } var _d = this.options, layoutId = _d.layoutId, layout = _d.layout; if (layoutId === undefined && !layout) return; var transformTemplate = (_c = this.options.visualElement) === null || _c === void 0 ? void 0 : _c.getProps().transformTemplate; this.prevTransformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, ""); this.updateSnapshot(); shouldNotifyListeners && this.notifyListeners("willUpdate"); }; // Note: Currently only running on root node ProjectionNode.prototype.didUpdate = function () { var updateWasBlocked = this.isUpdateBlocked(); // When doing an instant transition, we skip the layout update, // but should still clean up the measurements so that the next // snapshot could be taken correctly. if (updateWasBlocked) { this.unblockUpdate(); this.clearAllSnapshots(); this.nodes.forEach(clearMeasurements); return; } if (!this.isUpdating) return; this.isUpdating = false; /** * Search for and mount newly-added projection elements. * * TODO: Every time a new component is rendered we could search up the tree for * the closest mounted node and query from there rather than document. */ if (this.potentialNodes.size) { this.potentialNodes.forEach(mountNodeEarly); this.potentialNodes.clear(); } /** * Write */ this.nodes.forEach(resetTransformStyle); /** * Read ================== */ // Update layout measurements of updated children this.nodes.forEach(updateLayout); /** * Write */ // Notify listeners that the layout is updated this.nodes.forEach(notifyLayoutUpdate); this.clearAllSnapshots(); // Flush any scheduled updates flushSync.update(); flushSync.preRender(); flushSync.render(); }; ProjectionNode.prototype.clearAllSnapshots = function () { this.nodes.forEach(clearSnapshot); this.sharedNodes.forEach(removeLeadSnapshots); }; ProjectionNode.prototype.scheduleUpdateProjection = function () { es.preRender(this.updateProjection, false, true); }; ProjectionNode.prototype.scheduleCheckAfterUnmount = function () { var _this = this; /** * If the unmounting node is in a layoutGroup and did trigger a willUpdate, * we manually call didUpdate to give a chance to the siblings to animate. * Otherwise, cleanup all snapshots to prevents future nodes from reusing them. */ es.postRender(function () { if (_this.isLayoutDirty) { _this.root.didUpdate(); } else { _this.root.checkUpdateFailed(); } }); }; /** * Update measurements */ ProjectionNode.prototype.updateSnapshot = function () { if (this.snapshot || !this.instance) return; var measured = this.measure(); var layout = this.removeTransform(this.removeElementScroll(measured)); roundBox(layout); this.snapshot = { measured: measured, layout: layout, latestValues: {}, }; }; ProjectionNode.prototype.updateLayout = function () { var _a; if (!this.instance) return; // TODO: Incorporate into a forwarded scroll offset this.updateScroll(); if (!(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty) { return; } /** * When a node is mounted, it simply resumes from the prevLead's * snapshot instead of taking a new one, but the ancestors scroll * might have updated while the prevLead is unmounted. We need to * update the scroll again to make sure the layout we measure is * up to date. */ if (this.resumeFrom && !this.resumeFrom.instance) { for (var i = 0; i < this.path.length; i++) { var node = this.path[i]; node.updateScroll(); } } var measured = this.measure(); roundBox(measured); var prevLayout = this.layout; this.layout = { measured: measured, actual: this.removeElementScroll(measured), }; this.layoutCorrected = createBox(); this.isLayoutDirty = false; this.projectionDelta = undefined; this.notifyListeners("measure", this.layout.actual); (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.notifyLayoutMeasure(this.layout.actual, prevLayout === null || prevLayout === void 0 ? void 0 : prevLayout.actual); }; ProjectionNode.prototype.updateScroll = function () { if (this.options.layoutScroll && this.instance) { this.scroll = measureScroll(this.instance); } }; ProjectionNode.prototype.resetTransform = function () { var _a; if (!resetTransform) return; var isResetRequested = this.isLayoutDirty || this.shouldResetTransform; var hasProjection = this.projectionDelta && !isDeltaZero(this.projectionDelta); var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate; var transformTemplateValue = transformTemplate === null || transformTemplate === void 0 ? void 0 : transformTemplate(this.latestValues, ""); var transformTemplateHasChanged = transformTemplateValue !== this.prevTransformTemplateValue; if (isResetRequested && (hasProjection || hasTransform(this.latestValues) || transformTemplateHasChanged)) { resetTransform(this.instance, transformTemplateValue); this.shouldResetTransform = false; this.scheduleRender(); } }; ProjectionNode.prototype.measure = function () { var visualElement = this.options.visualElement; if (!visualElement) return createBox(); var box = visualElement.measureViewportBox(); // Remove viewport scroll to give page-relative coordinates var scroll = this.root.scroll; if (scroll) { translateAxis(box.x, scroll.x); translateAxis(box.y, scroll.y); } return box; }; ProjectionNode.prototype.removeElementScroll = function (box) { var boxWithoutScroll = createBox(); copyBoxInto(boxWithoutScroll, box); /** * Performance TODO: Keep a cumulative scroll offset down the tree * rather than loop back up the path. */ for (var i = 0; i < this.path.length; i++) { var node = this.path[i]; var scroll_1 = node.scroll, options = node.options; if (node !== this.root && scroll_1 && options.layoutScroll) { translateAxis(boxWithoutScroll.x, scroll_1.x); translateAxis(boxWithoutScroll.y, scroll_1.y); } } return boxWithoutScroll; }; ProjectionNode.prototype.applyTransform = function (box, transformOnly) { if (transformOnly === void 0) { transformOnly = false; } var withTransforms = createBox(); copyBoxInto(withTransforms, box); for (var i = 0; i < this.path.length; i++) { var node = this.path[i]; if (!transformOnly && node.options.layoutScroll && node.scroll && node !== node.root) { transformBox(withTransforms, { x: -node.scroll.x, y: -node.scroll.y, }); } if (!hasTransform(node.latestValues)) continue; transformBox(withTransforms, node.latestValues); } if (hasTransform(this.latestValues)) { transformBox(withTransforms, this.latestValues); } return withTransforms; }; ProjectionNode.prototype.removeTransform = function (box) { var _a; var boxWithoutTransform = createBox(); copyBoxInto(boxWithoutTransform, box); for (var i = 0; i < this.path.length; i++) { var node = this.path[i]; if (!node.instance) continue; if (!hasTransform(node.latestValues)) continue; hasScale(node.latestValues) && node.updateSnapshot(); var sourceBox = createBox(); var nodeBox = node.measure(); copyBoxInto(sourceBox, nodeBox); removeBoxTransforms(boxWithoutTransform, node.latestValues, (_a = node.snapshot) === null || _a === void 0 ? void 0 : _a.layout, sourceBox); } if (hasTransform(this.latestValues)) { removeBoxTransforms(boxWithoutTransform, this.latestValues); } return boxWithoutTransform; }; /** * */ ProjectionNode.prototype.setTargetDelta = function (delta) { this.targetDelta = delta; this.root.scheduleUpdateProjection(); }; ProjectionNode.prototype.setOptions = function (options) { var _a; this.options = __assign(__assign(__assign({}, this.options), options), { crossfade: (_a = options.crossfade) !== null && _a !== void 0 ? _a : true }); }; ProjectionNode.prototype.clearMeasurements = function () { this.scroll = undefined; this.layout = undefined; this.snapshot = undefined; this.prevTransformTemplateValue = undefined; this.targetDelta = undefined; this.target = undefined; this.isLayoutDirty = false; }; /** * Frame calculations */ ProjectionNode.prototype.resolveTargetDelta = function () { var _a; var _b = this.options, layout = _b.layout, layoutId = _b.layoutId; /** * If we have no layout, we can't perform projection, so early return */ if (!this.layout || !(layout || layoutId)) return; /** * If we don't have a targetDelta but do have a layout, we can attempt to resolve * a relativeParent. This will allow a component to perform scale correction * even if no animation has started. */ // TODO If this is unsuccessful this currently happens every frame if (!this.targetDelta && !this.relativeTarget) { // TODO: This is a semi-repetition of further down this function, make DRY this.relativeParent = this.getClosestProjectingParent(); if (this.relativeParent && this.relativeParent.layout) { this.relativeTarget = createBox(); this.relativeTargetOrigin = createBox(); calcRelativePosition(this.relativeTargetOrigin, this.layout.actual, this.relativeParent.layout.actual); copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); } } /** * If we have no relative target or no target delta our target isn't valid * for this frame. */ if (!this.relativeTarget && !this.targetDelta) return; /** * Lazy-init target data structure */ if (!this.target) { this.target = createBox(); this.targetWithTransforms = createBox(); } /** * If we've got a relative box for this component, resolve it into a target relative to the parent. */ if (this.relativeTarget && this.relativeTargetOrigin && ((_a = this.relativeParent) === null || _a === void 0 ? void 0 : _a.target)) { calcRelativeBox(this.target, this.relativeTarget, this.relativeParent.target); /** * If we've only got a targetDelta, resolve it into a target */ } else if (this.targetDelta) { if (Boolean(this.resumingFrom)) { // TODO: This is creating a new object every frame this.target = this.applyTransform(this.layout.actual); } else { copyBoxInto(this.target, this.layout.actual); } applyBoxDelta(this.target, this.targetDelta); } else { /** * If no target, use own layout as target */ copyBoxInto(this.target, this.layout.actual); } /** * If we've been told to attempt to resolve a relative target, do so. */ if (this.attemptToResolveRelativeTarget) { this.attemptToResolveRelativeTarget = false; this.relativeParent = this.getClosestProjectingParent(); if (this.relativeParent && Boolean(this.relativeParent.resumingFrom) === Boolean(this.resumingFrom) && !this.relativeParent.options.layoutScroll && this.relativeParent.target) { this.relativeTarget = createBox(); this.relativeTargetOrigin = createBox(); calcRelativePosition(this.relativeTargetOrigin, this.target, this.relativeParent.target); copyBoxInto(this.relativeTarget, this.relativeTargetOrigin); } } }; ProjectionNode.prototype.getClosestProjectingParent = function () { if (!this.parent || hasTransform(this.parent.latestValues)) return undefined; if ((this.parent.relativeTarget || this.parent.targetDelta) && this.parent.layout) { return this.parent; } else { return this.parent.getClosestProjectingParent(); } }; ProjectionNode.prototype.calcProjection = function () { var _a; var _b = this.options, layout = _b.layout, layoutId = _b.layoutId; /** * If this section of the tree isn't animating we can * delete our target sources for the following frame. */ this.isTreeAnimating = Boolean(((_a = this.parent) === null || _a === void 0 ? void 0 : _a.isTreeAnimating) || this.currentAnimation || this.pendingAnimation); if (!this.isTreeAnimating) { this.targetDelta = this.relativeTarget = undefined; } if (!this.layout || !(layout || layoutId)) return; var lead = this.getLead(); /** * Reset the corrected box with the latest values from box, as we're then going * to perform mutative operations on it. */ copyBoxInto(this.layoutCorrected, this.layout.actual); /** * Apply all the parent deltas to this box to produce the corrected box. This * is the layout box, as it will appear on screen as a result of the transforms of its parents. */ applyTreeDeltas(this.layoutCorrected, this.treeScale, this.path, Boolean(this.resumingFrom) || this !== lead); var target = lead.target; if (!target) return; if (!this.projectionDelta) { this.projectionDelta = createDelta(); this.projectionDeltaWithTransform = createDelta(); } var prevTreeScaleX = this.treeScale.x; var prevTreeScaleY = this.treeScale.y; var prevProjectionTransform = this.projectionTransform; /** * Update the delta between the corrected box and the target box before user-set transforms were applied. * This will allow us to calculate the corrected borderRadius and boxShadow to compensate * for our layout reprojection, but still allow them to be scaled correctly by the user. * It might be that to simplify this we may want to accept that user-set scale is also corrected * and we wouldn't have to keep and calc both deltas, OR we could support a user setting * to allow people to choose whether these styles are corrected based on just the * layout reprojection or the final bounding box. */ calcBoxDelta(this.projectionDelta, this.layoutCorrected, target, this.latestValues); this.projectionTransform = buildProjectionTransform(this.projectionDelta, this.treeScale); if (this.projectionTransform !== prevProjectionTransform || this.treeScale.x !== prevTreeScaleX || this.treeScale.y !== prevTreeScaleY) { this.hasProjected = true; this.scheduleRender(); this.notifyListeners("projectionUpdate", target); } }; ProjectionNode.prototype.hide = function () { this.isVisible = false; // TODO: Schedule render }; ProjectionNode.prototype.show = function () { this.isVisible = true; // TODO: Schedule render }; ProjectionNode.prototype.scheduleRender = function (notifyAll) { var _a, _b, _c; if (notifyAll === void 0) { notifyAll = true; } (_b = (_a = this.options).scheduleRender) === null || _b === void 0 ? void 0 : _b.call(_a); notifyAll && ((_c = this.getStack()) === null || _c === void 0 ? void 0 : _c.scheduleRender()); if (this.resumingFrom && !this.resumingFrom.instance) { this.resumingFrom = undefined; } }; ProjectionNode.prototype.setAnimationOrigin = function (delta, hasOnlyRelativeTargetChanged) { var _this = this; var _a; if (hasOnlyRelativeTargetChanged === void 0) { hasOnlyRelativeTargetChanged = false; } var snapshot = this.snapshot; var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {}; var mixedValues = __assign({}, this.latestValues); var targetDelta = createDelta(); this.relativeTarget = this.relativeTargetOrigin = undefined; this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged; var relativeLayout = createBox(); var isSharedLayoutAnimation = snapshot === null || snapshot === void 0 ? void 0 : snapshot.isShared; var isOnlyMember = (((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.members.length) || 0) <= 1; var shouldCrossfadeOpacity = Boolean(isSharedLayoutAnimation && !isOnlyMember && this.options.crossfade === true && !this.path.some(hasOpacityCrossfade)); this.animationProgress = 0; this.mixTargetDelta = function (latest) { var _a; var progress = latest / 1000; mixAxisDelta(targetDelta.x, delta.x, progress); mixAxisDelta(targetDelta.y, delta.y, progress); _this.setTargetDelta(targetDelta); if (_this.relativeTarget && _this.relativeTargetOrigin && _this.layout && ((_a = _this.relativeParent) === null || _a === void 0 ? void 0 : _a.layout)) { calcRelativePosition(relativeLayout, _this.layout.actual, _this.relativeParent.layout.actual); mixBox(_this.relativeTarget, _this.relativeTargetOrigin, relativeLayout, progress); } if (isSharedLayoutAnimation) { _this.animationValues = mixedValues; mixValues(mixedValues, snapshotLatestValues, _this.latestValues, progress, shouldCrossfadeOpacity, isOnlyMember); } _this.root.scheduleUpdateProjection(); _this.scheduleRender(); _this.animationProgress = progress; }; this.mixTargetDelta(0); }; ProjectionNode.prototype.startAnimation = function (options) { var _this = this; var _a, _b; (_a = this.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); if (this.resumingFrom) { (_b = this.resumingFrom.currentAnimation) === null || _b === void 0 ? void 0 : _b.stop(); } if (this.pendingAnimation) { cancelSync.update(this.pendingAnimation); this.pendingAnimation = undefined; } /** * Start the animation in the next frame to have a frame with progress 0, * where the target is the same as when the animation started, so we can * calculate the relative positions correctly for instant transitions. */ this.pendingAnimation = es.update(function () { globalProjectionState.hasAnimatedSinceResize = true; _this.currentAnimation = animate_animate(0, animationTarget, __assign(__assign({}, options), { onUpdate: function (latest) { var _a; _this.mixTargetDelta(latest); (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, latest); }, onComplete: function () { var _a; (_a = options.onComplete) === null || _a === void 0 ? void 0 : _a.call(options); _this.completeAnimation(); } })); if (_this.resumingFrom) { _this.resumingFrom.currentAnimation = _this.currentAnimation; } _this.pendingAnimation = undefined; }); }; ProjectionNode.prototype.completeAnimation = function () { var _a; if (this.resumingFrom) { this.resumingFrom.currentAnimation = undefined; this.resumingFrom.preserveOpacity = undefined; } (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.exitAnimationComplete(); this.resumingFrom = this.currentAnimation = this.animationValues = undefined; this.notifyListeners("animationComplete"); }; ProjectionNode.prototype.finishAnimation = function () { var _a; if (this.currentAnimation) { (_a = this.mixTargetDelta) === null || _a === void 0 ? void 0 : _a.call(this, animationTarget); this.currentAnimation.stop(); } this.completeAnimation(); }; ProjectionNode.prototype.applyTransformsToTarget = function () { var _a = this.getLead(), targetWithTransforms = _a.targetWithTransforms, target = _a.target, layout = _a.layout, latestValues = _a.latestValues; if (!targetWithTransforms || !target || !layout) return; copyBoxInto(targetWithTransforms, target); /** * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal. * This is the final box that we will then project into by calculating a transform delta and * applying it to the corrected box. */ transformBox(targetWithTransforms, latestValues); /** * Update the delta between the corrected box and the final target box, after * user-set transforms are applied to it. This will be used by the renderer to * create a transform style that will reproject the element from its actual layout * into the desired bounding box. */ calcBoxDelta(this.projectionDeltaWithTransform, this.layoutCorrected, targetWithTransforms, latestValues); }; ProjectionNode.prototype.registerSharedNode = function (layoutId, node) { var _a, _b, _c; if (!this.sharedNodes.has(layoutId)) { this.sharedNodes.set(layoutId, new NodeStack()); } var stack = this.sharedNodes.get(layoutId); stack.add(node); node.promote({ transition: (_a = node.options.initialPromotionConfig) === null || _a === void 0 ? void 0 : _a.transition, preserveFollowOpacity: (_c = (_b = node.options.initialPromotionConfig) === null || _b === void 0 ? void 0 : _b.shouldPreserveFollowOpacity) === null || _c === void 0 ? void 0 : _c.call(_b, node), }); }; ProjectionNode.prototype.isLead = function () { var stack = this.getStack(); return stack ? stack.lead === this : true; }; ProjectionNode.prototype.getLead = function () { var _a; var layoutId = this.options.layoutId; return layoutId ? ((_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.lead) || this : this; }; ProjectionNode.prototype.getPrevLead = function () { var _a; var layoutId = this.options.layoutId; return layoutId ? (_a = this.getStack()) === null || _a === void 0 ? void 0 : _a.prevLead : undefined; }; ProjectionNode.prototype.getStack = function () { var layoutId = this.options.layoutId; if (layoutId) return this.root.sharedNodes.get(layoutId); }; ProjectionNode.prototype.promote = function (_a) { var _b = _a === void 0 ? {} : _a, needsReset = _b.needsReset, transition = _b.transition, preserveFollowOpacity = _b.preserveFollowOpacity; var stack = this.getStack(); if (stack) stack.promote(this, preserveFollowOpacity); if (needsReset) { this.projectionDelta = undefined; this.needsReset = true; } if (transition) this.setOptions({ transition: transition }); }; ProjectionNode.prototype.relegate = function () { var stack = this.getStack(); if (stack) { return stack.relegate(this); } else { return false; } }; ProjectionNode.prototype.resetRotation = function () { var visualElement = this.options.visualElement; if (!visualElement) return; // If there's no detected rotation values, we can early return without a forced render. var hasRotate = false; // Keep a record of all the values we've reset var resetValues = {}; // Check the rotate value of all axes and reset to 0 for (var i = 0; i < transformAxes.length; i++) { var axis = transformAxes[i]; var key = "rotate" + axis; // If this rotation doesn't exist as a motion value, then we don't // need to reset it if (!visualElement.getStaticValue(key)) { continue; } hasRotate = true; // Record the rotation and then temporarily set it to 0 resetValues[key] = visualElement.getStaticValue(key); visualElement.setStaticValue(key, 0); } // If there's no rotation values, we don't need to do any more. if (!hasRotate) return; // Force a render of this element to apply the transform with all rotations // set to 0. visualElement === null || visualElement === void 0 ? void 0 : visualElement.syncRender(); // Put back all the values we reset for (var key in resetValues) { visualElement.setStaticValue(key, resetValues[key]); } // Schedule a render for the next frame. This ensures we won't visually // see the element with the reset rotate value applied. visualElement.scheduleRender(); }; ProjectionNode.prototype.getProjectionStyles = function (styleProp) { var _a, _b, _c, _d, _e, _f; if (styleProp === void 0) { styleProp = {}; } // TODO: Return lifecycle-persistent object var styles = {}; if (!this.instance || this.isSVG) return styles; if (!this.isVisible) { return { visibility: "hidden" }; } else { styles.visibility = ""; } var transformTemplate = (_a = this.options.visualElement) === null || _a === void 0 ? void 0 : _a.getProps().transformTemplate; if (this.needsReset) { this.needsReset = false; styles.opacity = ""; styles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || ""; styles.transform = transformTemplate ? transformTemplate(this.latestValues, "") : "none"; return styles; } var lead = this.getLead(); if (!this.projectionDelta || !this.layout || !lead.target) { var emptyStyles = {}; if (this.options.layoutId) { emptyStyles.opacity = (_b = this.latestValues.opacity) !== null && _b !== void 0 ? _b : 1; emptyStyles.pointerEvents = resolveMotionValue(styleProp.pointerEvents) || ""; } if (this.hasProjected && !hasTransform(this.latestValues)) { emptyStyles.transform = transformTemplate ? transformTemplate({}, "") : "none"; this.hasProjected = false; } return emptyStyles; } var valuesToRender = lead.animationValues || lead.latestValues; this.applyTransformsToTarget(); styles.transform = buildProjectionTransform(this.projectionDeltaWithTransform, this.treeScale, valuesToRender); if (transformTemplate) { styles.transform = transformTemplate(valuesToRender, styles.transform); } var _g = this.projectionDelta, x = _g.x, y = _g.y; styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0"); if (lead.animationValues) { /** * If the lead component is animating, assign this either the entering/leaving * opacity */ styles.opacity = lead === this ? (_d = (_c = valuesToRender.opacity) !== null && _c !== void 0 ? _c : this.latestValues.opacity) !== null && _d !== void 0 ? _d : 1 : this.preserveOpacity ? this.latestValues.opacity : valuesToRender.opacityExit; } else { /** * Or we're not animating at all, set the lead component to its actual * opacity and other components to hidden. */ styles.opacity = lead === this ? (_e = valuesToRender.opacity) !== null && _e !== void 0 ? _e : "" : (_f = valuesToRender.opacityExit) !== null && _f !== void 0 ? _f : 0; } /** * Apply scale correction */ for (var key in scaleCorrectors) { if (valuesToRender[key] === undefined) continue; var _h = scaleCorrectors[key], correct = _h.correct, applyTo = _h.applyTo; var corrected = correct(valuesToRender[key], lead); if (applyTo) { var num = applyTo.length; for (var i = 0; i < num; i++) { styles[applyTo[i]] = corrected; } } else { styles[key] = corrected; } } /** * Disable pointer events on follow components. This is to ensure * that if a follow component covers a lead component it doesn't block * pointer events on the lead. */ if (this.options.layoutId) { styles.pointerEvents = lead === this ? resolveMotionValue(styleProp.pointerEvents) || "" : "none"; } return styles; }; ProjectionNode.prototype.clearSnapshot = function () { this.resumeFrom = this.snapshot = undefined; }; // Only run on root ProjectionNode.prototype.resetTree = function () { this.root.nodes.forEach(function (node) { var _a; return (_a = node.currentAnimation) === null || _a === void 0 ? void 0 : _a.stop(); }); this.root.nodes.forEach(clearMeasurements); this.root.sharedNodes.clear(); }; return ProjectionNode; }()); } function updateLayout(node) { node.updateLayout(); } function notifyLayoutUpdate(node) { var _a, _b, _c, _d; var snapshot = (_b = (_a = node.resumeFrom) === null || _a === void 0 ? void 0 : _a.snapshot) !== null && _b !== void 0 ? _b : node.snapshot; if (node.isLead() && node.layout && snapshot && node.hasListeners("didUpdate")) { var _e = node.layout, layout_1 = _e.actual, measuredLayout = _e.measured; // TODO Maybe we want to also resize the layout snapshot so we don't trigger // animations for instance if layout="size" and an element has only changed position if (node.options.animationType === "size") { eachAxis(function (axis) { var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis]; var length = calcLength(axisSnapshot); axisSnapshot.min = layout_1[axis].min; axisSnapshot.max = axisSnapshot.min + length; }); } else if (node.options.animationType === "position") { eachAxis(function (axis) { var axisSnapshot = snapshot.isShared ? snapshot.measured[axis] : snapshot.layout[axis]; var length = calcLength(layout_1[axis]); axisSnapshot.max = axisSnapshot.min + length; }); } var layoutDelta = createDelta(); calcBoxDelta(layoutDelta, layout_1, snapshot.layout); var visualDelta = createDelta(); if (snapshot.isShared) { calcBoxDelta(visualDelta, node.applyTransform(measuredLayout, true), snapshot.measured); } else { calcBoxDelta(visualDelta, layout_1, snapshot.layout); } var hasLayoutChanged = !isDeltaZero(layoutDelta); var hasRelativeTargetChanged = false; if (!node.resumeFrom) { node.relativeParent = node.getClosestProjectingParent(); /** * If the relativeParent is itself resuming from a different element then * the relative snapshot is not relavent */ if (node.relativeParent && !node.relativeParent.resumeFrom) { var _f = node.relativeParent, parentSnapshot = _f.snapshot, parentLayout = _f.layout; if (parentSnapshot && parentLayout) { var relativeSnapshot = createBox(); calcRelativePosition(relativeSnapshot, snapshot.layout, parentSnapshot.layout); var relativeLayout = createBox(); calcRelativePosition(relativeLayout, layout_1, parentLayout.actual); if (!boxEquals(relativeSnapshot, relativeLayout)) { hasRelativeTargetChanged = true; } } } } node.notifyListeners("didUpdate", { layout: layout_1, snapshot: snapshot, delta: visualDelta, layoutDelta: layoutDelta, hasLayoutChanged: hasLayoutChanged, hasRelativeTargetChanged: hasRelativeTargetChanged, }); } else if (node.isLead()) { (_d = (_c = node.options).onExitComplete) === null || _d === void 0 ? void 0 : _d.call(_c); } /** * Clearing transition * TODO: Investigate why this transition is being passed in as {type: false } from Framer * and why we need it at all */ node.options.transition = undefined; } function clearSnapshot(node) { node.clearSnapshot(); } function clearMeasurements(node) { node.clearMeasurements(); } function resetTransformStyle(node) { var visualElement = node.options.visualElement; if (visualElement === null || visualElement === void 0 ? void 0 : visualElement.getProps().onBeforeLayoutMeasure) { visualElement.notifyBeforeLayoutMeasure(); } node.resetTransform(); } function finishAnimation(node) { node.finishAnimation(); node.targetDelta = node.relativeTarget = node.target = undefined; } function resolveTargetDelta(node) { node.resolveTargetDelta(); } function calcProjection(node) { node.calcProjection(); } function resetRotation(node) { node.resetRotation(); } function removeLeadSnapshots(stack) { stack.removeLeadSnapshot(); } function mixAxisDelta(output, delta, p) { output.translate = mix(delta.translate, 0, p); output.scale = mix(delta.scale, 1, p); output.origin = delta.origin; output.originPoint = delta.originPoint; } function mixAxis(output, from, to, p) { output.min = mix(from.min, to.min, p); output.max = mix(from.max, to.max, p); } function mixBox(output, from, to, p) { mixAxis(output.x, from.x, to.x, p); mixAxis(output.y, from.y, to.y, p); } function hasOpacityCrossfade(node) { return (node.animationValues && node.animationValues.opacityExit !== undefined); } var defaultLayoutTransition = { duration: 0.45, ease: [0.4, 0, 0.1, 1], }; function mountNodeEarly(node, id) { /** * Rather than searching the DOM from document we can search the * path for the deepest mounted ancestor and search from there */ var searchNode = node.root; for (var i = node.path.length - 1; i >= 0; i--) { if (Boolean(node.path[i].instance)) { searchNode = node.path[i]; break; } } var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document; var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]")); if (element) node.mount(element, true); } function roundAxis(axis) { axis.min = Math.round(axis.min); axis.max = Math.round(axis.max); } function roundBox(box) { roundAxis(box.x); roundAxis(box.y); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/node/id.mjs var id = 1; function useProjectionId() { return useConstant(function () { if (globalProjectionState.hasEverUpdated) { return id++; } }); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs /** * @internal */ var LayoutGroupContext = (0,external_React_.createContext)({}); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs /** * @internal */ var SwitchLayoutGroupContext = (0,external_React_.createContext)({}); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/use-projection.mjs function useProjection(projectionId, _a, visualElement, ProjectionNodeConstructor) { var _b; var layoutId = _a.layoutId, layout = _a.layout, drag = _a.drag, dragConstraints = _a.dragConstraints, layoutScroll = _a.layoutScroll; var initialPromotionConfig = (0,external_React_.useContext)(SwitchLayoutGroupContext); if (!ProjectionNodeConstructor || !visualElement || (visualElement === null || visualElement === void 0 ? void 0 : visualElement.projection)) { return; } visualElement.projection = new ProjectionNodeConstructor(projectionId, visualElement.getLatestValues(), (_b = visualElement.parent) === null || _b === void 0 ? void 0 : _b.projection); visualElement.projection.setOptions({ layoutId: layoutId, layout: layout, alwaysMeasureLayout: Boolean(drag) || (dragConstraints && is_ref_object_isRefObject(dragConstraints)), visualElement: visualElement, scheduleRender: function () { return visualElement.scheduleRender(); }, /** * TODO: Update options in an effect. This could be tricky as it'll be too late * to update by the time layout animations run. * We also need to fix this safeToRemove by linking it up to the one returned by usePresence, * ensuring it gets called if there's no potential layout animations. * */ animationType: typeof layout === "string" ? layout : "both", initialPromotionConfig: initialPromotionConfig, layoutScroll: layoutScroll, }); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs var VisualElementHandler = /** @class */ (function (_super) { __extends(VisualElementHandler, _super); function VisualElementHandler() { return _super !== null && _super.apply(this, arguments) || this; } /** * Update visual element props as soon as we know this update is going to be commited. */ VisualElementHandler.prototype.getSnapshotBeforeUpdate = function () { this.updateProps(); return null; }; VisualElementHandler.prototype.componentDidUpdate = function () { }; VisualElementHandler.prototype.updateProps = function () { var _a = this.props, visualElement = _a.visualElement, props = _a.props; if (visualElement) visualElement.setProps(props); }; VisualElementHandler.prototype.render = function () { return this.props.children; }; return VisualElementHandler; }(external_React_.Component)); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/index.mjs /** * Create a `motion` component. * * This function accepts a Component argument, which can be either a string (ie "div" * for `motion.div`), or an actual React component. * * Alongside this is a config option which provides a way of rendering the provided * component "offline", or outside the React render cycle. * * @internal */ function motion_createMotionComponent(_a) { var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, projectionNodeConstructor = _a.projectionNodeConstructor, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component; preloadedFeatures && loadFeatures(preloadedFeatures); function MotionComponent(props, externalRef) { var layoutId = useLayoutId(props); props = __assign(__assign({}, props), { layoutId: layoutId }); /** * If we're rendering in a static environment, we only visually update the component * as a result of a React-rerender rather than interactions or animations. This * means we don't need to load additional memory structures like VisualElement, * or any gesture/animation features. */ var config = (0,external_React_.useContext)(MotionConfigContext); var features = null; var context = useCreateMotionContext(props); /** * Create a unique projection ID for this component. If a new component is added * during a layout animation we'll use this to query the DOM and hydrate its ref early, allowing * us to measure it as soon as any layout effect flushes pending layout animations. * * Performance note: It'd be better not to have to search the DOM for these elements. * For newly-entering components it could be enough to only correct treeScale, in which * case we could mount in a scale-correction mode. This wouldn't be enough for * shared element transitions however. Perhaps for those we could revert to a root node * that gets forceRendered and layout animations are triggered on its layout effect. */ var projectionId = config.isStatic ? undefined : useProjectionId(); /** * */ var visualState = useVisualState(props, config.isStatic); if (!config.isStatic && is_browser_isBrowser) { /** * Create a VisualElement for this component. A VisualElement provides a common * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as * providing a way of rendering to these APIs outside of the React render loop * for more performant animations and interactions */ context.visualElement = useVisualElement(Component, visualState, __assign(__assign({}, config), props), createVisualElement); useProjection(projectionId, props, context.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor); /** * Load Motion gesture and animation features. These are rendered as renderless * components so each feature can optionally make use of React lifecycle methods. */ features = useFeatures(props, context.visualElement, preloadedFeatures); } /** * The mount order and hierarchy is specific to ensure our element ref * is hydrated by the time features fire their effects. */ return (external_React_.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) }, features, external_React_.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement)))); } return (0,external_React_.forwardRef)(MotionComponent); } function useLayoutId(_a) { var _b; var layoutId = _a.layoutId; var layoutGroupId = (_b = (0,external_React_.useContext)(LayoutGroupContext)) === null || _b === void 0 ? void 0 : _b.id; return layoutGroupId && layoutId !== undefined ? layoutGroupId + "-" + layoutId : layoutId; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs /** * Convert any React component into a `motion` component. The provided component * **must** use `React.forwardRef` to the underlying DOM component you want to animate. * * ```jsx * const Component = React.forwardRef((props, ref) => { * return
* }) * * const MotionComponent = motion(Component) * ``` * * @public */ function createMotionProxy(createConfig) { function custom(Component, customMotionComponentConfig) { if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; } return motion_createMotionComponent(createConfig(Component, customMotionComponentConfig)); } if (typeof Proxy === "undefined") { return custom; } /** * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc. * Rather than generating them anew every render. */ var componentCache = new Map(); return new Proxy(custom, { /** * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc. * The prop name is passed through as `key` and we can use that to generate a `motion` * DOM component with that name. */ get: function (_target, key) { /** * If this element doesn't exist in the component cache, create it and cache. */ if (!componentCache.has(key)) { componentCache.set(key, custom(key)); } return componentCache.get(key); }, }); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs /** * We keep these listed seperately as we use the lowercase tag names as part * of the runtime bundle to detect SVG components */ var lowercaseSVGElements = [ "animate", "circle", "defs", "desc", "ellipse", "g", "image", "line", "filter", "marker", "mask", "metadata", "path", "pattern", "polygon", "polyline", "rect", "stop", "svg", "switch", "symbol", "text", "tspan", "use", "view", ]; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs function isSVGComponent(Component) { if ( /** * If it's not a string, it's a custom React component. Currently we only support * HTML custom React components. */ typeof Component !== "string" || /** * If it contains a dash, the element is a custom HTML webcomponent. */ Component.includes("-")) { return false; } else if ( /** * If it's in our list of lowercase SVG tags, it's an SVG component */ lowercaseSVGElements.indexOf(Component) > -1 || /** * If it contains a capital letter, it's an SVG component */ /[A-Z]/.test(Component)) { return true; } return false; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs function isForcedMotionValue(key, _a) { var layout = _a.layout, layoutId = _a.layoutId; return (isTransformProp(key) || isTransformOriginProp(key) || ((layout || layoutId !== undefined) && (!!scaleCorrectors[key] || key === "opacity"))); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs var translateAlias = { x: "translateX", y: "translateY", z: "translateZ", transformPerspective: "perspective", }; /** * Build a CSS transform style from individual x/y/scale etc properties. * * This outputs with a default order of transforms/scales/rotations, this can be customised by * providing a transformTemplate function. */ function buildTransform(_a, _b, transformIsDefault, transformTemplate) { var transform = _a.transform, transformKeys = _a.transformKeys; var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d; // The transform string we're going to build into. var transformString = ""; // Transform keys into their default order - this will determine the output order. transformKeys.sort(sortTransformProps); // Track whether the defined transform has a defined z so we don't add a // second to enable hardware acceleration var transformHasZ = false; // Loop over each transform and build them into transformString var numTransformKeys = transformKeys.length; for (var i = 0; i < numTransformKeys; i++) { var key = transformKeys[i]; transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") "); if (key === "z") transformHasZ = true; } if (!transformHasZ && enableHardwareAcceleration) { transformString += "translateZ(0)"; } else { transformString = transformString.trim(); } // If we have a custom `transform` template, pass our transform values and // generated transformString to that before returning if (transformTemplate) { transformString = transformTemplate(transform, transformIsDefault ? "" : transformString); } else if (allowTransformNone && transformIsDefault) { transformString = "none"; } return transformString; } /** * Build a transformOrigin style. Uses the same defaults as the browser for * undefined origins. */ function buildTransformOrigin(_a) { var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d; return "".concat(originX, " ").concat(originY, " ").concat(originZ); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs /** * Returns true if the provided key is a CSS variable */ function isCSSVariable(key) { return key.startsWith("--"); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs /** * Provided a value and a ValueType, returns the value as that value type. */ var getValueAsType = function (value, type) { return type && typeof value === "number" ? type.transform(value) : value; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs function buildHTMLStyles(state, latestValues, options, transformTemplate) { var _a; var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin; // Empty the transformKeys array. As we're throwing out refs to its items // this might not be as cheap as suspected. Maybe using the array as a buffer // with a manual incrementation would be better. transformKeys.length = 0; // Track whether we encounter any transform or transformOrigin values. var hasTransform = false; var hasTransformOrigin = false; // Does the calculated transform essentially equal "none"? var transformIsNone = true; /** * Loop over all our latest animated values and decide whether to handle them * as a style or CSS variable. * * Transforms and transform origins are kept seperately for further processing. */ for (var key in latestValues) { var value = latestValues[key]; /** * If this is a CSS variable we don't do any further processing. */ if (isCSSVariable(key)) { vars[key] = value; continue; } // Convert the value to its default value type, ie 0 -> "0px" var valueType = numberValueTypes[key]; var valueAsType = getValueAsType(value, valueType); if (isTransformProp(key)) { // If this is a transform, flag to enable further transform processing hasTransform = true; transform[key] = valueAsType; transformKeys.push(key); // If we already know we have a non-default transform, early return if (!transformIsNone) continue; // Otherwise check to see if this is a default transform if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0)) transformIsNone = false; } else if (isTransformOriginProp(key)) { transformOrigin[key] = valueAsType; // If this is a transform origin, flag and enable further transform-origin processing hasTransformOrigin = true; } else { style[key] = valueAsType; } } if (hasTransform) { style.transform = buildTransform(state, options, transformIsNone, transformTemplate); } else if (transformTemplate) { style.transform = transformTemplate({}, ""); } else if (!latestValues.transform && style.transform) { style.transform = "none"; } if (hasTransformOrigin) { style.transformOrigin = buildTransformOrigin(transformOrigin); } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs var createHtmlRenderState = function () { return ({ style: {}, transform: {}, transformKeys: [], transformOrigin: {}, vars: {}, }); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/use-props.mjs function copyRawValuesOnly(target, source, props) { for (var key in source) { if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) { target[key] = source[key]; } } } function useInitialMotionValues(_a, visualState, isStatic) { var transformTemplate = _a.transformTemplate; return (0,external_React_.useMemo)(function () { var state = createHtmlRenderState(); buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate); var vars = state.vars, style = state.style; return __assign(__assign({}, vars), style); }, [visualState]); } function useStyle(props, visualState, isStatic) { var styleProp = props.style || {}; var style = {}; /** * Copy non-Motion Values straight into style */ copyRawValuesOnly(style, styleProp, props); Object.assign(style, useInitialMotionValues(props, visualState, isStatic)); if (props.transformValues) { style = props.transformValues(style); } return style; } function useHTMLProps(props, visualState, isStatic) { // The `any` isn't ideal but it is the type of createElement props argument var htmlProps = {}; var style = useStyle(props, visualState, isStatic); if (Boolean(props.drag) && props.dragListener !== false) { // Disable the ghost element when a user drags htmlProps.draggable = false; // Disable text selection style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout = "none"; // Disable scrolling on the draggable direction style.touchAction = props.drag === true ? "none" : "pan-".concat(props.drag === "x" ? "y" : "x"); } htmlProps.style = style; return htmlProps; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs /** * A list of all valid MotionProps. * * @internalremarks * This doesn't throw if a `MotionProp` name is missing - it should. */ var validMotionProps = new Set([ "initial", "animate", "exit", "style", "variants", "transition", "transformTemplate", "transformValues", "custom", "inherit", "layout", "layoutId", "layoutDependency", "onLayoutAnimationComplete", "onLayoutMeasure", "onBeforeLayoutMeasure", "onAnimationStart", "onAnimationComplete", "onUpdate", "onDragStart", "onDrag", "onDragEnd", "onMeasureDragConstraints", "onDirectionLock", "onDragTransitionEnd", "drag", "dragControls", "dragListener", "dragConstraints", "dragDirectionLock", "dragSnapToOrigin", "_dragX", "_dragY", "dragElastic", "dragMomentum", "dragPropagation", "dragTransition", "whileDrag", "onPan", "onPanStart", "onPanEnd", "onPanSessionStart", "onTap", "onTapStart", "onTapCancel", "onHoverStart", "onHoverEnd", "whileFocus", "whileTap", "whileHover", "whileInView", "onViewportEnter", "onViewportLeave", "viewport", "layoutScroll", ]); /** * Check whether a prop name is a valid `MotionProp` key. * * @param key - Name of the property to check * @returns `true` is key is a valid `MotionProp`. * * @public */ function isValidMotionProp(key) { return validMotionProps.has(key); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs var shouldForward = function (key) { return !isValidMotionProp(key); }; function loadExternalIsValidProp(isValidProp) { if (!isValidProp) return; // Explicitly filter our events shouldForward = function (key) { return key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key); }; } /** * Emotion and Styled Components both allow users to pass through arbitrary props to their components * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which * of these should be passed to the underlying DOM node. * * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of * `@emotion/is-prop-valid`, however to fix this problem we need to use it. * * By making it an optionalDependency we can offer this functionality only in the situations where it's * actually required. */ try { /** * We attempt to import this package but require won't be defined in esm environments, in that case * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed * in favour of explicit injection. */ loadExternalIsValidProp(require("@emotion/is-prop-valid").default); } catch (_a) { // We don't need to actually do anything here - the fallback is the existing `isPropValid`. } function filterProps(props, isDom, forwardMotionProps) { var filteredProps = {}; for (var key in props) { if (shouldForward(key) || (forwardMotionProps === true && isValidMotionProp(key)) || (!isDom && !isValidMotionProp(key)) || // If trying to use native HTML drag events, forward drag listeners (props["draggable"] && key.startsWith("onDrag"))) { filteredProps[key] = props[key]; } } return filteredProps; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs function calcOrigin(origin, offset, size) { return typeof origin === "string" ? origin : px.transform(offset + size * origin); } /** * The SVG transform origin defaults are different to CSS and is less intuitive, * so we use the measured dimensions of the SVG to reconcile these. */ function calcSVGTransformOrigin(dimensions, originX, originY) { var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width); var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height); return "".concat(pxOriginX, " ").concat(pxOriginY); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/path.mjs var dashKeys = { offset: "stroke-dashoffset", array: "stroke-dasharray", }; var camelKeys = { offset: "strokeDashoffset", array: "strokeDasharray", }; /** * Build SVG path properties. Uses the path's measured length to convert * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset * and stroke-dasharray attributes. * * This function is mutative to reduce per-frame GC. */ function buildSVGPath(attrs, length, spacing, offset, useDashCase) { if (spacing === void 0) { spacing = 1; } if (offset === void 0) { offset = 0; } if (useDashCase === void 0) { useDashCase = true; } // Normalise path length by setting SVG attribute pathLength to 1 attrs.pathLength = 1; // We use dash case when setting attributes directly to the DOM node and camel case // when defining props on a React component. var keys = useDashCase ? dashKeys : camelKeys; // Build the dash offset attrs[keys.offset] = px.transform(-offset); // Build the dash array var pathLength = px.transform(length); var pathSpacing = px.transform(spacing); attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs /** * Build SVG visual attrbutes, like cx and style.transform */ function buildSVGAttrs(state, _a, options, transformTemplate) { var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c, // This is object creation, which we try to avoid per-frame. latest = __rest(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]); buildHTMLStyles(state, latest, options, transformTemplate); state.attrs = state.style; state.style = {}; var attrs = state.attrs, style = state.style, dimensions = state.dimensions; /** * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs * and copy it into style. */ if (attrs.transform) { if (dimensions) style.transform = attrs.transform; delete attrs.transform; } // Parse transformOrigin if (dimensions && (originX !== undefined || originY !== undefined || style.transform)) { style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5); } // Treat x/y not as shortcuts but as actual attributes if (attrX !== undefined) attrs.x = attrX; if (attrY !== undefined) attrs.y = attrY; // Build SVG path if one has been defined if (pathLength !== undefined) { buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false); } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs var createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/use-props.mjs function useSVGProps(props, visualState) { var visualProps = (0,external_React_.useMemo)(function () { var state = createSvgRenderState(); buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate); return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) }); }, [visualState]); if (props.style) { var rawStyles = {}; copyRawValuesOnly(rawStyles, props.style, props); visualProps.style = __assign(__assign({}, rawStyles), visualProps.style); } return visualProps; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/use-render.mjs function createUseRender(forwardMotionProps) { if (forwardMotionProps === void 0) { forwardMotionProps = false; } var useRender = function (Component, props, projectionId, ref, _a, isStatic) { var latestValues = _a.latestValues; var useVisualProps = isSVGComponent(Component) ? useSVGProps : useHTMLProps; var visualProps = useVisualProps(props, latestValues, isStatic); var filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps); var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref }); if (projectionId) { elementProps["data-projection-id"] = projectionId; } return (0,external_React_.createElement)(Component, elementProps); }; return useRender; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g; var REPLACE_TEMPLATE = "$1-$2"; /** * Convert camelCase to dash-case properties. */ var camelToDash = function (str) { return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase(); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/render.mjs function renderHTML(element, _a, styleProp, projection) { var style = _a.style, vars = _a.vars; Object.assign(element.style, style, projection && projection.getProjectionStyles(styleProp)); // Loop over any CSS variables and assign those. for (var key in vars) { element.style.setProperty(key, vars[key]); } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs /** * A set of attribute names that are always read/written as camel case. */ var camelCaseAttributes = new Set([ "baseFrequency", "diffuseConstant", "kernelMatrix", "kernelUnitLength", "keySplines", "keyTimes", "limitingConeAngle", "markerHeight", "markerWidth", "numOctaves", "targetX", "targetY", "surfaceScale", "specularConstant", "specularExponent", "stdDeviation", "tableValues", "viewBox", "gradientTransform", "pathLength", ]); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/render.mjs function renderSVG(element, renderState) { renderHTML(element, renderState); for (var key in renderState.attrs) { element.setAttribute(!camelCaseAttributes.has(key) ? camelToDash(key) : key, renderState.attrs[key]); } } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs function scrapeMotionValuesFromProps(props) { var style = props.style; var newValues = {}; for (var key in style) { if (isMotionValue(style[key]) || isForcedMotionValue(key, props)) { newValues[key] = style[key]; } } return newValues; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs function scrape_motion_values_scrapeMotionValuesFromProps(props) { var newValues = scrapeMotionValuesFromProps(props); for (var key in props) { if (isMotionValue(props[key])) { var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key; newValues[targetKey] = props[key]; } } return newValues; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs function isAnimationControls(v) { return typeof v === "object" && typeof v.start === "function"; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs function makeState(_a, props, context, presenceContext) { var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount; var state = { latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps), renderState: createRenderState(), }; if (onMount) { state.mount = function (instance) { return onMount(props, instance, state); }; } return state; } var makeUseVisualState = function (config) { return function (props, isStatic) { var context = (0,external_React_.useContext)(MotionContext); var presenceContext = (0,external_React_.useContext)(PresenceContext_PresenceContext); return isStatic ? makeState(config, props, context, presenceContext) : useConstant(function () { return makeState(config, props, context, presenceContext); }); }; }; function makeLatestValues(props, context, presenceContext, scrapeMotionValues) { var values = {}; var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false; var motionValues = scrapeMotionValues(props); for (var key in motionValues) { values[key] = resolveMotionValue(motionValues[key]); } var initial = props.initial, animate = props.animate; var isControllingVariants = checkIfControllingVariants(props); var isVariantNode = checkIfVariantNode(props); if (context && isVariantNode && !isControllingVariants && props.inherit !== false) { initial !== null && initial !== void 0 ? initial : (initial = context.initial); animate !== null && animate !== void 0 ? animate : (animate = context.animate); } var initialAnimationIsBlocked = blockInitialAnimation || initial === false; var variantToSet = initialAnimationIsBlocked ? animate : initial; if (variantToSet && typeof variantToSet !== "boolean" && !isAnimationControls(variantToSet)) { var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet]; list.forEach(function (definition) { var resolved = resolveVariantFromProps(props, definition); if (!resolved) return; var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, ["transitionEnd", "transition"]); for (var key in target) { var valueTarget = target[key]; if (Array.isArray(valueTarget)) { /** * Take final keyframe if the initial animation is blocked because * we want to initialise at the end of that blocked animation. */ var index = initialAnimationIsBlocked ? valueTarget.length - 1 : 0; valueTarget = valueTarget[index]; } if (valueTarget !== null) { values[key] = valueTarget; } } for (var key in transitionEnd) values[key] = transitionEnd[key]; }); } return values; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/svg/config-motion.mjs var svgMotionConfig = { useVisualState: makeUseVisualState({ scrapeMotionValuesFromProps: scrape_motion_values_scrapeMotionValuesFromProps, createRenderState: createSvgRenderState, onMount: function (props, instance, _a) { var renderState = _a.renderState, latestValues = _a.latestValues; try { renderState.dimensions = typeof instance.getBBox === "function" ? instance.getBBox() : instance.getBoundingClientRect(); } catch (e) { // Most likely trying to measure an unrendered element under Firefox renderState.dimensions = { x: 0, y: 0, width: 0, height: 0, }; } buildSVGAttrs(renderState, latestValues, { enableHardwareAcceleration: false }, props.transformTemplate); // TODO: Replace with direct assignment renderSVG(instance, renderState); }, }), }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/html/config-motion.mjs var htmlMotionConfig = { useVisualState: makeUseVisualState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps, createRenderState: createHtmlRenderState, }), }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs function create_config_createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement, projectionNodeConstructor) { var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b; var baseConfig = isSVGComponent(Component) ? svgMotionConfig : htmlMotionConfig; return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement, projectionNodeConstructor: projectionNodeConstructor, Component: Component }); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/types.mjs var AnimationType; (function (AnimationType) { AnimationType["Animate"] = "animate"; AnimationType["Hover"] = "whileHover"; AnimationType["Tap"] = "whileTap"; AnimationType["Drag"] = "whileDrag"; AnimationType["Focus"] = "whileFocus"; AnimationType["InView"] = "whileInView"; AnimationType["Exit"] = "exit"; })(AnimationType || (AnimationType = {})); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/use-dom-event.mjs function addDomEvent(target, eventName, handler, options) { target.addEventListener(eventName, handler, options); return function () { return target.removeEventListener(eventName, handler, options); }; } /** * Attaches an event listener directly to the provided DOM element. * * Bypassing React's event system can be desirable, for instance when attaching non-passive * event handlers. * * ```jsx * const ref = useRef(null) * * useDomEvent(ref, 'wheel', onWheel, { passive: false }) * * return
* ``` * * @param ref - React.RefObject that's been provided to the element you want to bind the listener to. * @param eventName - Name of the event you want listen for. * @param handler - Function to fire when receiving the event. * @param options - Options to pass to `Event.addEventListener`. * * @public */ function useDomEvent(ref, eventName, handler, options) { (0,external_React_.useEffect)(function () { var element = ref.current; if (handler && element) { return addDomEvent(element, eventName, handler, options); } }, [ref, eventName, handler, options]); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs /** * * @param props * @param ref * @internal */ function useFocusGesture(_a) { var whileFocus = _a.whileFocus, visualElement = _a.visualElement; var onFocus = function () { var _a; (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, true); }; var onBlur = function () { var _a; (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Focus, false); }; useDomEvent(visualElement, "focus", whileFocus ? onFocus : undefined); useDomEvent(visualElement, "blur", whileFocus ? onBlur : undefined); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs function isMouseEvent(event) { // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check. if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) { return !!(event.pointerType === "mouse"); } return event instanceof MouseEvent; } function isTouchEvent(event) { var hasTouches = !!event.touches; return hasTouches; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/event-info.mjs /** * Filters out events not attached to the primary pointer (currently left mouse button) * @param eventHandler */ function filterPrimaryPointer(eventHandler) { return function (event) { var isMouseEvent = event instanceof MouseEvent; var isPrimaryPointer = !isMouseEvent || (isMouseEvent && event.button === 0); if (isPrimaryPointer) { eventHandler(event); } }; } var defaultPagePoint = { pageX: 0, pageY: 0 }; function pointFromTouch(e, pointType) { if (pointType === void 0) { pointType = "page"; } var primaryTouch = e.touches[0] || e.changedTouches[0]; var point = primaryTouch || defaultPagePoint; return { x: point[pointType + "X"], y: point[pointType + "Y"], }; } function pointFromMouse(point, pointType) { if (pointType === void 0) { pointType = "page"; } return { x: point[pointType + "X"], y: point[pointType + "Y"], }; } function extractEventInfo(event, pointType) { if (pointType === void 0) { pointType = "page"; } return { point: isTouchEvent(event) ? pointFromTouch(event, pointType) : pointFromMouse(event, pointType), }; } var wrapHandler = function (handler, shouldFilterPrimaryPointer) { if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; } var listener = function (event) { return handler(event, extractEventInfo(event)); }; return shouldFilterPrimaryPointer ? filterPrimaryPointer(listener) : listener; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/utils.mjs // We check for event support via functions in case they've been mocked by a testing suite. var supportsPointerEvents = function () { return is_browser_isBrowser && window.onpointerdown === null; }; var supportsTouchEvents = function () { return is_browser_isBrowser && window.ontouchstart === null; }; var supportsMouseEvents = function () { return is_browser_isBrowser && window.onmousedown === null; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/events/use-pointer-event.mjs var mouseEventNames = { pointerdown: "mousedown", pointermove: "mousemove", pointerup: "mouseup", pointercancel: "mousecancel", pointerover: "mouseover", pointerout: "mouseout", pointerenter: "mouseenter", pointerleave: "mouseleave", }; var touchEventNames = { pointerdown: "touchstart", pointermove: "touchmove", pointerup: "touchend", pointercancel: "touchcancel", }; function getPointerEventName(name) { if (supportsPointerEvents()) { return name; } else if (supportsTouchEvents()) { return touchEventNames[name]; } else if (supportsMouseEvents()) { return mouseEventNames[name]; } return name; } function addPointerEvent(target, eventName, handler, options) { return addDomEvent(target, getPointerEventName(eventName), wrapHandler(handler, eventName === "pointerdown"), options); } function usePointerEvent(ref, eventName, handler, options) { return useDomEvent(ref, getPointerEventName(eventName), handler && wrapHandler(handler, eventName === "pointerdown"), options); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs function createLock(name) { var lock = null; return function () { var openLock = function () { lock = null; }; if (lock === null) { lock = name; return openLock; } return false; }; } var globalHorizontalLock = createLock("dragHorizontal"); var globalVerticalLock = createLock("dragVertical"); function getGlobalLock(drag) { var lock = false; if (drag === "y") { lock = globalVerticalLock(); } else if (drag === "x") { lock = globalHorizontalLock(); } else { var openHorizontal_1 = globalHorizontalLock(); var openVertical_1 = globalVerticalLock(); if (openHorizontal_1 && openVertical_1) { lock = function () { openHorizontal_1(); openVertical_1(); }; } else { // Release the locks because we don't use them if (openHorizontal_1) openHorizontal_1(); if (openVertical_1) openVertical_1(); } } return lock; } function isDragActive() { // Check the gesture lock - if we get it, it means no drag gesture is active // and we can safely fire the tap gesture. var openGestureLock = getGlobalLock(true); if (!openGestureLock) return true; openGestureLock(); return false; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs function createHoverEvent(visualElement, isActive, callback) { return function (event, info) { var _a; if (!isMouseEvent(event) || isDragActive()) return; /** * Ensure we trigger animations before firing event callback */ (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Hover, isActive); callback === null || callback === void 0 ? void 0 : callback(event, info); }; } function useHoverGesture(_a) { var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover, visualElement = _a.visualElement; usePointerEvent(visualElement, "pointerenter", onHoverStart || whileHover ? createHoverEvent(visualElement, true, onHoverStart) : undefined); usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs /** * Recursively traverse up the tree to check whether the provided child node * is the parent or a descendant of it. * * @param parent - Element to find * @param child - Element to test against parent */ var isNodeOrChild = function (parent, child) { if (!child) { return false; } else if (parent === child) { return true; } else { return isNodeOrChild(parent, child.parentElement); } }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs function useUnmountEffect(callback) { return (0,external_React_.useEffect)(function () { return function () { return callback(); }; }, []); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs /** * @param handlers - * @internal */ function useTapGesture(_a) { var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap, visualElement = _a.visualElement; var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap; var isPressing = (0,external_React_.useRef)(false); var cancelPointerEndListeners = (0,external_React_.useRef)(null); function removePointerEndListener() { var _a; (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners); cancelPointerEndListeners.current = null; } function checkPointerEnd() { var _a; removePointerEndListener(); isPressing.current = false; (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, false); return !isDragActive(); } function onPointerUp(event, info) { if (!checkPointerEnd()) return; /** * We only count this as a tap gesture if the event.target is the same * as, or a child of, this component's element */ !isNodeOrChild(visualElement.getInstance(), event.target) ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info); } function onPointerCancel(event, info) { if (!checkPointerEnd()) return; onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info); } function onPointerDown(event, info) { var _a; removePointerEndListener(); if (isPressing.current) return; isPressing.current = true; cancelPointerEndListeners.current = pipe(addPointerEvent(window, "pointerup", onPointerUp), addPointerEvent(window, "pointercancel", onPointerCancel)); /** * Ensure we trigger animations before firing event callback */ (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Tap, true); onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info); } usePointerEvent(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined); useUnmountEffect(removePointerEndListener); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs /** * Map an IntersectionHandler callback to an element. We only ever make one handler for one * element, so even though these handlers might all be triggered by different * observers, we can keep them in the same map. */ var observerCallbacks = new WeakMap(); /** * Multiple observers can be created for multiple element/document roots. Each with * different settings. So here we store dictionaries of observers to each root, * using serialised settings (threshold/margin) as lookup keys. */ var observers = new WeakMap(); var fireObserverCallback = function (entry) { var _a; (_a = observerCallbacks.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry); }; var fireAllObserverCallbacks = function (entries) { entries.forEach(fireObserverCallback); }; function initIntersectionObserver(_a) { var root = _a.root, options = __rest(_a, ["root"]); var lookupRoot = root || document; /** * If we don't have an observer lookup map for this root, create one. */ if (!observers.has(lookupRoot)) { observers.set(lookupRoot, {}); } var rootObservers = observers.get(lookupRoot); var key = JSON.stringify(options); /** * If we don't have an observer for this combination of root and settings, * create one. */ if (!rootObservers[key]) { rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __assign({ root: root }, options)); } return rootObservers[key]; } function observeIntersection(element, options, callback) { var rootInteresectionObserver = initIntersectionObserver(options); observerCallbacks.set(element, callback); rootInteresectionObserver.observe(element); return function () { observerCallbacks.delete(element); rootInteresectionObserver.unobserve(element); }; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs function useViewport(_a) { var visualElement = _a.visualElement, whileInView = _a.whileInView, onViewportEnter = _a.onViewportEnter, onViewportLeave = _a.onViewportLeave, _b = _a.viewport, viewport = _b === void 0 ? {} : _b; var state = (0,external_React_.useRef)({ hasEnteredView: false, isInView: false, }); var shouldObserve = Boolean(whileInView || onViewportEnter || onViewportLeave); if (viewport.once && state.current.hasEnteredView) shouldObserve = false; var useObserver = typeof IntersectionObserver === "undefined" ? useMissingIntersectionObserver : use_viewport_useIntersectionObserver; useObserver(shouldObserve, state.current, visualElement, viewport); } var thresholdNames = { some: 0, all: 1, }; function use_viewport_useIntersectionObserver(shouldObserve, state, visualElement, _a) { var root = _a.root, rootMargin = _a.margin, _b = _a.amount, amount = _b === void 0 ? "some" : _b, once = _a.once; (0,external_React_.useEffect)(function () { if (!shouldObserve) return; var options = { root: root === null || root === void 0 ? void 0 : root.current, rootMargin: rootMargin, threshold: typeof amount === "number" ? amount : thresholdNames[amount], }; var intersectionCallback = function (entry) { var _a; var isIntersecting = entry.isIntersecting; /** * If there's been no change in the viewport state, early return. */ if (state.isInView === isIntersecting) return; state.isInView = isIntersecting; /** * Handle hasEnteredView. If this is only meant to run once, and * element isn't visible, early return. Otherwise set hasEnteredView to true. */ if (once && !isIntersecting && state.hasEnteredView) { return; } else if (isIntersecting) { state.hasEnteredView = true; } (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, isIntersecting); /** * Use the latest committed props rather than the ones in scope * when this observer is created */ var props = visualElement.getProps(); var callback = isIntersecting ? props.onViewportEnter : props.onViewportLeave; callback === null || callback === void 0 ? void 0 : callback(entry); }; return observeIntersection(visualElement.getInstance(), options, intersectionCallback); }, [shouldObserve, root, rootMargin, amount]); } /** * If IntersectionObserver is missing, we activate inView and fire onViewportEnter * on mount. This way, the page will be in the state the author expects users * to see it in for everyone. */ function useMissingIntersectionObserver(shouldObserve, state, visualElement, _a) { var _b = _a.fallback, fallback = _b === void 0 ? true : _b; (0,external_React_.useEffect)(function () { if (!shouldObserve || !fallback) return; if (false) {} /** * Fire this in an rAF because, at this point, the animation state * won't have flushed for the first time and there's certain logic in * there that behaves differently on the initial animation. * * This hook should be quite rarely called so setting this in an rAF * is preferred to changing the behaviour of the animation state. */ requestAnimationFrame(function () { var _a; state.hasEnteredView = true; var onViewportEnter = visualElement.getProps().onViewportEnter; onViewportEnter === null || onViewportEnter === void 0 ? void 0 : onViewportEnter(null); (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.InView, true); }); }, [shouldObserve]); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs var makeRenderlessComponent = function (hook) { return function (props) { hook(props); return null; }; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/gestures.mjs var gestureAnimations = { inView: makeRenderlessComponent(useViewport), tap: makeRenderlessComponent(useTapGesture), focus: makeRenderlessComponent(useFocusGesture), hover: makeRenderlessComponent(useHoverGesture), }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-id.mjs var counter = 0; var incrementId = function () { return counter++; }; var useId = function () { return useConstant(incrementId); }; /** * Ideally we'd use the following code to support React 18 optionally. * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all). * Need to come up with a different way of figuring this out. */ // export const useId = (React as any).useId // ? (React as any).useId // : () => useConstant(incrementId) ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs /** * When a component is the child of `AnimatePresence`, it can use `usePresence` * to access information about whether it's still present in the React tree. * * ```jsx * import { usePresence } from "framer-motion" * * export const Component = () => { * const [isPresent, safeToRemove] = usePresence() * * useEffect(() => { * !isPresent && setTimeout(safeToRemove, 1000) * }, [isPresent]) * * return
* } * ``` * * If `isPresent` is `false`, it means that a component has been removed the tree, but * `AnimatePresence` won't really remove it until `safeToRemove` has been called. * * @public */ function usePresence() { var context = (0,external_React_.useContext)(PresenceContext_PresenceContext); if (context === null) return [true, null]; var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register; // It's safe to call the following hooks conditionally (after an early return) because the context will always // either be null or non-null for the lifespan of the component. // Replace with useId when released in React var id = useId(); (0,external_React_.useEffect)(function () { return register(id); }, []); var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); }; return !isPresent && onExitComplete ? [false, safeToRemove] : [true]; } /** * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. * There is no `safeToRemove` function. * * ```jsx * import { useIsPresent } from "framer-motion" * * export const Component = () => { * const isPresent = useIsPresent() * * useEffect(() => { * !isPresent && console.log("I've been removed!") * }, [isPresent]) * * return
* } * ``` * * @public */ function useIsPresent() { return isPresent(useContext(PresenceContext)); } function isPresent(context) { return context === null ? true : context.isPresent; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/shallow-compare.mjs function shallowCompare(next, prev) { if (!Array.isArray(prev)) return false; var prevLength = prev.length; if (prevLength !== next.length) return false; for (var i = 0; i < prevLength; i++) { if (prev[i] !== next[i]) return false; } return true; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs /** * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" */ var isNumericalString = function (v) { return /^\-?\d*\.?\d+$/.test(v); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs /** * Check if the value is a zero value string like "0px" or "0%" */ var isZeroValueString = function (v) { return /^0[^.\s]+$/.test(v); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs /** * Tests a provided value against a ValueType */ var testValueType = function (v) { return function (type) { return type.test(v); }; }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs /** * ValueType for "auto" */ var auto = { test: function (v) { return v === "auto"; }, parse: function (v) { return v; }, }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs /** * A list of value types commonly used for dimensions */ var dimensionValueTypes = [number, px, percent, degrees, vw, vh, auto]; /** * Tests a dimensional value against the list of dimension ValueTypes */ var findDimensionValueType = function (v) { return dimensionValueTypes.find(testValueType(v)); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs /** * A list of all ValueTypes */ var valueTypes = tslib_es6_spreadArray(tslib_es6_spreadArray([], tslib_es6_read(dimensionValueTypes), false), [color, complex], false); /** * Tests a value against the list of ValueTypes */ var findValueType = function (v) { return valueTypes.find(testValueType(v)); }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/setters.mjs /** * Set VisualElement's MotionValue, creating a new MotionValue for it if * it doesn't exist. */ function setMotionValue(visualElement, key, value) { if (visualElement.hasValue(key)) { visualElement.getValue(key).set(value); } else { visualElement.addValue(key, motionValue(value)); } } function setTarget(visualElement, definition) { var resolved = resolveVariant(visualElement, definition); var _a = resolved ? visualElement.makeTargetAnimatable(resolved, false) : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b; _a.transition; var target = __rest(_a, ["transitionEnd", "transition"]); target = __assign(__assign({}, target), transitionEnd); for (var key in target) { var value = resolveFinalValueInKeyframes(target[key]); setMotionValue(visualElement, key, value); } } function setVariants(visualElement, variantLabels) { var reversedLabels = __spreadArray([], __read(variantLabels), false).reverse(); reversedLabels.forEach(function (key) { var _a; var variant = visualElement.getVariant(key); variant && setTarget(visualElement, variant); (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { setVariants(child, variantLabels); }); }); } function setValues(visualElement, definition) { if (Array.isArray(definition)) { return setVariants(visualElement, definition); } else if (typeof definition === "string") { return setVariants(visualElement, [definition]); } else { setTarget(visualElement, definition); } } function checkTargetForNewValues(visualElement, target, origin) { var _a, _b, _c; var _d; var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); }); var numNewValues = newValueKeys.length; if (!numNewValues) return; for (var i = 0; i < numNewValues; i++) { var key = newValueKeys[i]; var targetValue = target[key]; var value = null; /** * If the target is a series of keyframes, we can use the first value * in the array. If this first value is null, we'll still need to read from the DOM. */ if (Array.isArray(targetValue)) { value = targetValue[0]; } /** * If the target isn't keyframes, or the first keyframe was null, we need to * first check if an origin value was explicitly defined in the transition as "from", * if not read the value from the DOM. As an absolute fallback, take the defined target value. */ if (value === null) { value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key]; } /** * If value is still undefined or null, ignore it. Preferably this would throw, * but this was causing issues in Framer. */ if (value === undefined || value === null) continue; if (typeof value === "string" && (isNumericalString(value) || isZeroValueString(value))) { // If this is a number read as a string, ie "0" or "200", convert it to a number value = parseFloat(value); } else if (!findValueType(value) && complex.test(targetValue)) { value = animatable_none_getAnimatableNone(key, targetValue); } visualElement.addValue(key, motionValue(value)); (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value); visualElement.setBaseTarget(key, value); } } function getOriginFromTransition(key, transition) { if (!transition) return; var valueTransition = transition[key] || transition["default"] || transition; return valueTransition.from; } function getOrigin(target, transition, visualElement) { var _a, _b; var origin = {}; for (var key in target) { origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get(); } return origin; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/animation.mjs /** * @internal */ function animateVisualElement(visualElement, definition, options) { if (options === void 0) { options = {}; } visualElement.notifyAnimationStart(definition); var animation; if (Array.isArray(definition)) { var animations = definition.map(function (variant) { return animateVariant(visualElement, variant, options); }); animation = Promise.all(animations); } else if (typeof definition === "string") { animation = animateVariant(visualElement, definition, options); } else { var resolvedDefinition = typeof definition === "function" ? resolveVariant(visualElement, definition, options.custom) : definition; animation = animateTarget(visualElement, resolvedDefinition, options); } return animation.then(function () { return visualElement.notifyAnimationComplete(definition); }); } function animateVariant(visualElement, variant, options) { var _a; if (options === void 0) { options = {}; } var resolved = resolveVariant(visualElement, variant, options.custom); var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b; if (options.transitionOverride) { transition = options.transitionOverride; } /** * If we have a variant, create a callback that runs it as an animation. * Otherwise, we resolve a Promise immediately for a composable no-op. */ var getAnimation = resolved ? function () { return animateTarget(visualElement, resolved, options); } : function () { return Promise.resolve(); }; /** * If we have children, create a callback that runs all their animations. * Otherwise, we resolve a Promise immediately for a composable no-op. */ var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function (forwardDelay) { if (forwardDelay === void 0) { forwardDelay = 0; } var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection; return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options); } : function () { return Promise.resolve(); }; /** * If the transition explicitly defines a "when" option, we need to resolve either * this animation or all children animations before playing the other. */ var when = transition.when; if (when) { var _c = tslib_es6_read(when === "beforeChildren" ? [getAnimation, getChildAnimations] : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1]; return first().then(last); } else { return Promise.all([getAnimation(), getChildAnimations(options.delay)]); } } /** * @internal */ function animateTarget(visualElement, definition, _a) { var _b; var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type; var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = __rest(_e, ["transition", "transitionEnd"]); if (transitionOverride) transition = transitionOverride; var animations = []; var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]); for (var key in target) { var value = visualElement.getValue(key); var valueTarget = target[key]; if (!value || valueTarget === undefined || (animationTypeState && shouldBlockAnimation(animationTypeState, key))) { continue; } var valueTransition = __assign({ delay: delay }, transition); /** * Make animation instant if this is a transform prop and we should reduce motion. */ if (visualElement.shouldReduceMotion && isTransformProp(key)) { valueTransition = __assign(__assign({}, valueTransition), { type: false, delay: 0 }); } var animation = startAnimation(key, value, valueTarget, valueTransition); animations.push(animation); } return Promise.all(animations).then(function () { transitionEnd && setTarget(visualElement, transitionEnd); }); } function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) { if (delayChildren === void 0) { delayChildren = 0; } if (staggerChildren === void 0) { staggerChildren = 0; } if (staggerDirection === void 0) { staggerDirection = 1; } var animations = []; var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren; var generateStaggerDuration = staggerDirection === 1 ? function (i) { if (i === void 0) { i = 0; } return i * staggerChildren; } : function (i) { if (i === void 0) { i = 0; } return maxStaggerDuration - i * staggerChildren; }; Array.from(visualElement.variantChildren) .sort(sortByTreeOrder) .forEach(function (child, i) { animations.push(animateVariant(child, variant, __assign(__assign({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); })); }); return Promise.all(animations); } function stopAnimation(visualElement) { visualElement.forEachValue(function (value) { return value.stop(); }); } function sortByTreeOrder(a, b) { return a.sortNodePosition(b); } /** * Decide whether we should block this animation. Previously, we achieved this * just by checking whether the key was listed in protectedKeys, but this * posed problems if an animation was triggered by afterChildren and protectedKeys * had been set to true in the meantime. */ function shouldBlockAnimation(_a, key) { var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating; var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true; needsAnimating[key] = false; return shouldBlock; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/render/utils/animation-state.mjs var variantPriorityOrder = [ AnimationType.Animate, AnimationType.InView, AnimationType.Focus, AnimationType.Hover, AnimationType.Tap, AnimationType.Drag, AnimationType.Exit, ]; var reversePriorityOrder = tslib_es6_spreadArray([], tslib_es6_read(variantPriorityOrder), false).reverse(); var numAnimationTypes = variantPriorityOrder.length; function animateList(visualElement) { return function (animations) { return Promise.all(animations.map(function (_a) { var animation = _a.animation, options = _a.options; return animateVisualElement(visualElement, animation, options); })); }; } function createAnimationState(visualElement) { var animate = animateList(visualElement); var state = createState(); var allAnimatedKeys = {}; var isInitialRender = true; /** * This function will be used to reduce the animation definitions for * each active animation type into an object of resolved values for it. */ var buildResolvedTypeValues = function (acc, definition) { var resolved = resolveVariant(visualElement, definition); if (resolved) { resolved.transition; var transitionEnd = resolved.transitionEnd, target = __rest(resolved, ["transition", "transitionEnd"]); acc = __assign(__assign(__assign({}, acc), target), transitionEnd); } return acc; }; function isAnimated(key) { return allAnimatedKeys[key] !== undefined; } /** * This just allows us to inject mocked animation functions * @internal */ function setAnimateFunction(makeAnimator) { animate = makeAnimator(visualElement); } /** * When we receive new props, we need to: * 1. Create a list of protected keys for each type. This is a directory of * value keys that are currently being "handled" by types of a higher priority * so that whenever an animation is played of a given type, these values are * protected from being animated. * 2. Determine if an animation type needs animating. * 3. Determine if any values have been removed from a type and figure out * what to animate those to. */ function animateChanges(options, changedActiveType) { var _a; var props = visualElement.getProps(); var context = visualElement.getVariantContext(true) || {}; /** * A list of animations that we'll build into as we iterate through the animation * types. This will get executed at the end of the function. */ var animations = []; /** * Keep track of which values have been removed. Then, as we hit lower priority * animation types, we can check if they contain removed values and animate to that. */ var removedKeys = new Set(); /** * A dictionary of all encountered keys. This is an object to let us build into and * copy it without iteration. Each time we hit an animation type we set its protected * keys - the keys its not allowed to animate - to the latest version of this object. */ var encounteredKeys = {}; /** * If a variant has been removed at a given index, and this component is controlling * variant animations, we want to ensure lower-priority variants are forced to animate. */ var removedVariantIndex = Infinity; var _loop_1 = function (i) { var type = reversePriorityOrder[i]; var typeState = state[type]; var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type]; var propIsVariant = isVariantLabel(prop); /** * If this type has *just* changed isActive status, set activeDelta * to that status. Otherwise set to null. */ var activeDelta = type === changedActiveType ? typeState.isActive : null; if (activeDelta === false) removedVariantIndex = i; /** * If this prop is an inherited variant, rather than been set directly on the * component itself, we want to make sure we allow the parent to trigger animations. * * TODO: Can probably change this to a !isControllingVariants check */ var isInherited = prop === context[type] && prop !== props[type] && propIsVariant; /** * */ if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) { isInherited = false; } /** * Set all encountered keys so far as the protected keys for this type. This will * be any key that has been animated or otherwise handled by active, higher-priortiy types. */ typeState.protectedKeys = __assign({}, encounteredKeys); // Check if we can skip analysing this prop early if ( // If it isn't active and hasn't *just* been set as inactive (!typeState.isActive && activeDelta === null) || // If we didn't and don't have any defined prop for this animation type (!prop && !typeState.prevProp) || // Or if the prop doesn't define an animation isAnimationControls(prop) || typeof prop === "boolean") { return "continue"; } /** * As we go look through the values defined on this type, if we detect * a changed value or a value that was removed in a higher priority, we set * this to true and add this prop to the animation list. */ var variantDidChange = checkVariantsDidChange(typeState.prevProp, prop); var shouldAnimateType = variantDidChange || // If we're making this variant active, we want to always make it active (type === changedActiveType && typeState.isActive && !isInherited && propIsVariant) || // If we removed a higher-priority variant (i is in reverse order) (i > removedVariantIndex && propIsVariant); /** * As animations can be set as variant lists, variants or target objects, we * coerce everything to an array if it isn't one already */ var definitionList = Array.isArray(prop) ? prop : [prop]; /** * Build an object of all the resolved values. We'll use this in the subsequent * animateChanges calls to determine whether a value has changed. */ var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {}); if (activeDelta === false) resolvedValues = {}; /** * Now we need to loop through all the keys in the prev prop and this prop, * and decide: * 1. If the value has changed, and needs animating * 2. If it has been removed, and needs adding to the removedKeys set * 3. If it has been removed in a higher priority type and needs animating * 4. If it hasn't been removed in a higher priority but hasn't changed, and * needs adding to the type's protectedKeys list. */ var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b; var allKeys = __assign(__assign({}, prevResolvedValues), resolvedValues); var markToAnimate = function (key) { shouldAnimateType = true; removedKeys.delete(key); typeState.needsAnimating[key] = true; }; for (var key in allKeys) { var next = resolvedValues[key]; var prev = prevResolvedValues[key]; // If we've already handled this we can just skip ahead if (encounteredKeys.hasOwnProperty(key)) continue; /** * If the value has changed, we probably want to animate it. */ if (next !== prev) { /** * If both values are keyframes, we need to shallow compare them to * detect whether any value has changed. If it has, we animate it. */ if (isKeyframesTarget(next) && isKeyframesTarget(prev)) { if (!shallowCompare(next, prev) || variantDidChange) { markToAnimate(key); } else { /** * If it hasn't changed, we want to ensure it doesn't animate by * adding it to the list of protected keys. */ typeState.protectedKeys[key] = true; } } else if (next !== undefined) { // If next is defined and doesn't equal prev, it needs animating markToAnimate(key); } else { // If it's undefined, it's been removed. removedKeys.add(key); } } else if (next !== undefined && removedKeys.has(key)) { /** * If next hasn't changed and it isn't undefined, we want to check if it's * been removed by a higher priority */ markToAnimate(key); } else { /** * If it hasn't changed, we add it to the list of protected values * to ensure it doesn't get animated. */ typeState.protectedKeys[key] = true; } } /** * Update the typeState so next time animateChanges is called we can compare the * latest prop and resolvedValues to these. */ typeState.prevProp = prop; typeState.prevResolvedValues = resolvedValues; /** * */ if (typeState.isActive) { encounteredKeys = __assign(__assign({}, encounteredKeys), resolvedValues); } if (isInitialRender && visualElement.blockInitialAnimation) { shouldAnimateType = false; } /** * If this is an inherited prop we want to hard-block animations * TODO: Test as this should probably still handle animations triggered * by removed values? */ if (shouldAnimateType && !isInherited) { animations.push.apply(animations, tslib_es6_spreadArray([], tslib_es6_read(definitionList.map(function (animation) { return ({ animation: animation, options: __assign({ type: type }, options), }); })), false)); } }; /** * Iterate through all animation types in reverse priority order. For each, we want to * detect which values it's handling and whether or not they've changed (and therefore * need to be animated). If any values have been removed, we want to detect those in * lower priority props and flag for animation. */ for (var i = 0; i < numAnimationTypes; i++) { _loop_1(i); } allAnimatedKeys = __assign({}, encounteredKeys); /** * If there are some removed value that haven't been dealt with, * we need to create a new animation that falls back either to the value * defined in the style prop, or the last read value. */ if (removedKeys.size) { var fallbackAnimation_1 = {}; removedKeys.forEach(function (key) { var fallbackTarget = visualElement.getBaseTarget(key); if (fallbackTarget !== undefined) { fallbackAnimation_1[key] = fallbackTarget; } }); animations.push({ animation: fallbackAnimation_1 }); } var shouldAnimate = Boolean(animations.length); if (isInitialRender && props.initial === false && !visualElement.manuallyAnimateOnMount) { shouldAnimate = false; } isInitialRender = false; return shouldAnimate ? animate(animations) : Promise.resolve(); } /** * Change whether a certain animation type is active. */ function setActive(type, isActive, options) { var _a; // If the active state hasn't changed, we can safely do nothing here if (state[type].isActive === isActive) return Promise.resolve(); // Propagate active change to children (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); }); state[type].isActive = isActive; var animations = animateChanges(options, type); for (var key in state) { state[key].protectedKeys = {}; } return animations; } return { isAnimated: isAnimated, animateChanges: animateChanges, setActive: setActive, setAnimateFunction: setAnimateFunction, getState: function () { return state; }, }; } function checkVariantsDidChange(prev, next) { if (typeof next === "string") { return next !== prev; } else if (isVariantLabels(next)) { return !shallowCompare(next, prev); } return false; } function createTypeState(isActive) { if (isActive === void 0) { isActive = false; } return { isActive: isActive, protectedKeys: {}, needsAnimating: {}, prevResolvedValues: {}, }; } function createState() { var _a; return _a = {}, _a[AnimationType.Animate] = createTypeState(true), _a[AnimationType.InView] = createTypeState(), _a[AnimationType.Hover] = createTypeState(), _a[AnimationType.Tap] = createTypeState(), _a[AnimationType.Drag] = createTypeState(), _a[AnimationType.Focus] = createTypeState(), _a[AnimationType.Exit] = createTypeState(), _a; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/motion/features/animations.mjs var animations = { animation: makeRenderlessComponent(function (_a) { var visualElement = _a.visualElement, animate = _a.animate; /** * We dynamically generate the AnimationState manager as it contains a reference * to the underlying animation library. We only want to load that if we load this, * so people can optionally code split it out using the `m` component. */ visualElement.animationState || (visualElement.animationState = createAnimationState(visualElement)); /** * Subscribe any provided AnimationControls to the component's VisualElement */ if (isAnimationControls(animate)) { (0,external_React_.useEffect)(function () { return animate.subscribe(visualElement); }, [animate]); } }), exit: makeRenderlessComponent(function (props) { var custom = props.custom, visualElement = props.visualElement; var _a = tslib_es6_read(usePresence(), 2), isPresent = _a[0], safeToRemove = _a[1]; var presenceContext = (0,external_React_.useContext)(PresenceContext_PresenceContext); (0,external_React_.useEffect)(function () { var _a, _b; visualElement.isPresent = isPresent; var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom }); !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(safeToRemove)); }, [isPresent]); }), }; ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/gestures/PanSession.mjs /** * @internal */ var PanSession = /** @class */ (function () { function PanSession(event, handlers, _a) { var _this = this; var _b = _a === void 0 ? {} : _a, transformPagePoint = _b.transformPagePoint; /** * @internal */ this.startEvent = null; /** * @internal */ this.lastMoveEvent = null; /** * @internal */ this.lastMoveEventInfo = null; /** * @internal */ this.handlers = {}; this.updatePoint = function () { if (!(_this.lastMoveEvent && _this.lastMoveEventInfo)) return; var info = getPanInfo(_this.lastMoveEventInfo, _this.history); var isPanStarted = _this.startEvent !== null; // Only start panning if the offset is larger than 3 pixels. If we make it // any larger than this we'll want to reset the pointer history // on the first update to avoid visual snapping to the cursoe. var isDistancePastThreshold = distance(info.offset, { x: 0, y: 0 }) >= 3; if (!isPanStarted && !isDistancePastThreshold) return; var point = info.point; var timestamp = getFrameData().timestamp; _this.history.push(__assign(__assign({}, point), { timestamp: timestamp })); var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove; if (!isPanStarted) { onStart && onStart(_this.lastMoveEvent, info); _this.startEvent = _this.lastMoveEvent; } onMove && onMove(_this.lastMoveEvent, info); }; this.handlePointerMove = function (event, info) { _this.lastMoveEvent = event; _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint); // Because Safari doesn't trigger mouseup events when it's above a `