import { baseFor } from "./chunk-SJ5HZDIS.js"; import { SetCache, baseIsEqual, cacheHas, setToArray } from "./chunk-CGU436GM.js"; import { Set, Stack, arrayEach, arrayFilter, arrayMap, baseGet, get, hasIn, identity, isArray2 as isArray, isArrayLike, isKey, isObject2 as isObject, keys, toKey } from "./chunk-LB3CVB72.js"; // ../node_modules/.pnpm/vue-element-plus-x@1.3.7_ro_47c535807434a0797b7704af258a7bca/node_modules/vue-element-plus-x/dist/_baseUniq-BXtq6_NW.js function noop() { } function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + -1; while (++index < length) { if (predicate(array[index], index, array)) { return index; } } return -1; } function baseIsNaN(value) { return value !== value; } function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } var COMPARE_PARTIAL_FLAG$1 = 1; var COMPARE_UNORDERED_FLAG$1 = 2; function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (data[2]) { if (objValue === void 0 && !(key in object)) { return false; } } else { var stack = new Stack(); var result; if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) { return false; } } } return true; } function isStrictComparable(value) { return value === value && !isObject(value); } function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); }; } function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } var COMPARE_PARTIAL_FLAG = 1; var COMPARE_UNORDERED_FLAG = 2; function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } function baseProperty(key) { return function(object) { return object == null ? void 0 : object[key]; }; } function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } function baseIteratee(value) { if (typeof value == "function") { return value; } if (value == null) { return identity; } if (typeof value == "object") { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = -1, iterable = Object(collection); while (++index < length) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } var baseEach = createBaseEach(baseForOwn); function castFunction(value) { return typeof value == "function" ? value : identity; } function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection2) { if (predicate(value, index, collection2)) { result.push(value); } }); return result; } function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, baseIteratee(predicate)); } function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } function values(object) { return object == null ? [] : baseValues(object, keys(object)); } function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection2) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2); }); return accumulator; } function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach); } var INFINITY = 1 / 0; var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) { return new Set(values2); }; var LARGE_ARRAY_SIZE = 200; function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache(); } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = value !== 0 ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } export { noop, baseFindIndex, baseIndexOf, arrayIncludes, baseIteratee, baseForOwn, baseEach, castFunction, forEach, baseFilter, filter, values, reduce, baseUniq }; //# sourceMappingURL=chunk-BQYCTTAX.js.map