UNPKG

victory-chart

Version:
1,228 lines (1,052 loc) 911 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); else if(typeof exports === 'object') exports["VictoryChart"] = factory(require("react")); else root["VictoryChart"] = factory(root["React"]); })(self, function(__WEBPACK_EXTERNAL_MODULE_react__) { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./helper-methods.tsx": /*!****************************!*\ !*** ./helper-methods.tsx ***! \****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "getBackgroundWithProps": function() { return /* binding */ getBackgroundWithProps; }, /* harmony export */ "getCalculatedProps": function() { return /* binding */ getCalculatedProps; }, /* harmony export */ "getChildComponents": function() { return /* binding */ getChildComponents; }, /* harmony export */ "getChildren": function() { return /* binding */ getChildren; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/axis.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/wrapper.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/scale.js"); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js"); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__); const fallbackProps = { width: 450, height: 300, padding: 50 }; function getAxisProps(child, props, calculatedProps) { const { domain, scale, stringMap, categories, horizontal } = calculatedProps; return { stringMap, horizontal, categories, startAngle: props.startAngle, endAngle: props.endAngle, innerRadius: props.innerRadius, domain, scale }; } function getBackgroundWithProps(props, calculatedProps) { const backgroundElement = props.backgroundComponent; const height = props.polar ? calculatedProps.range.y[1] : calculatedProps.range.y[0] - calculatedProps.range.y[1]; const width = calculatedProps.range.x[1] - calculatedProps.range.x[0]; const xScale = props.horizontal ? calculatedProps.scale.y.range()[0] : calculatedProps.scale.x.range()[0]; const yScale = props.horizontal ? calculatedProps.scale.x.range()[1] : calculatedProps.scale.y.range()[1]; const xCoordinate = props.polar ? calculatedProps.origin.x : xScale; const yCoordinate = props.polar ? calculatedProps.origin.y : yScale; const parentName = props.name || "chart"; const backgroundProps = { height, polar: props.polar, scale: calculatedProps.scale, style: props.style.background, x: xCoordinate, y: yCoordinate, key: `${parentName}-background`, width }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundElement, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundElement.props, backgroundProps)); } function getChildProps(child, props, calculatedProps) { const axisChild = victory_core__WEBPACK_IMPORTED_MODULE_2__.findAxisComponents([child]); if (axisChild.length > 0) { return getAxisProps(axisChild[0], props, calculatedProps); } const { categories, domain, range, scale, stringMap, horizontal } = calculatedProps; return { categories, domain, range, scale, stringMap, horizontal }; } function getStyles(props) { const styleProps = props.style && props.style.parent; return { parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, styleProps, { height: "100%", width: "100%", userSelect: "none" }) }; } function getCalculatedProps(initialProps, childComponents) { const style = getStyles(initialProps); const props = victory_core__WEBPACK_IMPORTED_MODULE_3__.modifyProps(initialProps, fallbackProps, "chart"); const { horizontal, polar } = props; const allStrings = victory_core__WEBPACK_IMPORTED_MODULE_4__.getStringsFromChildren(props, childComponents); const categories = victory_core__WEBPACK_IMPORTED_MODULE_4__.getCategories(props, childComponents, allStrings); const stringMap = createStringMap(props, childComponents, allStrings); const domain = { x: getDomain(Object.assign({}, props, { categories }), "x", childComponents), y: getDomain(Object.assign({}, props, { categories }), "y", childComponents) }; const range = { x: victory_core__WEBPACK_IMPORTED_MODULE_3__.getRange(props, "x"), y: victory_core__WEBPACK_IMPORTED_MODULE_3__.getRange(props, "y") }; const baseScale = { x: victory_core__WEBPACK_IMPORTED_MODULE_5__.getScaleFromProps(props, "x") || victory_core__WEBPACK_IMPORTED_MODULE_4__.getScale(props, "x"), y: victory_core__WEBPACK_IMPORTED_MODULE_5__.getScaleFromProps(props, "y") || victory_core__WEBPACK_IMPORTED_MODULE_4__.getScale(props, "y") }; const scale = { x: baseScale.x.domain(domain.x).range(horizontal ? range.y : range.x), y: baseScale.y.domain(domain.y).range(horizontal ? range.x : range.y) }; const origin = polar ? victory_core__WEBPACK_IMPORTED_MODULE_3__.getPolarOrigin(props) : victory_core__WEBPACK_IMPORTED_MODULE_2__.getOrigin(domain); const padding = victory_core__WEBPACK_IMPORTED_MODULE_3__.getPadding(props.padding); return { categories, domain, range, horizontal, scale, stringMap, style, origin, padding }; } function getChildren(props, childComponents, calculatedProps) { const children = childComponents || getChildComponents(props); const newCalculatedProps = calculatedProps || getCalculatedProps(props, children); const baseStyle = newCalculatedProps.style.parent; const { height, polar, theme, width } = props; const { origin, horizontal } = newCalculatedProps; const parentName = props.name || "chart"; return children.filter((react__WEBPACK_IMPORTED_MODULE_0___default().isValidElement)).map((child, index) => { const role = child.type && child.type.role; const style = Array.isArray(child.props.style) ? child.props.style : lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, child.props.style, { parent: baseStyle }); const childProps = getChildProps(child, props, newCalculatedProps); const name = child.props.name || `${parentName}-${role}-${index}`; const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({ horizontal, height, polar, theme, width, style, name, origin: polar ? origin : undefined, padding: newCalculatedProps.padding, key: `${name}-key-${index}`, standalone: false }, childProps); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, newProps); }); } const getChildComponents = (props, defaultAxes) => { let childComponents = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children); if (childComponents.length === 0) { childComponents.push(defaultAxes.independent, defaultAxes.dependent); } else { const axisComponents = { dependent: victory_core__WEBPACK_IMPORTED_MODULE_2__.getAxisComponentsWithParent(childComponents, "dependent"), independent: victory_core__WEBPACK_IMPORTED_MODULE_2__.getAxisComponentsWithParent(childComponents, "independent") }; if (axisComponents.dependent.length === 0 && axisComponents.independent.length === 0) { childComponents = props.prependDefaultAxes ? [defaultAxes.independent, defaultAxes.dependent].concat(childComponents) : childComponents.concat([defaultAxes.independent, defaultAxes.dependent]); } } return childComponents; }; const getDomain = (props, axis, childComponents) => { const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children); const domain = victory_core__WEBPACK_IMPORTED_MODULE_4__.getDomain(props, axis, children); const axisComponent = victory_core__WEBPACK_IMPORTED_MODULE_2__.getAxisComponent(children, axis); const invertDomain = axisComponent && axisComponent.props && axisComponent.props.invertAxis; return invertDomain ? domain.concat().reverse() : domain; }; const createStringMap = (props, childComponents, allStrings) => { const x = !allStrings.x || allStrings.x.length === 0 ? null : allStrings.x.reduce((memo, string, index) => { memo[string] = index + 1; return memo; }, {}); const y = !allStrings.y || allStrings.y.length === 0 ? null : allStrings.y.reduce((memo, string, index) => { memo[string] = index + 1; return memo; }, {}); return { x, y }; }; /***/ }), /***/ "./victory-chart.tsx": /*!***************************!*\ !*** ./victory-chart.tsx ***! \***************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "VictoryChart": function() { return /* binding */ VictoryChart; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js"); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js"); /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/background.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/hooks/use-animation-state.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/wrapper.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/hooks/use-previous-props.js"); /* harmony import */ var victory_shared_events__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! victory-shared-events */ "../../victory-shared-events/es/victory-shared-events.js"); /* harmony import */ var victory_axis__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-axis */ "../../victory-axis/es/victory-axis.js"); /* harmony import */ var victory_polar_axis__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-polar-axis */ "../../victory-polar-axis/es/victory-polar-axis.js"); /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.tsx"); /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js"); /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__); const fallbackProps = { width: 450, height: 300, padding: 50 }; const defaultProps = { backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Background, null), containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, null), defaultAxes: { independent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_axis__WEBPACK_IMPORTED_MODULE_6__.VictoryAxis, null), dependent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_axis__WEBPACK_IMPORTED_MODULE_6__.VictoryAxis, { dependentAxis: true }) }, defaultPolarAxes: { independent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_7__.VictoryPolarAxis, null), dependent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_7__.VictoryPolarAxis, { dependentAxis: true }) }, groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null), standalone: true, theme: victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryTheme.grayscale }; const VictoryChartImpl = initialProps => { const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps), [initialProps]); const role = "chart"; const { getAnimationProps, setAnimationState, getProps } = victory_core__WEBPACK_IMPORTED_MODULE_9__.useAnimationState(); const props = getProps(propsWithDefaults); const modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_10__.modifyProps(props, fallbackProps, role); const { desc, eventKey, containerComponent, standalone, groupComponent, externalEventMutations, width, height, theme, polar, name, title } = modifiedProps; const axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes; const childComponents = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => (0,_helper_methods__WEBPACK_IMPORTED_MODULE_11__.getChildComponents)(modifiedProps, axes), [modifiedProps, axes]); const calculatedProps = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => (0,_helper_methods__WEBPACK_IMPORTED_MODULE_11__.getCalculatedProps)(modifiedProps, childComponents), [modifiedProps, childComponents]); const { domain, scale, style, origin, horizontal } = calculatedProps; const newChildren = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => { const children = (0,_helper_methods__WEBPACK_IMPORTED_MODULE_11__.getChildren)(props, childComponents, calculatedProps); const mappedChildren = children.map((child, index) => { const childProps = Object.assign({ animate: getAnimationProps(props, child, index) }, child.props); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, childProps); }); if (props.style && props.style.background) { const backgroundComponent = (0,_helper_methods__WEBPACK_IMPORTED_MODULE_11__.getBackgroundWithProps)(props, calculatedProps); mappedChildren.unshift(backgroundComponent); } return mappedChildren; }, [getAnimationProps, childComponents, props, calculatedProps]); const containerProps = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => { if (standalone) { return { desc, domain, width, height, horizontal, name, origin: polar ? origin : undefined, polar, theme, title, scale, standalone, style: style.parent }; } return {}; }, [desc, domain, height, horizontal, name, origin, polar, scale, standalone, style, title, theme, width]); const container = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => { if (standalone) { const defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, containerComponent.props, containerProps, victory_core__WEBPACK_IMPORTED_MODULE_12__.getSafeUserProps(propsWithDefaults)); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(containerComponent, defaultContainerProps); } return groupComponent; }, [groupComponent, standalone, containerComponent, containerProps, propsWithDefaults]); const events = react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => { return victory_core__WEBPACK_IMPORTED_MODULE_13__.getAllEvents(props); }, [props]); const previousProps = victory_core__WEBPACK_IMPORTED_MODULE_14__.usePreviousProps(propsWithDefaults); react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => { // This is called before dismount to keep state in sync return () => { if (propsWithDefaults.animate) { setAnimationState(previousProps, propsWithDefaults); } }; }, [setAnimationState, previousProps, propsWithDefaults]); if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(events)) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_15__.VictorySharedEvents, { container: container, eventKey: eventKey, events: events, externalEventMutations: externalEventMutations }, newChildren); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(container, container.props, newChildren); }; const VictoryChart = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(VictoryChartImpl, (react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default())); VictoryChart.displayName = "VictoryChart"; // @ts-expect-error FIXME: Does this "expectedComponents" do anything? VictoryChart.expectedComponents = ["groupComponent", "containerComponent"]; /***/ }), /***/ "../../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js": /*!***********************************************************************************************************!*\ !*** ../../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js ***! \***********************************************************************************************************/ /***/ (function(module, exports) { exports = module.exports = stringify exports.getSerialize = serializer function stringify(obj, replacer, spaces, cycleReplacer) { return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) } function serializer(replacer, cycleReplacer) { var stack = [], keys = [] if (cycleReplacer == null) cycleReplacer = function(key, value) { if (stack[0] === value) return "[Circular ~]" return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" } return function(key, value) { if (stack.length > 0) { var thisPos = stack.indexOf(this) ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) } else stack.push(value) return replacer == null ? value : replacer.call(this, key, value) } } /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js": /*!***********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js ***! \***********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"), listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"), listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"), listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"), listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js": /*!***********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js ***! \***********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"); /** * Casts `value` as an array if it's not one. * * @static * @memberOf _ * @since 4.4.0 * @category Lang * @param {*} value The value to inspect. * @returns {Array} Returns the cast array. * @example * * _.castArray(1); * // => [1] * * _.castArray({ 'a': 1 }); * // => [{ 'a': 1 }] * * _.castArray('abc'); * // => ['abc'] * * _.castArray(null); * // => [null] * * _.castArray(undefined); * // => [undefined] * * _.castArray(); * // => [] * * var array = [1, 2, 3]; * console.log(_.castArray(array) === array); * // => true */ function castArray() { if (!arguments.length) { return []; } var value = arguments[0]; return isArray(value) ? value : [value]; } module.exports = castArray; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js": /*!********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js ***! \********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"), listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"), listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"), listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"), listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js": /*!*********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js ***! \*********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js": /*!********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js ***! \********************************************************************************/ /***/ (function(module) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayAggregator.js": /*!******************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayAggregator.js ***! \******************************************************************************************/ /***/ (function(module) { /** * A specialized version of `baseAggregator` for arrays. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; setter(accumulator, value, iteratee(value), array); } return accumulator; } module.exports = arrayAggregator; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js": /*!****************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js ***! \****************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js"); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js": /*!********************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js ***! \********************************************************************************************/ /***/ (function(module) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js": /*!***********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js ***! \***********************************************************************************/ /***/ (function(module) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js": /*!************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js ***! \************************************************************************************/ /***/ (function(module) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js": /*!************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js ***! \************************************************************************************/ /***/ (function(module) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js": /*!**************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js ***! \**************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"), eq = __webpack_require__(/*! ./eq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js": /*!***************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js ***! \***************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAggregator.js": /*!*****************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAggregator.js ***! \*****************************************************************************************/ /***/ (function(module) { /** * A specialized version of `baseAggregator` for arrays. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} setter The function to set `accumulator` values. * @param {Function} iteratee The iteratee to transform keys. * @param {Object} accumulator The initial aggregated object. * @returns {Function} Returns `accumulator`. */ function arrayAggregator(array, setter, iteratee, accumulator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { var value = array[index]; setter(accumulator, value, iteratee(value), array); } return accumulator; } module.exports = arrayAggregator; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js": /*!******************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js ***! \******************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var defineProperty = __webpack_require__(/*! ./_defineProperty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js": /*!**************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js ***! \**************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js"), isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js"); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js": /*!**********************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js ***! \**********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"), toKey = __webpack_require__(/*! ./_toKey */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js"); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js": /*!*************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js ***! \*************************************************************************************/ /***/ (function(module) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js": /*!************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js ***! \************************************************************************************/ /***/ (function(module) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js": /*!**************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIndexOf.js ***! \**************************************************************************************/ /***/ (function(module) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsDate.js": /*!*************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsDate.js ***! \*************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var dateTag = '[object Date]'; /** * The base implementation of `_.isDate` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a date object, else `false`. */ function baseIsDate(value) { return isObjectLike(value) && baseGetTag(value) == dateTag; } module.exports = baseIsDate; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js": /*!**************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js ***! \**************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js": /*!******************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js ***! \******************************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js"), equalArrays = __webpack_require__(/*! ./_equalArrays */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js"), equalByTag = __webpack_require__(/*! ./_equalByTag */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js"), equalObjects = __webpack_require__(/*! ./_equalObjects */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js"), getTag = __webpack_require__(/*! ./_getTag */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js"), isArray = __webpack_require__(/*! ./isArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr