es-toolkit 1.35.0-dev.1201 → 1.35.0-dev.1206

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.
Files changed (91) hide show
  1. package/dist/_chunk/{isPromise-ByAybB.js → isPromise-BqEEYJ.js} +126 -40
  2. package/dist/_chunk/{reverseString-D-wK2p.js → reverseString-BixeGz.js} +84 -13
  3. package/dist/_chunk/toSnakeCaseKeys-DCXJ3Q.js +4599 -0
  4. package/dist/_chunk/{unary-BsNWRM.js → unary-EIEhcF.js} +46 -0
  5. package/dist/_chunk/{zip-DxZJSH.js → zipWith-ChDTPy.js} +76 -0
  6. package/dist/array/index.js +57 -126
  7. package/dist/browser.global.js +1 -1
  8. package/dist/browser.global.js.map +1 -1
  9. package/dist/compat/compat.d.mts +301 -0
  10. package/dist/compat/compat.d.ts +301 -0
  11. package/dist/compat/compat.mjs +303 -0
  12. package/dist/compat/function/partial.d.mts +575 -0
  13. package/dist/compat/function/partial.d.ts +575 -0
  14. package/dist/compat/function/partial.mjs +8 -0
  15. package/dist/compat/function/partialRight.d.mts +651 -0
  16. package/dist/compat/function/partialRight.d.ts +651 -0
  17. package/dist/compat/function/partialRight.mjs +8 -0
  18. package/dist/compat/index.d.mts +10 -18
  19. package/dist/compat/index.d.ts +10 -18
  20. package/dist/compat/index.js +280 -4043
  21. package/dist/compat/index.mjs +12 -18
  22. package/dist/compat/toolkit.d.mts +9 -0
  23. package/dist/compat/toolkit.d.ts +9 -0
  24. package/dist/compat/toolkit.mjs +10 -0
  25. package/dist/function/index.js +3 -4
  26. package/dist/function/partial.d.mts +3 -3
  27. package/dist/function/partial.d.ts +3 -3
  28. package/dist/function/partial.mjs +17 -19
  29. package/dist/function/partialRight.d.mts +3 -3
  30. package/dist/function/partialRight.d.ts +3 -3
  31. package/dist/function/partialRight.mjs +18 -20
  32. package/dist/index.js +84 -87
  33. package/dist/object/index.js +15 -15
  34. package/dist/object/toCamelCaseKeys.mjs +3 -0
  35. package/dist/object/toSnakeCaseKeys.mjs +3 -0
  36. package/dist/predicate/index.js +4 -5
  37. package/dist/string/index.js +7 -8
  38. package/package.json +1 -1
  39. package/dist/_chunk/isPlainObject-Xaozpc.js +0 -93
  40. package/dist/_chunk/partialRight-B0_CSB.js +0 -50
  41. package/dist/_chunk/snakeCase-BtVEeB.js +0 -75
  42. package/dist/_chunk/toSnakeCaseKeys-BNpS71.js +0 -569
  43. package/dist/compat/_internal/copyArray.mjs +0 -12
  44. package/dist/compat/array/flatMap.d.mts +0 -20
  45. package/dist/compat/array/flatMap.d.ts +0 -20
  46. package/dist/compat/array/flatMap.mjs +0 -13
  47. package/dist/compat/array/forEachRight.d.mts +0 -106
  48. package/dist/compat/array/forEachRight.d.ts +0 -106
  49. package/dist/compat/array/forEachRight.mjs +0 -21
  50. package/dist/compat/array/partition.d.mts +0 -65
  51. package/dist/compat/array/partition.d.ts +0 -65
  52. package/dist/compat/array/partition.mjs +0 -24
  53. package/dist/compat/array/pullAllWith.d.mts +0 -59
  54. package/dist/compat/array/pullAllWith.d.ts +0 -59
  55. package/dist/compat/array/pullAllWith.mjs +0 -33
  56. package/dist/compat/array/pullAt.d.mts +0 -32
  57. package/dist/compat/array/pullAt.d.ts +0 -32
  58. package/dist/compat/array/pullAt.mjs +0 -34
  59. package/dist/compat/array/zipObject.d.mts +0 -49
  60. package/dist/compat/array/zipObject.d.ts +0 -49
  61. package/dist/compat/array/zipObject.mjs +0 -11
  62. package/dist/compat/array/zipWith.d.mts +0 -92
  63. package/dist/compat/array/zipWith.d.ts +0 -92
  64. package/dist/compat/array/zipWith.mjs +0 -20
  65. package/dist/compat/object/at.d.mts +0 -19
  66. package/dist/compat/object/at.d.ts +0 -19
  67. package/dist/compat/object/at.mjs +0 -27
  68. package/dist/compat/object/forIn.d.mts +0 -58
  69. package/dist/compat/object/forIn.d.ts +0 -58
  70. package/dist/compat/object/forIn.mjs +0 -16
  71. package/dist/compat/object/forInRight.d.mts +0 -58
  72. package/dist/compat/object/forInRight.d.ts +0 -58
  73. package/dist/compat/object/forInRight.mjs +0 -21
  74. package/dist/compat/object/forOwn.d.mts +0 -54
  75. package/dist/compat/object/forOwn.d.ts +0 -54
  76. package/dist/compat/object/forOwn.mjs +0 -19
  77. package/dist/compat/object/forOwnRight.d.mts +0 -54
  78. package/dist/compat/object/forOwnRight.d.ts +0 -54
  79. package/dist/compat/object/forOwnRight.mjs +0 -19
  80. package/dist/compat/object/hasIn.d.mts +0 -40
  81. package/dist/compat/object/hasIn.d.ts +0 -40
  82. package/dist/compat/object/hasIn.mjs +0 -34
  83. package/dist/compat/string/split.d.mts +0 -19
  84. package/dist/compat/string/split.d.ts +0 -19
  85. package/dist/compat/string/split.mjs +0 -7
  86. package/dist/compat/util/overEvery.d.mts +0 -67
  87. package/dist/compat/util/overEvery.d.ts +0 -67
  88. package/dist/compat/util/overEvery.mjs +0 -23
  89. package/dist/compat/util/overSome.d.mts +0 -69
  90. package/dist/compat/util/overSome.d.ts +0 -69
  91. package/dist/compat/util/overSome.mjs +0 -23
@@ -1,3791 +1,44 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
4
 
5
- const zip$1 = require('../_chunk/zip-DxZJSH.js');
5
+ const zipWith = require('../_chunk/zipWith-ChDTPy.js');
6
6
  const AbortError = require('../_chunk/AbortError-Cg4ZQ1.js');
7
7
  const error_index = require('../error/index.js');
8
- const unary = require('../_chunk/unary-BsNWRM.js');
8
+ const unary = require('../_chunk/unary-EIEhcF.js');
9
9
  const noop = require('../_chunk/noop-2IwLUk.js');
10
- const partialRight = require('../_chunk/partialRight-B0_CSB.js');
11
- const range$1 = require('../_chunk/range-HnEIT7.js');
10
+ const range = require('../_chunk/range-HnEIT7.js');
12
11
  const randomInt = require('../_chunk/randomInt-CF7bZK.js');
13
- const toSnakeCaseKeys = require('../_chunk/toSnakeCaseKeys-BNpS71.js');
14
- const isPlainObject = require('../_chunk/isPlainObject-Xaozpc.js');
15
- const isPromise = require('../_chunk/isPromise-ByAybB.js');
12
+ const compat_index = require('../_chunk/toSnakeCaseKeys-DCXJ3Q.js');
13
+ const isPromise = require('../_chunk/isPromise-BqEEYJ.js');
16
14
  const promise_index = require('../promise/index.js');
17
- const snakeCase$1 = require('../_chunk/snakeCase-BtVEeB.js');
18
- const reverseString = require('../_chunk/reverseString-D-wK2p.js');
15
+ const reverseString = require('../_chunk/reverseString-BixeGz.js');
19
16
  const invariant = require('../_chunk/invariant-BfGFfr.js');
20
17
 
21
- function castArray(value) {
22
- if (arguments.length === 0) {
23
- return [];
24
- }
25
- return Array.isArray(value) ? value : [value];
26
- }
27
18
 
28
- function toArray$1(value) {
29
- return Array.isArray(value) ? value : Array.from(value);
30
- }
31
19
 
