es-toolkit 1.48.1 → 1.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/array/chunkBy.d.mts +32 -0
- package/dist/array/chunkBy.d.ts +32 -0
- package/dist/array/chunkBy.js +42 -0
- package/dist/array/chunkBy.mjs +42 -0
- package/dist/array/index.d.mts +2 -1
- package/dist/array/index.d.ts +2 -1
- package/dist/array/index.js +2 -0
- package/dist/array/index.mjs +2 -1
- package/dist/array/take.d.mts +1 -7
- package/dist/array/take.d.ts +1 -7
- package/dist/array/take.js +1 -9
- package/dist/array/take.mjs +1 -9
- package/dist/array/takeRight.d.mts +2 -2
- package/dist/array/takeRight.d.ts +2 -2
- package/dist/array/takeRight.js +2 -4
- package/dist/array/takeRight.mjs +2 -4
- package/dist/array/windowed.d.mts +1 -1
- package/dist/array/windowed.d.ts +1 -1
- package/dist/browser.global.js +3 -3
- package/dist/compat/array/chunk.js +4 -2
- package/dist/compat/array/chunk.mjs +4 -2
- package/dist/compat/array/differenceBy.js +5 -5
- package/dist/compat/array/differenceBy.mjs +5 -5
- package/dist/compat/array/drop.d.mts +2 -3
- package/dist/compat/array/drop.d.ts +2 -3
- package/dist/compat/array/drop.js +4 -4
- package/dist/compat/array/drop.mjs +4 -4
- package/dist/compat/array/dropRight.js +1 -1
- package/dist/compat/array/dropRight.mjs +1 -1
- package/dist/compat/array/dropRightWhile.d.mts +1 -1
- package/dist/compat/array/dropRightWhile.d.ts +1 -1
- package/dist/compat/array/dropRightWhile.js +5 -4
- package/dist/compat/array/dropRightWhile.mjs +5 -4
- package/dist/compat/array/dropWhile.d.mts +2 -2
- package/dist/compat/array/dropWhile.d.ts +2 -2
- package/dist/compat/array/dropWhile.js +4 -4
- package/dist/compat/array/dropWhile.mjs +4 -4
- package/dist/compat/array/findLast.js +1 -1
- package/dist/compat/array/findLast.mjs +1 -1
- package/dist/compat/array/includes.js +1 -1
- package/dist/compat/array/includes.mjs +1 -1
- package/dist/compat/array/nth.js +1 -1
- package/dist/compat/array/nth.mjs +1 -1
- package/dist/compat/array/slice.js +1 -1
- package/dist/compat/array/slice.mjs +1 -1
- package/dist/compat/array/sortedIndexBy.js +1 -1
- package/dist/compat/array/sortedIndexBy.mjs +1 -1
- package/dist/compat/array/take.js +2 -2
- package/dist/compat/array/take.mjs +2 -2
- package/dist/compat/array/takeRight.js +1 -1
- package/dist/compat/array/takeRight.mjs +1 -1
- package/dist/compat/compat.js +4 -4
- package/dist/compat/compat.mjs +4 -4
- package/dist/compat/index.js +4 -4
- package/dist/compat/index.mjs +4 -4
- package/dist/compat/math/add.js +1 -1
- package/dist/compat/math/add.mjs +1 -1
- package/dist/compat/math/divide.js +1 -1
- package/dist/compat/math/divide.mjs +1 -1
- package/dist/compat/math/multiply.js +1 -1
- package/dist/compat/math/multiply.mjs +1 -1
- package/dist/compat/math/random.js +3 -1
- package/dist/compat/math/random.mjs +3 -1
- package/dist/compat/math/subtract.js +1 -1
- package/dist/compat/math/subtract.mjs +1 -1
- package/dist/compat/object/get.js +1 -1
- package/dist/compat/object/get.mjs +1 -1
- package/dist/compat/object/omitBy.js +1 -1
- package/dist/compat/object/omitBy.mjs +1 -1
- package/dist/compat/object/pick.js +1 -1
- package/dist/compat/object/pick.mjs +1 -1
- package/dist/compat/object/pickBy.js +1 -1
- package/dist/compat/object/pickBy.mjs +1 -1
- package/dist/compat/string/repeat.js +1 -1
- package/dist/compat/string/repeat.mjs +1 -1
- package/dist/fp/_internal/lazy.js +58 -0
- package/dist/fp/_internal/lazy.mjs +57 -0
- package/dist/fp/array/at.d.mts +20 -0
- package/dist/fp/array/at.d.ts +20 -0
- package/dist/fp/array/at.js +25 -0
- package/dist/fp/array/at.mjs +25 -0
- package/dist/fp/array/cartesianProduct.d.mts +61 -0
- package/dist/fp/array/cartesianProduct.d.ts +61 -0
- package/dist/fp/array/cartesianProduct.js +9 -0
- package/dist/fp/array/cartesianProduct.mjs +9 -0
- package/dist/fp/array/chunk.d.mts +19 -0
- package/dist/fp/array/chunk.d.ts +19 -0
- package/dist/fp/array/chunk.js +24 -0
- package/dist/fp/array/chunk.mjs +24 -0
- package/dist/fp/array/chunkBy.d.mts +20 -0
- package/dist/fp/array/chunkBy.d.ts +20 -0
- package/dist/fp/array/chunkBy.js +25 -0
- package/dist/fp/array/chunkBy.mjs +25 -0
- package/dist/fp/array/combinations.d.mts +21 -0
- package/dist/fp/array/combinations.d.ts +21 -0
- package/dist/fp/array/combinations.js +26 -0
- package/dist/fp/array/combinations.mjs +26 -0
- package/dist/fp/array/compact.d.mts +22 -0
- package/dist/fp/array/compact.d.ts +22 -0
- package/dist/fp/array/compact.js +31 -0
- package/dist/fp/array/compact.mjs +30 -0
- package/dist/fp/array/countBy.d.mts +21 -0
- package/dist/fp/array/countBy.d.ts +21 -0
- package/dist/fp/array/countBy.js +26 -0
- package/dist/fp/array/countBy.mjs +26 -0
- package/dist/fp/array/difference.d.mts +21 -0
- package/dist/fp/array/difference.d.ts +21 -0
- package/dist/fp/array/difference.js +32 -0
- package/dist/fp/array/difference.mjs +31 -0
- package/dist/fp/array/differenceBy.d.mts +22 -0
- package/dist/fp/array/differenceBy.d.ts +22 -0
- package/dist/fp/array/differenceBy.js +33 -0
- package/dist/fp/array/differenceBy.mjs +32 -0
- package/dist/fp/array/differenceWith.d.mts +22 -0
- package/dist/fp/array/differenceWith.d.ts +22 -0
- package/dist/fp/array/differenceWith.js +32 -0
- package/dist/fp/array/differenceWith.mjs +31 -0
- package/dist/fp/array/drop.d.mts +20 -0
- package/dist/fp/array/drop.d.ts +20 -0
- package/dist/fp/array/drop.js +31 -0
- package/dist/fp/array/drop.mjs +30 -0
- package/dist/fp/array/dropRight.d.mts +20 -0
- package/dist/fp/array/dropRight.d.ts +20 -0
- package/dist/fp/array/dropRight.js +25 -0
- package/dist/fp/array/dropRight.mjs +25 -0
- package/dist/fp/array/dropRightWhile.d.mts +20 -0
- package/dist/fp/array/dropRightWhile.d.ts +20 -0
- package/dist/fp/array/dropRightWhile.js +25 -0
- package/dist/fp/array/dropRightWhile.mjs +25 -0
- package/dist/fp/array/dropWhile.d.mts +20 -0
- package/dist/fp/array/dropWhile.d.ts +20 -0
- package/dist/fp/array/dropWhile.js +36 -0
- package/dist/fp/array/dropWhile.mjs +36 -0
- package/dist/fp/array/filter.d.mts +45 -0
- package/dist/fp/array/filter.d.ts +45 -0
- package/dist/fp/array/filter.js +13 -0
- package/dist/fp/array/filter.mjs +12 -0
- package/dist/fp/array/find.d.mts +39 -0
- package/dist/fp/array/find.d.ts +39 -0
- package/dist/fp/array/find.js +8 -0
- package/dist/fp/array/find.mjs +8 -0
- package/dist/fp/array/findIndex.d.mts +20 -0
- package/dist/fp/array/findIndex.d.ts +20 -0
- package/dist/fp/array/findIndex.js +24 -0
- package/dist/fp/array/findIndex.mjs +24 -0
- package/dist/fp/array/findLast.d.mts +39 -0
- package/dist/fp/array/findLast.d.ts +39 -0
- package/dist/fp/array/findLast.js +11 -0
- package/dist/fp/array/findLast.mjs +11 -0
- package/dist/fp/array/findLastIndex.d.mts +20 -0
- package/dist/fp/array/findLastIndex.d.ts +20 -0
- package/dist/fp/array/findLastIndex.js +25 -0
- package/dist/fp/array/findLastIndex.mjs +25 -0
- package/dist/fp/array/flatMap.d.mts +28 -0
- package/dist/fp/array/flatMap.d.ts +28 -0
- package/dist/fp/array/flatMap.js +39 -0
- package/dist/fp/array/flatMap.mjs +38 -0
- package/dist/fp/array/flatMapDeep.d.mts +23 -0
- package/dist/fp/array/flatMapDeep.d.ts +23 -0
- package/dist/fp/array/flatMapDeep.js +38 -0
- package/dist/fp/array/flatMapDeep.mjs +37 -0
- package/dist/fp/array/flatten.d.mts +21 -0
- package/dist/fp/array/flatten.d.ts +21 -0
- package/dist/fp/array/flatten.js +39 -0
- package/dist/fp/array/flatten.mjs +38 -0
- package/dist/fp/array/flattenDeep.d.mts +21 -0
- package/dist/fp/array/flattenDeep.d.ts +21 -0
- package/dist/fp/array/flattenDeep.js +36 -0
- package/dist/fp/array/flattenDeep.mjs +35 -0
- package/dist/fp/array/forEach.d.mts +22 -0
- package/dist/fp/array/forEach.d.ts +22 -0
- package/dist/fp/array/forEach.js +33 -0
- package/dist/fp/array/forEach.mjs +32 -0
- package/dist/fp/array/groupBy.d.mts +21 -0
- package/dist/fp/array/groupBy.d.ts +21 -0
- package/dist/fp/array/groupBy.js +26 -0
- package/dist/fp/array/groupBy.mjs +26 -0
- package/dist/fp/array/head.d.mts +35 -0
- package/dist/fp/array/head.d.ts +35 -0
- package/dist/fp/array/head.js +9 -0
- package/dist/fp/array/head.mjs +9 -0
- package/dist/fp/array/index.d.mts +69 -0
- package/dist/fp/array/index.d.ts +69 -0
- package/dist/fp/array/index.js +68 -0
- package/dist/fp/array/index.mjs +68 -0
- package/dist/fp/array/initial.d.mts +19 -0
- package/dist/fp/array/initial.d.ts +19 -0
- package/dist/fp/array/initial.js +24 -0
- package/dist/fp/array/initial.mjs +24 -0
- package/dist/fp/array/intersection.d.mts +21 -0
- package/dist/fp/array/intersection.d.ts +21 -0
- package/dist/fp/array/intersection.js +32 -0
- package/dist/fp/array/intersection.mjs +31 -0
- package/dist/fp/array/intersectionBy.d.mts +22 -0
- package/dist/fp/array/intersectionBy.d.ts +22 -0
- package/dist/fp/array/intersectionBy.js +33 -0
- package/dist/fp/array/intersectionBy.mjs +32 -0
- package/dist/fp/array/intersectionWith.d.mts +22 -0
- package/dist/fp/array/intersectionWith.d.ts +22 -0
- package/dist/fp/array/intersectionWith.js +32 -0
- package/dist/fp/array/intersectionWith.mjs +31 -0
- package/dist/fp/array/isSubset.d.mts +20 -0
- package/dist/fp/array/isSubset.d.ts +20 -0
- package/dist/fp/array/isSubset.js +25 -0
- package/dist/fp/array/isSubset.mjs +25 -0
- package/dist/fp/array/isSubsetWith.d.mts +21 -0
- package/dist/fp/array/isSubsetWith.d.ts +21 -0
- package/dist/fp/array/isSubsetWith.js +26 -0
- package/dist/fp/array/isSubsetWith.mjs +26 -0
- package/dist/fp/array/join.d.mts +20 -0
- package/dist/fp/array/join.d.ts +20 -0
- package/dist/fp/array/join.js +24 -0
- package/dist/fp/array/join.mjs +24 -0
- package/dist/fp/array/keyBy.d.mts +21 -0
- package/dist/fp/array/keyBy.d.ts +21 -0
- package/dist/fp/array/keyBy.js +26 -0
- package/dist/fp/array/keyBy.mjs +26 -0
- package/dist/fp/array/last.d.mts +35 -0
- package/dist/fp/array/last.d.ts +35 -0
- package/dist/fp/array/last.js +9 -0
- package/dist/fp/array/last.mjs +9 -0
- package/dist/fp/array/length.d.mts +18 -0
- package/dist/fp/array/length.d.ts +18 -0
- package/dist/fp/array/length.js +22 -0
- package/dist/fp/array/length.mjs +22 -0
- package/dist/fp/array/map.d.mts +27 -0
- package/dist/fp/array/map.d.ts +27 -0
- package/dist/fp/array/map.js +36 -0
- package/dist/fp/array/map.mjs +35 -0
- package/dist/fp/array/maxBy.d.mts +37 -0
- package/dist/fp/array/maxBy.d.ts +37 -0
- package/dist/fp/array/maxBy.js +9 -0
- package/dist/fp/array/maxBy.mjs +9 -0
- package/dist/fp/array/minBy.d.mts +37 -0
- package/dist/fp/array/minBy.d.ts +37 -0
- package/dist/fp/array/minBy.js +9 -0
- package/dist/fp/array/minBy.mjs +9 -0
- package/dist/fp/array/orderBy.d.mts +21 -0
- package/dist/fp/array/orderBy.d.ts +21 -0
- package/dist/fp/array/orderBy.js +26 -0
- package/dist/fp/array/orderBy.mjs +26 -0
- package/dist/fp/array/partition.d.mts +39 -0
- package/dist/fp/array/partition.d.ts +39 -0
- package/dist/fp/array/partition.js +9 -0
- package/dist/fp/array/partition.mjs +9 -0
- package/dist/fp/array/reverse.d.mts +19 -0
- package/dist/fp/array/reverse.d.ts +19 -0
- package/dist/fp/array/reverse.js +23 -0
- package/dist/fp/array/reverse.mjs +23 -0
- package/dist/fp/array/sample.d.mts +18 -0
- package/dist/fp/array/sample.d.ts +18 -0
- package/dist/fp/array/sample.js +23 -0
- package/dist/fp/array/sample.mjs +23 -0
- package/dist/fp/array/sampleSize.d.mts +20 -0
- package/dist/fp/array/sampleSize.d.ts +20 -0
- package/dist/fp/array/sampleSize.js +25 -0
- package/dist/fp/array/sampleSize.mjs +25 -0
- package/dist/fp/array/shuffle.d.mts +19 -0
- package/dist/fp/array/shuffle.d.ts +19 -0
- package/dist/fp/array/shuffle.js +24 -0
- package/dist/fp/array/shuffle.mjs +24 -0
- package/dist/fp/array/sortBy.d.mts +26 -0
- package/dist/fp/array/sortBy.d.ts +26 -0
- package/dist/fp/array/sortBy.js +31 -0
- package/dist/fp/array/sortBy.mjs +31 -0
- package/dist/fp/array/tail.d.mts +19 -0
- package/dist/fp/array/tail.d.ts +19 -0
- package/dist/fp/array/tail.js +24 -0
- package/dist/fp/array/tail.mjs +24 -0
- package/dist/fp/array/take.d.mts +26 -0
- package/dist/fp/array/take.d.ts +26 -0
- package/dist/fp/array/take.js +39 -0
- package/dist/fp/array/take.mjs +38 -0
- package/dist/fp/array/takeRight.d.mts +20 -0
- package/dist/fp/array/takeRight.d.ts +20 -0
- package/dist/fp/array/takeRight.js +25 -0
- package/dist/fp/array/takeRight.mjs +25 -0
- package/dist/fp/array/takeRightWhile.d.mts +20 -0
- package/dist/fp/array/takeRightWhile.d.ts +20 -0
- package/dist/fp/array/takeRightWhile.js +25 -0
- package/dist/fp/array/takeRightWhile.mjs +25 -0
- package/dist/fp/array/takeWhile.d.mts +21 -0
- package/dist/fp/array/takeWhile.d.ts +21 -0
- package/dist/fp/array/takeWhile.js +32 -0
- package/dist/fp/array/takeWhile.mjs +31 -0
- package/dist/fp/array/toFilled.d.mts +23 -0
- package/dist/fp/array/toFilled.d.ts +23 -0
- package/dist/fp/array/toFilled.js +30 -0
- package/dist/fp/array/toFilled.mjs +30 -0
- package/dist/fp/array/union.d.mts +20 -0
- package/dist/fp/array/union.d.ts +20 -0
- package/dist/fp/array/union.js +25 -0
- package/dist/fp/array/union.mjs +25 -0
- package/dist/fp/array/unionBy.d.mts +22 -0
- package/dist/fp/array/unionBy.d.ts +22 -0
- package/dist/fp/array/unionBy.js +27 -0
- package/dist/fp/array/unionBy.mjs +27 -0
- package/dist/fp/array/unionWith.d.mts +21 -0
- package/dist/fp/array/unionWith.d.ts +21 -0
- package/dist/fp/array/unionWith.js +26 -0
- package/dist/fp/array/unionWith.mjs +26 -0
- package/dist/fp/array/uniq.d.mts +21 -0
- package/dist/fp/array/uniq.d.ts +21 -0
- package/dist/fp/array/uniq.js +36 -0
- package/dist/fp/array/uniq.mjs +36 -0
- package/dist/fp/array/uniqBy.d.mts +21 -0
- package/dist/fp/array/uniqBy.d.ts +21 -0
- package/dist/fp/array/uniqBy.js +38 -0
- package/dist/fp/array/uniqBy.mjs +38 -0
- package/dist/fp/array/uniqWith.d.mts +20 -0
- package/dist/fp/array/uniqWith.d.ts +20 -0
- package/dist/fp/array/uniqWith.js +35 -0
- package/dist/fp/array/uniqWith.mjs +35 -0
- package/dist/fp/array/unzip.d.mts +20 -0
- package/dist/fp/array/unzip.d.ts +20 -0
- package/dist/fp/array/unzip.js +24 -0
- package/dist/fp/array/unzip.mjs +24 -0
- package/dist/fp/array/unzipWith.d.mts +21 -0
- package/dist/fp/array/unzipWith.d.ts +21 -0
- package/dist/fp/array/unzipWith.js +26 -0
- package/dist/fp/array/unzipWith.mjs +26 -0
- package/dist/fp/array/windowed.d.mts +25 -0
- package/dist/fp/array/windowed.d.ts +25 -0
- package/dist/fp/array/windowed.js +50 -0
- package/dist/fp/array/windowed.mjs +50 -0
- package/dist/fp/array/without.d.mts +19 -0
- package/dist/fp/array/without.d.ts +19 -0
- package/dist/fp/array/without.js +30 -0
- package/dist/fp/array/without.mjs +29 -0
- package/dist/fp/array/xor.d.mts +20 -0
- package/dist/fp/array/xor.d.ts +20 -0
- package/dist/fp/array/xor.js +25 -0
- package/dist/fp/array/xor.mjs +25 -0
- package/dist/fp/array/xorBy.d.mts +22 -0
- package/dist/fp/array/xorBy.d.ts +22 -0
- package/dist/fp/array/xorBy.js +27 -0
- package/dist/fp/array/xorBy.mjs +27 -0
- package/dist/fp/array/xorWith.d.mts +21 -0
- package/dist/fp/array/xorWith.d.ts +21 -0
- package/dist/fp/array/xorWith.js +26 -0
- package/dist/fp/array/xorWith.mjs +26 -0
- package/dist/fp/array/zip.d.mts +61 -0
- package/dist/fp/array/zip.d.ts +61 -0
- package/dist/fp/array/zip.js +9 -0
- package/dist/fp/array/zip.mjs +9 -0
- package/dist/fp/array/zipObject.d.mts +21 -0
- package/dist/fp/array/zipObject.d.ts +21 -0
- package/dist/fp/array/zipObject.js +26 -0
- package/dist/fp/array/zipObject.mjs +26 -0
- package/dist/fp/array/zipWith.d.mts +57 -0
- package/dist/fp/array/zipWith.d.ts +57 -0
- package/dist/fp/array/zipWith.js +9 -0
- package/dist/fp/array/zipWith.mjs +9 -0
- package/dist/fp/index.d.mts +75 -0
- package/dist/fp/index.d.ts +75 -0
- package/dist/fp/index.js +150 -0
- package/dist/fp/index.mjs +77 -0
- package/dist/fp/math/add.d.mts +17 -0
- package/dist/fp/math/add.d.ts +17 -0
- package/dist/fp/math/add.js +21 -0
- package/dist/fp/math/add.mjs +21 -0
- package/dist/fp/math/index.d.mts +2 -0
- package/dist/fp/math/index.d.ts +2 -0
- package/dist/fp/math/index.js +2 -0
- package/dist/fp/math/index.mjs +2 -0
- package/dist/fp/math/multiply.d.mts +17 -0
- package/dist/fp/math/multiply.d.ts +17 -0
- package/dist/fp/math/multiply.js +21 -0
- package/dist/fp/math/multiply.mjs +21 -0
- package/dist/fp/object/index.d.mts +2 -0
- package/dist/fp/object/index.d.ts +2 -0
- package/dist/fp/object/index.js +2 -0
- package/dist/fp/object/index.mjs +2 -0
- package/dist/fp/object/omit.d.mts +18 -0
- package/dist/fp/object/omit.d.ts +18 -0
- package/dist/fp/object/omit.js +23 -0
- package/dist/fp/object/omit.mjs +23 -0
- package/dist/fp/object/pick.d.mts +19 -0
- package/dist/fp/object/pick.d.ts +19 -0
- package/dist/fp/object/pick.js +24 -0
- package/dist/fp/object/pick.mjs +24 -0
- package/dist/fp/pipe.d.mts +235 -0
- package/dist/fp/pipe.d.ts +235 -0
- package/dist/fp/pipe.js +116 -0
- package/dist/fp/pipe.mjs +116 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +3 -1
- package/dist/predicate/index.d.mts +2 -1
- package/dist/predicate/index.d.ts +2 -1
- package/dist/predicate/index.js +2 -0
- package/dist/predicate/index.mjs +2 -1
- package/dist/predicate/isIterable.d.mts +26 -0
- package/dist/predicate/isIterable.d.ts +26 -0
- package/dist/predicate/isIterable.js +28 -0
- package/dist/predicate/isIterable.mjs +28 -0
- package/dist/string/trimStart.js +1 -0
- package/dist/string/trimStart.mjs +1 -0
- package/fp.d.ts +1 -0
- package/fp.js +1 -0
- package/package.json +22 -1
package/dist/browser.global.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e._={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(...e){if(e.length===0)return[[]];let t=1;for(let n=0;n<e.length;n++)t*=e[n].length;if(t===0)return[];let n=e.length,r=Array(t);for(let i=0;i<t;i++){let t=Array(n),a=i;for(let r=n-1;r>=0;r--){let n=e[r],i=n.length;t[r]=n[a%i],a=Math.floor(a/i)}r[i]=t}return r}function n(e,t){if(!Number.isInteger(t)||t<=0)throw Error(`Size must be an integer greater than zero.`);let n=Math.ceil(e.length/t),r=Array(n);for(let i=0;i<n;i++){let n=i*t,a=n+t;r[i]=e.slice(n,a)}return r}function r(e,t){if(!Number.isInteger(t)||t<0)throw Error(`r must be a non-negative integer.`);let n=e.length;if(t>n)return[];if(t===0)return[[]];let r=Array(t);for(let e=0;e<t;e++)r[e]=e;let i=[];for(;;){let a=Array(t);for(let n=0;n<t;n++)a[n]=e[r[n]];i.push(a);let o=t-1;for(;o>=0&&r[o]===o+n-t;)o--;if(o<0)return i;r[o]++;for(let e=o+1;e<t;e++)r[e]=r[e-1]+1}}function i(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&t.push(r)}return t}function a(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function o(e,t,n){let r=new Set(t.map(e=>n(e)));return e.filter(e=>!r.has(n(e)))}function s(e,t,n){return e.filter(e=>t.every(t=>!n(e,t)))}function c(e,t){return t=Math.max(t,0),e.slice(t)}function l(e,t){return t=Math.min(-t,0),t===0?e.slice():e.slice(0,t)}function u(e,t){for(let n=e.length-1;n>=0;n--)if(!t(e[n],n,e))return e.slice(0,n+1);return[]}function d(e,t){let n=e.findIndex((e,n,r)=>!t(e,n,r));return n===-1?[]:e.slice(n)}function f(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i);for(let n=a;n<o;n++)e[n]=t;return e}var p=class{capacity;available;deferredTasks=[];constructor(e){this.capacity=e,this.available=e}async acquire(){if(this.available>0){this.available--;return}return new Promise(e=>{this.deferredTasks.push(e)})}release(){let e=this.deferredTasks.shift();if(e!=null){e();return}this.available<this.capacity&&this.available++}};function m(e,t){let n=new p(t);return async function(...t){try{return await n.acquire(),await e.apply(this,t)}finally{n.release()}}}async function h(e,t,n){n?.concurrency!=null&&(t=m(t,n.concurrency));let r=await Promise.all(e.map(t));return e.filter((e,t)=>r[t])}function g(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}async function ee(e,t,n){return n?.concurrency!=null&&(t=m(t,n.concurrency)),g(await Promise.all(e.map(t)))}async function te(e,t,n){n?.concurrency!=null&&(t=m(t,n.concurrency)),await Promise.all(e.map(t))}function ne(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);Object.hasOwn(n,a)||(n[a]=[]),n[a].push(i)}return n}function re(e){return e[0]}function ie(e){return e.slice(0,-1)}function ae(e,t){let n=new Set(t);return e.filter(e=>n.has(e))}function oe(e,t,n){let r=[],i=new Set(t.map(n));for(let t=0;t<e.length;t++){let a=e[t],o=n(a);i.has(o)&&(r.push(a),i.delete(o))}return r}function se(e,t,n){return e.filter(e=>t.some(t=>n(e,t)))}function ce(e,t){return a(t,e).length===0}function le(e,t,n){return s(t,e,n).length===0}function ue(e){return e[e.length-1]}function de(e,t,n){return n?.concurrency!=null&&(t=m(t,n.concurrency)),Promise.all(e.map(t))}function fe(e,t){if(e.length===0)return;let n=e[0],r=-1/0;for(let i=0;i<e.length;i++){let a=e[i],o=t(a,i,e);if(Number.isNaN(o))return a;o>r&&(r=o,n=a)}return n}function pe(e,t){if(e.length===0)return;let n=e[0],r=1/0;for(let i=0;i<e.length;i++){let a=e[i],o=t(a,i,e);if(Number.isNaN(o))return a;o<r&&(r=o,n=a)}return n}function me(e,t){let n=new Set(t),r=0;for(let t=0;t<e.length;t++)if(!n.has(e[t])){if(!Object.hasOwn(e,t)){delete e[r++];continue}e[r++]=e[t]}return e.length=r,e}async function he(e,t,n){let r=0;n??(n=e[0],r=1);let i=n;for(let n=r;n<e.length;n++)i=await t(i,e[n],n,e);return i}function ge(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e,t){if(t??(t=e,e=0),e>=t)throw Error(`Invalid input: The maximum value must be greater than the minimum value.`);return Math.random()*(t-e)+e}function ye(e,t){return Math.floor(ve(e,t))}function be(e,t){if(t>e.length)throw Error(`Size must be less than or equal to the length of array.`);let n=Array(t),r=new Set;for(let i=e.length-t,a=0;i<e.length;i++,a++){let t=ye(0,i+1);r.has(t)&&(t=i),r.add(t),n[a]=e[t]}return n}function xe(e){let t=e.slice();for(let e=t.length-1;e>=1;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function Se(e){return e.slice(1)}function _(e){return typeof e==`symbol`||e instanceof Symbol}function v(e){return _(e)?NaN:Number(e)}function y(e){return e?(e=v(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function b(e){let t=y(e),n=t%1;return n?t-n:t}function Ce(e,t,n){return t=n||t===void 0?1:b(t),e.slice(0,t)}function we(e,t,n){return t=n||t===void 0?1:b(t),t<=0||e.length===0?[]:e.slice(-t)}function Te(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i),s=e.slice();for(let e=a;e<o;e++)s[e]=t;return s}function Ee(e){return[...new Set(e)]}function De(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function Oe(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.every(e=>!t(e,i))&&n.push(i)}return n}function ke(e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=Array(t);for(let r=0;r<t;r++){n[r]=Array(e.length);for(let t=0;t<e.length;t++)n[r][t]=e[t][r]}return n}function Ae(e,t,n=1,{partialWindows:r=!1}={}){if(t<=0||!Number.isInteger(t))throw Error(`Size must be a positive integer.`);if(n<=0||!Number.isInteger(n))throw Error(`Step must be a positive integer.`);let i=[],a=r?e.length:e.length-t+1;for(let r=0;r<a;r+=n)i.push(e.slice(r,r+t));return i}function je(e,...t){return a(e,t)}function Me(...e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=e.length,r=Array(t);for(let i=0;i<t;++i){let t=Array(n);for(let r=0;r<n;++r)t[r]=e[r][i];r[i]=t}return r}let Ne=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})(),Pe=Ne.DOMException===void 0?Error:Ne.DOMException;var Fe=class extends Pe{constructor(e=`The operation was aborted`){super(e)}},Ie=class extends Pe{constructor(e=`The operation was timed out`){super(e)}};function Le(e,t){if(!Number.isInteger(e)||e<0)throw Error(`n must be a non-negative integer.`);let n=0;return(...r)=>{if(++n>=e)return t(...r)}}function Re(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}async function ze(){}function Be(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Ve(...e){return function(...t){let n=e.length?e[0].apply(this,t):t[0];for(let t=1;t<e.length;t++)n=e[t].call(this,n);return n}}function He(...e){return Ve(...e.reverse())}function x(e){return e}function Ue(e){return((...t)=>!e(...t))}function We(){}function Ge(e){let t=!1,n;return function(...r){return t||(t=!0,n=e(...r)),n}}function Ke(e,...t){return qe(e,Je,...t)}function qe(e,t,...n){let r=function(...r){let i=0,a=n.slice().map(e=>e===t?r[i++]:e),o=r.slice(i);return e.apply(this,a.concat(o))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let Je=Symbol(`partial.placeholder`);Ke.placeholder=Je;function Ye(e,...t){return Xe(e,Ze,...t)}function Xe(e,t,...n){let r=function(...r){let i=n.filter(e=>e===t).length,a=Math.max(r.length-i,0),o=r.slice(0,a),s=a,c=n.slice().map(e=>e===t?r[s++]:e);return e.apply(this,o.concat(c))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let Ze=Symbol(`partialRight.placeholder`);Ye.placeholder=Ze;function Qe(e,t=e.length-1){return function(...n){let r=n.slice(t),i=n.slice(0,t);for(;i.length<t;)i.push(void 0);return e.apply(this,[...i,r])}}function $e(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new Fe)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}let et=()=>!0;async function tt(e,t){let n,r,i,a;typeof t==`number`?(n=0,r=t,i=void 0,a=et):(n=t?.delay??0,r=t?.retries??1/0,i=t?.signal,a=t?.shouldRetry??et);let o;for(let t=0;t<=r;t++){if(i?.aborted)throw o??Error(`The retry operation was aborted due to an abort signal.`);try{return await e()}catch(e){if(o=e,!a(e,t))throw e;await $e(typeof n==`function`?n(t):n)}}throw o}function nt(e,t,n){if(n??(n=t,t=0),t>=n)throw Error(`The maximum value must be greater than the minimum value.`);return t<=e&&e<n}function rt(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t(e[r],r);return n}function it(e,t){return rt(e,e=>t(e))/e.length}function at(e){if(e.length===0)return NaN;let t=e.slice().sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function ot(e,t){return at(e.map(e=>t(e)))}function st(e,t){if(Number.isNaN(Number(t)))throw Error(`Expected percentile to be a number but got "${t}".`);if(t<0)throw Error(`Expected percentile to be >= 0 but got "${t}".`);if(t>100)throw Error(`Expected percentile to be <= 100 but got "${t}".`);if(e.length===0)return NaN;let n=e.slice().sort((e,t)=>(Number.isNaN(e)?-1/0:e)-(Number.isNaN(t)?-1/0:t));return t===0?n[0]:n[Math.ceil(n.length*(t/100))-1]}function ct(e,t,n=1){if(t??(t=e,e=0),!Number.isInteger(n)||n===0)throw Error(`The step value must be a non-zero integer.`);let r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e+t*n;return i}function S(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function lt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ut(e){if(S(e))return e;if(Array.isArray(e)||lt(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function dt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function C(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}let ft=`[object RegExp]`,pt=`[object String]`,mt=`[object Number]`,ht=`[object Boolean]`,gt=`[object Arguments]`,_t=`[object Symbol]`,vt=`[object Date]`,yt=`[object Map]`,bt=`[object Set]`,xt=`[object Array]`,St=`[object ArrayBuffer]`,Ct=`[object Object]`,wt=`[object DataView]`,Tt=`[object Uint8Array]`,Et=`[object Uint8ClampedArray]`,Dt=`[object Uint16Array]`,Ot=`[object Uint32Array]`,kt=`[object Int8Array]`,At=`[object Int16Array]`,jt=`[object Int32Array]`,Mt=`[object Float32Array]`,Nt=`[object Float64Array]`;function w(e){return Ne.Buffer!==void 0&&Ne.Buffer.isBuffer(e)}function Pt(e,t){return T(e,void 0,e,new Map,t)}function T(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(S(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=T(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,T(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(T(a,void 0,n,r,i));return t}if(w(e))return e.subarray();if(lt(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=T(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),E(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),E(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),E(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,E(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),E(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),E(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),E(t,e,n,r,i),t}if(typeof e==`object`&&Ft(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),E(t,e,n,r,i),t}return e}function E(e,t,n=e,r,i){let a=[...Object.keys(t),...dt(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=T(t[s],s,n,r,i))}}function Ft(e){switch(C(e)){case gt:case xt:case St:case wt:case ht:case vt:case Mt:case Nt:case kt:case At:case jt:case yt:case mt:case Ct:case ft:case bt:case pt:case _t:case Tt:case Et:case Dt:case Ot:return!0;default:return!1}}function It(e){return T(e,void 0,e,new Map,void 0)}function Lt(e,t){return Object.keys(e).find(n=>t(e[n],n,e))}function D(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Rt(e,{delimiter:t=`.`}={}){return zt(e,``,t)}function zt(e,t,n){let r={},i=Object.keys(e);for(let a=0;a<i.length;a++){let o=i[a],s=e[o],c=t?`${t}${n}${o}`:o;if(D(s)&&Object.keys(s).length>0){Object.assign(r,zt(s,c,n));continue}if(Array.isArray(s)&&s.length>0){Object.assign(r,zt(s,c,n));continue}r[c]=s}return r}function Bt(e){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];t[a]=i}return t}function Vt(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[t(o,a,e)]=o}return n}function Ht(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}function O(e){return e===`__proto__`}function k(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(O(a))continue;let o=t[a],s=e[a],c=n(s,o,a,e,t);c===void 0?Array.isArray(o)?Array.isArray(s)?e[a]=k(s,o,n):e[a]=k([],o,n):D(o)?D(s)?e[a]=k(s,o,n):e[a]=k({},o,n):(s===void 0||o!==void 0)&&(e[a]=o):e[a]=c}return e}function Ut(e,t){let n=Object.keys(e).sort(t),r={};for(let t=0;t<n.length;t++){let i=n[t];r[i]=e[i]}return r}function A(e){return Array.isArray(e)}function Wt(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}let Gt=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function j(e){return Array.from(e.match(Gt)??[])}function Kt(e){let t=j(e);if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>Wt(e)).join(``)}`}function qt(e){if(A(e))return e.map(e=>qt(e));if(D(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Kt(i);t[a]=qt(e[i])}return t}return e}function Jt(e,t){return k(It(e),t,function e(t,n){if(Array.isArray(n))return k(Array.isArray(t)?ut(t):[],n,e);if(D(n))return D(t)?k(ut(t),n,e):k({},n,e)})}function M(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Yt(e){return j(e).map(e=>e.toLowerCase()).join(`_`)}function Xt(e){if(A(e))return e.map(e=>Xt(e));if(M(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Yt(i);t[a]=Xt(e[i])}return t}return e}function Zt(e){return e instanceof ArrayBuffer}function Qt(e){return typeof Blob>`u`?!1:e instanceof Blob}function $t(){return typeof window<`u`&&window?.document!=null}function en(e){return e instanceof Date}function tn(e){return D(e)&&Object.keys(e).length===0}function N(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function nn(e,t,n){return rn(e,t,void 0,void 0,void 0,void 0,n)}function rn(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return an(e,t,a,o)}return an(e,t,a,o)}function an(e,t,n,r){if(Object.is(e,t))return!0;let i=C(e),a=C(t);if(i===`[object Arguments]`&&(i=Ct),a===`[object Arguments]`&&(a=Ct),i!==a)return!1;switch(i){case pt:return e.toString()===t.toString();case mt:return N(e.valueOf(),t.valueOf());case ht:case vt:case _t:return Object.is(e.valueOf(),t.valueOf());case ft:return e.source===t.source&&e.flags===t.flags;case`[object Function]`:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case yt:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!rn(a,t.get(i),i,e,t,n,r))return!1;return!0;case bt:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>rn(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case xt:case Tt:case Et:case Dt:case Ot:case`[object BigUint64Array]`:case kt:case At:case jt:case`[object BigInt64Array]`:case Mt:case Nt:if(w(e)!==w(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!rn(e[i],t[i],i,e,t,n,r))return!1;return!0;case St:return e.byteLength===t.byteLength?an(new Uint8Array(e),new Uint8Array(t),n,r):!1;case wt:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:an(new Uint8Array(e),new Uint8Array(t),n,r);case`[object Error]`:return e.name===t.name&&e.message===t.message;case Ct:{if(!(an(e.constructor,t.constructor,n,r)||D(e)&&D(t)))return!1;let i=[...Object.keys(e),...dt(e)],a=[...Object.keys(t),...dt(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!rn(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function on(e,t){return nn(e,t,We)}function sn(e){return typeof File>`u`?!1:Qt(e)&&e instanceof File}function P(e){return typeof e==`function`}function cn(e){if(typeof e!=`string`)return!1;try{return JSON.parse(e),!0}catch{return!1}}function ln(e){switch(typeof e){case`object`:return e===null||un(e)||dn(e);case`string`:case`number`:case`boolean`:return!0;default:return!1}}function un(e){return Array.isArray(e)?e.every(e=>ln(e)):!1}function dn(e){if(!D(e))return!1;let t=Reflect.ownKeys(e);for(let n=0;n<t.length;n++){let r=t[n],i=e[r];if(typeof r!=`string`||!ln(i))return!1}return!0}function fn(e){return Number.isSafeInteger(e)&&e>=0}function pn(e){return e instanceof Map}function F(e){return e==null}function mn(){return typeof process<`u`&&process?.versions?.node!=null}function hn(e){return e!=null}function gn(e){return e===null}function _n(e){return e instanceof Promise}function vn(e){return e instanceof RegExp}function yn(e){return e instanceof Set}function bn(e){return typeof e==`symbol`}function xn(e){return e===void 0}function Sn(e){return e instanceof WeakMap}function Cn(e){return e instanceof WeakSet}async function wn(e){let t=Object.keys(e),n=await Promise.all(t.map(t=>e[t])),r={};for(let e=0;e<t.length;e++)r[t[e]]=n[e];return r}var Tn=class{semaphore=new p(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};function En(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{clearTimeout(a)};if(t?.aborted)return;let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),r(new Ie)},e);t?.addEventListener(`abort`,i,{once:!0})})}async function Dn(e,t,{signal:n}={}){return Promise.race([e(),En(t,{signal:n})])}function On(e){return j(e).map(e=>e.toUpperCase()).join(`_`)}let kn=new Map([[`Æ`,`Ae`],[`Ð`,`D`],[`Ø`,`O`],[`Þ`,`Th`],[`ß`,`ss`],[`æ`,`ae`],[`ð`,`d`],[`ø`,`o`],[`þ`,`th`],[`Đ`,`D`],[`đ`,`d`],[`Ħ`,`H`],[`ħ`,`h`],[`ı`,`i`],[`IJ`,`IJ`],[`ij`,`ij`],[`ĸ`,`k`],[`Ŀ`,`L`],[`ŀ`,`l`],[`Ł`,`L`],[`ł`,`l`],[`ʼn`,`'n`],[`Ŋ`,`N`],[`ŋ`,`n`],[`Œ`,`Oe`],[`œ`,`oe`],[`Ŧ`,`T`],[`ŧ`,`t`],[`ſ`,`s`]]);function An(e){e=e.normalize(`NFD`);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r>=`̀`&&r<=`ͯ`||r>=`︠`&&r<=`︣`||(t+=kn.get(r)??r)}return t}let jn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Mn(e){return e.replace(/[&<>"']/g,e=>jn[e])}function Nn(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function Pn(e){return j(e).map(e=>e.toLowerCase()).join(`-`)}function Fn(e){return j(e).map(e=>e.toLowerCase()).join(` `)}function In(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Ln(e,t,n=` `){return e.padStart(Math.floor((t-e.length)/2)+e.length,n).padEnd(t,n)}function Rn(e){return j(e).map(e=>Wt(e)).join(``)}function zn(e){return[...e].reverse().join(``)}function Bn(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function Vn(e,t){if(t===void 0)return e.trimStart();let n=0;switch(typeof t){case`string`:for(;n<e.length&&e[n]===t;)n++;break;case`object`:for(;n<e.length&&t.includes(e[n]);)n++}return e.substring(n)}function Hn(e,t){return t===void 0?e.trim():Vn(Bn(e,t),t)}let Un={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`};function Wn(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Un[e]||`'`)}function Gn(e){let t=j(e),n=``;for(let e=0;e<t.length;e++)n+=t[e].toUpperCase(),e<t.length-1&&(n+=` `);return n}function Kn(e){return e.substring(0,1).toUpperCase()+e.substring(1)}async function qn(e){try{return[null,await e()]}catch(e){return[e,null]}}function Jn(e,t){if(!e)throw typeof t==`string`?Error(t):t}function Yn(e){return arguments.length===0?[]:Array.isArray(e)?e:[e]}function I(e){return Array.isArray(e)?e:Array.from(e)}function L(e){return e!=null&&typeof e!=`function`&&fn(e.length)}function Xn(e,t=1){return t=Math.max(Math.floor(t),0),t===0||!L(e)?[]:n(I(e),t)}function Zn(e){return L(e)?i(Array.from(e)):[]}function Qn(...e){return g(e)}function $n(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function R(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function z(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(z).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function B(e){if(Array.isArray(e))return e.map(R);if(typeof e==`symbol`)return[e];e=z(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function V(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(O(t))return n;let r=e[t];return r===void 0?$n(t)?V(e,B(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=R(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return er(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),O(t))return n;let r=e[t];return r===void 0?n:r}}}function er(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||O(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function H(e){return function(t){return V(t,e)}}function U(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function tr(e,t,n){return typeof n==`function`?nr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?nr(t,r,e,s,!1):!!c},new Map,!0):tr(e,t,()=>void 0)}function nr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return rr(e,t,n,r);case`function`:return Object.keys(t).length>0?nr(e,{...t},n,r,i):N(e,t);default:return U(e)&&i?typeof t==`string`?t===``:!0:N(e,t)}}function rr(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return ar(e,t,n,r);if(t instanceof Map)return ir(e,t,n,r);if(t instanceof Set)return or(e,t,n,r);let i=Object.keys(t);if(e==null||S(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!S(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function ir(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function ar(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function or(e,t,n,r){return t.size===0?!0:e instanceof Set?ar([...e],[...t],n,r):!1}function sr(e,t){return tr(e,t,()=>void 0)}function W(e){return e=It(e),t=>sr(t,e)}function cr(e,t){return Pt(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(C(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),E(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case mt:case pt:case ht:{let t=new e.constructor(e?.valueOf());return E(t,e),t}case gt:{let t={};return E(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function lr(e){return cr(e)}let ur=/^(?:0|[1-9]\d*)$/;function dr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return ur.test(e)}}function fr(e){return typeof e==`object`&&!!e&&C(e)===`[object Arguments]`}function pr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&$n(t)&&e?.[t]==null?B(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||fr(r))&&dr(t)&&t<r.length))return!1;r=r[t]}return!0}function G(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=R(e);break}return t=lr(t),function(n){let r=V(n,e);return r===void 0?pr(n,e):t===void 0?r===void 0:sr(r,t)}}function K(e){if(e==null)return x;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?G(e[0],e[1]):W(e);case`string`:case`symbol`:case`number`:return H(e)}}function mr(e,t){if(e==null)return{};let n=L(e)?Array.from(e):Object.values(e),r=K(t??void 0),i=Object.create(null);for(let e=0;e<n.length;e++){let t=n[e],a=r(t);i[a]=(i[a]??0)+1}return i}function q(e){return typeof e==`object`&&!!e}function J(e){return q(e)&&L(e)}function hr(e,...t){if(!J(e))return[];let n=Array.from(e),r=[];for(let e=0;e<t.length;e++){let n=t[e];J(n)&&r.push(...Array.from(n))}return a(n,r)}function gr(e){if(L(e))return ue(I(e))}function _r(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(J(r))for(let e=0;e<r.length;e++)t.push(r[e])}return t}function vr(e,...t){if(!J(e))return[];let n=gr(t),r=_r(t);return J(n)?a(Array.from(e),r):o(Array.from(e),r,K(n))}function yr(e,...t){if(!J(e))return[];let n=gr(t),r=_r(t);return typeof n==`function`?s(Array.from(e),r,n):a(Array.from(e),r)}function br(e,t=1,n){return L(e)?(t=n?1:b(t),c(I(e),t)):[]}function xr(e,t=1,n){return L(e)?(t=n?1:b(t),l(I(e),t)):[]}function Sr(e,t=x){return L(e)?Cr(Array.from(e),t):[]}function Cr(e,t){switch(typeof t){case`function`:return u(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return u(e,G(n,r))}else return u(e,W(t));case`symbol`:case`number`:case`string`:return u(e,H(t))}}function wr(e,t=x){return L(e)?Tr(I(e),t):[]}function Tr(e,t){switch(typeof t){case`function`:return d(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return d(e,G(n,r))}else return d(e,W(t));case`number`:case`symbol`:case`string`:return d(e,H(t))}}function Er(e,t=x){if(!e)return e;let n=L(e)||Array.isArray(e)?ct(0,e.length):Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function Dr(e,t=x){if(!e)return e;let n=L(e)?ct(0,e.length):Object.keys(e);for(let r=n.length-1;r>=0;r--){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function Y(e,t,n){return U(n)&&(typeof t==`number`&&L(n)&&dr(t)&&t<n.length||typeof t==`string`&&t in n)?N(n[t],e):!1}function Or(e,t,n){if(!e)return!0;n&&Y(e,t,n)&&(t=void 0),t||=x;let r;switch(typeof t){case`function`:r=t;break;case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];r=G(e,n)}else r=W(t);break;case`symbol`:case`number`:case`string`:r=H(t)}if(!L(e)){let t=Object.keys(e);for(let n=0;n<t.length;n++){let i=t[n],a=e[i];if(!r(a,i,e))return!1}return!0}for(let t=0;t<e.length;t++)if(!r(e[t],t,e))return!1;return!0}function kr(e){return typeof e==`string`||e instanceof String}function Ar(e,t,n=0,r=e?e.length:0){return L(e)?kr(e)?e:(n=Math.floor(n),r=Math.floor(r),n||=0,r||=0,f(e,t,n,r)):[]}function jr(e,t=x){if(!e)return[];if(t=K(t),!Array.isArray(e)){let n=[],r=Object.keys(e),i=L(e)?e.length:r.length;for(let a=0;a<i;a++){let i=r[a],o=e[i];t(o,i,e)&&n.push(o)}return n}let n=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];t(r,i,e)&&n.push(r)}return n}function Mr(e,t=x,n=0){if(!e)return;n<0&&(n=Math.max(e.length+n,0));let r=K(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let i=n;i<t.length;i++){let n=t[i],a=e[n];if(r(a,n,e))return a}return}return e.slice(n).find(r)}function X(e){return e}function Nr(e,t=X,n=0){if(!e)return-1;n<0&&(n=Math.max(e.length+n,0));let r=Array.from(e).slice(n),i=-1;switch(typeof t){case`function`:i=r.findIndex(t);break;case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];i=r.findIndex(G(e,n))}else i=r.findIndex(W(t));break;case`number`:case`symbol`:case`string`:i=r.findIndex(H(t))}return i===-1?-1:i+n}function Pr(e,t=x,n){if(!e)return;let r=Array.isArray(e)?e.length:Object.keys(e).length;n=b(n??r-1),n=n<0?Math.max(r+n,0):Math.min(n,r-1);let i=K(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let r=n;r>=0;r--){let n=t[r],a=e[n];if(i(a,n,e))return a}return}return e.slice(0,n+1).findLast(i)}function Fr(e,t=x,n=e?e.length-1:0){if(!e)return-1;n=n<0?Math.max(e.length+n,0):Math.min(n,e.length-1);let r=I(e).slice(0,n+1);switch(typeof t){case`function`:return r.findLastIndex(t);case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];return r.findLastIndex(G(e,n))}else return r.findLastIndex(W(t));case`number`:case`symbol`:case`string`:return r.findLastIndex(H(t))}}function Ir(e){if(L(e))return re(I(e))}function Lr(e,t=1){let n=[],r=Math.floor(t);if(!L(e))return n;let i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];t<r&&(Array.isArray(o)||o?.[Symbol.isConcatSpreadable]||typeof o==`object`&&o&&Object.prototype.toString.call(o)===`[object Arguments]`)?i(Array.isArray(o)?o:Array.from(o),t+1):n.push(o)}};return i(Array.from(e),0),n}function Rr(e,t=1){return Lr(e,t)}function zr(e,t){if(!e)return[];let n=L(e)||Array.isArray(e)?ct(0,e.length):Object.keys(e),r=K(t??x),i=Array(n.length);for(let t=0;t<n.length;t++){let a=n[t],o=e[a];i[t]=r(o,a,e)}return i}function Br(e,t){return F(e)?[]:Rr(F(t)?zr(e):zr(e,t),1)}function Vr(e,t=x,n=1){return e==null?[]:Lr(zr(e,K(t)),n)}function Hr(e,t){return Vr(e,t,1/0)}function Ur(e){return Rr(e,1/0)}function Wr(e,t){return e==null?{}:ne(L(e)?Array.from(e):Object.values(e),K(t??x))}function Gr(e,t,n,r){if(e==null)return!1;if(n=r||!n?0:b(n),kr(e))return n>e.length||t instanceof RegExp?!1:(n<0&&(n=Math.max(0,e.length+n)),e.includes(t,n));if(Array.isArray(e))return e.includes(t,n);let i=Object.keys(e);n<0&&(n=Math.max(0,i.length+n));for(let r=n;r<i.length;r++)if(N(Reflect.get(e,i[r]),t))return!0;return!1}function Kr(e,t,n){if(!L(e))return-1;if(Number.isNaN(t)){n??=0,n<0&&(n=Math.max(0,e.length+n));for(let t=n;t<e.length;t++)if(Number.isNaN(e[t]))return t;return-1}return Array.from(e).indexOf(t,n)}function qr(e){return L(e)?ie(Array.from(e)):[]}function Jr(...e){if(e.length===0||!J(e[0]))return[];let t=Ee(Array.from(e[0]));for(let n=1;n<e.length;n++){let r=e[n];if(!J(r))return[];t=ae(t,Array.from(r))}return t}function Yr(e,...t){if(!J(e))return[];let n=ue(t);if(n===void 0)return Array.from(e);let r=Ee(Array.from(e)),i=J(n)?t.length:t.length-1;for(let e=0;e<i;++e){let i=t[e];if(!J(i))return[];J(n)?r=oe(r,Array.from(i),x):typeof n==`function`?r=oe(r,Array.from(i),e=>n(e)):typeof n==`string`&&(r=oe(r,Array.from(i),H(n)))}return r}function Xr(e){return L(e)?Ee(Array.from(e)):[]}function Zr(e,...t){if(e==null)return[];let n=gr(t),r=N,i=Xr;typeof n==`function`&&(r=n,i=Qr,t.pop());let a=i(Array.from(e));for(let e=0;e<t.length;++e){let n=t[e];if(n==null)return[];a=se(a,Array.from(n),r)}return a}function Qr(e){let t=[],n=new Set;for(let r=0;r<e.length;r++){let i=e[r];n.has(i)||(t.push(i),n.add(i))}return t}function $r(e,t,...n){if(F(e))return[];let r=L(e)?Array.from(e):Object.values(e),i=[];for(let e=0;e<r.length;e++){let a=r[e];if(P(t)){i.push(t.apply(a,n));continue}let o=V(a,t),s=a;if(Array.isArray(t)){let e=t.slice(0,-1);e.length>0&&(s=V(a,e))}else typeof t==`string`&&t.includes(`.`)&&(s=V(a,t.split(`.`).slice(0,-1).join(`.`)));i.push(o?.apply(s,n))}return i}function ei(e,t){return L(e)?Array.from(e).join(t):``}function ti(e,t=x,n){let r=arguments.length>=3;if(!e)return n;let i,a=0;L(e)?(i=ct(0,e.length),!r&&e.length>0&&(n=e[0],a+=1)):(i=Object.keys(e),!r&&i.length>0&&(n=e[i[0]],a+=1));for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function ni(e,t){if(!L(e)&&!q(e))return{};let n=K(t??x);return ti(e,(e,t)=>{let r=n(t);return e[r]=t,e},{})}function ri(e,t,n){if(!L(e)||e.length===0)return-1;let r=e.length,i=n??r-1;if(n!=null&&(i=i<0?Math.max(r+i,0):Math.min(i,r-1)),Number.isNaN(t)){for(let t=i;t>=0;t--)if(Number.isNaN(e[t]))return t}return Array.from(e).lastIndexOf(t,i)}function ii(e,t=0){if(!(!J(e)||e.length===0))return t=b(t),t<0&&(t+=e.length),e[t]}function ai(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}let oi=(e,t,n)=>{if(e!==t){let r=ai(e),i=ai(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},si=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ci=/^\w*$/;function li(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||_(e)?!0:typeof e==`string`&&(ci.test(e)||!si.test(e))||t!=null&&Object.hasOwn(t,e)}function ui(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||li(e)?e:{key:e,path:B(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=oi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function di(e,t=x){if(!e)return[[],[]];let n=L(e)?e:Object.values(e);t=K(t);let r=[],i=[];for(let e=0;e<n.length;e++){let a=n[e];t(a)?r.push(a):i.push(a)}return[r,i]}function fi(e,...t){return me(e,t)}function pi(e,t=[]){return me(e,Array.from(t))}function mi(e,t,n){let r=K(n),i=new Set(Array.from(t).map(e=>r(e))),a=0;for(let t=0;t<e.length;t++){let n=r(e[t]);if(!i.has(n)){if(!Object.hasOwn(e,t)){delete e[a++];continue}e[a++]=e[t]}}return e.length=a,e}function hi(e,t){let n=e.length;t??=Array(n);for(let r=0;r<n;r++)t[r]=e[r];return t}function gi(e,t,n){if(e?.length==null||t?.length==null)return e;e===t&&(t=hi(t));let r=0;n??=(e,t)=>N(e,t);let i=Array.isArray(t)?t:Array.from(t),a=i.includes(void 0);for(let t=0;t<e.length;t++){if(t in e){i.some(r=>n(e[t],r))||(e[r++]=e[t]);continue}a||delete e[r++]}return e.length=r,e}function _i(e,...t){if(t.length===0)return[];let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(!L(r)||kr(r)){n.push(r);continue}for(let e=0;e<r.length;e++)n.push(r[e])}let r=[];for(let t=0;t<n.length;t++)r.push(V(e,n[t]));return r}function vi(e,t){if(e==null)return!0;switch(typeof t){case`symbol`:case`number`:case`object`:if(Array.isArray(t))return yi(e,t);if(typeof t==`number`?t=R(t):typeof t==`object`&&(t=Object.is(t?.valueOf(),-0)?`-0`:String(t)),O(t))return!1;if(e?.[t]===void 0)return!0;try{return delete e[t],!0}catch{return!1}case`string`:if(e?.[t]===void 0&&$n(t))return yi(e,B(t));if(O(t))return!1;try{return delete e[t],!0}catch{return!1}}}function yi(e,t){let n=t.length===1?e:V(e,t.slice(0,-1)),r=t[t.length-1];if(n?.[r]===void 0)return!0;if(O(r))return!1;try{return delete n[r],!0}catch{return!1}}function bi(e,...t){let n=Rr(t,1);if(!e)return Array(n.length);let r=_i(e,n),i=n.map(t=>dr(t,e.length)?Number(t):t).sort((e,t)=>t-e);for(let t of new Set(i)){if(dr(t,e.length)){Array.prototype.splice.call(e,t,1);continue}if(li(t,e)){delete e[R(t)];continue}vi(e,A(t)?t:B(t))}return r}function xi(e,t=x,n){let r=arguments.length>=3;if(!e)return n;let i,a;L(e)?(i=ct(0,e.length).reverse(),!r&&e.length>0?(n=e[e.length-1],a=1):a=0):(i=Object.keys(e).reverse(),!r&&i.length>0?(n=e[i[0]],a=1):a=0);for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function Si(e){if(typeof e!=`function`)throw TypeError(`Expected a function`);return function(...t){return!e.apply(this,t)}}function Ci(e,t=x){return jr(e,Si(K(t)))}function wi(e,t=x){return ge(e,K(t))}function Ti(e){return e==null?e:e.reverse()}function Ei(e){if(e!=null)return L(e)?_e(I(e)):_e(Object.values(e))}function Di(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=v(n),e=Math.min(e,Number.isNaN(n)?0:n)),t!==void 0&&(t=v(t),e=Math.max(e,Number.isNaN(t)?0:t)),e}function Oi(e){return pn(e)}function ki(e){return e==null?[]:L(e)||Oi(e)?Array.from(e):typeof e==`object`?Object.values(e):[]}function Ai(e,t,n){let r=ki(e);return t=(n?Y(e,t,n):t===void 0)?1:Di(b(t),0,r.length),be(r,t)}function ji(e){return e==null?[]:Object.values(e)}function Mi(e){return e==null}function Ni(e){return Mi(e)?[]:A(e)?xe(e):L(e)?xe(Array.from(e)):q(e)?xe(ji(e)):[]}function Pi(e){return F(e)?0:L(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length}function Fi(e,t,n){if(!L(e))return[];let r=e.length;n===void 0?n=r:typeof n!=`number`&&Y(e,t,n)&&(t=0,n=r),t=b(t),n=b(n),t=t<0?Math.max(r+t,0):Math.min(t,r),n=n<0?Math.max(r+n,0):Math.min(n,r);let i=Math.max(n-t,0),a=Array(i);for(let n=0;n<i;++n)a[n]=e[t+n];return a}function Ii(e,t,n){if(!e)return!1;n!=null&&(t=void 0),t??=x;let r=Array.isArray(e)?e:Object.values(e);switch(typeof t){case`function`:if(!Array.isArray(e)){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e))return!0}return!1}for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1;case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],i=t[1],a=G(n,i);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(a(e[t]))return!0;return!1}return r.some(a)}else{let n=W(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}case`number`:case`symbol`:case`string`:{let n=H(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}}}function Li(e,...t){let n=t.length;return n>1&&Y(e,t[0],t[1])?t=[]:n>2&&Y(t[0],t[1],t[2])&&(t=[t[0]]),ui(e,g(t),[`asc`])}function Ri(e){return typeof e==`number`||q(e)&&C(e)===`[object Number]`}function zi(e){return Ri(e)&&Number.isNaN(Number(e))}function Bi(e,t,n=X,r){if(Mi(e)||e.length===0)return 0;let i=0,a=e.length,o=K(n),s=o(t),c=zi(s),l=gn(s),u=_(s),d=xn(s);for(;i<a;){let t,n=Math.floor((i+a)/2),f=o(e[n]),p=!xn(f),m=gn(f),h=!zi(f),g=_(f);t=c?r||h:d?h&&(r||p):l?h&&p&&(r||!m):u?h&&p&&!m&&(r||!g):m||g?!1:r?f<=s:f<s,t?i=n+1:a=n}return Math.min(a,4294967294)}function Vi(e,t){if(F(e))return 0;let n=0,r=e.length;if(Ri(t)&&t===t&&r<=2147483647){for(;n<r;){let i=n+r>>>1,a=e[i];!gn(a)&&!bn(a)&&a<t?n=i+1:r=i}return r}return Bi(e,t,e=>e)}function Hi(e,t){if(!e?.length)return-1;let n=Vi(e,t);return n<e.length&&N(e[n],t)?n:-1}function Ui(e,t,n){return Bi(e,t,n,!0)}function Wi(e,t){if(F(e))return 0;let n=e.length;if(!Ri(t)||Number.isNaN(t)||n>2147483647)return Ui(e,t,e=>e);let r=0;for(;r<n;){let i=r+n>>>1,a=e[i];!gn(a)&&!bn(a)&&a<=t?r=i+1:n=i}return n}function Gi(e,t){if(!e?.length)return-1;let n=Wi(e,t)-1;return n>=0&&N(e[n],t)?n:-1}function Ki(e){return L(e)?Se(I(e)):[]}function qi(e,t=1,n){return t=n?1:b(t),t<1||!L(e)?[]:Ce(I(e),t)}function Ji(e,t=1,n){return t=n?1:b(t),t<=0||!L(e)?[]:we(I(e),t)}function Yi(e,t){if(!J(e))return[];let n=I(e),r=n.findLastIndex(Ue(K(t??x)));return n.slice(r+1)}function Xi(e,t){if(!J(e))return[];let n=I(e),r=n.findIndex(Si(K(t??X)));return r===-1?n:n.slice(0,r)}function Zi(...e){return Ee(Vr(e.filter(J),e=>Array.from(e),1))}function Qi(...e){let t=ue(e),n=_r(e);return J(t)||t==null?Ee(n):De(n,Re(K(t),1))}function $i(...e){let t=ue(e),n=_r(e);return J(t)||t==null?Ee(n):Oe(n,t)}function ea(e,t=x){return J(e)?De(Array.from(e),Re(K(t),1)):[]}function ta(e,t){return L(e)?typeof t==`function`?Oe(Array.from(e),(e,n)=>t(n,e)):Xr(Array.from(e)):[]}function na(e){return!J(e)||!e.length?[]:(e=A(e)?e:Array.from(e),e=e.filter(e=>J(e)),ke(e))}function ra(e,t){if(!J(e)||!e.length)return[];let n=A(e)?ke(e):ke(Array.from(e,e=>Array.from(e)));if(!t)return n;let r=Array(n.length);for(let e=0;e<n.length;e++){let i=n[e];r[e]=t(...i)}return r}function ia(e,...t){return J(e)?je(Array.from(e),...t):[]}function aa(...e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];if(!J(r))continue;let i=new Set(ki(r));for(let e of i)t.has(e)?t.set(e,t.get(e)+1):t.set(e,1)}let n=[];for(let[e,r]of t)r===1&&n.push(e);return n}function oa(...e){let t=gr(e),n=x;!J(t)&&t!=null&&(n=K(t),e=e.slice(0,-1));let r=e.filter(J);return vr(Qi(...r,n),Qi(...Ae(r,2).map(([e,t])=>Yr(e,t,n)),n),n)}function sa(...e){let t=gr(e),n=(e,t)=>e===t;typeof t==`function`&&(n=t,e=e.slice(0,-1));let r=e.filter(J);return yr($i(...r,n),$i(...Ae(r,2).map(([e,t])=>Zr(e,t,n)),n),n)}function ca(...e){return e.length?Me(...e.filter(e=>J(e))):[]}let la=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&N(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function ua(e=[],t=[]){let n={};for(let r=0;r<e.length;r++)la(n,e[r],t[r]);return n}function da(e,t,n,r){if(e==null&&!U(e))return e;let i;i=li(t,e)?[t]:Array.isArray(t)?t:B(t);let a=n(V(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=R(i[t]);if(O(n))continue;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?U(a)?a:dr(i[t+1])?[]:{}:c}la(o,n,s),o=o[n]}return e}function fa(e,t,n){return da(e,t,()=>n,()=>void 0)}function pa(e,t){let n={};if(!L(e))return n;L(t)||(t=[]);let r=Me(Array.from(e),Array.from(t));for(let e=0;e<r.length;e++){let[t,i]=r[e];t!=null&&fa(n,t,i)}return n}function ma(...e){let t=e.pop();if(P(t)||(e.push(t),t=void 0),!e?.length)return[];let n=na(e);return t==null?n:n.map(e=>t(...e))}function ha(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);return e=b(e),function(...n){if(--e<1)return t.apply(this,n)}}function ga(e,t=e.length,n){return n&&(t=e.length),(Number.isNaN(t)||t<0)&&(t=0),Re(e,t)}function _a(e,...t){try{return e(...t)}catch(e){return e instanceof Error?e:Error(e)}}function va(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);let n;return e=b(e),function(...r){return--e>0&&(n=t.apply(this,r)),e<=1&&t&&(t=void 0),n}}function ya(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===ya.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e(...a):e.apply(t,a)};return r}ya.placeholder=Symbol(`bind.placeholder`);function ba(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===ba.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e[t](...a):e[t].apply(e,a)};return r}ba.placeholder=Symbol(`bindKey.placeholder`);function xa(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===xa.placeholder),a=n.length-i.length;return a<t?Sa(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=wa,r}function Sa(e,t,n){function r(...i){let a=i.filter(e=>e===xa.placeholder),o=i.length-a.length;return i=Ca(i,n),o<t?Sa(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=wa,r}function Ca(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let a=t[i];a===xa.placeholder&&r<e.length?n.push(e[r++]):n.push(a)}for(let t=r;t<e.length;t++)n.push(e[t]);return n}let wa=Symbol(`curry.placeholder`);xa.placeholder=wa;function Ta(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===Ta.placeholder),a=n.length-i.length;return a<t?Ea(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=Oa,r}function Ea(e,t,n){function r(...i){let a=i.filter(e=>e===Ta.placeholder),o=i.length-a.length;return i=Da(i,n),o<t?Ea(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=Oa,r}function Da(e,t){let n=t.filter(e=>e===Ta.placeholder).length,r=Math.max(e.length-n,0),i=[],a=0;for(let t=0;t<r;t++)i.push(e[a++]);for(let n=0;n<t.length;n++){let r=t[n];r===Ta.placeholder&&a<e.length?i.push(e[a++]):i.push(r)}return i}let Oa=Symbol(`curryRight.placeholder`);Ta.placeholder=Oa;function ka(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Be(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Aa(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,1,...t)}function ja(e,t,...n){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,v(t)||0,...n)}function Ma(e){return function(...t){return e.apply(this,t.reverse())}}function Na(...e){let t=g(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Ve(...t)}function Pa(...e){let t=g(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return He(...t)}function Fa(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Fa.Cache||Map),n}Fa.Cache=Map;function Ia(e=0){return function(...t){return t.at(b(e))}}function La(e){return Ge(e)}function Ra(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);let n=t.flat();return function(...t){let r=Math.min(t.length,n.length),i=[...t];for(let e=0;e<r;e++)i[e]=K(n[e]??x).call(this,t[e]);return e.apply(this,i)}}function za(e,...t){return qe(e,za.placeholder,...t)}za.placeholder=Symbol(`compat.partial.placeholder`);function Ba(e,...t){return Xe(e,Ba.placeholder,...t)}Ba.placeholder=Symbol(`compat.partialRight.placeholder`);function Va(e,...t){let n=Lr(t);return function(...t){let r=n.map(e=>t[e]).slice(0,t.length);for(let e=r.length;e<t.length;e++)r.push(t[e]);return e.apply(this,r)}}function Ha(e,t=e.length-1){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=e.length-1),Qe(e,t)}function Ua(e,t=0){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=0),function(...n){let r=n[t],i=n.slice(0,t);return r&&i.push(...r),e.apply(this,i)}}function Wa(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return ka(e,t,{leading:r,maxWait:t,trailing:i})}function Ga(e){return ga(e,1)}function Ka(e,t){return function(...n){return(P(t)?t:x).apply(this,[e,...n])}}function qa(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=z(e),t=z(t)):(e=v(e),t=v(t)),e+t)}function Ja(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n&&Number.isFinite(Number(t))){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function Ya(e,t=0){return Ja(`ceil`,e,t)}function Xa(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=z(e),t=z(t)):(e=v(e),t=v(t)),e/t)}function Za(e,t=0){return Ja(`floor`,e,t)}function Qa(e,t,n){return t||=0,n!=null&&!n&&(n=0),t!=null&&typeof t!=`number`&&(t=Number(t)),n==null&&t===0||(n!=null&&typeof n!=`number`&&(n=Number(n)),n!=null&&t>n&&([t,n]=[n,t]),t===n)?!1:nt(e,t,n)}function $a(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r>t)&&(t=r)}return t}function eo(e,t){if(e!=null)return fe(Array.from(e),K(t??x))}function to(e,t){if(!e||!e.length)return 0;t!=null&&(t=K(t));let n;for(let r=0;r<e.length;r++){let i=t?t(e[r]):e[r];i!==void 0&&(n===void 0?n=i:n+=i)}return n}function no(e){return to(e)}function ro(e){let t=e?e.length:0;return t===0?NaN:no(e)/t}function io(e,t){return e==null?NaN:it(Array.from(e),K(t??x))}function ao(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r<t)&&(t=r)}return t}function oo(e,t){if(e!=null)return pe(Array.from(e),K(t??x))}function so(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=z(e),t=z(t)):(e=v(e),t=v(t)),e*t)}function co(e,t=0,n){return n&&(t=0),Number.parseInt(z(e),t)}function lo(...e){let t=0,n=1,r=!1;switch(e.length){case 1:typeof e[0]==`boolean`?r=e[0]:n=e[0];break;case 2:typeof e[1]==`boolean`?(n=e[0],r=e[1]):(t=e[0],n=e[1]);case 3:typeof e[2]==`object`&&e[2]!=null&&e[2][e[1]]===e[0]?(t=0,n=e[0],r=!1):(t=e[0],n=e[1],r=e[2])}return typeof t!=`number`&&(t=Number(t)),typeof n!=`number`&&(n=Number(n)),t||=0,n||=0,t>n&&([t,n]=[n,t]),t=Di(t,-(2**53-1),2**53-1),n=Di(n,-(2**53-1),2**53-1),t===n?t:r?ve(t,n+1):ye(t,n+1)}function uo(e,t,n){n&&typeof n!=`number`&&Y(e,t,n)&&(t=n=void 0),e=y(e),t===void 0?(t=e,e=0):t=y(t),n=n===void 0?e<t?1:-1:y(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}function fo(e,t,n){n&&typeof n!=`number`&&Y(e,t,n)&&(t=n=void 0),e=y(e),t===void 0?(t=e,e=0):t=y(t),n=n===void 0?e<t?1:-1:y(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=r-1;t>=0;t--)i[t]=e,e+=n;return i}function po(e,t=0){return Ja(`round`,e,t)}function mo(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=z(e),t=z(t)):(e=v(e),t=v(t)),e-t)}function ho(...e){}function go(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Z(e){return lt(e)}function _o(e,t){if(e=b(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function Q(e){if(L(e))return vo(e);let t=Object.keys(Object(e));return go(e)?t.filter(e=>e!==`constructor`):t}function vo(e){let t=_o(e.length,e=>`${e}`),n=new Set(t);w(e)&&(n.add(`offset`),n.add(`parent`)),Z(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=Object.keys(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function yo(e,...t){for(let n=0;n<t.length;n++)bo(e,t[n]);return e}function bo(e,t){let n=Q(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!N(e[i],t[i]))&&(e[i]=t[i])}}function $(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return L(e)?Co(e):go(e)?So(e):xo(e);default:return xo(Object(e))}}function xo(e){let t=[];for(let n in e)t.push(n);return t}function So(e){return xo(e).filter(e=>e!==`constructor`)}function Co(e){let t=_o(e.length,e=>`${e}`),n=new Set(t);w(e)&&(n.add(`offset`),n.add(`parent`)),Z(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=xo(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function wo(e,...t){for(let n=0;n<t.length;n++)To(e,t[n]);return e}function To(e,t){let n=$(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!N(e[i],t[i]))&&(e[i]=t[i])}}function Eo(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)Do(e,t[r],n);return e}function Do(e,t,n){let r=$(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!N(o,c))&&(e[a]=c)}}function Oo(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)ko(e,t[r],n);return e}function ko(e,t,n){let r=Q(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!N(o,c))&&(e[a]=c)}}function Ao(e){if(S(e))return e;let t=C(e);if(!jo(e))return{};if(A(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(Z(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?Po(r,e):Mo(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return Mo(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Fo(n,e),Mo(n,e),No(n,e),n}function jo(e){switch(C(e)){case gt:case xt:case St:case wt:case ht:case vt:case Mt:case Nt:case kt:case At:case jt:case yt:case mt:case Ct:case ft:case bt:case pt:case _t:case Tt:case Et:case Dt:case Ot:return!0;default:return!1}}function Mo(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function No(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function Po(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function Fo(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}function Io(e,t){if(!t)return Ao(e);let n=t(e);return n===void 0?Ao(e):n}function Lo(e,t){let n=U(e)?Object.create(e):{};if(t!=null){let e=Q(t);for(let r=0;r<e.length;r++){let i=e[r],a=t[i];la(n,i,a)}}return n}function Ro(e,...t){e=Object(e);let n=Object.prototype,r=t.length,i=r>2?t[2]:void 0;i&&Y(t[0],t[1],i)&&(r=1);for(let i=0;i<r;i++){if(F(t[i]))continue;let r=t[i],a=Object.keys(r);for(let t=0;t<a.length;t++){let i=a[t],o=e[i];(o===void 0||!Object.hasOwn(e,i)&&N(o,n[i]))&&(e[i]=r[i])}}return e}function zo(e,...t){e=Object(e);for(let n=0;n<t.length;n++){let r=t[n];r!=null&&Bo(e,r,new WeakMap)}return e}function Bo(e,t,n){for(let r in t){let i=t[r],a=e[r];if(a===void 0||!Object.hasOwn(e,r)){e[r]=Vo(i,n);continue}n.get(i)!==a&&Ho(a,i,n)}}function Vo(e,t){if(t.has(e))return t.get(e);if(M(e)){let n={};return t.set(e,n),Bo(n,e,t),n}return e}function Ho(e,t,n){if(M(e)&&M(t)){n.set(t,e),Bo(e,t,n);return}Array.isArray(e)&&Array.isArray(t)&&(n.set(t,e),Uo(e,t,n))}function Uo(e,t,n){let r=Math.min(t.length,e.length);for(let i=0;i<r;i++)M(e[i])&&M(t[i])&&Bo(e[i],t[i],n);for(let n=r;n<t.length;n++)e.push(t[n])}function Wo(e,t){if(U(e))return Lt(e,K(t??X))}function Go(e,t){if(!U(e))return;let n=K(t??X);return Object.keys(e).findLast(t=>n(e[t],t,e))}function Ko(e,t=x){if(e==null)return e;for(let n in e)if(t(e[n],n,e)===!1)break;return e}function qo(e,t=x){if(e==null)return e;let n=[];for(let t in e)n.push(t);for(let r=n.length-1;r>=0;r--){let i=n[r];if(t(e[i],i,e)===!1)break}return e}function Jo(e,t=x){if(e==null)return e;let n=Object(e),r=Q(e);for(let e=0;e<r.length;++e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Yo(e,t=x){if(e==null)return e;let n=Object(e),r=Q(e);for(let e=r.length-1;e>=0;--e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Xo(e){if(!L(e))return{};let t={};for(let n=0;n<e.length;n++){let[r,i]=e[n];t[r]=i}return t}function Zo(e){return e==null?[]:Q(e).filter(t=>typeof e[t]==`function`)}function Qo(e){if(e==null)return[];let t=[];for(let n in e)P(e[n])&&t.push(n);return t}function $o(e,t){if(e==null)return!1;let n;if(n=Array.isArray(t)?t:typeof t==`string`&&$n(t)&&e[t]==null?B(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!(t in Object(r)))&&!((Array.isArray(r)||fr(r))&&dr(t)&&t<r.length))return!1;r=r[t]}return!0}function es(e){return Bt(e)}function ts(e,t){let n={};if(F(e))return n;t??=x;let r=Object.keys(e),i=K(t);for(let t=0;t<r.length;t++){let a=r[t],o=e[a],s=i(o);Array.isArray(n[s])?n[s].push(a):n[s]=[a]}return n}function ns(e,t=x){return e==null?{}:Vt(e,K(t))}function rs(e,t=x){return e==null?{}:Ht(e,K(t))}function is(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=as(i,t,r,new Map)}return i}function as(e,t,n,r){if(S(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ut(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...dt(t)];for(let a=0;a<i.length;a++){let o=i[a];if(O(o))continue;let s=t[o],c=e[o];if(fr(s)&&(s={...s}),fr(c)&&(c={...c}),w(s)&&(s=lr(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(J(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||q(c)&&q(s)&&(M(c)||M(s)||Z(c)||Z(s))?e[o]=as(c,s,n,r):c==null&&M(s)?e[o]=as({},s,n,r):c==null&&Z(s)?e[o]=lr(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function os(e,...t){return is(e,...t,We)}function ss(e){let t=[];for(;e;)t.push(...dt(e)),e=Object.getPrototypeOf(e);return t}function cs(e,...t){if(e==null)return{};t=Lr(t);let n=ls(e,t);for(let e=0;e<t.length;e++){let r=t[e];switch(typeof r){case`object`:Array.isArray(r)||(r=Array.from(r));for(let e=0;e<r.length;e++){let t=r[e];vi(n,t)}break;case`string`:case`symbol`:case`number`:vi(n,r);break}}return n}function ls(e,t){return t.some(e=>Array.isArray(e)||$n(e))?ds(e):us(e)}function us(e){let t={},n=[...$(e),...ss(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=e[i]}return t}function ds(e){let t={},n=[...$(e),...ss(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=cr(e[i],e=>{if(!M(e))return e})}return t}function fs(e,t){if(e==null)return{};let n={},r=K(t??X),i=[...$(e),...ss(e)];for(let t=0;t<i.length;t++){let a=_(i[t])?i[t]:i[t].toString(),o=e[a];r(o,a,e)||(n[a]=o)}return n}function ps(e,...t){if(Mi(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=L(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=V(e,t);r===void 0&&!pr(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=r:fa(n,t,r))}}return n}function ms(e,t){if(e==null)return{};let n=K(t??X),r={},i=L(e)?ct(0,e.length):[...$(e),...ss(e)];for(let t=0;t<i.length;t++){let a=_(i[t])?i[t]:i[t].toString(),o=e[a];n(o,a,e)&&(r[a]=o)}return r}function hs(e){return function(t){return V(e,t)}}function gs(e,t,n){li(t,e)?t=[t]:Array.isArray(t)||(t=B(z(t)));let r=Math.max(t.length,1);for(let i=0;i<r;i++){let r=e?.[R(t[i])];if(r===void 0)return typeof n==`function`?n.call(e):n;e=typeof r==`function`?r.call(e):r}return e}function _s(e,t,n,r){let i;return i=typeof r==`function`?r:()=>void 0,da(e,t,()=>n,i)}function vs(e,...t){return Ro(lr(e),...t)}function ys(e){let t=Array(e.size),n=e.keys(),r=e.values();for(let e=0;e<t.length;e++)t[e]=[n.next().value,r.next().value];return t}function bs(e){let t=Array(e.size),n=e.values();for(let e=0;e<t.length;e++){let r=n.next().value;t[e]=[r,r]}return t}function xs(e){if(e==null)return[];if(e instanceof Set)return bs(e);if(e instanceof Map)return ys(e);let t=Q(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function Ss(e){if(e==null)return[];if(e instanceof Set)return bs(e);if(e instanceof Map)return ys(e);let t=$(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function Cs(e){return w(e)}function ws(e,t=x,n){let r=Array.isArray(e)||Cs(e)||Z(e);return t=K(t),n??=r?[]:U(e)&&P(e.constructor)?Object.create(Object.getPrototypeOf(e)):{},e==null||Er(e,(e,r,i)=>t(n,e,r,i)),n}function Ts(e,t,n){return da(e,t,n,()=>void 0)}function Es(e){let t=$(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function Ds(e){return typeof e==`function`}function Os(e){return Number.isSafeInteger(e)&&e>=0}let ks=Function.prototype.toString,As=RegExp(`^${ks.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)}$`);function js(e){if(typeof e!=`function`)return!1;if(globalThis?.[`__core-js_shared__`]!=null)throw Error(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return As.test(ks.call(e))}function Ms(e){return e===null}function Ns(e){return xn(e)}function Ps(e,t){if(t==null)return!0;if(e==null)return Object.keys(t).length===0;let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i],o=e[i];if(o===void 0&&!(i in e)||typeof a==`function`&&!a(o))return!1}return!0}function Fs(e){return e=It(e),function(t){return Ps(t,e)}}function Is(e){return Zt(e)}function Ls(e){return typeof e==`boolean`||e instanceof Boolean}function Rs(e){return en(e)}function zs(e){return q(e)&&e.nodeType===1&&!M(e)}function Bs(e){if(e==null)return!0;if(L(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!w(e)&&!Z(e)&&!fr(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return go(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function Vs(e,t,n){return typeof n!=`function`&&(n=()=>void 0),nn(e,t,(...r)=>{let i=n(...r);if(i!==void 0)return!!i;if(e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set)return Vs(Array.from(e),Array.from(t),Le(2,n))})}function Hs(e){return C(e)===`[object Error]`}function Us(e){return Number.isFinite(e)}function Ws(e){return Number.isInteger(e)}function Gs(e){return vn(e)}function Ks(e){return Number.isSafeInteger(e)}function qs(e){return yn(e)}function Js(e){return Sn(e)}function Ys(e){return Cn(e)}function Xs(e){return Wt(z(e))}function Zs(e,...t){if(e==null||!U(e)||A(e)&&t.length===0)return e;let n=[];for(let e=0;e<t.length;e++){let r=t[e];A(r)?n.push(...r):r&&typeof r==`object`&&`length`in r?n.push(...Array.from(r)):n.push(r)}if(n.length===0)return e;for(let t=0;t<n.length;t++){let r=n[t],i=z(r),a=e[i];P(a)&&(e[i]=a.bind(e))}return e}function Qs(e){return An(z(e))}function $s(e){return typeof e!=`string`&&(e=z(e)),e.replace(/['\u2019]/g,``)}function ec(e){return Kt($s(Qs(e)))}function tc(e,t,n){return e==null||t==null?!1:(n??=e.length,e.endsWith(t,n))}function nc(e){return Mn(z(e))}function rc(e){return Nn(z(e))}function ic(e){return Pn($s(Qs(e)))}function ac(e){return Fn($s(Qs(e)))}function oc(e){return In(z(e))}function sc(e,t,n){return Ln(z(e),t,n)}function cc(e,t=0,n=` `){return z(e).padEnd(t,n)}function lc(e,t=0,n=` `){return z(e).padStart(t,n)}let uc=2**53-1;function dc(e,t,n){return t=(n?Y(e,t,n):t===void 0)?1:b(t),t<1||t>uc?``:z(e).repeat(t)}function fc(e,t,n){return arguments.length<3?z(e):z(e).replace(t,n)}function pc(e){return Yt($s(Qs(e)))}function mc(e,t,n){return z(e).split(t,n)}function hc(e){let t=j($s(Qs(e)).trim()),n=``;for(let e=0;e<t.length;e++){let r=t[e];n&&(n+=` `),r===r.toUpperCase()?n+=r:n+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return n}function gc(e,t,n){return e==null||t==null?!1:(n??=0,e.startsWith(t,n))}let _c=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vc=/['\n\r\u2028\u2029\\]/g,yc=/($^)/,bc=new Map([[`\\`,`\\`],[`'`,`'`],[`
|
|
2
|
-
`,`n`],[`\r`,`r`],[`\u2028`,`u2028`],[`\u2029`,`u2029`]]);function
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e._={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(...e){if(e.length===0)return[[]];let t=1;for(let n=0;n<e.length;n++)t*=e[n].length;if(t===0)return[];let n=e.length,r=Array(t);for(let i=0;i<t;i++){let t=Array(n),a=i;for(let r=n-1;r>=0;r--){let n=e[r],i=n.length;t[r]=n[a%i],a=Math.floor(a/i)}r[i]=t}return r}function n(e,t){if(!Number.isInteger(t)||t<=0)throw Error(`Size must be an integer greater than zero.`);let n=Math.ceil(e.length/t),r=Array(n);for(let i=0;i<n;i++){let n=i*t,a=n+t;r[i]=e.slice(n,a)}return r}function r(e,t){let n=[],r;for(let i=0;i<e.length;i++){let a=t(e[i]);i===0||a!==r?n.push([e[i]]):n[n.length-1].push(e[i]),r=a}return n}function i(e,t){if(!Number.isInteger(t)||t<0)throw Error(`r must be a non-negative integer.`);let n=e.length;if(t>n)return[];if(t===0)return[[]];let r=Array(t);for(let e=0;e<t;e++)r[e]=e;let i=[];for(;;){let a=Array(t);for(let n=0;n<t;n++)a[n]=e[r[n]];i.push(a);let o=t-1;for(;o>=0&&r[o]===o+n-t;)o--;if(o<0)return i;r[o]++;for(let e=o+1;e<t;e++)r[e]=r[e-1]+1}}function a(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&t.push(r)}return t}function o(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function s(e,t,n){let r=new Set(t.map(e=>n(e)));return e.filter(e=>!r.has(n(e)))}function c(e,t,n){return e.filter(e=>t.every(t=>!n(e,t)))}function l(e,t){return t=Math.max(t,0),e.slice(t)}function u(e,t){return t=Math.min(-t,0),t===0?e.slice():e.slice(0,t)}function d(e,t){for(let n=e.length-1;n>=0;n--)if(!t(e[n],n,e))return e.slice(0,n+1);return[]}function f(e,t){let n=e.findIndex((e,n,r)=>!t(e,n,r));return n===-1?[]:e.slice(n)}function ee(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i);for(let n=a;n<o;n++)e[n]=t;return e}var p=class{capacity;available;deferredTasks=[];constructor(e){this.capacity=e,this.available=e}async acquire(){if(this.available>0){this.available--;return}return new Promise(e=>{this.deferredTasks.push(e)})}release(){let e=this.deferredTasks.shift();if(e!=null){e();return}this.available<this.capacity&&this.available++}};function m(e,t){let n=new p(t);return async function(...t){try{return await n.acquire(),await e.apply(this,t)}finally{n.release()}}}async function te(e,t,n){n?.concurrency!=null&&(t=m(t,n.concurrency));let r=await Promise.all(e.map(t));return e.filter((e,t)=>r[t])}function ne(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}async function re(e,t,n){return n?.concurrency!=null&&(t=m(t,n.concurrency)),ne(await Promise.all(e.map(t)))}async function ie(e,t,n){n?.concurrency!=null&&(t=m(t,n.concurrency)),await Promise.all(e.map(t))}function ae(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);Object.hasOwn(n,a)||(n[a]=[]),n[a].push(i)}return n}function oe(e){return e[0]}function se(e){return e.slice(0,-1)}function ce(e,t){let n=new Set(t);return e.filter(e=>n.has(e))}function le(e,t,n){let r=[],i=new Set(t.map(n));for(let t=0;t<e.length;t++){let a=e[t],o=n(a);i.has(o)&&(r.push(a),i.delete(o))}return r}function ue(e,t,n){return e.filter(e=>t.some(t=>n(e,t)))}function de(e,t){return o(t,e).length===0}function fe(e,t,n){return c(t,e,n).length===0}function pe(e){return e[e.length-1]}function me(e,t,n){return n?.concurrency!=null&&(t=m(t,n.concurrency)),Promise.all(e.map(t))}function he(e,t){if(e.length===0)return;let n=e[0],r=-1/0;for(let i=0;i<e.length;i++){let a=e[i],o=t(a,i,e);if(Number.isNaN(o))return a;o>r&&(r=o,n=a)}return n}function ge(e,t){if(e.length===0)return;let n=e[0],r=1/0;for(let i=0;i<e.length;i++){let a=e[i],o=t(a,i,e);if(Number.isNaN(o))return a;o<r&&(r=o,n=a)}return n}function _e(e,t){let n=new Set(t),r=0;for(let t=0;t<e.length;t++)if(!n.has(e[t])){if(!Object.hasOwn(e,t)){delete e[r++];continue}e[r++]=e[t]}return e.length=r,e}async function ve(e,t,n){let r=0;n??(n=e[0],r=1);let i=n;for(let n=r;n<e.length;n++)i=await t(i,e[n],n,e);return i}function ye(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}function be(e){return e[Math.floor(Math.random()*e.length)]}function xe(e,t){if(t??(t=e,e=0),e>=t)throw Error(`Invalid input: The maximum value must be greater than the minimum value.`);return Math.random()*(t-e)+e}function Se(e,t){return Math.floor(xe(e,t))}function Ce(e,t){if(t>e.length)throw Error(`Size must be less than or equal to the length of array.`);let n=Array(t),r=new Set;for(let i=e.length-t,a=0;i<e.length;i++,a++){let t=Se(0,i+1);r.has(t)&&(t=i),r.add(t),n[a]=e[t]}return n}function we(e){let t=e.slice();for(let e=t.length-1;e>=1;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function Te(e){return e.slice(1)}function Ee(e,t){return e.slice(0,t)}function De(e,t){return t<=0||e.length===0?[]:e.slice(-t)}function Oe(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i),s=e.slice();for(let e=a;e<o;e++)s[e]=t;return s}function ke(e){return[...new Set(e)]}function Ae(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function je(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.every(e=>!t(e,i))&&n.push(i)}return n}function Me(e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=Array(t);for(let r=0;r<t;r++){n[r]=Array(e.length);for(let t=0;t<e.length;t++)n[r][t]=e[t][r]}return n}function Ne(e,t,n=1,{partialWindows:r=!1}={}){if(t<=0||!Number.isInteger(t))throw Error(`Size must be a positive integer.`);if(n<=0||!Number.isInteger(n))throw Error(`Step must be a positive integer.`);let i=[],a=r?e.length:e.length-t+1;for(let r=0;r<a;r+=n)i.push(e.slice(r,r+t));return i}function Pe(e,...t){return o(e,t)}function Fe(...e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=e.length,r=Array(t);for(let i=0;i<t;++i){let t=Array(n);for(let r=0;r<n;++r)t[r]=e[r][i];r[i]=t}return r}let Ie=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})(),Le=Ie.DOMException===void 0?Error:Ie.DOMException;var Re=class extends Le{constructor(e=`The operation was aborted`){super(e)}},ze=class extends Le{constructor(e=`The operation was timed out`){super(e)}};function Be(e,t){if(!Number.isInteger(e)||e<0)throw Error(`n must be a non-negative integer.`);let n=0;return(...r)=>{if(++n>=e)return t(...r)}}function Ve(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}async function He(){}function Ue(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),ee()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},ee=()=>{f(),i=void 0,a=null},p=()=>{c()},m=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return m.schedule=d,m.cancel=ee,m.flush=p,n?.addEventListener(`abort`,ee,{once:!0}),m}function We(...e){return function(...t){let n=e.length?e[0].apply(this,t):t[0];for(let t=1;t<e.length;t++)n=e[t].call(this,n);return n}}function Ge(...e){return We(...e.reverse())}function h(e){return e}function Ke(e){return((...t)=>!e(...t))}function qe(){}function Je(e){let t=!1,n;return function(...r){return t||(t=!0,n=e(...r)),n}}function Ye(e,...t){return Xe(e,Ze,...t)}function Xe(e,t,...n){let r=function(...r){let i=0,a=n.slice().map(e=>e===t?r[i++]:e),o=r.slice(i);return e.apply(this,a.concat(o))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let Ze=Symbol(`partial.placeholder`);Ye.placeholder=Ze;function Qe(e,...t){return $e(e,et,...t)}function $e(e,t,...n){let r=function(...r){let i=n.filter(e=>e===t).length,a=Math.max(r.length-i,0),o=r.slice(0,a),s=a,c=n.slice().map(e=>e===t?r[s++]:e);return e.apply(this,o.concat(c))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let et=Symbol(`partialRight.placeholder`);Qe.placeholder=et;function tt(e,t=e.length-1){return function(...n){let r=n.slice(t),i=n.slice(0,t);for(;i.length<t;)i.push(void 0);return e.apply(this,[...i,r])}}function nt(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new Re)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}let rt=()=>!0;async function it(e,t){let n,r,i,a;typeof t==`number`?(n=0,r=t,i=void 0,a=rt):(n=t?.delay??0,r=t?.retries??1/0,i=t?.signal,a=t?.shouldRetry??rt);let o;for(let t=0;t<=r;t++){if(i?.aborted)throw o??Error(`The retry operation was aborted due to an abort signal.`);try{return await e()}catch(e){if(o=e,!a(e,t))throw e;await nt(typeof n==`function`?n(t):n)}}throw o}function at(e,t,n){if(n??(n=t,t=0),t>=n)throw Error(`The maximum value must be greater than the minimum value.`);return t<=e&&e<n}function ot(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t(e[r],r);return n}function st(e,t){return ot(e,e=>t(e))/e.length}function ct(e){if(e.length===0)return NaN;let t=e.slice().sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function lt(e,t){return ct(e.map(e=>t(e)))}function ut(e,t){if(Number.isNaN(Number(t)))throw Error(`Expected percentile to be a number but got "${t}".`);if(t<0)throw Error(`Expected percentile to be >= 0 but got "${t}".`);if(t>100)throw Error(`Expected percentile to be <= 100 but got "${t}".`);if(e.length===0)return NaN;let n=e.slice().sort((e,t)=>(Number.isNaN(e)?-1/0:e)-(Number.isNaN(t)?-1/0:t));return t===0?n[0]:n[Math.ceil(n.length*(t/100))-1]}function dt(e,t,n=1){if(t??(t=e,e=0),!Number.isInteger(n)||n===0)throw Error(`The step value must be a non-zero integer.`);let r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e+t*n;return i}function g(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function ft(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function pt(e){if(g(e))return e;if(Array.isArray(e)||ft(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function mt(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function _(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}let ht=`[object RegExp]`,gt=`[object String]`,_t=`[object Number]`,vt=`[object Boolean]`,yt=`[object Arguments]`,bt=`[object Symbol]`,xt=`[object Date]`,St=`[object Map]`,Ct=`[object Set]`,wt=`[object Array]`,Tt=`[object ArrayBuffer]`,Et=`[object Object]`,Dt=`[object DataView]`,Ot=`[object Uint8Array]`,kt=`[object Uint8ClampedArray]`,At=`[object Uint16Array]`,jt=`[object Uint32Array]`,Mt=`[object Int8Array]`,Nt=`[object Int16Array]`,Pt=`[object Int32Array]`,Ft=`[object Float32Array]`,It=`[object Float64Array]`;function v(e){return Ie.Buffer!==void 0&&Ie.Buffer.isBuffer(e)}function Lt(e,t){return y(e,void 0,e,new Map,t)}function y(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(g(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=y(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,y(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(y(a,void 0,n,r,i));return t}if(v(e))return e.subarray();if(ft(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=y(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),b(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),b(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),b(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,b(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),b(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),b(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),b(t,e,n,r,i),t}if(typeof e==`object`&&Rt(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),b(t,e,n,r,i),t}return e}function b(e,t,n=e,r,i){let a=[...Object.keys(t),...mt(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=y(t[s],s,n,r,i))}}function Rt(e){switch(_(e)){case yt:case wt:case Tt:case Dt:case vt:case xt:case Ft:case It:case Mt:case Nt:case Pt:case St:case _t:case Et:case ht:case Ct:case gt:case bt:case Ot:case kt:case At:case jt:return!0;default:return!1}}function zt(e){return y(e,void 0,e,new Map,void 0)}function Bt(e,t){return Object.keys(e).find(n=>t(e[n],n,e))}function x(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Vt(e,{delimiter:t=`.`}={}){return Ht(e,``,t)}function Ht(e,t,n){let r={},i=Object.keys(e);for(let a=0;a<i.length;a++){let o=i[a],s=e[o],c=t?`${t}${n}${o}`:o;if(x(s)&&Object.keys(s).length>0){Object.assign(r,Ht(s,c,n));continue}if(Array.isArray(s)&&s.length>0){Object.assign(r,Ht(s,c,n));continue}r[c]=s}return r}function Ut(e){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];t[a]=i}return t}function Wt(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[t(o,a,e)]=o}return n}function Gt(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}function S(e){return e===`__proto__`}function C(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(S(a))continue;let o=t[a],s=e[a],c=n(s,o,a,e,t);c===void 0?Array.isArray(o)?Array.isArray(s)?e[a]=C(s,o,n):e[a]=C([],o,n):x(o)?x(s)?e[a]=C(s,o,n):e[a]=C({},o,n):(s===void 0||o!==void 0)&&(e[a]=o):e[a]=c}return e}function Kt(e,t){let n=Object.keys(e).sort(t),r={};for(let t=0;t<n.length;t++){let i=n[t];r[i]=e[i]}return r}function w(e){return Array.isArray(e)}function qt(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}let Jt=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function T(e){return Array.from(e.match(Jt)??[])}function Yt(e){let t=T(e);if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>qt(e)).join(``)}`}function Xt(e){if(w(e))return e.map(e=>Xt(e));if(x(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Yt(i);t[a]=Xt(e[i])}return t}return e}function Zt(e,t){return C(zt(e),t,function e(t,n){if(Array.isArray(n))return C(Array.isArray(t)?pt(t):[],n,e);if(x(n))return x(t)?C(pt(t),n,e):C({},n,e)})}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Qt(e){return T(e).map(e=>e.toLowerCase()).join(`_`)}function $t(e){if(w(e))return e.map(e=>$t(e));if(E(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Qt(i);t[a]=$t(e[i])}return t}return e}function en(e){return e instanceof ArrayBuffer}function tn(e){return typeof Blob>`u`?!1:e instanceof Blob}function nn(){return typeof window<`u`&&window?.document!=null}function rn(e){return e instanceof Date}function an(e){return x(e)&&Object.keys(e).length===0}function D(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function on(e,t,n){return sn(e,t,void 0,void 0,void 0,void 0,n)}function sn(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return cn(e,t,a,o)}return cn(e,t,a,o)}function cn(e,t,n,r){if(Object.is(e,t))return!0;let i=_(e),a=_(t);if(i===`[object Arguments]`&&(i=Et),a===`[object Arguments]`&&(a=Et),i!==a)return!1;switch(i){case gt:return e.toString()===t.toString();case _t:return D(e.valueOf(),t.valueOf());case vt:case xt:case bt:return Object.is(e.valueOf(),t.valueOf());case ht:return e.source===t.source&&e.flags===t.flags;case`[object Function]`:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case St:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!sn(a,t.get(i),i,e,t,n,r))return!1;return!0;case Ct:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>sn(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case wt:case Ot:case kt:case At:case jt:case`[object BigUint64Array]`:case Mt:case Nt:case Pt:case`[object BigInt64Array]`:case Ft:case It:if(v(e)!==v(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!sn(e[i],t[i],i,e,t,n,r))return!1;return!0;case Tt:return e.byteLength===t.byteLength?cn(new Uint8Array(e),new Uint8Array(t),n,r):!1;case Dt:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:cn(new Uint8Array(e),new Uint8Array(t),n,r);case`[object Error]`:return e.name===t.name&&e.message===t.message;case Et:{if(!(cn(e.constructor,t.constructor,n,r)||x(e)&&x(t)))return!1;let i=[...Object.keys(e),...mt(e)],a=[...Object.keys(t),...mt(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!sn(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function ln(e,t){return on(e,t,qe)}function un(e){return typeof File>`u`?!1:tn(e)&&e instanceof File}function O(e){return typeof e==`function`}function dn(e){return e!=null&&typeof e[Symbol.iterator]==`function`}function fn(e){if(typeof e!=`string`)return!1;try{return JSON.parse(e),!0}catch{return!1}}function pn(e){switch(typeof e){case`object`:return e===null||mn(e)||hn(e);case`string`:case`number`:case`boolean`:return!0;default:return!1}}function mn(e){return Array.isArray(e)?e.every(e=>pn(e)):!1}function hn(e){if(!x(e))return!1;let t=Reflect.ownKeys(e);for(let n=0;n<t.length;n++){let r=t[n],i=e[r];if(typeof r!=`string`||!pn(i))return!1}return!0}function gn(e){return Number.isSafeInteger(e)&&e>=0}function _n(e){return e instanceof Map}function k(e){return e==null}function vn(){return typeof process<`u`&&process?.versions?.node!=null}function yn(e){return e!=null}function bn(e){return e===null}function xn(e){return e instanceof Promise}function Sn(e){return e instanceof RegExp}function Cn(e){return e instanceof Set}function wn(e){return typeof e==`symbol`}function Tn(e){return e===void 0}function En(e){return e instanceof WeakMap}function Dn(e){return e instanceof WeakSet}async function On(e){let t=Object.keys(e),n=await Promise.all(t.map(t=>e[t])),r={};for(let e=0;e<t.length;e++)r[t[e]]=n[e];return r}var kn=class{semaphore=new p(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};function An(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{clearTimeout(a)};if(t?.aborted)return;let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),r(new ze)},e);t?.addEventListener(`abort`,i,{once:!0})})}async function jn(e,t,{signal:n}={}){return Promise.race([e(),An(t,{signal:n})])}function Mn(e){return T(e).map(e=>e.toUpperCase()).join(`_`)}let Nn=new Map([[`Æ`,`Ae`],[`Ð`,`D`],[`Ø`,`O`],[`Þ`,`Th`],[`ß`,`ss`],[`æ`,`ae`],[`ð`,`d`],[`ø`,`o`],[`þ`,`th`],[`Đ`,`D`],[`đ`,`d`],[`Ħ`,`H`],[`ħ`,`h`],[`ı`,`i`],[`IJ`,`IJ`],[`ij`,`ij`],[`ĸ`,`k`],[`Ŀ`,`L`],[`ŀ`,`l`],[`Ł`,`L`],[`ł`,`l`],[`ʼn`,`'n`],[`Ŋ`,`N`],[`ŋ`,`n`],[`Œ`,`Oe`],[`œ`,`oe`],[`Ŧ`,`T`],[`ŧ`,`t`],[`ſ`,`s`]]);function Pn(e){e=e.normalize(`NFD`);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r>=`̀`&&r<=`ͯ`||r>=`︠`&&r<=`︣`||(t+=Nn.get(r)??r)}return t}let Fn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function In(e){return e.replace(/[&<>"']/g,e=>Fn[e])}function Ln(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function Rn(e){return T(e).map(e=>e.toLowerCase()).join(`-`)}function zn(e){return T(e).map(e=>e.toLowerCase()).join(` `)}function Bn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Vn(e,t,n=` `){return e.padStart(Math.floor((t-e.length)/2)+e.length,n).padEnd(t,n)}function Hn(e){return T(e).map(e=>qt(e)).join(``)}function Un(e){return[...e].reverse().join(``)}function Wn(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function Gn(e,t){if(t===void 0)return e.trimStart();let n=0;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n<e.length&&e[n]===t;)n++;break;case`object`:for(;n<e.length&&t.includes(e[n]);)n++}return e.substring(n)}function Kn(e,t){return t===void 0?e.trim():Gn(Wn(e,t),t)}let qn={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`};function Jn(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>qn[e]||`'`)}function Yn(e){let t=T(e),n=``;for(let e=0;e<t.length;e++)n+=t[e].toUpperCase(),e<t.length-1&&(n+=` `);return n}function Xn(e){return e.substring(0,1).toUpperCase()+e.substring(1)}async function Zn(e){try{return[null,await e()]}catch(e){return[e,null]}}function Qn(e,t){if(!e)throw typeof t==`string`?Error(t):t}function $n(e){return arguments.length===0?[]:Array.isArray(e)?e:[e]}function A(e){return Array.isArray(e)?e:Array.from(e)}function j(e){return e!=null&&typeof e!=`function`&&gn(e.length)}function er(e,t=1){if(t=Math.max(Math.floor(t),0),t===0||!j(e)||Number.isNaN(t))return[];let r=A(e);return isFinite(t)?n(r,t):[r]}function tr(e){return j(e)?a(Array.from(e)):[]}function nr(...e){return ne(e)}function rr(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function M(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function N(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(N).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function P(e){if(Array.isArray(e))return e.map(M);if(typeof e==`symbol`)return[e];e=N(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function F(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(S(t))return n;let r=e[t];return r===void 0?rr(t)&&!Object.hasOwn(e,t)?F(e,P(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=M(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ir(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),S(t))return n;let r=e[t];return r===void 0?n:r}}}function ir(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||S(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function I(e){return function(t){return F(t,e)}}function L(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ar(e,t,n){return typeof n==`function`?or(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?or(t,r,e,s,!1):!!c},new Map,!0):ar(e,t,()=>void 0)}function or(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return sr(e,t,n,r);case`function`:return Object.keys(t).length>0?or(e,{...t},n,r,i):D(e,t);default:return L(e)&&i?typeof t==`string`?t===``:!0:D(e,t)}}function sr(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return lr(e,t,n,r);if(t instanceof Map)return cr(e,t,n,r);if(t instanceof Set)return ur(e,t,n,r);let i=Object.keys(t);if(e==null||g(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!g(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function cr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function lr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function ur(e,t,n,r){return t.size===0?!0:e instanceof Set?lr([...e],[...t],n,r):!1}function dr(e,t){return ar(e,t,()=>void 0)}function R(e){return e=zt(e),t=>dr(t,e)}function fr(e,t){return Lt(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(_(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),b(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case _t:case gt:case vt:{let t=new e.constructor(e?.valueOf());return b(t,e),t}case yt:{let t={};return b(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function pr(e){return fr(e)}let mr=/^(?:0|[1-9]\d*)$/;function hr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return mr.test(e)}}function gr(e){return typeof e==`object`&&!!e&&_(e)===`[object Arguments]`}function _r(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&rr(t)&&e?.[t]==null?P(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||gr(r))&&hr(t)&&t<r.length))return!1;r=r[t]}return!0}function z(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=M(e);break}return t=pr(t),function(n){let r=F(n,e);return r===void 0?_r(n,e):t===void 0?r===void 0:dr(r,t)}}function B(e){if(e==null)return h;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?z(e[0],e[1]):R(e);case`string`:case`symbol`:case`number`:return I(e)}}function vr(e,t){if(e==null)return{};let n=j(e)?Array.from(e):Object.values(e),r=B(t??void 0),i=Object.create(null);for(let e=0;e<n.length;e++){let t=n[e],a=r(t);i[a]=(i[a]??0)+1}return i}function V(e){return typeof e==`object`&&!!e}function H(e){return V(e)&&j(e)}function yr(e,...t){if(!H(e))return[];let n=Array.from(e),r=[];for(let e=0;e<t.length;e++){let n=t[e];H(n)&&r.push(...Array.from(n))}return o(n,r)}function U(e){if(j(e))return pe(A(e))}function br(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(H(r))for(let e=0;e<r.length;e++)t.push(r[e])}return t}function xr(e,...t){if(!H(e))return[];let n=U(t),r=br(t);return H(n)?o(Array.from(e),r):s(Array.from(e),r,B(n))}function Sr(e,...t){if(!H(e))return[];let n=U(t),r=br(t);return typeof n==`function`?c(Array.from(e),r,n):o(Array.from(e),r)}function W(e){return typeof e==`symbol`||e instanceof Symbol}function G(e){return W(e)?NaN:Number(e)}function K(e){return e?(e=G(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function q(e){let t=K(e),n=t%1;return n?t-n:t}function Cr(e,t=1,n){return j(e)?(t=n?1:q(t),l(A(e),t)):[]}function wr(e,t=1,n){return j(e)?(t=n?1:q(t),u(A(e),t)):[]}function Tr(e,t=h){return j(e)?Er(A(e),t):[]}function Er(e,t){switch(typeof t){case`function`:return d(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return d(e,z(n,r))}else return d(e,R(t));case`symbol`:case`number`:case`string`:return d(e,I(t))}}function Dr(e,t=h){return j(e)?Or(A(e),t):[]}function Or(e,t){switch(typeof t){case`function`:return f(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return f(e,z(n,r))}else return f(e,R(t));case`number`:case`symbol`:case`string`:return f(e,I(t))}}function kr(e,t=h){if(!e)return e;let n=j(e)||Array.isArray(e)?dt(0,e.length):Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function Ar(e,t=h){if(!e)return e;let n=j(e)?dt(0,e.length):Object.keys(e);for(let r=n.length-1;r>=0;r--){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function J(e,t,n){return L(n)&&(typeof t==`number`&&j(n)&&hr(t)&&t<n.length||typeof t==`string`&&t in n)?D(n[t],e):!1}function jr(e,t,n){if(!e)return!0;n&&J(e,t,n)&&(t=void 0),t||=h;let r;switch(typeof t){case`function`:r=t;break;case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];r=z(e,n)}else r=R(t);break;case`symbol`:case`number`:case`string`:r=I(t)}if(!j(e)){let t=Object.keys(e);for(let n=0;n<t.length;n++){let i=t[n],a=e[i];if(!r(a,i,e))return!1}return!0}for(let t=0;t<e.length;t++)if(!r(e[t],t,e))return!1;return!0}function Mr(e){return typeof e==`string`||e instanceof String}function Nr(e,t,n=0,r=e?e.length:0){return j(e)?Mr(e)?e:(n=Math.floor(n),r=Math.floor(r),n||=0,r||=0,ee(e,t,n,r)):[]}function Pr(e,t=h){if(!e)return[];if(t=B(t),!Array.isArray(e)){let n=[],r=Object.keys(e),i=j(e)?e.length:r.length;for(let a=0;a<i;a++){let i=r[a],o=e[i];t(o,i,e)&&n.push(o)}return n}let n=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];t(r,i,e)&&n.push(r)}return n}function Fr(e,t=h,n=0){if(!e)return;n<0&&(n=Math.max(e.length+n,0));let r=B(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let i=n;i<t.length;i++){let n=t[i],a=e[n];if(r(a,n,e))return a}return}return e.slice(n).find(r)}function Y(e){return e}function Ir(e,t=Y,n=0){if(!e)return-1;n<0&&(n=Math.max(e.length+n,0));let r=Array.from(e).slice(n),i=-1;switch(typeof t){case`function`:i=r.findIndex(t);break;case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];i=r.findIndex(z(e,n))}else i=r.findIndex(R(t));break;case`number`:case`symbol`:case`string`:i=r.findIndex(I(t))}return i===-1?-1:i+n}function Lr(e,t=h,n){if(!e)return;let r=Array.isArray(e)?e.length:Object.keys(e).length;n=q(n??r-1),n=n<0?Math.max(r+n,0):Math.min(n,r-1);let i=B(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let r=n;r>=0;r--){let n=t[r],a=e[n];if(i(a,n,e))return a}return}return e.slice(0,n+1).findLast(i)}function Rr(e,t=h,n=e?e.length-1:0){if(!e)return-1;n=n<0?Math.max(e.length+n,0):Math.min(n,e.length-1);let r=A(e).slice(0,n+1);switch(typeof t){case`function`:return r.findLastIndex(t);case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];return r.findLastIndex(z(e,n))}else return r.findLastIndex(R(t));case`number`:case`symbol`:case`string`:return r.findLastIndex(I(t))}}function zr(e){if(j(e))return oe(A(e))}function Br(e,t=1){let n=[],r=Math.floor(t);if(!j(e))return n;let i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];t<r&&(Array.isArray(o)||o?.[Symbol.isConcatSpreadable]||typeof o==`object`&&o&&Object.prototype.toString.call(o)===`[object Arguments]`)?i(Array.isArray(o)?o:Array.from(o),t+1):n.push(o)}};return i(Array.from(e),0),n}function Vr(e,t=1){return Br(e,t)}function Hr(e,t){if(!e)return[];let n=j(e)||Array.isArray(e)?dt(0,e.length):Object.keys(e),r=B(t??h),i=Array(n.length);for(let t=0;t<n.length;t++){let a=n[t],o=e[a];i[t]=r(o,a,e)}return i}function Ur(e,t){return k(e)?[]:Vr(k(t)?Hr(e):Hr(e,t),1)}function Wr(e,t=h,n=1){return e==null?[]:Br(Hr(e,B(t)),n)}function Gr(e,t){return Wr(e,t,1/0)}function Kr(e){return Vr(e,1/0)}function qr(e,t){return e==null?{}:ae(j(e)?Array.from(e):Object.values(e),B(t??h))}function Jr(e,t,n,r){if(e==null)return!1;if(n=r||!n?0:q(n),Mr(e))return n>e.length||t instanceof RegExp?!1:(n<0&&(n=Math.max(0,e.length+n)),e.includes(t,n));if(Array.isArray(e))return e.includes(t,n);let i=Object.keys(e);n<0&&(n=Math.max(0,i.length+n));for(let r=n;r<i.length;r++)if(D(Reflect.get(e,i[r]),t))return!0;return!1}function Yr(e,t,n){if(!j(e))return-1;if(Number.isNaN(t)){n??=0,n<0&&(n=Math.max(0,e.length+n));for(let t=n;t<e.length;t++)if(Number.isNaN(e[t]))return t;return-1}return Array.from(e).indexOf(t,n)}function Xr(e){return j(e)?se(Array.from(e)):[]}function Zr(...e){if(e.length===0||!H(e[0]))return[];let t=ke(Array.from(e[0]));for(let n=1;n<e.length;n++){let r=e[n];if(!H(r))return[];t=ce(t,Array.from(r))}return t}function Qr(e,...t){if(!H(e))return[];let n=pe(t);if(n===void 0)return Array.from(e);let r=ke(Array.from(e)),i=H(n)?t.length:t.length-1;for(let e=0;e<i;++e){let i=t[e];if(!H(i))return[];H(n)?r=le(r,Array.from(i),h):typeof n==`function`?r=le(r,Array.from(i),e=>n(e)):typeof n==`string`&&(r=le(r,Array.from(i),I(n)))}return r}function $r(e){return j(e)?ke(Array.from(e)):[]}function ei(e,...t){if(e==null)return[];let n=U(t),r=D,i=$r;typeof n==`function`&&(r=n,i=ti,t.pop());let a=i(Array.from(e));for(let e=0;e<t.length;++e){let n=t[e];if(n==null)return[];a=ue(a,Array.from(n),r)}return a}function ti(e){let t=[],n=new Set;for(let r=0;r<e.length;r++){let i=e[r];n.has(i)||(t.push(i),n.add(i))}return t}function ni(e,t,...n){if(k(e))return[];let r=j(e)?Array.from(e):Object.values(e),i=[];for(let e=0;e<r.length;e++){let a=r[e];if(O(t)){i.push(t.apply(a,n));continue}let o=F(a,t),s=a;if(Array.isArray(t)){let e=t.slice(0,-1);e.length>0&&(s=F(a,e))}else typeof t==`string`&&t.includes(`.`)&&(s=F(a,t.split(`.`).slice(0,-1).join(`.`)));i.push(o?.apply(s,n))}return i}function ri(e,t){return j(e)?Array.from(e).join(t):``}function ii(e,t=h,n){let r=arguments.length>=3;if(!e)return n;let i,a=0;j(e)?(i=dt(0,e.length),!r&&e.length>0&&(n=e[0],a+=1)):(i=Object.keys(e),!r&&i.length>0&&(n=e[i[0]],a+=1));for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function ai(e,t){if(!j(e)&&!V(e))return{};let n=B(t??h);return ii(e,(e,t)=>{let r=n(t);return e[r]=t,e},{})}function oi(e,t,n){if(!j(e)||e.length===0)return-1;let r=e.length,i=n??r-1;if(n!=null&&(i=i<0?Math.max(r+i,0):Math.min(i,r-1)),Number.isNaN(t)){for(let t=i;t>=0;t--)if(Number.isNaN(e[t]))return t}return Array.from(e).lastIndexOf(t,i)}function si(e,t=0){if(!(!H(e)||e.length===0))return t=q(t),t<0&&(t+=e.length),e[t]}function ci(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}let li=(e,t,n)=>{if(e!==t){let r=ci(e),i=ci(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},ui=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,di=/^\w*$/;function fi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||W(e)?!0:typeof e==`string`&&(di.test(e)||!ui.test(e))||t!=null&&Object.hasOwn(t,e)}function pi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||fi(e)?e:{key:e,path:P(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=li(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function mi(e,t=h){if(!e)return[[],[]];let n=j(e)?e:Object.values(e);t=B(t);let r=[],i=[];for(let e=0;e<n.length;e++){let a=n[e];t(a)?r.push(a):i.push(a)}return[r,i]}function hi(e,...t){return _e(e,t)}function gi(e,t=[]){return _e(e,Array.from(t))}function _i(e,t,n){let r=B(n),i=new Set(Array.from(t).map(e=>r(e))),a=0;for(let t=0;t<e.length;t++){let n=r(e[t]);if(!i.has(n)){if(!Object.hasOwn(e,t)){delete e[a++];continue}e[a++]=e[t]}}return e.length=a,e}function vi(e,t){let n=e.length;t??=Array(n);for(let r=0;r<n;r++)t[r]=e[r];return t}function yi(e,t,n){if(e?.length==null||t?.length==null)return e;e===t&&(t=vi(t));let r=0;n??=(e,t)=>D(e,t);let i=Array.isArray(t)?t:Array.from(t),a=i.includes(void 0);for(let t=0;t<e.length;t++){if(t in e){i.some(r=>n(e[t],r))||(e[r++]=e[t]);continue}a||delete e[r++]}return e.length=r,e}function bi(e,...t){if(t.length===0)return[];let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(!j(r)||Mr(r)){n.push(r);continue}for(let e=0;e<r.length;e++)n.push(r[e])}let r=[];for(let t=0;t<n.length;t++)r.push(F(e,n[t]));return r}function xi(e,t){if(e==null)return!0;switch(typeof t){case`symbol`:case`number`:case`object`:if(Array.isArray(t))return Si(e,t);if(typeof t==`number`?t=M(t):typeof t==`object`&&(t=Object.is(t?.valueOf(),-0)?`-0`:String(t)),S(t))return!1;if(e?.[t]===void 0)return!0;try{return delete e[t],!0}catch{return!1}case`string`:if(e?.[t]===void 0&&rr(t))return Si(e,P(t));if(S(t))return!1;try{return delete e[t],!0}catch{return!1}}}function Si(e,t){let n=t.length===1?e:F(e,t.slice(0,-1)),r=t[t.length-1];if(n?.[r]===void 0)return!0;if(S(r))return!1;try{return delete n[r],!0}catch{return!1}}function Ci(e,...t){let n=Vr(t,1);if(!e)return Array(n.length);let r=bi(e,n),i=n.map(t=>hr(t,e.length)?Number(t):t).sort((e,t)=>t-e);for(let t of new Set(i)){if(hr(t,e.length)){Array.prototype.splice.call(e,t,1);continue}if(fi(t,e)){delete e[M(t)];continue}xi(e,w(t)?t:P(t))}return r}function wi(e,t=h,n){let r=arguments.length>=3;if(!e)return n;let i,a;j(e)?(i=dt(0,e.length).reverse(),!r&&e.length>0?(n=e[e.length-1],a=1):a=0):(i=Object.keys(e).reverse(),!r&&i.length>0?(n=e[i[0]],a=1):a=0);for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function Ti(e){if(typeof e!=`function`)throw TypeError(`Expected a function`);return function(...t){return!e.apply(this,t)}}function Ei(e,t=h){return Pr(e,Ti(B(t)))}function Di(e,t=h){return ye(e,B(t))}function Oi(e){return e==null?e:e.reverse()}function ki(e){if(e!=null)return j(e)?be(A(e)):be(Object.values(e))}function Ai(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=G(n),e=Math.min(e,Number.isNaN(n)?0:n)),t!==void 0&&(t=G(t),e=Math.max(e,Number.isNaN(t)?0:t)),e}function ji(e){return _n(e)}function Mi(e){return e==null?[]:j(e)||ji(e)?Array.from(e):typeof e==`object`?Object.values(e):[]}function Ni(e,t,n){let r=Mi(e);return t=(n?J(e,t,n):t===void 0)?1:Ai(q(t),0,r.length),Ce(r,t)}function Pi(e){return e==null?[]:Object.values(e)}function Fi(e){return e==null}function Ii(e){return Fi(e)?[]:w(e)?we(e):j(e)?we(Array.from(e)):V(e)?we(Pi(e)):[]}function Li(e){return k(e)?0:j(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length}function Ri(e,t,n){if(!j(e))return[];let r=e.length;n===void 0?n=r:typeof n!=`number`&&J(e,t,n)&&(t=0,n=r),t=q(t),n=q(n),t=t<0?Math.max(r+t,0):Math.min(t,r),n=n<0?Math.max(r+n,0):Math.min(n,r);let i=Math.max(n-t,0),a=Array(i);for(let n=0;n<i;++n)a[n]=e[t+n];return a}function zi(e,t,n){if(!e)return!1;n!=null&&(t=void 0),t??=h;let r=Array.isArray(e)?e:Object.values(e);switch(typeof t){case`function`:if(!Array.isArray(e)){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e))return!0}return!1}for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1;case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],i=t[1],a=z(n,i);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(a(e[t]))return!0;return!1}return r.some(a)}else{let n=R(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}case`number`:case`symbol`:case`string`:{let n=I(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}}}function Bi(e,...t){let n=t.length;return n>1&&J(e,t[0],t[1])?t=[]:n>2&&J(t[0],t[1],t[2])&&(t=[t[0]]),pi(e,ne(t),[`asc`])}function Vi(e){return typeof e==`number`||V(e)&&_(e)===`[object Number]`}function Hi(e){return Vi(e)&&Number.isNaN(Number(e))}function Ui(e,t,n=Y,r){if(Fi(e)||e.length===0)return 0;let i=0,a=e.length,o=B(n),s=o(t),c=Hi(s),l=bn(s),u=W(s),d=Tn(s);for(;i<a;){let t,n=Math.floor((i+a)/2),f=o(e[n]),ee=!Tn(f),p=bn(f),m=!Hi(f),te=W(f);t=c?r||m:d?m&&(r||ee):l?m&&ee&&(r||!p):u?m&&ee&&!p&&(r||!te):p||te?!1:r?f<=s:f<s,t?i=n+1:a=n}return Math.min(a,4294967294)}function Wi(e,t){if(k(e))return 0;let n=0,r=e.length;if(Vi(t)&&t===t&&r<=2147483647){for(;n<r;){let i=n+r>>>1,a=e[i];!bn(a)&&!wn(a)&&a<t?n=i+1:r=i}return r}return Ui(e,t,e=>e)}function Gi(e,t){if(!e?.length)return-1;let n=Wi(e,t);return n<e.length&&D(e[n],t)?n:-1}function Ki(e,t,n){return Ui(e,t,n,!0)}function qi(e,t){if(k(e))return 0;let n=e.length;if(!Vi(t)||Number.isNaN(t)||n>2147483647)return Ki(e,t,e=>e);let r=0;for(;r<n;){let i=r+n>>>1,a=e[i];!bn(a)&&!wn(a)&&a<=t?r=i+1:n=i}return n}function Ji(e,t){if(!e?.length)return-1;let n=qi(e,t)-1;return n>=0&&D(e[n],t)?n:-1}function Yi(e){return j(e)?Te(A(e)):[]}function Xi(e,t=1,n){return t=n||t===void 0?1:q(t),t<1||!j(e)?[]:Ee(A(e),t)}function Zi(e,t=1,n){return t=n?1:q(t),t<=0||!j(e)?[]:De(A(e),t)}function Qi(e,t){if(!H(e))return[];let n=A(e),r=n.findLastIndex(Ke(B(t??h)));return n.slice(r+1)}function $i(e,t){if(!H(e))return[];let n=A(e),r=n.findIndex(Ti(B(t??Y)));return r===-1?n:n.slice(0,r)}function ea(...e){return ke(Wr(e.filter(H),e=>Array.from(e),1))}function ta(...e){let t=pe(e),n=br(e);return H(t)||t==null?ke(n):Ae(n,Ve(B(t),1))}function na(...e){let t=pe(e),n=br(e);return H(t)||t==null?ke(n):je(n,t)}function ra(e,t=h){return H(e)?Ae(Array.from(e),Ve(B(t),1)):[]}function ia(e,t){return j(e)?typeof t==`function`?je(Array.from(e),(e,n)=>t(n,e)):$r(Array.from(e)):[]}function aa(e){return!H(e)||!e.length?[]:(e=w(e)?e:Array.from(e),e=e.filter(e=>H(e)),Me(e))}function oa(e,t){if(!H(e)||!e.length)return[];let n=w(e)?Me(e):Me(Array.from(e,e=>Array.from(e)));if(!t)return n;let r=Array(n.length);for(let e=0;e<n.length;e++){let i=n[e];r[e]=t(...i)}return r}function sa(e,...t){return H(e)?Pe(Array.from(e),...t):[]}function ca(...e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];if(!H(r))continue;let i=new Set(Mi(r));for(let e of i)t.has(e)?t.set(e,t.get(e)+1):t.set(e,1)}let n=[];for(let[e,r]of t)r===1&&n.push(e);return n}function la(...e){let t=U(e),n=h;!H(t)&&t!=null&&(n=B(t),e=e.slice(0,-1));let r=e.filter(H);return xr(ta(...r,n),ta(...Ne(r,2).map(([e,t])=>Qr(e,t,n)),n),n)}function ua(...e){let t=U(e),n=(e,t)=>e===t;typeof t==`function`&&(n=t,e=e.slice(0,-1));let r=e.filter(H);return Sr(na(...r,n),na(...Ne(r,2).map(([e,t])=>ei(e,t,n)),n),n)}function da(...e){return e.length?Fe(...e.filter(e=>H(e))):[]}let fa=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&D(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function pa(e=[],t=[]){let n={};for(let r=0;r<e.length;r++)fa(n,e[r],t[r]);return n}function ma(e,t,n,r){if(e==null&&!L(e))return e;let i;i=fi(t,e)?[t]:Array.isArray(t)?t:P(t);let a=n(F(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=M(i[t]);if(S(n))continue;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?L(a)?a:hr(i[t+1])?[]:{}:c}fa(o,n,s),o=o[n]}return e}function ha(e,t,n){return ma(e,t,()=>n,()=>void 0)}function ga(e,t){let n={};if(!j(e))return n;j(t)||(t=[]);let r=Fe(Array.from(e),Array.from(t));for(let e=0;e<r.length;e++){let[t,i]=r[e];t!=null&&ha(n,t,i)}return n}function _a(...e){let t=e.pop();if(O(t)||(e.push(t),t=void 0),!e?.length)return[];let n=aa(e);return t==null?n:n.map(e=>t(...e))}function va(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);return e=q(e),function(...n){if(--e<1)return t.apply(this,n)}}function ya(e,t=e.length,n){return n&&(t=e.length),(Number.isNaN(t)||t<0)&&(t=0),Ve(e,t)}function ba(e,...t){try{return e(...t)}catch(e){return e instanceof Error?e:Error(e)}}function xa(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);let n;return e=q(e),function(...r){return--e>0&&(n=t.apply(this,r)),e<=1&&t&&(t=void 0),n}}function Sa(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Sa.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e(...a):e.apply(t,a)};return r}Sa.placeholder=Symbol(`bind.placeholder`);function Ca(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Ca.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e[t](...a):e[t].apply(e,a)};return r}Ca.placeholder=Symbol(`bindKey.placeholder`);function wa(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===wa.placeholder),a=n.length-i.length;return a<t?Ta(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=Da,r}function Ta(e,t,n){function r(...i){let a=i.filter(e=>e===wa.placeholder),o=i.length-a.length;return i=Ea(i,n),o<t?Ta(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=Da,r}function Ea(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let a=t[i];a===wa.placeholder&&r<e.length?n.push(e[r++]):n.push(a)}for(let t=r;t<e.length;t++)n.push(e[t]);return n}let Da=Symbol(`curry.placeholder`);wa.placeholder=Da;function Oa(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===Oa.placeholder),a=n.length-i.length;return a<t?ka(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=ja,r}function ka(e,t,n){function r(...i){let a=i.filter(e=>e===Oa.placeholder),o=i.length-a.length;return i=Aa(i,n),o<t?ka(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=ja,r}function Aa(e,t){let n=t.filter(e=>e===Oa.placeholder).length,r=Math.max(e.length-n,0),i=[],a=0;for(let t=0;t<r;t++)i.push(e[a++]);for(let n=0;n<t.length;n++){let r=t[n];r===Oa.placeholder&&a<e.length?i.push(e[a++]):i.push(r)}return i}let ja=Symbol(`curryRight.placeholder`);Oa.placeholder=ja;function Ma(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Ue(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Na(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,1,...t)}function Pa(e,t,...n){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,G(t)||0,...n)}function Fa(e){return function(...t){return e.apply(this,t.reverse())}}function Ia(...e){let t=ne(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return We(...t)}function La(...e){let t=ne(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Ge(...t)}function Ra(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ra.Cache||Map),n}Ra.Cache=Map;function za(e=0){return function(...t){return t.at(q(e))}}function Ba(e){return Je(e)}function Va(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);let n=t.flat();return function(...t){let r=Math.min(t.length,n.length),i=[...t];for(let e=0;e<r;e++)i[e]=B(n[e]??h).call(this,t[e]);return e.apply(this,i)}}function Ha(e,...t){return Xe(e,Ha.placeholder,...t)}Ha.placeholder=Symbol(`compat.partial.placeholder`);function Ua(e,...t){return $e(e,Ua.placeholder,...t)}Ua.placeholder=Symbol(`compat.partialRight.placeholder`);function Wa(e,...t){let n=Br(t);return function(...t){let r=n.map(e=>t[e]).slice(0,t.length);for(let e=r.length;e<t.length;e++)r.push(t[e]);return e.apply(this,r)}}function Ga(e,t=e.length-1){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=e.length-1),tt(e,t)}function Ka(e,t=0){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=0),function(...n){let r=n[t],i=n.slice(0,t);return r&&i.push(...r),e.apply(this,i)}}function qa(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Ma(e,t,{leading:r,maxWait:t,trailing:i})}function Ja(e){return ya(e,1)}function Ya(e,t){return function(...n){return(O(t)?t:h).apply(this,[e,...n])}}function Xa(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=N(e),t=N(t)):(e=G(e),t=G(t)),e+t)}function Za(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n&&Number.isFinite(Number(t))){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function Qa(e,t=0){return Za(`ceil`,e,t)}function $a(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=N(e),t=N(t)):(e=G(e),t=G(t)),e/t)}function eo(e,t=0){return Za(`floor`,e,t)}function to(e,t,n){return t||=0,n!=null&&!n&&(n=0),t!=null&&typeof t!=`number`&&(t=Number(t)),n==null&&t===0||(n!=null&&typeof n!=`number`&&(n=Number(n)),n!=null&&t>n&&([t,n]=[n,t]),t===n)?!1:at(e,t,n)}function no(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r>t)&&(t=r)}return t}function ro(e,t){if(e!=null)return he(Array.from(e),B(t??h))}function io(e,t){if(!e||!e.length)return 0;t!=null&&(t=B(t));let n;for(let r=0;r<e.length;r++){let i=t?t(e[r]):e[r];i!==void 0&&(n===void 0?n=i:n+=i)}return n}function ao(e){return io(e)}function oo(e){let t=e?e.length:0;return t===0?NaN:ao(e)/t}function so(e,t){return e==null?NaN:st(Array.from(e),B(t??h))}function co(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r<t)&&(t=r)}return t}function lo(e,t){if(e!=null)return ge(Array.from(e),B(t??h))}function uo(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=N(e),t=N(t)):(e=G(e),t=G(t)),e*t)}function fo(e,t=0,n){return n&&(t=0),Number.parseInt(N(e),t)}function po(...e){let t=0,n=1,r=!1;switch(e.length){case 1:typeof e[0]==`boolean`?r=e[0]:n=e[0];break;case 2:if(typeof e[1]==`boolean`){n=e[0],r=e[1];break}else t=e[0],n=e[1];case 3:typeof e[2]==`object`&&e[2]!=null&&e[2][e[1]]===e[0]?(t=0,n=e[0],r=!1):(t=e[0],n=e[1],r=e[2])}return typeof t!=`number`&&(t=Number(t)),typeof n!=`number`&&(n=Number(n)),t||=0,n||=0,t>n&&([t,n]=[n,t]),!r&&(!Number.isInteger(t)||!Number.isInteger(n))&&(r=!0),t=Ai(t,-(2**53-1),2**53-1),n=Ai(n,-(2**53-1),2**53-1),t===n?t:r?xe(t,n):Se(t,n+1)}function mo(e,t,n){n&&typeof n!=`number`&&J(e,t,n)&&(t=n=void 0),e=K(e),t===void 0?(t=e,e=0):t=K(t),n=n===void 0?e<t?1:-1:K(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}function ho(e,t,n){n&&typeof n!=`number`&&J(e,t,n)&&(t=n=void 0),e=K(e),t===void 0?(t=e,e=0):t=K(t),n=n===void 0?e<t?1:-1:K(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=r-1;t>=0;t--)i[t]=e,e+=n;return i}function go(e,t=0){return Za(`round`,e,t)}function _o(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=N(e),t=N(t)):(e=G(e),t=G(t)),e-t)}function vo(...e){}function yo(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function X(e){return ft(e)}function bo(e,t){if(e=q(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function Z(e){if(j(e))return xo(e);let t=Object.keys(Object(e));return yo(e)?t.filter(e=>e!==`constructor`):t}function xo(e){let t=bo(e.length,e=>`${e}`),n=new Set(t);v(e)&&(n.add(`offset`),n.add(`parent`)),X(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=Object.keys(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function So(e,...t){for(let n=0;n<t.length;n++)Co(e,t[n]);return e}function Co(e,t){let n=Z(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!D(e[i],t[i]))&&(e[i]=t[i])}}function Q(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return j(e)?Eo(e):yo(e)?To(e):wo(e);default:return wo(Object(e))}}function wo(e){let t=[];for(let n in e)t.push(n);return t}function To(e){return wo(e).filter(e=>e!==`constructor`)}function Eo(e){let t=bo(e.length,e=>`${e}`),n=new Set(t);v(e)&&(n.add(`offset`),n.add(`parent`)),X(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=wo(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function Do(e,...t){for(let n=0;n<t.length;n++)Oo(e,t[n]);return e}function Oo(e,t){let n=Q(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!D(e[i],t[i]))&&(e[i]=t[i])}}function ko(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)Ao(e,t[r],n);return e}function Ao(e,t,n){let r=Q(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!D(o,c))&&(e[a]=c)}}function jo(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)Mo(e,t[r],n);return e}function Mo(e,t,n){let r=Z(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!D(o,c))&&(e[a]=c)}}function No(e){if(g(e))return e;let t=_(e);if(!Po(e))return{};if(w(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(X(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?Lo(r,e):Fo(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return Fo(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Ro(n,e),Fo(n,e),Io(n,e),n}function Po(e){switch(_(e)){case yt:case wt:case Tt:case Dt:case vt:case xt:case Ft:case It:case Mt:case Nt:case Pt:case St:case _t:case Et:case ht:case Ct:case gt:case bt:case Ot:case kt:case At:case jt:return!0;default:return!1}}function Fo(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function Io(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function Lo(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function Ro(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}function zo(e,t){if(!t)return No(e);let n=t(e);return n===void 0?No(e):n}function Bo(e,t){let n=L(e)?Object.create(e):{};if(t!=null){let e=Z(t);for(let r=0;r<e.length;r++){let i=e[r],a=t[i];fa(n,i,a)}}return n}function Vo(e,...t){e=Object(e);let n=Object.prototype,r=t.length,i=r>2?t[2]:void 0;i&&J(t[0],t[1],i)&&(r=1);for(let i=0;i<r;i++){if(k(t[i]))continue;let r=t[i],a=Object.keys(r);for(let t=0;t<a.length;t++){let i=a[t],o=e[i];(o===void 0||!Object.hasOwn(e,i)&&D(o,n[i]))&&(e[i]=r[i])}}return e}function Ho(e,...t){e=Object(e);for(let n=0;n<t.length;n++){let r=t[n];r!=null&&Uo(e,r,new WeakMap)}return e}function Uo(e,t,n){for(let r in t){let i=t[r],a=e[r];if(a===void 0||!Object.hasOwn(e,r)){e[r]=Wo(i,n);continue}n.get(i)!==a&&Go(a,i,n)}}function Wo(e,t){if(t.has(e))return t.get(e);if(E(e)){let n={};return t.set(e,n),Uo(n,e,t),n}return e}function Go(e,t,n){if(E(e)&&E(t)){n.set(t,e),Uo(e,t,n);return}Array.isArray(e)&&Array.isArray(t)&&(n.set(t,e),Ko(e,t,n))}function Ko(e,t,n){let r=Math.min(t.length,e.length);for(let i=0;i<r;i++)E(e[i])&&E(t[i])&&Uo(e[i],t[i],n);for(let n=r;n<t.length;n++)e.push(t[n])}function qo(e,t){if(L(e))return Bt(e,B(t??Y))}function Jo(e,t){if(!L(e))return;let n=B(t??Y);return Object.keys(e).findLast(t=>n(e[t],t,e))}function Yo(e,t=h){if(e==null)return e;for(let n in e)if(t(e[n],n,e)===!1)break;return e}function Xo(e,t=h){if(e==null)return e;let n=[];for(let t in e)n.push(t);for(let r=n.length-1;r>=0;r--){let i=n[r];if(t(e[i],i,e)===!1)break}return e}function Zo(e,t=h){if(e==null)return e;let n=Object(e),r=Z(e);for(let e=0;e<r.length;++e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Qo(e,t=h){if(e==null)return e;let n=Object(e),r=Z(e);for(let e=r.length-1;e>=0;--e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function $o(e){if(!j(e))return{};let t={};for(let n=0;n<e.length;n++){let[r,i]=e[n];t[r]=i}return t}function es(e){return e==null?[]:Z(e).filter(t=>typeof e[t]==`function`)}function ts(e){if(e==null)return[];let t=[];for(let n in e)O(e[n])&&t.push(n);return t}function ns(e,t){if(e==null)return!1;let n;if(n=Array.isArray(t)?t:typeof t==`string`&&rr(t)&&e[t]==null?P(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!(t in Object(r)))&&!((Array.isArray(r)||gr(r))&&hr(t)&&t<r.length))return!1;r=r[t]}return!0}function rs(e){return Ut(e)}function is(e,t){let n={};if(k(e))return n;t??=h;let r=Object.keys(e),i=B(t);for(let t=0;t<r.length;t++){let a=r[t],o=e[a],s=i(o);Array.isArray(n[s])?n[s].push(a):n[s]=[a]}return n}function as(e,t=h){return e==null?{}:Wt(e,B(t))}function os(e,t=h){return e==null?{}:Gt(e,B(t))}function ss(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=cs(i,t,r,new Map)}return i}function cs(e,t,n,r){if(g(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return pt(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...mt(t)];for(let a=0;a<i.length;a++){let o=i[a];if(S(o))continue;let s=t[o],c=e[o];if(gr(s)&&(s={...s}),gr(c)&&(c={...c}),v(s)&&(s=pr(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(H(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||V(c)&&V(s)&&(E(c)||E(s)||X(c)||X(s))?e[o]=cs(c,s,n,r):c==null&&E(s)?e[o]=cs({},s,n,r):c==null&&X(s)?e[o]=pr(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ls(e,...t){return ss(e,...t,qe)}function us(e){let t=[];for(;e;)t.push(...mt(e)),e=Object.getPrototypeOf(e);return t}function ds(e,...t){if(e==null)return{};t=Br(t);let n=fs(e,t);for(let e=0;e<t.length;e++){let r=t[e];switch(typeof r){case`object`:Array.isArray(r)||(r=Array.from(r));for(let e=0;e<r.length;e++){let t=r[e];xi(n,t)}break;case`string`:case`symbol`:case`number`:xi(n,r);break}}return n}function fs(e,t){return t.some(e=>Array.isArray(e)||rr(e))?ms(e):ps(e)}function ps(e){let t={},n=[...Q(e),...us(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=e[i]}return t}function ms(e){let t={},n=[...Q(e),...us(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=fr(e[i],e=>{if(!E(e))return e})}return t}function hs(e,t){if(e==null)return{};let n={},r=B(t??Y),i=[...Q(e),...us(e)];for(let t=0;t<i.length;t++){let a=W(i[t])?i[t]:i[t].toString(),o=e[a];r(o,a,e)||(n[a]=o)}return n}function gs(e,...t){if(Fi(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=j(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=F(e,t);r===void 0&&!_r(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=e[t]:ha(n,t,r))}}return n}function _s(e,t){if(e==null)return{};let n=B(t??Y),r={},i=j(e)?dt(0,e.length):[...Q(e),...us(e)];for(let t=0;t<i.length;t++){let a=W(i[t])?i[t]:i[t].toString(),o=e[a];n(o,a,e)&&(r[a]=o)}return r}function vs(e){return function(t){return F(e,t)}}function ys(e,t,n){fi(t,e)?t=[t]:Array.isArray(t)||(t=P(N(t)));let r=Math.max(t.length,1);for(let i=0;i<r;i++){let r=e?.[M(t[i])];if(r===void 0)return typeof n==`function`?n.call(e):n;e=typeof r==`function`?r.call(e):r}return e}function bs(e,t,n,r){let i;return i=typeof r==`function`?r:()=>void 0,ma(e,t,()=>n,i)}function xs(e,...t){return Vo(pr(e),...t)}function Ss(e){let t=Array(e.size),n=e.keys(),r=e.values();for(let e=0;e<t.length;e++)t[e]=[n.next().value,r.next().value];return t}function Cs(e){let t=Array(e.size),n=e.values();for(let e=0;e<t.length;e++){let r=n.next().value;t[e]=[r,r]}return t}function ws(e){if(e==null)return[];if(e instanceof Set)return Cs(e);if(e instanceof Map)return Ss(e);let t=Z(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function Ts(e){if(e==null)return[];if(e instanceof Set)return Cs(e);if(e instanceof Map)return Ss(e);let t=Q(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function Es(e){return v(e)}function Ds(e,t=h,n){let r=Array.isArray(e)||Es(e)||X(e);return t=B(t),n??=r?[]:L(e)&&O(e.constructor)?Object.create(Object.getPrototypeOf(e)):{},e==null||kr(e,(e,r,i)=>t(n,e,r,i)),n}function Os(e,t,n){return ma(e,t,n,()=>void 0)}function ks(e){let t=Q(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function As(e){return typeof e==`function`}function js(e){return Number.isSafeInteger(e)&&e>=0}let Ms=Function.prototype.toString,Ns=RegExp(`^${Ms.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)}$`);function Ps(e){if(typeof e!=`function`)return!1;if(globalThis?.[`__core-js_shared__`]!=null)throw Error(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return Ns.test(Ms.call(e))}function Fs(e){return e===null}function Is(e){return Tn(e)}function Ls(e,t){if(t==null)return!0;if(e==null)return Object.keys(t).length===0;let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i],o=e[i];if(o===void 0&&!(i in e)||typeof a==`function`&&!a(o))return!1}return!0}function Rs(e){return e=zt(e),function(t){return Ls(t,e)}}function zs(e){return en(e)}function Bs(e){return typeof e==`boolean`||e instanceof Boolean}function Vs(e){return rn(e)}function Hs(e){return V(e)&&e.nodeType===1&&!E(e)}function Us(e){if(e==null)return!0;if(j(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!v(e)&&!X(e)&&!gr(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return yo(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function Ws(e,t,n){return typeof n!=`function`&&(n=()=>void 0),on(e,t,(...r)=>{let i=n(...r);if(i!==void 0)return!!i;if(e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set)return Ws(Array.from(e),Array.from(t),Be(2,n))})}function Gs(e){return _(e)===`[object Error]`}function Ks(e){return Number.isFinite(e)}function qs(e){return Number.isInteger(e)}function Js(e){return Sn(e)}function Ys(e){return Number.isSafeInteger(e)}function Xs(e){return Cn(e)}function Zs(e){return En(e)}function Qs(e){return Dn(e)}function $s(e){return qt(N(e))}function ec(e,...t){if(e==null||!L(e)||w(e)&&t.length===0)return e;let n=[];for(let e=0;e<t.length;e++){let r=t[e];w(r)?n.push(...r):r&&typeof r==`object`&&`length`in r?n.push(...Array.from(r)):n.push(r)}if(n.length===0)return e;for(let t=0;t<n.length;t++){let r=n[t],i=N(r),a=e[i];O(a)&&(e[i]=a.bind(e))}return e}function $(e){return Pn(N(e))}function tc(e){return typeof e!=`string`&&(e=N(e)),e.replace(/['\u2019]/g,``)}function nc(e){return Yt(tc($(e)))}function rc(e,t,n){return e==null||t==null?!1:(n??=e.length,e.endsWith(t,n))}function ic(e){return In(N(e))}function ac(e){return Ln(N(e))}function oc(e){return Rn(tc($(e)))}function sc(e){return zn(tc($(e)))}function cc(e){return Bn(N(e))}function lc(e,t,n){return Vn(N(e),t,n)}function uc(e,t=0,n=` `){return N(e).padEnd(t,n)}function dc(e,t=0,n=` `){return N(e).padStart(t,n)}let fc=2**53-1;function pc(e,t,n){return t=(n?J(e,t,n):t===void 0)?1:q(t),t<1||t>fc?``:N(e).repeat(t)}function mc(e,t,n){return arguments.length<3?N(e):N(e).replace(t,n)}function hc(e){return Qt(tc($(e)))}function gc(e,t,n){return N(e).split(t,n)}function _c(e){let t=T(tc($(e)).trim()),n=``;for(let e=0;e<t.length;e++){let r=t[e];n&&(n+=` `),r===r.toUpperCase()?n+=r:n+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return n}function vc(e,t,n){return e==null||t==null?!1:(n??=0,e.startsWith(t,n))}let yc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,bc=/['\n\r\u2028\u2029\\]/g,xc=/($^)/,Sc=new Map([[`\\`,`\\`],[`'`,`'`],[`
|
|
2
|
+
`,`n`],[`\r`,`r`],[`\u2028`,`u2028`],[`\u2029`,`u2029`]]);function Cc(e){return`\\${Sc.get(e)}`}let wc=/<%=([\s\S]+?)%>/g,Tc={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:wc,variable:``,imports:{_:{escape:ic,template:Ec}}};function Ec(e,t,n){e=N(e),n&&(t=Tc),t=Vo({...t},Tc);let r=new RegExp([t.escape?.source??xc.source,t.interpolate?.source??xc.source,t.interpolate===wc?yc.source:xc.source,t.evaluate?.source??xc.source,`$`].join(`|`),`g`),i=0,a=!1,o=`__p += ''`;for(let t of e.matchAll(r)){let[n,r,s,c,l]=t,{index:u}=t;o+=` + '${e.slice(i,u).replace(bc,Cc)}'`,r&&(o+=` + _.escape(${r})`),s?o+=` + ((${s}) == null ? '' : ${s})`:c&&(o+=` + ((${c}) == null ? '' : ${c})`),l&&(o+=`;\n${l};\n __p += ''`,a=!0),i=u+n.length}let s=Vo({...t.imports},Tc.imports),c=Object.keys(s),l=Object.values(s),u=`//# sourceURL=${t.sourceURL?String(t.sourceURL).replace(/[\r\n]/g,` `):`es-toolkit.templateSource[${Date.now()}]`}\n`,d=`function(${t.variable||`obj`}) {
|
|
3
3
|
let __p = '';
|
|
4
4
|
${t.variable?``:`if (obj == null) { obj = {}; }`}
|
|
5
5
|
${a?`function print() { __p += Array.prototype.join.call(arguments, ''); }`:``}
|
|
6
6
|
${t.variable?o:`with(obj) {\n${o}\n}`}
|
|
7
7
|
return __p;
|
|
8
|
-
}`,f=
|
|
8
|
+
}`,f=ba(()=>Function(...c,`${u}return ${d}`)(...l));if(f.source=d,f instanceof Error)throw f;return f}function Dc(e){return N(e).toLowerCase()}function Oc(e){return N(e).toUpperCase()}function kc(e,t,n){if(e==null)return``;if(n!=null||t==null)return e.toString().trim();switch(typeof t){case`object`:return Array.isArray(t)?Kn(e,t.flatMap(e=>e.toString().split(``))):Kn(e,t.toString().split(``));default:return Kn(e,t.toString().split(``))}}function Ac(e,t,n){return e==null?``:n!=null||t==null?e.toString().trimEnd():Wn(e,t.toString().split(``))}function jc(e,t,n){return e==null?``:n!=null||t==null?e.toString().trimStart():Gn(e,t.toString().split(``))}let Mc=/[\u200d\ud800-\udfff\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff\ufe0e\ufe0f]/;function Nc(e,t){e=e==null?``:`${e}`;let n=30,r=`...`;L(t)&&(n=Pc(t.length),r=`omission`in t?`${t.omission}`:`...`);let i=e.length,a=Array.from(r).length,o=Math.max(n-a,0),s;if(Mc.test(e)&&(s=Array.from(e),i=s.length),n>=i)return e;if(i<=a)return r;let c=s===void 0?e.slice(0,o):s?.slice(0,o).join(``),l=t?.separator;if(!l)return c+=r,c;let u=l instanceof RegExp?l.source:l,d=`u`+(l instanceof RegExp?l.flags.replace(`u`,``):``),f=RegExp(`(?<result>.*(?:(?!${u}).))(?:${u})`,d).exec(c);return(f?.groups?f.groups.result:c)+r}function Pc(e){return e==null?30:e<=0?0:e}function Fc(e){return Jn(N(e))}function Ic(e){return Yn(tc($(e)))}function Lc(e){return Xn(N(e))}let Rc=`\\p{Lu}`,zc=`\\p{Ll}`,Bc=`(?:[\\p{Lm}\\p{Lo}]\\p{M}*)`,Vc=`(?:['’](?:d|ll|m|re|s|t|ve))?`,Hc=`(?:['’](?:D|LL|M|RE|S|T|VE))?`,Uc=`[\\p{Z}\\p{P}\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7]`,Wc=`(?:${Rc}|${Bc})`,Gc=`(?:${zc}|${Bc})`,Kc=RegExp([`${Rc}?${zc}+${Vc}(?=${Uc}|${Rc}|$)`,`${Wc}+${Hc}(?=${Uc}|${Rc}${Gc}|$)`,`${Rc}?${Gc}+${Vc}`,`${Rc}+${Hc}`,`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,`\\d+`,`\\p{Emoji_Presentation}`,`\\p{Extended_Pictographic}`].join(`|`),`gu`);function qc(e,t=Kc,n){let r=N(e);return n&&(t=Kc),typeof t==`number`&&(t=t.toString()),Array.from(r.match(t)??[]).filter(e=>e!==``)}function Jc(e){let t=e.length,n=e.map(e=>{let t=e[0],n=e[1];if(!O(n))throw TypeError(`Expected a function`);return[B(t),n]});return function(...e){for(let r=0;r<t;r++){let t=n[r],i=t[0],a=t[1];if(i.apply(this,e))return a.apply(this,e)}}}function Yc(e){return()=>e}function Xc(e,t){return e==null||Number.isNaN(e)?t:e}function Zc(e,t){return typeof e==`string`&&typeof t==`string`?e>t:G(e)>G(t)}function Qc(e,t){return typeof e==`string`&&typeof t==`string`?e>=t:G(e)>=G(t)}function $c(e,t,...n){if(n=n.flat(1),e!=null)switch(typeof t){case`string`:return typeof e==`object`&&Object.hasOwn(e,t)?el(e,[t],n):el(e,P(t),n);case`number`:case`symbol`:return el(e,[t],n);default:return Array.isArray(t)?el(e,t,n):el(e,[t],n)}}function el(e,t,n){let r=F(e,t.slice(0,-1),e);if(r==null)return;let i=U(t),a=i?.valueOf();return i=typeof a==`number`?M(a):String(i),F(r,i)?.apply(r,n)}function tl(e,t){return typeof e==`string`&&typeof t==`string`?e<t:G(e)<G(t)}function nl(e,t){return typeof e==`string`&&typeof t==`string`?e<=t:G(e)<=G(t)}function rl(e,...t){return function(n){return $c(n,e,t)}}function il(e,...t){return function(n){return $c(e,n,t)}}function al(){return Date.now()}function ol(...e){e.length===1&&Array.isArray(e[0])&&(e=e[0]);let t=e.map(e=>B(e));return function(...e){return t.map(t=>t.apply(this,e))}}function sl(...e){return function(...t){for(let n=0;n<e.length;++n){let r=e[n];if(!Array.isArray(r)){if(!B(r).apply(this,t))return!1;continue}for(let e=0;e<r.length;++e)if(!B(r[e]).apply(this,t))return!1}return!0}}function cl(...e){return function(...t){for(let n=0;n<e.length;++n){let r=e[n];if(!Array.isArray(r)){if(B(r).apply(this,t))return!0;continue}for(let e=0;e<r.length;++e)if(B(r[e]).apply(this,t))return!0}return!1}}function ll(){return[]}function ul(){return!1}function dl(){return{}}function fl(){return``}function pl(){return!0}function ml(e){return e==null?0:Ai(q(e),0,4294967295)}function hl(e){let t={},n=Q(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];i===`__proto__`?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[i]=a}return t}function gl(e){return e==null?0:Ai(q(e),-fc,fc)}let _l=0;function vl(e=``){return`${e}${++_l}`}e.AbortError=Re,e.Mutex=kn,e.Semaphore=p,e.TimeoutError=ze,e.add=Xa,e.after=va,e.allKeyed=On,e.ary=ya,e.assert=Qn,e.invariant=Qn,e.assign=So,e.assignIn=Do,e.extend=Do,e.assignInWith=ko,e.extendWith=ko,e.assignWith=jo,e.asyncNoop=He,e.at=bi,e.attempt=ba,e.attemptAsync=Zn,e.before=xa,e.bind=Sa,e.bindAll=ec,e.bindKey=Ca,e.camelCase=nc,e.capitalize=$s,e.cartesianProduct=t,e.castArray=$n,e.ceil=Qa,e.chunk=er,e.chunkBy=r,e.clamp=Ai,e.clone=No,e.cloneDeep=pr,e.cloneDeepWith=fr,e.cloneWith=zo,e.combinations=i,e.compact=tr,e.concat=nr,e.cond=Jc,e.conforms=Rs,e.conformsTo=Ls,e.constant=Yc,e.constantCase=Mn,e.countBy=vr,e.create=Bo,e.curry=wa,e.curryRight=Oa,e.debounce=Ma,e.deburr=$,e.defaultTo=Xc,e.defaults=Vo,e.defaultsDeep=Ho,e.defer=Na,e.delay=Pa,e.difference=yr,e.differenceBy=xr,e.differenceWith=Sr,e.divide=$a,e.drop=Cr,e.dropRight=wr,e.dropRightWhile=Tr,e.dropWhile=Dr,e.each=kr,e.forEach=kr,e.eachRight=Ar,e.forEachRight=Ar,e.endsWith=rc,e.eq=D,e.escape=ic,e.escapeRegExp=ac,e.every=jr,e.fill=Nr,e.filter=Pr,e.filterAsync=te,e.find=Fr,e.findIndex=Ir,e.findKey=qo,e.findLast=Lr,e.findLastIndex=Rr,e.findLastKey=Jo,e.first=zr,e.head=zr,e.flatMap=Ur,e.flatMapAsync=re,e.flatMapDeep=Gr,e.flatMapDepth=Wr,e.flatten=Br,e.flattenDeep=Kr,e.flattenDepth=Vr,e.flattenObject=Vt,e.flip=Fa,e.floor=eo,e.flow=Ia,e.flowRight=La,e.forEachAsync=ie,e.forIn=Yo,e.forInRight=Xo,e.forOwn=Zo,e.forOwnRight=Qo,e.fromPairs=$o,e.functions=es,e.functionsIn=ts,e.get=F,e.groupBy=qr,e.gt=Zc,e.gte=Qc,e.has=_r,e.hasIn=ns,e.identity=Y,e.inRange=to,e.includes=Jr,e.indexOf=Yr,e.initial=Xr,e.intersection=Zr,e.intersectionBy=Qr,e.intersectionWith=ei,e.invert=rs,e.invertBy=is,e.invoke=$c,e.invokeMap=ni,e.isArguments=gr,e.isArray=w,e.isArrayBuffer=zs,e.isArrayLike=j,e.isArrayLikeObject=H,e.isBlob=tn,e.isBoolean=Bs,e.isBrowser=nn,e.isBuffer=Es,e.isDate=Vs,e.isElement=Hs,e.isEmpty=Us,e.isEmptyObject=an,e.isEqual=ln,e.isEqualWith=Ws,e.isError=Gs,e.isFile=un,e.isFinite=Ks,e.isFunction=As,e.isInteger=qs,e.isIterable=dn,e.isJSON=fn,e.isJSONArray=mn,e.isJSONObject=hn,e.isJSONValue=pn,e.isLength=js,e.isMap=ji,e.isMatch=dr,e.isMatchWith=ar,e.isNaN=Hi,e.isNative=Ps,e.isNil=Fi,e.isNode=vn,e.isNotNil=yn,e.isNull=Fs,e.isNumber=Vi,e.isObject=L,e.isObjectLike=V,e.isPlainObject=E,e.isPrimitive=g,e.isPromise=xn,e.isRegExp=Js,e.isSafeInteger=Ys,e.isSet=Xs,e.isString=Mr,e.isSubset=de,e.isSubsetWith=fe,e.isSymbol=W,e.isTypedArray=X,e.isUndefined=Is,e.isWeakMap=Zs,e.isWeakSet=Qs,e.iteratee=B,e.join=ri,e.kebabCase=oc,e.keyBy=ai,e.keys=Z,e.keysIn=Q,e.last=U,e.lastIndexOf=oi,e.limitAsync=m,e.lowerCase=sc,e.lowerFirst=cc,e.lt=tl,e.lte=nl,e.map=Hr,e.mapAsync=me,e.mapKeys=as,e.mapValues=os,e.matches=R,e.matchesProperty=z,e.max=no,e.maxBy=ro,e.mean=oo,e.meanBy=so,e.median=ct,e.medianBy=lt,e.memoize=Ra,e.merge=ls,e.mergeWith=ss,e.method=rl,e.methodOf=il,e.min=co,e.minBy=lo,e.multiply=uo,e.negate=Ti,e.noop=vo,e.now=al,e.nth=si,e.nthArg=za,e.omit=ds,e.omitBy=hs,e.once=Ba,e.orderBy=pi,e.over=ol,e.overArgs=Va,e.overEvery=sl,e.overSome=cl,e.pad=lc,e.padEnd=uc,e.padStart=dc,e.parseInt=fo,e.partial=Ha,e.partialRight=Ua,e.partition=mi,e.pascalCase=Hn,e.percentile=ut,e.pick=gs,e.pickBy=_s,e.property=I,e.propertyOf=vs,e.pull=hi,e.pullAll=gi,e.pullAllBy=_i,e.pullAllWith=yi,e.pullAt=Ci,e.random=po,e.randomInt=Se,e.range=mo,e.rangeRight=ho,e.rearg=Wa,e.reduce=ii,e.reduceAsync=ve,e.reduceRight=wi,e.reject=Ei,e.remove=Di,e.repeat=pc,e.replace=mc,e.rest=Ga,e.result=ys,e.retry=it,e.reverse=Oi,e.reverseString=Un,e.round=go,e.sample=ki,e.sampleSize=Ni,e.set=ha,e.setWith=bs,e.shuffle=Ii,e.size=Li,e.slice=Ri,e.snakeCase=hc,e.some=zi,e.sortBy=Bi,e.sortKeys=Kt,e.sortedIndex=Wi,e.sortedIndexBy=Ui,e.sortedIndexOf=Gi,e.sortedLastIndex=qi,e.sortedLastIndexBy=Ki,e.sortedLastIndexOf=Ji,e.split=gc,e.spread=Ka,e.startCase=_c,e.startsWith=vc,e.stubArray=ll,e.stubFalse=ul,e.stubObject=dl,e.stubString=fl,e.stubTrue=pl,e.subtract=_o,e.sum=ao,e.sumBy=io,e.tail=Yi,e.take=Xi,e.takeRight=Zi,e.takeRightWhile=Qi,e.takeWhile=$i,e.template=Ec,e.templateSettings=Tc,e.throttle=qa,e.timeout=An,e.times=bo,e.toArray=Mi,e.toCamelCaseKeys=Xt,e.toDefaulted=xs,e.toFilled=Oe,e.toFinite=K,e.toInteger=q,e.toLength=ml,e.toLower=Dc,e.toMerged=Zt,e.toNumber=G,e.toPairs=ws,e.toPairsIn=Ts,e.toPath=P,e.toPlainObject=hl,e.toSafeInteger=gl,e.toSnakeCaseKeys=$t,e.toString=N,e.toUpper=Oc,e.transform=Ds,e.trim=kc,e.trimEnd=Ac,e.trimStart=jc,e.truncate=Nc,e.unary=Ja,e.unescape=Fc,e.union=ea,e.unionBy=ta,e.unionWith=na,e.uniq=$r,e.uniqBy=ra,e.uniqWith=ia,e.uniqueId=vl,e.unset=xi,e.unzip=aa,e.unzipWith=oa,e.update=Os,e.updateWith=ma,e.upperCase=Ic,e.upperFirst=Lc,e.values=Pi,e.valuesIn=ks,e.windowed=Ne,e.withTimeout=jn,e.without=sa,e.words=qc,e.wrap=Ya,e.xor=ca,e.xorBy=la,e.xorWith=ua,e.zip=da,e.zipObject=pa,e.zipObjectDeep=ga,e.zipWith=_a});
|
|
@@ -26,8 +26,10 @@ const require_isArrayLike = require("../predicate/isArrayLike.js");
|
|
|
26
26
|
*/
|
|
27
27
|
function chunk(arr, size = 1) {
|
|
28
28
|
size = Math.max(Math.floor(size), 0);
|
|
29
|
-
if (size === 0 || !require_isArrayLike.isArrayLike(arr)) return [];
|
|
30
|
-
|
|
29
|
+
if (size === 0 || !require_isArrayLike.isArrayLike(arr) || Number.isNaN(size)) return [];
|
|
30
|
+
const array = require_toArray.toArray(arr);
|
|
31
|
+
if (!isFinite(size)) return [array];
|
|
32
|
+
return require_chunk.chunk(array, size);
|
|
31
33
|
}
|
|
32
34
|
//#endregion
|
|
33
35
|
exports.chunk = chunk;
|
|
@@ -26,8 +26,10 @@ import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
|
|
26
26
|
*/
|
|
27
27
|
function chunk(arr, size = 1) {
|
|
28
28
|
size = Math.max(Math.floor(size), 0);
|
|
29
|
-
if (size === 0 || !isArrayLike(arr)) return [];
|
|
30
|
-
|
|
29
|
+
if (size === 0 || !isArrayLike(arr) || Number.isNaN(size)) return [];
|
|
30
|
+
const array = toArray(arr);
|
|
31
|
+
if (!isFinite(size)) return [array];
|
|
32
|
+
return chunk$1(array, size);
|
|
31
33
|
}
|
|
32
34
|
//#endregion
|
|
33
35
|
export { chunk };
|
|
@@ -9,16 +9,16 @@ const require_flattenArrayLike = require("../_internal/flattenArrayLike.js");
|
|
|
9
9
|
* Computes the difference between an array and multiple arrays using an iteratee function.
|
|
10
10
|
*
|
|
11
11
|
* @template T
|
|
12
|
-
* @param
|
|
12
|
+
* @param array - The primary array from which to derive the difference.
|
|
13
13
|
* @param values - Multiple arrays containing elements to be excluded from the primary array.
|
|
14
14
|
* @returns A new array containing the elements that are present in the primary array but not in the values arrays.
|
|
15
15
|
*/
|
|
16
|
-
function differenceBy(
|
|
17
|
-
if (!require_isArrayLikeObject.isArrayLikeObject(
|
|
16
|
+
function differenceBy(array, ..._values) {
|
|
17
|
+
if (!require_isArrayLikeObject.isArrayLikeObject(array)) return [];
|
|
18
18
|
const iteratee$1 = require_last.last(_values);
|
|
19
19
|
const values = require_flattenArrayLike.flattenArrayLike(_values);
|
|
20
|
-
if (require_isArrayLikeObject.isArrayLikeObject(iteratee$1)) return require_difference.difference(Array.from(
|
|
21
|
-
return require_differenceBy.differenceBy(Array.from(
|
|
20
|
+
if (require_isArrayLikeObject.isArrayLikeObject(iteratee$1)) return require_difference.difference(Array.from(array), values);
|
|
21
|
+
return require_differenceBy.differenceBy(Array.from(array), values, require_iteratee.iteratee(iteratee$1));
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
exports.differenceBy = differenceBy;
|
|
@@ -9,16 +9,16 @@ import { flattenArrayLike } from "../_internal/flattenArrayLike.mjs";
|
|
|
9
9
|
* Computes the difference between an array and multiple arrays using an iteratee function.
|
|
10
10
|
*
|
|
11
11
|
* @template T
|
|
12
|
-
* @param
|
|
12
|
+
* @param array - The primary array from which to derive the difference.
|
|
13
13
|
* @param values - Multiple arrays containing elements to be excluded from the primary array.
|
|
14
14
|
* @returns A new array containing the elements that are present in the primary array but not in the values arrays.
|
|
15
15
|
*/
|
|
16
|
-
function differenceBy(
|
|
17
|
-
if (!isArrayLikeObject(
|
|
16
|
+
function differenceBy(array, ..._values) {
|
|
17
|
+
if (!isArrayLikeObject(array)) return [];
|
|
18
18
|
const iteratee$1 = last(_values);
|
|
19
19
|
const values = flattenArrayLike(_values);
|
|
20
|
-
if (isArrayLikeObject(iteratee$1)) return difference(Array.from(
|
|
21
|
-
return differenceBy$1(Array.from(
|
|
20
|
+
if (isArrayLikeObject(iteratee$1)) return difference(Array.from(array), values);
|
|
21
|
+
return differenceBy$1(Array.from(array), values, iteratee(iteratee$1));
|
|
22
22
|
}
|
|
23
23
|
//#endregion
|
|
24
24
|
export { differenceBy };
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* of elements removed from the start.
|
|
7
7
|
*
|
|
8
8
|
* @template T - The type of elements in the array.
|
|
9
|
-
* @param
|
|
9
|
+
* @param array - The array from which to drop elements.
|
|
10
10
|
* @param itemsCount - The number of elements to drop from the beginning of the array.
|
|
11
|
-
* @param [guard] - Enables use as an iteratee for methods like `_.map`.
|
|
12
11
|
* @returns A new array with the specified number of elements removed from the start.
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
@@ -16,6 +15,6 @@
|
|
|
16
15
|
* const result = drop(array, 2);
|
|
17
16
|
* result will be [3, 4, 5] since the first two elements are dropped.
|
|
18
17
|
*/
|
|
19
|
-
declare function drop<T>(array: ArrayLike<T> | null | undefined,
|
|
18
|
+
declare function drop<T>(array: ArrayLike<T> | null | undefined, itemsCount?: number): T[];
|
|
20
19
|
//#endregion
|
|
21
20
|
export { drop };
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* of elements removed from the start.
|
|
7
7
|
*
|
|
8
8
|
* @template T - The type of elements in the array.
|
|
9
|
-
* @param
|
|
9
|
+
* @param array - The array from which to drop elements.
|
|
10
10
|
* @param itemsCount - The number of elements to drop from the beginning of the array.
|
|
11
|
-
* @param [guard] - Enables use as an iteratee for methods like `_.map`.
|
|
12
11
|
* @returns A new array with the specified number of elements removed from the start.
|
|
13
12
|
*
|
|
14
13
|
* @example
|
|
@@ -16,6 +15,6 @@
|
|
|
16
15
|
* const result = drop(array, 2);
|
|
17
16
|
* result will be [3, 4, 5] since the first two elements are dropped.
|
|
18
17
|
*/
|
|
19
|
-
declare function drop<T>(array: ArrayLike<T> | null | undefined,
|
|
18
|
+
declare function drop<T>(array: ArrayLike<T> | null | undefined, itemsCount?: number): T[];
|
|
20
19
|
//#endregion
|
|
21
20
|
export { drop };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_drop = require("../../array/drop.js");
|
|
2
|
-
const require_toInteger = require("../util/toInteger.js");
|
|
3
2
|
const require_toArray = require("../_internal/toArray.js");
|
|
4
3
|
const require_isArrayLike = require("../predicate/isArrayLike.js");
|
|
4
|
+
const require_toInteger = require("../util/toInteger.js");
|
|
5
5
|
//#region src/compat/array/drop.ts
|
|
6
|
-
function drop(
|
|
7
|
-
if (!require_isArrayLike.isArrayLike(
|
|
6
|
+
function drop(array, itemsCount = 1, guard) {
|
|
7
|
+
if (!require_isArrayLike.isArrayLike(array)) return [];
|
|
8
8
|
itemsCount = guard ? 1 : require_toInteger.toInteger(itemsCount);
|
|
9
|
-
return require_drop.drop(require_toArray.toArray(
|
|
9
|
+
return require_drop.drop(require_toArray.toArray(array), itemsCount);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
exports.drop = drop;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { drop as drop$1 } from "../../array/drop.mjs";
|
|
2
|
-
import { toInteger } from "../util/toInteger.mjs";
|
|
3
2
|
import { toArray } from "../_internal/toArray.mjs";
|
|
4
3
|
import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
|
4
|
+
import { toInteger } from "../util/toInteger.mjs";
|
|
5
5
|
//#region src/compat/array/drop.ts
|
|
6
|
-
function drop(
|
|
7
|
-
if (!isArrayLike(
|
|
6
|
+
function drop(array, itemsCount = 1, guard) {
|
|
7
|
+
if (!isArrayLike(array)) return [];
|
|
8
8
|
itemsCount = guard ? 1 : toInteger(itemsCount);
|
|
9
|
-
return drop$1(toArray(
|
|
9
|
+
return drop$1(toArray(array), itemsCount);
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
12
|
export { drop };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_dropRight = require("../../array/dropRight.js");
|
|
2
|
-
const require_toInteger = require("../util/toInteger.js");
|
|
3
2
|
const require_toArray = require("../_internal/toArray.js");
|
|
4
3
|
const require_isArrayLike = require("../predicate/isArrayLike.js");
|
|
4
|
+
const require_toInteger = require("../util/toInteger.js");
|
|
5
5
|
//#region src/compat/array/dropRight.ts
|
|
6
6
|
/**
|
|
7
7
|
* Removes a specified number of elements from the end of an array and returns the rest.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dropRight as dropRight$1 } from "../../array/dropRight.mjs";
|
|
2
|
-
import { toInteger } from "../util/toInteger.mjs";
|
|
3
2
|
import { toArray } from "../_internal/toArray.mjs";
|
|
4
3
|
import { isArrayLike } from "../predicate/isArrayLike.mjs";
|
|
4
|
+
import { toInteger } from "../util/toInteger.mjs";
|
|
5
5
|
//#region src/compat/array/dropRight.ts
|
|
6
6
|
/**
|
|
7
7
|
* Removes a specified number of elements from the end of an array and returns the rest.
|
|
@@ -31,7 +31,7 @@ import { ListIteratee } from "../_internal/ListIteratee.mjs";
|
|
|
31
31
|
*
|
|
32
32
|
* // Using property shorthand
|
|
33
33
|
* dropRightWhile(users, 'active');
|
|
34
|
-
* // => [{ user: 'barney', active: true }]
|
|
34
|
+
* // => [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]
|
|
35
35
|
*/
|
|
36
36
|
declare function dropRightWhile<T>(array: ArrayLike<T> | null | undefined, predicate?: ListIteratee<T>): T[];
|
|
37
37
|
//#endregion
|
|
@@ -31,7 +31,7 @@ import { ListIteratee } from "../_internal/ListIteratee.js";
|
|
|
31
31
|
*
|
|
32
32
|
* // Using property shorthand
|
|
33
33
|
* dropRightWhile(users, 'active');
|
|
34
|
-
* // => [{ user: 'barney', active: true }]
|
|
34
|
+
* // => [{ user: 'barney', active: true }, { user: 'fred', active: false }, { user: 'pebbles', active: false }]
|
|
35
35
|
*/
|
|
36
36
|
declare function dropRightWhile<T>(array: ArrayLike<T> | null | undefined, predicate?: ListIteratee<T>): T[];
|
|
37
37
|
//#endregion
|