@oliasoft-open-source/node-json-migrator 4.1.0-beta-1 → 4.2.0-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +14 -1670
- package/dist/index.d.cts +5 -3
- package/dist/index.d.mts +5 -3
- package/dist/index.mjs +10 -1666
- package/package.json +2 -3
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var path$1 = require('path');
|
|
4
4
|
var fs = require('fs');
|
|
5
|
+
var esToolkit = require('es-toolkit');
|
|
5
6
|
var moduleFromString = require('module-from-string');
|
|
6
7
|
var crypto = require('crypto');
|
|
7
8
|
var node_url = require('node:url');
|
|
@@ -11,6 +12,7 @@ var promises = require('node:fs/promises');
|
|
|
11
12
|
var node_events = require('node:events');
|
|
12
13
|
var Stream = require('node:stream');
|
|
13
14
|
var node_string_decoder = require('node:string_decoder');
|
|
15
|
+
var compat = require('es-toolkit/compat');
|
|
14
16
|
var process$1 = require('process');
|
|
15
17
|
var child_process = require('child_process');
|
|
16
18
|
|
|
@@ -413,1666 +415,6 @@ Object.defineProperties(createChalk.prototype, styles);
|
|
|
413
415
|
const chalk = createChalk();
|
|
414
416
|
createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
415
417
|
|
|
416
|
-
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
417
|
-
|
|
418
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
419
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
420
|
-
|
|
421
|
-
var Symbol$1 = root.Symbol;
|
|
422
|
-
|
|
423
|
-
var objectProto$e = Object.prototype;
|
|
424
|
-
var hasOwnProperty$b = objectProto$e.hasOwnProperty;
|
|
425
|
-
var nativeObjectToString$1 = objectProto$e.toString;
|
|
426
|
-
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
427
|
-
function getRawTag(value) {
|
|
428
|
-
var isOwn = hasOwnProperty$b.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
429
|
-
try {
|
|
430
|
-
value[symToStringTag$1] = void 0;
|
|
431
|
-
var unmasked = true;
|
|
432
|
-
} catch (e) {
|
|
433
|
-
}
|
|
434
|
-
var result = nativeObjectToString$1.call(value);
|
|
435
|
-
if (unmasked) {
|
|
436
|
-
if (isOwn) {
|
|
437
|
-
value[symToStringTag$1] = tag;
|
|
438
|
-
} else {
|
|
439
|
-
delete value[symToStringTag$1];
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
return result;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
var objectProto$d = Object.prototype;
|
|
446
|
-
var nativeObjectToString = objectProto$d.toString;
|
|
447
|
-
function objectToString(value) {
|
|
448
|
-
return nativeObjectToString.call(value);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
452
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
453
|
-
function baseGetTag(value) {
|
|
454
|
-
if (value == null) {
|
|
455
|
-
return value === void 0 ? undefinedTag : nullTag;
|
|
456
|
-
}
|
|
457
|
-
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
function isObjectLike(value) {
|
|
461
|
-
return value != null && typeof value == "object";
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
var symbolTag$1 = "[object Symbol]";
|
|
465
|
-
function isSymbol(value) {
|
|
466
|
-
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
function arrayMap(array, iteratee) {
|
|
470
|
-
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
471
|
-
while (++index < length) {
|
|
472
|
-
result[index] = iteratee(array[index], index, array);
|
|
473
|
-
}
|
|
474
|
-
return result;
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
var isArray = Array.isArray;
|
|
478
|
-
|
|
479
|
-
var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
|
|
480
|
-
function baseToString(value) {
|
|
481
|
-
if (typeof value == "string") {
|
|
482
|
-
return value;
|
|
483
|
-
}
|
|
484
|
-
if (isArray(value)) {
|
|
485
|
-
return arrayMap(value, baseToString) + "";
|
|
486
|
-
}
|
|
487
|
-
if (isSymbol(value)) {
|
|
488
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
489
|
-
}
|
|
490
|
-
var result = value + "";
|
|
491
|
-
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
function isObject(value) {
|
|
495
|
-
var type = typeof value;
|
|
496
|
-
return value != null && (type == "object" || type == "function");
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
function identity(value) {
|
|
500
|
-
return value;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
504
|
-
function isFunction(value) {
|
|
505
|
-
if (!isObject(value)) {
|
|
506
|
-
return false;
|
|
507
|
-
}
|
|
508
|
-
var tag = baseGetTag(value);
|
|
509
|
-
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
var coreJsData = root["__core-js_shared__"];
|
|
513
|
-
|
|
514
|
-
var maskSrcKey = function() {
|
|
515
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
516
|
-
return uid ? "Symbol(src)_1." + uid : "";
|
|
517
|
-
}();
|
|
518
|
-
function isMasked(func) {
|
|
519
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
var funcProto$2 = Function.prototype;
|
|
523
|
-
var funcToString$2 = funcProto$2.toString;
|
|
524
|
-
function toSource(func) {
|
|
525
|
-
if (func != null) {
|
|
526
|
-
try {
|
|
527
|
-
return funcToString$2.call(func);
|
|
528
|
-
} catch (e) {
|
|
529
|
-
}
|
|
530
|
-
try {
|
|
531
|
-
return func + "";
|
|
532
|
-
} catch (e) {
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
return "";
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
539
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
540
|
-
var funcProto$1 = Function.prototype, objectProto$c = Object.prototype;
|
|
541
|
-
var funcToString$1 = funcProto$1.toString;
|
|
542
|
-
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
543
|
-
var reIsNative = RegExp(
|
|
544
|
-
"^" + funcToString$1.call(hasOwnProperty$a).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
545
|
-
);
|
|
546
|
-
function baseIsNative(value) {
|
|
547
|
-
if (!isObject(value) || isMasked(value)) {
|
|
548
|
-
return false;
|
|
549
|
-
}
|
|
550
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
551
|
-
return pattern.test(toSource(value));
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
function getValue(object, key) {
|
|
555
|
-
return object == null ? void 0 : object[key];
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function getNative(object, key) {
|
|
559
|
-
var value = getValue(object, key);
|
|
560
|
-
return baseIsNative(value) ? value : void 0;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
var WeakMap = getNative(root, "WeakMap");
|
|
564
|
-
|
|
565
|
-
var objectCreate = Object.create;
|
|
566
|
-
var baseCreate = /* @__PURE__ */ function() {
|
|
567
|
-
function object() {
|
|
568
|
-
}
|
|
569
|
-
return function(proto) {
|
|
570
|
-
if (!isObject(proto)) {
|
|
571
|
-
return {};
|
|
572
|
-
}
|
|
573
|
-
if (objectCreate) {
|
|
574
|
-
return objectCreate(proto);
|
|
575
|
-
}
|
|
576
|
-
object.prototype = proto;
|
|
577
|
-
var result = new object();
|
|
578
|
-
object.prototype = void 0;
|
|
579
|
-
return result;
|
|
580
|
-
};
|
|
581
|
-
}();
|
|
582
|
-
|
|
583
|
-
function apply(func, thisArg, args) {
|
|
584
|
-
switch (args.length) {
|
|
585
|
-
case 0:
|
|
586
|
-
return func.call(thisArg);
|
|
587
|
-
case 1:
|
|
588
|
-
return func.call(thisArg, args[0]);
|
|
589
|
-
case 2:
|
|
590
|
-
return func.call(thisArg, args[0], args[1]);
|
|
591
|
-
case 3:
|
|
592
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
593
|
-
}
|
|
594
|
-
return func.apply(thisArg, args);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
function noop() {
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
function copyArray(source, array) {
|
|
601
|
-
var index = -1, length = source.length;
|
|
602
|
-
array || (array = Array(length));
|
|
603
|
-
while (++index < length) {
|
|
604
|
-
array[index] = source[index];
|
|
605
|
-
}
|
|
606
|
-
return array;
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
var HOT_COUNT = 800, HOT_SPAN = 16;
|
|
610
|
-
var nativeNow = Date.now;
|
|
611
|
-
function shortOut(func) {
|
|
612
|
-
var count = 0, lastCalled = 0;
|
|
613
|
-
return function() {
|
|
614
|
-
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
615
|
-
lastCalled = stamp;
|
|
616
|
-
if (remaining > 0) {
|
|
617
|
-
if (++count >= HOT_COUNT) {
|
|
618
|
-
return arguments[0];
|
|
619
|
-
}
|
|
620
|
-
} else {
|
|
621
|
-
count = 0;
|
|
622
|
-
}
|
|
623
|
-
return func.apply(void 0, arguments);
|
|
624
|
-
};
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
function constant(value) {
|
|
628
|
-
return function() {
|
|
629
|
-
return value;
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
var defineProperty = function() {
|
|
634
|
-
try {
|
|
635
|
-
var func = getNative(Object, "defineProperty");
|
|
636
|
-
func({}, "", {});
|
|
637
|
-
return func;
|
|
638
|
-
} catch (e) {
|
|
639
|
-
}
|
|
640
|
-
}();
|
|
641
|
-
|
|
642
|
-
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
643
|
-
return defineProperty(func, "toString", {
|
|
644
|
-
"configurable": true,
|
|
645
|
-
"enumerable": false,
|
|
646
|
-
"value": constant(string),
|
|
647
|
-
"writable": true
|
|
648
|
-
});
|
|
649
|
-
};
|
|
650
|
-
|
|
651
|
-
var setToString = shortOut(baseSetToString);
|
|
652
|
-
|
|
653
|
-
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
654
|
-
var length = array.length, index = fromIndex + (-1);
|
|
655
|
-
while (++index < length) {
|
|
656
|
-
if (predicate(array[index], index, array)) {
|
|
657
|
-
return index;
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
return -1;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
function baseIsNaN(value) {
|
|
664
|
-
return value !== value;
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
function strictIndexOf(array, value, fromIndex) {
|
|
668
|
-
var index = fromIndex - 1, length = array.length;
|
|
669
|
-
while (++index < length) {
|
|
670
|
-
if (array[index] === value) {
|
|
671
|
-
return index;
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
return -1;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
function baseIndexOf(array, value, fromIndex) {
|
|
678
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
function arrayIncludes(array, value) {
|
|
682
|
-
var length = array == null ? 0 : array.length;
|
|
683
|
-
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
687
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
688
|
-
function isIndex(value, length) {
|
|
689
|
-
var type = typeof value;
|
|
690
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
691
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
function baseAssignValue(object, key, value) {
|
|
695
|
-
if (key == "__proto__" && defineProperty) {
|
|
696
|
-
defineProperty(object, key, {
|
|
697
|
-
"configurable": true,
|
|
698
|
-
"enumerable": true,
|
|
699
|
-
"value": value,
|
|
700
|
-
"writable": true
|
|
701
|
-
});
|
|
702
|
-
} else {
|
|
703
|
-
object[key] = value;
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
function eq(value, other) {
|
|
708
|
-
return value === other || value !== value && other !== other;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
var objectProto$b = Object.prototype;
|
|
712
|
-
var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
|
|
713
|
-
function assignValue(object, key, value) {
|
|
714
|
-
var objValue = object[key];
|
|
715
|
-
if (!(hasOwnProperty$9.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
716
|
-
baseAssignValue(object, key, value);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
function copyObject(source, props, object, customizer) {
|
|
721
|
-
var isNew = !object;
|
|
722
|
-
object || (object = {});
|
|
723
|
-
var index = -1, length = props.length;
|
|
724
|
-
while (++index < length) {
|
|
725
|
-
var key = props[index];
|
|
726
|
-
var newValue = void 0;
|
|
727
|
-
if (newValue === void 0) {
|
|
728
|
-
newValue = source[key];
|
|
729
|
-
}
|
|
730
|
-
if (isNew) {
|
|
731
|
-
baseAssignValue(object, key, newValue);
|
|
732
|
-
} else {
|
|
733
|
-
assignValue(object, key, newValue);
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
return object;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
var nativeMax = Math.max;
|
|
740
|
-
function overRest(func, start, transform) {
|
|
741
|
-
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
742
|
-
return function() {
|
|
743
|
-
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
744
|
-
while (++index < length) {
|
|
745
|
-
array[index] = args[start + index];
|
|
746
|
-
}
|
|
747
|
-
index = -1;
|
|
748
|
-
var otherArgs = Array(start + 1);
|
|
749
|
-
while (++index < start) {
|
|
750
|
-
otherArgs[index] = args[index];
|
|
751
|
-
}
|
|
752
|
-
otherArgs[start] = transform(array);
|
|
753
|
-
return apply(func, this, otherArgs);
|
|
754
|
-
};
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
function baseRest(func, start) {
|
|
758
|
-
return setToString(overRest(func, start, identity), func + "");
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
762
|
-
function isLength(value) {
|
|
763
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
function isArrayLike(value) {
|
|
767
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
function isIterateeCall(value, index, object) {
|
|
771
|
-
if (!isObject(object)) {
|
|
772
|
-
return false;
|
|
773
|
-
}
|
|
774
|
-
var type = typeof index;
|
|
775
|
-
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
776
|
-
return eq(object[index], value);
|
|
777
|
-
}
|
|
778
|
-
return false;
|
|
779
|
-
}
|
|
780
|
-
|
|
781
|
-
function createAssigner(assigner) {
|
|
782
|
-
return baseRest(function(object, sources) {
|
|
783
|
-
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
|
|
784
|
-
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
|
|
785
|
-
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
786
|
-
customizer = length < 3 ? void 0 : customizer;
|
|
787
|
-
length = 1;
|
|
788
|
-
}
|
|
789
|
-
object = Object(object);
|
|
790
|
-
while (++index < length) {
|
|
791
|
-
var source = sources[index];
|
|
792
|
-
if (source) {
|
|
793
|
-
assigner(object, source, index, customizer);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
return object;
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
var objectProto$a = Object.prototype;
|
|
801
|
-
function isPrototype(value) {
|
|
802
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$a;
|
|
803
|
-
return value === proto;
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
function baseTimes(n, iteratee) {
|
|
807
|
-
var index = -1, result = Array(n);
|
|
808
|
-
while (++index < n) {
|
|
809
|
-
result[index] = iteratee(index);
|
|
810
|
-
}
|
|
811
|
-
return result;
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
var argsTag$2 = "[object Arguments]";
|
|
815
|
-
function baseIsArguments(value) {
|
|
816
|
-
return isObjectLike(value) && baseGetTag(value) == argsTag$2;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
var objectProto$9 = Object.prototype;
|
|
820
|
-
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
821
|
-
var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
|
|
822
|
-
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
823
|
-
return arguments;
|
|
824
|
-
}()) ? baseIsArguments : function(value) {
|
|
825
|
-
return isObjectLike(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
function stubFalse() {
|
|
829
|
-
return false;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
833
|
-
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
834
|
-
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
835
|
-
var Buffer$2 = moduleExports$2 ? root.Buffer : void 0;
|
|
836
|
-
var nativeIsBuffer = Buffer$2 ? Buffer$2.isBuffer : void 0;
|
|
837
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
838
|
-
|
|
839
|
-
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$1 = "[object WeakMap]";
|
|
840
|
-
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
841
|
-
var typedArrayTags = {};
|
|
842
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
843
|
-
typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$1] = false;
|
|
844
|
-
function baseIsTypedArray(value) {
|
|
845
|
-
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
function baseUnary(func) {
|
|
849
|
-
return function(value) {
|
|
850
|
-
return func(value);
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
855
|
-
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
856
|
-
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
857
|
-
var freeProcess = moduleExports$1 && freeGlobal.process;
|
|
858
|
-
var nodeUtil = function() {
|
|
859
|
-
try {
|
|
860
|
-
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
861
|
-
if (types) {
|
|
862
|
-
return types;
|
|
863
|
-
}
|
|
864
|
-
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
865
|
-
} catch (e) {
|
|
866
|
-
}
|
|
867
|
-
}();
|
|
868
|
-
|
|
869
|
-
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
870
|
-
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
871
|
-
|
|
872
|
-
var objectProto$8 = Object.prototype;
|
|
873
|
-
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
874
|
-
function arrayLikeKeys(value, inherited) {
|
|
875
|
-
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
876
|
-
for (var key in value) {
|
|
877
|
-
if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
878
|
-
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
879
|
-
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
880
|
-
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
881
|
-
isIndex(key, length)))) {
|
|
882
|
-
result.push(key);
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
return result;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
function overArg(func, transform) {
|
|
889
|
-
return function(arg) {
|
|
890
|
-
return func(transform(arg));
|
|
891
|
-
};
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
var nativeKeys = overArg(Object.keys, Object);
|
|
895
|
-
|
|
896
|
-
var objectProto$7 = Object.prototype;
|
|
897
|
-
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
898
|
-
function baseKeys(object) {
|
|
899
|
-
if (!isPrototype(object)) {
|
|
900
|
-
return nativeKeys(object);
|
|
901
|
-
}
|
|
902
|
-
var result = [];
|
|
903
|
-
for (var key in Object(object)) {
|
|
904
|
-
if (hasOwnProperty$6.call(object, key) && key != "constructor") {
|
|
905
|
-
result.push(key);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return result;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
function keys(object) {
|
|
912
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
function nativeKeysIn(object) {
|
|
916
|
-
var result = [];
|
|
917
|
-
if (object != null) {
|
|
918
|
-
for (var key in Object(object)) {
|
|
919
|
-
result.push(key);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
return result;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
var objectProto$6 = Object.prototype;
|
|
926
|
-
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
927
|
-
function baseKeysIn(object) {
|
|
928
|
-
if (!isObject(object)) {
|
|
929
|
-
return nativeKeysIn(object);
|
|
930
|
-
}
|
|
931
|
-
var isProto = isPrototype(object), result = [];
|
|
932
|
-
for (var key in object) {
|
|
933
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$5.call(object, key)))) {
|
|
934
|
-
result.push(key);
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
return result;
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
function keysIn(object) {
|
|
941
|
-
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
945
|
-
function isKey(value, object) {
|
|
946
|
-
if (isArray(value)) {
|
|
947
|
-
return false;
|
|
948
|
-
}
|
|
949
|
-
var type = typeof value;
|
|
950
|
-
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
951
|
-
return true;
|
|
952
|
-
}
|
|
953
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
var nativeCreate = getNative(Object, "create");
|
|
957
|
-
|
|
958
|
-
function hashClear() {
|
|
959
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
960
|
-
this.size = 0;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
function hashDelete(key) {
|
|
964
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
965
|
-
this.size -= result ? 1 : 0;
|
|
966
|
-
return result;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
970
|
-
var objectProto$5 = Object.prototype;
|
|
971
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
972
|
-
function hashGet(key) {
|
|
973
|
-
var data = this.__data__;
|
|
974
|
-
if (nativeCreate) {
|
|
975
|
-
var result = data[key];
|
|
976
|
-
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
977
|
-
}
|
|
978
|
-
return hasOwnProperty$4.call(data, key) ? data[key] : void 0;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
var objectProto$4 = Object.prototype;
|
|
982
|
-
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
983
|
-
function hashHas(key) {
|
|
984
|
-
var data = this.__data__;
|
|
985
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$3.call(data, key);
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
989
|
-
function hashSet(key, value) {
|
|
990
|
-
var data = this.__data__;
|
|
991
|
-
this.size += this.has(key) ? 0 : 1;
|
|
992
|
-
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
993
|
-
return this;
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
function Hash(entries) {
|
|
997
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
998
|
-
this.clear();
|
|
999
|
-
while (++index < length) {
|
|
1000
|
-
var entry = entries[index];
|
|
1001
|
-
this.set(entry[0], entry[1]);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
Hash.prototype.clear = hashClear;
|
|
1005
|
-
Hash.prototype["delete"] = hashDelete;
|
|
1006
|
-
Hash.prototype.get = hashGet;
|
|
1007
|
-
Hash.prototype.has = hashHas;
|
|
1008
|
-
Hash.prototype.set = hashSet;
|
|
1009
|
-
|
|
1010
|
-
function listCacheClear() {
|
|
1011
|
-
this.__data__ = [];
|
|
1012
|
-
this.size = 0;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
function assocIndexOf(array, key) {
|
|
1016
|
-
var length = array.length;
|
|
1017
|
-
while (length--) {
|
|
1018
|
-
if (eq(array[length][0], key)) {
|
|
1019
|
-
return length;
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
return -1;
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
var arrayProto = Array.prototype;
|
|
1026
|
-
var splice = arrayProto.splice;
|
|
1027
|
-
function listCacheDelete(key) {
|
|
1028
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1029
|
-
if (index < 0) {
|
|
1030
|
-
return false;
|
|
1031
|
-
}
|
|
1032
|
-
var lastIndex = data.length - 1;
|
|
1033
|
-
if (index == lastIndex) {
|
|
1034
|
-
data.pop();
|
|
1035
|
-
} else {
|
|
1036
|
-
splice.call(data, index, 1);
|
|
1037
|
-
}
|
|
1038
|
-
--this.size;
|
|
1039
|
-
return true;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
function listCacheGet(key) {
|
|
1043
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1044
|
-
return index < 0 ? void 0 : data[index][1];
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
function listCacheHas(key) {
|
|
1048
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
function listCacheSet(key, value) {
|
|
1052
|
-
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1053
|
-
if (index < 0) {
|
|
1054
|
-
++this.size;
|
|
1055
|
-
data.push([key, value]);
|
|
1056
|
-
} else {
|
|
1057
|
-
data[index][1] = value;
|
|
1058
|
-
}
|
|
1059
|
-
return this;
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
function ListCache(entries) {
|
|
1063
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1064
|
-
this.clear();
|
|
1065
|
-
while (++index < length) {
|
|
1066
|
-
var entry = entries[index];
|
|
1067
|
-
this.set(entry[0], entry[1]);
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
ListCache.prototype.clear = listCacheClear;
|
|
1071
|
-
ListCache.prototype["delete"] = listCacheDelete;
|
|
1072
|
-
ListCache.prototype.get = listCacheGet;
|
|
1073
|
-
ListCache.prototype.has = listCacheHas;
|
|
1074
|
-
ListCache.prototype.set = listCacheSet;
|
|
1075
|
-
|
|
1076
|
-
var Map$1 = getNative(root, "Map");
|
|
1077
|
-
|
|
1078
|
-
function mapCacheClear() {
|
|
1079
|
-
this.size = 0;
|
|
1080
|
-
this.__data__ = {
|
|
1081
|
-
"hash": new Hash(),
|
|
1082
|
-
"map": new (Map$1 || ListCache)(),
|
|
1083
|
-
"string": new Hash()
|
|
1084
|
-
};
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
function isKeyable(value) {
|
|
1088
|
-
var type = typeof value;
|
|
1089
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
function getMapData(map, key) {
|
|
1093
|
-
var data = map.__data__;
|
|
1094
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
function mapCacheDelete(key) {
|
|
1098
|
-
var result = getMapData(this, key)["delete"](key);
|
|
1099
|
-
this.size -= result ? 1 : 0;
|
|
1100
|
-
return result;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
function mapCacheGet(key) {
|
|
1104
|
-
return getMapData(this, key).get(key);
|
|
1105
|
-
}
|
|
1106
|
-
|
|
1107
|
-
function mapCacheHas(key) {
|
|
1108
|
-
return getMapData(this, key).has(key);
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
function mapCacheSet(key, value) {
|
|
1112
|
-
var data = getMapData(this, key), size = data.size;
|
|
1113
|
-
data.set(key, value);
|
|
1114
|
-
this.size += data.size == size ? 0 : 1;
|
|
1115
|
-
return this;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
function MapCache(entries) {
|
|
1119
|
-
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1120
|
-
this.clear();
|
|
1121
|
-
while (++index < length) {
|
|
1122
|
-
var entry = entries[index];
|
|
1123
|
-
this.set(entry[0], entry[1]);
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
MapCache.prototype.clear = mapCacheClear;
|
|
1127
|
-
MapCache.prototype["delete"] = mapCacheDelete;
|
|
1128
|
-
MapCache.prototype.get = mapCacheGet;
|
|
1129
|
-
MapCache.prototype.has = mapCacheHas;
|
|
1130
|
-
MapCache.prototype.set = mapCacheSet;
|
|
1131
|
-
|
|
1132
|
-
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1133
|
-
function memoize(func, resolver) {
|
|
1134
|
-
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
1135
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1136
|
-
}
|
|
1137
|
-
var memoized = function() {
|
|
1138
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
1139
|
-
if (cache.has(key)) {
|
|
1140
|
-
return cache.get(key);
|
|
1141
|
-
}
|
|
1142
|
-
var result = func.apply(this, args);
|
|
1143
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
1144
|
-
return result;
|
|
1145
|
-
};
|
|
1146
|
-
memoized.cache = new (memoize.Cache || MapCache)();
|
|
1147
|
-
return memoized;
|
|
1148
|
-
}
|
|
1149
|
-
memoize.Cache = MapCache;
|
|
1150
|
-
|
|
1151
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
1152
|
-
function memoizeCapped(func) {
|
|
1153
|
-
var result = memoize(func, function(key) {
|
|
1154
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1155
|
-
cache.clear();
|
|
1156
|
-
}
|
|
1157
|
-
return key;
|
|
1158
|
-
});
|
|
1159
|
-
var cache = result.cache;
|
|
1160
|
-
return result;
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1164
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
1165
|
-
var stringToPath = memoizeCapped(function(string) {
|
|
1166
|
-
var result = [];
|
|
1167
|
-
if (string.charCodeAt(0) === 46) {
|
|
1168
|
-
result.push("");
|
|
1169
|
-
}
|
|
1170
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
1171
|
-
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
1172
|
-
});
|
|
1173
|
-
return result;
|
|
1174
|
-
});
|
|
1175
|
-
|
|
1176
|
-
function toString(value) {
|
|
1177
|
-
return value == null ? "" : baseToString(value);
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
function castPath(value, object) {
|
|
1181
|
-
if (isArray(value)) {
|
|
1182
|
-
return value;
|
|
1183
|
-
}
|
|
1184
|
-
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
function toKey(value) {
|
|
1188
|
-
if (typeof value == "string" || isSymbol(value)) {
|
|
1189
|
-
return value;
|
|
1190
|
-
}
|
|
1191
|
-
var result = value + "";
|
|
1192
|
-
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
function baseGet(object, path) {
|
|
1196
|
-
path = castPath(path, object);
|
|
1197
|
-
var index = 0, length = path.length;
|
|
1198
|
-
while (object != null && index < length) {
|
|
1199
|
-
object = object[toKey(path[index++])];
|
|
1200
|
-
}
|
|
1201
|
-
return index && index == length ? object : void 0;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
function get(object, path, defaultValue) {
|
|
1205
|
-
var result = object == null ? void 0 : baseGet(object, path);
|
|
1206
|
-
return result === void 0 ? defaultValue : result;
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
function arrayPush(array, values) {
|
|
1210
|
-
var index = -1, length = values.length, offset = array.length;
|
|
1211
|
-
while (++index < length) {
|
|
1212
|
-
array[offset + index] = values[index];
|
|
1213
|
-
}
|
|
1214
|
-
return array;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
|
|
1218
|
-
function isFlattenable(value) {
|
|
1219
|
-
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
1223
|
-
var index = -1, length = array.length;
|
|
1224
|
-
predicate || (predicate = isFlattenable);
|
|
1225
|
-
result || (result = []);
|
|
1226
|
-
while (++index < length) {
|
|
1227
|
-
var value = array[index];
|
|
1228
|
-
if (predicate(value)) {
|
|
1229
|
-
{
|
|
1230
|
-
arrayPush(result, value);
|
|
1231
|
-
}
|
|
1232
|
-
} else {
|
|
1233
|
-
result[result.length] = value;
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
return result;
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
1240
|
-
|
|
1241
|
-
var objectTag$2 = "[object Object]";
|
|
1242
|
-
var funcProto = Function.prototype, objectProto$3 = Object.prototype;
|
|
1243
|
-
var funcToString = funcProto.toString;
|
|
1244
|
-
var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
|
|
1245
|
-
var objectCtorString = funcToString.call(Object);
|
|
1246
|
-
function isPlainObject(value) {
|
|
1247
|
-
if (!isObjectLike(value) || baseGetTag(value) != objectTag$2) {
|
|
1248
|
-
return false;
|
|
1249
|
-
}
|
|
1250
|
-
var proto = getPrototype(value);
|
|
1251
|
-
if (proto === null) {
|
|
1252
|
-
return true;
|
|
1253
|
-
}
|
|
1254
|
-
var Ctor = hasOwnProperty$2.call(proto, "constructor") && proto.constructor;
|
|
1255
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
function stackClear() {
|
|
1259
|
-
this.__data__ = new ListCache();
|
|
1260
|
-
this.size = 0;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
function stackDelete(key) {
|
|
1264
|
-
var data = this.__data__, result = data["delete"](key);
|
|
1265
|
-
this.size = data.size;
|
|
1266
|
-
return result;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
function stackGet(key) {
|
|
1270
|
-
return this.__data__.get(key);
|
|
1271
|
-
}
|
|
1272
|
-
|
|
1273
|
-
function stackHas(key) {
|
|
1274
|
-
return this.__data__.has(key);
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
var LARGE_ARRAY_SIZE$2 = 200;
|
|
1278
|
-
function stackSet(key, value) {
|
|
1279
|
-
var data = this.__data__;
|
|
1280
|
-
if (data instanceof ListCache) {
|
|
1281
|
-
var pairs = data.__data__;
|
|
1282
|
-
if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE$2 - 1) {
|
|
1283
|
-
pairs.push([key, value]);
|
|
1284
|
-
this.size = ++data.size;
|
|
1285
|
-
return this;
|
|
1286
|
-
}
|
|
1287
|
-
data = this.__data__ = new MapCache(pairs);
|
|
1288
|
-
}
|
|
1289
|
-
data.set(key, value);
|
|
1290
|
-
this.size = data.size;
|
|
1291
|
-
return this;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
function Stack$1(entries) {
|
|
1295
|
-
var data = this.__data__ = new ListCache(entries);
|
|
1296
|
-
this.size = data.size;
|
|
1297
|
-
}
|
|
1298
|
-
Stack$1.prototype.clear = stackClear;
|
|
1299
|
-
Stack$1.prototype["delete"] = stackDelete;
|
|
1300
|
-
Stack$1.prototype.get = stackGet;
|
|
1301
|
-
Stack$1.prototype.has = stackHas;
|
|
1302
|
-
Stack$1.prototype.set = stackSet;
|
|
1303
|
-
|
|
1304
|
-
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1305
|
-
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1306
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1307
|
-
var Buffer$1 = moduleExports ? root.Buffer : void 0; Buffer$1 ? Buffer$1.allocUnsafe : void 0;
|
|
1308
|
-
function cloneBuffer(buffer, isDeep) {
|
|
1309
|
-
{
|
|
1310
|
-
return buffer.slice();
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
function arrayFilter(array, predicate) {
|
|
1315
|
-
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1316
|
-
while (++index < length) {
|
|
1317
|
-
var value = array[index];
|
|
1318
|
-
if (predicate(value, index, array)) {
|
|
1319
|
-
result[resIndex++] = value;
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
return result;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
function stubArray() {
|
|
1326
|
-
return [];
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
var objectProto$2 = Object.prototype;
|
|
1330
|
-
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
1331
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1332
|
-
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1333
|
-
if (object == null) {
|
|
1334
|
-
return [];
|
|
1335
|
-
}
|
|
1336
|
-
object = Object(object);
|
|
1337
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1338
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
1339
|
-
});
|
|
1340
|
-
};
|
|
1341
|
-
|
|
1342
|
-
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1343
|
-
var result = keysFunc(object);
|
|
1344
|
-
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
function getAllKeys(object) {
|
|
1348
|
-
return baseGetAllKeys(object, keys, getSymbols);
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
var DataView = getNative(root, "DataView");
|
|
1352
|
-
|
|
1353
|
-
var Promise$1 = getNative(root, "Promise");
|
|
1354
|
-
|
|
1355
|
-
var Set$1 = getNative(root, "Set");
|
|
1356
|
-
|
|
1357
|
-
var mapTag$1 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
1358
|
-
var dataViewTag$1 = "[object DataView]";
|
|
1359
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap);
|
|
1360
|
-
var getTag = baseGetTag;
|
|
1361
|
-
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1 || Map$1 && getTag(new Map$1()) != mapTag$1 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$1 || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
1362
|
-
getTag = function(value) {
|
|
1363
|
-
var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1364
|
-
if (ctorString) {
|
|
1365
|
-
switch (ctorString) {
|
|
1366
|
-
case dataViewCtorString:
|
|
1367
|
-
return dataViewTag$1;
|
|
1368
|
-
case mapCtorString:
|
|
1369
|
-
return mapTag$1;
|
|
1370
|
-
case promiseCtorString:
|
|
1371
|
-
return promiseTag;
|
|
1372
|
-
case setCtorString:
|
|
1373
|
-
return setTag$1;
|
|
1374
|
-
case weakMapCtorString:
|
|
1375
|
-
return weakMapTag;
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
return result;
|
|
1379
|
-
};
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
var Uint8Array$1 = root.Uint8Array;
|
|
1383
|
-
|
|
1384
|
-
function cloneArrayBuffer(arrayBuffer) {
|
|
1385
|
-
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
1386
|
-
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
1387
|
-
return result;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
function cloneTypedArray(typedArray, isDeep) {
|
|
1391
|
-
var buffer = cloneArrayBuffer(typedArray.buffer) ;
|
|
1392
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
function initCloneObject(object) {
|
|
1396
|
-
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1400
|
-
function setCacheAdd(value) {
|
|
1401
|
-
this.__data__.set(value, HASH_UNDEFINED);
|
|
1402
|
-
return this;
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
function setCacheHas(value) {
|
|
1406
|
-
return this.__data__.has(value);
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
function SetCache(values) {
|
|
1410
|
-
var index = -1, length = values == null ? 0 : values.length;
|
|
1411
|
-
this.__data__ = new MapCache();
|
|
1412
|
-
while (++index < length) {
|
|
1413
|
-
this.add(values[index]);
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1417
|
-
SetCache.prototype.has = setCacheHas;
|
|
1418
|
-
|
|
1419
|
-
function arraySome(array, predicate) {
|
|
1420
|
-
var index = -1, length = array == null ? 0 : array.length;
|
|
1421
|
-
while (++index < length) {
|
|
1422
|
-
if (predicate(array[index], index, array)) {
|
|
1423
|
-
return true;
|
|
1424
|
-
}
|
|
1425
|
-
}
|
|
1426
|
-
return false;
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
function cacheHas(cache, key) {
|
|
1430
|
-
return cache.has(key);
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
|
|
1434
|
-
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1435
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
|
|
1436
|
-
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1437
|
-
return false;
|
|
1438
|
-
}
|
|
1439
|
-
var arrStacked = stack.get(array);
|
|
1440
|
-
var othStacked = stack.get(other);
|
|
1441
|
-
if (arrStacked && othStacked) {
|
|
1442
|
-
return arrStacked == other && othStacked == array;
|
|
1443
|
-
}
|
|
1444
|
-
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
|
|
1445
|
-
stack.set(array, other);
|
|
1446
|
-
stack.set(other, array);
|
|
1447
|
-
while (++index < arrLength) {
|
|
1448
|
-
var arrValue = array[index], othValue = other[index];
|
|
1449
|
-
if (customizer) {
|
|
1450
|
-
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
1451
|
-
}
|
|
1452
|
-
if (compared !== void 0) {
|
|
1453
|
-
if (compared) {
|
|
1454
|
-
continue;
|
|
1455
|
-
}
|
|
1456
|
-
result = false;
|
|
1457
|
-
break;
|
|
1458
|
-
}
|
|
1459
|
-
if (seen) {
|
|
1460
|
-
if (!arraySome(other, function(othValue2, othIndex) {
|
|
1461
|
-
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
1462
|
-
return seen.push(othIndex);
|
|
1463
|
-
}
|
|
1464
|
-
})) {
|
|
1465
|
-
result = false;
|
|
1466
|
-
break;
|
|
1467
|
-
}
|
|
1468
|
-
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
1469
|
-
result = false;
|
|
1470
|
-
break;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
stack["delete"](array);
|
|
1474
|
-
stack["delete"](other);
|
|
1475
|
-
return result;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
function mapToArray(map) {
|
|
1479
|
-
var index = -1, result = Array(map.size);
|
|
1480
|
-
map.forEach(function(value, key) {
|
|
1481
|
-
result[++index] = [key, value];
|
|
1482
|
-
});
|
|
1483
|
-
return result;
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
function setToArray(set) {
|
|
1487
|
-
var index = -1, result = Array(set.size);
|
|
1488
|
-
set.forEach(function(value) {
|
|
1489
|
-
result[++index] = value;
|
|
1490
|
-
});
|
|
1491
|
-
return result;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
|
-
var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
|
|
1495
|
-
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]";
|
|
1496
|
-
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
1497
|
-
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
1498
|
-
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1499
|
-
switch (tag) {
|
|
1500
|
-
case dataViewTag:
|
|
1501
|
-
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
1502
|
-
return false;
|
|
1503
|
-
}
|
|
1504
|
-
object = object.buffer;
|
|
1505
|
-
other = other.buffer;
|
|
1506
|
-
case arrayBufferTag:
|
|
1507
|
-
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
|
|
1508
|
-
return false;
|
|
1509
|
-
}
|
|
1510
|
-
return true;
|
|
1511
|
-
case boolTag:
|
|
1512
|
-
case dateTag:
|
|
1513
|
-
case numberTag:
|
|
1514
|
-
return eq(+object, +other);
|
|
1515
|
-
case errorTag:
|
|
1516
|
-
return object.name == other.name && object.message == other.message;
|
|
1517
|
-
case regexpTag:
|
|
1518
|
-
case stringTag$1:
|
|
1519
|
-
return object == other + "";
|
|
1520
|
-
case mapTag:
|
|
1521
|
-
var convert = mapToArray;
|
|
1522
|
-
case setTag:
|
|
1523
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
|
|
1524
|
-
convert || (convert = setToArray);
|
|
1525
|
-
if (object.size != other.size && !isPartial) {
|
|
1526
|
-
return false;
|
|
1527
|
-
}
|
|
1528
|
-
var stacked = stack.get(object);
|
|
1529
|
-
if (stacked) {
|
|
1530
|
-
return stacked == other;
|
|
1531
|
-
}
|
|
1532
|
-
bitmask |= COMPARE_UNORDERED_FLAG$2;
|
|
1533
|
-
stack.set(object, other);
|
|
1534
|
-
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1535
|
-
stack["delete"](object);
|
|
1536
|
-
return result;
|
|
1537
|
-
case symbolTag:
|
|
1538
|
-
if (symbolValueOf) {
|
|
1539
|
-
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
return false;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
1546
|
-
var objectProto$1 = Object.prototype;
|
|
1547
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1548
|
-
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1549
|
-
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1550
|
-
if (objLength != othLength && !isPartial) {
|
|
1551
|
-
return false;
|
|
1552
|
-
}
|
|
1553
|
-
var index = objLength;
|
|
1554
|
-
while (index--) {
|
|
1555
|
-
var key = objProps[index];
|
|
1556
|
-
if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
|
|
1557
|
-
return false;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
var objStacked = stack.get(object);
|
|
1561
|
-
var othStacked = stack.get(other);
|
|
1562
|
-
if (objStacked && othStacked) {
|
|
1563
|
-
return objStacked == other && othStacked == object;
|
|
1564
|
-
}
|
|
1565
|
-
var result = true;
|
|
1566
|
-
stack.set(object, other);
|
|
1567
|
-
stack.set(other, object);
|
|
1568
|
-
var skipCtor = isPartial;
|
|
1569
|
-
while (++index < objLength) {
|
|
1570
|
-
key = objProps[index];
|
|
1571
|
-
var objValue = object[key], othValue = other[key];
|
|
1572
|
-
if (customizer) {
|
|
1573
|
-
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1574
|
-
}
|
|
1575
|
-
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1576
|
-
result = false;
|
|
1577
|
-
break;
|
|
1578
|
-
}
|
|
1579
|
-
skipCtor || (skipCtor = key == "constructor");
|
|
1580
|
-
}
|
|
1581
|
-
if (result && !skipCtor) {
|
|
1582
|
-
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1583
|
-
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1584
|
-
result = false;
|
|
1585
|
-
}
|
|
1586
|
-
}
|
|
1587
|
-
stack["delete"](object);
|
|
1588
|
-
stack["delete"](other);
|
|
1589
|
-
return result;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
1593
|
-
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
1594
|
-
var objectProto = Object.prototype;
|
|
1595
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1596
|
-
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1597
|
-
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1598
|
-
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1599
|
-
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1600
|
-
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1601
|
-
if (isSameTag && isBuffer(object)) {
|
|
1602
|
-
if (!isBuffer(other)) {
|
|
1603
|
-
return false;
|
|
1604
|
-
}
|
|
1605
|
-
objIsArr = true;
|
|
1606
|
-
objIsObj = false;
|
|
1607
|
-
}
|
|
1608
|
-
if (isSameTag && !objIsObj) {
|
|
1609
|
-
stack || (stack = new Stack$1());
|
|
1610
|
-
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1611
|
-
}
|
|
1612
|
-
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
1613
|
-
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1614
|
-
if (objIsWrapped || othIsWrapped) {
|
|
1615
|
-
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1616
|
-
stack || (stack = new Stack$1());
|
|
1617
|
-
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
if (!isSameTag) {
|
|
1621
|
-
return false;
|
|
1622
|
-
}
|
|
1623
|
-
stack || (stack = new Stack$1());
|
|
1624
|
-
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1628
|
-
if (value === other) {
|
|
1629
|
-
return true;
|
|
1630
|
-
}
|
|
1631
|
-
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1632
|
-
return value !== value && other !== other;
|
|
1633
|
-
}
|
|
1634
|
-
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
1638
|
-
function baseIsMatch(object, source, matchData, customizer) {
|
|
1639
|
-
var index = matchData.length, length = index;
|
|
1640
|
-
if (object == null) {
|
|
1641
|
-
return !length;
|
|
1642
|
-
}
|
|
1643
|
-
object = Object(object);
|
|
1644
|
-
while (index--) {
|
|
1645
|
-
var data = matchData[index];
|
|
1646
|
-
if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1647
|
-
return false;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
while (++index < length) {
|
|
1651
|
-
data = matchData[index];
|
|
1652
|
-
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1653
|
-
if (data[2]) {
|
|
1654
|
-
if (objValue === void 0 && !(key in object)) {
|
|
1655
|
-
return false;
|
|
1656
|
-
}
|
|
1657
|
-
} else {
|
|
1658
|
-
var stack = new Stack$1();
|
|
1659
|
-
var result;
|
|
1660
|
-
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
|
|
1661
|
-
return false;
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
return true;
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
function isStrictComparable(value) {
|
|
1669
|
-
return value === value && !isObject(value);
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
function getMatchData(object) {
|
|
1673
|
-
var result = keys(object), length = result.length;
|
|
1674
|
-
while (length--) {
|
|
1675
|
-
var key = result[length], value = object[key];
|
|
1676
|
-
result[length] = [key, value, isStrictComparable(value)];
|
|
1677
|
-
}
|
|
1678
|
-
return result;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
function matchesStrictComparable(key, srcValue) {
|
|
1682
|
-
return function(object) {
|
|
1683
|
-
if (object == null) {
|
|
1684
|
-
return false;
|
|
1685
|
-
}
|
|
1686
|
-
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
1687
|
-
};
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
function baseMatches(source) {
|
|
1691
|
-
var matchData = getMatchData(source);
|
|
1692
|
-
if (matchData.length == 1 && matchData[0][2]) {
|
|
1693
|
-
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
1694
|
-
}
|
|
1695
|
-
return function(object) {
|
|
1696
|
-
return object === source || baseIsMatch(object, source, matchData);
|
|
1697
|
-
};
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
function baseHasIn(object, key) {
|
|
1701
|
-
return object != null && key in Object(object);
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
function hasPath(object, path, hasFunc) {
|
|
1705
|
-
path = castPath(path, object);
|
|
1706
|
-
var index = -1, length = path.length, result = false;
|
|
1707
|
-
while (++index < length) {
|
|
1708
|
-
var key = toKey(path[index]);
|
|
1709
|
-
if (!(result = object != null && hasFunc(object, key))) {
|
|
1710
|
-
break;
|
|
1711
|
-
}
|
|
1712
|
-
object = object[key];
|
|
1713
|
-
}
|
|
1714
|
-
if (result || ++index != length) {
|
|
1715
|
-
return result;
|
|
1716
|
-
}
|
|
1717
|
-
length = object == null ? 0 : object.length;
|
|
1718
|
-
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
function hasIn(object, path) {
|
|
1722
|
-
return object != null && hasPath(object, path, baseHasIn);
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
1726
|
-
function baseMatchesProperty(path, srcValue) {
|
|
1727
|
-
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
1728
|
-
return matchesStrictComparable(toKey(path), srcValue);
|
|
1729
|
-
}
|
|
1730
|
-
return function(object) {
|
|
1731
|
-
var objValue = get(object, path);
|
|
1732
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1733
|
-
};
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
function baseProperty(key) {
|
|
1737
|
-
return function(object) {
|
|
1738
|
-
return object == null ? void 0 : object[key];
|
|
1739
|
-
};
|
|
1740
|
-
}
|
|
1741
|
-
|
|
1742
|
-
function basePropertyDeep(path) {
|
|
1743
|
-
return function(object) {
|
|
1744
|
-
return baseGet(object, path);
|
|
1745
|
-
};
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
function property(path) {
|
|
1749
|
-
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
function baseIteratee(value) {
|
|
1753
|
-
if (typeof value == "function") {
|
|
1754
|
-
return value;
|
|
1755
|
-
}
|
|
1756
|
-
if (value == null) {
|
|
1757
|
-
return identity;
|
|
1758
|
-
}
|
|
1759
|
-
if (typeof value == "object") {
|
|
1760
|
-
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
1761
|
-
}
|
|
1762
|
-
return property(value);
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
function createBaseFor(fromRight) {
|
|
1766
|
-
return function(object, iteratee, keysFunc) {
|
|
1767
|
-
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1768
|
-
while (length--) {
|
|
1769
|
-
var key = props[++index];
|
|
1770
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1771
|
-
break;
|
|
1772
|
-
}
|
|
1773
|
-
}
|
|
1774
|
-
return object;
|
|
1775
|
-
};
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
var baseFor = createBaseFor();
|
|
1779
|
-
|
|
1780
|
-
function baseForOwn(object, iteratee) {
|
|
1781
|
-
return object && baseFor(object, iteratee, keys);
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
function createBaseEach(eachFunc, fromRight) {
|
|
1785
|
-
return function(collection, iteratee) {
|
|
1786
|
-
if (collection == null) {
|
|
1787
|
-
return collection;
|
|
1788
|
-
}
|
|
1789
|
-
if (!isArrayLike(collection)) {
|
|
1790
|
-
return eachFunc(collection, iteratee);
|
|
1791
|
-
}
|
|
1792
|
-
var length = collection.length, index = -1, iterable = Object(collection);
|
|
1793
|
-
while (++index < length) {
|
|
1794
|
-
if (iteratee(iterable[index], index, iterable) === false) {
|
|
1795
|
-
break;
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
return collection;
|
|
1799
|
-
};
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
var baseEach = createBaseEach(baseForOwn);
|
|
1803
|
-
|
|
1804
|
-
function assignMergeValue(object, key, value) {
|
|
1805
|
-
if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
|
|
1806
|
-
baseAssignValue(object, key, value);
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
function isArrayLikeObject(value) {
|
|
1811
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
function safeGet(object, key) {
|
|
1815
|
-
if (key === "constructor" && typeof object[key] === "function") {
|
|
1816
|
-
return;
|
|
1817
|
-
}
|
|
1818
|
-
if (key == "__proto__") {
|
|
1819
|
-
return;
|
|
1820
|
-
}
|
|
1821
|
-
return object[key];
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
function toPlainObject(value) {
|
|
1825
|
-
return copyObject(value, keysIn(value));
|
|
1826
|
-
}
|
|
1827
|
-
|
|
1828
|
-
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
1829
|
-
var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
|
|
1830
|
-
if (stacked) {
|
|
1831
|
-
assignMergeValue(object, key, stacked);
|
|
1832
|
-
return;
|
|
1833
|
-
}
|
|
1834
|
-
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
|
|
1835
|
-
var isCommon = newValue === void 0;
|
|
1836
|
-
if (isCommon) {
|
|
1837
|
-
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1838
|
-
newValue = srcValue;
|
|
1839
|
-
if (isArr || isBuff || isTyped) {
|
|
1840
|
-
if (isArray(objValue)) {
|
|
1841
|
-
newValue = objValue;
|
|
1842
|
-
} else if (isArrayLikeObject(objValue)) {
|
|
1843
|
-
newValue = copyArray(objValue);
|
|
1844
|
-
} else if (isBuff) {
|
|
1845
|
-
isCommon = false;
|
|
1846
|
-
newValue = cloneBuffer(srcValue);
|
|
1847
|
-
} else if (isTyped) {
|
|
1848
|
-
isCommon = false;
|
|
1849
|
-
newValue = cloneTypedArray(srcValue);
|
|
1850
|
-
} else {
|
|
1851
|
-
newValue = [];
|
|
1852
|
-
}
|
|
1853
|
-
} else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
|
1854
|
-
newValue = objValue;
|
|
1855
|
-
if (isArguments(objValue)) {
|
|
1856
|
-
newValue = toPlainObject(objValue);
|
|
1857
|
-
} else if (!isObject(objValue) || isFunction(objValue)) {
|
|
1858
|
-
newValue = initCloneObject(srcValue);
|
|
1859
|
-
}
|
|
1860
|
-
} else {
|
|
1861
|
-
isCommon = false;
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
if (isCommon) {
|
|
1865
|
-
stack.set(srcValue, newValue);
|
|
1866
|
-
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
1867
|
-
stack["delete"](srcValue);
|
|
1868
|
-
}
|
|
1869
|
-
assignMergeValue(object, key, newValue);
|
|
1870
|
-
}
|
|
1871
|
-
|
|
1872
|
-
function baseMerge(object, source, srcIndex, customizer, stack) {
|
|
1873
|
-
if (object === source) {
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
baseFor(source, function(srcValue, key) {
|
|
1877
|
-
stack || (stack = new Stack$1());
|
|
1878
|
-
if (isObject(srcValue)) {
|
|
1879
|
-
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
|
|
1880
|
-
} else {
|
|
1881
|
-
var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : void 0;
|
|
1882
|
-
if (newValue === void 0) {
|
|
1883
|
-
newValue = srcValue;
|
|
1884
|
-
}
|
|
1885
|
-
assignMergeValue(object, key, newValue);
|
|
1886
|
-
}
|
|
1887
|
-
}, keysIn);
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
var LARGE_ARRAY_SIZE$1 = 200;
|
|
1891
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
1892
|
-
var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length;
|
|
1893
|
-
if (!length) {
|
|
1894
|
-
return result;
|
|
1895
|
-
}
|
|
1896
|
-
if (values.length >= LARGE_ARRAY_SIZE$1) {
|
|
1897
|
-
includes = cacheHas;
|
|
1898
|
-
isCommon = false;
|
|
1899
|
-
values = new SetCache(values);
|
|
1900
|
-
}
|
|
1901
|
-
outer:
|
|
1902
|
-
while (++index < length) {
|
|
1903
|
-
var value = array[index], computed = value ;
|
|
1904
|
-
value = value !== 0 ? value : 0;
|
|
1905
|
-
if (isCommon && computed === computed) {
|
|
1906
|
-
var valuesIndex = valuesLength;
|
|
1907
|
-
while (valuesIndex--) {
|
|
1908
|
-
if (values[valuesIndex] === computed) {
|
|
1909
|
-
continue outer;
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
result.push(value);
|
|
1913
|
-
} else if (!includes(values, computed, comparator)) {
|
|
1914
|
-
result.push(value);
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
return result;
|
|
1918
|
-
}
|
|
1919
|
-
|
|
1920
|
-
function baseMap(collection, iteratee) {
|
|
1921
|
-
var index = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
1922
|
-
baseEach(collection, function(value, key, collection2) {
|
|
1923
|
-
result[++index] = iteratee(value, key, collection2);
|
|
1924
|
-
});
|
|
1925
|
-
return result;
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
var stringTag = "[object String]";
|
|
1929
|
-
function isString(value) {
|
|
1930
|
-
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
var merge = createAssigner(function(object, source, srcIndex) {
|
|
1934
|
-
baseMerge(object, source, srcIndex);
|
|
1935
|
-
});
|
|
1936
|
-
|
|
1937
|
-
function baseSortBy(array, comparer) {
|
|
1938
|
-
var length = array.length;
|
|
1939
|
-
array.sort(comparer);
|
|
1940
|
-
while (length--) {
|
|
1941
|
-
array[length] = array[length].value;
|
|
1942
|
-
}
|
|
1943
|
-
return array;
|
|
1944
|
-
}
|
|
1945
|
-
|
|
1946
|
-
function compareAscending(value, other) {
|
|
1947
|
-
if (value !== other) {
|
|
1948
|
-
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
|
1949
|
-
var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
|
1950
|
-
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
1951
|
-
return 1;
|
|
1952
|
-
}
|
|
1953
|
-
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
|
1954
|
-
return -1;
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
return 0;
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
function compareMultiple(object, other, orders) {
|
|
1961
|
-
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
1962
|
-
while (++index < length) {
|
|
1963
|
-
var result = compareAscending(objCriteria[index], othCriteria[index]);
|
|
1964
|
-
if (result) {
|
|
1965
|
-
if (index >= ordersLength) {
|
|
1966
|
-
return result;
|
|
1967
|
-
}
|
|
1968
|
-
var order = orders[index];
|
|
1969
|
-
return result * (order == "desc" ? -1 : 1);
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
return object.index - other.index;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
function baseOrderBy(collection, iteratees, orders) {
|
|
1976
|
-
if (iteratees.length) {
|
|
1977
|
-
iteratees = arrayMap(iteratees, function(iteratee) {
|
|
1978
|
-
if (isArray(iteratee)) {
|
|
1979
|
-
return function(value) {
|
|
1980
|
-
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
1981
|
-
};
|
|
1982
|
-
}
|
|
1983
|
-
return iteratee;
|
|
1984
|
-
});
|
|
1985
|
-
} else {
|
|
1986
|
-
iteratees = [identity];
|
|
1987
|
-
}
|
|
1988
|
-
var index = -1;
|
|
1989
|
-
iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
|
|
1990
|
-
var result = baseMap(collection, function(value, key, collection2) {
|
|
1991
|
-
var criteria = arrayMap(iteratees, function(iteratee) {
|
|
1992
|
-
return iteratee(value);
|
|
1993
|
-
});
|
|
1994
|
-
return { "criteria": criteria, "index": ++index, "value": value };
|
|
1995
|
-
});
|
|
1996
|
-
return baseSortBy(result, function(object, other) {
|
|
1997
|
-
return compareMultiple(object, other, orders);
|
|
1998
|
-
});
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
var sortBy = baseRest(function(collection, iteratees) {
|
|
2002
|
-
if (collection == null) {
|
|
2003
|
-
return [];
|
|
2004
|
-
}
|
|
2005
|
-
var length = iteratees.length;
|
|
2006
|
-
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
|
2007
|
-
iteratees = [];
|
|
2008
|
-
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
|
2009
|
-
iteratees = [iteratees[0]];
|
|
2010
|
-
}
|
|
2011
|
-
return baseOrderBy(collection, baseFlatten(iteratees), []);
|
|
2012
|
-
});
|
|
2013
|
-
|
|
2014
|
-
var INFINITY = 1 / 0;
|
|
2015
|
-
var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? noop : function(values) {
|
|
2016
|
-
return new Set$1(values);
|
|
2017
|
-
};
|
|
2018
|
-
|
|
2019
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
2020
|
-
function baseUniq(array, iteratee, comparator) {
|
|
2021
|
-
var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
|
|
2022
|
-
if (length >= LARGE_ARRAY_SIZE) {
|
|
2023
|
-
var set = createSet(array);
|
|
2024
|
-
if (set) {
|
|
2025
|
-
return setToArray(set);
|
|
2026
|
-
}
|
|
2027
|
-
isCommon = false;
|
|
2028
|
-
includes = cacheHas;
|
|
2029
|
-
seen = new SetCache();
|
|
2030
|
-
} else {
|
|
2031
|
-
seen = result;
|
|
2032
|
-
}
|
|
2033
|
-
outer:
|
|
2034
|
-
while (++index < length) {
|
|
2035
|
-
var value = array[index], computed = value;
|
|
2036
|
-
value = value !== 0 ? value : 0;
|
|
2037
|
-
if (isCommon && computed === computed) {
|
|
2038
|
-
var seenIndex = seen.length;
|
|
2039
|
-
while (seenIndex--) {
|
|
2040
|
-
if (seen[seenIndex] === computed) {
|
|
2041
|
-
continue outer;
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
result.push(value);
|
|
2045
|
-
} else if (!includes(seen, computed, comparator)) {
|
|
2046
|
-
if (seen !== result) {
|
|
2047
|
-
seen.push(computed);
|
|
2048
|
-
}
|
|
2049
|
-
result.push(value);
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
return result;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
function baseXor(arrays, iteratee, comparator) {
|
|
2056
|
-
var length = arrays.length;
|
|
2057
|
-
if (length < 2) {
|
|
2058
|
-
return length ? baseUniq(arrays[0]) : [];
|
|
2059
|
-
}
|
|
2060
|
-
var index = -1, result = Array(length);
|
|
2061
|
-
while (++index < length) {
|
|
2062
|
-
var array = arrays[index], othIndex = -1;
|
|
2063
|
-
while (++othIndex < length) {
|
|
2064
|
-
if (othIndex != index) {
|
|
2065
|
-
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
return baseUniq(baseFlatten(result), iteratee, comparator);
|
|
2070
|
-
}
|
|
2071
|
-
|
|
2072
|
-
var xor = baseRest(function(arrays) {
|
|
2073
|
-
return baseXor(arrayFilter(arrays, isArrayLikeObject));
|
|
2074
|
-
});
|
|
2075
|
-
|
|
2076
418
|
const planSchemaValidator = validate14;
|
|
2077
419
|
const schema32 = { "items": { "properties": { "fileHash": { "type": ["string"] }}} };
|
|
2078
420
|
const pattern0 = new RegExp("^[1-9][0-9]*(.[1-9][0-9]*)*$", "u");
|
|
@@ -2189,7 +531,7 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2189
531
|
return errors === 0;
|
|
2190
532
|
}
|
|
2191
533
|
|
|
2192
|
-
const isNonEmptyString = (input) => isString(input) && input.length > 0;
|
|
534
|
+
const isNonEmptyString = (input) => esToolkit.isString(input) && input.length > 0;
|
|
2193
535
|
const validatePlan = (plan) => {
|
|
2194
536
|
const valid = planSchemaValidator(plan);
|
|
2195
537
|
const errors = planSchemaValidator.errors;
|
|
@@ -2254,7 +596,7 @@ const throwIfFilesHaveChanged = (migrationEntries) => {
|
|
|
2254
596
|
const throwIfSequenceHasChanged = (migrationEntries) => {
|
|
2255
597
|
const changeSequences = migrationEntries.filter((m) => {
|
|
2256
598
|
const { sequence, sequenceFromHistory } = m;
|
|
2257
|
-
const changed = isString(sequenceFromHistory) && sequenceFromHistory !== sequence;
|
|
599
|
+
const changed = esToolkit.isString(sequenceFromHistory) && sequenceFromHistory !== sequence;
|
|
2258
600
|
return changed;
|
|
2259
601
|
}).map((f) => f.fileName);
|
|
2260
602
|
if (changeSequences.length) {
|
|
@@ -2287,7 +629,7 @@ const throwIfSequenceHasIntegerGaps = (migrationEntries) => {
|
|
|
2287
629
|
);
|
|
2288
630
|
const max = orderedUniqueSequenceIntegers[orderedUniqueSequenceIntegers.length - 1];
|
|
2289
631
|
const expected = Array.from({ length: max }, (_v, k) => k + 1);
|
|
2290
|
-
const missing = xor(orderedUniqueSequenceIntegers, expected);
|
|
632
|
+
const missing = esToolkit.xor(orderedUniqueSequenceIntegers, expected);
|
|
2291
633
|
if (missing.length) {
|
|
2292
634
|
throw new Error(
|
|
2293
635
|
`Migration sequence numbers in plan.json have unexpected gaps: ${missing.join(
|
|
@@ -8894,7 +7236,7 @@ const glob = Object.assign(glob_, {
|
|
|
8894
7236
|
});
|
|
8895
7237
|
glob.glob = glob;
|
|
8896
7238
|
|
|
8897
|
-
const sortFilePathsByFilename = (filePaths) => sortBy(filePaths, (file) => {
|
|
7239
|
+
const sortFilePathsByFilename = (filePaths) => compat.sortBy(filePaths, (file) => {
|
|
8898
7240
|
return path$1.parse(file).base;
|
|
8899
7241
|
});
|
|
8900
7242
|
const getMigrationFilePaths = async (pathToMigrations) => {
|
|
@@ -9218,7 +7560,7 @@ const loadMigrationFunctions = async (sortedMigrationEntries, nextVersion, impor
|
|
|
9218
7560
|
setCachedMigratorFunctions(migrationFunctions);
|
|
9219
7561
|
setCachedPlannedVersion(nextVersion);
|
|
9220
7562
|
}
|
|
9221
|
-
return merge(sortedMigrationEntries, migrationFunctions);
|
|
7563
|
+
return esToolkit.merge(sortedMigrationEntries, migrationFunctions);
|
|
9222
7564
|
};
|
|
9223
7565
|
const getPlannedMigrations = async ({ config }) => {
|
|
9224
7566
|
const {
|
|
@@ -9423,7 +7765,7 @@ const errorMessage = (fileName, message, stack) => `Unhandled exception in file
|
|
|
9423
7765
|
|
|
9424
7766
|
${stack}
|
|
9425
7767
|
`;
|
|
9426
|
-
const pipe = (migrations, payload) => (
|
|
7768
|
+
const pipe = (migrations, payload, metaData) => (
|
|
9427
7769
|
// structuredClone is to remove Immer artefacts - TODO check this
|
|
9428
7770
|
structuredClone(
|
|
9429
7771
|
migrations.reduce((v, m) => {
|
|
@@ -9431,7 +7773,7 @@ const pipe = (migrations, payload) => (
|
|
|
9431
7773
|
throw new TypeError("Expected a function");
|
|
9432
7774
|
}
|
|
9433
7775
|
try {
|
|
9434
|
-
return m.migrator(v);
|
|
7776
|
+
return m.migrator(v, metaData);
|
|
9435
7777
|
} catch (error) {
|
|
9436
7778
|
throw new Error(errorMessage(m?.fileName, error.message, error.stack));
|
|
9437
7779
|
}
|
|
@@ -9660,13 +8002,14 @@ const getPendingMigrators = async ({ config }) => {
|
|
|
9660
8002
|
|
|
9661
8003
|
const migrate = async ({
|
|
9662
8004
|
payload,
|
|
9663
|
-
config
|
|
8005
|
+
config,
|
|
8006
|
+
metaData
|
|
9664
8007
|
}) => {
|
|
9665
8008
|
const { pendingMigrators, nextVersion } = await getPendingMigrators({
|
|
9666
8009
|
config
|
|
9667
8010
|
});
|
|
9668
8011
|
return {
|
|
9669
|
-
nextPayload: pendingMigrators.length ? PipeModule.pipe(pendingMigrators, payload) : payload,
|
|
8012
|
+
nextPayload: pendingMigrators.length ? PipeModule.pipe(pendingMigrators, payload, metaData) : payload,
|
|
9670
8013
|
nextVersion
|
|
9671
8014
|
};
|
|
9672
8015
|
};
|
|
@@ -9703,7 +8046,8 @@ const migrateRecord = async ({
|
|
|
9703
8046
|
...config,
|
|
9704
8047
|
version: currentVersion,
|
|
9705
8048
|
printPendingFileNames: true
|
|
9706
|
-
}
|
|
8049
|
+
},
|
|
8050
|
+
metaData: esToolkit.omit(currentRecord, [config.entityColumnNames.payload])
|
|
9707
8051
|
});
|
|
9708
8052
|
if (!dry) {
|
|
9709
8053
|
const nextRecord = await updateRecord(
|