32
- function isArrayLike(value) {
33
- return value != null && typeof value !== 'function' && isPromise.isLength(value.length);
34
- }
35
-
36
- function chunk(arr, size = 1) {
37
- size = Math.max(Math.floor(size), 0);
38
- if (size === 0 || !isArrayLike(arr)) {
39
- return [];
40
- }
41
- return zip$1.chunk(toArray$1(arr), size);
42
- }
43
-
44
- function compact(arr) {
45
- if (!isArrayLike(arr)) {
46
- return [];
47
- }
48
- return zip$1.compact(Array.from(arr));
49
- }
50
-
51
- function concat(...values) {
52
- return zip$1.flatten(values);
53
- }
54
-
55
- function isArrayLikeObject(value) {
56
- return toSnakeCaseKeys.isObjectLike(value) && isArrayLike(value);
57
- }
58
-
59
- function difference(arr, ...values) {
60
- if (!isArrayLikeObject(arr)) {
61
- return [];
62
- }
63
- const arr1 = toArray$1(arr);
64
- const arr2 = [];
65
- for (let i = 0; i < values.length; i++) {
66
- const value = values[i];
67
- if (isArrayLikeObject(value)) {
68
- arr2.push(...Array.from(value));
69
- }
70
- }
71
- return zip$1.difference(arr1, arr2);
72
- }
73
-
74
- function last(array) {
75
- if (!isArrayLike(array)) {
76
- return undefined;
77
- }
78
- return zip$1.last(toArray$1(array));
79
- }
80
-
81
- function flattenArrayLike(values) {
82
- const result = [];
83
- for (let i = 0; i < values.length; i++) {
84
- const arrayLike = values[i];
85
- if (!isArrayLikeObject(arrayLike)) {
86
- continue;
87
- }
88
- for (let j = 0; j < arrayLike.length; j++) {
89
- result.push(arrayLike[j]);
90
- }
91
- }
92
- return result;
93
- }
94
-
95
- function isDeepKey(key) {
96
- switch (typeof key) {
97
- case 'number':
98
- case 'symbol': {
99
- return false;
100
- }
101
- case 'string': {
102
- return key.includes('.') || key.includes('[') || key.includes(']');
103
- }
104
- }
105
- }
106
-
107
- function toKey(value) {
108
- if (typeof value === 'string' || typeof value === 'symbol') {
109
- return value;
110
- }
111
- if (Object.is(value?.valueOf?.(), -0)) {
112
- return '-0';
113
- }
114
- return String(value);
115
- }
116
-
117
- function toPath(deepKey) {
118
- const result = [];
119
- const length = deepKey.length;
120
- if (length === 0) {
121
- return result;
122
- }
123
- let index = 0;
124
- let key = '';
125
- let quoteChar = '';
126
- let bracket = false;
127
- if (deepKey.charCodeAt(0) === 46) {
128
- result.push('');
129
- index++;
130
- }
131
- while (index < length) {
132
- const char = deepKey[index];
133
- if (quoteChar) {
134
- if (char === '\\' && index + 1 < length) {
135
- index++;
136
- key += deepKey[index];
137
- }
138
- else if (char === quoteChar) {
139
- quoteChar = '';
140
- }
141
- else {
142
- key += char;
143
- }
144
- }
145
- else if (bracket) {
146
- if (char === '"' || char === "'") {
147
- quoteChar = char;
148
- }
149
- else if (char === ']') {
150
- bracket = false;
151
- result.push(key);
152
- key = '';
153
- }
154
- else {
155
- key += char;
156
- }
157
- }
158
- else {
159
- if (char === '[') {
160
- bracket = true;
161
- if (key) {
162
- result.push(key);
163
- key = '';
164
- }
165
- }
166
- else if (char === '.') {
167
- if (key) {
168
- result.push(key);
169
- key = '';
170
- }
171
- }
172
- else {
173
- key += char;
174
- }
175
- }
176
- index++;
177
- }
178
- if (key) {
179
- result.push(key);
180
- }
181
- return result;
182
- }
183
-
184
- function get(object, path, defaultValue) {
185
- if (object == null) {
186
- return defaultValue;
187
- }
188
- switch (typeof path) {
189
- case 'string': {
190
- const result = object[path];
191
- if (result === undefined) {
192
- if (isDeepKey(path)) {
193
- return get(object, toPath(path), defaultValue);
194
- }
195
- else {
196
- return defaultValue;
197
- }
198
- }
199
- return result;
200
- }
201
- case 'number':
202
- case 'symbol': {
203
- if (typeof path === 'number') {
204
- path = toKey(path);
205
- }
206
- const result = object[path];
207
- if (result === undefined) {
208
- return defaultValue;
209
- }
210
- return result;
211
- }
212
- default: {
213
- if (Array.isArray(path)) {
214
- return getWithPath(object, path, defaultValue);
215
- }
216
- if (Object.is(path?.valueOf(), -0)) {
217
- path = '-0';
218
- }
219
- else {
220
- path = String(path);
221
- }
222
- const result = object[path];
223
- if (result === undefined) {
224
- return defaultValue;
225
- }
226
- return result;
227
- }
228
- }
229
- }
230
- function getWithPath(object, path, defaultValue) {
231
- if (path.length === 0) {
232
- return defaultValue;
233
- }
234
- let current = object;
235
- for (let index = 0; index < path.length; index++) {
236
- if (current == null) {
237
- return defaultValue;
238
- }
239
- current = current[path[index]];
240
- }
241
- if (current === undefined) {
242
- return defaultValue;
243
- }
244
- return current;
245
- }
246
-
247
- function property(path) {
248
- return function (object) {
249
- return get(object, path);
250
- };
251
- }
252
-
253
- function isObject(value) {
254
- return value !== null && (typeof value === 'object' || typeof value === 'function');
255
- }
256
-
257
- function isMatch(target, source) {
258
- if (source === target) {
259
- return true;
260
- }
261
- switch (typeof source) {
262
- case 'object': {
263
- if (source == null) {
264
- return true;
265
- }
266
- const keys = Object.keys(source);
267
- if (target == null) {
268
- return keys.length === 0;
269
- }
270
- if (Array.isArray(source)) {
271
- return isArrayMatch(target, source);
272
- }
273
- if (source instanceof Map) {
274
- return isMapMatch(target, source);
275
- }
276
- if (source instanceof Set) {
277
- return isSetMatch(target, source);
278
- }
279
- for (let i = 0; i < keys.length; i++) {
280
- const key = keys[i];
281
- if (!isPlainObject.isPrimitive(target) && !(key in target)) {
282
- return false;
283
- }
284
- if (source[key] === undefined && target[key] !== undefined) {
285
- return false;
286
- }
287
- if (source[key] === null && target[key] !== null) {
288
- return false;
289
- }
290
- if (!isMatch(target[key], source[key])) {
291
- return false;
292
- }
293
- }
294
- return true;
295
- }
296
- case 'function': {
297
- if (Object.keys(source).length > 0) {
298
- return isMatch(target, { ...source });
299
- }
300
- return false;
301
- }
302
- default: {
303
- if (!isObject(target)) {
304
- return isPromise.eq(target, source);
305
- }
306
- return !source;
307
- }
308
- }
309
- }
310
- function isMapMatch(target, source) {
311
- if (source.size === 0) {
312
- return true;
313
- }
314
- if (!(target instanceof Map)) {
315
- return false;
316
- }
317
- for (const [key, value] of source.entries()) {
318
- if (!isMatch(target.get(key), value)) {
319
- return false;
320
- }
321
- }
322
- return true;
323
- }
324
- function isArrayMatch(target, source) {
325
- if (source.length === 0) {
326
- return true;
327
- }
328
- if (!Array.isArray(target)) {
329
- return false;
330
- }
331
- const countedIndex = new Set();
332
- for (let i = 0; i < source.length; i++) {
333
- const sourceItem = source[i];
334
- const index = target.findIndex((targetItem, index) => {
335
- return isMatch(targetItem, sourceItem) && !countedIndex.has(index);
336
- });
337
- if (index === -1) {
338
- return false;
339
- }
340
- countedIndex.add(index);
341
- }
342
- return true;
343
- }
344
- function isSetMatch(target, source) {
345
- if (source.size === 0) {
346
- return true;
347
- }
348
- if (!(target instanceof Set)) {
349
- return false;
350
- }
351
- return isArrayMatch([...target], [...source]);
352
- }
353
-
354
- function matches(source) {
355
- source = toSnakeCaseKeys.cloneDeep(source);
356
- return (target) => {
357
- return isMatch(target, source);
358
- };
359
- }
360
-
361
- function cloneDeepWith(obj, cloneValue) {
362
- return toSnakeCaseKeys.cloneDeepWith(obj, (value, key, object, stack) => {
363
- const cloned = cloneValue?.(value, key, object, stack);
364
- if (cloned != null) {
365
- return cloned;
366
- }
367
- if (typeof obj !== 'object') {
368
- return undefined;
369
- }
370
- switch (Object.prototype.toString.call(obj)) {
371
- case isPlainObject.numberTag:
372
- case isPlainObject.stringTag:
373
- case isPlainObject.booleanTag: {
374
- const result = new obj.constructor(obj?.valueOf());
375
- toSnakeCaseKeys.copyProperties(result, obj);
376
- return result;
377
- }
378
- case isPlainObject.argumentsTag: {
379
- const result = {};
380
- toSnakeCaseKeys.copyProperties(result, obj);
381
- result.length = obj.length;
382
- result[Symbol.iterator] = obj[Symbol.iterator];
383
- return result;
384
- }
385
- default: {
386
- return undefined;
387
- }
388
- }
389
- });
390
- }
391
-
392
- function cloneDeep(obj) {
393
- return cloneDeepWith(obj);
394
- }
395
-
396
- const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
397
- function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
398
- switch (typeof value) {
399
- case 'number': {
400
- return Number.isInteger(value) && value >= 0 && value < length;
401
- }
402
- case 'symbol': {
403
- return false;
404
- }
405
- case 'string': {
406
- return IS_UNSIGNED_INTEGER.test(value);
407
- }
408
- }
409
- }
410
-
411
- function isArguments(value) {
412
- return value !== null && typeof value === 'object' && isPlainObject.getTag(value) === '[object Arguments]';
413
- }
414
-
415
- function has(object, path) {
416
- let resolvedPath;
417
- if (Array.isArray(path)) {
418
- resolvedPath = path;
419
- }
420
- else if (typeof path === 'string' && isDeepKey(path) && object?.[path] == null) {
421
- resolvedPath = toPath(path);
422
- }
423
- else {
424
- resolvedPath = [path];
425
- }
426
- if (resolvedPath.length === 0) {
427
- return false;
428
- }
429
- let current = object;
430
- for (let i = 0; i < resolvedPath.length; i++) {
431
- const key = resolvedPath[i];
432
- if (current == null || !Object.hasOwn(current, key)) {
433
- const isSparseIndex = (Array.isArray(current) || isArguments(current)) && isIndex(key) && key < current.length;
434
- if (!isSparseIndex) {
435
- return false;
436
- }
437
- }
438
- current = current[key];
439
- }
440
- return true;
441
- }
442
-
443
- function matchesProperty(property, source) {
444
- switch (typeof property) {
445
- case 'object': {
446
- if (Object.is(property?.valueOf(), -0)) {
447
- property = '-0';
448
- }
449
- break;
450
- }
451
- case 'number': {
452
- property = toKey(property);
453
- break;
454
- }
455
- }
456
- source = cloneDeep(source);
457
- return function (target) {
458
- const result = get(target, property);
459
- if (result === undefined) {
460
- return has(target, property);
461
- }
462
- if (source === undefined) {
463
- return result === undefined;
464
- }
465
- return isMatch(result, source);
466
- };
467
- }
468
-
469
- function iteratee(value) {
470
- if (value == null) {
471
- return unary.identity;
472
- }
473
- switch (typeof value) {
474
- case 'function': {
475
- return value;
476
- }
477
- case 'object': {
478
- if (Array.isArray(value) && value.length === 2) {
479
- return matchesProperty(value[0], value[1]);
480
- }
481
- return matches(value);
482
- }
483
- case 'string':
484
- case 'symbol':
485
- case 'number': {
486
- return property(value);
487
- }
488
- }
489
- }
490
-
491
- function differenceBy(arr, ..._values) {
492
- if (!isArrayLikeObject(arr)) {
493
- return [];
494
- }
495
- const iteratee$1 = last(_values);
496
- const values = flattenArrayLike(_values);
497
- if (isArrayLikeObject(iteratee$1)) {
498
- return zip$1.difference(Array.from(arr), values);
499
- }
500
- return zip$1.differenceBy(Array.from(arr), values, iteratee(iteratee$1));
501
- }
502
-
503
- function differenceWith(array, ...values) {
504
- if (!isArrayLikeObject(array)) {
505
- return [];
506
- }
507
- const comparator = last(values);
508
- const flattenedValues = flattenArrayLike(values);
509
- if (typeof comparator === 'function') {
510
- return zip$1.differenceWith(Array.from(array), flattenedValues, comparator);
511
- }
512
- return zip$1.difference(Array.from(array), flattenedValues);
513
- }
514
-
515
- function isSymbol(value) {
516
- return typeof value === 'symbol' || value instanceof Symbol;
517
- }
518
-
519
- function toNumber(value) {
520
- if (isSymbol(value)) {
521
- return NaN;
522
- }
523
- return Number(value);
524
- }
525
-
526
- function toFinite(value) {
527
- if (!value) {
528
- return value === 0 ? value : 0;
529
- }
530
- value = toNumber(value);
531
- if (value === Infinity || value === -Infinity) {
532
- const sign = value < 0 ? -1 : 1;
533
- return sign * Number.MAX_VALUE;
534
- }
535
- return value === value ? value : 0;
536
- }
537
-
538
- function toInteger(value) {
539
- const finite = toFinite(value);
540
- const remainder = finite % 1;
541
- return remainder ? finite - remainder : finite;
542
- }
543
-
544
- function drop(collection, itemsCount = 1, guard) {
545
- if (!isArrayLike(collection)) {
546
- return [];
547
- }
548
- itemsCount = guard ? 1 : toInteger(itemsCount);
549
- return zip$1.drop(toArray$1(collection), itemsCount);
550
- }
551
-
552
- function dropRight(collection, itemsCount = 1, guard) {
553
- if (!isArrayLike(collection)) {
554
- return [];
555
- }
556
- itemsCount = guard ? 1 : toInteger(itemsCount);
557
- return zip$1.dropRight(toArray$1(collection), itemsCount);
558
- }
559
-
560
- function dropRightWhile(arr, predicate) {
561
- if (!isArrayLike(arr)) {
562
- return [];
563
- }
564
- return dropRightWhileImpl(Array.from(arr), predicate);
565
- }
566
- function dropRightWhileImpl(arr, predicate) {
567
- switch (typeof predicate) {
568
- case 'function': {
569
- return zip$1.dropRightWhile(arr, (item, index, arr) => Boolean(predicate(item, index, arr)));
570
- }
571
- case 'object': {
572
- if (Array.isArray(predicate) && predicate.length === 2) {
573
- const key = predicate[0];
574
- const value = predicate[1];
575
- return zip$1.dropRightWhile(arr, matchesProperty(key, value));
576
- }
577
- else {
578
- return zip$1.dropRightWhile(arr, matches(predicate));
579
- }
580
- }
581
- case 'symbol':
582
- case 'number':
583
- case 'string': {
584
- return zip$1.dropRightWhile(arr, property(predicate));
585
- }
586
- }
587
- }
588
-
589
- function dropWhile(arr, predicate) {
590
- if (!isArrayLike(arr)) {
591
- return [];
592
- }
593
- return dropWhileImpl(toArray$1(arr), predicate);
594
- }
595
- function dropWhileImpl(arr, predicate) {
596
- switch (typeof predicate) {
597
- case 'function': {
598
- return zip$1.dropWhile(arr, (item, index, arr) => Boolean(predicate(item, index, arr)));
599
- }
600
- case 'object': {
601
- if (Array.isArray(predicate) && predicate.length === 2) {
602
- const key = predicate[0];
603
- const value = predicate[1];
604
- return zip$1.dropWhile(arr, matchesProperty(key, value));
605
- }
606
- else {
607
- return zip$1.dropWhile(arr, matches(predicate));
608
- }
609
- }
610
- case 'number':
611
- case 'symbol':
612
- case 'string': {
613
- return zip$1.dropWhile(arr, property(predicate));
614
- }
615
- }
616
- }
617
-
618
- function isIterateeCall(value, index, object) {
619
- if (!isObject(object)) {
620
- return false;
621
- }
622
- if ((typeof index === 'number' && isArrayLike(object) && isIndex(index) && index < object.length) ||
623
- (typeof index === 'string' && index in object)) {
624
- return isPromise.eq(object[index], value);
625
- }
626
- return false;
627
- }
628
-
629
- function every(source, doesMatch, guard) {
630
- if (!source) {
631
- return true;
632
- }
633
- const values = Array.isArray(source) ? source : Object.values(source);
634
- if (guard && isIterateeCall(source, doesMatch, guard)) {
635
- doesMatch = undefined;
636
- }
637
- if (!doesMatch) {
638
- doesMatch = unary.identity;
639
- }
640
- switch (typeof doesMatch) {
641
- case 'function': {
642
- if (!Array.isArray(source)) {
643
- const keys = Object.keys(source);
644
- for (let i = 0; i < keys.length; i++) {
645
- const key = keys[i];
646
- const value = source[key];
647
- if (!doesMatch(value, key, source)) {
648
- return false;
649
- }
650
- }
651
- return true;
652
- }
653
- return values.every(doesMatch);
654
- }
655
- case 'object': {
656
- if (Array.isArray(doesMatch) && doesMatch.length === 2) {
657
- const key = doesMatch[0];
658
- const value = doesMatch[1];
659
- return values.every(matchesProperty(key, value));
660
- }
661
- else {
662
- return values.every(matches(doesMatch));
663
- }
664
- }
665
- case 'symbol':
666
- case 'number':
667
- case 'string': {
668
- return values.every(property(doesMatch));
669
- }
670
- }
671
- }
672
-
673
- function isString(value) {
674
- return typeof value === 'string' || value instanceof String;
675
- }
676
-
677
- function fill(array, value, start = 0, end = array ? array.length : 0) {
678
- if (!isArrayLike(array)) {
679
- return [];
680
- }
681
- if (isString(array)) {
682
- return array;
683
- }
684
- start = Math.floor(start);
685
- end = Math.floor(end);
686
- if (!start) {
687
- start = 0;
688
- }
689
- if (!end) {
690
- end = 0;
691
- }
692
- return zip$1.fill(array, value, start, end);
693
- }
694
-
695
- function filter(source, predicate) {
696
- if (!source) {
697
- return [];
698
- }
699
- const collection = toSnakeCaseKeys.isArray(source) ? source : Object.values(source);
700
- predicate = iteratee(predicate);
701
- if (!Array.isArray(source)) {
702
- const result = [];
703
- const keys = Object.keys(source);
704
- const length = isArrayLike(source) ? source.length : keys.length;
705
- for (let i = 0; i < length; i++) {
706
- const key = keys[i];
707
- const value = source[key];
708
- if (predicate(value, key, source)) {
709
- result.push(value);
710
- }
711
- }
712
- return result;
713
- }
714
- return collection.filter(predicate);
715
- }
716
-
717
- function find(source, _doesMatch, fromIndex = 0) {
718
- if (!source) {
719
- return undefined;
720
- }
721
- if (fromIndex < 0) {
722
- fromIndex = Math.max(source.length + fromIndex, 0);
723
- }
724
- const doesMatch = iteratee(_doesMatch);
725
- if (typeof doesMatch === 'function' && !Array.isArray(source)) {
726
- const keys = Object.keys(source);
727
- for (let i = fromIndex; i < keys.length; i++) {
728
- const key = keys[i];
729
- const value = source[key];
730
- if (doesMatch(value, key, source)) {
731
- return value;
732
- }
733
- }
734
- return undefined;
735
- }
736
- const values = Array.isArray(source) ? source.slice(fromIndex) : Object.values(source).slice(fromIndex);
737
- return values.find(doesMatch);
738
- }
739
-
740
- function findIndex(arr, doesMatch, fromIndex = 0) {
741
- if (!arr) {
742
- return -1;
743
- }
744
- if (fromIndex < 0) {
745
- fromIndex = Math.max(arr.length + fromIndex, 0);
746
- }
747
- const subArray = Array.from(arr).slice(fromIndex);
748
- let index = -1;
749
- switch (typeof doesMatch) {
750
- case 'function': {
751
- index = subArray.findIndex(doesMatch);
752
- break;
753
- }
754
- case 'object': {
755
- if (Array.isArray(doesMatch) && doesMatch.length === 2) {
756
- const key = doesMatch[0];
757
- const value = doesMatch[1];
758
- index = subArray.findIndex(matchesProperty(key, value));
759
- }
760
- else {
761
- index = subArray.findIndex(matches(doesMatch));
762
- }
763
- break;
764
- }
765
- case 'number':
766
- case 'symbol':
767
- case 'string': {
768
- index = subArray.findIndex(property(doesMatch));
769
- }
770
- }
771
- return index === -1 ? -1 : index + fromIndex;
772
- }
773
-
774
- function findLast(source, _doesMatch, fromIndex) {
775
- if (!source) {
776
- return undefined;
777
- }
778
- const length = Array.isArray(source) ? source.length : Object.keys(source).length;
779
- fromIndex = toInteger(fromIndex ?? length - 1);
780
- if (fromIndex < 0) {
781
- fromIndex = Math.max(length + fromIndex, 0);
782
- }
783
- else {
784
- fromIndex = Math.min(fromIndex, length - 1);
785
- }
786
- const doesMatch = iteratee(_doesMatch);
787
- if (typeof doesMatch === 'function' && !Array.isArray(source)) {
788
- const keys = Object.keys(source);
789
- for (let i = fromIndex; i >= 0; i--) {
790
- const key = keys[i];
791
- const value = source[key];
792
- if (doesMatch(value, key, source)) {
793
- return value;
794
- }
795
- }
796
- return undefined;
797
- }
798
- const values = Array.isArray(source) ? source.slice(0, fromIndex + 1) : Object.values(source).slice(0, fromIndex + 1);
799
- return values.findLast(doesMatch);
800
- }
801
-
802
- function findLastIndex(arr, doesMatch, fromIndex = arr ? arr.length - 1 : 0) {
803
- if (!arr) {
804
- return -1;
805
- }
806
- if (fromIndex < 0) {
807
- fromIndex = Math.max(arr.length + fromIndex, 0);
808
- }
809
- else {
810
- fromIndex = Math.min(fromIndex, arr.length - 1);
811
- }
812
- const subArray = toArray$1(arr).slice(0, fromIndex + 1);
813
- switch (typeof doesMatch) {
814
- case 'function': {
815
- return subArray.findLastIndex(doesMatch);
816
- }
817
- case 'object': {
818
- if (Array.isArray(doesMatch) && doesMatch.length === 2) {
819
- const key = doesMatch[0];
820
- const value = doesMatch[1];
821
- return subArray.findLastIndex(matchesProperty(key, value));
822
- }
823
- else {
824
- return subArray.findLastIndex(matches(doesMatch));
825
- }
826
- }
827
- case 'number':
828
- case 'symbol':
829
- case 'string': {
830
- return subArray.findLastIndex(property(doesMatch));
831
- }
832
- }
833
- }
834
-
835
- function flatten(value, depth = 1) {
836
- const result = [];
837
- const flooredDepth = Math.floor(depth);
838
- if (!isArrayLike(value)) {
839
- return result;
840
- }
841
- const recursive = (arr, currentDepth) => {
842
- for (let i = 0; i < arr.length; i++) {
843
- const item = arr[i];
844
- if (currentDepth < flooredDepth &&
845
- (Array.isArray(item) ||
846
- Boolean(item?.[Symbol.isConcatSpreadable]) ||
847
- (item !== null && typeof item === 'object' && Object.prototype.toString.call(item) === '[object Arguments]'))) {
848
- if (Array.isArray(item)) {
849
- recursive(item, currentDepth + 1);
850
- }
851
- else {
852
- recursive(Array.from(item), currentDepth + 1);
853
- }
854
- }
855
- else {
856
- result.push(item);
857
- }
858
- }
859
- };
860
- recursive(Array.from(value), 0);
861
- return result;
862
- }
863
-
864
- function map(collection, _iteratee) {
865
- if (!collection) {
866
- return [];
867
- }
868
- const keys = isArrayLike(collection) || Array.isArray(collection) ? range$1.range(0, collection.length) : Object.keys(collection);
869
- const iteratee$1 = iteratee(_iteratee ?? unary.identity);
870
- const result = new Array(keys.length);
871
- for (let i = 0; i < keys.length; i++) {
872
- const key = keys[i];
873
- const value = collection[key];
874
- result[i] = iteratee$1(value, key, collection);
875
- }
876
- return result;
877
- }
878
-
879
- function flatMap(collection, iteratee) {
880
- if (isPromise.isNil(collection)) {
881
- return [];
882
- }
883
- const mapped = isPromise.isNil(iteratee) ? map(collection) : map(collection, iteratee);
884
- return flatten(mapped, 1);
885
- }
886
-
887
- function flattenDeep(value) {
888
- return flatten(value, Infinity);
889
- }
890
-
891
- function flattenDepth(value, depth = 1) {
892
- return flatten(value, depth);
893
- }
894
-
895
- function forEach(collection, callback = unary.identity) {
896
- if (!collection) {
897
- return collection;
898
- }
899
- const keys = isArrayLike(collection) || Array.isArray(collection) ? range$1.range(0, collection.length) : Object.keys(collection);
900
- for (let i = 0; i < keys.length; i++) {
901
- const key = keys[i];
902
- const value = collection[key];
903
- const result = callback(value, key, collection);
904
- if (result === false) {
905
- break;
906
- }
907
- }
908
- return collection;
909
- }
910
-
911
- function forEachRight(collection, callback = unary.identity) {
912
- if (!collection) {
913
- return collection;
914
- }
915
- const keys = isArrayLike(collection) ? range$1.range(0, collection.length) : Object.keys(collection);
916
- for (let i = keys.length - 1; i >= 0; i--) {
917
- const key = keys[i];
918
- const value = collection[key];
919
- const result = callback(value, key, collection);
920
- if (result === false) {
921
- break;
922
- }
923
- }
924
- return collection;
925
- }
926
-
927
- function head(arr) {
928
- if (!isArrayLike(arr)) {
929
- return undefined;
930
- }
931
- return zip$1.head(toArray$1(arr));
932
- }
933
-
934
- function includes(source, target, fromIndex, guard) {
935
- if (source == null) {
936
- return false;
937
- }
938
- if (guard || !fromIndex) {
939
- fromIndex = 0;
940
- }
941
- else {
942
- fromIndex = toInteger(fromIndex);
943
- }
944
- if (isString(source)) {
945
- if (fromIndex > source.length || target instanceof RegExp) {
946
- return false;
947
- }
948
- if (fromIndex < 0) {
949
- fromIndex = Math.max(0, source.length + fromIndex);
950
- }
951
- return source.includes(target, fromIndex);
952
- }
953
- if (Array.isArray(source)) {
954
- return source.includes(target, fromIndex);
955
- }
956
- const keys = Object.keys(source);
957
- if (fromIndex < 0) {
958
- fromIndex = Math.max(0, keys.length + fromIndex);
959
- }
960
- for (let i = fromIndex; i < keys.length; i++) {
961
- const value = Reflect.get(source, keys[i]);
962
- if (isPromise.eq(value, target)) {
963
- return true;
964
- }
965
- }
966
- return false;
967
- }
968
-
969
- function indexOf(array, searchElement, fromIndex) {
970
- if (!isArrayLike(array)) {
971
- return -1;
972
- }
973
- if (Number.isNaN(searchElement)) {
974
- fromIndex = fromIndex ?? 0;
975
- if (fromIndex < 0) {
976
- fromIndex = Math.max(0, array.length + fromIndex);
977
- }
978
- for (let i = fromIndex; i < array.length; i++) {
979
- if (Number.isNaN(array[i])) {
980
- return i;
981
- }
982
- }
983
- return -1;
984
- }
985
- return Array.from(array).indexOf(searchElement, fromIndex);
986
- }
987
-
988
- function intersection(...arrays) {
989
- if (arrays.length === 0) {
990
- return [];
991
- }
992
- if (!isArrayLikeObject(arrays[0])) {
993
- return [];
994
- }
995
- let result = zip$1.uniq(Array.from(arrays[0]));
996
- for (let i = 1; i < arrays.length; i++) {
997
- const array = arrays[i];
998
- if (!isArrayLikeObject(array)) {
999
- return [];
1000
- }
1001
- result = zip$1.intersection(result, Array.from(array));
1002
- }
1003
- return result;
1004
- }
1005
-
1006
- function intersectionBy(array, ...values) {
1007
- if (!isArrayLikeObject(array)) {
1008
- return [];
1009
- }
1010
- const lastValue = zip$1.last(values);
1011
- if (lastValue === undefined) {
1012
- return Array.from(array);
1013
- }
1014
- let result = zip$1.uniq(Array.from(array));
1015
- const count = isArrayLikeObject(lastValue) ? values.length : values.length - 1;
1016
- for (let i = 0; i < count; ++i) {
1017
- const value = values[i];
1018
- if (!isArrayLikeObject(value)) {
1019
- return [];
1020
- }
1021
- if (isArrayLikeObject(lastValue)) {
1022
- result = zip$1.intersectionBy(result, Array.from(value), unary.identity);
1023
- }
1024
- else if (typeof lastValue === 'function') {
1025
- result = zip$1.intersectionBy(result, Array.from(value), value => lastValue(value));
1026
- }
1027
- else if (typeof lastValue === 'string') {
1028
- result = zip$1.intersectionBy(result, Array.from(value), property(lastValue));
1029
- }
1030
- }
1031
- return result;
1032
- }
1033
-
1034
- function uniq(arr) {
1035
- if (!isArrayLike(arr)) {
1036
- return [];
1037
- }
1038
- return zip$1.uniq(Array.from(arr));
1039
- }
1040
-
1041
- function intersectionWith(firstArr, ...otherArrs) {
1042
- if (firstArr == null) {
1043
- return [];
1044
- }
1045
- const _comparator = last(otherArrs);
1046
- let comparator = isPromise.eq;
1047
- let uniq$1 = uniq;
1048
- if (typeof _comparator === 'function') {
1049
- comparator = _comparator;
1050
- uniq$1 = uniqPreserve0;
1051
- otherArrs.pop();
1052
- }
1053
- let result = uniq$1(Array.from(firstArr));
1054
- for (let i = 0; i < otherArrs.length; ++i) {
1055
- const otherArr = otherArrs[i];
1056
- if (otherArr == null) {
1057
- return [];
1058
- }
1059
- result = zip$1.intersectionWith(result, Array.from(otherArr), comparator);
1060
- }
1061
- return result;
1062
- }
1063
- function uniqPreserve0(arr) {
1064
- const result = [];
1065
- const added = new Set();
1066
- for (let i = 0; i < arr.length; i++) {
1067
- const item = arr[i];
1068
- if (added.has(item)) {
1069
- continue;
1070
- }
1071
- result.push(item);
1072
- added.add(item);
1073
- }
1074
- return result;
1075
- }
1076
-
1077
- function join(array, separator = ',') {
1078
- if (!isArrayLike(array)) {
1079
- return '';
1080
- }
1081
- return Array.from(array).join(separator);
1082
- }
1083
-
1084
- function lastIndexOf(array, searchElement, fromIndex) {
1085
- if (!isArrayLike(array) || array.length === 0) {
1086
- return -1;
1087
- }
1088
- const length = array.length;
1089
- let index = fromIndex ?? length - 1;
1090
- if (fromIndex != null) {
1091
- index = index < 0 ? Math.max(length + index, 0) : Math.min(index, length - 1);
1092
- }
1093
- if (Number.isNaN(searchElement)) {
1094
- for (let i = index; i >= 0; i--) {
1095
- if (Number.isNaN(array[i])) {
1096
- return i;
1097
- }
1098
- }
1099
- }
1100
- return Array.from(array).lastIndexOf(searchElement, index);
1101
- }
1102
-
1103
- function nth(array, n = 0) {
1104
- if (!isArrayLikeObject(array) || array.length === 0) {
1105
- return undefined;
1106
- }
1107
- n = toInteger(n);
1108
- if (n < 0) {
1109
- n += array.length;
1110
- }
1111
- return array[n];
1112
- }
1113
-
1114
- function getPriority(a) {
1115
- if (typeof a === 'symbol') {
1116
- return 1;
1117
- }
1118
- if (a === null) {
1119
- return 2;
1120
- }
1121
- if (a === undefined) {
1122
- return 3;
1123
- }
1124
- if (a !== a) {
1125
- return 4;
1126
- }
1127
- return 0;
1128
- }
1129
- const compareValues = (a, b, order) => {
1130
- if (a !== b) {
1131
- if (typeof a === 'string' && typeof b === 'string') {
1132
- return order === 'desc' ? b.localeCompare(a) : a.localeCompare(b);
1133
- }
1134
- const aPriority = getPriority(a);
1135
- const bPriority = getPriority(b);
1136
- if (aPriority === bPriority && aPriority === 0) {
1137
- if (a < b) {
1138
- return order === 'desc' ? 1 : -1;
1139
- }
1140
- if (a > b) {
1141
- return order === 'desc' ? -1 : 1;
1142
- }
1143
- }
1144
- return order === 'desc' ? bPriority - aPriority : aPriority - bPriority;
1145
- }
1146
- return 0;
1147
- };
1148
-
1149
- const regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
1150
- const regexIsPlainProp = /^\w*$/;
1151
- function isKey(value, object) {
1152
- if (Array.isArray(value)) {
1153
- return false;
1154
- }
1155
- if (typeof value === 'number' || typeof value === 'boolean' || value == null || isSymbol(value)) {
1156
- return true;
1157
- }
1158
- return ((typeof value === 'string' && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value))) ||
1159
- (object != null && Object.hasOwn(object, value)));
1160
- }
1161
-
1162
- function orderBy(collection, criteria, orders, guard) {
1163
- if (collection == null) {
1164
- return [];
1165
- }
1166
- orders = guard ? undefined : orders;
1167
- if (!Array.isArray(collection)) {
1168
- collection = Object.values(collection);
1169
- }
1170
- if (!Array.isArray(criteria)) {
1171
- criteria = criteria == null ? [null] : [criteria];
1172
- }
1173
- if (criteria.length === 0) {
1174
- criteria = [null];
1175
- }
1176
- if (!Array.isArray(orders)) {
1177
- orders = orders == null ? [] : [orders];
1178
- }
1179
- orders = orders.map(order => String(order));
1180
- const getValueByNestedPath = (object, path) => {
1181
- let target = object;
1182
- for (let i = 0; i < path.length && target != null; ++i) {
1183
- target = target[path[i]];
1184
- }
1185
- return target;
1186
- };
1187
- const getValueByCriterion = (criterion, object) => {
1188
- if (object == null || criterion == null) {
1189
- return object;
1190
- }
1191
- if (typeof criterion === 'object' && 'key' in criterion) {
1192
- if (Object.hasOwn(object, criterion.key)) {
1193
- return object[criterion.key];
1194
- }
1195
- return getValueByNestedPath(object, criterion.path);
1196
- }
1197
- if (typeof criterion === 'function') {
1198
- return criterion(object);
1199
- }
1200
- if (Array.isArray(criterion)) {
1201
- return getValueByNestedPath(object, criterion);
1202
- }
1203
- if (typeof object === 'object') {
1204
- return object[criterion];
1205
- }
1206
- return object;
1207
- };
1208
- const preparedCriteria = criteria.map(criterion => {
1209
- if (Array.isArray(criterion) && criterion.length === 1) {
1210
- criterion = criterion[0];
1211
- }
1212
- if (criterion == null || typeof criterion === 'function' || Array.isArray(criterion) || isKey(criterion)) {
1213
- return criterion;
1214
- }
1215
- return { key: criterion, path: toPath(criterion) };
1216
- });
1217
- const preparedCollection = collection.map(item => ({
1218
- original: item,
1219
- criteria: preparedCriteria.map(criterion => getValueByCriterion(criterion, item)),
1220
- }));
1221
- return preparedCollection
1222
- .slice()
1223
- .sort((a, b) => {
1224
- for (let i = 0; i < preparedCriteria.length; i++) {
1225
- const comparedResult = compareValues(a.criteria[i], b.criteria[i], orders[i]);
1226
- if (comparedResult !== 0) {
1227
- return comparedResult;
1228
- }
1229
- }
1230
- return 0;
1231
- })
1232
- .map(item => item.original);
1233
- }
1234
-
1235
- function partition(source, predicate) {
1236
- if (!source) {
1237
- return [[], []];
1238
- }
1239
- const collection = isArrayLike(source) ? source : Object.values(source);
1240
- predicate = iteratee(predicate);
1241
- const matched = [];
1242
- const unmatched = [];
1243
- for (let i = 0; i < collection.length; i++) {
1244
- const value = collection[i];
1245
- if (predicate(value)) {
1246
- matched.push(value);
1247
- }
1248
- else {
1249
- unmatched.push(value);
1250
- }
1251
- }
1252
- return [matched, unmatched];
1253
- }
1254
-
1255
- function pull(arr, ...valuesToRemove) {
1256
- return zip$1.pull(arr, valuesToRemove);
1257
- }
1258
-
1259
- function pullAll(arr, valuesToRemove = []) {
1260
- return zip$1.pull(arr, Array.from(valuesToRemove));
1261
- }
1262
-
1263
- function pullAllBy(arr, valuesToRemove, _getValue) {
1264
- const getValue = iteratee(_getValue);
1265
- const valuesSet = new Set(Array.from(valuesToRemove).map(x => getValue(x)));
1266
- let resultIndex = 0;
1267
- for (let i = 0; i < arr.length; i++) {
1268
- const value = getValue(arr[i]);
1269
- if (valuesSet.has(value)) {
1270
- continue;
1271
- }
1272
- if (!Object.hasOwn(arr, i)) {
1273
- delete arr[resultIndex++];
1274
- continue;
1275
- }
1276
- arr[resultIndex++] = arr[i];
1277
- }
1278
- arr.length = resultIndex;
1279
- return arr;
1280
- }
1281
-
1282
- function copyArray(source, array) {
1283
- const length = source.length;
1284
- if (array == null) {
1285
- array = Array(length);
1286
- }
1287
- for (let i = 0; i < length; i++) {
1288
- array[i] = source[i];
1289
- }
1290
- return array;
1291
- }
1292
-
1293
- function pullAllWith(array, values, comparator) {
1294
- if (array?.length == null || values?.length == null) {
1295
- return array;
1296
- }
1297
- if (array === values) {
1298
- values = copyArray(values);
1299
- }
1300
- let resultLength = 0;
1301
- if (comparator == null) {
1302
- comparator = (a, b) => isPromise.eq(a, b);
1303
- }
1304
- const valuesArray = Array.isArray(values) ? values : Array.from(values);
1305
- const hasUndefined = valuesArray.includes(undefined);
1306
- for (let i = 0; i < array.length; i++) {
1307
- if (i in array) {
1308
- const shouldRemove = valuesArray.some(value => comparator(array[i], value));
1309
- if (!shouldRemove) {
1310
- array[resultLength++] = array[i];
1311
- }
1312
- continue;
1313
- }
1314
- if (!hasUndefined) {
1315
- delete array[resultLength++];
1316
- }
1317
- }
1318
- array.length = resultLength;
1319
- return array;
1320
- }
1321
-
1322
- function at(object, ...paths) {
1323
- if (paths.length === 0) {
1324
- return [];
1325
- }
1326
- const allPaths = [];
1327
- for (let i = 0; i < paths.length; i++) {
1328
- const path = paths[i];
1329
- if (!isArrayLike(path) || isString(path)) {
1330
- allPaths.push(path);
1331
- continue;
1332
- }
1333
- for (let j = 0; j < path.length; j++) {
1334
- allPaths.push(path[j]);
1335
- }
1336
- }
1337
- const result = [];
1338
- for (let i = 0; i < allPaths.length; i++) {
1339
- result.push(get(object, allPaths[i]));
1340
- }
1341
- return result;
1342
- }
1343
-
1344
- function unset(obj, path) {
1345
- if (obj == null) {
1346
- return true;
1347
- }
1348
- switch (typeof path) {
1349
- case 'symbol':
1350
- case 'number':
1351
- case 'object': {
1352
- if (Array.isArray(path)) {
1353
- return unsetWithPath(obj, path);
1354
- }
1355
- if (typeof path === 'number') {
1356
- path = toKey(path);
1357
- }
1358
- else if (typeof path === 'object') {
1359
- if (Object.is(path?.valueOf(), -0)) {
1360
- path = '-0';
1361
- }
1362
- else {
1363
- path = String(path);
1364
- }
1365
- }
1366
- if (obj?.[path] === undefined) {
1367
- return true;
1368
- }
1369
- try {
1370
- delete obj[path];
1371
- return true;
1372
- }
1373
- catch {
1374
- return false;
1375
- }
1376
- }
1377
- case 'string': {
1378
- if (obj?.[path] === undefined && isDeepKey(path)) {
1379
- return unsetWithPath(obj, toPath(path));
1380
- }
1381
- try {
1382
- delete obj[path];
1383
- return true;
1384
- }
1385
- catch {
1386
- return false;
1387
- }
1388
- }
1389
- }
1390
- }
1391
- function unsetWithPath(obj, path) {
1392
- const parent = get(obj, path.slice(0, -1), obj);
1393
- const lastKey = path[path.length - 1];
1394
- if (parent?.[lastKey] === undefined) {
1395
- return true;
1396
- }
1397
- try {
1398
- delete parent[lastKey];
1399
- return true;
1400
- }
1401
- catch {
1402
- return false;
1403
- }
1404
- }
1405
-
1406
- function pullAt(array, ..._indices) {
1407
- const indices = flatten(_indices, 1);
1408
- if (!array) {
1409
- return Array(indices.length);
1410
- }
1411
- const result = at(array, indices);
1412
- const indicesToPull = indices
1413
- .map(index => (isIndex(index, array.length) ? Number(index) : index))
1414
- .sort((a, b) => b - a);
1415
- for (const index of new Set(indicesToPull)) {
1416
- if (isIndex(index, array.length)) {
1417
- Array.prototype.splice.call(array, index, 1);
1418
- continue;
1419
- }
1420
- if (isKey(index, array)) {
1421
- delete array[toKey(index)];
1422
- continue;
1423
- }
1424
- const path = toSnakeCaseKeys.isArray(index) ? index : toPath(index);
1425
- unset(array, path);
1426
- }
1427
- return result;
1428
- }
1429
-
1430
- function reduce(collection, iteratee = unary.identity, accumulator) {
1431
- if (!collection) {
1432
- return accumulator;
1433
- }
1434
- let keys;
1435
- let startIndex = 0;
1436
- if (isArrayLike(collection)) {
1437
- keys = range$1.range(0, collection.length);
1438
- if (accumulator == null && collection.length > 0) {
1439
- accumulator = collection[0];
1440
- startIndex += 1;
1441
- }
1442
- }
1443
- else {
1444
- keys = Object.keys(collection);
1445
- if (accumulator == null) {
1446
- accumulator = collection[keys[0]];
1447
- startIndex += 1;
1448
- }
1449
- }
1450
- for (let i = startIndex; i < keys.length; i++) {
1451
- const key = keys[i];
1452
- const value = collection[key];
1453
- accumulator = iteratee(accumulator, value, key, collection);
1454
- }
1455
- return accumulator;
1456
- }
1457
-
1458
- function reduceRight(collection, iteratee = unary.identity, accumulator) {
1459
- if (!collection) {
1460
- return accumulator;
1461
- }
1462
- let keys;
1463
- let startIndex;
1464
- if (isArrayLike(collection)) {
1465
- keys = range$1.range(0, collection.length).reverse();
1466
- if (accumulator == null && collection.length > 0) {
1467
- accumulator = collection[collection.length - 1];
1468
- startIndex = 1;
1469
- }
1470
- else {
1471
- startIndex = 0;
1472
- }
1473
- }
1474
- else {
1475
- keys = Object.keys(collection).reverse();
1476
- if (accumulator == null) {
1477
- accumulator = collection[keys[0]];
1478
- startIndex = 1;
1479
- }
1480
- else {
1481
- startIndex = 0;
1482
- }
1483
- }
1484
- for (let i = startIndex; i < keys.length; i++) {
1485
- const key = keys[i];
1486
- const value = collection[key];
1487
- accumulator = iteratee(accumulator, value, key, collection);
1488
- }
1489
- return accumulator;
1490
- }
1491
-
1492
- function negate(func) {
1493
- if (typeof func !== 'function') {
1494
- throw new TypeError('Expected a function');
1495
- }
1496
- return function (...args) {
1497
- return !func.apply(this, args);
1498
- };
1499
- }
1500
-
1501
- function reject(source, predicate) {
1502
- return filter(source, negate(iteratee(predicate)));
1503
- }
1504
-
1505
- function remove(arr, shouldRemoveElement) {
1506
- return zip$1.remove(arr, iteratee(shouldRemoveElement));
1507
- }
1508
-
1509
- function reverse(array) {
1510
- if (array == null) {
1511
- return array;
1512
- }
1513
- return array.reverse();
1514
- }
1515
-
1516
- function sample(collection) {
1517
- if (collection == null) {
1518
- return undefined;
1519
- }
1520
- if (isArrayLike(collection)) {
1521
- return zip$1.sample(toArray$1(collection));
1522
- }
1523
- return zip$1.sample(Object.values(collection));
1524
- }
1525
-
1526
- function size(target) {
1527
- if (isPromise.isNil(target)) {
1528
- return 0;
1529
- }
1530
- if (target instanceof Map || target instanceof Set) {
1531
- return target.size;
1532
- }
1533
- return Object.keys(target).length;
1534
- }
1535
-
1536
- function slice(array, start, end) {
1537
- if (!isArrayLike(array)) {
1538
- return [];
1539
- }
1540
- const length = array.length;
1541
- if (end === undefined) {
1542
- end = length;
1543
- }
1544
- else if (typeof end !== 'number' && isIterateeCall(array, start, end)) {
1545
- start = 0;
1546
- end = length;
1547
- }
1548
- start = toInteger(start);
1549
- end = toInteger(end);
1550
- if (start < 0) {
1551
- start = Math.max(length + start, 0);
1552
- }
1553
- else {
1554
- start = Math.min(start, length);
1555
- }
1556
- if (end < 0) {
1557
- end = Math.max(length + end, 0);
1558
- }
1559
- else {
1560
- end = Math.min(end, length);
1561
- }
1562
- const resultLength = Math.max(end - start, 0);
1563
- const result = new Array(resultLength);
1564
- for (let i = 0; i < resultLength; ++i) {
1565
- result[i] = array[start + i];
1566
- }
1567
- return result;
1568
- }
1569
-
1570
- function some(source, predicate, guard) {
1571
- if (!source) {
1572
- return false;
1573
- }
1574
- if (guard != null) {
1575
- predicate = undefined;
1576
- }
1577
- if (!predicate) {
1578
- predicate = unary.identity;
1579
- }
1580
- const values = Array.isArray(source) ? source : Object.values(source);
1581
- switch (typeof predicate) {
1582
- case 'function': {
1583
- if (!Array.isArray(source)) {
1584
- const keys = Object.keys(source);
1585
- for (let i = 0; i < keys.length; i++) {
1586
- const key = keys[i];
1587
- const value = source[key];
1588
- if (predicate(value, key, source)) {
1589
- return true;
1590
- }
1591
- }
1592
- return false;
1593
- }
1594
- return values.some(predicate);
1595
- }
1596
- case 'object': {
1597
- if (Array.isArray(predicate) && predicate.length === 2) {
1598
- const key = predicate[0];
1599
- const value = predicate[1];
1600
- return values.some(matchesProperty(key, value));
1601
- }
1602
- else {
1603
- return values.some(matches(predicate));
1604
- }
1605
- }
1606
- case 'number':
1607
- case 'symbol':
1608
- case 'string': {
1609
- return values.some(property(predicate));
1610
- }
1611
- }
1612
- }
1613
-
1614
- function sortBy(collection, ...criteria) {
1615
- const length = criteria.length;
1616
- if (length > 1 && isIterateeCall(collection, criteria[0], criteria[1])) {
1617
- criteria = [];
1618
- }
1619
- else if (length > 2 && isIterateeCall(criteria[0], criteria[1], criteria[2])) {
1620
- criteria = [criteria[0]];
1621
- }
1622
- return orderBy(collection, zip$1.flatten(criteria), ['asc']);
1623
- }
1624
-
1625
- function isNaN(value) {
1626
- return Number.isNaN(value);
1627
- }
1628
-
1629
- function isNil(x) {
1630
- return x == null;
1631
- }
1632
-
1633
- const MAX_ARRAY_LENGTH$3 = 4294967295;
1634
- const MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH$3 - 1;
1635
- function sortedIndexBy(array, value, iteratee$1, retHighest) {
1636
- let low = 0;
1637
- let high = array == null ? 0 : array.length;
1638
- if (high === 0 || isNil(array)) {
1639
- return 0;
1640
- }
1641
- const iterateeFunction = iteratee(iteratee$1);
1642
- const transformedValue = iterateeFunction(value);
1643
- const valIsNaN = isNaN(transformedValue);
1644
- const valIsNull = isPromise.isNull(transformedValue);
1645
- const valIsSymbol = isSymbol(transformedValue);
1646
- const valIsUndefined = isPromise.isUndefined(transformedValue);
1647
- while (low < high) {
1648
- let setLow;
1649
- const mid = Math.floor((low + high) / 2);
1650
- const computed = iterateeFunction(array[mid]);
1651
- const othIsDefined = !isPromise.isUndefined(computed);
1652
- const othIsNull = isPromise.isNull(computed);
1653
- const othIsReflexive = !isNaN(computed);
1654
- const othIsSymbol = isSymbol(computed);
1655
- if (valIsNaN) {
1656
- setLow = retHighest || othIsReflexive;
1657
- }
1658
- else if (valIsUndefined) {
1659
- setLow = othIsReflexive && (retHighest || othIsDefined);
1660
- }
1661
- else if (valIsNull) {
1662
- setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
1663
- }
1664
- else if (valIsSymbol) {
1665
- setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
1666
- }
1667
- else if (othIsNull || othIsSymbol) {
1668
- setLow = false;
1669
- }
1670
- else {
1671
- setLow = retHighest ? computed <= transformedValue : computed < transformedValue;
1672
- }
1673
- if (setLow) {
1674
- low = mid + 1;
1675
- }
1676
- else {
1677
- high = mid;
1678
- }
1679
- }
1680
- return Math.min(high, MAX_ARRAY_INDEX);
1681
- }
1682
-
1683
- function isNumber(value) {
1684
- return typeof value === 'number' || value instanceof Number;
1685
- }
1686
-
1687
- const MAX_ARRAY_LENGTH$2 = 4294967295;
1688
- const HALF_MAX_ARRAY_LENGTH$1 = MAX_ARRAY_LENGTH$2 >>> 1;
1689
- function sortedIndex(array, value) {
1690
- if (isPromise.isNil(array)) {
1691
- return 0;
1692
- }
1693
- let low = 0, high = isPromise.isNil(array) ? low : array.length;
1694
- if (isNumber(value) && value === value && high <= HALF_MAX_ARRAY_LENGTH$1) {
1695
- while (low < high) {
1696
- const mid = (low + high) >>> 1;
1697
- const compute = array[mid];
1698
- if (!isPromise.isNull(compute) && !isPromise.isSymbol(compute) && compute < value) {
1699
- low = mid + 1;
1700
- }
1701
- else {
1702
- high = mid;
1703
- }
1704
- }
1705
- return high;
1706
- }
1707
- return sortedIndexBy(array, value, value => value);
1708
- }
1709
-
1710
- function sortedIndexOf(array, value) {
1711
- if (!array?.length) {
1712
- return -1;
1713
- }
1714
- const index = sortedIndex(array, value);
1715
- if (index < array.length && isPromise.eq(array[index], value)) {
1716
- return index;
1717
- }
1718
- return -1;
1719
- }
1720
-
1721
- function sortedLastIndexBy(array, value, iteratee) {
1722
- return sortedIndexBy(array, value, iteratee, true);
1723
- }
1724
-
1725
- const MAX_ARRAY_LENGTH$1 = 4294967295;
1726
- const HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH$1 >>> 1;
1727
- function sortedLastIndex(array, value) {
1728
- if (isPromise.isNil(array)) {
1729
- return 0;
1730
- }
1731
- let high = array.length;
1732
- if (!isNumber(value) || Number.isNaN(value) || high > HALF_MAX_ARRAY_LENGTH) {
1733
- return sortedLastIndexBy(array, value, value => value);
1734
- }
1735
- let low = 0;
1736
- while (low < high) {
1737
- const mid = (low + high) >>> 1;
1738
- const compute = array[mid];
1739
- if (!isPromise.isNull(compute) && !isPromise.isSymbol(compute) && compute <= value) {
1740
- low = mid + 1;
1741
- }
1742
- else {
1743
- high = mid;
1744
- }
1745
- }
1746
- return high;
1747
- }
1748
-
1749
- function tail(arr) {
1750
- if (!isArrayLike(arr)) {
1751
- return [];
1752
- }
1753
- return zip$1.tail(toArray$1(arr));
1754
- }
1755
-
1756
- function take(arr, count = 1, guard) {
1757
- count = guard ? 1 : toInteger(count);
1758
- if (count < 1 || !isArrayLike(arr)) {
1759
- return [];
1760
- }
1761
- return zip$1.take(toArray$1(arr), count);
1762
- }
1763
-
1764
- function takeRight(arr, count = 1, guard) {
1765
- count = guard ? 1 : toInteger(count);
1766
- if (count <= 0 || !isArrayLike(arr)) {
1767
- return [];
1768
- }
1769
- return zip$1.takeRight(toArray$1(arr), count);
1770
- }
1771
-
1772
- function takeRightWhile(_array, predicate) {
1773
- if (!isArrayLikeObject(_array)) {
1774
- return [];
1775
- }
1776
- const array = toArray$1(_array);
1777
- const index = array.findLastIndex(unary.negate(iteratee(predicate)));
1778
- return array.slice(index + 1);
1779
- }
1780
-
1781
- function takeWhile(array, predicate) {
1782
- if (!isArrayLikeObject(array)) {
1783
- return [];
1784
- }
1785
- const _array = toArray$1(array);
1786
- const index = _array.findIndex(negate(iteratee(predicate)));
1787
- return index === -1 ? _array : _array.slice(0, index);
1788
- }
1789
-
1790
- function union(...arrays) {
1791
- const validArrays = arrays.filter(isArrayLikeObject);
1792
- const flattened = flatten(validArrays, 1);
1793
- return zip$1.uniq(flattened);
1794
- }
1795
-
1796
- function unionBy(...values) {
1797
- const lastValue = zip$1.last(values);
1798
- const flattened = flattenArrayLike(values);
1799
- if (isArrayLikeObject(lastValue) || lastValue == null) {
1800
- return zip$1.uniq(flattened);
1801
- }
1802
- return zip$1.uniqBy(flattened, iteratee(lastValue));
1803
- }
1804
-
1805
- function unionWith(...values) {
1806
- const lastValue = zip$1.last(values);
1807
- const flattened = flattenArrayLike(values);
1808
- if (isArrayLikeObject(lastValue) || lastValue == null) {
1809
- return zip$1.uniq(flattened);
1810
- }
1811
- return zip$1.uniqWith(flattened, lastValue);
1812
- }
1813
-
1814
- function uniqBy(array, iteratee$1) {
1815
- if (!isArrayLikeObject(array)) {
1816
- return [];
1817
- }
1818
- return zip$1.uniqBy(Array.from(array), iteratee(iteratee$1));
1819
- }
1820
-
1821
- function uniqWith(arr, comparator) {
1822
- if (!isArrayLike(arr)) {
1823
- return [];
1824
- }
1825
- return typeof comparator === 'function' ? zip$1.uniqWith(Array.from(arr), comparator) : uniq(Array.from(arr));
1826
- }
1827
-
1828
- function unzip(array) {
1829
- if (!isArrayLikeObject(array) || !array.length) {
1830
- return [];
1831
- }
1832
- array = toSnakeCaseKeys.isArray(array) ? array : Array.from(array);
1833
- array = array.filter(item => isArrayLikeObject(item));
1834
- return zip$1.unzip(array);
1835
- }
1836
-
1837
- function without(array, ...values) {
1838
- if (!isArrayLikeObject(array)) {
1839
- return [];
1840
- }
1841
- return zip$1.without(Array.from(array), ...values);
1842
- }
1843
-
1844
- function zip(...arrays) {
1845
- if (!arrays.length) {
1846
- return [];
1847
- }
1848
- return zip$1.zip(...arrays.filter(group => isArrayLikeObject(group)));
1849
- }
1850
-
1851
- const assignValue = (object, key, value) => {
1852
- const objValue = object[key];
1853
- if (!(Object.hasOwn(object, key) && isPromise.eq(objValue, value)) || (value === undefined && !(key in object))) {
1854
- object[key] = value;
1855
- }
1856
- };
1857
-
1858
- function zipObject(keys = [], values = []) {
1859
- const result = {};
1860
- for (let i = 0; i < keys.length; i++) {
1861
- assignValue(result, keys[i], values[i]);
1862
- }
1863
- return result;
1864
- }
1865
-
1866
- function updateWith(obj, path, updater, customizer) {
1867
- if (obj == null && !isObject(obj)) {
1868
- return obj;
1869
- }
1870
- const resolvedPath = isKey(path, obj)
1871
- ? [path]
1872
- : Array.isArray(path)
1873
- ? path
1874
- : typeof path === 'string'
1875
- ? toPath(path)
1876
- : [path];
1877
- let current = obj;
1878
- for (let i = 0; i < resolvedPath.length && current != null; i++) {
1879
- const key = toKey(resolvedPath[i]);
1880
- let newValue;
1881
- if (i === resolvedPath.length - 1) {
1882
- newValue = updater(current[key]);
1883
- }
1884
- else {
1885
- const objValue = current[key];
1886
- const customizerResult = customizer(objValue);
1887
- newValue =
1888
- customizerResult !== undefined
1889
- ? customizerResult
1890
- : isObject(objValue)
1891
- ? objValue
1892
- : isIndex(resolvedPath[i + 1])
1893
- ? []
1894
- : {};
1895
- }
1896
- assignValue(current, key, newValue);
1897
- current = current[key];
1898
- }
1899
- return obj;
1900
- }
1901
-
1902
- function set(obj, path, value) {
1903
- return updateWith(obj, path, () => value, () => undefined);
1904
- }
1905
-
1906
- function zipObjectDeep(keys, values) {
1907
- const result = {};
1908
- if (!isArrayLike(keys)) {
1909
- return result;
1910
- }
1911
- if (!isArrayLike(values)) {
1912
- values = [];
1913
- }
1914
- const zipped = zip$1.zip(Array.from(keys), Array.from(values));
1915
- for (let i = 0; i < zipped.length; i++) {
1916
- const [key, value] = zipped[i];
1917
- if (key != null) {
1918
- set(result, key, value);
1919
- }
1920
- }
1921
- return result;
1922
- }
1923
-
1924
- function zipWith(...combine) {
1925
- let iteratee = combine.pop();
1926
- if (!isPromise.isFunction(iteratee)) {
1927
- combine.push(iteratee);
1928
- iteratee = undefined;
1929
- }
1930
- if (!combine?.length) {
1931
- return [];
1932
- }
1933
- const result = unzip(combine);
1934
- if (iteratee == null) {
1935
- return result;
1936
- }
1937
- return result.map(group => iteratee(...group));
1938
- }
1939
-
1940
- function after(n, func) {
1941
- if (typeof func !== 'function') {
1942
- throw new TypeError('Expected a function');
1943
- }
1944
- n = toInteger(n);
1945
- return function (...args) {
1946
- if (--n < 1) {
1947
- return func.apply(this, args);
1948
- }
1949
- };
1950
- }
1951
-
1952
- function ary(func, n = func.length, guard) {
1953
- if (guard) {
1954
- n = func.length;
1955
- }
1956
- if (Number.isNaN(n) || n < 0) {
1957
- n = 0;
1958
- }
1959
- return unary.ary(func, n);
1960
- }
1961
-
1962
- function attempt(func, ...args) {
1963
- try {
1964
- return func(...args);
1965
- }
1966
- catch (e) {
1967
- return e instanceof Error ? e : new Error(e);
1968
- }
1969
- }
1970
-
1971
- function before(n, func) {
1972
- if (typeof func !== 'function') {
1973
- throw new TypeError('Expected a function');
1974
- }
1975
- let result;
1976
- n = toInteger(n);
1977
- return function (...args) {
1978
- if (--n > 0) {
1979
- result = func.apply(this, args);
1980
- }
1981
- if (n <= 1 && func) {
1982
- func = undefined;
1983
- }
1984
- return result;
1985
- };
1986
- }
1987
-
1988
- function debounce(func, debounceMs = 0, options = {}) {
1989
- if (typeof options !== 'object') {
1990
- options = {};
1991
- }
1992
- const { signal, leading = false, trailing = true, maxWait } = options;
1993
- const edges = Array(2);
1994
- if (leading) {
1995
- edges[0] = 'leading';
1996
- }
1997
- if (trailing) {
1998
- edges[1] = 'trailing';
1999
- }
2000
- let result = undefined;
2001
- let pendingAt = null;
2002
- const _debounced = unary.debounce(function (...args) {
2003
- result = func.apply(this, args);
2004
- pendingAt = null;
2005
- }, debounceMs, { signal, edges });
2006
- const debounced = function (...args) {
2007
- if (maxWait != null) {
2008
- if (pendingAt === null) {
2009
- pendingAt = Date.now();
2010
- }
2011
- else {
2012
- if (Date.now() - pendingAt >= maxWait) {
2013
- result = func.apply(this, args);
2014
- pendingAt = Date.now();
2015
- _debounced.cancel();
2016
- _debounced.schedule();
2017
- return result;
2018
- }
2019
- }
2020
- }
2021
- _debounced.apply(this, args);
2022
- return result;
2023
- };
2024
- const flush = () => {
2025
- _debounced.flush();
2026
- return result;
2027
- };
2028
- debounced.cancel = _debounced.cancel;
2029
- debounced.flush = flush;
2030
- return debounced;
2031
- }
2032
-
2033
- function defer(func, ...args) {
2034
- if (typeof func !== 'function') {
2035
- throw new TypeError('Expected a function');
2036
- }
2037
- return setTimeout(func, 1, ...args);
2038
- }
2039
-
2040
- function delay(func, wait, ...args) {
2041
- if (typeof func !== 'function') {
2042
- throw new TypeError('Expected a function');
2043
- }
2044
- return setTimeout(func, toNumber(wait) || 0, ...args);
2045
- }
2046
-
2047
- function flip(func) {
2048
- return function (...args) {
2049
- return func.apply(this, args.reverse());
2050
- };
2051
- }
2052
-
2053
- function flow(...funcs) {
2054
- const flattenFuncs = zip$1.flatten(funcs, 1);
2055
- if (flattenFuncs.some(func => typeof func !== 'function')) {
2056
- throw new TypeError('Expected a function');
2057
- }
2058
- return unary.flow(...flattenFuncs);
2059
- }
2060
-
2061
- function flowRight(...funcs) {
2062
- const flattenFuncs = zip$1.flatten(funcs, 1);
2063
- if (flattenFuncs.some(func => typeof func !== 'function')) {
2064
- throw new TypeError('Expected a function');
2065
- }
2066
- return unary.flowRight(...flattenFuncs);
2067
- }
2068
-
2069
- function nthArg(n = 0) {
2070
- return function (...args) {
2071
- return args.at(toInteger(n));
2072
- };
2073
- }
2074
-
2075
- function rearg(func, ...indices) {
2076
- const flattenIndices = flatten(indices);
2077
- return function (...args) {
2078
- const reorderedArgs = flattenIndices.map(i => args[i]).slice(0, args.length);
2079
- for (let i = reorderedArgs.length; i < args.length; i++) {
2080
- reorderedArgs.push(args[i]);
2081
- }
2082
- return func.apply(this, reorderedArgs);
2083
- };
2084
- }
2085
-
2086
- function rest(func, start = func.length - 1) {
2087
- start = Number.parseInt(start, 10);
2088
- if (Number.isNaN(start) || start < 0) {
2089
- start = func.length - 1;
2090
- }
2091
- return unary.rest(func, start);
2092
- }
2093
-
2094
- function spread(func, argsIndex = 0) {
2095
- argsIndex = Number.parseInt(argsIndex, 10);
2096
- if (Number.isNaN(argsIndex) || argsIndex < 0) {
2097
- argsIndex = 0;
2098
- }
2099
- return function (...args) {
2100
- const array = args[argsIndex];
2101
- const params = args.slice(0, argsIndex);
2102
- if (array) {
2103
- params.push(...array);
2104
- }
2105
- return func.apply(this, params);
2106
- };
2107
- }
2108
-
2109
- function throttle(func, throttleMs = 0, options = {}) {
2110
- if (typeof options !== 'object') {
2111
- options = {};
2112
- }
2113
- const { leading = true, trailing = true, signal } = options;
2114
- return debounce(func, throttleMs, {
2115
- leading,
2116
- trailing,
2117
- signal,
2118
- maxWait: throttleMs,
2119
- });
2120
- }
2121
-
2122
- function toString(value) {
2123
- if (value == null) {
2124
- return '';
2125
- }
2126
- if (Array.isArray(value)) {
2127
- return value.map(toString).join(',');
2128
- }
2129
- const result = String(value);
2130
- if (result === '0' && Object.is(Number(value), -0)) {
2131
- return '-0';
2132
- }
2133
- return result;
2134
- }
2135
-
2136
- function add(value, other) {
2137
- if (value === undefined && other === undefined) {
2138
- return 0;
2139
- }
2140
- if (value === undefined || other === undefined) {
2141
- return value ?? other;
2142
- }
2143
- if (typeof value === 'string' || typeof other === 'string') {
2144
- value = toString(value);
2145
- other = toString(other);
2146
- }
2147
- else {
2148
- value = toNumber(value);
2149
- other = toNumber(other);
2150
- }
2151
- return value + other;
2152
- }
2153
-
2154
- function decimalAdjust(type, number, precision = 0) {
2155
- number = Number(number);
2156
- if (Object.is(number, -0)) {
2157
- number = '-0';
2158
- }
2159
- precision = Math.min(Number.parseInt(precision, 10), 292);
2160
- if (precision) {
2161
- const [magnitude, exponent = 0] = number.toString().split('e');
2162
- let adjustedValue = Math[type](Number(`${magnitude}e${Number(exponent) + precision}`));
2163
- if (Object.is(adjustedValue, -0)) {
2164
- adjustedValue = '-0';
2165
- }
2166
- const [newMagnitude, newExponent = 0] = adjustedValue.toString().split('e');
2167
- return Number(`${newMagnitude}e${Number(newExponent) - precision}`);
2168
- }
2169
- return Math[type](Number(number));
2170
- }
2171
-
2172
- function ceil(number, precision = 0) {
2173
- return decimalAdjust('ceil', number, precision);
2174
- }
2175
-
2176
- function clamp(value, bound1, bound2) {
2177
- if (Number.isNaN(bound1)) {
2178
- bound1 = 0;
2179
- }
2180
- if (Number.isNaN(bound2)) {
2181
- bound2 = 0;
2182
- }
2183
- return range$1.clamp(value, bound1, bound2);
2184
- }
2185
-
2186
- function divide(value, other) {
2187
- if (value === undefined && other === undefined) {
2188
- return 1;
2189
- }
2190
- if (value === undefined || other === undefined) {
2191
- return value ?? other;
2192
- }
2193
- if (typeof value === 'string' || typeof other === 'string') {
2194
- value = toString(value);
2195
- other = toString(other);
2196
- }
2197
- else {
2198
- value = toNumber(value);
2199
- other = toNumber(other);
2200
- }
2201
- return value / other;
2202
- }
2203
-
2204
- function floor(number, precision = 0) {
2205
- return decimalAdjust('floor', number, precision);
2206
- }
2207
-
2208
- function inRange(value, minimum, maximum) {
2209
- if (!minimum) {
2210
- minimum = 0;
2211
- }
2212
- if (maximum != null && !maximum) {
2213
- maximum = 0;
2214
- }
2215
- if (minimum != null && typeof minimum !== 'number') {
2216
- minimum = Number(minimum);
2217
- }
2218
- if (maximum == null && minimum === 0) {
2219
- return false;
2220
- }
2221
- if (maximum != null && typeof maximum !== 'number') {
2222
- maximum = Number(maximum);
2223
- }
2224
- if (maximum != null && minimum > maximum) {
2225
- [minimum, maximum] = [maximum, minimum];
2226
- }
2227
- if (minimum === maximum) {
2228
- return false;
2229
- }
2230
- return range$1.inRange(value, minimum, maximum);
2231
- }
2232
-
2233
- function max(items = []) {
2234
- let maxElement = items[0];
2235
- let max = undefined;
2236
- for (let i = 0; i < items.length; i++) {
2237
- const element = items[i];
2238
- if (max == null || element > max) {
2239
- max = element;
2240
- maxElement = element;
2241
- }
2242
- }
2243
- return maxElement;
2244
- }
2245
-
2246
- function maxBy(items, iteratee$1) {
2247
- if (items == null) {
2248
- return undefined;
2249
- }
2250
- return zip$1.maxBy(Array.from(items), iteratee(iteratee$1));
2251
- }
2252
-
2253
- function sumBy(array, iteratee$1) {
2254
- if (!array || !array.length) {
2255
- return 0;
2256
- }
2257
- if (iteratee$1 != null) {
2258
- iteratee$1 = iteratee(iteratee$1);
2259
- }
2260
- let result = undefined;
2261
- for (let i = 0; i < array.length; i++) {
2262
- const current = iteratee$1 ? iteratee$1(array[i]) : array[i];
2263
- if (current !== undefined) {
2264
- if (result === undefined) {
2265
- result = current;
2266
- }
2267
- else {
2268
- result += current;
2269
- }
2270
- }
2271
- }
2272
- return result;
2273
- }
2274
-
2275
- function sum(array) {
2276
- return sumBy(array);
2277
- }
2278
-
2279
- function mean(nums) {
2280
- const length = nums ? nums.length : 0;
2281
- return length === 0 ? NaN : sum(nums) / length;
2282
- }
2283
-
2284
- function meanBy(items, iteratee$1) {
2285
- if (items == null) {
2286
- return NaN;
2287
- }
2288
- return range$1.meanBy(Array.from(items), iteratee(iteratee$1));
2289
- }
2290
-
2291
- function min(items = []) {
2292
- let minElement = items[0];
2293
- let min = undefined;
2294
- for (let i = 0; i < items.length; i++) {
2295
- const element = items[i];
2296
- if (min == null || element < min) {
2297
- min = element;
2298
- minElement = element;
2299
- }
2300
- }
2301
- return minElement;
2302
- }
2303
-
2304
- function minBy(items, iteratee$1) {
2305
- if (items == null) {
2306
- return undefined;
2307
- }
2308
- return zip$1.minBy(Array.from(items), iteratee(iteratee$1));
2309
- }
2310
-
2311
- function multiply(value, other) {
2312
- if (value === undefined && other === undefined) {
2313
- return 1;
2314
- }
2315
- if (value === undefined || other === undefined) {
2316
- return value ?? other;
2317
- }
2318
- if (typeof value === 'string' || typeof other === 'string') {
2319
- value = toString(value);
2320
- other = toString(other);
2321
- }
2322
- else {
2323
- value = toNumber(value);
2324
- other = toNumber(other);
2325
- }
2326
- return value * other;
2327
- }
2328
-
2329
- function parseInt(string, radix = 0, guard) {
2330
- if (guard) {
2331
- radix = 0;
2332
- }
2333
- return Number.parseInt(string, radix);
2334
- }
2335
-
2336
- function random(...args) {
2337
- let minimum = 0;
2338
- let maximum = 1;
2339
- let floating = false;
2340
- switch (args.length) {
2341
- case 1: {
2342
- if (typeof args[0] === 'boolean') {
2343
- floating = args[0];
2344
- }
2345
- else {
2346
- maximum = args[0];
2347
- }
2348
- break;
2349
- }
2350
- case 2: {
2351
- if (typeof args[1] === 'boolean') {
2352
- maximum = args[0];
2353
- floating = args[1];
2354
- }
2355
- else {
2356
- minimum = args[0];
2357
- maximum = args[1];
2358
- }
2359
- }
2360
- case 3: {
2361
- if (typeof args[2] === 'object' && args[2] != null && args[2][args[1]] === args[0]) {
2362
- minimum = 0;
2363
- maximum = args[0];
2364
- floating = false;
2365
- }
2366
- else {
2367
- minimum = args[0];
2368
- maximum = args[1];
2369
- floating = args[2];
2370
- }
2371
- }
2372
- }
2373
- if (typeof minimum !== 'number') {
2374
- minimum = Number(minimum);
2375
- }
2376
- if (typeof maximum !== 'number') {
2377
- minimum = Number(maximum);
2378
- }
2379
- if (!minimum) {
2380
- minimum = 0;
2381
- }
2382
- if (!maximum) {
2383
- maximum = 0;
2384
- }
2385
- if (minimum > maximum) {
2386
- [minimum, maximum] = [maximum, minimum];
2387
- }
2388
- minimum = clamp(minimum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
2389
- maximum = clamp(maximum, -Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER);
2390
- if (minimum === maximum) {
2391
- return minimum;
2392
- }
2393
- if (floating) {
2394
- return randomInt.random(minimum, maximum + 1);
2395
- }
2396
- else {
2397
- return randomInt.randomInt(minimum, maximum + 1);
2398
- }
2399
- }
2400
-
2401
- function range(start, end, step) {
2402
- if (step && typeof step !== 'number' && isIterateeCall(start, end, step)) {
2403
- end = step = undefined;
2404
- }
2405
- start = toFinite(start);
2406
- if (end === undefined) {
2407
- end = start;
2408
- start = 0;
2409
- }
2410
- else {
2411
- end = toFinite(end);
2412
- }
2413
- step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
2414
- const length = Math.max(Math.ceil((end - start) / (step || 1)), 0);
2415
- const result = new Array(length);
2416
- for (let index = 0; index < length; index++) {
2417
- result[index] = start;
2418
- start += step;
2419
- }
2420
- return result;
2421
- }
2422
-
2423
- function rangeRight(start, end, step) {
2424
- if (step && typeof step !== 'number' && isIterateeCall(start, end, step)) {
2425
- end = step = undefined;
2426
- }
2427
- start = toFinite(start);
2428
- if (end === undefined) {
2429
- end = start;
2430
- start = 0;
2431
- }
2432
- else {
2433
- end = toFinite(end);
2434
- }
2435
- step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
2436
- const length = Math.max(Math.ceil((end - start) / (step || 1)), 0);
2437
- const result = new Array(length);
2438
- for (let index = length - 1; index >= 0; index--) {
2439
- result[index] = start;
2440
- start += step;
2441
- }
2442
- return result;
2443
- }
2444
-
2445
- function round(number, precision = 0) {
2446
- return decimalAdjust('round', number, precision);
2447
- }
2448
-
2449
- function subtract(value, other) {
2450
- if (value === undefined && other === undefined) {
2451
- return 0;
2452
- }
2453
- if (value === undefined || other === undefined) {
2454
- return value ?? other;
2455
- }
2456
- if (typeof value === 'string' || typeof other === 'string') {
2457
- value = toString(value);
2458
- other = toString(other);
2459
- }
2460
- else {
2461
- value = toNumber(value);
2462
- other = toNumber(other);
2463
- }
2464
- return value - other;
2465
- }
2466
-
2467
- function isPrototype(value) {
2468
- const constructor = value?.constructor;
2469
- const prototype = typeof constructor === 'function' ? constructor.prototype : Object.prototype;
2470
- return value === prototype;
2471
- }
2472
-
2473
- function isTypedArray(x) {
2474
- return isPlainObject.isTypedArray(x);
2475
- }
2476
-
2477
- function times(n, getValue) {
2478
- n = toInteger(n);
2479
- if (n < 1 || !Number.isSafeInteger(n)) {
2480
- return [];
2481
- }
2482
- const result = new Array(n);
2483
- for (let i = 0; i < n; i++) {
2484
- result[i] = typeof getValue === 'function' ? getValue(i) : i;
2485
- }
2486
- return result;
2487
- }
2488
-
2489
- function keys(object) {
2490
- if (isArrayLike(object)) {
2491
- return arrayLikeKeys(object);
2492
- }
2493
- const result = Object.keys(Object(object));
2494
- if (!isPrototype(object)) {
2495
- return result;
2496
- }
2497
- return result.filter(key => key !== 'constructor');
2498
- }
2499
- function arrayLikeKeys(object) {
2500
- const indices = times(object.length, index => `${index}`);
2501
- const filteredKeys = new Set(indices);
2502
- if (isPromise.isBuffer(object)) {
2503
- filteredKeys.add('offset');
2504
- filteredKeys.add('parent');
2505
- }
2506
- if (isTypedArray(object)) {
2507
- filteredKeys.add('buffer');
2508
- filteredKeys.add('byteLength');
2509
- filteredKeys.add('byteOffset');
2510
- }
2511
- return [...indices, ...Object.keys(object).filter(key => !filteredKeys.has(key))];
2512
- }
2513
-
2514
- function assign(object, ...sources) {
2515
- for (let i = 0; i < sources.length; i++) {
2516
- assignImpl(object, sources[i]);
2517
- }
2518
- return object;
2519
- }
2520
- function assignImpl(object, source) {
2521
- const keys$1 = keys(source);
2522
- for (let i = 0; i < keys$1.length; i++) {
2523
- const key = keys$1[i];
2524
- if (!(key in object) || !isPromise.eq(object[key], source[key])) {
2525
- object[key] = source[key];
2526
- }
2527
- }
2528
- }
2529
-
2530
- function keysIn(object) {
2531
- if (object == null) {
2532
- return [];
2533
- }
2534
- switch (typeof object) {
2535
- case 'object':
2536
- case 'function': {
2537
- if (isArrayLike(object)) {
2538
- return arrayLikeKeysIn(object);
2539
- }
2540
- if (isPrototype(object)) {
2541
- return prototypeKeysIn(object);
2542
- }
2543
- return keysInImpl(object);
2544
- }
2545
- default: {
2546
- return keysInImpl(Object(object));
2547
- }
2548
- }
2549
- }
2550
- function keysInImpl(object) {
2551
- const result = [];
2552
- for (const key in object) {
2553
- result.push(key);
2554
- }
2555
- return result;
2556
- }
2557
- function prototypeKeysIn(object) {
2558
- const keys = keysInImpl(object);
2559
- return keys.filter(key => key !== 'constructor');
2560
- }
2561
- function arrayLikeKeysIn(object) {
2562
- const indices = times(object.length, index => `${index}`);
2563
- const filteredKeys = new Set(indices);
2564
- if (isPromise.isBuffer(object)) {
2565
- filteredKeys.add('offset');
2566
- filteredKeys.add('parent');
2567
- }
2568
- if (isTypedArray(object)) {
2569
- filteredKeys.add('buffer');
2570
- filteredKeys.add('byteLength');
2571
- filteredKeys.add('byteOffset');
2572
- }
2573
- return [...indices, ...keysInImpl(object).filter(key => !filteredKeys.has(key))];
2574
- }
2575
-
2576
- function assignIn(object, ...sources) {
2577
- for (let i = 0; i < sources.length; i++) {
2578
- assignInImpl(object, sources[i]);
2579
- }
2580
- return object;
2581
- }
2582
- function assignInImpl(object, source) {
2583
- const keys = keysIn(source);
2584
- for (let i = 0; i < keys.length; i++) {
2585
- const key = keys[i];
2586
- if (!(key in object) || !isPromise.eq(object[key], source[key])) {
2587
- object[key] = source[key];
2588
- }
2589
- }
2590
- }
2591
-
2592
- function assignInWith(object, ...sources) {
2593
- let getValueToAssign = sources[sources.length - 1];
2594
- if (typeof getValueToAssign === 'function') {
2595
- sources.pop();
2596
- }
2597
- else {
2598
- getValueToAssign = undefined;
2599
- }
2600
- for (let i = 0; i < sources.length; i++) {
2601
- assignInWithImpl(object, sources[i], getValueToAssign);
2602
- }
2603
- return object;
2604
- }
2605
- function assignInWithImpl(object, source, getValueToAssign) {
2606
- const keys = keysIn(source);
2607
- for (let i = 0; i < keys.length; i++) {
2608
- const key = keys[i];
2609
- const objValue = object[key];
2610
- const srcValue = source[key];
2611
- const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
2612
- if (!(key in object) || !isPromise.eq(objValue, newValue)) {
2613
- object[key] = newValue;
2614
- }
2615
- }
2616
- }
2617
-
2618
- function assignWith(object, ...sources) {
2619
- let getValueToAssign = sources[sources.length - 1];
2620
- if (typeof getValueToAssign === 'function') {
2621
- sources.pop();
2622
- }
2623
- else {
2624
- getValueToAssign = undefined;
2625
- }
2626
- for (let i = 0; i < sources.length; i++) {
2627
- assignWithImpl(object, sources[i], getValueToAssign);
2628
- }
2629
- return object;
2630
- }
2631
- function assignWithImpl(object, source, getValueToAssign) {
2632
- const keys$1 = keys(source);
2633
- for (let i = 0; i < keys$1.length; i++) {
2634
- const key = keys$1[i];
2635
- const objValue = object[key];
2636
- const srcValue = source[key];
2637
- const newValue = getValueToAssign?.(objValue, srcValue, key, object, source) ?? srcValue;
2638
- if (!(key in object) || !isPromise.eq(objValue, newValue)) {
2639
- object[key] = newValue;
2640
- }
2641
- }
2642
- }
2643
-
2644
- function create(prototype, properties) {
2645
- const proto = isObject(prototype) ? Object.create(prototype) : {};
2646
- if (properties != null) {
2647
- const propsKeys = keys(properties);
2648
- for (let i = 0; i < propsKeys.length; i++) {
2649
- const key = propsKeys[i];
2650
- const propsValue = properties[key];
2651
- assignValue(proto, key, propsValue);
2652
- }
2653
- }
2654
- return proto;
2655
- }
2656
-
2657
- function defaults(object, ...sources) {
2658
- object = Object(object);
2659
- const objectProto = Object.prototype;
2660
- for (let i = 0; i < sources.length; i++) {
2661
- const source = sources[i];
2662
- const keys = Object.keys(source);
2663
- for (let j = 0; j < keys.length; j++) {
2664
- const key = keys[j];
2665
- const value = object[key];
2666
- if (value === undefined ||
2667
- (!Object.hasOwn(object, key) && isPromise.eq(value, objectProto[key]))) {
2668
- object[key] = source[key];
2669
- }
2670
- }
2671
- }
2672
- return object;
2673
- }
2674
-
2675
- function findKey(obj, predicate) {
2676
- if (!isObject(obj)) {
2677
- return undefined;
2678
- }
2679
- return findKeyImpl(obj, predicate);
2680
- }
2681
- function findKeyImpl(obj, predicate) {
2682
- if (typeof predicate === 'function') {
2683
- return toSnakeCaseKeys.findKey(obj, predicate);
2684
- }
2685
- if (typeof predicate === 'object') {
2686
- if (Array.isArray(predicate)) {
2687
- const key = predicate[0];
2688
- const value = predicate[1];
2689
- return toSnakeCaseKeys.findKey(obj, matchesProperty(key, value));
2690
- }
2691
- return toSnakeCaseKeys.findKey(obj, matches(predicate));
2692
- }
2693
- if (typeof predicate === 'string') {
2694
- return toSnakeCaseKeys.findKey(obj, property(predicate));
2695
- }
2696
- }
2697
-
2698
- function forIn(object, iteratee = unary.identity) {
2699
- if (object == null) {
2700
- return object;
2701
- }
2702
- for (const key in object) {
2703
- const result = iteratee(object[key], key, object);
2704
- if (result === false) {
2705
- break;
2706
- }
2707
- }
2708
- return object;
2709
- }
2710
-
2711
- function forInRight(object, iteratee = unary.identity) {
2712
- if (object == null) {
2713
- return object;
2714
- }
2715
- const keys = [];
2716
- for (const key in object) {
2717
- keys.push(key);
2718
- }
2719
- for (let i = keys.length - 1; i >= 0; i--) {
2720
- const key = keys[i];
2721
- const result = iteratee(object[key], key, object);
2722
- if (result === false) {
2723
- break;
2724
- }
2725
- }
2726
- return object;
2727
- }
2728
-
2729
- function forOwn(object, iteratee = unary.identity) {
2730
- if (object == null) {
2731
- return object;
2732
- }
2733
- const iterable = Object(object);
2734
- const keys$1 = keys(object);
2735
- for (let i = 0; i < keys$1.length; ++i) {
2736
- const key = keys$1[i];
2737
- if (iteratee(iterable[key], key, iterable) === false) {
2738
- break;
2739
- }
2740
- }
2741
- return object;
2742
- }
2743
-
2744
- function forOwnRight(object, iteratee = unary.identity) {
2745
- if (object == null) {
2746
- return object;
2747
- }
2748
- const iterable = Object(object);
2749
- const keys$1 = keys(object);
2750
- for (let i = keys$1.length - 1; i >= 0; --i) {
2751
- const key = keys$1[i];
2752
- if (iteratee(iterable[key], key, iterable) === false) {
2753
- break;
2754
- }
2755
- }
2756
- return object;
2757
- }
2758
-
2759
- function fromPairs(pairs) {
2760
- if (!isArrayLike(pairs) && !(pairs instanceof Map)) {
2761
- return {};
2762
- }
2763
- const result = {};
2764
- for (const [key, value] of pairs) {
2765
- result[key] = value;
2766
- }
2767
- return result;
2768
- }
2769
-
2770
- function functions(object) {
2771
- if (object == null) {
2772
- return [];
2773
- }
2774
- return keys(object).filter(key => typeof object[key] === 'function');
2775
- }
2776
-
2777
- function functionsIn(object) {
2778
- if (object == null) {
2779
- return [];
2780
- }
2781
- const result = [];
2782
- for (const key in object) {
2783
- if (isPromise.isFunction(object[key])) {
2784
- result.push(key);
2785
- }
2786
- }
2787
- return result;
2788
- }
2789
-
2790
- function hasIn(object, path) {
2791
- let resolvedPath;
2792
- if (Array.isArray(path)) {
2793
- resolvedPath = path;
2794
- }
2795
- else if (typeof path === 'string' && isDeepKey(path) && object?.[path] == null) {
2796
- resolvedPath = toPath(path);
2797
- }
2798
- else {
2799
- resolvedPath = [path];
2800
- }
2801
- if (resolvedPath.length === 0) {
2802
- return false;
2803
- }
2804
- let current = object;
2805
- for (let i = 0; i < resolvedPath.length; i++) {
2806
- const key = resolvedPath[i];
2807
- if (current == null || !(key in Object(current))) {
2808
- const isSparseIndex = (Array.isArray(current) || isArguments(current)) && isIndex(key) && key < current.length;
2809
- if (!isSparseIndex) {
2810
- return false;
2811
- }
2812
- }
2813
- current = current[key];
2814
- }
2815
- return true;
2816
- }
2817
-
2818
- function invertBy(object, iteratee) {
2819
- const result = {};
2820
- if (isPromise.isNil(object)) {
2821
- return result;
2822
- }
2823
- if (iteratee == null) {
2824
- iteratee = unary.identity;
2825
- }
2826
- const keys = Object.keys(object);
2827
- for (let i = 0; i < keys.length; i++) {
2828
- const key = keys[i];
2829
- const value = object[key];
2830
- const valueStr = iteratee(value);
2831
- if (Array.isArray(result[valueStr])) {
2832
- result[valueStr].push(key);
2833
- }
2834
- else {
2835
- result[valueStr] = [key];
2836
- }
2837
- }
2838
- return result;
2839
- }
2840
-
2841
- function mapKeys(object, getNewKey) {
2842
- getNewKey = getNewKey ?? unary.identity;
2843
- switch (typeof getNewKey) {
2844
- case 'string':
2845
- case 'symbol':
2846
- case 'number':
2847
- case 'object': {
2848
- return toSnakeCaseKeys.mapKeys(object, property(getNewKey));
2849
- }
2850
- case 'function': {
2851
- return toSnakeCaseKeys.mapKeys(object, getNewKey);
2852
- }
2853
- }
2854
- }
2855
-
2856
- function mapValues(object, getNewValue) {
2857
- getNewValue = getNewValue ?? unary.identity;
2858
- switch (typeof getNewValue) {
2859
- case 'string':
2860
- case 'symbol':
2861
- case 'number':
2862
- case 'object': {
2863
- return toSnakeCaseKeys.mapValues(object, property(getNewValue));
2864
- }
2865
- case 'function': {
2866
- return toSnakeCaseKeys.mapValues(object, getNewValue);
2867
- }
2868
- }
2869
- }
2870
-
2871
- function mergeWith(object, ...otherArgs) {
2872
- const sources = otherArgs.slice(0, -1);
2873
- const merge = otherArgs[otherArgs.length - 1];
2874
- let result = object;
2875
- for (let i = 0; i < sources.length; i++) {
2876
- const source = sources[i];
2877
- result = mergeWithDeep(result, source, merge, new Map());
2878
- }
2879
- return result;
2880
- }
2881
- function mergeWithDeep(target, source, merge, stack) {
2882
- if (isPlainObject.isPrimitive(target)) {
2883
- target = Object(target);
2884
- }
2885
- if (source == null || typeof source !== 'object') {
2886
- return target;
2887
- }
2888
- if (stack.has(source)) {
2889
- return toSnakeCaseKeys.clone(stack.get(source));
2890
- }
2891
- stack.set(source, target);
2892
- if (Array.isArray(source)) {
2893
- source = source.slice();
2894
- for (let i = 0; i < source.length; i++) {
2895
- source[i] = source[i] ?? undefined;
2896
- }
2897
- }
2898
- const sourceKeys = [...Object.keys(source), ...isPlainObject.getSymbols(source)];
2899
- for (let i = 0; i < sourceKeys.length; i++) {
2900
- const key = sourceKeys[i];
2901
- let sourceValue = source[key];
2902
- let targetValue = target[key];
2903
- if (isArguments(sourceValue)) {
2904
- sourceValue = { ...sourceValue };
2905
- }
2906
- if (isArguments(targetValue)) {
2907
- targetValue = { ...targetValue };
2908
- }
2909
- if (typeof Buffer !== 'undefined' && Buffer.isBuffer(sourceValue)) {
2910
- sourceValue = cloneDeep(sourceValue);
2911
- }
2912
- if (Array.isArray(sourceValue)) {
2913
- if (typeof targetValue === 'object' && targetValue != null) {
2914
- const cloned = [];
2915
- const targetKeys = Reflect.ownKeys(targetValue);
2916
- for (let i = 0; i < targetKeys.length; i++) {
2917
- const targetKey = targetKeys[i];
2918
- cloned[targetKey] = targetValue[targetKey];
2919
- }
2920
- targetValue = cloned;
2921
- }
2922
- else {
2923
- targetValue = [];
2924
- }
2925
- }
2926
- const merged = merge(targetValue, sourceValue, key, target, source, stack);
2927
- if (merged != null) {
2928
- target[key] = merged;
2929
- }
2930
- else if (Array.isArray(sourceValue)) {
2931
- target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
2932
- }
2933
- else if (toSnakeCaseKeys.isObjectLike(targetValue) && toSnakeCaseKeys.isObjectLike(sourceValue)) {
2934
- target[key] = mergeWithDeep(targetValue, sourceValue, merge, stack);
2935
- }
2936
- else if (targetValue == null && toSnakeCaseKeys.isPlainObject(sourceValue)) {
2937
- target[key] = mergeWithDeep({}, sourceValue, merge, stack);
2938
- }
2939
- else if (targetValue == null && isTypedArray(sourceValue)) {
2940
- target[key] = cloneDeep(sourceValue);
2941
- }
2942
- else if (targetValue === undefined || sourceValue !== undefined) {
2943
- target[key] = sourceValue;
2944
- }
2945
- }
2946
- return target;
2947
- }
2948
-
2949
- function merge(object, ...sources) {
2950
- return mergeWith(object, ...sources, noop.noop);
2951
- }
2952
-
2953
- function omit(obj, ...keysArr) {
2954
- if (obj == null) {
2955
- return {};
2956
- }
2957
- const result = toSnakeCaseKeys.cloneDeep(obj);
2958
- for (let i = 0; i < keysArr.length; i++) {
2959
- let keys = keysArr[i];
2960
- switch (typeof keys) {
2961
- case 'object': {
2962
- if (!Array.isArray(keys)) {
2963
- keys = Array.from(keys);
2964
- }
2965
- for (let j = 0; j < keys.length; j++) {
2966
- const key = keys[j];
2967
- unset(result, key);
2968
- }
2969
- break;
2970
- }
2971
- case 'string':
2972
- case 'symbol':
2973
- case 'number': {
2974
- unset(result, keys);
2975
- break;
2976
- }
2977
- }
2978
- }
2979
- return result;
2980
- }
2981
-
2982
- function pick(obj, ...keysArr) {
2983
- if (isNil(obj)) {
2984
- return {};
2985
- }
2986
- const result = {};
2987
- for (let i = 0; i < keysArr.length; i++) {
2988
- let keys = keysArr[i];
2989
- switch (typeof keys) {
2990
- case 'object': {
2991
- if (!Array.isArray(keys)) {
2992
- if (isArrayLike(keys)) {
2993
- keys = Array.from(keys);
2994
- }
2995
- else {
2996
- keys = [keys];
2997
- }
2998
- }
2999
- break;
3000
- }
3001
- case 'string':
3002
- case 'symbol':
3003
- case 'number': {
3004
- keys = [keys];
3005
- break;
3006
- }
3007
- }
3008
- for (const key of keys) {
3009
- const value = get(obj, key);
3010
- if (value === undefined && !has(obj, key)) {
3011
- continue;
3012
- }
3013
- if (typeof key === 'string' && Object.hasOwn(obj, key)) {
3014
- result[key] = value;
3015
- }
3016
- else {
3017
- set(result, key, value);
3018
- }
3019
- }
3020
- }
3021
- return result;
3022
- }
3023
-
3024
- function getSymbolsIn(object) {
3025
- const result = [];
3026
- while (object) {
3027
- result.push(...isPlainObject.getSymbols(object));
3028
- object = Object.getPrototypeOf(object);
3029
- }
3030
- return result;
3031
- }
3032
-
3033
- function pickBy(obj, shouldPick) {
3034
- if (obj == null) {
3035
- return {};
3036
- }
3037
- const result = {};
3038
- if (shouldPick == null) {
3039
- return obj;
3040
- }
3041
- const keys = isArrayLike(obj) ? range$1.range(0, obj.length) : [...keysIn(obj), ...getSymbolsIn(obj)];
3042
- for (let i = 0; i < keys.length; i++) {
3043
- const key = (isSymbol(keys[i]) ? keys[i] : keys[i].toString());
3044
- const value = obj[key];
3045
- if (shouldPick(value, key, obj)) {
3046
- result[key] = value;
3047
- }
3048
- }
3049
- return result;
3050
- }
3051
-
3052
- function propertyOf(object) {
3053
- return function (path) {
3054
- return get(object, path);
3055
- };
3056
- }
3057
-
3058
- function toDefaulted(object, ...sources) {
3059
- const cloned = cloneDeep(object);
3060
- return defaults(cloned, ...sources);
3061
- }
3062
-
3063
- function mapToEntries(map) {
3064
- const arr = new Array(map.size);
3065
- const keys = map.keys();
3066
- const values = map.values();
3067
- for (let i = 0; i < arr.length; i++) {
3068
- arr[i] = [keys.next().value, values.next().value];
3069
- }
3070
- return arr;
3071
- }
3072
-
3073
- function setToEntries(set) {
3074
- const arr = new Array(set.size);
3075
- const values = set.values();
3076
- for (let i = 0; i < arr.length; i++) {
3077
- const value = values.next().value;
3078
- arr[i] = [value, value];
3079
- }
3080
- return arr;
3081
- }
3082
-
3083
- function toPairs(object) {
3084
- if (object instanceof Set) {
3085
- return setToEntries(object);
3086
- }
3087
- if (object instanceof Map) {
3088
- return mapToEntries(object);
3089
- }
3090
- const keys$1 = keys(object);
3091
- const result = new Array(keys$1.length);
3092
- for (let i = 0; i < keys$1.length; i++) {
3093
- const key = keys$1[i];
3094
- const value = object[key];
3095
- result[i] = [key, value];
3096
- }
3097
- return result;
3098
- }
3099
-
3100
- function toPairsIn(object) {
3101
- if (object instanceof Set) {
3102
- return setToEntries(object);
3103
- }
3104
- if (object instanceof Map) {
3105
- return mapToEntries(object);
3106
- }
3107
- const keys = keysIn(object);
3108
- const result = new Array(keys.length);
3109
- for (let i = 0; i < keys.length; i++) {
3110
- const key = keys[i];
3111
- const value = object[key];
3112
- result[i] = [key, value];
3113
- }
3114
- return result;
3115
- }
3116
-
3117
- function update(obj, path, updater) {
3118
- return updateWith(obj, path, updater, () => undefined);
3119
- }
3120
-
3121
- function values(object) {
3122
- return Object.values(object);
3123
- }
3124
-
3125
- function valuesIn(object) {
3126
- const keys = keysIn(object);
3127
- const result = new Array(keys.length);
3128
- for (let i = 0; i < keys.length; i++) {
3129
- const key = keys[i];
3130
- result[i] = object[key];
3131
- }
3132
- return result;
3133
- }
3134
-
3135
- function conformsTo(target, source) {
3136
- if (source == null) {
3137
- return true;
3138
- }
3139
- if (target == null) {
3140
- return Object.keys(source).length === 0;
3141
- }
3142
- const keys = Object.keys(source);
3143
- for (let i = 0; i < keys.length; i++) {
3144
- const key = keys[i];
3145
- const predicate = source[key];
3146
- const value = target[key];
3147
- if ((value === undefined && !(key in target)) || !predicate(value)) {
3148
- return false;
3149
- }
3150
- }
3151
- return true;
3152
- }
3153
-
3154
- function conforms(source) {
3155
- source = toSnakeCaseKeys.cloneDeep(source);
3156
- return function (object) {
3157
- return conformsTo(object, source);
3158
- };
3159
- }
3160
-
3161
- function isArrayBuffer(value) {
3162
- return isPromise.isArrayBuffer(value);
3163
- }
3164
-
3165
- function isBoolean(value) {
3166
- return typeof value === 'boolean' || value instanceof Boolean;
3167
- }
3168
-
3169
- function isBuffer(x) {
3170
- return isPromise.isBuffer(x);
3171
- }
3172
-
3173
- function isDate(value) {
3174
- return isPromise.isDate(value);
3175
- }
3176
-
3177
- function isElement(value) {
3178
- return toSnakeCaseKeys.isObjectLike(value) && value.nodeType === 1 && !toSnakeCaseKeys.isPlainObject(value);
3179
- }
3180
-
3181
- function isEmpty(value) {
3182
- if (value == null) {
3183
- return true;
3184
- }
3185
- if (isArrayLike(value)) {
3186
- if (typeof value.splice !== 'function' &&
3187
- typeof value !== 'string' &&
3188
- (typeof Buffer === 'undefined' || !Buffer.isBuffer(value)) &&
3189
- !isTypedArray(value) &&
3190
- !isArguments(value)) {
3191
- return false;
3192
- }
3193
- return value.length === 0;
3194
- }
3195
- if (typeof value === 'object') {
3196
- if (value instanceof Map || value instanceof Set) {
3197
- return value.size === 0;
3198
- }
3199
- const keys = Object.keys(value);
3200
- if (isPrototype(value)) {
3201
- return keys.filter(x => x !== 'constructor').length === 0;
3202
- }
3203
- return keys.length === 0;
3204
- }
3205
- return true;
3206
- }
3207
-
3208
- function isEqualWith(a, b, areValuesEqual = noop.noop) {
3209
- if (typeof areValuesEqual !== 'function') {
3210
- areValuesEqual = noop.noop;
3211
- }
3212
- return isPromise.isEqualWith(a, b, (...args) => {
3213
- const result = areValuesEqual(...args);
3214
- if (result !== undefined) {
3215
- return Boolean(result);
3216
- }
3217
- if (a instanceof Map && b instanceof Map) {
3218
- return isEqualWith(Array.from(a), Array.from(b), unary.after(2, areValuesEqual));
3219
- }
3220
- if (a instanceof Set && b instanceof Set) {
3221
- return isEqualWith(Array.from(a), Array.from(b), unary.after(2, areValuesEqual));
3222
- }
3223
- });
3224
- }
3225
-
3226
- function isError(value) {
3227
- return isPlainObject.getTag(value) === '[object Error]';
3228
- }
3229
-
3230
- function isFinite(value) {
3231
- return Number.isFinite(value);
3232
- }
3233
-
3234
- function isInteger(value) {
3235
- return Number.isInteger(value);
3236
- }
3237
-
3238
- function isMap(value) {
3239
- return isPromise.isMap(value);
3240
- }
3241
-
3242
- function isRegExp(value) {
3243
- return isPromise.isRegExp(value);
3244
- }
3245
-
3246
- function isSafeInteger(value) {
3247
- return Number.isSafeInteger(value);
3248
- }
3249
-
3250
- function isSet(value) {
3251
- return isPromise.isSet(value);
3252
- }
3253
-
3254
- function isWeakMap(value) {
3255
- return isPromise.isWeakMap(value);
3256
- }
3257
-
3258
- function isWeakSet(value) {
3259
- return isPromise.isWeakSet(value);
3260
- }
3261
-
3262
- function normalizeForCase(str) {
3263
- if (typeof str !== 'string') {
3264
- str = toString(str);
3265
- }
3266
- return str.replace(/['\u2019]/g, '');
3267
- }
3268
-
3269
- function camelCase(str) {
3270
- return snakeCase$1.camelCase(normalizeForCase(str));
3271
- }
3272
-
3273
- function deburr(str) {
3274
- return snakeCase$1.deburr(toString(str));
3275
- }
3276
-
3277
- function endsWith(str, target, position = str.length) {
3278
- return str.endsWith(target, position);
3279
- }
3280
-
3281
- function escape(string) {
3282
- return reverseString.escape(toString(string));
3283
- }
3284
-
3285
- function escapeRegExp(str) {
3286
- return reverseString.escapeRegExp(toString(str));
3287
- }
3288
-
3289
- function kebabCase(str) {
3290
- return reverseString.kebabCase(normalizeForCase(str));
3291
- }
3292
-
3293
- function lowerCase(str) {
3294
- return reverseString.lowerCase(normalizeForCase(str));
3295
- }
3296
-
3297
- function lowerFirst(str) {
3298
- return reverseString.lowerFirst(toString(str));
3299
- }
3300
-
3301
- function pad(str, length, chars = ' ') {
3302
- return reverseString.pad(toString(str), length, chars);
3303
- }
3304
-
3305
- function padEnd(str, length = 0, chars = ' ') {
3306
- return toString(str).padEnd(length, chars);
3307
- }
3308
-
3309
- function padStart(str, length = 0, chars = ' ') {
3310
- return toString(str).padStart(length, chars);
3311
- }
3312
-
3313
- function repeat(str, n) {
3314
- return str.repeat(n);
3315
- }
3316
-
3317
- function replace(target = '', pattern, replacement) {
3318
- if (arguments.length < 3) {
3319
- return toString(target);
3320
- }
3321
- return toString(target).replace(pattern, replacement);
3322
- }
3323
-
3324
- function snakeCase(str) {
3325
- return snakeCase$1.snakeCase(normalizeForCase(str));
3326
- }
3327
-
3328
- function split(string = '', separator, limit) {
3329
- return toString(string).split(separator, limit);
3330
- }
3331
-
3332
- function startCase(str) {
3333
- const words = snakeCase$1.words(normalizeForCase(str).trim());
3334
- let result = '';
3335
- for (let i = 0; i < words.length; i++) {
3336
- const word = words[i];
3337
- if (result) {
3338
- result += ' ';
3339
- }
3340
- if (word === word.toUpperCase()) {
3341
- result += word;
3342
- }
3343
- else {
3344
- result += word[0].toUpperCase() + word.slice(1).toLowerCase();
3345
- }
3346
- }
3347
- return result;
3348
- }
3349
-
3350
- function startsWith(str, target, position = 0) {
3351
- return str.startsWith(target, position);
3352
- }
3353
-
3354
- const esTemplateRegExp = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
3355
- const unEscapedRegExp = /['\n\r\u2028\u2029\\]/g;
3356
- const noMatchExp = /($^)/;
3357
- const escapeMap = new Map([
3358
- ['\\', '\\'],
3359
- ["'", "'"],
3360
- ['\n', 'n'],
3361
- ['\r', 'r'],
3362
- ['\u2028', 'u2028'],
3363
- ['\u2029', 'u2029'],
3364
- ]);
3365
- function escapeString(match) {
3366
- return `\\${escapeMap.get(match)}`;
3367
- }
3368
- const templateSettings = {
3369
- escape: /<%-([\s\S]+?)%>/g,
3370
- evaluate: /<%([\s\S]+?)%>/g,
3371
- interpolate: /<%=([\s\S]+?)%>/g,
3372
- variable: '',
3373
- imports: {
3374
- _: {
3375
- escape,
3376
- template,
3377
- },
3378
- },
3379
- };
3380
- function template(string, options, guard) {
3381
- string = toString(string);
3382
- if (guard) {
3383
- options = templateSettings;
3384
- }
3385
- options = defaults({ ...options }, templateSettings);
3386
- const delimitersRegExp = new RegExp([
3387
- options.escape?.source ?? noMatchExp.source,
3388
- options.interpolate?.source ?? noMatchExp.source,
3389
- options.interpolate ? esTemplateRegExp.source : noMatchExp.source,
3390
- options.evaluate?.source ?? noMatchExp.source,
3391
- '$',
3392
- ].join('|'), 'g');
3393
- let lastIndex = 0;
3394
- let isEvaluated = false;
3395
- let source = `__p += ''`;
3396
- for (const match of string.matchAll(delimitersRegExp)) {
3397
- const [fullMatch, escapeValue, interpolateValue, esTemplateValue, evaluateValue] = match;
3398
- const { index } = match;
3399
- source += ` + '${string.slice(lastIndex, index).replace(unEscapedRegExp, escapeString)}'`;
3400
- if (escapeValue) {
3401
- source += ` + _.escape(${escapeValue})`;
3402
- }
3403
- if (interpolateValue) {
3404
- source += ` + ((${interpolateValue}) == null ? '' : ${interpolateValue})`;
3405
- }
3406
- else if (esTemplateValue) {
3407
- source += ` + ((${esTemplateValue}) == null ? '' : ${esTemplateValue})`;
3408
- }
3409
- if (evaluateValue) {
3410
- source += `;\n${evaluateValue};\n __p += ''`;
3411
- isEvaluated = true;
3412
- }
3413
- lastIndex = index + fullMatch.length;
3414
- }
3415
- const imports = defaults({ ...options.imports }, templateSettings.imports);
3416
- const importsKeys = Object.keys(imports);
3417
- const importValues = Object.values(imports);
3418
- const sourceURL = `//# sourceURL=${options.sourceURL ? String(options.sourceURL).replace(/[\r\n]/g, ' ') : `es-toolkit.templateSource[${Date.now()}]`}\n`;
3419
- const compiledFunction = `function(${options.variable || 'obj'}) {
3420
- let __p = '';
3421
- ${options.variable ? '' : 'if (obj == null) { obj = {}; }'}
3422
- ${isEvaluated ? `function print() { __p += Array.prototype.join.call(arguments, ''); }` : ''}
3423
- ${options.variable ? source : `with(obj) {\n${source}\n}`}
3424
- return __p;
3425
- }`;
3426
- const result = attempt(() => new Function(...importsKeys, `${sourceURL}return ${compiledFunction}`)(...importValues));
3427
- result.source = compiledFunction;
3428
- if (result instanceof Error) {
3429
- throw result;
3430
- }
3431
- return result;
3432
- }
3433
-
3434
- function toLower(value) {
3435
- return toString(value).toLowerCase();
3436
- }
3437
-
3438
- function toUpper(value) {
3439
- return toString(value).toUpperCase();
3440
- }
3441
-
3442
- function trim(str, chars, guard) {
3443
- if (str == null) {
3444
- return '';
3445
- }
3446
- if (guard != null || chars == null) {
3447
- return str.toString().trim();
3448
- }
3449
- switch (typeof chars) {
3450
- case 'string': {
3451
- return reverseString.trim(str, chars.toString().split(''));
3452
- }
3453
- case 'object': {
3454
- if (Array.isArray(chars)) {
3455
- return reverseString.trim(str, chars.flatMap(x => x.toString().split('')));
3456
- }
3457
- else {
3458
- return reverseString.trim(str, chars.toString().split(''));
3459
- }
3460
- }
3461
- }
3462
- }
3463
-
3464
- function trimEnd(str, chars, guard) {
3465
- if (str == null) {
3466
- return '';
3467
- }
3468
- if (guard != null || chars == null) {
3469
- return str.toString().trimEnd();
3470
- }
3471
- switch (typeof chars) {
3472
- case 'string': {
3473
- return reverseString.trimEnd(str, chars.toString().split(''));
3474
- }
3475
- case 'object': {
3476
- if (Array.isArray(chars)) {
3477
- return reverseString.trimEnd(str, chars.flatMap(x => x.toString().split('')));
3478
- }
3479
- else {
3480
- return reverseString.trimEnd(str, chars.toString().split(''));
3481
- }
3482
- }
3483
- }
3484
- }
3485
-
3486
- function trimStart(str, chars, guard) {
3487
- if (str == null) {
3488
- return '';
3489
- }
3490
- if (guard != null || chars == null) {
3491
- return str.toString().trimStart();
3492
- }
3493
- switch (typeof chars) {
3494
- case 'string': {
3495
- return reverseString.trimStart(str, chars.toString().split(''));
3496
- }
3497
- case 'object': {
3498
- if (Array.isArray(chars)) {
3499
- return reverseString.trimStart(str, chars.flatMap(x => x.toString().split('')));
3500
- }
3501
- else {
3502
- return reverseString.trimStart(str, chars.toString().split(''));
3503
- }
3504
- }
3505
- }
3506
- }
3507
-
3508
- function unescape(str) {
3509
- return reverseString.unescape(toString(str));
3510
- }
3511
-
3512
- function upperCase(str) {
3513
- return reverseString.upperCase(normalizeForCase(str));
3514
- }
3515
-
3516
- function upperFirst(str) {
3517
- return reverseString.upperFirst(toString(str));
3518
- }
3519
-
3520
- function words(str, pattern = snakeCase$1.CASE_SPLIT_PATTERN) {
3521
- const input = toString(str);
3522
- const words = Array.from(input.match(pattern) ?? []);
3523
- return words.filter(x => x !== '');
3524
- }
3525
-
3526
- function cond(pairs) {
3527
- const length = pairs.length;
3528
- const processedPairs = pairs.map(pair => {
3529
- const predicate = pair[0];
3530
- const func = pair[1];
3531
- if (!isPromise.isFunction(func)) {
3532
- throw new TypeError('Expected a function');
3533
- }
3534
- return [iteratee(predicate), func];
3535
- });
3536
- return function (...args) {
3537
- for (let i = 0; i < length; i++) {
3538
- const pair = processedPairs[i];
3539
- const predicate = pair[0];
3540
- const func = pair[1];
3541
- if (predicate.apply(this, args)) {
3542
- return func.apply(this, args);
3543
- }
3544
- }
3545
- };
3546
- }
3547
-
3548
- function constant(value) {
3549
- return () => value;
3550
- }
3551
-
3552
- function defaultTo(value, defaultValue) {
3553
- if (value == null || Number.isNaN(value)) {
3554
- return defaultValue;
3555
- }
3556
- return value;
3557
- }
3558
-
3559
- function gt(value, other) {
3560
- if (typeof value === 'string' && typeof other === 'string') {
3561
- return value > other;
3562
- }
3563
- return toNumber(value) > toNumber(other);
3564
- }
3565
-
3566
- function gte(value, other) {
3567
- if (typeof value === 'string' && typeof other === 'string') {
3568
- return value >= other;
3569
- }
3570
- return toNumber(value) >= toNumber(other);
3571
- }
3572
-
3573
- function invoke(object, path, args = []) {
3574
- if (object == null) {
3575
- return;
3576
- }
3577
- switch (typeof path) {
3578
- case 'string': {
3579
- if (typeof object === 'object' && Object.hasOwn(object, path)) {
3580
- return invokeImpl(object, [path], args);
3581
- }
3582
- return invokeImpl(object, toPath(path), args);
3583
- }
3584
- case 'number':
3585
- case 'symbol': {
3586
- return invokeImpl(object, [path], args);
3587
- }
3588
- default: {
3589
- if (Array.isArray(path)) {
3590
- return invokeImpl(object, path, args);
3591
- }
3592
- else {
3593
- return invokeImpl(object, [path], args);
3594
- }
3595
- }
3596
- }
3597
- }
3598
- function invokeImpl(object, path, args) {
3599
- const parent = get(object, path.slice(0, -1), object);
3600
- if (parent == null) {
3601
- return undefined;
3602
- }
3603
- let lastKey = last(path);
3604
- const lastValue = lastKey?.valueOf();
3605
- if (typeof lastValue === 'number') {
3606
- lastKey = toKey(lastValue);
3607
- }
3608
- else {
3609
- lastKey = String(lastKey);
3610
- }
3611
- const func = get(parent, lastKey);
3612
- return func?.apply(parent, args);
3613
- }
3614
-
3615
- function lt(value, other) {
3616
- if (typeof value === 'string' && typeof other === 'string') {
3617
- return value < other;
3618
- }
3619
- return toNumber(value) < toNumber(other);
3620
- }
3621
-
3622
- function lte(value, other) {
3623
- if (typeof value === 'string' && typeof other === 'string') {
3624
- return value <= other;
3625
- }
3626
- return toNumber(value) <= toNumber(other);
3627
- }
3628
-
3629
- function method(path, ...args) {
3630
- return function (object) {
3631
- return invoke(object, path, args);
3632
- };
3633
- }
3634
-
3635
- function methodOf(object, ...args) {
3636
- return function (path) {
3637
- return invoke(object, path, args);
3638
- };
3639
- }
3640
-
3641
- function now() {
3642
- return Date.now();
3643
- }
3644
-
3645
- function over(...iteratees) {
3646
- if (iteratees.length === 1 && Array.isArray(iteratees[0])) {
3647
- iteratees = iteratees[0];
3648
- }
3649
- const funcs = iteratees.map(item => iteratee(item));
3650
- return function (...args) {
3651
- return funcs.map(func => func.apply(this, args));
3652
- };
3653
- }
3654
-
3655
- function overEvery(...predicates) {
3656
- return function (...values) {
3657
- for (let i = 0; i < predicates.length; ++i) {
3658
- const predicate = predicates[i];
3659
- if (!Array.isArray(predicate)) {
3660
- if (!iteratee(predicate).apply(this, values)) {
3661
- return false;
3662
- }
3663
- continue;
3664
- }
3665
- for (let j = 0; j < predicate.length; ++j) {
3666
- if (!iteratee(predicate[j]).apply(this, values)) {
3667
- return false;
3668
- }
3669
- }
3670
- }
3671
- return true;
3672
- };
3673
- }
3674
-
3675
- function overSome(...predicates) {
3676
- return function (...values) {
3677
- for (let i = 0; i < predicates.length; ++i) {
3678
- const predicate = predicates[i];
3679
- if (!Array.isArray(predicate)) {
3680
- if (iteratee(predicate).apply(this, values)) {
3681
- return true;
3682
- }
3683
- continue;
3684
- }
3685
- for (let j = 0; j < predicate.length; ++j) {
3686
- if (iteratee(predicate[j]).apply(this, values)) {
3687
- return true;
3688
- }
3689
- }
3690
- }
3691
- return false;
3692
- };
3693
- }
3694
-
3695
- function stubArray() {
3696
- return [];
3697
- }
3698
-
3699
- function stubFalse() {
3700
- return false;
3701
- }
3702
-
3703
- function stubObject() {
3704
- return {};
3705
- }
3706
-
3707
- function stubString() {
3708
- return '';
3709
- }
3710
-
3711
- function stubTrue() {
3712
- return true;
3713
- }
3714
-
3715
- function toArray(value) {
3716
- if (value == null) {
3717
- return [];
3718
- }
3719
- if (isArrayLike(value) || isMap(value)) {
3720
- return Array.from(value);
3721
- }
3722
- if (typeof value === 'object') {
3723
- return Object.values(value);
3724
- }
3725
- return [];
3726
- }
3727
-
3728
- const MAX_ARRAY_LENGTH = 4_294_967_295;
3729
-
3730
- function toLength(value) {
3731
- if (value == null) {
3732
- return 0;
3733
- }
3734
- const length = Math.floor(Number(value));
3735
- return clamp(length, 0, MAX_ARRAY_LENGTH);
3736
- }
3737
-
3738
- function toPlainObject(value) {
3739
- const plainObject = {};
3740
- const valueKeys = keysIn(value);
3741
- for (let i = 0; i < valueKeys.length; i++) {
3742
- const key = valueKeys[i];
3743
- const objValue = value[key];
3744
- if (key === '__proto__') {
3745
- Object.defineProperty(plainObject, key, {
3746
- configurable: true,
3747
- enumerable: true,
3748
- value: objValue,
3749
- writable: true,
3750
- });
3751
- }
3752
- else {
3753
- plainObject[key] = objValue;
3754
- }
3755
- }
3756
- return plainObject;
3757
- }
3758
-
3759
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
3760
-
3761
- function toSafeInteger(value) {
3762
- if (value == null) {
3763
- return 0;
3764
- }
3765
- return clamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
3766
- }
3767
-
3768
- let idCounter = 0;
3769
- function uniqueId(prefix = '') {
3770
- const id = ++idCounter;
3771
- return `${prefix}${id}`;
3772
- }
3773
-
3774
- exports.countBy = zip$1.countBy;
3775
- exports.flatMapDeep = zip$1.flatMapDeep;
3776
- exports.groupBy = zip$1.groupBy;
3777
- exports.initial = zip$1.initial;
3778
- exports.isSubset = zip$1.isSubset;
3779
- exports.isSubsetWith = zip$1.isSubsetWith;
3780
- exports.keyBy = zip$1.keyBy;
3781
- exports.sampleSize = zip$1.sampleSize;
3782
- exports.shuffle = zip$1.shuffle;
3783
- exports.toFilled = zip$1.toFilled;
3784
- exports.unzipWith = zip$1.unzipWith;
3785
- exports.windowed = zip$1.windowed;
3786
- exports.xor = zip$1.xor;
3787
- exports.xorBy = zip$1.xorBy;
3788
- exports.xorWith = zip$1.xorWith;
20
+ exports.at = zipWith.at;
21
+ exports.countBy = zipWith.countBy;
22
+ exports.flatMap = zipWith.flatMap;
23
+ exports.flatMapDeep = zipWith.flatMapDeep;
24
+ exports.forEachRight = zipWith.forEachRight;
25
+ exports.groupBy = zipWith.groupBy;
26
+ exports.initial = zipWith.initial;
27
+ exports.isSubset = zipWith.isSubset;
28
+ exports.isSubsetWith = zipWith.isSubsetWith;
29
+ exports.keyBy = zipWith.keyBy;
30
+ exports.partition = zipWith.partition;
31
+ exports.pullAt = zipWith.pullAt;
32
+ exports.sampleSize = zipWith.sampleSize;
33
+ exports.shuffle = zipWith.shuffle;
34
+ exports.toFilled = zipWith.toFilled;
35
+ exports.unzipWith = zipWith.unzipWith;
36
+ exports.windowed = zipWith.windowed;
37
+ exports.xor = zipWith.xor;
38
+ exports.xorBy = zipWith.xorBy;
39
+ exports.xorWith = zipWith.xorWith;
40
+ exports.zipObject = zipWith.zipObject;
41
+ exports.zipWith = zipWith.zipWith;
3789
42
  exports.AbortError = AbortError.AbortError;
3790
43
  exports.TimeoutError = error_index.TimeoutError;
3791
44
  exports.asyncNoop = unary.asyncNoop;
@@ -3795,26 +48,256 @@ exports.once = unary.once;
3795
48
  exports.retry = unary.retry;
3796
49
  exports.unary = unary.unary;
3797
50
  exports.noop = noop.noop;
3798
- exports.partial = partialRight.partial;
3799
- exports.partialRight = partialRight.partialRight;
3800
- exports.median = range$1.median;
3801
- exports.medianBy = range$1.medianBy;
51
+ exports.median = range.median;
52
+ exports.medianBy = range.medianBy;
3802
53
  exports.randomInt = randomInt.randomInt;
3803
- exports.bind = toSnakeCaseKeys.bind;
3804
- exports.bindKey = toSnakeCaseKeys.bindKey;
3805
- exports.clone = toSnakeCaseKeys.clone;
3806
- exports.curry = toSnakeCaseKeys.curry;
3807
- exports.curryRight = toSnakeCaseKeys.curryRight;
3808
- exports.flattenObject = toSnakeCaseKeys.flattenObject;
3809
- exports.invert = toSnakeCaseKeys.invert;
3810
- exports.isArray = toSnakeCaseKeys.isArray;
3811
- exports.isObjectLike = toSnakeCaseKeys.isObjectLike;
3812
- exports.isPlainObject = toSnakeCaseKeys.isPlainObject;
3813
- exports.omitBy = toSnakeCaseKeys.omitBy;
3814
- exports.toCamelCaseKeys = toSnakeCaseKeys.toCamelCaseKeys;
3815
- exports.toMerged = toSnakeCaseKeys.toMerged;
3816
- exports.toSnakeCaseKeys = toSnakeCaseKeys.toSnakeCaseKeys;
3817
- exports.isPrimitive = isPlainObject.isPrimitive;
54
+ exports.add = compat_index.add;
55
+ exports.after = compat_index.after;
56
+ exports.ary = compat_index.ary;
57
+ exports.assign = compat_index.assign;
58
+ exports.assignIn = compat_index.assignIn;
59
+ exports.assignInWith = compat_index.assignInWith;
60
+ exports.assignWith = compat_index.assignWith;
61
+ exports.attempt = compat_index.attempt;
62
+ exports.before = compat_index.before;
63
+ exports.bind = compat_index.bind;
64
+ exports.bindKey = compat_index.bindKey;
65
+ exports.camelCase = compat_index.camelCase;
66
+ exports.castArray = compat_index.castArray;
67
+ exports.ceil = compat_index.ceil;
68
+ exports.chunk = compat_index.chunk;
69
+ exports.clamp = compat_index.clamp;
70
+ exports.clone = compat_index.clone;
71
+ exports.cloneDeep = compat_index.cloneDeep$1;
72
+ exports.cloneDeepWith = compat_index.cloneDeepWith$1;
73
+ exports.compact = compat_index.compact;
74
+ exports.concat = compat_index.concat;
75
+ exports.cond = compat_index.cond;
76
+ exports.conforms = compat_index.conforms;
77
+ exports.conformsTo = compat_index.conformsTo;
78
+ exports.constant = compat_index.constant;
79
+ exports.create = compat_index.create;
80
+ exports.curry = compat_index.curry;
81
+ exports.curryRight = compat_index.curryRight;
82
+ exports.debounce = compat_index.debounce;
83
+ exports.deburr = compat_index.deburr;
84
+ exports.default = compat_index.toolkit;
85
+ exports.defaultTo = compat_index.defaultTo;
86
+ exports.defaults = compat_index.defaults;
87
+ exports.defer = compat_index.defer;
88
+ exports.delay = compat_index.delay;
89
+ exports.difference = compat_index.difference;
90
+ exports.differenceBy = compat_index.differenceBy;
91
+ exports.differenceWith = compat_index.differenceWith;
92
+ exports.divide = compat_index.divide;
93
+ exports.drop = compat_index.drop;
94
+ exports.dropRight = compat_index.dropRight;
95
+ exports.dropRightWhile = compat_index.dropRightWhile;
96
+ exports.dropWhile = compat_index.dropWhile;
97
+ exports.each = compat_index.forEach;
98
+ exports.endsWith = compat_index.endsWith;
99
+ exports.escape = compat_index.escape;
100
+ exports.escapeRegExp = compat_index.escapeRegExp;
101
+ exports.every = compat_index.every;
102
+ exports.extend = compat_index.assignIn;
103
+ exports.extendWith = compat_index.assignInWith;
104
+ exports.fill = compat_index.fill;
105
+ exports.filter = compat_index.filter;
106
+ exports.find = compat_index.find;
107
+ exports.findIndex = compat_index.findIndex;
108
+ exports.findKey = compat_index.findKey$1;
109
+ exports.findLast = compat_index.findLast;
110
+ exports.findLastIndex = compat_index.findLastIndex;
111
+ exports.first = compat_index.head;
112
+ exports.flatten = compat_index.flatten;
113
+ exports.flattenDeep = compat_index.flattenDeep;
114
+ exports.flattenDepth = compat_index.flattenDepth;
115
+ exports.flattenObject = compat_index.flattenObject;
116
+ exports.flip = compat_index.flip;
117
+ exports.floor = compat_index.floor;
118
+ exports.flow = compat_index.flow;
119
+ exports.flowRight = compat_index.flowRight;
120
+ exports.forEach = compat_index.forEach;
121
+ exports.fromPairs = compat_index.fromPairs;
122
+ exports.functions = compat_index.functions;
123
+ exports.functionsIn = compat_index.functionsIn;
124
+ exports.get = compat_index.get;
125
+ exports.gt = compat_index.gt;
126
+ exports.gte = compat_index.gte;
127
+ exports.has = compat_index.has;
128
+ exports.head = compat_index.head;
129
+ exports.inRange = compat_index.inRange;
130
+ exports.includes = compat_index.includes;
131
+ exports.indexOf = compat_index.indexOf;
132
+ exports.intersection = compat_index.intersection;
133
+ exports.intersectionBy = compat_index.intersectionBy;
134
+ exports.intersectionWith = compat_index.intersectionWith;
135
+ exports.invert = compat_index.invert;
136
+ exports.invertBy = compat_index.invertBy;
137
+ exports.invoke = compat_index.invoke;
138
+ exports.isArguments = compat_index.isArguments;
139
+ exports.isArray = compat_index.isArray;
140
+ exports.isArrayBuffer = compat_index.isArrayBuffer;
141
+ exports.isArrayLike = compat_index.isArrayLike;
142
+ exports.isArrayLikeObject = compat_index.isArrayLikeObject;
143
+ exports.isBoolean = compat_index.isBoolean;
144
+ exports.isBuffer = compat_index.isBuffer;
145
+ exports.isDate = compat_index.isDate;
146
+ exports.isElement = compat_index.isElement;
147
+ exports.isEmpty = compat_index.isEmpty;
148
+ exports.isEqualWith = compat_index.isEqualWith;
149
+ exports.isError = compat_index.isError;
150
+ exports.isFinite = compat_index.isFinite;
151
+ exports.isInteger = compat_index.isInteger;
152
+ exports.isMap = compat_index.isMap;
153
+ exports.isMatch = compat_index.isMatch;
154
+ exports.isNaN = compat_index.isNaN;
155
+ exports.isNil = compat_index.isNil;
156
+ exports.isNumber = compat_index.isNumber;
157
+ exports.isObject = compat_index.isObject;
158
+ exports.isObjectLike = compat_index.isObjectLike;
159
+ exports.isPlainObject = compat_index.isPlainObject;
160
+ exports.isRegExp = compat_index.isRegExp;
161
+ exports.isSafeInteger = compat_index.isSafeInteger;
162
+ exports.isSet = compat_index.isSet;
163
+ exports.isString = compat_index.isString;
164
+ exports.isSymbol = compat_index.isSymbol;
165
+ exports.isTypedArray = compat_index.isTypedArray;
166
+ exports.isWeakMap = compat_index.isWeakMap;
167
+ exports.isWeakSet = compat_index.isWeakSet;
168
+ exports.iteratee = compat_index.iteratee;
169
+ exports.join = compat_index.join;
170
+ exports.kebabCase = compat_index.kebabCase;
171
+ exports.keys = compat_index.keys;
172
+ exports.keysIn = compat_index.keysIn;
173
+ exports.last = compat_index.last;
174
+ exports.lastIndexOf = compat_index.lastIndexOf;
175
+ exports.lowerCase = compat_index.lowerCase;
176
+ exports.lowerFirst = compat_index.lowerFirst;
177
+ exports.lt = compat_index.lt;
178
+ exports.lte = compat_index.lte;
179
+ exports.map = compat_index.map;
180
+ exports.mapKeys = compat_index.mapKeys$1;
181
+ exports.mapValues = compat_index.mapValues$1;
182
+ exports.matches = compat_index.matches;
183
+ exports.matchesProperty = compat_index.matchesProperty;
184
+ exports.max = compat_index.max;
185
+ exports.maxBy = compat_index.maxBy;
186
+ exports.mean = compat_index.mean;
187
+ exports.meanBy = compat_index.meanBy;
188
+ exports.merge = compat_index.merge$1;
189
+ exports.mergeWith = compat_index.mergeWith;
190
+ exports.method = compat_index.method;
191
+ exports.methodOf = compat_index.methodOf;
192
+ exports.min = compat_index.min;
193
+ exports.minBy = compat_index.minBy;
194
+ exports.multiply = compat_index.multiply;
195
+ exports.negate = compat_index.negate;
196
+ exports.now = compat_index.now;
197
+ exports.nth = compat_index.nth;
198
+ exports.nthArg = compat_index.nthArg;
199
+ exports.omit = compat_index.omit;
200
+ exports.omitBy = compat_index.omitBy;
201
+ exports.orderBy = compat_index.orderBy;
202
+ exports.over = compat_index.over;
203
+ exports.pad = compat_index.pad;
204
+ exports.padEnd = compat_index.padEnd;
205
+ exports.padStart = compat_index.padStart;
206
+ exports.parseInt = compat_index.parseInt;
207
+ exports.partial = compat_index.partial;
208
+ exports.partialRight = compat_index.partialRight;
209
+ exports.pick = compat_index.pick;
210
+ exports.pickBy = compat_index.pickBy;
211
+ exports.property = compat_index.property;
212
+ exports.propertyOf = compat_index.propertyOf;
213
+ exports.pull = compat_index.pull;
214
+ exports.pullAll = compat_index.pullAll;
215
+ exports.pullAllBy = compat_index.pullAllBy;
216
+ exports.random = compat_index.random;
217
+ exports.range = compat_index.range;
218
+ exports.rangeRight = compat_index.rangeRight;
219
+ exports.rearg = compat_index.rearg;
220
+ exports.reduce = compat_index.reduce;
221
+ exports.reduceRight = compat_index.reduceRight;
222
+ exports.reject = compat_index.reject;
223
+ exports.remove = compat_index.remove;
224
+ exports.repeat = compat_index.repeat;
225
+ exports.replace = compat_index.replace;
226
+ exports.rest = compat_index.rest;
227
+ exports.reverse = compat_index.reverse;
228
+ exports.round = compat_index.round;
229
+ exports.sample = compat_index.sample;
230
+ exports.set = compat_index.set;
231
+ exports.size = compat_index.size;
232
+ exports.slice = compat_index.slice;
233
+ exports.snakeCase = compat_index.snakeCase;
234
+ exports.some = compat_index.some;
235
+ exports.sortBy = compat_index.sortBy;
236
+ exports.sortedIndex = compat_index.sortedIndex;
237
+ exports.sortedIndexBy = compat_index.sortedIndexBy;
238
+ exports.sortedIndexOf = compat_index.sortedIndexOf;
239
+ exports.sortedLastIndex = compat_index.sortedLastIndex;
240
+ exports.sortedLastIndexBy = compat_index.sortedLastIndexBy;
241
+ exports.spread = compat_index.spread;
242
+ exports.startCase = compat_index.startCase;
243
+ exports.startsWith = compat_index.startsWith;
244
+ exports.stubArray = compat_index.stubArray;
245
+ exports.stubFalse = compat_index.stubFalse;
246
+ exports.stubObject = compat_index.stubObject;
247
+ exports.stubString = compat_index.stubString;
248
+ exports.stubTrue = compat_index.stubTrue;
249
+ exports.subtract = compat_index.subtract;
250
+ exports.sum = compat_index.sum;
251
+ exports.sumBy = compat_index.sumBy;
252
+ exports.tail = compat_index.tail;
253
+ exports.take = compat_index.take;
254
+ exports.takeRight = compat_index.takeRight;
255
+ exports.takeRightWhile = compat_index.takeRightWhile;
256
+ exports.takeWhile = compat_index.takeWhile;
257
+ exports.template = compat_index.template;
258
+ exports.templateSettings = compat_index.templateSettings;
259
+ exports.throttle = compat_index.throttle;
260
+ exports.times = compat_index.times;
261
+ exports.toArray = compat_index.toArray;
262
+ exports.toCamelCaseKeys = compat_index.toCamelCaseKeys;
263
+ exports.toDefaulted = compat_index.toDefaulted;
264
+ exports.toFinite = compat_index.toFinite;
265
+ exports.toInteger = compat_index.toInteger;
266
+ exports.toLength = compat_index.toLength;
267
+ exports.toLower = compat_index.toLower;
268
+ exports.toMerged = compat_index.toMerged;
269
+ exports.toNumber = compat_index.toNumber;
270
+ exports.toPairs = compat_index.toPairs;
271
+ exports.toPairsIn = compat_index.toPairsIn;
272
+ exports.toPath = compat_index.toPath;
273
+ exports.toPlainObject = compat_index.toPlainObject;
274
+ exports.toSafeInteger = compat_index.toSafeInteger;
275
+ exports.toSnakeCaseKeys = compat_index.toSnakeCaseKeys;
276
+ exports.toString = compat_index.toString;
277
+ exports.toUpper = compat_index.toUpper;
278
+ exports.trim = compat_index.trim;
279
+ exports.trimEnd = compat_index.trimEnd;
280
+ exports.trimStart = compat_index.trimStart;
281
+ exports.unescape = compat_index.unescape;
282
+ exports.union = compat_index.union;
283
+ exports.unionBy = compat_index.unionBy;
284
+ exports.unionWith = compat_index.unionWith;
285
+ exports.uniq = compat_index.uniq;
286
+ exports.uniqBy = compat_index.uniqBy;
287
+ exports.uniqWith = compat_index.uniqWith;
288
+ exports.uniqueId = compat_index.uniqueId;
289
+ exports.unset = compat_index.unset;
290
+ exports.unzip = compat_index.unzip;
291
+ exports.update = compat_index.update;
292
+ exports.updateWith = compat_index.updateWith;
293
+ exports.upperCase = compat_index.upperCase;
294
+ exports.upperFirst = compat_index.upperFirst;
295
+ exports.values = compat_index.values;
296
+ exports.valuesIn = compat_index.valuesIn;
297
+ exports.without = compat_index.without;
298
+ exports.words = compat_index.words;
299
+ exports.zip = compat_index.zip;
300
+ exports.zipObjectDeep = compat_index.zipObjectDeep;
3818
301
  exports.eq = isPromise.eq;
3819
302
  exports.isBlob = isPromise.isBlob;
3820
303
  exports.isBrowser = isPromise.isBrowser;
@@ -3829,262 +312,16 @@ exports.isLength = isPromise.isLength;
3829
312
  exports.isNode = isPromise.isNode;
3830
313
  exports.isNotNil = isPromise.isNotNil;
3831
314
  exports.isNull = isPromise.isNull;
315
+ exports.isPrimitive = isPromise.isPrimitive;
3832
316
  exports.isPromise = isPromise.isPromise;
3833
317
  exports.isUndefined = isPromise.isUndefined;
3834
318
  exports.Mutex = promise_index.Mutex;
3835
319
  exports.Semaphore = promise_index.Semaphore;
3836
320
  exports.timeout = promise_index.timeout;
3837
321
  exports.withTimeout = promise_index.withTimeout;
3838
- exports.capitalize = snakeCase$1.capitalize;
322
+ exports.capitalize = reverseString.capitalize;
3839
323
  exports.constantCase = reverseString.constantCase;
3840
324
  exports.pascalCase = reverseString.pascalCase;
3841
325
  exports.reverseString = reverseString.reverseString;
3842
326
  exports.attemptAsync = invariant.attemptAsync;
3843
327
  exports.invariant = invariant.invariant;
3844
- exports.add = add;
3845
- exports.after = after;
3846
- exports.ary = ary;
3847
- exports.assign = assign;
3848
- exports.assignIn = assignIn;
3849
- exports.assignInWith = assignInWith;
3850
- exports.assignWith = assignWith;
3851
- exports.at = at;
3852
- exports.attempt = attempt;
3853
- exports.before = before;
3854
- exports.camelCase = camelCase;
3855
- exports.castArray = castArray;
3856
- exports.ceil = ceil;
3857
- exports.chunk = chunk;
3858
- exports.clamp = clamp;
3859
- exports.cloneDeep = cloneDeep;
3860
- exports.cloneDeepWith = cloneDeepWith;
3861
- exports.compact = compact;
3862
- exports.concat = concat;
3863
- exports.cond = cond;
3864
- exports.conforms = conforms;
3865
- exports.conformsTo = conformsTo;
3866
- exports.constant = constant;
3867
- exports.create = create;
3868
- exports.debounce = debounce;
3869
- exports.deburr = deburr;
3870
- exports.defaultTo = defaultTo;
3871
- exports.defaults = defaults;
3872
- exports.defer = defer;
3873
- exports.delay = delay;
3874
- exports.difference = difference;
3875
- exports.differenceBy = differenceBy;
3876
- exports.differenceWith = differenceWith;
3877
- exports.divide = divide;
3878
- exports.drop = drop;
3879
- exports.dropRight = dropRight;
3880
- exports.dropRightWhile = dropRightWhile;
3881
- exports.dropWhile = dropWhile;
3882
- exports.each = forEach;
3883
- exports.eachRight = forEachRight;
3884
- exports.endsWith = endsWith;
3885
- exports.escape = escape;
3886
- exports.escapeRegExp = escapeRegExp;
3887
- exports.every = every;
3888
- exports.extend = assignIn;
3889
- exports.extendWith = assignInWith;
3890
- exports.fill = fill;
3891
- exports.filter = filter;
3892
- exports.find = find;
3893
- exports.findIndex = findIndex;
3894
- exports.findKey = findKey;
3895
- exports.findLast = findLast;
3896
- exports.findLastIndex = findLastIndex;
3897
- exports.first = head;
3898
- exports.flatMap = flatMap;
3899
- exports.flatten = flatten;
3900
- exports.flattenDeep = flattenDeep;
3901
- exports.flattenDepth = flattenDepth;
3902
- exports.flip = flip;
3903
- exports.floor = floor;
3904
- exports.flow = flow;
3905
- exports.flowRight = flowRight;
3906
- exports.forEach = forEach;
3907
- exports.forEachRight = forEachRight;
3908
- exports.forIn = forIn;
3909
- exports.forInRight = forInRight;
3910
- exports.forOwn = forOwn;
3911
- exports.forOwnRight = forOwnRight;
3912
- exports.fromPairs = fromPairs;
3913
- exports.functions = functions;
3914
- exports.functionsIn = functionsIn;
3915
- exports.get = get;
3916
- exports.gt = gt;
3917
- exports.gte = gte;
3918
- exports.has = has;
3919
- exports.hasIn = hasIn;
3920
- exports.head = head;
3921
- exports.inRange = inRange;
3922
- exports.includes = includes;
3923
- exports.indexOf = indexOf;
3924
- exports.intersection = intersection;
3925
- exports.intersectionBy = intersectionBy;
3926
- exports.intersectionWith = intersectionWith;
3927
- exports.invertBy = invertBy;
3928
- exports.invoke = invoke;
3929
- exports.isArguments = isArguments;
3930
- exports.isArrayBuffer = isArrayBuffer;
3931
- exports.isArrayLike = isArrayLike;
3932
- exports.isArrayLikeObject = isArrayLikeObject;
3933
- exports.isBoolean = isBoolean;
3934
- exports.isBuffer = isBuffer;
3935
- exports.isDate = isDate;
3936
- exports.isElement = isElement;
3937
- exports.isEmpty = isEmpty;
3938
- exports.isEqualWith = isEqualWith;
3939
- exports.isError = isError;
3940
- exports.isFinite = isFinite;
3941
- exports.isInteger = isInteger;
3942
- exports.isMap = isMap;
3943
- exports.isMatch = isMatch;
3944
- exports.isNaN = isNaN;
3945
- exports.isNil = isNil;
3946
- exports.isNumber = isNumber;
3947
- exports.isObject = isObject;
3948
- exports.isRegExp = isRegExp;
3949
- exports.isSafeInteger = isSafeInteger;
3950
- exports.isSet = isSet;
3951
- exports.isString = isString;
3952
- exports.isSymbol = isSymbol;
3953
- exports.isTypedArray = isTypedArray;
3954
- exports.isWeakMap = isWeakMap;
3955
- exports.isWeakSet = isWeakSet;
3956
- exports.iteratee = iteratee;
3957
- exports.join = join;
3958
- exports.kebabCase = kebabCase;
3959
- exports.keys = keys;
3960
- exports.keysIn = keysIn;
3961
- exports.last = last;
3962
- exports.lastIndexOf = lastIndexOf;
3963
- exports.lowerCase = lowerCase;
3964
- exports.lowerFirst = lowerFirst;
3965
- exports.lt = lt;
3966
- exports.lte = lte;
3967
- exports.map = map;
3968
- exports.mapKeys = mapKeys;
3969
- exports.mapValues = mapValues;
3970
- exports.matches = matches;
3971
- exports.matchesProperty = matchesProperty;
3972
- exports.max = max;
3973
- exports.maxBy = maxBy;
3974
- exports.mean = mean;
3975
- exports.meanBy = meanBy;
3976
- exports.merge = merge;
3977
- exports.mergeWith = mergeWith;
3978
- exports.method = method;
3979
- exports.methodOf = methodOf;
3980
- exports.min = min;
3981
- exports.minBy = minBy;
3982
- exports.multiply = multiply;
3983
- exports.negate = negate;
3984
- exports.now = now;
3985
- exports.nth = nth;
3986
- exports.nthArg = nthArg;
3987
- exports.omit = omit;
3988
- exports.orderBy = orderBy;
3989
- exports.over = over;
3990
- exports.overEvery = overEvery;
3991
- exports.overSome = overSome;
3992
- exports.pad = pad;
3993
- exports.padEnd = padEnd;
3994
- exports.padStart = padStart;
3995
- exports.parseInt = parseInt;
3996
- exports.partition = partition;
3997
- exports.pick = pick;
3998
- exports.pickBy = pickBy;
3999
- exports.property = property;
4000
- exports.propertyOf = propertyOf;
4001
- exports.pull = pull;
4002
- exports.pullAll = pullAll;
4003
- exports.pullAllBy = pullAllBy;
4004
- exports.pullAllWith = pullAllWith;
4005
- exports.pullAt = pullAt;
4006
- exports.random = random;
4007
- exports.range = range;
4008
- exports.rangeRight = rangeRight;
4009
- exports.rearg = rearg;
4010
- exports.reduce = reduce;
4011
- exports.reduceRight = reduceRight;
4012
- exports.reject = reject;
4013
- exports.remove = remove;
4014
- exports.repeat = repeat;
4015
- exports.replace = replace;
4016
- exports.rest = rest;
4017
- exports.reverse = reverse;
4018
- exports.round = round;
4019
- exports.sample = sample;
4020
- exports.set = set;
4021
- exports.size = size;
4022
- exports.slice = slice;
4023
- exports.snakeCase = snakeCase;
4024
- exports.some = some;
4025
- exports.sortBy = sortBy;
4026
- exports.sortedIndex = sortedIndex;
4027
- exports.sortedIndexBy = sortedIndexBy;
4028
- exports.sortedIndexOf = sortedIndexOf;
4029
- exports.sortedLastIndex = sortedLastIndex;
4030
- exports.sortedLastIndexBy = sortedLastIndexBy;
4031
- exports.split = split;
4032
- exports.spread = spread;
4033
- exports.startCase = startCase;
4034
- exports.startsWith = startsWith;
4035
- exports.stubArray = stubArray;
4036
- exports.stubFalse = stubFalse;
4037
- exports.stubObject = stubObject;
4038
- exports.stubString = stubString;
4039
- exports.stubTrue = stubTrue;
4040
- exports.subtract = subtract;
4041
- exports.sum = sum;
4042
- exports.sumBy = sumBy;
4043
- exports.tail = tail;
4044
- exports.take = take;
4045
- exports.takeRight = takeRight;
4046
- exports.takeRightWhile = takeRightWhile;
4047
- exports.takeWhile = takeWhile;
4048
- exports.template = template;
4049
- exports.templateSettings = templateSettings;
4050
- exports.throttle = throttle;
4051
- exports.times = times;
4052
- exports.toArray = toArray;
4053
- exports.toDefaulted = toDefaulted;
4054
- exports.toFinite = toFinite;
4055
- exports.toInteger = toInteger;
4056
- exports.toLength = toLength;
4057
- exports.toLower = toLower;
4058
- exports.toNumber = toNumber;
4059
- exports.toPairs = toPairs;
4060
- exports.toPairsIn = toPairsIn;
4061
- exports.toPath = toPath;
4062
- exports.toPlainObject = toPlainObject;
4063
- exports.toSafeInteger = toSafeInteger;
4064
- exports.toString = toString;
4065
- exports.toUpper = toUpper;
4066
- exports.trim = trim;
4067
- exports.trimEnd = trimEnd;
4068
- exports.trimStart = trimStart;
4069
- exports.unescape = unescape;
4070
- exports.union = union;
4071
- exports.unionBy = unionBy;
4072
- exports.unionWith = unionWith;
4073
- exports.uniq = uniq;
4074
- exports.uniqBy = uniqBy;
4075
- exports.uniqWith = uniqWith;
4076
- exports.uniqueId = uniqueId;
4077
- exports.unset = unset;
4078
- exports.unzip = unzip;
4079
- exports.update = update;
4080
- exports.updateWith = updateWith;
4081
- exports.upperCase = upperCase;
4082
- exports.upperFirst = upperFirst;
4083
- exports.values = values;
4084
- exports.valuesIn = valuesIn;
4085
- exports.without = without;
4086
- exports.words = words;
4087
- exports.zip = zip;
4088
- exports.zipObject = zipObject;
4089
- exports.zipObjectDeep = zipObjectDeep;
4090
- exports.zipWith = zipWith;