/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 4403: /***/ (function(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; var nativeCodeString = '[native code]'; 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 && !arg.toString.toString().includes('[native code]')) { classes.push(arg.toString()); continue; } for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } 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 {} }()); /***/ }), /***/ 1345: /***/ (function(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 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 (isWin) { 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: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; module.exports = __webpack_require__(1345); /***/ }), /***/ 5022: /***/ (function(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: /***/ (function(__unused_webpack_module, exports) { "use strict"; var __webpack_unused_export__; /** @license React v17.0.2 * 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: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { /* unused reexport */ __webpack_require__(9214); } else {} /***/ }), /***/ 7115: /***/ (function(__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; /***/ }), /***/ 3138: /***/ (function(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: /***/ (function(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; /***/ }), /***/ 9756: /***/ (function(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; /***/ }), /***/ 5372: /***/ (function(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, bigint: 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: /***/ (function(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: /***/ (function(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; /***/ }), /***/ 4821: /***/ (function(__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; /***/ }), /***/ 338: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(4821); } else {} /***/ }), /***/ 4793: /***/ (function(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; /***/ }) /******/ }); /************************************************************************/ /******/ // 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](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function() { return module['default']; } : /******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(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/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/nonce */ /******/ !function() { /******/ __webpack_require__.nc = undefined; /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "AnglePickerControl": function() { return /* reexport */ AnglePickerControl; }, "Animate": function() { return /* reexport */ Animate; }, "Autocomplete": function() { return /* reexport */ Autocomplete; }, "BaseControl": function() { return /* reexport */ base_control; }, "BlockQuotation": function() { return /* reexport */ external_wp_primitives_namespaceObject.BlockQuotation; }, "Button": function() { return /* reexport */ build_module_button; }, "ButtonGroup": function() { return /* reexport */ button_group; }, "Card": function() { return /* reexport */ card_component; }, "CardBody": function() { return /* reexport */ card_body_component; }, "CardDivider": function() { return /* reexport */ card_divider_component; }, "CardFooter": function() { return /* reexport */ card_footer_component; }, "CardHeader": function() { return /* reexport */ card_header_component; }, "CardMedia": function() { return /* reexport */ card_media_component; }, "CheckboxControl": function() { return /* reexport */ checkbox_control; }, "Circle": function() { return /* reexport */ external_wp_primitives_namespaceObject.Circle; }, "ClipboardButton": function() { return /* reexport */ ClipboardButton; }, "ColorIndicator": function() { return /* reexport */ color_indicator; }, "ColorPalette": function() { return /* reexport */ ColorPalette; }, "ColorPicker": function() { return /* reexport */ LegacyAdapter; }, "ComboboxControl": function() { return /* reexport */ combobox_control; }, "CustomGradientPicker": function() { return /* reexport */ CustomGradientPicker; }, "CustomSelectControl": function() { return /* reexport */ CustomSelectControl; }, "Dashicon": function() { return /* reexport */ dashicon; }, "DatePicker": function() { return /* reexport */ date; }, "DateTimePicker": function() { return /* reexport */ build_module_date_time; }, "Disabled": function() { return /* reexport */ disabled; }, "Draggable": function() { return /* reexport */ Draggable; }, "DropZone": function() { return /* reexport */ drop_zone; }, "DropZoneProvider": function() { return /* reexport */ DropZoneProvider; }, "Dropdown": function() { return /* reexport */ Dropdown; }, "DropdownMenu": function() { return /* reexport */ dropdown_menu; }, "DuotonePicker": function() { return /* reexport */ duotone_picker; }, "DuotoneSwatch": function() { return /* reexport */ duotone_swatch; }, "ExternalLink": function() { return /* reexport */ external_link; }, "Fill": function() { return /* reexport */ slot_fill_Fill; }, "Flex": function() { return /* reexport */ flex_component; }, "FlexBlock": function() { return /* reexport */ flex_block_component; }, "FlexItem": function() { return /* reexport */ flex_item_component; }, "FocalPointPicker": function() { return /* reexport */ focal_point_picker; }, "FocusReturnProvider": function() { return /* reexport */ with_focus_return_Provider; }, "FocusableIframe": function() { return /* reexport */ FocusableIframe; }, "FontSizePicker": function() { return /* reexport */ font_size_picker; }, "FormFileUpload": function() { return /* reexport */ form_file_upload; }, "FormToggle": function() { return /* reexport */ form_toggle; }, "FormTokenField": function() { return /* reexport */ form_token_field; }, "G": function() { return /* reexport */ external_wp_primitives_namespaceObject.G; }, "GradientPicker": function() { return /* reexport */ GradientPicker; }, "Guide": function() { return /* reexport */ Guide; }, "GuidePage": function() { return /* reexport */ GuidePage; }, "HorizontalRule": function() { return /* reexport */ external_wp_primitives_namespaceObject.HorizontalRule; }, "Icon": function() { return /* reexport */ build_module_icon; }, "IconButton": function() { return /* reexport */ deprecated; }, "IsolatedEventContainer": function() { return /* reexport */ isolated_event_container; }, "KeyboardShortcuts": function() { return /* reexport */ keyboard_shortcuts; }, "MenuGroup": function() { return /* reexport */ menu_group; }, "MenuItem": function() { return /* reexport */ menu_item; }, "MenuItemsChoice": function() { return /* reexport */ MenuItemsChoice; }, "Modal": function() { return /* reexport */ modal; }, "NavigableMenu": function() { return /* reexport */ navigable_container_menu; }, "Notice": function() { return /* reexport */ build_module_notice; }, "NoticeList": function() { return /* reexport */ list; }, "Panel": function() { return /* reexport */ panel; }, "PanelBody": function() { return /* reexport */ body; }, "PanelHeader": function() { return /* reexport */ panel_header; }, "PanelRow": function() { return /* reexport */ row; }, "Path": function() { return /* reexport */ external_wp_primitives_namespaceObject.Path; }, "Placeholder": function() { return /* reexport */ placeholder; }, "Polygon": function() { return /* reexport */ external_wp_primitives_namespaceObject.Polygon; }, "Popover": function() { return /* reexport */ popover; }, "QueryControls": function() { return /* reexport */ QueryControls; }, "RadioControl": function() { return /* reexport */ radio_control; }, "RangeControl": function() { return /* reexport */ range_control; }, "Rect": function() { return /* reexport */ external_wp_primitives_namespaceObject.Rect; }, "ResizableBox": function() { return /* reexport */ resizable_box; }, "ResponsiveWrapper": function() { return /* reexport */ responsive_wrapper; }, "SVG": function() { return /* reexport */ external_wp_primitives_namespaceObject.SVG; }, "SandBox": function() { return /* reexport */ Sandbox; }, "ScrollLock": function() { return /* reexport */ scroll_lock; }, "SearchControl": function() { return /* reexport */ search_control; }, "SelectControl": function() { return /* reexport */ select_control; }, "Slot": function() { return /* reexport */ slot_fill_Slot; }, "SlotFillProvider": function() { return /* reexport */ Provider; }, "Snackbar": function() { return /* reexport */ snackbar; }, "SnackbarList": function() { return /* reexport */ snackbar_list; }, "Spinner": function() { return /* reexport */ spinner; }, "TabPanel": function() { return /* reexport */ tab_panel; }, "TabbableContainer": function() { return /* reexport */ tabbable; }, "TextControl": function() { return /* reexport */ text_control; }, "TextHighlight": function() { return /* reexport */ text_highlight; }, "TextareaControl": function() { return /* reexport */ textarea_control; }, "TimePicker": function() { return /* reexport */ time; }, "Tip": function() { return /* reexport */ build_module_tip; }, "ToggleControl": function() { return /* reexport */ toggle_control; }, "Toolbar": function() { return /* reexport */ toolbar; }, "ToolbarButton": function() { return /* reexport */ toolbar_button; }, "ToolbarDropdownMenu": function() { return /* reexport */ toolbar_dropdown_menu; }, "ToolbarGroup": function() { return /* reexport */ toolbar_group; }, "ToolbarItem": function() { return /* reexport */ toolbar_item; }, "Tooltip": function() { return /* reexport */ tooltip; }, "TreeSelect": function() { return /* reexport */ tree_select; }, "VisuallyHidden": function() { return /* reexport */ visually_hidden_component; }, "__experimentalAlignmentMatrixControl": function() { return /* reexport */ AlignmentMatrixControl; }, "__experimentalApplyValueToSides": function() { return /* reexport */ applyValueToSides; }, "__experimentalBorderBoxControl": function() { return /* reexport */ border_box_control_component; }, "__experimentalBorderControl": function() { return /* reexport */ border_control_component; }, "__experimentalBoxControl": function() { return /* reexport */ BoxControl; }, "__experimentalConfirmDialog": function() { return /* reexport */ confirm_dialog_component; }, "__experimentalDimensionControl": function() { return /* reexport */ dimension_control; }, "__experimentalDivider": function() { return /* reexport */ divider_component; }, "__experimentalDropdownContentWrapper": function() { return /* reexport */ dropdown_content_wrapper; }, "__experimentalElevation": function() { return /* reexport */ elevation_component; }, "__experimentalGrid": function() { return /* reexport */ grid_component; }, "__experimentalHStack": function() { return /* reexport */ h_stack_component; }, "__experimentalHasSplitBorders": function() { return /* reexport */ hasSplitBorders; }, "__experimentalHeading": function() { return /* reexport */ heading_component; }, "__experimentalInputControl": function() { return /* reexport */ input_control; }, "__experimentalInputControlPrefixWrapper": function() { return /* reexport */ input_prefix_wrapper; }, "__experimentalInputControlSuffixWrapper": function() { return /* reexport */ input_suffix_wrapper; }, "__experimentalIsDefinedBorder": function() { return /* reexport */ isDefinedBorder; }, "__experimentalIsEmptyBorder": function() { return /* reexport */ isEmptyBorder; }, "__experimentalItem": function() { return /* reexport */ item_component; }, "__experimentalItemGroup": function() { return /* reexport */ item_group_component; }, "__experimentalNavigation": function() { return /* reexport */ Navigation; }, "__experimentalNavigationBackButton": function() { return /* reexport */ back_button; }, "__experimentalNavigationGroup": function() { return /* reexport */ NavigationGroup; }, "__experimentalNavigationItem": function() { return /* reexport */ NavigationItem; }, "__experimentalNavigationMenu": function() { return /* reexport */ NavigationMenu; }, "__experimentalNavigatorBackButton": function() { return /* reexport */ navigator_back_button_component; }, "__experimentalNavigatorButton": function() { return /* reexport */ navigator_button_component; }, "__experimentalNavigatorProvider": function() { return /* reexport */ navigator_provider_component; }, "__experimentalNavigatorScreen": function() { return /* reexport */ navigator_screen_component; }, "__experimentalNumberControl": function() { return /* reexport */ number_control; }, "__experimentalPaletteEdit": function() { return /* reexport */ PaletteEdit; }, "__experimentalParseQuantityAndUnitFromRawValue": function() { return /* reexport */ parseQuantityAndUnitFromRawValue; }, "__experimentalRadio": function() { return /* reexport */ build_module_radio; }, "__experimentalRadioGroup": function() { return /* reexport */ radio_group; }, "__experimentalScrollable": function() { return /* reexport */ scrollable_component; }, "__experimentalSpacer": function() { return /* reexport */ spacer_component; }, "__experimentalStyleProvider": function() { return /* reexport */ style_provider; }, "__experimentalSurface": function() { return /* reexport */ surface_component; }, "__experimentalText": function() { return /* reexport */ text_component; }, "__experimentalToggleGroupControl": function() { return /* reexport */ toggle_group_control_component; }, "__experimentalToggleGroupControlOption": function() { return /* reexport */ toggle_group_control_option_component; }, "__experimentalToggleGroupControlOptionIcon": function() { return /* reexport */ toggle_group_control_option_icon_component; }, "__experimentalToolbarContext": function() { return /* reexport */ toolbar_context; }, "__experimentalToolsPanel": function() { return /* reexport */ tools_panel_component; }, "__experimentalToolsPanelContext": function() { return /* reexport */ ToolsPanelContext; }, "__experimentalToolsPanelItem": function() { return /* reexport */ tools_panel_item_component; }, "__experimentalTreeGrid": function() { return /* reexport */ tree_grid; }, "__experimentalTreeGridCell": function() { return /* reexport */ cell; }, "__experimentalTreeGridItem": function() { return /* reexport */ tree_grid_item; }, "__experimentalTreeGridRow": function() { return /* reexport */ tree_grid_row; }, "__experimentalTruncate": function() { return /* reexport */ truncate_component; }, "__experimentalUnitControl": function() { return /* reexport */ unit_control; }, "__experimentalUseCustomUnits": function() { return /* reexport */ useCustomUnits; }, "__experimentalUseNavigator": function() { return /* reexport */ use_navigator; }, "__experimentalUseSlot": function() { return /* reexport */ useSlot; }, "__experimentalVStack": function() { return /* reexport */ v_stack_component; }, "__experimentalView": function() { return /* reexport */ component; }, "__experimentalZStack": function() { return /* reexport */ z_stack_component; }, "__unstableComposite": function() { return /* reexport */ Composite; }, "__unstableCompositeGroup": function() { return /* reexport */ CompositeGroup; }, "__unstableCompositeItem": function() { return /* reexport */ CompositeItem; }, "__unstableDisclosureContent": function() { return /* reexport */ DisclosureContent; }, "__unstableGetAnimateClassName": function() { return /* reexport */ getAnimateClassName; }, "__unstableMotion": function() { return /* reexport */ motion; }, "__unstableUseAutocompleteProps": function() { return /* reexport */ useAutocompleteProps; }, "__unstableUseCompositeState": function() { return /* reexport */ useCompositeState; }, "__unstableUseNavigateRegions": function() { return /* reexport */ useNavigateRegions; }, "createSlotFill": function() { return /* reexport */ createSlotFill; }, "navigateRegions": function() { return /* reexport */ navigate_regions; }, "withConstrainedTabbing": function() { return /* reexport */ with_constrained_tabbing; }, "withFallbackStyles": function() { return /* reexport */ with_fallback_styles; }, "withFilters": function() { return /* reexport */ withFilters; }, "withFocusOutside": function() { return /* reexport */ with_focus_outside; }, "withFocusReturn": function() { return /* reexport */ with_focus_return; }, "withNotices": function() { return /* reexport */ with_notices; }, "withSpokenMessages": function() { return /* reexport */ with_spoken_messages; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/text/styles.js var text_styles_namespaceObject = {}; __webpack_require__.r(text_styles_namespaceObject); __webpack_require__.d(text_styles_namespaceObject, { "Text": function() { return Text; }, "block": function() { return styles_block; }, "destructive": function() { return destructive; }, "highlighterText": function() { return highlighterText; }, "muted": function() { return muted; }, "positive": function() { return positive; }, "upperCase": function() { return upperCase; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/components/build-module/ui/tooltip/styles.js var tooltip_styles_namespaceObject = {}; __webpack_require__.r(tooltip_styles_namespaceObject); __webpack_require__.d(tooltip_styles_namespaceObject, { "TooltipContent": function() { return TooltipContent; }, "TooltipPopoverView": function() { return TooltipPopoverView; }, "TooltipShortcut": function() { return TooltipShortcut; }, "noOutline": function() { return noOutline; } }); // NAMESPACE OBJECT: ./node_modules/@wordpress/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": function() { return ButtonContentView; }, "LabelView": function() { return LabelView; }, "buttonActive": function() { return buttonActive; }, "buttonView": function() { return buttonView; }, "isIcon": function() { return styles_isIcon; }, "labelBlock": function() { return labelBlock; }, "separatorActive": function() { return separatorActive; } }); ;// CONCATENATED MODULE: external ["wp","primitives"] var external_wp_primitives_namespaceObject = window["wp"]["primitives"]; ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js function extends_extends() { extends_extends = Object.assign ? Object.assign.bind() : 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"] var 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"] var external_wp_i18n_namespaceObject = window["wp"]["i18n"]; ;// CONCATENATED MODULE: external ["wp","compose"] var 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 _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); } ;// CONCATENATED MODULE: external "React" var external_React_namespaceObject = window["React"]; var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_namespaceObject); ;// 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_namespaceObject.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_namespaceObject.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_namespaceObject.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 _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 = _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_namespaceObject.forwardRef)(component); } function memo(component, propsAreEqual) { return /*#__PURE__*/(0,external_React_namespaceObject.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_namespaceObject.useDebugValue)(token); var context = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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 memory 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_namespaceObject.useEffect : external_React_namespaceObject.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_namespaceObject.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 = _objectWithoutPropertiesLoose(prev, ["unstable_system"]); var nextSystem = next.unstable_system, nextProps = _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 ["BUTTON", "INPUT", "SELECT", "TEXTAREA", "A"].includes(element.tagName); } function supportsDisabledAttribute(element) { return ["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(element.tagName); } 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_namespaceObject.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 = _objectWithoutPropertiesLoose(_ref2, ["ref", "tabIndex", "onClickCapture", "onMouseDownCapture", "onMouseDown", "onKeyPressCapture", "style"]); var ref = (0,external_React_namespaceObject.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_namespaceObject.useState)(true), nativeTabbable = _React$useState[0], setNativeTabbable = _React$useState[1]; var _React$useState2 = (0,external_React_namespaceObject.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_namespaceObject.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 = _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 = _objectWithoutPropertiesLoose(_ref2, ["onKeyDown", "onKeyUp"]); var _React$useState = (0,external_React_namespaceObject.useState)(false), active = _React$useState[0], setActive = _React$useState[1]; var onKeyDownRef = useLiveRef(htmlOnKeyDown); var onKeyUpRef = useLiveRef(htmlOnKeyUp); var onKeyDown = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.useContext)(unstable_IdContext); var _React$useState = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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 = _objectWithoutPropertiesLoose(prev, ["currentId", "unstable_moves"]); var nextCurrentId = next.currentId, nextMoves = next.unstable_moves, nextProps = _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 = _objectWithoutPropertiesLoose(_ref, ["ref", "tabIndex", "onMouseDown", "onFocus", "onBlurCapture", "onKeyDown", "onClick"]); var ref = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.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: ./node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs function t(t){return t.split("-")[0]}function floating_ui_core_browser_min_e(t){return t.split("-")[1]}function floating_ui_core_browser_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_browser_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_browser_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_browser_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={},d=0;for(let n=0;n({name:"arrow",options:t,async fn(i){const{element:o,padding:l=0}=null!=t?t:{},{x:s,y:c,placement:f,rects:m,platform:g}=i;if(null==o)return{};const d=floating_ui_core_browser_min_a(l),p={x:s,y:c},h=floating_ui_core_browser_min_n(f),y=floating_ui_core_browser_min_e(f),x=r(h),w=await g.getDimensions(o),v="y"===h?"top":"left",b="y"===h?"bottom":"right",R=m.reference[x]+m.reference[h]-p[h]-m.floating[x],A=p[h]-m.reference[h],P=await(null==g.getOffsetParent?void 0:g.getOffsetParent(o));let T=P?"y"===h?P.clientHeight||0:P.clientWidth||0:0;0===T&&(T=m.floating[x]);const O=R/2-A/2,L=d[v],D=T-w[x]-d[b],k=T/2-w[x]/2+O,E=u(L,k,D),C=("start"===y?d[v]:d[b])>0&&k!==E&&m.reference[x]<=m.floating[x];return{[h]:p[h]-(C?kg[t]))}function p(t,i,o){void 0===o&&(o=!1);const a=floating_ui_core_browser_min_e(t),l=floating_ui_core_browser_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_browser_min_e(t)===n)),...i.filter((t=>floating_ui_core_browser_min_e(t)!==n))]:i.filter((e=>t(e)===e))).filter((t=>!n||floating_ui_core_browser_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,L=P[O];if(null==L)return{};const{main:D,cross:k}=p(L,m,await(null==h.isRTL?void 0:h.isRTL(x.floating)));if(d!==L)return{x:f,y:u,reset:{placement:P[0]}};const E=[T[t(L)],T[D],T[k]],C=[...null!=(a=null==(l=g.autoPlacement)?void 0:l.overflows)?a:[],{placement:L,overflows:E}],H=P[O+1];if(H)return{data:{index:O+1,overflows:C},reset:{placement:H}};const B=C.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),V=null==(c=B.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:c.placement,F=null!=V?V:B[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,L;const t=(null!=(O=null==(L=o.flip)?void 0:L.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 D;const t=null==(D=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:D[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}=i,l=await async function(r,i){const{placement:o,platform:a,elements:l}=r,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=t(o),f=floating_ui_core_browser_min_e(o),u="x"===floating_ui_core_browser_min_n(o),m=["left","top"].includes(c)?-1:1,g=s&&u?-1:1,d="function"==typeof i?i(r):i;let{mainAxis:p,crossAxis:h,alignmentAxis:y}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return f&&"number"==typeof y&&(h="end"===f?-1*y:y),u?{x:h*g,y:p*m}:{x:p*m,y:h*g}}(i,r);return{x:o+l.x,y:a+l.y,data:l}}}};function O(t){return"x"===t?"y":"x"}const L=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_browser_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}}}}},D=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_browser_min_n(a),d=O(g);let p=m[g],h=m[d];const y="function"==typeof c?c(r):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_browser_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={availableHeight:o.floating.height-(["left","right"].includes(i)?2*(0!==w||0!==v?w+v:f(m.top,m.bottom)):m[p]),availableWidth:o.floating.width-(["top","bottom"].includes(i)?2*(0!==y||0!==x?y+x:f(m.left,m.right)):m[h])};await c({...r,...b});const R=await a.getDimensions(l.floating);return o.floating.width!==R.width||o.floating.height!==R.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_browser_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_browser_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.browser.min.mjs function floating_ui_dom_browser_min_n(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function floating_ui_dom_browser_min_o(t){if(null==t)return window;if(!floating_ui_dom_browser_min_n(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function floating_ui_dom_browser_min_i(t){return floating_ui_dom_browser_min_o(t).getComputedStyle(t)}function floating_ui_dom_browser_min_r(t){return floating_ui_dom_browser_min_n(t)?"":t?(t.nodeName||"").toLowerCase():""}function floating_ui_dom_browser_min_l(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function floating_ui_dom_browser_min_c(t){return t instanceof floating_ui_dom_browser_min_o(t).HTMLElement}function floating_ui_dom_browser_min_f(t){return t instanceof floating_ui_dom_browser_min_o(t).Element}function floating_ui_dom_browser_min_s(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof floating_ui_dom_browser_min_o(t).ShadowRoot||t instanceof ShadowRoot}function floating_ui_dom_browser_min_u(t){const{overflow:e,overflowX:n,overflowY:o}=floating_ui_dom_browser_min_i(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function floating_ui_dom_browser_min_d(t){return["table","td","th"].includes(floating_ui_dom_browser_min_r(t))}function floating_ui_dom_browser_min_h(t){const e=/firefox/i.test(floating_ui_dom_browser_min_l()),n=floating_ui_dom_browser_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_browser_min_a(){return!/^((?!chrome|android).)*safari/i.test(floating_ui_dom_browser_min_l())}const floating_ui_dom_browser_min_g=Math.min,floating_ui_dom_browser_min_p=Math.max,floating_ui_dom_browser_min_m=Math.round;function floating_ui_dom_browser_min_w(t,e,n){var i,r,l,s;void 0===e&&(e=!1),void 0===n&&(n=!1);const u=t.getBoundingClientRect();let d=1,h=1;e&&floating_ui_dom_browser_min_c(t)&&(d=t.offsetWidth>0&&floating_ui_dom_browser_min_m(u.width)/t.offsetWidth||1,h=t.offsetHeight>0&&floating_ui_dom_browser_min_m(u.height)/t.offsetHeight||1);const g=floating_ui_dom_browser_min_f(t)?floating_ui_dom_browser_min_o(t):window,p=!floating_ui_dom_browser_min_a()&&n,w=(u.left+(p&&null!=(i=null==(r=g.visualViewport)?void 0:r.offsetLeft)?i:0))/d,v=(u.top+(p&&null!=(l=null==(s=g.visualViewport)?void 0:s.offsetTop)?l:0))/h,y=u.width/d,x=u.height/h;return{width:y,height:x,top:v,right:w+y,bottom:v+x,left:w,x:w,y:v}}function floating_ui_dom_browser_min_v(t){return(e=t,(e instanceof floating_ui_dom_browser_min_o(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function floating_ui_dom_browser_min_y(t){return floating_ui_dom_browser_min_f(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function floating_ui_dom_browser_min_x(t){return floating_ui_dom_browser_min_w(floating_ui_dom_browser_min_v(t)).left+floating_ui_dom_browser_min_y(t).scrollLeft}function floating_ui_dom_browser_min_b(t,e,n){const o=floating_ui_dom_browser_min_c(e),i=floating_ui_dom_browser_min_v(e),l=floating_ui_dom_browser_min_w(t,o&&function(t){const e=floating_ui_dom_browser_min_w(t);return floating_ui_dom_browser_min_m(e.width)!==t.offsetWidth||floating_ui_dom_browser_min_m(e.height)!==t.offsetHeight}(e),"fixed"===n);let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==floating_ui_dom_browser_min_r(e)||floating_ui_dom_browser_min_u(i))&&(f=floating_ui_dom_browser_min_y(e)),floating_ui_dom_browser_min_c(e)){const t=floating_ui_dom_browser_min_w(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else i&&(s.x=floating_ui_dom_browser_min_x(i));return{x:l.left+f.scrollLeft-s.x,y:l.top+f.scrollTop-s.y,width:l.width,height:l.height}}function floating_ui_dom_browser_min_L(t){return"html"===floating_ui_dom_browser_min_r(t)?t:t.assignedSlot||t.parentNode||(floating_ui_dom_browser_min_s(t)?t.host:null)||floating_ui_dom_browser_min_v(t)}function floating_ui_dom_browser_min_R(t){return floating_ui_dom_browser_min_c(t)&&"fixed"!==floating_ui_dom_browser_min_i(t).position?t.offsetParent:null}function floating_ui_dom_browser_min_T(t){const e=floating_ui_dom_browser_min_o(t);let n=floating_ui_dom_browser_min_R(t);for(;n&&floating_ui_dom_browser_min_d(n)&&"static"===floating_ui_dom_browser_min_i(n).position;)n=floating_ui_dom_browser_min_R(n);return n&&("html"===floating_ui_dom_browser_min_r(n)||"body"===floating_ui_dom_browser_min_r(n)&&"static"===floating_ui_dom_browser_min_i(n).position&&!floating_ui_dom_browser_min_h(n))?e:n||function(t){let e=floating_ui_dom_browser_min_L(t);for(floating_ui_dom_browser_min_s(e)&&(e=e.host);floating_ui_dom_browser_min_c(e)&&!["html","body"].includes(floating_ui_dom_browser_min_r(e));){if(floating_ui_dom_browser_min_h(e))return e;{const t=e.parentNode;e=floating_ui_dom_browser_min_s(t)?t.host:t}}return null}(t)||e}function W(t){if(floating_ui_dom_browser_min_c(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=floating_ui_dom_browser_min_w(t);return{width:e.width,height:e.height}}function floating_ui_dom_browser_min_E(t){const e=floating_ui_dom_browser_min_L(t);return["html","body","#document"].includes(floating_ui_dom_browser_min_r(e))?t.ownerDocument.body:floating_ui_dom_browser_min_c(e)&&floating_ui_dom_browser_min_u(e)?e:floating_ui_dom_browser_min_E(e)}function H(t,e){var n;void 0===e&&(e=[]);const i=floating_ui_dom_browser_min_E(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),l=floating_ui_dom_browser_min_o(i),c=r?[l].concat(l.visualViewport||[],floating_ui_dom_browser_min_u(i)?i:[]):i,f=e.concat(c);return r?f:f.concat(H(c))}function C(e,n,r){return"viewport"===n?l(function(t,e){const n=floating_ui_dom_browser_min_o(t),i=floating_ui_dom_browser_min_v(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_browser_min_a();(t||!t&&"fixed"===e)&&(f=r.offsetLeft,s=r.offsetTop)}return{width:l,height:c,x:f,y:s}}(e,r)):floating_ui_dom_browser_min_f(n)?function(t,e){const n=floating_ui_dom_browser_min_w(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_browser_min_v(t),o=floating_ui_dom_browser_min_y(t),r=null==(e=t.ownerDocument)?void 0:e.body,l=floating_ui_dom_browser_min_p(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),c=floating_ui_dom_browser_min_p(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let f=-o.scrollLeft+floating_ui_dom_browser_min_x(t);const s=-o.scrollTop;return"rtl"===floating_ui_dom_browser_min_i(r||n).direction&&(f+=floating_ui_dom_browser_min_p(n.clientWidth,r?r.clientWidth:0)-l),{width:l,height:c,x:f,y:s}}(floating_ui_dom_browser_min_v(e)))}function floating_ui_dom_browser_min_D(t){const e=H(t),n=["absolute","fixed"].includes(floating_ui_dom_browser_min_i(t).position)&&floating_ui_dom_browser_min_c(t)?floating_ui_dom_browser_min_T(t):t;return floating_ui_dom_browser_min_f(n)?e.filter((t=>floating_ui_dom_browser_min_f(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&floating_ui_dom_browser_min_s(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_browser_min_r(t))):[]}const N={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?floating_ui_dom_browser_min_D(e):[].concat(n),o],l=r[0],c=r.reduce(((t,n)=>{const o=C(e,n,i);return t.top=floating_ui_dom_browser_min_p(o.top,t.top),t.right=floating_ui_dom_browser_min_g(o.right,t.right),t.bottom=floating_ui_dom_browser_min_g(o.bottom,t.bottom),t.left=floating_ui_dom_browser_min_p(o.left,t.left),t}),C(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_browser_min_c(n),l=floating_ui_dom_browser_min_v(n);if(n===l)return e;let f={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==floating_ui_dom_browser_min_r(n)||floating_ui_dom_browser_min_u(l))&&(f=floating_ui_dom_browser_min_y(n)),floating_ui_dom_browser_min_c(n))){const t=floating_ui_dom_browser_min_w(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-f.scrollLeft+s.x,y:e.y-f.scrollTop+s.y}},isElement:floating_ui_dom_browser_min_f,getDimensions:W,getOffsetParent:floating_ui_dom_browser_min_T,getDocumentElement:floating_ui_dom_browser_min_v,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:floating_ui_dom_browser_min_b(e,floating_ui_dom_browser_min_T(n),o),floating:{...W(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===floating_ui_dom_browser_min_i(t).direction};function S(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=!0,animationFrame:c=!1}=o,s=i&&!c,u=r&&!c,d=s||u?[...floating_ui_dom_browser_min_f(t)?H(t):[],...H(e)]:[];d.forEach((t=>{s&&t.addEventListener("scroll",n,{passive:!0}),u&&t.addEventListener("resize",n)}));let h,a=null;if(l){let o=!0;a=new ResizeObserver((()=>{o||n(),o=!1})),floating_ui_dom_browser_min_f(t)&&!c&&a.observe(t),a.observe(e)}let g=c?floating_ui_dom_browser_min_w(t):null;return c&&function e(){const o=floating_ui_dom_browser_min_w(t);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{s&&t.removeEventListener("scroll",n),u&&t.removeEventListener("resize",n)})),null==(t=a)||t.disconnect(),a=null,c&&cancelAnimationFrame(h)}}const z=(t,n,o)=>floating_ui_core_browser_min_o(t,n,{platform:N,...o}); ;// CONCATENATED MODULE: external "ReactDOM" var 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_namespaceObject.useLayoutEffect : external_React_namespaceObject.useEffect; // Fork of `fast-deep-equal` that only does the comparisons we need and compares // functions 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 useLatestRef(value) { const ref = external_React_namespaceObject.useRef(value); index(() => { ref.current = value; }); return ref; } function useFloating(_temp) { let { middleware, placement = 'bottom', strategy = 'absolute', whileElementsMounted } = _temp === void 0 ? {} : _temp; const [data, setData] = external_React_namespaceObject.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] = external_React_namespaceObject.useState(middleware); if (!deepEqual(latestMiddleware == null ? void 0 : latestMiddleware.map(_ref => { let { name, options } = _ref; return { name, options }; }), middleware == null ? void 0 : middleware.map(_ref2 => { let { name, options } = _ref2; return { name, options }; }))) { setLatestMiddleware(middleware); } const reference = external_React_namespaceObject.useRef(null); const floating = external_React_namespaceObject.useRef(null); const cleanupRef = external_React_namespaceObject.useRef(null); const dataRef = external_React_namespaceObject.useRef(data); const whileElementsMountedRef = useLatestRef(whileElementsMounted); const update = external_React_namespaceObject.useCallback(() => { if (!reference.current || !floating.current) { return; } z(reference.current, floating.current, { middleware: latestMiddleware, placement, strategy }).then(data => { if (isMountedRef.current && !deepEqual(dataRef.current, data)) { dataRef.current = data; external_ReactDOM_namespaceObject.flushSync(() => { setData(data); }); } }); }, [latestMiddleware, placement, strategy]); index(() => { // Skip first update if (isMountedRef.current) { update(); } }, [update]); const isMountedRef = external_React_namespaceObject.useRef(false); index(() => { isMountedRef.current = true; return () => { isMountedRef.current = false; }; }, []); const runElementMountCallback = external_React_namespaceObject.useCallback(() => { if (typeof cleanupRef.current === 'function') { cleanupRef.current(); cleanupRef.current = null; } if (reference.current && floating.current) { if (whileElementsMountedRef.current) { const cleanupFn = whileElementsMountedRef.current(reference.current, floating.current, update); cleanupRef.current = cleanupFn; } else { update(); } } }, [update, whileElementsMountedRef]); const setReference = external_React_namespaceObject.useCallback(node => { reference.current = node; runElementMountCallback(); }, [runElementMountCallback]); const setFloating = external_React_namespaceObject.useCallback(node => { floating.current = node; runElementMountCallback(); }, [runElementMountCallback]); const refs = external_React_namespaceObject.useMemo(() => ({ reference, floating }), []); return external_React_namespaceObject.useMemo(() => ({ ...data, update, refs, reference: setReference, floating: setFloating }), [data, update, refs, setReference, setFloating]); } /** * Positions an inner element of the floating element such that it is centered * to the reference element. * This wraps the core `arrow` middleware to allow React refs as the element. * @see https://floating-ui.com/docs/arrow */ 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: ./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 || Array.prototype.slice.call(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/context/MotionConfigContext.mjs /** * @public */ var MotionConfigContext = (0,external_React_namespaceObject.createContext)({ transformPagePoint: function (p) { return p; }, isStatic: false, reducedMotion: "never", }); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/is-browser.mjs var isBrowser = typeof document !== "undefined"; ;// 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 (!isBrowser) 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_namespaceObject.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_namespaceObject.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/utils/process.mjs /** * Browser-safe usage of process */ var defaultEnvironment = "production"; var env = typeof process === "undefined" || process.env === undefined ? defaultEnvironment : "production" || 0; ;// 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/hey-listen/dist/hey-listen.es.js var warning = function () { }; var invariant = function () { }; if (false) {} ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/LazyContext.mjs var LazyContext = (0,external_React_namespaceObject.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_namespaceObject.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 (env !== "production" && preloadedFeatures && lazyContext.strict) { invariant(false, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead."); } 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_namespaceObject.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement }))); } } return features; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs var MotionContext = (0,external_React_namespaceObject.createContext)({}); function useVisualElementContext() { return (0,external_React_namespaceObject.useContext)(MotionContext).visualElement; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/PresenceContext.mjs /** * @public */ var PresenceContext_PresenceContext = (0,external_React_namespaceObject.createContext)(null); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs var useIsomorphicLayoutEffect = isBrowser ? external_React_namespaceObject.useLayoutEffect : external_React_namespaceObject.useEffect; ;// 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_namespaceObject.useContext)(LazyContext); var parent = useVisualElementContext(); var presenceContext = (0,external_React_namespaceObject.useContext)(PresenceContext_PresenceContext); var shouldReduceMotion = useReducedMotionConfig(); var visualElementRef = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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_namespaceObject.useContext)(MotionContext)), initial = _a.initial, animate = _a.animate; return (0,external_React_namespaceObject.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_namespaceObject.useRef)(null); if (ref.current === null) { ref.current = init(); } return ref.current; } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/projection/node/state.mjs /** * 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, }; ;// 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 var LayoutGroupContext = (0,external_React_namespaceObject.createContext)({}); ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs /** * Internal, exported only for usage in Framer */ var SwitchLayoutGroupContext = (0,external_React_namespaceObject.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_namespaceObject.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_namespaceObject.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. */ 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_namespaceObject.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 && 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_namespaceObject.createElement(VisualElementHandler, { visualElement: context.visualElement, props: __assign(__assign({}, config), props) }, features, external_React_namespaceObject.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, projectionId, useMotionRef(visualState, context.visualElement, externalRef), visualState, config.isStatic, context.visualElement)))); } return (0,external_React_namespaceObject.forwardRef)(MotionComponent); } function useLayoutId(_a) { var _b; var layoutId = _a.layoutId; var layoutGroupId = (_b = (0,external_React_namespaceObject.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/projection/styles/scale-correction.mjs var scaleCorrectors = {}; function addScaleCorrector(correctors) { Object.assign(scaleCorrectors, correctors); } ;// 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/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/value/utils/is-motion-value.mjs var isMotionValue = function (value) { return Boolean(value !== null && typeof value === "object" && value.getVelocity); }; ;// 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/style-value-types/dist/es/utils.mjs const 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/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/numbers/index.mjs const number = { test: (v) => typeof v === 'number', parse: parseFloat, transform: (v) => v, }; const alpha = Object.assign(Object.assign({}, number), { transform: clamp(0, 1) }); const scale = Object.assign(Object.assign({}, number), { default: 1 }); ;// 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/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_namespaceObject.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. * * @privateRemarks * 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", "onLayoutAnimationStart", "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_namespaceObject.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_namespaceObject.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, _styleProp, projection) { renderHTML(element, renderState, undefined, projection); 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/animation/utils/is-keyframes-target.mjs var isKeyframesTarget = function (v) { return Array.isArray(v); }; ;// 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/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 */ function resolveMotionValue(value) { var unwrappedValue = isMotionValue(value) ? value.get() : value; return isCustomValue(unwrappedValue) ? unwrappedValue.toValue() : unwrappedValue; } ;// 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_namespaceObject.useContext)(MotionContext); var presenceContext = (0,external_React_namespaceObject.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); 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) { if (options === void 0) { options = { passive: true }; } target.addEventListener(eventName, handler, options); return function () { return target.removeEventListener(eventName, handler); }; } /** * 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_namespaceObject.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 isBrowser && window.onpointerdown === null; }; var supportsTouchEvents = function () { return isBrowser && window.ontouchstart === null; }; var supportsMouseEvents = function () { return 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, { passive: !onHoverStart }); usePointerEvent(visualElement, "pointerleave", onHoverEnd || whileHover ? createHoverEvent(visualElement, false, onHoverEnd) : undefined, { passive: !onHoverEnd }); } ;// 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_namespaceObject.useEffect)(function () { return function () { return callback(); }; }, []); } ;// 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/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_namespaceObject.useRef)(false); var cancelPointerEndListeners = (0,external_React_namespaceObject.useRef)(null); /** * Only set listener to passive if there are no external listeners. */ var eventOptions = { passive: !(onTapStart || onTap || onTapCancel || onPointerDown), }; 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, eventOptions), addPointerEvent(window, "pointercancel", onPointerCancel, eventOptions)); /** * 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, eventOptions); useUnmountEffect(removePointerEndListener); } ;// CONCATENATED MODULE: ./node_modules/framer-motion/dist/es/utils/warn-once.mjs var warned = new Set(); function warnOnce(condition, message, element) { if (condition || warned.has(message)) return; console.warn(message); if (element) console.warn(element); warned.add(message); } ;// 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_namespaceObject.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 : useIntersectionObserver; useObserver(shouldObserve, state.current, visualElement, viewport); } var thresholdNames = { some: 0, all: 1, }; function 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_namespaceObject.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_namespaceObject.useEffect)(function () { if (!shouldObserve || !fallback) return; if (env !== "production") { warnOnce(false, "IntersectionObserver not available on this device. whileInView animations will trigger on mount."); } /** * 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_namespaceObject.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_namespaceObject.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/popmotion/dist/es/utils/clamp.mjs const clamp_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_clamp(minDamping, maxDamping, dampingRatio); duration = clamp_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/popmotion/dist/es/utils/mix.mjs const mix = (from, to, progress) => -progress * from + progress * to + from; ;// 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 = clamp(0, 255); const rgbUnit = Object.assign(Object.assign({}, number), { transform: (v) => Math.round(clampRgbUnit(v)) }); const 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.transform, }; ;// 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, 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; } if (toColorType === hsla) { toColor = hslaToRgba(toColor); toColorType = 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.test(v) || hex.test(v) || hsla.test(v), parse: (v) => { if (rgba.test(v)) { return 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.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 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 = parse(v); const transformer = createTransformer(v); return transformer(parsed.map(convertNumbersToZero)); } const complex = { test, 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/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_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({ 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, spring: spring, decay: decay }; function detectAnimationFromOptions(config) { if (Array.isArray(config.to)) { return 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; } else if (keys.has("dampingRatio") || keys.has("stiffness") || keys.has("mass") || keys.has("damping") || keys.has("restSpeed") || keys.has("restDelta")) { return spring; } return keyframes; } ;// 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 */ var es = (sync); ;// 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/utils/velocity-per-second.mjs function velocityPerSecond(velocity, frameDuration) { return frameDuration ? velocity * (1000 / frameDuration) : 0; } ;// 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/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/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/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 */ 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/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/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; /** * This will be replaced by the build step with the latest version number. * When MotionValues are provided to motion components, warn if versions are mixed. */ this.version = "6.5.1"; /** * 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 * } * ``` * * @privateRemarks * * 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; }()); function motionValue(init) { return new MotionValue(init); } ;// 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 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_namespaceObject.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_namespaceObject.useContext)(PresenceContext_PresenceContext); (0,external_React_namespaceObject.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/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/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 `