993 lines
35 KiB
JavaScript
993 lines
35 KiB
JavaScript
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[7929],{
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/checkbox-control/index.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
A: () => (/* binding */ CheckboxControl)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
|
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js
|
|
var use_ref_effect = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-ref-effect/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js
|
|
var use_instance_id = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+deprecated@3.41.0/node_modules/@wordpress/deprecated/build-module/index.js
|
|
var build_module = __webpack_require__("../../node_modules/.pnpm/@wordpress+deprecated@3.41.0/node_modules/@wordpress/deprecated/build-module/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/icon/index.js
|
|
var icon = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/icon/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+primitives@3.45.0/node_modules/@wordpress/primitives/build-module/svg/index.js
|
|
var svg = __webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.45.0/node_modules/@wordpress/primitives/build-module/svg/index.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/reset.js
|
|
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
const reset_reset = (0,react.createElement)(svg/* SVG */.t4, {
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
viewBox: "0 0 24 24"
|
|
}, (0,react.createElement)(svg/* Path */.wA, {
|
|
d: "M7 11.5h10V13H7z"
|
|
}));
|
|
/* harmony default export */ const library_reset = (reset_reset);
|
|
//# sourceMappingURL=reset.js.map
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/check.js
|
|
var check = __webpack_require__("../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/check.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js + 1 modules
|
|
var base_control = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/checkbox-control/index.js
|
|
|
|
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
function CheckboxControl(_ref) {
|
|
let {
|
|
label,
|
|
className,
|
|
heading,
|
|
checked,
|
|
indeterminate,
|
|
help,
|
|
onChange,
|
|
...props
|
|
} = _ref;
|
|
|
|
if (heading) {
|
|
(0,build_module/* default */.A)('`heading` prop in `CheckboxControl`', {
|
|
alternative: 'a separate element to implement a heading',
|
|
since: '5.8'
|
|
});
|
|
}
|
|
|
|
const [showCheckedIcon, setShowCheckedIcon] = (0,react.useState)(false);
|
|
const [showIndeterminateIcon, setShowIndeterminateIcon] = (0,react.useState)(false); // Run the following callback everytime the `ref` (and the additional
|
|
// dependencies) change.
|
|
|
|
const ref = (0,use_ref_effect/* default */.A)(node => {
|
|
if (!node) {
|
|
return;
|
|
} // It cannot be set using an HTML attribute.
|
|
|
|
|
|
node.indeterminate = !!indeterminate;
|
|
setShowCheckedIcon(node.matches(':checked'));
|
|
setShowIndeterminateIcon(node.matches(':indeterminate'));
|
|
}, [checked, indeterminate]);
|
|
const instanceId = (0,use_instance_id/* default */.A)(CheckboxControl);
|
|
const id = `inspector-checkbox-control-${instanceId}`;
|
|
|
|
const onChangeValue = event => onChange(event.target.checked);
|
|
|
|
return (0,react.createElement)(base_control/* default */.Ay, {
|
|
label: heading,
|
|
id: id,
|
|
help: help,
|
|
className: classnames_default()('components-checkbox-control', className)
|
|
}, (0,react.createElement)("span", {
|
|
className: "components-checkbox-control__input-container"
|
|
}, (0,react.createElement)("input", (0,esm_extends/* default */.A)({
|
|
ref: ref,
|
|
id: id,
|
|
className: "components-checkbox-control__input",
|
|
type: "checkbox",
|
|
value: "1",
|
|
onChange: onChangeValue,
|
|
checked: checked,
|
|
"aria-describedby": !!help ? id + '__help' : undefined
|
|
}, props)), showIndeterminateIcon ? (0,react.createElement)(icon/* default */.A, {
|
|
icon: library_reset,
|
|
className: "components-checkbox-control__indeterminate",
|
|
role: "presentation"
|
|
}) : null, showCheckedIcon ? (0,react.createElement)(icon/* default */.A, {
|
|
icon: check/* default */.A,
|
|
className: "components-checkbox-control__checked",
|
|
role: "presentation"
|
|
}) : null), (0,react.createElement)("label", {
|
|
className: "components-checkbox-control__label",
|
|
htmlFor: id
|
|
}, label));
|
|
}
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/text-control/index.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/extends.js");
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+compose@5.4.1_react@17.0.2/node_modules/@wordpress/compose/build-module/hooks/use-instance-id/index.js");
|
|
/* harmony import */ var _base_control__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+components@19.8.5_@types+react@17.0.71_react-dom@17.0.2_react@17.0.2__react-with-d_oli5xz3n7pc4ztqokra47llglu/node_modules/@wordpress/components/build-module/base-control/index.js");
|
|
|
|
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* @typedef OwnProps
|
|
* @property {string} label Label for the control.
|
|
* @property {boolean} [hideLabelFromVision] Whether to accessibly hide the label.
|
|
* @property {string} value Value of the input.
|
|
* @property {string} [help] Optional help text for the control.
|
|
* @property {string} [className] Classname passed to BaseControl wrapper
|
|
* @property {(value: string) => void} onChange Handle changes.
|
|
* @property {string} [type='text'] Type of the input.
|
|
*/
|
|
|
|
/** @typedef {OwnProps & import('react').ComponentProps<'input'>} Props */
|
|
|
|
/**
|
|
*
|
|
* @param {Props} props Props
|
|
* @param {import('react').ForwardedRef<HTMLInputElement>} ref
|
|
*/
|
|
|
|
function TextControl(_ref, ref) {
|
|
let {
|
|
label,
|
|
hideLabelFromVision,
|
|
value,
|
|
help,
|
|
className,
|
|
onChange,
|
|
type = 'text',
|
|
...props
|
|
} = _ref;
|
|
const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(TextControl);
|
|
const id = `inspector-text-control-${instanceId}`;
|
|
|
|
const onChangeValue = (
|
|
/** @type {import('react').ChangeEvent<HTMLInputElement>} */
|
|
event) => onChange(event.target.value);
|
|
|
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_base_control__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Ay, {
|
|
label: label,
|
|
hideLabelFromVision: hideLabelFromVision,
|
|
id: id,
|
|
help: help,
|
|
className: className
|
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("input", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)({
|
|
className: "components-text-control__input",
|
|
type: type,
|
|
id: id,
|
|
value: value,
|
|
onChange: onChangeValue,
|
|
"aria-describedby": !!help ? id + '__help' : undefined,
|
|
ref: ref
|
|
}, props)));
|
|
}
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(TextControl));
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+deprecated@3.6.1/node_modules/@wordpress/deprecated/build-module/index.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ deprecated)
|
|
/* harmony export */ });
|
|
/* unused harmony export logged */
|
|
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+hooks@3.6.1/node_modules/@wordpress/hooks/build-module/index.js");
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
/**
|
|
* Object map tracking messages which have been logged, for use in ensuring a
|
|
* message is only logged once.
|
|
*
|
|
* @type {Record<string, true | undefined>}
|
|
*/
|
|
|
|
const logged = Object.create(null);
|
|
/**
|
|
* Logs a message to notify developers about a deprecated feature.
|
|
*
|
|
* @param {string} feature Name of the deprecated feature.
|
|
* @param {Object} [options] Personalisation options
|
|
* @param {string} [options.since] Version in which the feature was deprecated.
|
|
* @param {string} [options.version] Version in which the feature will be removed.
|
|
* @param {string} [options.alternative] Feature to use instead
|
|
* @param {string} [options.plugin] Plugin name if it's a plugin feature
|
|
* @param {string} [options.link] Link to documentation
|
|
* @param {string} [options.hint] Additional message to help transition away from the deprecated feature.
|
|
*
|
|
* @example
|
|
* ```js
|
|
* import deprecated from '@wordpress/deprecated';
|
|
*
|
|
* deprecated( 'Eating meat', {
|
|
* since: '2019.01.01'
|
|
* version: '2020.01.01',
|
|
* alternative: 'vegetables',
|
|
* plugin: 'the earth',
|
|
* hint: 'You may find it beneficial to transition gradually.',
|
|
* } );
|
|
*
|
|
* // Logs: 'Eating meat is deprecated since version 2019.01.01 and will be removed from the earth in version 2020.01.01. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
|
|
* ```
|
|
*/
|
|
|
|
function deprecated(feature) {
|
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
const {
|
|
since,
|
|
version,
|
|
alternative,
|
|
plugin,
|
|
link,
|
|
hint
|
|
} = options;
|
|
const pluginMessage = plugin ? ` from ${plugin}` : '';
|
|
const sinceMessage = since ? ` since version ${since}` : '';
|
|
const versionMessage = version ? ` and will be removed${pluginMessage} in version ${version}` : '';
|
|
const useInsteadMessage = alternative ? ` Please use ${alternative} instead.` : '';
|
|
const linkMessage = link ? ` See: ${link}` : '';
|
|
const hintMessage = hint ? ` Note: ${hint}` : '';
|
|
const message = `${feature} is deprecated${sinceMessage}${versionMessage}.${useInsteadMessage}${linkMessage}${hintMessage}`; // Skip if already logged.
|
|
|
|
if (message in logged) {
|
|
return;
|
|
}
|
|
/**
|
|
* Fires whenever a deprecated feature is encountered
|
|
*
|
|
* @param {string} feature Name of the deprecated feature.
|
|
* @param {?Object} options Personalisation options
|
|
* @param {string} options.since Version in which the feature was deprecated.
|
|
* @param {?string} options.version Version in which the feature will be removed.
|
|
* @param {?string} options.alternative Feature to use instead
|
|
* @param {?string} options.plugin Plugin name if it's a plugin feature
|
|
* @param {?string} options.link Link to documentation
|
|
* @param {?string} options.hint Additional message to help transition away from the deprecated feature.
|
|
* @param {?string} message Message sent to console.warn
|
|
*/
|
|
|
|
|
|
(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__/* .doAction */ .Eo)('deprecated', feature, options, message); // eslint-disable-next-line no-console
|
|
|
|
console.warn(message);
|
|
logged[message] = true;
|
|
}
|
|
/** @typedef {import('utility-types').NonUndefined<Parameters<typeof deprecated>[1]>} DeprecatedOptions */
|
|
//# sourceMappingURL=index.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@wordpress+icons@8.4.0/node_modules/@wordpress/icons/build-module/library/check.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
/* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@wordpress+primitives@3.45.0/node_modules/@wordpress/primitives/build-module/svg/index.js");
|
|
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
const check = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .SVG */ .t4, {
|
|
xmlns: "http://www.w3.org/2000/svg",
|
|
viewBox: "0 0 24 24"
|
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__/* .Path */ .wA, {
|
|
d: "M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"
|
|
}));
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (check);
|
|
//# sourceMappingURL=check.js.map
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js":
|
|
/***/ ((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/_baseFlatten.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var arrayPush = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js"),
|
|
isFlattenable = __webpack_require__("../../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/_baseSetToString.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var constant = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js"),
|
|
defineProperty = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"),
|
|
identity = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js");
|
|
|
|
/**
|
|
* The base implementation of `setToString` without support for hot loop shorting.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
return defineProperty(func, 'toString', {
|
|
'configurable': true,
|
|
'enumerable': false,
|
|
'value': constant(string),
|
|
'writable': true
|
|
});
|
|
};
|
|
|
|
module.exports = baseSetToString;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js":
|
|
/***/ ((module) => {
|
|
|
|
/**
|
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to slice.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
*/
|
|
function baseSlice(array, start, end) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
if (start < 0) {
|
|
start = -start > length ? 0 : (length + start);
|
|
}
|
|
end = end > length ? length : end;
|
|
if (end < 0) {
|
|
end += length;
|
|
}
|
|
length = start > end ? 0 : ((end - start) >>> 0);
|
|
start >>>= 0;
|
|
|
|
var result = Array(length);
|
|
while (++index < length) {
|
|
result[index] = array[index + start];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseSlice;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnset.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var castPath = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"),
|
|
last = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js"),
|
|
parent = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_parent.js"),
|
|
toKey = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js");
|
|
|
|
/**
|
|
* The base implementation of `_.unset`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The property path to unset.
|
|
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
*/
|
|
function baseUnset(object, path) {
|
|
path = castPath(path, object);
|
|
object = parent(object, path);
|
|
return object == null || delete object[toKey(last(path))];
|
|
}
|
|
|
|
module.exports = baseUnset;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_customOmitClone.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var isPlainObject = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
|
|
/**
|
|
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
|
|
* objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @param {string} key The key of the property to inspect.
|
|
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
|
|
*/
|
|
function customOmitClone(value) {
|
|
return isPlainObject(value) ? undefined : value;
|
|
}
|
|
|
|
module.exports = customOmitClone;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var flatten = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js"),
|
|
overRest = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js"),
|
|
setToString = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js");
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which flattens the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function flatRest(func) {
|
|
return setToString(overRest(func, undefined, flatten), func + '');
|
|
}
|
|
|
|
module.exports = flatRest;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var Symbol = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"),
|
|
isArguments = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"),
|
|
isArray = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js");
|
|
|
|
/** Built-in value references. */
|
|
var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenable(value) {
|
|
return isArray(value) || isArguments(value) ||
|
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
}
|
|
|
|
module.exports = isFlattenable;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var apply = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js");
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max;
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which transforms the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @param {Function} transform The rest array transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overRest(func, start, transform) {
|
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
return function() {
|
|
var args = arguments,
|
|
index = -1,
|
|
length = nativeMax(args.length - start, 0),
|
|
array = Array(length);
|
|
|
|
while (++index < length) {
|
|
array[index] = args[start + index];
|
|
}
|
|
index = -1;
|
|
var otherArgs = Array(start + 1);
|
|
while (++index < start) {
|
|
otherArgs[index] = args[index];
|
|
}
|
|
otherArgs[start] = transform(array);
|
|
return apply(func, this, otherArgs);
|
|
};
|
|
}
|
|
|
|
module.exports = overRest;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_parent.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseGet = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"),
|
|
baseSlice = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSlice.js");
|
|
|
|
/**
|
|
* Gets the parent value at `path` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} path The path to get the parent value of.
|
|
* @returns {*} Returns the parent value.
|
|
*/
|
|
function parent(object, path) {
|
|
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
}
|
|
|
|
module.exports = parent;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseSetToString = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js"),
|
|
shortOut = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js");
|
|
|
|
/**
|
|
* Sets the `toString` method of `func` to return `string`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var setToString = shortOut(baseSetToString);
|
|
|
|
module.exports = setToString;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js":
|
|
/***/ ((module) => {
|
|
|
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
var HOT_COUNT = 800,
|
|
HOT_SPAN = 16;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeNow = Date.now;
|
|
|
|
/**
|
|
* Creates a function that'll short out and invoke `identity` instead
|
|
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
* milliseconds.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new shortable function.
|
|
*/
|
|
function shortOut(func) {
|
|
var count = 0,
|
|
lastCalled = 0;
|
|
|
|
return function() {
|
|
var stamp = nativeNow(),
|
|
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
|
|
lastCalled = stamp;
|
|
if (remaining > 0) {
|
|
if (++count >= HOT_COUNT) {
|
|
return arguments[0];
|
|
}
|
|
} else {
|
|
count = 0;
|
|
}
|
|
return func.apply(undefined, arguments);
|
|
};
|
|
}
|
|
|
|
module.exports = shortOut;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/clone.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseClone = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js");
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/**
|
|
* Creates a shallow clone of `value`.
|
|
*
|
|
* **Note:** This method is loosely based on the
|
|
* [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
|
|
* and supports cloning arrays, array buffers, booleans, date objects, maps,
|
|
* numbers, `Object` objects, regexes, sets, strings, symbols, and typed
|
|
* arrays. The own enumerable properties of `arguments` objects are cloned
|
|
* as plain objects. An empty object is returned for uncloneable values such
|
|
* as error objects, functions, DOM nodes, and WeakMaps.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to clone.
|
|
* @returns {*} Returns the cloned value.
|
|
* @see _.cloneDeep
|
|
* @example
|
|
*
|
|
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
*
|
|
* var shallow = _.clone(objects);
|
|
* console.log(shallow[0] === objects[0]);
|
|
* // => true
|
|
*/
|
|
function clone(value) {
|
|
return baseClone(value, CLONE_SYMBOLS_FLAG);
|
|
}
|
|
|
|
module.exports = clone;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js":
|
|
/***/ ((module) => {
|
|
|
|
/**
|
|
* Creates a function that returns `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {*} value The value to return from the new function.
|
|
* @returns {Function} Returns the new constant function.
|
|
* @example
|
|
*
|
|
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
*
|
|
* console.log(objects);
|
|
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
*
|
|
* console.log(objects[0] === objects[1]);
|
|
* // => true
|
|
*/
|
|
function constant(value) {
|
|
return function() {
|
|
return value;
|
|
};
|
|
}
|
|
|
|
module.exports = constant;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseFlatten = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js");
|
|
|
|
/**
|
|
* Flattens `array` a single level deep.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* _.flatten([1, [2, [3, [4]], 5]]);
|
|
* // => [1, 2, [3, [4]], 5]
|
|
*/
|
|
function flatten(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseFlatten(array, 1) : [];
|
|
}
|
|
|
|
module.exports = flatten;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseIsEqual = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js");
|
|
|
|
/**
|
|
* Performs a deep comparison between two values to determine if they are
|
|
* equivalent.
|
|
*
|
|
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
* nodes are compared by strict equality, i.e. `===`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.isEqual(object, other);
|
|
* // => true
|
|
*
|
|
* object === other;
|
|
* // => false
|
|
*/
|
|
function isEqual(value, other) {
|
|
return baseIsEqual(value, other);
|
|
}
|
|
|
|
module.exports = isEqual;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js":
|
|
/***/ ((module) => {
|
|
|
|
/**
|
|
* Gets the last element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the last element of `array`.
|
|
* @example
|
|
*
|
|
* _.last([1, 2, 3]);
|
|
* // => 3
|
|
*/
|
|
function last(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? array[length - 1] : undefined;
|
|
}
|
|
|
|
module.exports = last;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omit.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var arrayMap = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
baseClone = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseClone.js"),
|
|
baseUnset = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnset.js"),
|
|
castPath = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"),
|
|
copyObject = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_copyObject.js"),
|
|
customOmitClone = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_customOmitClone.js"),
|
|
flatRest = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js"),
|
|
getAllKeysIn = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeysIn.js");
|
|
|
|
/** Used to compose bitmasks for cloning. */
|
|
var CLONE_DEEP_FLAG = 1,
|
|
CLONE_FLAT_FLAG = 2,
|
|
CLONE_SYMBOLS_FLAG = 4;
|
|
|
|
/**
|
|
* The opposite of `_.pick`; this method creates an object composed of the
|
|
* own and inherited enumerable property paths of `object` that are not omitted.
|
|
*
|
|
* **Note:** This method is considerably slower than `_.pick`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {...(string|string[])} [paths] The property paths to omit.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.omit(object, ['a', 'c']);
|
|
* // => { 'b': '2' }
|
|
*/
|
|
var omit = flatRest(function(object, paths) {
|
|
var result = {};
|
|
if (object == null) {
|
|
return result;
|
|
}
|
|
var isDeep = false;
|
|
paths = arrayMap(paths, function(path) {
|
|
path = castPath(path, object);
|
|
isDeep || (isDeep = path.length > 1);
|
|
return path;
|
|
});
|
|
copyObject(object, getAllKeysIn(object), result);
|
|
if (isDeep) {
|
|
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
}
|
|
var length = paths.length;
|
|
while (length--) {
|
|
baseUnset(result, paths[length]);
|
|
}
|
|
return result;
|
|
});
|
|
|
|
module.exports = omit;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/setWith.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
var baseSet = __webpack_require__("../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js");
|
|
|
|
/**
|
|
* This method is like `_.set` except that it accepts `customizer` which is
|
|
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
|
|
* path creation is handled by the method instead. The `customizer` is invoked
|
|
* with three arguments: (nsValue, key, nsObject).
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @param {Function} [customizer] The function to customize assigned values.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = {};
|
|
*
|
|
* _.setWith(object, '[0][1]', 'a', Object);
|
|
* // => { '0': { '1': 'a' } }
|
|
*/
|
|
function setWith(object, path, value, customizer) {
|
|
customizer = typeof customizer == 'function' ? customizer : undefined;
|
|
return object == null ? object : baseSet(object, path, value, customizer);
|
|
}
|
|
|
|
module.exports = setWith;
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |