UNPKG

victory-group

Version:
1,270 lines (1,087 loc) 638 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["VictoryGroup"] = factory(require("react")); else root["VictoryGroup"] = 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 */ "getCalculatedProps": function() { return /* binding */ getCalculatedProps; }, /* harmony export */ "getChildren": function() { return /* binding */ getChildren; }, /* harmony export */ "useMemoizedProps": function() { return /* binding */ useMemoizedProps; } /* 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/helpers.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/wrapper.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/scale.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js"); /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1__ = __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_1___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_1__); const fallbackProps = { width: 450, height: 300, padding: 50, offset: 0 }; function getCalculatedProps(initialProps, childComponents) { const role = "group"; const props = victory_core__WEBPACK_IMPORTED_MODULE_2__.modifyProps(initialProps, fallbackProps, role); const style = victory_core__WEBPACK_IMPORTED_MODULE_3__.getStyle(props.theme, props.style, role); const { offset, colorScale, color, polar, horizontal } = props; const categories = props.categories || victory_core__WEBPACK_IMPORTED_MODULE_3__.getCategories(props, childComponents, null); const datasets = props.datasets || victory_core__WEBPACK_IMPORTED_MODULE_3__.getDataFromChildren(props, null); const domain = { x: victory_core__WEBPACK_IMPORTED_MODULE_3__.getDomain(Object.assign({}, props, { categories }), "x", childComponents), y: victory_core__WEBPACK_IMPORTED_MODULE_3__.getDomain(Object.assign({}, props, { categories }), "y", childComponents) }; const range = props.range || { x: victory_core__WEBPACK_IMPORTED_MODULE_2__.getRange(props, "x"), y: victory_core__WEBPACK_IMPORTED_MODULE_2__.getRange(props, "y") }; const baseScale = { x: victory_core__WEBPACK_IMPORTED_MODULE_4__.getScaleFromProps(props, "x") || victory_core__WEBPACK_IMPORTED_MODULE_3__.getScale(props, "x"), y: victory_core__WEBPACK_IMPORTED_MODULE_4__.getScaleFromProps(props, "y") || victory_core__WEBPACK_IMPORTED_MODULE_3__.getScale(props, "y") }; const scale = { x: baseScale.x.domain(domain.x).range(props.horizontal ? range.y : range.x), y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y) }; const origin = polar ? props.origin : victory_core__WEBPACK_IMPORTED_MODULE_2__.getPolarOrigin(props); const padding = victory_core__WEBPACK_IMPORTED_MODULE_2__.getPadding(props.padding); return { datasets, categories, range, domain, horizontal, scale, style, colorScale, color, offset, origin, padding }; } // We need to remove sharedEvents in order to memoize the calculated data // With shared events, the props change on every event, and every value is re-calculated const withoutSharedEvents = props => { const { children } = props; const modifiedChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children).map(child => { return { ...child, props: victory_core__WEBPACK_IMPORTED_MODULE_2__.omit(child.props, ["sharedEvents"]) }; }); props.children = modifiedChildren; return props; }; function useMemoizedProps(initialProps) { const modifiedProps = withoutSharedEvents(initialProps); const [props, setProps] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(modifiedProps); // React.memo uses shallow equality to compare objects. This way props // will only be re-calculated when they change. react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => { if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default()(modifiedProps, props)) { setProps(modifiedProps); } }, [props, setProps, modifiedProps]); return react__WEBPACK_IMPORTED_MODULE_0___default().useMemo(() => { return getCalculatedProps(props, props.children); }, [props]); } function pixelsToValue(props, axis, calculatedProps) { if (!props.offset) { return 0; } const currentAxis = victory_core__WEBPACK_IMPORTED_MODULE_2__.getCurrentAxis(axis, props.horizontal); const domain = calculatedProps.domain[axis]; const range = calculatedProps.range[currentAxis]; const domainExtent = Math.max(...domain) - Math.min(...domain); const rangeExtent = Math.max(...range) - Math.min(...range); return domainExtent / rangeExtent * props.offset; } // eslint-disable-next-line max-params function getX0(props, calculatedProps, index, role) { const groupLength = role === "stack" ? calculatedProps.datasets[0].length : calculatedProps.datasets.length; const center = (groupLength - 1) / 2; const totalWidth = pixelsToValue(props, "x", calculatedProps); return (index - center) * totalWidth; } // eslint-disable-next-line max-params function getPolarX0(props, calculatedProps, index, role) { const groupLength = role === "stack" ? calculatedProps.datasets[0].length : calculatedProps.datasets.length; const center = (groupLength - 1) / 2; const width = getAngularWidth(props, calculatedProps); return (index - center) * width; } function getAngularWidth(props, calculatedProps) { const { range } = calculatedProps; const angularRange = Math.abs(range.x[1] - range.x[0]); const r = Math.max(...range.y); return props.offset / (2 * Math.PI * r) * angularRange; } function getLabels(props, datasets, index) { if (!props.labels) { return undefined; } return Math.floor(datasets.length / 2) === index ? props.labels : undefined; } function getChildProps(props, calculatedProps) { const { categories, domain, range, scale, horizontal, origin, padding } = calculatedProps; const { width, height, theme, polar } = props; return { height, width, theme, polar, origin, categories, domain, range, scale, horizontal, padding, standalone: false }; } function getColorScale(props, child) { const role = child.type && child.type.role; const colorScaleOptions = child.props.colorScale || props.colorScale; if (role !== "group" && role !== "stack") { return undefined; } return props.theme && props.theme.group ? colorScaleOptions || props.theme.group.colorScale : colorScaleOptions; } function getDataWithOffset(props, defaultDataset, offset) { if (defaultDataset === void 0) { defaultDataset = []; } const dataset = props.data || props.y ? victory_core__WEBPACK_IMPORTED_MODULE_5__.getData(props) : defaultDataset; const xOffset = offset || 0; return dataset.map(datum => { const _x1 = datum._x instanceof Date ? new Date(datum._x.getTime() + xOffset) : datum._x + xOffset; return Object.assign({}, datum, { _x1 }); }); } function getChildren(initialProps, childComponents, calculatedProps) { const props = victory_core__WEBPACK_IMPORTED_MODULE_2__.modifyProps(initialProps, fallbackProps, "stack"); const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children); const newCalculatedProps = calculatedProps || getCalculatedProps(props, children); const { datasets } = newCalculatedProps; const { labelComponent, polar, theme } = props; const childProps = getChildProps(props, newCalculatedProps); const parentName = props.name || "group"; return children.map((child, index) => { const role = child.type && child.type.role; const xOffset = polar ? getPolarX0(props, newCalculatedProps, index, role) : getX0(props, newCalculatedProps, index, role); const style = role === "voronoi" || role === "tooltip" || role === "label" ? child.props.style : victory_core__WEBPACK_IMPORTED_MODULE_3__.getChildStyle(child, index, newCalculatedProps, theme); const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels; const name = child.props.name || `${parentName}-${role}-${index}`; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, Object.assign({ labels, style, key: `${name}-key-${index}`, name, data: getDataWithOffset(props, datasets[index], xOffset), colorScale: getColorScale(props, child), labelComponent: labelComponent || child.props.labelComponent, xOffset }, childProps)); }); } /***/ }), /***/ "./victory-group.tsx": /*!***************************!*\ !*** ./victory-group.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 */ "VictoryGroup": function() { return /* binding */ VictoryGroup; } /* harmony export */ }); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js"); /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js"); /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/hooks/use-animation-state.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/wrapper.js"); /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/hooks/use-previous-props.js"); /* harmony import */ var victory_shared_events__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-shared-events */ "../../victory-shared-events/es/victory-shared-events.js"); /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_8__ = __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, offset: 0 }; const defaultProps = { containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.VictoryContainer, null), groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", null), samples: 50, standalone: true, theme: victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryTheme.grayscale }; const VictoryGroupBase = initialProps => { const role = VictoryGroup?.role; const { getAnimationProps, setAnimationState, getProps } = victory_core__WEBPACK_IMPORTED_MODULE_6__.useAnimationState(); const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps), [initialProps]); const props = getProps(propsWithDefaults); const modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_7__.modifyProps(props, fallbackProps, role); const { eventKey, containerComponent, standalone, groupComponent, externalEventMutations, width, height, theme, polar, horizontal, name } = modifiedProps; const childComponents = react__WEBPACK_IMPORTED_MODULE_2___default().Children.toArray(modifiedProps.children); const calculatedProps = (0,_helper_methods__WEBPACK_IMPORTED_MODULE_8__.useMemoizedProps)(modifiedProps); const { domain, scale, style, origin } = calculatedProps; const newChildren = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => { const children = (0,_helper_methods__WEBPACK_IMPORTED_MODULE_8__.getChildren)(props, childComponents, calculatedProps); return children.map((child, index) => { const childProps = Object.assign({ animate: getAnimationProps(props, child, index) }, child.props); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(child, childProps); }); }, [props, childComponents, calculatedProps, getAnimationProps]); const containerProps = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => { if (standalone) { return { domain, scale, width, height, standalone, theme, style: style.parent, horizontal, polar, origin, name }; } return {}; }, [standalone, domain, scale, width, height, theme, style, horizontal, polar, origin, name]); const userProps = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => victory_core__WEBPACK_IMPORTED_MODULE_9__.getSafeUserProps(propsWithDefaults), [propsWithDefaults]); const container = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => { if (standalone) { const defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, containerComponent.props, containerProps, userProps); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(containerComponent, defaultContainerProps); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(groupComponent, userProps); }, [groupComponent, standalone, containerComponent, containerProps, userProps]); const events = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => { return victory_core__WEBPACK_IMPORTED_MODULE_10__.getAllEvents(props); }, [props]); const previousProps = victory_core__WEBPACK_IMPORTED_MODULE_11__.usePreviousProps(propsWithDefaults); react__WEBPACK_IMPORTED_MODULE_2___default().useEffect(() => { // This is called before dismount to keep state in sync return () => { if (propsWithDefaults.animate) { setAnimationState(previousProps, props); } }; }, [setAnimationState, previousProps, propsWithDefaults, props]); if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(events)) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_12__.VictorySharedEvents, { container: container, eventKey: eventKey, events: events, externalEventMutations: externalEventMutations }, newChildren); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(container, container.props, newChildren); }; const componentConfig = { role: "group", expectedComponents: ["groupComponent", "containerComponent", "labelComponent"], getChildren: _helper_methods__WEBPACK_IMPORTED_MODULE_8__.getChildren }; const VictoryGroup = Object.assign( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().memo(VictoryGroupBase, (react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default())), componentConfig); VictoryGroup.displayName = "VictoryGroup"; /***/ }), /***/ "../../../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/_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 = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js": /*!**************************************************************************************!*\ !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.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"), baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < lengt