@teselagen/sequence-utils 0.1.11 → 0.1.14
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/addGapsToSeqReads.test.d.ts +1 -0
- package/adjustBpsToReplaceOrInsert.test.d.ts +1 -0
- package/aminoAcidToDnaRna.test.d.ts +1 -0
- package/annotateSingleSeq.test.d.ts +1 -0
- package/autoAnnotate.test.d.ts +1 -0
- package/bioData.d.ts +192 -192
- package/calculateNebTa.test.d.ts +1 -0
- package/calculateNebTm.test.d.ts +1 -0
- package/calculatePercentGC.test.d.ts +1 -0
- package/calculateTm.test.d.ts +1 -0
- package/computeDigestFragments.test.d.ts +1 -0
- package/condensePairwiseAlignmentDifferences.test.d.ts +1 -0
- package/convertAACaretPositionOrRangeToDna.test.d.ts +1 -0
- package/convertDnaCaretPositionOrRangeToAA.test.d.ts +1 -0
- package/cutSequenceByRestrictionEnzyme.test.d.ts +1 -0
- package/deleteSequenceDataAtRange.test.d.ts +1 -0
- package/diffUtils.test.d.ts +1 -0
- package/doesEnzymeChopOutsideOfRecognitionSite.test.d.ts +1 -0
- package/featureTypesAndColors.test.d.ts +1 -0
- package/filterAminoAcidSequenceString.test.d.ts +1 -0
- package/filterSequenceString.test.d.ts +1 -0
- package/findNearestRangeOfSequenceOverlapToPosition.test.d.ts +1 -0
- package/findSequenceMatches.test.d.ts +1 -0
- package/generateSequenceData.test.d.ts +1 -0
- package/getAllInsertionsInSeqReads.test.d.ts +1 -0
- package/getAminoAcidDataForEachBaseOfDna.test.d.ts +1 -0
- package/getAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getDigestFragmentsForRestrictionEnzymes.test.d.ts +1 -0
- package/getInsertBetweenVals.test.d.ts +1 -0
- package/getLeftAndRightOfSequenceInRangeGivenPosition.test.d.ts +1 -0
- package/getMassofAaString.test.d.ts +1 -0
- package/getOrfsFromSequence.test.d.ts +1 -0
- package/getOverlapBetweenTwoSequences.d.ts +1 -1
- package/getOverlapBetweenTwoSequences.test.d.ts +1 -0
- package/getPossiblePartsFromSequenceAndEnzymes.test.d.ts +1 -0
- package/getReverseAminoAcidStringFromSequenceString.test.d.ts +1 -0
- package/getReverseComplementAnnotation.test.d.ts +1 -0
- package/getReverseComplementSequenceAndAnnotations.test.d.ts +1 -0
- package/getReverseComplementSequenceString.test.d.ts +1 -0
- package/getReverseSequenceString.test.d.ts +1 -0
- package/getSequenceDataBetweenRange.test.d.ts +1 -0
- package/getVirtualDigest.test.d.ts +1 -0
- package/guessIfSequenceIsDnaAndNotProtein.test.d.ts +1 -0
- package/index.d.ts +7 -7
- package/index.js +774 -696
- package/index.mjs +774 -696
- package/index.test.d.ts +1 -0
- package/index.umd.js +775 -697
- package/insertGapsIntoRefSeq.test.d.ts +1 -0
- package/insertSequenceDataAtPosition.test.d.ts +1 -0
- package/insertSequenceDataAtPositionOrRange.test.d.ts +1 -0
- package/mapAnnotationsToRows.test.d.ts +1 -0
- package/package.json +3 -3
- package/prepareCircularViewData.test.d.ts +1 -0
- package/prepareRowData.test.d.ts +1 -0
- package/rotateBpsToPosition.test.d.ts +1 -0
- package/rotateSequenceDataToPosition.test.d.ts +1 -0
- package/tidyUpSequenceData.test.d.ts +1 -0
package/index.js
CHANGED
|
@@ -394,18 +394,18 @@ lodash.exports;
|
|
|
394
394
|
}
|
|
395
395
|
__name(apply, "apply");
|
|
396
396
|
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
397
|
-
var
|
|
398
|
-
while (++
|
|
399
|
-
var value = array[
|
|
397
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
398
|
+
while (++index < length) {
|
|
399
|
+
var value = array[index];
|
|
400
400
|
setter(accumulator, value, iteratee(value), array);
|
|
401
401
|
}
|
|
402
402
|
return accumulator;
|
|
403
403
|
}
|
|
404
404
|
__name(arrayAggregator, "arrayAggregator");
|
|
405
405
|
function arrayEach(array, iteratee) {
|
|
406
|
-
var
|
|
407
|
-
while (++
|
|
408
|
-
if (iteratee(array[
|
|
406
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
407
|
+
while (++index < length) {
|
|
408
|
+
if (iteratee(array[index], index, array) === false) {
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -423,9 +423,9 @@ lodash.exports;
|
|
|
423
423
|
}
|
|
424
424
|
__name(arrayEachRight, "arrayEachRight");
|
|
425
425
|
function arrayEvery(array, predicate) {
|
|
426
|
-
var
|
|
427
|
-
while (++
|
|
428
|
-
if (!predicate(array[
|
|
426
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
427
|
+
while (++index < length) {
|
|
428
|
+
if (!predicate(array[index], index, array)) {
|
|
429
429
|
return false;
|
|
430
430
|
}
|
|
431
431
|
}
|
|
@@ -433,10 +433,10 @@ lodash.exports;
|
|
|
433
433
|
}
|
|
434
434
|
__name(arrayEvery, "arrayEvery");
|
|
435
435
|
function arrayFilter(array, predicate) {
|
|
436
|
-
var
|
|
437
|
-
while (++
|
|
438
|
-
var value = array[
|
|
439
|
-
if (predicate(value,
|
|
436
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
437
|
+
while (++index < length) {
|
|
438
|
+
var value = array[index];
|
|
439
|
+
if (predicate(value, index, array)) {
|
|
440
440
|
result[resIndex++] = value;
|
|
441
441
|
}
|
|
442
442
|
}
|
|
@@ -449,9 +449,9 @@ lodash.exports;
|
|
|
449
449
|
}
|
|
450
450
|
__name(arrayIncludes, "arrayIncludes");
|
|
451
451
|
function arrayIncludesWith(array, value, comparator) {
|
|
452
|
-
var
|
|
453
|
-
while (++
|
|
454
|
-
if (comparator(value, array[
|
|
452
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
453
|
+
while (++index < length) {
|
|
454
|
+
if (comparator(value, array[index])) {
|
|
455
455
|
return true;
|
|
456
456
|
}
|
|
457
457
|
}
|
|
@@ -459,28 +459,28 @@ lodash.exports;
|
|
|
459
459
|
}
|
|
460
460
|
__name(arrayIncludesWith, "arrayIncludesWith");
|
|
461
461
|
function arrayMap(array, iteratee) {
|
|
462
|
-
var
|
|
463
|
-
while (++
|
|
464
|
-
result[
|
|
462
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
463
|
+
while (++index < length) {
|
|
464
|
+
result[index] = iteratee(array[index], index, array);
|
|
465
465
|
}
|
|
466
466
|
return result;
|
|
467
467
|
}
|
|
468
468
|
__name(arrayMap, "arrayMap");
|
|
469
469
|
function arrayPush(array, values) {
|
|
470
|
-
var
|
|
471
|
-
while (++
|
|
472
|
-
array[offset +
|
|
470
|
+
var index = -1, length = values.length, offset = array.length;
|
|
471
|
+
while (++index < length) {
|
|
472
|
+
array[offset + index] = values[index];
|
|
473
473
|
}
|
|
474
474
|
return array;
|
|
475
475
|
}
|
|
476
476
|
__name(arrayPush, "arrayPush");
|
|
477
477
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
478
|
-
var
|
|
478
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
479
479
|
if (initAccum && length) {
|
|
480
|
-
accumulator = array[++
|
|
480
|
+
accumulator = array[++index];
|
|
481
481
|
}
|
|
482
|
-
while (++
|
|
483
|
-
accumulator = iteratee(accumulator, array[
|
|
482
|
+
while (++index < length) {
|
|
483
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
|
484
484
|
}
|
|
485
485
|
return accumulator;
|
|
486
486
|
}
|
|
@@ -497,9 +497,9 @@ lodash.exports;
|
|
|
497
497
|
}
|
|
498
498
|
__name(arrayReduceRight, "arrayReduceRight");
|
|
499
499
|
function arraySome(array, predicate) {
|
|
500
|
-
var
|
|
501
|
-
while (++
|
|
502
|
-
if (predicate(array[
|
|
500
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
501
|
+
while (++index < length) {
|
|
502
|
+
if (predicate(array[index], index, array)) {
|
|
503
503
|
return true;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -527,10 +527,10 @@ lodash.exports;
|
|
|
527
527
|
}
|
|
528
528
|
__name(baseFindKey, "baseFindKey");
|
|
529
529
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
530
|
-
var length = array.length,
|
|
531
|
-
while (fromRight ?
|
|
532
|
-
if (predicate(array[
|
|
533
|
-
return
|
|
530
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
531
|
+
while (fromRight ? index-- : ++index < length) {
|
|
532
|
+
if (predicate(array[index], index, array)) {
|
|
533
|
+
return index;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
return -1;
|
|
@@ -541,10 +541,10 @@ lodash.exports;
|
|
|
541
541
|
}
|
|
542
542
|
__name(baseIndexOf, "baseIndexOf");
|
|
543
543
|
function baseIndexOfWith(array, value, fromIndex, comparator) {
|
|
544
|
-
var
|
|
545
|
-
while (++
|
|
546
|
-
if (comparator(array[
|
|
547
|
-
return
|
|
544
|
+
var index = fromIndex - 1, length = array.length;
|
|
545
|
+
while (++index < length) {
|
|
546
|
+
if (comparator(array[index], value)) {
|
|
547
|
+
return index;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
return -1;
|
|
@@ -572,8 +572,8 @@ lodash.exports;
|
|
|
572
572
|
}
|
|
573
573
|
__name(basePropertyOf, "basePropertyOf");
|
|
574
574
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
575
|
-
eachFunc(collection, function(value,
|
|
576
|
-
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value,
|
|
575
|
+
eachFunc(collection, function(value, index, collection2) {
|
|
576
|
+
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
|
|
577
577
|
});
|
|
578
578
|
return accumulator;
|
|
579
579
|
}
|
|
@@ -588,9 +588,9 @@ lodash.exports;
|
|
|
588
588
|
}
|
|
589
589
|
__name(baseSortBy, "baseSortBy");
|
|
590
590
|
function baseSum(array, iteratee) {
|
|
591
|
-
var result,
|
|
592
|
-
while (++
|
|
593
|
-
var current = iteratee(array[
|
|
591
|
+
var result, index = -1, length = array.length;
|
|
592
|
+
while (++index < length) {
|
|
593
|
+
var current = iteratee(array[index]);
|
|
594
594
|
if (current !== undefined$1) {
|
|
595
595
|
result = result === undefined$1 ? current : result + current;
|
|
596
596
|
}
|
|
@@ -599,9 +599,9 @@ lodash.exports;
|
|
|
599
599
|
}
|
|
600
600
|
__name(baseSum, "baseSum");
|
|
601
601
|
function baseTimes(n, iteratee) {
|
|
602
|
-
var
|
|
603
|
-
while (++
|
|
604
|
-
result[
|
|
602
|
+
var index = -1, result = Array(n);
|
|
603
|
+
while (++index < n) {
|
|
604
|
+
result[index] = iteratee(index);
|
|
605
605
|
}
|
|
606
606
|
return result;
|
|
607
607
|
}
|
|
@@ -633,17 +633,17 @@ lodash.exports;
|
|
|
633
633
|
}
|
|
634
634
|
__name(cacheHas, "cacheHas");
|
|
635
635
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
636
|
-
var
|
|
637
|
-
while (++
|
|
636
|
+
var index = -1, length = strSymbols.length;
|
|
637
|
+
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
638
638
|
}
|
|
639
|
-
return
|
|
639
|
+
return index;
|
|
640
640
|
}
|
|
641
641
|
__name(charsStartIndex, "charsStartIndex");
|
|
642
642
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
643
|
-
var
|
|
644
|
-
while (
|
|
643
|
+
var index = strSymbols.length;
|
|
644
|
+
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
645
645
|
}
|
|
646
|
-
return
|
|
646
|
+
return index;
|
|
647
647
|
}
|
|
648
648
|
__name(charsEndIndex, "charsEndIndex");
|
|
649
649
|
function countHolders(array, placeholder) {
|
|
@@ -683,9 +683,9 @@ lodash.exports;
|
|
|
683
683
|
}
|
|
684
684
|
__name(iteratorToArray, "iteratorToArray");
|
|
685
685
|
function mapToArray(map) {
|
|
686
|
-
var
|
|
686
|
+
var index = -1, result = Array(map.size);
|
|
687
687
|
map.forEach(function(value, key) {
|
|
688
|
-
result[++
|
|
688
|
+
result[++index] = [key, value];
|
|
689
689
|
});
|
|
690
690
|
return result;
|
|
691
691
|
}
|
|
@@ -697,51 +697,51 @@ lodash.exports;
|
|
|
697
697
|
}
|
|
698
698
|
__name(overArg, "overArg");
|
|
699
699
|
function replaceHolders(array, placeholder) {
|
|
700
|
-
var
|
|
701
|
-
while (++
|
|
702
|
-
var value = array[
|
|
700
|
+
var index = -1, length = array.length, resIndex = 0, result = [];
|
|
701
|
+
while (++index < length) {
|
|
702
|
+
var value = array[index];
|
|
703
703
|
if (value === placeholder || value === PLACEHOLDER) {
|
|
704
|
-
array[
|
|
705
|
-
result[resIndex++] =
|
|
704
|
+
array[index] = PLACEHOLDER;
|
|
705
|
+
result[resIndex++] = index;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
708
|
return result;
|
|
709
709
|
}
|
|
710
710
|
__name(replaceHolders, "replaceHolders");
|
|
711
711
|
function setToArray(set) {
|
|
712
|
-
var
|
|
712
|
+
var index = -1, result = Array(set.size);
|
|
713
713
|
set.forEach(function(value) {
|
|
714
|
-
result[++
|
|
714
|
+
result[++index] = value;
|
|
715
715
|
});
|
|
716
716
|
return result;
|
|
717
717
|
}
|
|
718
718
|
__name(setToArray, "setToArray");
|
|
719
719
|
function setToPairs(set) {
|
|
720
|
-
var
|
|
720
|
+
var index = -1, result = Array(set.size);
|
|
721
721
|
set.forEach(function(value) {
|
|
722
|
-
result[++
|
|
722
|
+
result[++index] = [value, value];
|
|
723
723
|
});
|
|
724
724
|
return result;
|
|
725
725
|
}
|
|
726
726
|
__name(setToPairs, "setToPairs");
|
|
727
727
|
function strictIndexOf(array, value, fromIndex) {
|
|
728
|
-
var
|
|
729
|
-
while (++
|
|
730
|
-
if (array[
|
|
731
|
-
return
|
|
728
|
+
var index = fromIndex - 1, length = array.length;
|
|
729
|
+
while (++index < length) {
|
|
730
|
+
if (array[index] === value) {
|
|
731
|
+
return index;
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
734
|
return -1;
|
|
735
735
|
}
|
|
736
736
|
__name(strictIndexOf, "strictIndexOf");
|
|
737
737
|
function strictLastIndexOf(array, value, fromIndex) {
|
|
738
|
-
var
|
|
739
|
-
while (
|
|
740
|
-
if (array[
|
|
741
|
-
return
|
|
738
|
+
var index = fromIndex + 1;
|
|
739
|
+
while (index--) {
|
|
740
|
+
if (array[index] === value) {
|
|
741
|
+
return index;
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
return
|
|
744
|
+
return index;
|
|
745
745
|
}
|
|
746
746
|
__name(strictLastIndexOf, "strictLastIndexOf");
|
|
747
747
|
function stringSize(string) {
|
|
@@ -753,10 +753,10 @@ lodash.exports;
|
|
|
753
753
|
}
|
|
754
754
|
__name(stringToArray, "stringToArray");
|
|
755
755
|
function trimmedEndIndex(string) {
|
|
756
|
-
var
|
|
757
|
-
while (
|
|
756
|
+
var index = string.length;
|
|
757
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
758
758
|
}
|
|
759
|
-
return
|
|
759
|
+
return index;
|
|
760
760
|
}
|
|
761
761
|
__name(trimmedEndIndex, "trimmedEndIndex");
|
|
762
762
|
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
@@ -933,15 +933,15 @@ lodash.exports;
|
|
|
933
933
|
}
|
|
934
934
|
__name(lazyReverse, "lazyReverse");
|
|
935
935
|
function lazyValue() {
|
|
936
|
-
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start,
|
|
936
|
+
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray2(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
|
|
937
937
|
if (!isArr || !isRight && arrLength == length && takeCount == length) {
|
|
938
938
|
return baseWrapperValue(array, this.__actions__);
|
|
939
939
|
}
|
|
940
940
|
var result2 = [];
|
|
941
941
|
outer:
|
|
942
942
|
while (length-- && resIndex < takeCount) {
|
|
943
|
-
|
|
944
|
-
var iterIndex = -1, value = array[
|
|
943
|
+
index += dir;
|
|
944
|
+
var iterIndex = -1, value = array[index];
|
|
945
945
|
while (++iterIndex < iterLength) {
|
|
946
946
|
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
|
|
947
947
|
if (type == LAZY_MAP_FLAG) {
|
|
@@ -962,10 +962,10 @@ lodash.exports;
|
|
|
962
962
|
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
|
963
963
|
LazyWrapper.prototype.constructor = LazyWrapper;
|
|
964
964
|
function Hash(entries) {
|
|
965
|
-
var
|
|
965
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
966
966
|
this.clear();
|
|
967
|
-
while (++
|
|
968
|
-
var entry = entries[
|
|
967
|
+
while (++index < length) {
|
|
968
|
+
var entry = entries[index];
|
|
969
969
|
this.set(entry[0], entry[1]);
|
|
970
970
|
}
|
|
971
971
|
}
|
|
@@ -1008,10 +1008,10 @@ lodash.exports;
|
|
|
1008
1008
|
Hash.prototype.has = hashHas;
|
|
1009
1009
|
Hash.prototype.set = hashSet;
|
|
1010
1010
|
function ListCache(entries) {
|
|
1011
|
-
var
|
|
1011
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1012
1012
|
this.clear();
|
|
1013
|
-
while (++
|
|
1014
|
-
var entry = entries[
|
|
1013
|
+
while (++index < length) {
|
|
1014
|
+
var entry = entries[index];
|
|
1015
1015
|
this.set(entry[0], entry[1]);
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1022,23 +1022,23 @@ lodash.exports;
|
|
|
1022
1022
|
}
|
|
1023
1023
|
__name(listCacheClear, "listCacheClear");
|
|
1024
1024
|
function listCacheDelete(key) {
|
|
1025
|
-
var data = this.__data__,
|
|
1026
|
-
if (
|
|
1025
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1026
|
+
if (index < 0) {
|
|
1027
1027
|
return false;
|
|
1028
1028
|
}
|
|
1029
1029
|
var lastIndex = data.length - 1;
|
|
1030
|
-
if (
|
|
1030
|
+
if (index == lastIndex) {
|
|
1031
1031
|
data.pop();
|
|
1032
1032
|
} else {
|
|
1033
|
-
splice.call(data,
|
|
1033
|
+
splice.call(data, index, 1);
|
|
1034
1034
|
}
|
|
1035
1035
|
--this.size;
|
|
1036
1036
|
return true;
|
|
1037
1037
|
}
|
|
1038
1038
|
__name(listCacheDelete, "listCacheDelete");
|
|
1039
1039
|
function listCacheGet(key) {
|
|
1040
|
-
var data = this.__data__,
|
|
1041
|
-
return
|
|
1040
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1041
|
+
return index < 0 ? undefined$1 : data[index][1];
|
|
1042
1042
|
}
|
|
1043
1043
|
__name(listCacheGet, "listCacheGet");
|
|
1044
1044
|
function listCacheHas(key) {
|
|
@@ -1046,12 +1046,12 @@ lodash.exports;
|
|
|
1046
1046
|
}
|
|
1047
1047
|
__name(listCacheHas, "listCacheHas");
|
|
1048
1048
|
function listCacheSet(key, value) {
|
|
1049
|
-
var data = this.__data__,
|
|
1050
|
-
if (
|
|
1049
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
1050
|
+
if (index < 0) {
|
|
1051
1051
|
++this.size;
|
|
1052
1052
|
data.push([key, value]);
|
|
1053
1053
|
} else {
|
|
1054
|
-
data[
|
|
1054
|
+
data[index][1] = value;
|
|
1055
1055
|
}
|
|
1056
1056
|
return this;
|
|
1057
1057
|
}
|
|
@@ -1062,10 +1062,10 @@ lodash.exports;
|
|
|
1062
1062
|
ListCache.prototype.has = listCacheHas;
|
|
1063
1063
|
ListCache.prototype.set = listCacheSet;
|
|
1064
1064
|
function MapCache(entries) {
|
|
1065
|
-
var
|
|
1065
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
1066
1066
|
this.clear();
|
|
1067
|
-
while (++
|
|
1068
|
-
var entry = entries[
|
|
1067
|
+
while (++index < length) {
|
|
1068
|
+
var entry = entries[index];
|
|
1069
1069
|
this.set(entry[0], entry[1]);
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
@@ -1106,10 +1106,10 @@ lodash.exports;
|
|
|
1106
1106
|
MapCache.prototype.has = mapCacheHas;
|
|
1107
1107
|
MapCache.prototype.set = mapCacheSet;
|
|
1108
1108
|
function SetCache(values2) {
|
|
1109
|
-
var
|
|
1109
|
+
var index = -1, length = values2 == null ? 0 : values2.length;
|
|
1110
1110
|
this.__data__ = new MapCache();
|
|
1111
|
-
while (++
|
|
1112
|
-
this.add(values2[
|
|
1111
|
+
while (++index < length) {
|
|
1112
|
+
this.add(values2[index]);
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
1115
|
__name(SetCache, "SetCache");
|
|
@@ -1170,7 +1170,7 @@ lodash.exports;
|
|
|
1170
1170
|
Stack.prototype.has = stackHas;
|
|
1171
1171
|
Stack.prototype.set = stackSet;
|
|
1172
1172
|
function arrayLikeKeys(value, inherited) {
|
|
1173
|
-
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg &&
|
|
1173
|
+
var isArr = isArray2(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
|
|
1174
1174
|
for (var key in value) {
|
|
1175
1175
|
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1176
1176
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
@@ -1248,9 +1248,9 @@ lodash.exports;
|
|
|
1248
1248
|
}
|
|
1249
1249
|
__name(baseAssignValue, "baseAssignValue");
|
|
1250
1250
|
function baseAt(object, paths) {
|
|
1251
|
-
var
|
|
1252
|
-
while (++
|
|
1253
|
-
result2[
|
|
1251
|
+
var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
|
|
1252
|
+
while (++index < length) {
|
|
1253
|
+
result2[index] = skip ? undefined$1 : get4(object, paths[index]);
|
|
1254
1254
|
}
|
|
1255
1255
|
return result2;
|
|
1256
1256
|
}
|
|
@@ -1286,7 +1286,7 @@ lodash.exports;
|
|
|
1286
1286
|
}
|
|
1287
1287
|
} else {
|
|
1288
1288
|
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1289
|
-
if (
|
|
1289
|
+
if (isBuffer(value)) {
|
|
1290
1290
|
return cloneBuffer(value, isDeep);
|
|
1291
1291
|
}
|
|
1292
1292
|
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
|
@@ -1360,7 +1360,7 @@ lodash.exports;
|
|
|
1360
1360
|
}
|
|
1361
1361
|
__name(baseDelay, "baseDelay");
|
|
1362
1362
|
function baseDifference(array, values2, iteratee2, comparator) {
|
|
1363
|
-
var
|
|
1363
|
+
var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
|
|
1364
1364
|
if (!length) {
|
|
1365
1365
|
return result2;
|
|
1366
1366
|
}
|
|
@@ -1376,8 +1376,8 @@ lodash.exports;
|
|
|
1376
1376
|
values2 = new SetCache(values2);
|
|
1377
1377
|
}
|
|
1378
1378
|
outer:
|
|
1379
|
-
while (++
|
|
1380
|
-
var value = array[
|
|
1379
|
+
while (++index < length) {
|
|
1380
|
+
var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
|
|
1381
1381
|
value = comparator || value !== 0 ? value : 0;
|
|
1382
1382
|
if (isCommon && computed === computed) {
|
|
1383
1383
|
var valuesIndex = valuesLength;
|
|
@@ -1398,17 +1398,17 @@ lodash.exports;
|
|
|
1398
1398
|
var baseEachRight = createBaseEach(baseForOwnRight, true);
|
|
1399
1399
|
function baseEvery(collection, predicate) {
|
|
1400
1400
|
var result2 = true;
|
|
1401
|
-
baseEach(collection, function(value,
|
|
1402
|
-
result2 = !!predicate(value,
|
|
1401
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1402
|
+
result2 = !!predicate(value, index, collection2);
|
|
1403
1403
|
return result2;
|
|
1404
1404
|
});
|
|
1405
1405
|
return result2;
|
|
1406
1406
|
}
|
|
1407
1407
|
__name(baseEvery, "baseEvery");
|
|
1408
1408
|
function baseExtremum(array, iteratee2, comparator) {
|
|
1409
|
-
var
|
|
1410
|
-
while (++
|
|
1411
|
-
var value = array[
|
|
1409
|
+
var index = -1, length = array.length;
|
|
1410
|
+
while (++index < length) {
|
|
1411
|
+
var value = array[index], current = iteratee2(value);
|
|
1412
1412
|
if (current != null && (computed === undefined$1 ? current === current && !isSymbol(current) : comparator(current, computed))) {
|
|
1413
1413
|
var computed = current, result2 = value;
|
|
1414
1414
|
}
|
|
@@ -1435,8 +1435,8 @@ lodash.exports;
|
|
|
1435
1435
|
__name(baseFill, "baseFill");
|
|
1436
1436
|
function baseFilter(collection, predicate) {
|
|
1437
1437
|
var result2 = [];
|
|
1438
|
-
baseEach(collection, function(value,
|
|
1439
|
-
if (predicate(value,
|
|
1438
|
+
baseEach(collection, function(value, index, collection2) {
|
|
1439
|
+
if (predicate(value, index, collection2)) {
|
|
1440
1440
|
result2.push(value);
|
|
1441
1441
|
}
|
|
1442
1442
|
});
|
|
@@ -1444,11 +1444,11 @@ lodash.exports;
|
|
|
1444
1444
|
}
|
|
1445
1445
|
__name(baseFilter, "baseFilter");
|
|
1446
1446
|
function baseFlatten(array, depth, predicate, isStrict, result2) {
|
|
1447
|
-
var
|
|
1447
|
+
var index = -1, length = array.length;
|
|
1448
1448
|
predicate || (predicate = isFlattenable);
|
|
1449
1449
|
result2 || (result2 = []);
|
|
1450
|
-
while (++
|
|
1451
|
-
var value = array[
|
|
1450
|
+
while (++index < length) {
|
|
1451
|
+
var value = array[index];
|
|
1452
1452
|
if (depth > 0 && predicate(value)) {
|
|
1453
1453
|
if (depth > 1) {
|
|
1454
1454
|
baseFlatten(value, depth - 1, predicate, isStrict, result2);
|
|
@@ -1480,11 +1480,11 @@ lodash.exports;
|
|
|
1480
1480
|
__name(baseFunctions, "baseFunctions");
|
|
1481
1481
|
function baseGet(object, path) {
|
|
1482
1482
|
path = castPath(path, object);
|
|
1483
|
-
var
|
|
1484
|
-
while (object != null &&
|
|
1485
|
-
object = object[toKey(path[
|
|
1483
|
+
var index = 0, length = path.length;
|
|
1484
|
+
while (object != null && index < length) {
|
|
1485
|
+
object = object[toKey(path[index++])];
|
|
1486
1486
|
}
|
|
1487
|
-
return
|
|
1487
|
+
return index && index == length ? object : undefined$1;
|
|
1488
1488
|
}
|
|
1489
1489
|
__name(baseGet, "baseGet");
|
|
1490
1490
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
@@ -1526,10 +1526,10 @@ lodash.exports;
|
|
|
1526
1526
|
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined$1;
|
|
1527
1527
|
}
|
|
1528
1528
|
array = arrays[0];
|
|
1529
|
-
var
|
|
1529
|
+
var index = -1, seen = caches[0];
|
|
1530
1530
|
outer:
|
|
1531
|
-
while (++
|
|
1532
|
-
var value = array[
|
|
1531
|
+
while (++index < length && result2.length < maxLength) {
|
|
1532
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1533
1533
|
value = comparator || value !== 0 ? value : 0;
|
|
1534
1534
|
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
|
|
1535
1535
|
othIndex = othLength;
|
|
@@ -1589,8 +1589,8 @@ lodash.exports;
|
|
|
1589
1589
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1590
1590
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1591
1591
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1592
|
-
if (isSameTag &&
|
|
1593
|
-
if (!
|
|
1592
|
+
if (isSameTag && isBuffer(object)) {
|
|
1593
|
+
if (!isBuffer(other)) {
|
|
1594
1594
|
return false;
|
|
1595
1595
|
}
|
|
1596
1596
|
objIsArr = true;
|
|
@@ -1620,19 +1620,19 @@ lodash.exports;
|
|
|
1620
1620
|
}
|
|
1621
1621
|
__name(baseIsMap, "baseIsMap");
|
|
1622
1622
|
function baseIsMatch(object, source2, matchData, customizer) {
|
|
1623
|
-
var
|
|
1623
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
1624
1624
|
if (object == null) {
|
|
1625
1625
|
return !length;
|
|
1626
1626
|
}
|
|
1627
1627
|
object = Object2(object);
|
|
1628
|
-
while (
|
|
1629
|
-
var data = matchData[
|
|
1628
|
+
while (index--) {
|
|
1629
|
+
var data = matchData[index];
|
|
1630
1630
|
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1631
1631
|
return false;
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
|
-
while (++
|
|
1635
|
-
data = matchData[
|
|
1634
|
+
while (++index < length) {
|
|
1635
|
+
data = matchData[index];
|
|
1636
1636
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1637
1637
|
if (noCustomizer && data[2]) {
|
|
1638
1638
|
if (objValue === undefined$1 && !(key in object)) {
|
|
@@ -1715,9 +1715,9 @@ lodash.exports;
|
|
|
1715
1715
|
}
|
|
1716
1716
|
__name(baseLt, "baseLt");
|
|
1717
1717
|
function baseMap(collection, iteratee2) {
|
|
1718
|
-
var
|
|
1718
|
+
var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
1719
1719
|
baseEach(collection, function(value, key, collection2) {
|
|
1720
|
-
result2[++
|
|
1720
|
+
result2[++index] = iteratee2(value, key, collection2);
|
|
1721
1721
|
});
|
|
1722
1722
|
return result2;
|
|
1723
1723
|
}
|
|
@@ -1769,7 +1769,7 @@ lodash.exports;
|
|
|
1769
1769
|
var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source2, stack) : undefined$1;
|
|
1770
1770
|
var isCommon = newValue === undefined$1;
|
|
1771
1771
|
if (isCommon) {
|
|
1772
|
-
var isArr = isArray2(srcValue), isBuff = !isArr &&
|
|
1772
|
+
var isArr = isArray2(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1773
1773
|
newValue = srcValue;
|
|
1774
1774
|
if (isArr || isBuff || isTyped) {
|
|
1775
1775
|
if (isArray2(objValue)) {
|
|
@@ -1826,13 +1826,13 @@ lodash.exports;
|
|
|
1826
1826
|
} else {
|
|
1827
1827
|
iteratees = [identity];
|
|
1828
1828
|
}
|
|
1829
|
-
var
|
|
1829
|
+
var index = -1;
|
|
1830
1830
|
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
|
|
1831
1831
|
var result2 = baseMap(collection, function(value, key, collection2) {
|
|
1832
1832
|
var criteria = arrayMap(iteratees, function(iteratee2) {
|
|
1833
1833
|
return iteratee2(value);
|
|
1834
1834
|
});
|
|
1835
|
-
return { "criteria": criteria, "index": ++
|
|
1835
|
+
return { "criteria": criteria, "index": ++index, "value": value };
|
|
1836
1836
|
});
|
|
1837
1837
|
return baseSortBy(result2, function(object, other) {
|
|
1838
1838
|
return compareMultiple(object, other, orders);
|
|
@@ -1846,9 +1846,9 @@ lodash.exports;
|
|
|
1846
1846
|
}
|
|
1847
1847
|
__name(basePick, "basePick");
|
|
1848
1848
|
function basePickBy(object, paths, predicate) {
|
|
1849
|
-
var
|
|
1850
|
-
while (++
|
|
1851
|
-
var path = paths[
|
|
1849
|
+
var index = -1, length = paths.length, result2 = {};
|
|
1850
|
+
while (++index < length) {
|
|
1851
|
+
var path = paths[index], value = baseGet(object, path);
|
|
1852
1852
|
if (predicate(value, path)) {
|
|
1853
1853
|
baseSet(result2, castPath(path, object), value);
|
|
1854
1854
|
}
|
|
@@ -1863,15 +1863,15 @@ lodash.exports;
|
|
|
1863
1863
|
}
|
|
1864
1864
|
__name(basePropertyDeep, "basePropertyDeep");
|
|
1865
1865
|
function basePullAll(array, values2, iteratee2, comparator) {
|
|
1866
|
-
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf,
|
|
1866
|
+
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
|
|
1867
1867
|
if (array === values2) {
|
|
1868
1868
|
values2 = copyArray(values2);
|
|
1869
1869
|
}
|
|
1870
1870
|
if (iteratee2) {
|
|
1871
1871
|
seen = arrayMap(array, baseUnary(iteratee2));
|
|
1872
1872
|
}
|
|
1873
|
-
while (++
|
|
1874
|
-
var fromIndex = 0, value = values2[
|
|
1873
|
+
while (++index < length) {
|
|
1874
|
+
var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
1875
1875
|
while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
|
|
1876
1876
|
if (seen !== array) {
|
|
1877
1877
|
splice.call(seen, fromIndex, 1);
|
|
@@ -1885,13 +1885,13 @@ lodash.exports;
|
|
|
1885
1885
|
function basePullAt(array, indexes) {
|
|
1886
1886
|
var length = array ? indexes.length : 0, lastIndex = length - 1;
|
|
1887
1887
|
while (length--) {
|
|
1888
|
-
var
|
|
1889
|
-
if (length == lastIndex ||
|
|
1890
|
-
var previous =
|
|
1891
|
-
if (isIndex(
|
|
1892
|
-
splice.call(array,
|
|
1888
|
+
var index = indexes[length];
|
|
1889
|
+
if (length == lastIndex || index !== previous) {
|
|
1890
|
+
var previous = index;
|
|
1891
|
+
if (isIndex(index)) {
|
|
1892
|
+
splice.call(array, index, 1);
|
|
1893
1893
|
} else {
|
|
1894
|
-
baseUnset(array,
|
|
1894
|
+
baseUnset(array, index);
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
@@ -1903,9 +1903,9 @@ lodash.exports;
|
|
|
1903
1903
|
}
|
|
1904
1904
|
__name(baseRandom, "baseRandom");
|
|
1905
1905
|
function baseRange(start, end, step, fromRight) {
|
|
1906
|
-
var
|
|
1906
|
+
var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
|
|
1907
1907
|
while (length--) {
|
|
1908
|
-
result2[fromRight ? length : ++
|
|
1908
|
+
result2[fromRight ? length : ++index] = start;
|
|
1909
1909
|
start += step;
|
|
1910
1910
|
}
|
|
1911
1911
|
return result2;
|
|
@@ -1946,17 +1946,17 @@ lodash.exports;
|
|
|
1946
1946
|
return object;
|
|
1947
1947
|
}
|
|
1948
1948
|
path = castPath(path, object);
|
|
1949
|
-
var
|
|
1950
|
-
while (nested != null && ++
|
|
1951
|
-
var key = toKey(path[
|
|
1949
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
1950
|
+
while (nested != null && ++index < length) {
|
|
1951
|
+
var key = toKey(path[index]), newValue = value;
|
|
1952
1952
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1953
1953
|
return object;
|
|
1954
1954
|
}
|
|
1955
|
-
if (
|
|
1955
|
+
if (index != lastIndex) {
|
|
1956
1956
|
var objValue = nested[key];
|
|
1957
1957
|
newValue = customizer ? customizer(objValue, key, nested) : undefined$1;
|
|
1958
1958
|
if (newValue === undefined$1) {
|
|
1959
|
-
newValue = isObject(objValue) ? objValue : isIndex(path[
|
|
1959
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
1962
|
assignValue(nested, key, newValue);
|
|
@@ -1982,7 +1982,7 @@ lodash.exports;
|
|
|
1982
1982
|
}
|
|
1983
1983
|
__name(baseShuffle, "baseShuffle");
|
|
1984
1984
|
function baseSlice(array, start, end) {
|
|
1985
|
-
var
|
|
1985
|
+
var index = -1, length = array.length;
|
|
1986
1986
|
if (start < 0) {
|
|
1987
1987
|
start = -start > length ? 0 : length + start;
|
|
1988
1988
|
}
|
|
@@ -1993,16 +1993,16 @@ lodash.exports;
|
|
|
1993
1993
|
length = start > end ? 0 : end - start >>> 0;
|
|
1994
1994
|
start >>>= 0;
|
|
1995
1995
|
var result2 = Array2(length);
|
|
1996
|
-
while (++
|
|
1997
|
-
result2[
|
|
1996
|
+
while (++index < length) {
|
|
1997
|
+
result2[index] = array[index + start];
|
|
1998
1998
|
}
|
|
1999
1999
|
return result2;
|
|
2000
2000
|
}
|
|
2001
2001
|
__name(baseSlice, "baseSlice");
|
|
2002
2002
|
function baseSome(collection, predicate) {
|
|
2003
2003
|
var result2;
|
|
2004
|
-
baseEach(collection, function(value,
|
|
2005
|
-
result2 = predicate(value,
|
|
2004
|
+
baseEach(collection, function(value, index, collection2) {
|
|
2005
|
+
result2 = predicate(value, index, collection2);
|
|
2006
2006
|
return !result2;
|
|
2007
2007
|
});
|
|
2008
2008
|
return !!result2;
|
|
@@ -2056,10 +2056,10 @@ lodash.exports;
|
|
|
2056
2056
|
}
|
|
2057
2057
|
__name(baseSortedIndexBy, "baseSortedIndexBy");
|
|
2058
2058
|
function baseSortedUniq(array, iteratee2) {
|
|
2059
|
-
var
|
|
2060
|
-
while (++
|
|
2061
|
-
var value = array[
|
|
2062
|
-
if (!
|
|
2059
|
+
var index = -1, length = array.length, resIndex = 0, result2 = [];
|
|
2060
|
+
while (++index < length) {
|
|
2061
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2062
|
+
if (!index || !eq(computed, seen)) {
|
|
2063
2063
|
var seen = computed;
|
|
2064
2064
|
result2[resIndex++] = value === 0 ? 0 : value;
|
|
2065
2065
|
}
|
|
@@ -2092,7 +2092,7 @@ lodash.exports;
|
|
|
2092
2092
|
}
|
|
2093
2093
|
__name(baseToString, "baseToString");
|
|
2094
2094
|
function baseUniq(array, iteratee2, comparator) {
|
|
2095
|
-
var
|
|
2095
|
+
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
|
|
2096
2096
|
if (comparator) {
|
|
2097
2097
|
isCommon = false;
|
|
2098
2098
|
includes2 = arrayIncludesWith;
|
|
@@ -2108,8 +2108,8 @@ lodash.exports;
|
|
|
2108
2108
|
seen = iteratee2 ? [] : result2;
|
|
2109
2109
|
}
|
|
2110
2110
|
outer:
|
|
2111
|
-
while (++
|
|
2112
|
-
var value = array[
|
|
2111
|
+
while (++index < length) {
|
|
2112
|
+
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
|
|
2113
2113
|
value = comparator || value !== 0 ? value : 0;
|
|
2114
2114
|
if (isCommon && computed === computed) {
|
|
2115
2115
|
var seenIndex = seen.length;
|
|
@@ -2143,10 +2143,10 @@ lodash.exports;
|
|
|
2143
2143
|
}
|
|
2144
2144
|
__name(baseUpdate, "baseUpdate");
|
|
2145
2145
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
2146
|
-
var length = array.length,
|
|
2147
|
-
while ((fromRight ?
|
|
2146
|
+
var length = array.length, index = fromRight ? length : -1;
|
|
2147
|
+
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
|
|
2148
2148
|
}
|
|
2149
|
-
return isDrop ? baseSlice(array, fromRight ? 0 :
|
|
2149
|
+
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
|
|
2150
2150
|
}
|
|
2151
2151
|
__name(baseWhile, "baseWhile");
|
|
2152
2152
|
function baseWrapperValue(value, actions) {
|
|
@@ -2164,12 +2164,12 @@ lodash.exports;
|
|
|
2164
2164
|
if (length < 2) {
|
|
2165
2165
|
return length ? baseUniq(arrays[0]) : [];
|
|
2166
2166
|
}
|
|
2167
|
-
var
|
|
2168
|
-
while (++
|
|
2169
|
-
var array = arrays[
|
|
2167
|
+
var index = -1, result2 = Array2(length);
|
|
2168
|
+
while (++index < length) {
|
|
2169
|
+
var array = arrays[index], othIndex = -1;
|
|
2170
2170
|
while (++othIndex < length) {
|
|
2171
|
-
if (othIndex !=
|
|
2172
|
-
result2[
|
|
2171
|
+
if (othIndex != index) {
|
|
2172
|
+
result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
|
|
2173
2173
|
}
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
@@ -2177,10 +2177,10 @@ lodash.exports;
|
|
|
2177
2177
|
}
|
|
2178
2178
|
__name(baseXor, "baseXor");
|
|
2179
2179
|
function baseZipObject(props, values2, assignFunc) {
|
|
2180
|
-
var
|
|
2181
|
-
while (++
|
|
2182
|
-
var value =
|
|
2183
|
-
assignFunc(result2, props[
|
|
2180
|
+
var index = -1, length = props.length, valsLength = values2.length, result2 = {};
|
|
2181
|
+
while (++index < length) {
|
|
2182
|
+
var value = index < valsLength ? values2[index] : undefined$1;
|
|
2183
|
+
assignFunc(result2, props[index], value);
|
|
2184
2184
|
}
|
|
2185
2185
|
return result2;
|
|
2186
2186
|
}
|
|
@@ -2210,12 +2210,12 @@ lodash.exports;
|
|
|
2210
2210
|
var clearTimeout = ctxClearTimeout || function(id) {
|
|
2211
2211
|
return root.clearTimeout(id);
|
|
2212
2212
|
};
|
|
2213
|
-
function cloneBuffer(
|
|
2213
|
+
function cloneBuffer(buffer, isDeep) {
|
|
2214
2214
|
if (isDeep) {
|
|
2215
|
-
return
|
|
2215
|
+
return buffer.slice();
|
|
2216
2216
|
}
|
|
2217
|
-
var length =
|
|
2218
|
-
|
|
2217
|
+
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
2218
|
+
buffer.copy(result2);
|
|
2219
2219
|
return result2;
|
|
2220
2220
|
}
|
|
2221
2221
|
__name(cloneBuffer, "cloneBuffer");
|
|
@@ -2226,8 +2226,8 @@ lodash.exports;
|
|
|
2226
2226
|
}
|
|
2227
2227
|
__name(cloneArrayBuffer, "cloneArrayBuffer");
|
|
2228
2228
|
function cloneDataView(dataView, isDeep) {
|
|
2229
|
-
var
|
|
2230
|
-
return new dataView.constructor(
|
|
2229
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
2230
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
2231
2231
|
}
|
|
2232
2232
|
__name(cloneDataView, "cloneDataView");
|
|
2233
2233
|
function cloneRegExp2(regexp) {
|
|
@@ -2241,8 +2241,8 @@ lodash.exports;
|
|
|
2241
2241
|
}
|
|
2242
2242
|
__name(cloneSymbol, "cloneSymbol");
|
|
2243
2243
|
function cloneTypedArray(typedArray, isDeep) {
|
|
2244
|
-
var
|
|
2245
|
-
return new typedArray.constructor(
|
|
2244
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
2245
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
2246
2246
|
}
|
|
2247
2247
|
__name(cloneTypedArray, "cloneTypedArray");
|
|
2248
2248
|
function compareAscending(value, other) {
|
|
@@ -2260,14 +2260,14 @@ lodash.exports;
|
|
|
2260
2260
|
}
|
|
2261
2261
|
__name(compareAscending, "compareAscending");
|
|
2262
2262
|
function compareMultiple(object, other, orders) {
|
|
2263
|
-
var
|
|
2264
|
-
while (++
|
|
2265
|
-
var result2 = compareAscending(objCriteria[
|
|
2263
|
+
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
2264
|
+
while (++index < length) {
|
|
2265
|
+
var result2 = compareAscending(objCriteria[index], othCriteria[index]);
|
|
2266
2266
|
if (result2) {
|
|
2267
|
-
if (
|
|
2267
|
+
if (index >= ordersLength) {
|
|
2268
2268
|
return result2;
|
|
2269
2269
|
}
|
|
2270
|
-
var order = orders[
|
|
2270
|
+
var order = orders[index];
|
|
2271
2271
|
return result2 * (order == "desc" ? -1 : 1);
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
@@ -2308,10 +2308,10 @@ lodash.exports;
|
|
|
2308
2308
|
}
|
|
2309
2309
|
__name(composeArgsRight, "composeArgsRight");
|
|
2310
2310
|
function copyArray(source2, array) {
|
|
2311
|
-
var
|
|
2311
|
+
var index = -1, length = source2.length;
|
|
2312
2312
|
array || (array = Array2(length));
|
|
2313
|
-
while (++
|
|
2314
|
-
array[
|
|
2313
|
+
while (++index < length) {
|
|
2314
|
+
array[index] = source2[index];
|
|
2315
2315
|
}
|
|
2316
2316
|
return array;
|
|
2317
2317
|
}
|
|
@@ -2319,9 +2319,9 @@ lodash.exports;
|
|
|
2319
2319
|
function copyObject(source2, props, object, customizer) {
|
|
2320
2320
|
var isNew = !object;
|
|
2321
2321
|
object || (object = {});
|
|
2322
|
-
var
|
|
2323
|
-
while (++
|
|
2324
|
-
var key = props[
|
|
2322
|
+
var index = -1, length = props.length;
|
|
2323
|
+
while (++index < length) {
|
|
2324
|
+
var key = props[index];
|
|
2325
2325
|
var newValue = customizer ? customizer(object[key], source2[key], key, object, source2) : undefined$1;
|
|
2326
2326
|
if (newValue === undefined$1) {
|
|
2327
2327
|
newValue = source2[key];
|
|
@@ -2352,17 +2352,17 @@ lodash.exports;
|
|
|
2352
2352
|
__name(createAggregator, "createAggregator");
|
|
2353
2353
|
function createAssigner(assigner) {
|
|
2354
2354
|
return baseRest(function(object, sources) {
|
|
2355
|
-
var
|
|
2355
|
+
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined$1, guard = length > 2 ? sources[2] : undefined$1;
|
|
2356
2356
|
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined$1;
|
|
2357
2357
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
2358
2358
|
customizer = length < 3 ? undefined$1 : customizer;
|
|
2359
2359
|
length = 1;
|
|
2360
2360
|
}
|
|
2361
2361
|
object = Object2(object);
|
|
2362
|
-
while (++
|
|
2363
|
-
var source2 = sources[
|
|
2362
|
+
while (++index < length) {
|
|
2363
|
+
var source2 = sources[index];
|
|
2364
2364
|
if (source2) {
|
|
2365
|
-
assigner(object, source2,
|
|
2365
|
+
assigner(object, source2, index, customizer);
|
|
2366
2366
|
}
|
|
2367
2367
|
}
|
|
2368
2368
|
return object;
|
|
@@ -2377,9 +2377,9 @@ lodash.exports;
|
|
|
2377
2377
|
if (!isArrayLike(collection)) {
|
|
2378
2378
|
return eachFunc(collection, iteratee2);
|
|
2379
2379
|
}
|
|
2380
|
-
var length = collection.length,
|
|
2381
|
-
while (fromRight ?
|
|
2382
|
-
if (iteratee2(iterable[
|
|
2380
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
|
|
2381
|
+
while (fromRight ? index-- : ++index < length) {
|
|
2382
|
+
if (iteratee2(iterable[index], index, iterable) === false) {
|
|
2383
2383
|
break;
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
@@ -2389,9 +2389,9 @@ lodash.exports;
|
|
|
2389
2389
|
__name(createBaseEach, "createBaseEach");
|
|
2390
2390
|
function createBaseFor(fromRight) {
|
|
2391
2391
|
return function(object, iteratee2, keysFunc) {
|
|
2392
|
-
var
|
|
2392
|
+
var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
|
|
2393
2393
|
while (length--) {
|
|
2394
|
-
var key = props[fromRight ? length : ++
|
|
2394
|
+
var key = props[fromRight ? length : ++index];
|
|
2395
2395
|
if (iteratee2(iterable[key], key, iterable) === false) {
|
|
2396
2396
|
break;
|
|
2397
2397
|
}
|
|
@@ -2455,9 +2455,9 @@ lodash.exports;
|
|
|
2455
2455
|
function createCurry(func, bitmask, arity) {
|
|
2456
2456
|
var Ctor = createCtor(func);
|
|
2457
2457
|
function wrapper() {
|
|
2458
|
-
var length = arguments.length, args = Array2(length),
|
|
2459
|
-
while (
|
|
2460
|
-
args[
|
|
2458
|
+
var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
|
|
2459
|
+
while (index--) {
|
|
2460
|
+
args[index] = arguments[index];
|
|
2461
2461
|
}
|
|
2462
2462
|
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
|
|
2463
2463
|
length -= holders.length;
|
|
@@ -2492,19 +2492,19 @@ lodash.exports;
|
|
|
2492
2492
|
return iteratee2(iterable[key], key, iterable);
|
|
2493
2493
|
}, "predicate");
|
|
2494
2494
|
}
|
|
2495
|
-
var
|
|
2496
|
-
return
|
|
2495
|
+
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
2496
|
+
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined$1;
|
|
2497
2497
|
};
|
|
2498
2498
|
}
|
|
2499
2499
|
__name(createFind, "createFind");
|
|
2500
2500
|
function createFlow(fromRight) {
|
|
2501
2501
|
return flatRest(function(funcs) {
|
|
2502
|
-
var length = funcs.length,
|
|
2502
|
+
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
|
|
2503
2503
|
if (fromRight) {
|
|
2504
2504
|
funcs.reverse();
|
|
2505
2505
|
}
|
|
2506
|
-
while (
|
|
2507
|
-
var func = funcs[
|
|
2506
|
+
while (index--) {
|
|
2507
|
+
var func = funcs[index];
|
|
2508
2508
|
if (typeof func != "function") {
|
|
2509
2509
|
throw new TypeError2(FUNC_ERROR_TEXT);
|
|
2510
2510
|
}
|
|
@@ -2512,9 +2512,9 @@ lodash.exports;
|
|
|
2512
2512
|
var wrapper = new LodashWrapper([], true);
|
|
2513
2513
|
}
|
|
2514
2514
|
}
|
|
2515
|
-
|
|
2516
|
-
while (++
|
|
2517
|
-
func = funcs[
|
|
2515
|
+
index = wrapper ? index : length;
|
|
2516
|
+
while (++index < length) {
|
|
2517
|
+
func = funcs[index];
|
|
2518
2518
|
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
|
|
2519
2519
|
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
|
|
2520
2520
|
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
|
|
@@ -2527,9 +2527,9 @@ lodash.exports;
|
|
|
2527
2527
|
if (wrapper && args.length == 1 && isArray2(value)) {
|
|
2528
2528
|
return wrapper.plant(value).value();
|
|
2529
2529
|
}
|
|
2530
|
-
var
|
|
2531
|
-
while (++
|
|
2532
|
-
result2 = funcs[
|
|
2530
|
+
var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
|
|
2531
|
+
while (++index2 < length) {
|
|
2532
|
+
result2 = funcs[index2].call(this, result2);
|
|
2533
2533
|
}
|
|
2534
2534
|
return result2;
|
|
2535
2535
|
};
|
|
@@ -2539,9 +2539,9 @@ lodash.exports;
|
|
|
2539
2539
|
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
|
|
2540
2540
|
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined$1 : createCtor(func);
|
|
2541
2541
|
function wrapper() {
|
|
2542
|
-
var length = arguments.length, args = Array2(length),
|
|
2543
|
-
while (
|
|
2544
|
-
args[
|
|
2542
|
+
var length = arguments.length, args = Array2(length), index = length;
|
|
2543
|
+
while (index--) {
|
|
2544
|
+
args[index] = arguments[index];
|
|
2545
2545
|
}
|
|
2546
2546
|
if (isCurried) {
|
|
2547
2547
|
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
|
|
@@ -2826,13 +2826,13 @@ lodash.exports;
|
|
|
2826
2826
|
if (arrStacked && othStacked) {
|
|
2827
2827
|
return arrStacked == other && othStacked == array;
|
|
2828
2828
|
}
|
|
2829
|
-
var
|
|
2829
|
+
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined$1;
|
|
2830
2830
|
stack.set(array, other);
|
|
2831
2831
|
stack.set(other, array);
|
|
2832
|
-
while (++
|
|
2833
|
-
var arrValue = array[
|
|
2832
|
+
while (++index < arrLength) {
|
|
2833
|
+
var arrValue = array[index], othValue = other[index];
|
|
2834
2834
|
if (customizer) {
|
|
2835
|
-
var compared = isPartial ? customizer(othValue, arrValue,
|
|
2835
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
2836
2836
|
}
|
|
2837
2837
|
if (compared !== undefined$1) {
|
|
2838
2838
|
if (compared) {
|
|
@@ -2912,9 +2912,9 @@ lodash.exports;
|
|
|
2912
2912
|
if (objLength != othLength && !isPartial) {
|
|
2913
2913
|
return false;
|
|
2914
2914
|
}
|
|
2915
|
-
var
|
|
2916
|
-
while (
|
|
2917
|
-
var key = objProps[
|
|
2915
|
+
var index = objLength;
|
|
2916
|
+
while (index--) {
|
|
2917
|
+
var key = objProps[index];
|
|
2918
2918
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
2919
2919
|
return false;
|
|
2920
2920
|
}
|
|
@@ -2928,8 +2928,8 @@ lodash.exports;
|
|
|
2928
2928
|
stack.set(object, other);
|
|
2929
2929
|
stack.set(other, object);
|
|
2930
2930
|
var skipCtor = isPartial;
|
|
2931
|
-
while (++
|
|
2932
|
-
key = objProps[
|
|
2931
|
+
while (++index < objLength) {
|
|
2932
|
+
key = objProps[index];
|
|
2933
2933
|
var objValue = object[key], othValue = other[key];
|
|
2934
2934
|
if (customizer) {
|
|
2935
2935
|
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
@@ -3064,9 +3064,9 @@ lodash.exports;
|
|
|
3064
3064
|
}, "getTag");
|
|
3065
3065
|
}
|
|
3066
3066
|
function getView(start, end, transforms) {
|
|
3067
|
-
var
|
|
3068
|
-
while (++
|
|
3069
|
-
var data = transforms[
|
|
3067
|
+
var index = -1, length = transforms.length;
|
|
3068
|
+
while (++index < length) {
|
|
3069
|
+
var data = transforms[index], size2 = data.size;
|
|
3070
3070
|
switch (data.type) {
|
|
3071
3071
|
case "drop":
|
|
3072
3072
|
start += size2;
|
|
@@ -3092,15 +3092,15 @@ lodash.exports;
|
|
|
3092
3092
|
__name(getWrapDetails, "getWrapDetails");
|
|
3093
3093
|
function hasPath(object, path, hasFunc) {
|
|
3094
3094
|
path = castPath(path, object);
|
|
3095
|
-
var
|
|
3096
|
-
while (++
|
|
3097
|
-
var key = toKey(path[
|
|
3095
|
+
var index = -1, length = path.length, result2 = false;
|
|
3096
|
+
while (++index < length) {
|
|
3097
|
+
var key = toKey(path[index]);
|
|
3098
3098
|
if (!(result2 = object != null && hasFunc(object, key))) {
|
|
3099
3099
|
break;
|
|
3100
3100
|
}
|
|
3101
3101
|
object = object[key];
|
|
3102
3102
|
}
|
|
3103
|
-
if (result2 || ++
|
|
3103
|
+
if (result2 || ++index != length) {
|
|
3104
3104
|
return result2;
|
|
3105
3105
|
}
|
|
3106
3106
|
length = object == null ? 0 : object.length;
|
|
@@ -3175,13 +3175,13 @@ lodash.exports;
|
|
|
3175
3175
|
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3176
3176
|
}
|
|
3177
3177
|
__name(isIndex, "isIndex");
|
|
3178
|
-
function isIterateeCall(value,
|
|
3178
|
+
function isIterateeCall(value, index, object) {
|
|
3179
3179
|
if (!isObject(object)) {
|
|
3180
3180
|
return false;
|
|
3181
3181
|
}
|
|
3182
|
-
var type = typeof
|
|
3183
|
-
if (type == "number" ? isArrayLike(object) && isIndex(
|
|
3184
|
-
return eq(object[
|
|
3182
|
+
var type = typeof index;
|
|
3183
|
+
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
3184
|
+
return eq(object[index], value);
|
|
3185
3185
|
}
|
|
3186
3186
|
return false;
|
|
3187
3187
|
}
|
|
@@ -3302,14 +3302,14 @@ lodash.exports;
|
|
|
3302
3302
|
function overRest(func, start, transform2) {
|
|
3303
3303
|
start = nativeMax(start === undefined$1 ? func.length - 1 : start, 0);
|
|
3304
3304
|
return function() {
|
|
3305
|
-
var args = arguments,
|
|
3306
|
-
while (++
|
|
3307
|
-
array[
|
|
3305
|
+
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
|
|
3306
|
+
while (++index < length) {
|
|
3307
|
+
array[index] = args[start + index];
|
|
3308
3308
|
}
|
|
3309
|
-
|
|
3309
|
+
index = -1;
|
|
3310
3310
|
var otherArgs = Array2(start + 1);
|
|
3311
|
-
while (++
|
|
3312
|
-
otherArgs[
|
|
3311
|
+
while (++index < start) {
|
|
3312
|
+
otherArgs[index] = args[index];
|
|
3313
3313
|
}
|
|
3314
3314
|
otherArgs[start] = transform2(array);
|
|
3315
3315
|
return apply(func, this, otherArgs);
|
|
@@ -3323,8 +3323,8 @@ lodash.exports;
|
|
|
3323
3323
|
function reorder(array, indexes) {
|
|
3324
3324
|
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
|
|
3325
3325
|
while (length--) {
|
|
3326
|
-
var
|
|
3327
|
-
array[length] = isIndex(
|
|
3326
|
+
var index = indexes[length];
|
|
3327
|
+
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined$1;
|
|
3328
3328
|
}
|
|
3329
3329
|
return array;
|
|
3330
3330
|
}
|
|
@@ -3366,12 +3366,12 @@ lodash.exports;
|
|
|
3366
3366
|
}
|
|
3367
3367
|
__name(shortOut, "shortOut");
|
|
3368
3368
|
function shuffleSelf(array, size2) {
|
|
3369
|
-
var
|
|
3369
|
+
var index = -1, length = array.length, lastIndex = length - 1;
|
|
3370
3370
|
size2 = size2 === undefined$1 ? length : size2;
|
|
3371
|
-
while (++
|
|
3372
|
-
var rand = baseRandom(
|
|
3373
|
-
array[rand] = array[
|
|
3374
|
-
array[
|
|
3371
|
+
while (++index < size2) {
|
|
3372
|
+
var rand = baseRandom(index, lastIndex), value = array[rand];
|
|
3373
|
+
array[rand] = array[index];
|
|
3374
|
+
array[index] = value;
|
|
3375
3375
|
}
|
|
3376
3376
|
array.length = size2;
|
|
3377
3377
|
return array;
|
|
@@ -3440,17 +3440,17 @@ lodash.exports;
|
|
|
3440
3440
|
if (!length || size2 < 1) {
|
|
3441
3441
|
return [];
|
|
3442
3442
|
}
|
|
3443
|
-
var
|
|
3444
|
-
while (
|
|
3445
|
-
result2[resIndex++] = baseSlice(array,
|
|
3443
|
+
var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
|
|
3444
|
+
while (index < length) {
|
|
3445
|
+
result2[resIndex++] = baseSlice(array, index, index += size2);
|
|
3446
3446
|
}
|
|
3447
3447
|
return result2;
|
|
3448
3448
|
}
|
|
3449
3449
|
__name(chunk, "chunk");
|
|
3450
3450
|
function compact(array) {
|
|
3451
|
-
var
|
|
3452
|
-
while (++
|
|
3453
|
-
var value = array[
|
|
3451
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
|
|
3452
|
+
while (++index < length) {
|
|
3453
|
+
var value = array[index];
|
|
3454
3454
|
if (value) {
|
|
3455
3455
|
result2[resIndex++] = value;
|
|
3456
3456
|
}
|
|
@@ -3463,9 +3463,9 @@ lodash.exports;
|
|
|
3463
3463
|
if (!length) {
|
|
3464
3464
|
return [];
|
|
3465
3465
|
}
|
|
3466
|
-
var args = Array2(length - 1), array = arguments[0],
|
|
3467
|
-
while (
|
|
3468
|
-
args[
|
|
3466
|
+
var args = Array2(length - 1), array = arguments[0], index = length;
|
|
3467
|
+
while (index--) {
|
|
3468
|
+
args[index - 1] = arguments[index];
|
|
3469
3469
|
}
|
|
3470
3470
|
return arrayPush(isArray2(array) ? copyArray(array) : [array], baseFlatten(args, 1));
|
|
3471
3471
|
}
|
|
@@ -3531,11 +3531,11 @@ lodash.exports;
|
|
|
3531
3531
|
if (!length) {
|
|
3532
3532
|
return -1;
|
|
3533
3533
|
}
|
|
3534
|
-
var
|
|
3535
|
-
if (
|
|
3536
|
-
|
|
3534
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3535
|
+
if (index < 0) {
|
|
3536
|
+
index = nativeMax(length + index, 0);
|
|
3537
3537
|
}
|
|
3538
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3538
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index);
|
|
3539
3539
|
}
|
|
3540
3540
|
__name(findIndex, "findIndex");
|
|
3541
3541
|
function findLastIndex(array, predicate, fromIndex) {
|
|
@@ -3543,12 +3543,12 @@ lodash.exports;
|
|
|
3543
3543
|
if (!length) {
|
|
3544
3544
|
return -1;
|
|
3545
3545
|
}
|
|
3546
|
-
var
|
|
3546
|
+
var index = length - 1;
|
|
3547
3547
|
if (fromIndex !== undefined$1) {
|
|
3548
|
-
|
|
3549
|
-
|
|
3548
|
+
index = toInteger(fromIndex);
|
|
3549
|
+
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3550
3550
|
}
|
|
3551
|
-
return baseFindIndex(array, getIteratee(predicate, 3),
|
|
3551
|
+
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
|
|
3552
3552
|
}
|
|
3553
3553
|
__name(findLastIndex, "findLastIndex");
|
|
3554
3554
|
function flatten(array) {
|
|
@@ -3571,9 +3571,9 @@ lodash.exports;
|
|
|
3571
3571
|
}
|
|
3572
3572
|
__name(flattenDepth, "flattenDepth");
|
|
3573
3573
|
function fromPairs(pairs) {
|
|
3574
|
-
var
|
|
3575
|
-
while (++
|
|
3576
|
-
var pair = pairs[
|
|
3574
|
+
var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
|
|
3575
|
+
while (++index < length) {
|
|
3576
|
+
var pair = pairs[index];
|
|
3577
3577
|
result2[pair[0]] = pair[1];
|
|
3578
3578
|
}
|
|
3579
3579
|
return result2;
|
|
@@ -3588,11 +3588,11 @@ lodash.exports;
|
|
|
3588
3588
|
if (!length) {
|
|
3589
3589
|
return -1;
|
|
3590
3590
|
}
|
|
3591
|
-
var
|
|
3592
|
-
if (
|
|
3593
|
-
|
|
3591
|
+
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
3592
|
+
if (index < 0) {
|
|
3593
|
+
index = nativeMax(length + index, 0);
|
|
3594
3594
|
}
|
|
3595
|
-
return baseIndexOf(array, value,
|
|
3595
|
+
return baseIndexOf(array, value, index);
|
|
3596
3596
|
}
|
|
3597
3597
|
__name(indexOf, "indexOf");
|
|
3598
3598
|
function initial(array) {
|
|
@@ -3635,12 +3635,12 @@ lodash.exports;
|
|
|
3635
3635
|
if (!length) {
|
|
3636
3636
|
return -1;
|
|
3637
3637
|
}
|
|
3638
|
-
var
|
|
3638
|
+
var index = length;
|
|
3639
3639
|
if (fromIndex !== undefined$1) {
|
|
3640
|
-
|
|
3641
|
-
|
|
3640
|
+
index = toInteger(fromIndex);
|
|
3641
|
+
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
|
|
3642
3642
|
}
|
|
3643
|
-
return value === value ? strictLastIndexOf(array, value,
|
|
3643
|
+
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
|
|
3644
3644
|
}
|
|
3645
3645
|
__name(lastIndexOf, "lastIndexOf");
|
|
3646
3646
|
function nth(array, n) {
|
|
@@ -3662,8 +3662,8 @@ lodash.exports;
|
|
|
3662
3662
|
__name(pullAllWith, "pullAllWith");
|
|
3663
3663
|
var pullAt = flatRest(function(array, indexes) {
|
|
3664
3664
|
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
|
|
3665
|
-
basePullAt(array, arrayMap(indexes, function(
|
|
3666
|
-
return isIndex(
|
|
3665
|
+
basePullAt(array, arrayMap(indexes, function(index) {
|
|
3666
|
+
return isIndex(index, length) ? +index : index;
|
|
3667
3667
|
}).sort(compareAscending));
|
|
3668
3668
|
return result2;
|
|
3669
3669
|
});
|
|
@@ -3672,13 +3672,13 @@ lodash.exports;
|
|
|
3672
3672
|
if (!(array && array.length)) {
|
|
3673
3673
|
return result2;
|
|
3674
3674
|
}
|
|
3675
|
-
var
|
|
3675
|
+
var index = -1, indexes = [], length = array.length;
|
|
3676
3676
|
predicate = getIteratee(predicate, 3);
|
|
3677
|
-
while (++
|
|
3678
|
-
var value = array[
|
|
3679
|
-
if (predicate(value,
|
|
3677
|
+
while (++index < length) {
|
|
3678
|
+
var value = array[index];
|
|
3679
|
+
if (predicate(value, index, array)) {
|
|
3680
3680
|
result2.push(value);
|
|
3681
|
-
indexes.push(
|
|
3681
|
+
indexes.push(index);
|
|
3682
3682
|
}
|
|
3683
3683
|
}
|
|
3684
3684
|
basePullAt(array, indexes);
|
|
@@ -3715,9 +3715,9 @@ lodash.exports;
|
|
|
3715
3715
|
function sortedIndexOf(array, value) {
|
|
3716
3716
|
var length = array == null ? 0 : array.length;
|
|
3717
3717
|
if (length) {
|
|
3718
|
-
var
|
|
3719
|
-
if (
|
|
3720
|
-
return
|
|
3718
|
+
var index = baseSortedIndex(array, value);
|
|
3719
|
+
if (index < length && eq(array[index], value)) {
|
|
3720
|
+
return index;
|
|
3721
3721
|
}
|
|
3722
3722
|
}
|
|
3723
3723
|
return -1;
|
|
@@ -3734,9 +3734,9 @@ lodash.exports;
|
|
|
3734
3734
|
function sortedLastIndexOf(array, value) {
|
|
3735
3735
|
var length = array == null ? 0 : array.length;
|
|
3736
3736
|
if (length) {
|
|
3737
|
-
var
|
|
3738
|
-
if (eq(array[
|
|
3739
|
-
return
|
|
3737
|
+
var index = baseSortedIndex(array, value, true) - 1;
|
|
3738
|
+
if (eq(array[index], value)) {
|
|
3739
|
+
return index;
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
return -1;
|
|
@@ -3820,8 +3820,8 @@ lodash.exports;
|
|
|
3820
3820
|
return true;
|
|
3821
3821
|
}
|
|
3822
3822
|
});
|
|
3823
|
-
return baseTimes(length, function(
|
|
3824
|
-
return arrayMap(array, baseProperty(
|
|
3823
|
+
return baseTimes(length, function(index) {
|
|
3824
|
+
return arrayMap(array, baseProperty(index));
|
|
3825
3825
|
});
|
|
3826
3826
|
}
|
|
3827
3827
|
__name(unzip, "unzip");
|
|
@@ -4028,9 +4028,9 @@ lodash.exports;
|
|
|
4028
4028
|
}
|
|
4029
4029
|
__name(includes, "includes");
|
|
4030
4030
|
var invokeMap = baseRest(function(collection, path, args) {
|
|
4031
|
-
var
|
|
4031
|
+
var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
|
|
4032
4032
|
baseEach(collection, function(value) {
|
|
4033
|
-
result2[++
|
|
4033
|
+
result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
|
|
4034
4034
|
});
|
|
4035
4035
|
return result2;
|
|
4036
4036
|
});
|
|
@@ -4091,11 +4091,11 @@ lodash.exports;
|
|
|
4091
4091
|
return func(collection, n);
|
|
4092
4092
|
}
|
|
4093
4093
|
__name(sampleSize, "sampleSize");
|
|
4094
|
-
function
|
|
4094
|
+
function shuffle2(collection) {
|
|
4095
4095
|
var func = isArray2(collection) ? arrayShuffle : baseShuffle;
|
|
4096
4096
|
return func(collection);
|
|
4097
4097
|
}
|
|
4098
|
-
__name(
|
|
4098
|
+
__name(shuffle2, "shuffle");
|
|
4099
4099
|
function size(collection) {
|
|
4100
4100
|
if (collection == null) {
|
|
4101
4101
|
return 0;
|
|
@@ -4345,9 +4345,9 @@ lodash.exports;
|
|
|
4345
4345
|
transforms = transforms.length == 1 && isArray2(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
|
|
4346
4346
|
var funcsLength = transforms.length;
|
|
4347
4347
|
return baseRest(function(args) {
|
|
4348
|
-
var
|
|
4349
|
-
while (++
|
|
4350
|
-
args[
|
|
4348
|
+
var index = -1, length = nativeMin(args.length, funcsLength);
|
|
4349
|
+
while (++index < length) {
|
|
4350
|
+
args[index] = transforms[index].call(this, args[index]);
|
|
4351
4351
|
}
|
|
4352
4352
|
return apply(func, this, args);
|
|
4353
4353
|
});
|
|
@@ -4466,7 +4466,7 @@ lodash.exports;
|
|
|
4466
4466
|
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
|
|
4467
4467
|
}
|
|
4468
4468
|
__name(isBoolean, "isBoolean");
|
|
4469
|
-
var
|
|
4469
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
4470
4470
|
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
|
|
4471
4471
|
function isElement(value) {
|
|
4472
4472
|
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
|
|
@@ -4476,7 +4476,7 @@ lodash.exports;
|
|
|
4476
4476
|
if (value == null) {
|
|
4477
4477
|
return true;
|
|
4478
4478
|
}
|
|
4479
|
-
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" ||
|
|
4479
|
+
if (isArrayLike(value) && (isArray2(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
4480
4480
|
return !value.length;
|
|
4481
4481
|
}
|
|
4482
4482
|
var tag = getTag(value);
|
|
@@ -4711,14 +4711,14 @@ lodash.exports;
|
|
|
4711
4711
|
__name(create, "create");
|
|
4712
4712
|
var defaults = baseRest(function(object, sources) {
|
|
4713
4713
|
object = Object2(object);
|
|
4714
|
-
var
|
|
4714
|
+
var index = -1;
|
|
4715
4715
|
var length = sources.length;
|
|
4716
4716
|
var guard = length > 2 ? sources[2] : undefined$1;
|
|
4717
4717
|
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
4718
4718
|
length = 1;
|
|
4719
4719
|
}
|
|
4720
|
-
while (++
|
|
4721
|
-
var source2 = sources[
|
|
4720
|
+
while (++index < length) {
|
|
4721
|
+
var source2 = sources[index];
|
|
4722
4722
|
var props = keysIn(source2);
|
|
4723
4723
|
var propsIndex = -1;
|
|
4724
4724
|
var propsLength = props.length;
|
|
@@ -4873,15 +4873,15 @@ lodash.exports;
|
|
|
4873
4873
|
__name(pickBy, "pickBy");
|
|
4874
4874
|
function result(object, path, defaultValue) {
|
|
4875
4875
|
path = castPath(path, object);
|
|
4876
|
-
var
|
|
4876
|
+
var index = -1, length = path.length;
|
|
4877
4877
|
if (!length) {
|
|
4878
4878
|
length = 1;
|
|
4879
4879
|
object = undefined$1;
|
|
4880
4880
|
}
|
|
4881
|
-
while (++
|
|
4882
|
-
var value = object == null ? undefined$1 : object[toKey(path[
|
|
4881
|
+
while (++index < length) {
|
|
4882
|
+
var value = object == null ? undefined$1 : object[toKey(path[index])];
|
|
4883
4883
|
if (value === undefined$1) {
|
|
4884
|
-
|
|
4884
|
+
index = length;
|
|
4885
4885
|
value = defaultValue;
|
|
4886
4886
|
}
|
|
4887
4887
|
object = isFunction(value) ? value.call(object) : value;
|
|
@@ -4901,7 +4901,7 @@ lodash.exports;
|
|
|
4901
4901
|
var toPairs = createToPairs(keys);
|
|
4902
4902
|
var toPairsIn = createToPairs(keysIn);
|
|
4903
4903
|
function transform(object, iteratee2, accumulator) {
|
|
4904
|
-
var isArr = isArray2(object), isArrLike = isArr ||
|
|
4904
|
+
var isArr = isArray2(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
|
|
4905
4905
|
iteratee2 = getIteratee(iteratee2, 4);
|
|
4906
4906
|
if (accumulator == null) {
|
|
4907
4907
|
var Ctor = object && object.constructor;
|
|
@@ -4913,8 +4913,8 @@ lodash.exports;
|
|
|
4913
4913
|
accumulator = {};
|
|
4914
4914
|
}
|
|
4915
4915
|
}
|
|
4916
|
-
(isArrLike ? arrayEach : baseForOwn)(object, function(value,
|
|
4917
|
-
return iteratee2(accumulator, value,
|
|
4916
|
+
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
|
|
4917
|
+
return iteratee2(accumulator, value, index, object2);
|
|
4918
4918
|
});
|
|
4919
4919
|
return accumulator;
|
|
4920
4920
|
}
|
|
@@ -4968,7 +4968,7 @@ lodash.exports;
|
|
|
4968
4968
|
return baseInRange(number, start, end);
|
|
4969
4969
|
}
|
|
4970
4970
|
__name(inRange, "inRange");
|
|
4971
|
-
function
|
|
4971
|
+
function random2(lower, upper, floating) {
|
|
4972
4972
|
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
|
|
4973
4973
|
upper = floating = undefined$1;
|
|
4974
4974
|
}
|
|
@@ -5004,10 +5004,10 @@ lodash.exports;
|
|
|
5004
5004
|
}
|
|
5005
5005
|
return baseRandom(lower, upper);
|
|
5006
5006
|
}
|
|
5007
|
-
__name(
|
|
5008
|
-
var camelCase = createCompounder(function(result2, word,
|
|
5007
|
+
__name(random2, "random");
|
|
5008
|
+
var camelCase = createCompounder(function(result2, word, index) {
|
|
5009
5009
|
word = word.toLowerCase();
|
|
5010
|
-
return result2 + (
|
|
5010
|
+
return result2 + (index ? capitalize(word) : word);
|
|
5011
5011
|
});
|
|
5012
5012
|
function capitalize(string) {
|
|
5013
5013
|
return upperFirst(toString(string).toLowerCase());
|
|
@@ -5038,11 +5038,11 @@ lodash.exports;
|
|
|
5038
5038
|
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
|
|
5039
5039
|
}
|
|
5040
5040
|
__name(escapeRegExp, "escapeRegExp");
|
|
5041
|
-
var kebabCase = createCompounder(function(result2, word,
|
|
5042
|
-
return result2 + (
|
|
5041
|
+
var kebabCase = createCompounder(function(result2, word, index) {
|
|
5042
|
+
return result2 + (index ? "-" : "") + word.toLowerCase();
|
|
5043
5043
|
});
|
|
5044
|
-
var lowerCase = createCompounder(function(result2, word,
|
|
5045
|
-
return result2 + (
|
|
5044
|
+
var lowerCase = createCompounder(function(result2, word, index) {
|
|
5045
|
+
return result2 + (index ? " " : "") + word.toLowerCase();
|
|
5046
5046
|
});
|
|
5047
5047
|
var lowerFirst = createCaseFirst("toLowerCase");
|
|
5048
5048
|
function pad(string, length, chars) {
|
|
@@ -5093,8 +5093,8 @@ lodash.exports;
|
|
|
5093
5093
|
return args.length < 3 ? string : string.replace(args[1], args[2]);
|
|
5094
5094
|
}
|
|
5095
5095
|
__name(replace, "replace");
|
|
5096
|
-
var snakeCase = createCompounder(function(result2, word,
|
|
5097
|
-
return result2 + (
|
|
5096
|
+
var snakeCase = createCompounder(function(result2, word, index) {
|
|
5097
|
+
return result2 + (index ? "_" : "") + word.toLowerCase();
|
|
5098
5098
|
});
|
|
5099
5099
|
function split(string, separator, limit) {
|
|
5100
5100
|
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
|
|
@@ -5114,8 +5114,8 @@ lodash.exports;
|
|
|
5114
5114
|
return string.split(separator, limit);
|
|
5115
5115
|
}
|
|
5116
5116
|
__name(split, "split");
|
|
5117
|
-
var startCase = createCompounder(function(result2, word,
|
|
5118
|
-
return result2 + (
|
|
5117
|
+
var startCase = createCompounder(function(result2, word, index) {
|
|
5118
|
+
return result2 + (index ? " " : "") + upperFirst(word);
|
|
5119
5119
|
});
|
|
5120
5120
|
function startsWith(string, target, position) {
|
|
5121
5121
|
string = toString(string);
|
|
@@ -5132,7 +5132,7 @@ lodash.exports;
|
|
|
5132
5132
|
string = toString(string);
|
|
5133
5133
|
options = assignInWith({}, options, settings, customDefaultsAssignIn);
|
|
5134
5134
|
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
|
|
5135
|
-
var isEscaping, isEvaluating,
|
|
5135
|
+
var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source2 = "__p += '";
|
|
5136
5136
|
var reDelimiters = RegExp2(
|
|
5137
5137
|
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
|
|
5138
5138
|
"g"
|
|
@@ -5140,7 +5140,7 @@ lodash.exports;
|
|
|
5140
5140
|
var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
|
|
5141
5141
|
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
|
|
5142
5142
|
interpolateValue || (interpolateValue = esTemplateValue);
|
|
5143
|
-
source2 += string.slice(
|
|
5143
|
+
source2 += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
|
|
5144
5144
|
if (escapeValue) {
|
|
5145
5145
|
isEscaping = true;
|
|
5146
5146
|
source2 += "' +\n__e(" + escapeValue + ") +\n'";
|
|
@@ -5152,7 +5152,7 @@ lodash.exports;
|
|
|
5152
5152
|
if (interpolateValue) {
|
|
5153
5153
|
source2 += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
|
|
5154
5154
|
}
|
|
5155
|
-
|
|
5155
|
+
index = offset + match.length;
|
|
5156
5156
|
return match;
|
|
5157
5157
|
});
|
|
5158
5158
|
source2 += "';\n";
|
|
@@ -5258,9 +5258,9 @@ lodash.exports;
|
|
|
5258
5258
|
result2 = result2.slice(0, newEnd === undefined$1 ? end : newEnd);
|
|
5259
5259
|
}
|
|
5260
5260
|
} else if (string.indexOf(baseToString(separator), end) != end) {
|
|
5261
|
-
var
|
|
5262
|
-
if (
|
|
5263
|
-
result2 = result2.slice(0,
|
|
5261
|
+
var index = result2.lastIndexOf(separator);
|
|
5262
|
+
if (index > -1) {
|
|
5263
|
+
result2 = result2.slice(0, index);
|
|
5264
5264
|
}
|
|
5265
5265
|
}
|
|
5266
5266
|
return result2 + omission;
|
|
@@ -5271,8 +5271,8 @@ lodash.exports;
|
|
|
5271
5271
|
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
|
|
5272
5272
|
}
|
|
5273
5273
|
__name(unescape, "unescape");
|
|
5274
|
-
var upperCase = createCompounder(function(result2, word,
|
|
5275
|
-
return result2 + (
|
|
5274
|
+
var upperCase = createCompounder(function(result2, word, index) {
|
|
5275
|
+
return result2 + (index ? " " : "") + word.toUpperCase();
|
|
5276
5276
|
});
|
|
5277
5277
|
var upperFirst = createCaseFirst("toUpperCase");
|
|
5278
5278
|
function words(string, pattern, guard) {
|
|
@@ -5307,9 +5307,9 @@ lodash.exports;
|
|
|
5307
5307
|
return [toIteratee(pair[0]), pair[1]];
|
|
5308
5308
|
});
|
|
5309
5309
|
return baseRest(function(args) {
|
|
5310
|
-
var
|
|
5311
|
-
while (++
|
|
5312
|
-
var pair = pairs[
|
|
5310
|
+
var index = -1;
|
|
5311
|
+
while (++index < length) {
|
|
5312
|
+
var pair = pairs[index];
|
|
5313
5313
|
if (apply(pair[0], this, args)) {
|
|
5314
5314
|
return apply(pair[1], this, args);
|
|
5315
5315
|
}
|
|
@@ -5444,12 +5444,12 @@ lodash.exports;
|
|
|
5444
5444
|
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
|
5445
5445
|
return [];
|
|
5446
5446
|
}
|
|
5447
|
-
var
|
|
5447
|
+
var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
|
|
5448
5448
|
iteratee2 = getIteratee(iteratee2);
|
|
5449
5449
|
n -= MAX_ARRAY_LENGTH;
|
|
5450
5450
|
var result2 = baseTimes(length, iteratee2);
|
|
5451
|
-
while (++
|
|
5452
|
-
iteratee2(
|
|
5451
|
+
while (++index < n) {
|
|
5452
|
+
iteratee2(index);
|
|
5453
5453
|
}
|
|
5454
5454
|
return result2;
|
|
5455
5455
|
}
|
|
@@ -5617,7 +5617,7 @@ lodash.exports;
|
|
|
5617
5617
|
lodash2.sampleSize = sampleSize;
|
|
5618
5618
|
lodash2.set = set;
|
|
5619
5619
|
lodash2.setWith = setWith;
|
|
5620
|
-
lodash2.shuffle =
|
|
5620
|
+
lodash2.shuffle = shuffle2;
|
|
5621
5621
|
lodash2.slice = slice;
|
|
5622
5622
|
lodash2.sortBy = sortBy;
|
|
5623
5623
|
lodash2.sortedUniq = sortedUniq;
|
|
@@ -5716,7 +5716,7 @@ lodash.exports;
|
|
|
5716
5716
|
lodash2.isArrayLike = isArrayLike;
|
|
5717
5717
|
lodash2.isArrayLikeObject = isArrayLikeObject;
|
|
5718
5718
|
lodash2.isBoolean = isBoolean;
|
|
5719
|
-
lodash2.isBuffer =
|
|
5719
|
+
lodash2.isBuffer = isBuffer;
|
|
5720
5720
|
lodash2.isDate = isDate;
|
|
5721
5721
|
lodash2.isElement = isElement;
|
|
5722
5722
|
lodash2.isEmpty = isEmpty;
|
|
@@ -5775,7 +5775,7 @@ lodash.exports;
|
|
|
5775
5775
|
lodash2.padEnd = padEnd;
|
|
5776
5776
|
lodash2.padStart = padStart;
|
|
5777
5777
|
lodash2.parseInt = parseInt2;
|
|
5778
|
-
lodash2.random =
|
|
5778
|
+
lodash2.random = random2;
|
|
5779
5779
|
lodash2.reduce = reduce;
|
|
5780
5780
|
lodash2.reduceRight = reduceRight;
|
|
5781
5781
|
lodash2.repeat = repeat;
|
|
@@ -5832,10 +5832,10 @@ lodash.exports;
|
|
|
5832
5832
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
5833
5833
|
lodash2[methodName].placeholder = lodash2;
|
|
5834
5834
|
});
|
|
5835
|
-
arrayEach(["drop", "take"], function(methodName,
|
|
5835
|
+
arrayEach(["drop", "take"], function(methodName, index) {
|
|
5836
5836
|
LazyWrapper.prototype[methodName] = function(n) {
|
|
5837
5837
|
n = n === undefined$1 ? 1 : nativeMax(toInteger(n), 0);
|
|
5838
|
-
var result2 = this.__filtered__ && !
|
|
5838
|
+
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
|
|
5839
5839
|
if (result2.__filtered__) {
|
|
5840
5840
|
result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
|
|
5841
5841
|
} else {
|
|
@@ -5850,8 +5850,8 @@ lodash.exports;
|
|
|
5850
5850
|
return this.reverse()[methodName](n).reverse();
|
|
5851
5851
|
};
|
|
5852
5852
|
});
|
|
5853
|
-
arrayEach(["filter", "map", "takeWhile"], function(methodName,
|
|
5854
|
-
var type =
|
|
5853
|
+
arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
|
|
5854
|
+
var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
|
|
5855
5855
|
LazyWrapper.prototype[methodName] = function(iteratee2) {
|
|
5856
5856
|
var result2 = this.clone();
|
|
5857
5857
|
result2.__iteratees__.push({
|
|
@@ -5862,14 +5862,14 @@ lodash.exports;
|
|
|
5862
5862
|
return result2;
|
|
5863
5863
|
};
|
|
5864
5864
|
});
|
|
5865
|
-
arrayEach(["head", "last"], function(methodName,
|
|
5866
|
-
var takeName = "take" + (
|
|
5865
|
+
arrayEach(["head", "last"], function(methodName, index) {
|
|
5866
|
+
var takeName = "take" + (index ? "Right" : "");
|
|
5867
5867
|
LazyWrapper.prototype[methodName] = function() {
|
|
5868
5868
|
return this[takeName](1).value()[0];
|
|
5869
5869
|
};
|
|
5870
5870
|
});
|
|
5871
|
-
arrayEach(["initial", "tail"], function(methodName,
|
|
5872
|
-
var dropName = "drop" + (
|
|
5871
|
+
arrayEach(["initial", "tail"], function(methodName, index) {
|
|
5872
|
+
var dropName = "drop" + (index ? "" : "Right");
|
|
5873
5873
|
LazyWrapper.prototype[methodName] = function() {
|
|
5874
5874
|
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
|
|
5875
5875
|
};
|
|
@@ -6558,7 +6558,7 @@ function trimRangeByAnotherRange(rangeToBeTrimmed, trimmingRange, sequenceLength
|
|
|
6558
6558
|
rangeToBeTrimmed,
|
|
6559
6559
|
sequenceLength
|
|
6560
6560
|
);
|
|
6561
|
-
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed,
|
|
6561
|
+
splitRangesToBeTrimmed.forEach(function(nonCircularRangeToBeTrimmed, index) {
|
|
6562
6562
|
overlaps.forEach(function(overlap) {
|
|
6563
6563
|
if (nonCircularRangeToBeTrimmed) {
|
|
6564
6564
|
nonCircularRangeToBeTrimmed = trimNonCicularRangeByAnotherNonCircularRange(
|
|
@@ -6567,7 +6567,7 @@ function trimRangeByAnotherRange(rangeToBeTrimmed, trimmingRange, sequenceLength
|
|
|
6567
6567
|
);
|
|
6568
6568
|
}
|
|
6569
6569
|
});
|
|
6570
|
-
splitRangesToBeTrimmed[
|
|
6570
|
+
splitRangesToBeTrimmed[index] = nonCircularRangeToBeTrimmed;
|
|
6571
6571
|
});
|
|
6572
6572
|
const outputSplitRanges = splitRangesToBeTrimmed.filter(function(trimmedRange) {
|
|
6573
6573
|
if (trimmedRange) {
|
|
@@ -6722,12 +6722,12 @@ function provideInclusiveOptions(funToWrap) {
|
|
|
6722
6722
|
const args = Array.prototype.slice.call(arguments);
|
|
6723
6723
|
const options = args[args.length - 1];
|
|
6724
6724
|
if (options && (options.inclusive1BasedEnd || options.inclusive1BasedStart)) {
|
|
6725
|
-
args.forEach(function(arg,
|
|
6725
|
+
args.forEach(function(arg, index) {
|
|
6726
6726
|
if (arg && arg.start > -1 && options.inclusive1BasedStart) {
|
|
6727
|
-
args[
|
|
6727
|
+
args[index] = lodashExports.assign(arg, { start: arg.start - 1 });
|
|
6728
6728
|
}
|
|
6729
6729
|
if (arg && arg.end > -1 && options.inclusive1BasedEnd) {
|
|
6730
|
-
args[
|
|
6730
|
+
args[index] = lodashExports.assign(arg, { end: arg.end - 1 });
|
|
6731
6731
|
}
|
|
6732
6732
|
});
|
|
6733
6733
|
}
|
|
@@ -6757,7 +6757,7 @@ function getRangeLength$1(range, rangeMax) {
|
|
|
6757
6757
|
}
|
|
6758
6758
|
__name(getRangeLength$1, "getRangeLength$1");
|
|
6759
6759
|
function isRangeWithinRange(rangeToCheck, containingRange, maxLength) {
|
|
6760
|
-
|
|
6760
|
+
const ranges = trimRangeByAnotherRange(
|
|
6761
6761
|
rangeToCheck,
|
|
6762
6762
|
containingRange,
|
|
6763
6763
|
maxLength
|
|
@@ -6922,14 +6922,14 @@ function getShortestDistanceBetweenTwoPositions(position1, position2, sequenceLe
|
|
|
6922
6922
|
__name(getShortestDistanceBetweenTwoPositions, "getShortestDistanceBetweenTwoPositions");
|
|
6923
6923
|
function getYOffsetForPotentiallyCircularRange(range, YOffsetLevelsWithRanges, assignYOffsetToRange) {
|
|
6924
6924
|
let yOffset = [];
|
|
6925
|
-
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset,
|
|
6925
|
+
const openYOffsetFound = YOffsetLevelsWithRanges.some(function(rangesAlreadyAddedToYOffset, index) {
|
|
6926
6926
|
const rangeBlocked = rangesAlreadyAddedToYOffset.some(function(comparisonRange) {
|
|
6927
6927
|
return checkIfPotentiallyCircularRangesOverlap(range, comparisonRange);
|
|
6928
6928
|
});
|
|
6929
6929
|
if (!rangeBlocked) {
|
|
6930
|
-
yOffset =
|
|
6930
|
+
yOffset = index;
|
|
6931
6931
|
if (assignYOffsetToRange)
|
|
6932
|
-
range.yOffset =
|
|
6932
|
+
range.yOffset = index;
|
|
6933
6933
|
rangesAlreadyAddedToYOffset.push(range);
|
|
6934
6934
|
return true;
|
|
6935
6935
|
}
|
|
@@ -7241,9 +7241,9 @@ function convertApELikeRegexToRegex(regString = "") {
|
|
|
7241
7241
|
let isGroupClosed = true;
|
|
7242
7242
|
let closingBraceHit;
|
|
7243
7243
|
const groups = [];
|
|
7244
|
-
for (let
|
|
7245
|
-
const char = newstr[
|
|
7246
|
-
const nextChar = newstr[
|
|
7244
|
+
for (let index = 0; index < newstr.length; index++) {
|
|
7245
|
+
const char = newstr[index];
|
|
7246
|
+
const nextChar = newstr[index + 1];
|
|
7247
7247
|
if (char === "[") {
|
|
7248
7248
|
isGroupClosed = false;
|
|
7249
7249
|
} else if (char === "]" || closingBraceHit) {
|
|
@@ -7421,151 +7421,232 @@ const getFeatureToColorMap = /* @__PURE__ */ __name(({ includeHidden } = {}) =>
|
|
|
7421
7421
|
const getFeatureTypes = /* @__PURE__ */ __name(({ includeHidden } = {}) => lodashExports.filter(getMergedFeatureMap(), (f) => includeHidden ? true : !f.isHidden).map(
|
|
7422
7422
|
(f) => f.name
|
|
7423
7423
|
), "getFeatureTypes");
|
|
7424
|
-
var
|
|
7425
|
-
var
|
|
7426
|
-
|
|
7427
|
-
|
|
7428
|
-
return
|
|
7429
|
-
}, "isBuffer");
|
|
7430
|
-
function ObjectID(arg) {
|
|
7431
|
-
if (!(this instanceof ObjectID))
|
|
7432
|
-
return new ObjectID(arg);
|
|
7433
|
-
if (arg && (arg instanceof ObjectID || arg._bsontype === "ObjectID"))
|
|
7434
|
-
return arg;
|
|
7435
|
-
var buf;
|
|
7436
|
-
if (isBuffer(arg) || Array.isArray(arg) && arg.length === 12) {
|
|
7437
|
-
buf = Array.prototype.slice.call(arg);
|
|
7438
|
-
} else if (typeof arg === "string") {
|
|
7439
|
-
if (arg.length !== 12 && !ObjectID.isValid(arg))
|
|
7440
|
-
throw new Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");
|
|
7441
|
-
buf = buffer(arg);
|
|
7442
|
-
} else if (/number|undefined/.test(typeof arg)) {
|
|
7443
|
-
buf = buffer(generate(arg));
|
|
7444
|
-
}
|
|
7445
|
-
Object.defineProperty(this, "id", {
|
|
7446
|
-
enumerable: true,
|
|
7447
|
-
get: function() {
|
|
7448
|
-
return String.fromCharCode.apply(this, buf);
|
|
7449
|
-
}
|
|
7450
|
-
});
|
|
7451
|
-
Object.defineProperty(this, "str", {
|
|
7452
|
-
get: function() {
|
|
7453
|
-
return buf.map(hex.bind(this, 2)).join("");
|
|
7454
|
-
}
|
|
7455
|
-
});
|
|
7424
|
+
var lib = { exports: {} };
|
|
7425
|
+
var seed = 1;
|
|
7426
|
+
function getNextValue() {
|
|
7427
|
+
seed = (seed * 9301 + 49297) % 233280;
|
|
7428
|
+
return seed / 233280;
|
|
7456
7429
|
}
|
|
7457
|
-
__name(
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
ObjectID.createFromHexString = function(hexString) {
|
|
7466
|
-
if (!ObjectID.isValid(hexString))
|
|
7467
|
-
throw new Error("Invalid ObjectID hex string");
|
|
7468
|
-
return new ObjectID(hexString);
|
|
7469
|
-
};
|
|
7470
|
-
ObjectID.isValid = function(objectid2) {
|
|
7471
|
-
if (!objectid2 || typeof objectid2 !== "string" && (typeof objectid2 !== "object" || Array.isArray(objectid2) || typeof objectid2.toString !== "function"))
|
|
7472
|
-
return false;
|
|
7473
|
-
return /^[0-9A-F]{24}$/i.test(objectid2.toString());
|
|
7430
|
+
__name(getNextValue, "getNextValue");
|
|
7431
|
+
function setSeed$1(_seed_) {
|
|
7432
|
+
seed = _seed_;
|
|
7433
|
+
}
|
|
7434
|
+
__name(setSeed$1, "setSeed$1");
|
|
7435
|
+
var randomFromSeed$1 = {
|
|
7436
|
+
nextValue: getNextValue,
|
|
7437
|
+
seed: setSeed$1
|
|
7474
7438
|
};
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7439
|
+
var randomFromSeed = randomFromSeed$1;
|
|
7440
|
+
var ORIGINAL = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";
|
|
7441
|
+
var alphabet$2;
|
|
7442
|
+
var previousSeed;
|
|
7443
|
+
var shuffled;
|
|
7444
|
+
function reset() {
|
|
7445
|
+
shuffled = false;
|
|
7446
|
+
}
|
|
7447
|
+
__name(reset, "reset");
|
|
7448
|
+
function setCharacters(_alphabet_) {
|
|
7449
|
+
if (!_alphabet_) {
|
|
7450
|
+
if (alphabet$2 !== ORIGINAL) {
|
|
7451
|
+
alphabet$2 = ORIGINAL;
|
|
7452
|
+
reset();
|
|
7485
7453
|
}
|
|
7486
|
-
|
|
7487
|
-
machineID = arg | 0;
|
|
7454
|
+
return;
|
|
7488
7455
|
}
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
ObjectID.getMachineID = function() {
|
|
7492
|
-
return MACHINE_ID;
|
|
7493
|
-
};
|
|
7494
|
-
ObjectID.prototype = {
|
|
7495
|
-
_bsontype: "ObjectID",
|
|
7496
|
-
constructor: ObjectID,
|
|
7497
|
-
/**
|
|
7498
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
7499
|
-
*
|
|
7500
|
-
* @return {String} return the 24 byte hex string representation.
|
|
7501
|
-
* @api public
|
|
7502
|
-
*/
|
|
7503
|
-
toHexString: function() {
|
|
7504
|
-
return this.str;
|
|
7505
|
-
},
|
|
7506
|
-
/**
|
|
7507
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
7508
|
-
*
|
|
7509
|
-
* @param {Object} other ObjectID instance to compare against.
|
|
7510
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
7511
|
-
* @api public
|
|
7512
|
-
*/
|
|
7513
|
-
equals: function(other) {
|
|
7514
|
-
return !!other && this.str === other.toString();
|
|
7515
|
-
},
|
|
7516
|
-
/**
|
|
7517
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
7518
|
-
*
|
|
7519
|
-
* @return {Date} the generation date
|
|
7520
|
-
* @api public
|
|
7521
|
-
*/
|
|
7522
|
-
getTimestamp: function() {
|
|
7523
|
-
return new Date(parseInt(this.str.substr(0, 8), 16) * 1e3);
|
|
7456
|
+
if (_alphabet_ === alphabet$2) {
|
|
7457
|
+
return;
|
|
7524
7458
|
}
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7459
|
+
if (_alphabet_.length !== ORIGINAL.length) {
|
|
7460
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. You submitted " + _alphabet_.length + " characters: " + _alphabet_);
|
|
7461
|
+
}
|
|
7462
|
+
var unique = _alphabet_.split("").filter(function(item, ind, arr) {
|
|
7463
|
+
return ind !== arr.lastIndexOf(item);
|
|
7464
|
+
});
|
|
7465
|
+
if (unique.length) {
|
|
7466
|
+
throw new Error("Custom alphabet for shortid must be " + ORIGINAL.length + " unique characters. These characters were not unique: " + unique.join(", "));
|
|
7467
|
+
}
|
|
7468
|
+
alphabet$2 = _alphabet_;
|
|
7469
|
+
reset();
|
|
7528
7470
|
}
|
|
7529
|
-
__name(
|
|
7530
|
-
function
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
time = parseInt(time, 10) % 4294967295;
|
|
7534
|
-
return hex(8, time) + hex(6, MACHINE_ID) + hex(4, pid) + hex(6, next());
|
|
7471
|
+
__name(setCharacters, "setCharacters");
|
|
7472
|
+
function characters(_alphabet_) {
|
|
7473
|
+
setCharacters(_alphabet_);
|
|
7474
|
+
return alphabet$2;
|
|
7535
7475
|
}
|
|
7536
|
-
__name(
|
|
7537
|
-
function
|
|
7538
|
-
|
|
7539
|
-
|
|
7476
|
+
__name(characters, "characters");
|
|
7477
|
+
function setSeed(seed2) {
|
|
7478
|
+
randomFromSeed.seed(seed2);
|
|
7479
|
+
if (previousSeed !== seed2) {
|
|
7480
|
+
reset();
|
|
7481
|
+
previousSeed = seed2;
|
|
7482
|
+
}
|
|
7540
7483
|
}
|
|
7541
|
-
__name(
|
|
7542
|
-
function
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7484
|
+
__name(setSeed, "setSeed");
|
|
7485
|
+
function shuffle() {
|
|
7486
|
+
if (!alphabet$2) {
|
|
7487
|
+
setCharacters(ORIGINAL);
|
|
7488
|
+
}
|
|
7489
|
+
var sourceArray = alphabet$2.split("");
|
|
7490
|
+
var targetArray = [];
|
|
7491
|
+
var r = randomFromSeed.nextValue();
|
|
7492
|
+
var characterIndex;
|
|
7493
|
+
while (sourceArray.length > 0) {
|
|
7494
|
+
r = randomFromSeed.nextValue();
|
|
7495
|
+
characterIndex = Math.floor(r * sourceArray.length);
|
|
7496
|
+
targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
|
|
7497
|
+
}
|
|
7498
|
+
return targetArray.join("");
|
|
7499
|
+
}
|
|
7500
|
+
__name(shuffle, "shuffle");
|
|
7501
|
+
function getShuffled() {
|
|
7502
|
+
if (shuffled) {
|
|
7503
|
+
return shuffled;
|
|
7504
|
+
}
|
|
7505
|
+
shuffled = shuffle();
|
|
7506
|
+
return shuffled;
|
|
7551
7507
|
}
|
|
7552
|
-
__name(
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
return
|
|
7508
|
+
__name(getShuffled, "getShuffled");
|
|
7509
|
+
function lookup(index) {
|
|
7510
|
+
var alphabetShuffled = getShuffled();
|
|
7511
|
+
return alphabetShuffled[index];
|
|
7512
|
+
}
|
|
7513
|
+
__name(lookup, "lookup");
|
|
7514
|
+
function get$2() {
|
|
7515
|
+
return alphabet$2 || ORIGINAL;
|
|
7516
|
+
}
|
|
7517
|
+
__name(get$2, "get$2");
|
|
7518
|
+
var alphabet_1 = {
|
|
7519
|
+
get: get$2,
|
|
7520
|
+
characters,
|
|
7521
|
+
seed: setSeed,
|
|
7522
|
+
lookup,
|
|
7523
|
+
shuffled: getShuffled
|
|
7556
7524
|
};
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7525
|
+
var crypto = typeof window === "object" && (window.crypto || window.msCrypto);
|
|
7526
|
+
var randomByte;
|
|
7527
|
+
if (!crypto || !crypto.getRandomValues) {
|
|
7528
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7529
|
+
var bytes = [];
|
|
7530
|
+
for (var i = 0; i < size; i++) {
|
|
7531
|
+
bytes.push(Math.floor(Math.random() * 256));
|
|
7532
|
+
}
|
|
7533
|
+
return bytes;
|
|
7534
|
+
}, "randomByte");
|
|
7535
|
+
} else {
|
|
7536
|
+
randomByte = /* @__PURE__ */ __name(function(size) {
|
|
7537
|
+
return crypto.getRandomValues(new Uint8Array(size));
|
|
7538
|
+
}, "randomByte");
|
|
7539
|
+
}
|
|
7540
|
+
var randomByteBrowser = randomByte;
|
|
7541
|
+
var format_browser = /* @__PURE__ */ __name(function(random2, alphabet2, size) {
|
|
7542
|
+
var mask = (2 << Math.log(alphabet2.length - 1) / Math.LN2) - 1;
|
|
7543
|
+
var step = -~(1.6 * mask * size / alphabet2.length);
|
|
7544
|
+
var id = "";
|
|
7545
|
+
while (true) {
|
|
7546
|
+
var bytes = random2(step);
|
|
7547
|
+
var i = step;
|
|
7548
|
+
while (i--) {
|
|
7549
|
+
id += alphabet2[bytes[i] & mask] || "";
|
|
7550
|
+
if (id.length === +size)
|
|
7551
|
+
return id;
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7554
|
+
}, "format_browser");
|
|
7555
|
+
var alphabet$1 = alphabet_1;
|
|
7556
|
+
var random = randomByteBrowser;
|
|
7557
|
+
var format = format_browser;
|
|
7558
|
+
function generate$1(number) {
|
|
7559
|
+
var loopCounter = 0;
|
|
7560
|
+
var done;
|
|
7561
|
+
var str = "";
|
|
7562
|
+
while (!done) {
|
|
7563
|
+
str = str + format(random, alphabet$1.get(), 1);
|
|
7564
|
+
done = number < Math.pow(16, loopCounter + 1);
|
|
7565
|
+
loopCounter++;
|
|
7566
|
+
}
|
|
7567
|
+
return str;
|
|
7568
|
+
}
|
|
7569
|
+
__name(generate$1, "generate$1");
|
|
7570
|
+
var generate_1 = generate$1;
|
|
7571
|
+
var generate = generate_1;
|
|
7572
|
+
var REDUCE_TIME = 1567752802062;
|
|
7573
|
+
var version = 7;
|
|
7574
|
+
var counter;
|
|
7575
|
+
var previousSeconds;
|
|
7576
|
+
function build(clusterWorkerId) {
|
|
7577
|
+
var str = "";
|
|
7578
|
+
var seconds = Math.floor((Date.now() - REDUCE_TIME) * 1e-3);
|
|
7579
|
+
if (seconds === previousSeconds) {
|
|
7580
|
+
counter++;
|
|
7581
|
+
} else {
|
|
7582
|
+
counter = 0;
|
|
7583
|
+
previousSeconds = seconds;
|
|
7584
|
+
}
|
|
7585
|
+
str = str + generate(version);
|
|
7586
|
+
str = str + generate(clusterWorkerId);
|
|
7587
|
+
if (counter > 0) {
|
|
7588
|
+
str = str + generate(counter);
|
|
7589
|
+
}
|
|
7590
|
+
str = str + generate(seconds);
|
|
7591
|
+
return str;
|
|
7592
|
+
}
|
|
7593
|
+
__name(build, "build");
|
|
7594
|
+
var build_1 = build;
|
|
7595
|
+
var alphabet = alphabet_1;
|
|
7596
|
+
function isShortId(id) {
|
|
7597
|
+
if (!id || typeof id !== "string" || id.length < 6) {
|
|
7598
|
+
return false;
|
|
7599
|
+
}
|
|
7600
|
+
var nonAlphabetic = new RegExp("[^" + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, "\\$&") + "]");
|
|
7601
|
+
return !nonAlphabetic.test(id);
|
|
7602
|
+
}
|
|
7603
|
+
__name(isShortId, "isShortId");
|
|
7604
|
+
var isValid = isShortId;
|
|
7605
|
+
(function(module2) {
|
|
7606
|
+
var alphabet2 = alphabet_1;
|
|
7607
|
+
var build2 = build_1;
|
|
7608
|
+
var isValid$1 = isValid;
|
|
7609
|
+
var clusterWorkerId = 0;
|
|
7610
|
+
function seed2(seedValue) {
|
|
7611
|
+
alphabet2.seed(seedValue);
|
|
7612
|
+
return module2.exports;
|
|
7613
|
+
}
|
|
7614
|
+
__name(seed2, "seed");
|
|
7615
|
+
function worker(workerId) {
|
|
7616
|
+
clusterWorkerId = workerId;
|
|
7617
|
+
return module2.exports;
|
|
7618
|
+
}
|
|
7619
|
+
__name(worker, "worker");
|
|
7620
|
+
function characters2(newCharacters) {
|
|
7621
|
+
if (newCharacters !== void 0) {
|
|
7622
|
+
alphabet2.characters(newCharacters);
|
|
7623
|
+
}
|
|
7624
|
+
return alphabet2.shuffled();
|
|
7625
|
+
}
|
|
7626
|
+
__name(characters2, "characters");
|
|
7627
|
+
function generate2() {
|
|
7628
|
+
return build2(clusterWorkerId);
|
|
7629
|
+
}
|
|
7630
|
+
__name(generate2, "generate");
|
|
7631
|
+
module2.exports = generate2;
|
|
7632
|
+
module2.exports.generate = generate2;
|
|
7633
|
+
module2.exports.seed = seed2;
|
|
7634
|
+
module2.exports.worker = worker;
|
|
7635
|
+
module2.exports.characters = characters2;
|
|
7636
|
+
module2.exports.isValid = isValid$1;
|
|
7637
|
+
})(lib);
|
|
7638
|
+
var libExports = lib.exports;
|
|
7639
|
+
var shortid = libExports;
|
|
7640
|
+
const shortid$1 = /* @__PURE__ */ getDefaultExportFromCjs(shortid);
|
|
7560
7641
|
function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme) {
|
|
7561
7642
|
if (restrictionEnzyme.forwardRegex.length === 0 || restrictionEnzyme.reverseRegex.length === 0) {
|
|
7562
|
-
|
|
7643
|
+
const returnArray = [];
|
|
7563
7644
|
returnArray.error = "Cannot cut sequence. Enzyme restriction site must be at least 1 bp long.";
|
|
7564
7645
|
return returnArray;
|
|
7565
7646
|
}
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7647
|
+
const forwardRegExpPattern = new RegExp(restrictionEnzyme.forwardRegex, "ig");
|
|
7648
|
+
const sequence = pSequence;
|
|
7649
|
+
const cutsitesForward = cutSequence(
|
|
7569
7650
|
forwardRegExpPattern,
|
|
7570
7651
|
restrictionEnzyme,
|
|
7571
7652
|
sequence,
|
|
@@ -7573,7 +7654,7 @@ function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme)
|
|
|
7573
7654
|
);
|
|
7574
7655
|
let cutsitesReverse = [];
|
|
7575
7656
|
if (restrictionEnzyme.forwardRegex !== restrictionEnzyme.reverseRegex) {
|
|
7576
|
-
|
|
7657
|
+
const revSequence = getReverseComplementSequenceString(sequence);
|
|
7577
7658
|
cutsitesReverse = cutSequence(
|
|
7578
7659
|
forwardRegExpPattern,
|
|
7579
7660
|
restrictionEnzyme,
|
|
@@ -7641,20 +7722,20 @@ function cutSequenceByRestrictionEnzyme(pSequence, circular, restrictionEnzyme)
|
|
|
7641
7722
|
}
|
|
7642
7723
|
__name(cutSequenceByRestrictionEnzyme, "cutSequenceByRestrictionEnzyme");
|
|
7643
7724
|
function cutSequence(forwardRegExpPattern, restrictionEnzyme, sequence, circular) {
|
|
7644
|
-
|
|
7725
|
+
const restrictionCutSites = [];
|
|
7645
7726
|
let restrictionCutSite;
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7727
|
+
const recognitionSiteLength = restrictionEnzyme.site.length;
|
|
7728
|
+
const originalSequence = sequence;
|
|
7729
|
+
const originalSequenceLength = sequence.length;
|
|
7649
7730
|
if (circular) {
|
|
7650
7731
|
sequence += sequence;
|
|
7651
7732
|
}
|
|
7652
|
-
|
|
7733
|
+
const currentSequenceLength = sequence.length;
|
|
7653
7734
|
let matchIndex = sequence.search(forwardRegExpPattern);
|
|
7654
7735
|
let startIndex = 0;
|
|
7655
7736
|
let subSequence = sequence;
|
|
7656
7737
|
while (matchIndex !== -1) {
|
|
7657
|
-
|
|
7738
|
+
const recognitionSiteRange = {};
|
|
7658
7739
|
let start;
|
|
7659
7740
|
let end;
|
|
7660
7741
|
let upstreamTopSnip = null;
|
|
@@ -7762,9 +7843,9 @@ function cutSequence(forwardRegExpPattern, restrictionEnzyme, sequence, circular
|
|
|
7762
7843
|
)
|
|
7763
7844
|
};
|
|
7764
7845
|
}
|
|
7765
|
-
|
|
7846
|
+
const overhangBps = getSequenceWithinRange(cutRange, originalSequence);
|
|
7766
7847
|
restrictionCutSite = {
|
|
7767
|
-
id:
|
|
7848
|
+
id: shortid$1(),
|
|
7768
7849
|
start,
|
|
7769
7850
|
end,
|
|
7770
7851
|
topSnipPosition,
|
|
@@ -7822,7 +7903,7 @@ function computeDigestFragments({
|
|
|
7822
7903
|
});
|
|
7823
7904
|
if (!circular && cutsites.length) {
|
|
7824
7905
|
sortedCutsites.push({
|
|
7825
|
-
id: "seqTerm_" +
|
|
7906
|
+
id: "seqTerm_" + shortid$1(),
|
|
7826
7907
|
start: 0,
|
|
7827
7908
|
end: 0,
|
|
7828
7909
|
overhangBps: "",
|
|
@@ -7843,19 +7924,19 @@ function computeDigestFragments({
|
|
|
7843
7924
|
}
|
|
7844
7925
|
});
|
|
7845
7926
|
}
|
|
7846
|
-
sortedCutsites.forEach((cutsite1,
|
|
7927
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
7847
7928
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
7848
|
-
sortedCutsites.forEach((cs,
|
|
7849
|
-
if (
|
|
7929
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
7930
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
7850
7931
|
return;
|
|
7851
7932
|
}
|
|
7852
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
7933
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
7853
7934
|
});
|
|
7854
7935
|
}
|
|
7855
7936
|
if (!computeDigestDisabled) {
|
|
7856
7937
|
pairs.push([
|
|
7857
7938
|
cutsite1,
|
|
7858
|
-
sortedCutsites[
|
|
7939
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
7859
7940
|
]);
|
|
7860
7941
|
}
|
|
7861
7942
|
});
|
|
@@ -8334,11 +8415,11 @@ var diffMatchPatch = { exports: {} };
|
|
|
8334
8415
|
}
|
|
8335
8416
|
var dmp2 = this;
|
|
8336
8417
|
function diff_halfMatchI_(longtext2, shorttext2, i) {
|
|
8337
|
-
var
|
|
8418
|
+
var seed2 = longtext2.substring(i, i + Math.floor(longtext2.length / 4));
|
|
8338
8419
|
var j = -1;
|
|
8339
8420
|
var best_common = "";
|
|
8340
8421
|
var best_longtext_a, best_longtext_b, best_shorttext_a, best_shorttext_b;
|
|
8341
|
-
while ((j = shorttext2.indexOf(
|
|
8422
|
+
while ((j = shorttext2.indexOf(seed2, j + 1)) != -1) {
|
|
8342
8423
|
var prefixLength = dmp2.diff_commonPrefix(
|
|
8343
8424
|
longtext2.substring(i),
|
|
8344
8425
|
shorttext2.substring(j)
|
|
@@ -10542,30 +10623,30 @@ var browser = {
|
|
|
10542
10623
|
stderr: false
|
|
10543
10624
|
};
|
|
10544
10625
|
const stringReplaceAll$1 = /* @__PURE__ */ __name((string, substring, replacer) => {
|
|
10545
|
-
let
|
|
10546
|
-
if (
|
|
10626
|
+
let index = string.indexOf(substring);
|
|
10627
|
+
if (index === -1) {
|
|
10547
10628
|
return string;
|
|
10548
10629
|
}
|
|
10549
10630
|
const substringLength = substring.length;
|
|
10550
10631
|
let endIndex = 0;
|
|
10551
10632
|
let returnValue = "";
|
|
10552
10633
|
do {
|
|
10553
|
-
returnValue += string.substr(endIndex,
|
|
10554
|
-
endIndex =
|
|
10555
|
-
|
|
10556
|
-
} while (
|
|
10634
|
+
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
10635
|
+
endIndex = index + substringLength;
|
|
10636
|
+
index = string.indexOf(substring, endIndex);
|
|
10637
|
+
} while (index !== -1);
|
|
10557
10638
|
returnValue += string.substr(endIndex);
|
|
10558
10639
|
return returnValue;
|
|
10559
10640
|
}, "stringReplaceAll$1");
|
|
10560
|
-
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix,
|
|
10641
|
+
const stringEncaseCRLFWithFirstIndex$1 = /* @__PURE__ */ __name((string, prefix, postfix, index) => {
|
|
10561
10642
|
let endIndex = 0;
|
|
10562
10643
|
let returnValue = "";
|
|
10563
10644
|
do {
|
|
10564
|
-
const gotCR = string[
|
|
10565
|
-
returnValue += string.substr(endIndex, (gotCR ?
|
|
10566
|
-
endIndex =
|
|
10567
|
-
|
|
10568
|
-
} while (
|
|
10645
|
+
const gotCR = string[index - 1] === "\r";
|
|
10646
|
+
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
10647
|
+
endIndex = index + 1;
|
|
10648
|
+
index = string.indexOf("\n", endIndex);
|
|
10649
|
+
} while (index !== -1);
|
|
10569
10650
|
returnValue += string.substr(endIndex);
|
|
10570
10651
|
return returnValue;
|
|
10571
10652
|
}, "stringEncaseCRLFWithFirstIndex$1");
|
|
@@ -10976,7 +11057,7 @@ var Processor = function() {
|
|
|
10976
11057
|
}, "pipe")
|
|
10977
11058
|
}, {
|
|
10978
11059
|
key: "process",
|
|
10979
|
-
value: /* @__PURE__ */ __name(function
|
|
11060
|
+
value: /* @__PURE__ */ __name(function process(input, pipe) {
|
|
10980
11061
|
var context = input;
|
|
10981
11062
|
context.options = this.options();
|
|
10982
11063
|
var nextPipe = pipe || input.pipe || "default";
|
|
@@ -11015,15 +11096,15 @@ var Pipe = function() {
|
|
|
11015
11096
|
__name(Pipe2, "Pipe");
|
|
11016
11097
|
createClass(Pipe2, [{
|
|
11017
11098
|
key: "process",
|
|
11018
|
-
value: /* @__PURE__ */ __name(function
|
|
11099
|
+
value: /* @__PURE__ */ __name(function process(input) {
|
|
11019
11100
|
if (!this.processor) {
|
|
11020
11101
|
throw new Error("add this pipe to a processor before using it");
|
|
11021
11102
|
}
|
|
11022
11103
|
var debug = this.debug;
|
|
11023
11104
|
var length = this.filters.length;
|
|
11024
11105
|
var context = input;
|
|
11025
|
-
for (var
|
|
11026
|
-
var filter = this.filters[
|
|
11106
|
+
for (var index = 0; index < length; index++) {
|
|
11107
|
+
var filter = this.filters[index];
|
|
11027
11108
|
if (debug) {
|
|
11028
11109
|
this.log("filter: " + filter.filterName);
|
|
11029
11110
|
}
|
|
@@ -11062,10 +11143,10 @@ var Pipe = function() {
|
|
|
11062
11143
|
if (!filterName) {
|
|
11063
11144
|
throw new Error("a filter name is required");
|
|
11064
11145
|
}
|
|
11065
|
-
for (var
|
|
11066
|
-
var filter = this.filters[
|
|
11146
|
+
for (var index = 0; index < this.filters.length; index++) {
|
|
11147
|
+
var filter = this.filters[index];
|
|
11067
11148
|
if (filter.filterName === filterName) {
|
|
11068
|
-
return
|
|
11149
|
+
return index;
|
|
11069
11150
|
}
|
|
11070
11151
|
}
|
|
11071
11152
|
throw new Error("filter not found: " + filterName);
|
|
@@ -11080,44 +11161,44 @@ var Pipe = function() {
|
|
|
11080
11161
|
}, {
|
|
11081
11162
|
key: "after",
|
|
11082
11163
|
value: /* @__PURE__ */ __name(function after(filterName) {
|
|
11083
|
-
var
|
|
11164
|
+
var index = this.indexOf(filterName);
|
|
11084
11165
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11085
11166
|
if (!params.length) {
|
|
11086
11167
|
throw new Error("a filter is required");
|
|
11087
11168
|
}
|
|
11088
|
-
params.unshift(
|
|
11169
|
+
params.unshift(index + 1, 0);
|
|
11089
11170
|
Array.prototype.splice.apply(this.filters, params);
|
|
11090
11171
|
return this;
|
|
11091
11172
|
}, "after")
|
|
11092
11173
|
}, {
|
|
11093
11174
|
key: "before",
|
|
11094
11175
|
value: /* @__PURE__ */ __name(function before(filterName) {
|
|
11095
|
-
var
|
|
11176
|
+
var index = this.indexOf(filterName);
|
|
11096
11177
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11097
11178
|
if (!params.length) {
|
|
11098
11179
|
throw new Error("a filter is required");
|
|
11099
11180
|
}
|
|
11100
|
-
params.unshift(
|
|
11181
|
+
params.unshift(index, 0);
|
|
11101
11182
|
Array.prototype.splice.apply(this.filters, params);
|
|
11102
11183
|
return this;
|
|
11103
11184
|
}, "before")
|
|
11104
11185
|
}, {
|
|
11105
11186
|
key: "replace",
|
|
11106
11187
|
value: /* @__PURE__ */ __name(function replace(filterName) {
|
|
11107
|
-
var
|
|
11188
|
+
var index = this.indexOf(filterName);
|
|
11108
11189
|
var params = Array.prototype.slice.call(arguments, 1);
|
|
11109
11190
|
if (!params.length) {
|
|
11110
11191
|
throw new Error("a filter is required");
|
|
11111
11192
|
}
|
|
11112
|
-
params.unshift(
|
|
11193
|
+
params.unshift(index, 1);
|
|
11113
11194
|
Array.prototype.splice.apply(this.filters, params);
|
|
11114
11195
|
return this;
|
|
11115
11196
|
}, "replace")
|
|
11116
11197
|
}, {
|
|
11117
11198
|
key: "remove",
|
|
11118
11199
|
value: /* @__PURE__ */ __name(function remove(filterName) {
|
|
11119
|
-
var
|
|
11120
|
-
this.filters.splice(
|
|
11200
|
+
var index = this.indexOf(filterName);
|
|
11201
|
+
this.filters.splice(index, 1);
|
|
11121
11202
|
return this;
|
|
11122
11203
|
}, "remove")
|
|
11123
11204
|
}, {
|
|
@@ -11170,11 +11251,11 @@ var Context = function() {
|
|
|
11170
11251
|
}, "exit")
|
|
11171
11252
|
}, {
|
|
11172
11253
|
key: "switchTo",
|
|
11173
|
-
value: /* @__PURE__ */ __name(function switchTo(
|
|
11174
|
-
if (typeof
|
|
11175
|
-
this.nextPipe =
|
|
11254
|
+
value: /* @__PURE__ */ __name(function switchTo(next, pipe) {
|
|
11255
|
+
if (typeof next === "string" || next instanceof Pipe) {
|
|
11256
|
+
this.nextPipe = next;
|
|
11176
11257
|
} else {
|
|
11177
|
-
this.next =
|
|
11258
|
+
this.next = next;
|
|
11178
11259
|
if (pipe) {
|
|
11179
11260
|
this.nextPipe = pipe;
|
|
11180
11261
|
}
|
|
@@ -11399,8 +11480,8 @@ function collectChildrenDiffFilter(context) {
|
|
|
11399
11480
|
var length = context.children.length;
|
|
11400
11481
|
var child = void 0;
|
|
11401
11482
|
var result = context.result;
|
|
11402
|
-
for (var
|
|
11403
|
-
child = context.children[
|
|
11483
|
+
for (var index = 0; index < length; index++) {
|
|
11484
|
+
child = context.children[index];
|
|
11404
11485
|
if (typeof child.result === "undefined") {
|
|
11405
11486
|
continue;
|
|
11406
11487
|
}
|
|
@@ -11476,8 +11557,8 @@ var collectChildrenPatchFilter = /* @__PURE__ */ __name(function collectChildren
|
|
|
11476
11557
|
}
|
|
11477
11558
|
var length = context.children.length;
|
|
11478
11559
|
var child = void 0;
|
|
11479
|
-
for (var
|
|
11480
|
-
child = context.children[
|
|
11560
|
+
for (var index = 0; index < length; index++) {
|
|
11561
|
+
child = context.children[index];
|
|
11481
11562
|
if (Object.prototype.hasOwnProperty.call(context.left, child.childName) && child.result === void 0) {
|
|
11482
11563
|
delete context.left[child.childName];
|
|
11483
11564
|
} else if (context.left[child.childName] !== child.result) {
|
|
@@ -11513,8 +11594,8 @@ function collectChildrenReverseFilter(context) {
|
|
|
11513
11594
|
var length = context.children.length;
|
|
11514
11595
|
var child = void 0;
|
|
11515
11596
|
var delta = {};
|
|
11516
|
-
for (var
|
|
11517
|
-
child = context.children[
|
|
11597
|
+
for (var index = 0; index < length; index++) {
|
|
11598
|
+
child = context.children[index];
|
|
11518
11599
|
if (delta[child.childName] !== child.result) {
|
|
11519
11600
|
delta[child.childName] = child.result;
|
|
11520
11601
|
}
|
|
@@ -11668,9 +11749,9 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11668
11749
|
};
|
|
11669
11750
|
var commonHead = 0;
|
|
11670
11751
|
var commonTail = 0;
|
|
11671
|
-
var
|
|
11752
|
+
var index = void 0;
|
|
11672
11753
|
var index1 = void 0;
|
|
11673
|
-
var
|
|
11754
|
+
var index2 = void 0;
|
|
11674
11755
|
var array1 = context.left;
|
|
11675
11756
|
var array2 = context.right;
|
|
11676
11757
|
var len1 = array1.length;
|
|
@@ -11680,16 +11761,16 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11680
11761
|
matchContext.matchByPosition = !arraysHaveMatchByRef(array1, array2, len1, len2);
|
|
11681
11762
|
}
|
|
11682
11763
|
while (commonHead < len1 && commonHead < len2 && matchItems(array1, array2, commonHead, commonHead, matchContext)) {
|
|
11683
|
-
|
|
11684
|
-
child = new DiffContext(context.left[
|
|
11685
|
-
context.push(child,
|
|
11764
|
+
index = commonHead;
|
|
11765
|
+
child = new DiffContext(context.left[index], context.right[index]);
|
|
11766
|
+
context.push(child, index);
|
|
11686
11767
|
commonHead++;
|
|
11687
11768
|
}
|
|
11688
11769
|
while (commonTail + commonHead < len1 && commonTail + commonHead < len2 && matchItems(array1, array2, len1 - 1 - commonTail, len2 - 1 - commonTail, matchContext)) {
|
|
11689
11770
|
index1 = len1 - 1 - commonTail;
|
|
11690
|
-
|
|
11691
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11692
|
-
context.push(child,
|
|
11771
|
+
index2 = len2 - 1 - commonTail;
|
|
11772
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11773
|
+
context.push(child, index2);
|
|
11693
11774
|
commonTail++;
|
|
11694
11775
|
}
|
|
11695
11776
|
var result = void 0;
|
|
@@ -11701,8 +11782,8 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11701
11782
|
result = result || {
|
|
11702
11783
|
_t: "a"
|
|
11703
11784
|
};
|
|
11704
|
-
for (
|
|
11705
|
-
result[
|
|
11785
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11786
|
+
result[index] = [array2[index]];
|
|
11706
11787
|
}
|
|
11707
11788
|
context.setResult(result).exit();
|
|
11708
11789
|
return;
|
|
@@ -11711,8 +11792,8 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11711
11792
|
result = result || {
|
|
11712
11793
|
_t: "a"
|
|
11713
11794
|
};
|
|
11714
|
-
for (
|
|
11715
|
-
result["_" +
|
|
11795
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11796
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11716
11797
|
}
|
|
11717
11798
|
context.setResult(result).exit();
|
|
11718
11799
|
return;
|
|
@@ -11726,10 +11807,10 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11726
11807
|
result = result || {
|
|
11727
11808
|
_t: "a"
|
|
11728
11809
|
};
|
|
11729
|
-
for (
|
|
11730
|
-
if (arrayIndexOf(seq.indices1,
|
|
11731
|
-
result["_" +
|
|
11732
|
-
removedItems.push(
|
|
11810
|
+
for (index = commonHead; index < len1 - commonTail; index++) {
|
|
11811
|
+
if (arrayIndexOf(seq.indices1, index - commonHead) < 0) {
|
|
11812
|
+
result["_" + index] = [array1[index], 0, 0];
|
|
11813
|
+
removedItems.push(index);
|
|
11733
11814
|
}
|
|
11734
11815
|
}
|
|
11735
11816
|
var detectMove = true;
|
|
@@ -11741,21 +11822,21 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11741
11822
|
includeValueOnMove = true;
|
|
11742
11823
|
}
|
|
11743
11824
|
var removedItemsLength = removedItems.length;
|
|
11744
|
-
for (
|
|
11745
|
-
var indexOnArray2 = arrayIndexOf(seq.indices2,
|
|
11825
|
+
for (index = commonHead; index < len2 - commonTail; index++) {
|
|
11826
|
+
var indexOnArray2 = arrayIndexOf(seq.indices2, index - commonHead);
|
|
11746
11827
|
if (indexOnArray2 < 0) {
|
|
11747
11828
|
var isMove = false;
|
|
11748
11829
|
if (detectMove && removedItemsLength > 0) {
|
|
11749
11830
|
for (var removeItemIndex1 = 0; removeItemIndex1 < removedItemsLength; removeItemIndex1++) {
|
|
11750
11831
|
index1 = removedItems[removeItemIndex1];
|
|
11751
|
-
if (matchItems(trimmed1, trimmed2, index1 - commonHead,
|
|
11752
|
-
result["_" + index1].splice(1, 2,
|
|
11832
|
+
if (matchItems(trimmed1, trimmed2, index1 - commonHead, index - commonHead, matchContext)) {
|
|
11833
|
+
result["_" + index1].splice(1, 2, index, ARRAY_MOVE);
|
|
11753
11834
|
if (!includeValueOnMove) {
|
|
11754
11835
|
result["_" + index1][0] = "";
|
|
11755
11836
|
}
|
|
11756
|
-
|
|
11757
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11758
|
-
context.push(child,
|
|
11837
|
+
index2 = index;
|
|
11838
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11839
|
+
context.push(child, index2);
|
|
11759
11840
|
removedItems.splice(removeItemIndex1, 1);
|
|
11760
11841
|
isMove = true;
|
|
11761
11842
|
break;
|
|
@@ -11763,13 +11844,13 @@ var diffFilter$1 = /* @__PURE__ */ __name(function arraysDiffFilter(context) {
|
|
|
11763
11844
|
}
|
|
11764
11845
|
}
|
|
11765
11846
|
if (!isMove) {
|
|
11766
|
-
result[
|
|
11847
|
+
result[index] = [array2[index]];
|
|
11767
11848
|
}
|
|
11768
11849
|
} else {
|
|
11769
11850
|
index1 = seq.indices1[indexOnArray2] + commonHead;
|
|
11770
|
-
|
|
11771
|
-
child = new DiffContext(context.left[index1], context.right[
|
|
11772
|
-
context.push(child,
|
|
11851
|
+
index2 = seq.indices2[indexOnArray2] + commonHead;
|
|
11852
|
+
child = new DiffContext(context.left[index1], context.right[index2]);
|
|
11853
|
+
context.push(child, index2);
|
|
11773
11854
|
}
|
|
11774
11855
|
}
|
|
11775
11856
|
context.setResult(result).exit();
|
|
@@ -11792,39 +11873,39 @@ var patchFilter$2 = /* @__PURE__ */ __name(function nestedPatchFilter2(context)
|
|
|
11792
11873
|
if (context.delta._t !== "a") {
|
|
11793
11874
|
return;
|
|
11794
11875
|
}
|
|
11795
|
-
var
|
|
11876
|
+
var index = void 0;
|
|
11796
11877
|
var index1 = void 0;
|
|
11797
11878
|
var delta = context.delta;
|
|
11798
11879
|
var array = context.left;
|
|
11799
11880
|
var toRemove = [];
|
|
11800
11881
|
var toInsert = [];
|
|
11801
11882
|
var toModify = [];
|
|
11802
|
-
for (
|
|
11803
|
-
if (
|
|
11804
|
-
if (
|
|
11805
|
-
if (delta[
|
|
11806
|
-
toRemove.push(parseInt(
|
|
11883
|
+
for (index in delta) {
|
|
11884
|
+
if (index !== "_t") {
|
|
11885
|
+
if (index[0] === "_") {
|
|
11886
|
+
if (delta[index][2] === 0 || delta[index][2] === ARRAY_MOVE) {
|
|
11887
|
+
toRemove.push(parseInt(index.slice(1), 10));
|
|
11807
11888
|
} else {
|
|
11808
|
-
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[
|
|
11889
|
+
throw new Error("only removal or move can be applied at original array indices," + (" invalid diff type: " + delta[index][2]));
|
|
11809
11890
|
}
|
|
11810
11891
|
} else {
|
|
11811
|
-
if (delta[
|
|
11892
|
+
if (delta[index].length === 1) {
|
|
11812
11893
|
toInsert.push({
|
|
11813
|
-
index: parseInt(
|
|
11814
|
-
value: delta[
|
|
11894
|
+
index: parseInt(index, 10),
|
|
11895
|
+
value: delta[index][0]
|
|
11815
11896
|
});
|
|
11816
11897
|
} else {
|
|
11817
11898
|
toModify.push({
|
|
11818
|
-
index: parseInt(
|
|
11819
|
-
delta: delta[
|
|
11899
|
+
index: parseInt(index, 10),
|
|
11900
|
+
delta: delta[index]
|
|
11820
11901
|
});
|
|
11821
11902
|
}
|
|
11822
11903
|
}
|
|
11823
11904
|
}
|
|
11824
11905
|
}
|
|
11825
11906
|
toRemove = toRemove.sort(compare.numerically);
|
|
11826
|
-
for (
|
|
11827
|
-
index1 = toRemove[
|
|
11907
|
+
for (index = toRemove.length - 1; index >= 0; index--) {
|
|
11908
|
+
index1 = toRemove[index];
|
|
11828
11909
|
var indexDiff = delta["_" + index1];
|
|
11829
11910
|
var removedValue = array.splice(index1, 1)[0];
|
|
11830
11911
|
if (indexDiff[2] === ARRAY_MOVE) {
|
|
@@ -11836,15 +11917,15 @@ var patchFilter$2 = /* @__PURE__ */ __name(function nestedPatchFilter2(context)
|
|
|
11836
11917
|
}
|
|
11837
11918
|
toInsert = toInsert.sort(compare.numericallyBy("index"));
|
|
11838
11919
|
var toInsertLength = toInsert.length;
|
|
11839
|
-
for (
|
|
11840
|
-
var insertion = toInsert[
|
|
11920
|
+
for (index = 0; index < toInsertLength; index++) {
|
|
11921
|
+
var insertion = toInsert[index];
|
|
11841
11922
|
array.splice(insertion.index, 0, insertion.value);
|
|
11842
11923
|
}
|
|
11843
11924
|
var toModifyLength = toModify.length;
|
|
11844
11925
|
var child = void 0;
|
|
11845
11926
|
if (toModifyLength > 0) {
|
|
11846
|
-
for (
|
|
11847
|
-
var modification = toModify[
|
|
11927
|
+
for (index = 0; index < toModifyLength; index++) {
|
|
11928
|
+
var modification = toModify[index];
|
|
11848
11929
|
child = new PatchContext(context.left[modification.index], modification.delta);
|
|
11849
11930
|
context.push(child, modification.index);
|
|
11850
11931
|
}
|
|
@@ -11865,8 +11946,8 @@ var collectChildrenPatchFilter$1 = /* @__PURE__ */ __name(function collectChildr
|
|
|
11865
11946
|
}
|
|
11866
11947
|
var length = context.children.length;
|
|
11867
11948
|
var child = void 0;
|
|
11868
|
-
for (var
|
|
11869
|
-
child = context.children[
|
|
11949
|
+
for (var index = 0; index < length; index++) {
|
|
11950
|
+
child = context.children[index];
|
|
11870
11951
|
context.left[child.childName] = child.result;
|
|
11871
11952
|
}
|
|
11872
11953
|
context.setResult(context.left).exit();
|
|
@@ -11895,20 +11976,20 @@ var reverseFilter$2 = /* @__PURE__ */ __name(function arraysReverseFilter(contex
|
|
|
11895
11976
|
context.exit();
|
|
11896
11977
|
}, "arraysReverseFilter");
|
|
11897
11978
|
reverseFilter$2.filterName = "arrays";
|
|
11898
|
-
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta,
|
|
11899
|
-
if (typeof
|
|
11900
|
-
return parseInt(
|
|
11979
|
+
var reverseArrayDeltaIndex = /* @__PURE__ */ __name(function reverseArrayDeltaIndex2(delta, index, itemDelta) {
|
|
11980
|
+
if (typeof index === "string" && index[0] === "_") {
|
|
11981
|
+
return parseInt(index.substr(1), 10);
|
|
11901
11982
|
} else if (isArray$2(itemDelta) && itemDelta[2] === 0) {
|
|
11902
|
-
return "_" +
|
|
11983
|
+
return "_" + index;
|
|
11903
11984
|
}
|
|
11904
|
-
var reverseIndex = +
|
|
11985
|
+
var reverseIndex = +index;
|
|
11905
11986
|
for (var deltaIndex in delta) {
|
|
11906
11987
|
var deltaItem = delta[deltaIndex];
|
|
11907
11988
|
if (isArray$2(deltaItem)) {
|
|
11908
11989
|
if (deltaItem[2] === ARRAY_MOVE) {
|
|
11909
11990
|
var moveFromIndex = parseInt(deltaIndex.substr(1), 10);
|
|
11910
11991
|
var moveToIndex = deltaItem[1];
|
|
11911
|
-
if (moveToIndex === +
|
|
11992
|
+
if (moveToIndex === +index) {
|
|
11912
11993
|
return moveFromIndex;
|
|
11913
11994
|
}
|
|
11914
11995
|
if (moveFromIndex <= reverseIndex && moveToIndex > reverseIndex) {
|
|
@@ -11940,8 +12021,8 @@ function collectChildrenReverseFilter$1(context) {
|
|
|
11940
12021
|
var delta = {
|
|
11941
12022
|
_t: "a"
|
|
11942
12023
|
};
|
|
11943
|
-
for (var
|
|
11944
|
-
child = context.children[
|
|
12024
|
+
for (var index = 0; index < length; index++) {
|
|
12025
|
+
child = context.children[index];
|
|
11945
12026
|
var name = child.newName;
|
|
11946
12027
|
if (typeof name === "undefined") {
|
|
11947
12028
|
name = reverseArrayDeltaIndex(context.delta, child.childName, child.result);
|
|
@@ -12165,7 +12246,7 @@ var BaseFormatter = function() {
|
|
|
12165
12246
|
__name(BaseFormatter2, "BaseFormatter");
|
|
12166
12247
|
createClass(BaseFormatter2, [{
|
|
12167
12248
|
key: "format",
|
|
12168
|
-
value: /* @__PURE__ */ __name(function
|
|
12249
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12169
12250
|
var context = {};
|
|
12170
12251
|
this.prepareContext(context);
|
|
12171
12252
|
this.recurse(context, delta, left);
|
|
@@ -12193,9 +12274,9 @@ var BaseFormatter = function() {
|
|
|
12193
12274
|
}, {
|
|
12194
12275
|
key: "finalize",
|
|
12195
12276
|
value: /* @__PURE__ */ __name(function finalize(_ref) {
|
|
12196
|
-
var
|
|
12197
|
-
if (isArray$3(
|
|
12198
|
-
return
|
|
12277
|
+
var buffer = _ref.buffer;
|
|
12278
|
+
if (isArray$3(buffer)) {
|
|
12279
|
+
return buffer.join("");
|
|
12199
12280
|
}
|
|
12200
12281
|
}, "finalize")
|
|
12201
12282
|
}, {
|
|
@@ -12274,13 +12355,13 @@ var BaseFormatter = function() {
|
|
|
12274
12355
|
} else {
|
|
12275
12356
|
keys.sort();
|
|
12276
12357
|
}
|
|
12277
|
-
for (var
|
|
12278
|
-
var key = keys[
|
|
12358
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
12359
|
+
var key = keys[index];
|
|
12279
12360
|
if (arrayKeys && key === "_t") {
|
|
12280
12361
|
continue;
|
|
12281
12362
|
}
|
|
12282
12363
|
var leftKey = arrayKeys ? typeof key === "number" ? key : parseInt(trimUnderscore(key), 10) : key;
|
|
12283
|
-
var isLast =
|
|
12364
|
+
var isLast = index === length - 1;
|
|
12284
12365
|
fn(key, leftKey, moveDestinations[leftKey], isLast);
|
|
12285
12366
|
}
|
|
12286
12367
|
}, "forEachDeltaKey")
|
|
@@ -12822,7 +12903,7 @@ var OPERATIONS = {
|
|
|
12822
12903
|
}, "format_textdiff")
|
|
12823
12904
|
}, {
|
|
12824
12905
|
key: "format",
|
|
12825
|
-
value: /* @__PURE__ */ __name(function
|
|
12906
|
+
value: /* @__PURE__ */ __name(function format2(delta, left) {
|
|
12826
12907
|
var context = {};
|
|
12827
12908
|
this.prepareContext(context);
|
|
12828
12909
|
this.recurse(context, delta, left);
|
|
@@ -13409,7 +13490,7 @@ function getAminoAcidFromSequenceTriplet(sequenceString) {
|
|
|
13409
13490
|
if (sequenceString.length !== 3) {
|
|
13410
13491
|
throw new Error("must pass a string of length 3");
|
|
13411
13492
|
}
|
|
13412
|
-
|
|
13493
|
+
const aa = threeLetterSequenceStringToAminoAcidMap[sequenceString];
|
|
13413
13494
|
if (aa) {
|
|
13414
13495
|
return aa;
|
|
13415
13496
|
}
|
|
@@ -13421,7 +13502,7 @@ function getAminoAcidFromSequenceTriplet(sequenceString) {
|
|
|
13421
13502
|
}
|
|
13422
13503
|
__name(getAminoAcidFromSequenceTriplet, "getAminoAcidFromSequenceTriplet");
|
|
13423
13504
|
function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optionalSubrangeRange, isProteinSequence) {
|
|
13424
|
-
|
|
13505
|
+
const originalSequenceStringLength = isProteinSequence ? originalSequenceString.length * 3 : originalSequenceString.length;
|
|
13425
13506
|
let sequenceString = originalSequenceString;
|
|
13426
13507
|
let startOffset = 0;
|
|
13427
13508
|
if (optionalSubrangeRange) {
|
|
@@ -13431,8 +13512,8 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13431
13512
|
);
|
|
13432
13513
|
startOffset = optionalSubrangeRange.start;
|
|
13433
13514
|
}
|
|
13434
|
-
|
|
13435
|
-
|
|
13515
|
+
const sequenceStringLength = isProteinSequence ? sequenceString.length * 3 : sequenceString.length;
|
|
13516
|
+
const aminoAcidDataForEachBaseOfDNA = [];
|
|
13436
13517
|
let codonRange;
|
|
13437
13518
|
let revCompGapLength = 0;
|
|
13438
13519
|
let aminoAcidIndex = 0;
|
|
@@ -13462,12 +13543,12 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13462
13543
|
aminoAcidIndex--;
|
|
13463
13544
|
}
|
|
13464
13545
|
}
|
|
13465
|
-
for (let
|
|
13546
|
+
for (let index = 2 + revCompGapLength; index < sequenceStringLength; index += 3) {
|
|
13466
13547
|
let aminoAcid;
|
|
13467
13548
|
if (isProteinSequence) {
|
|
13468
|
-
aminoAcid = proteinAlphabet[sequenceString[(
|
|
13549
|
+
aminoAcid = proteinAlphabet[sequenceString[(index - 2) / 3].toUpperCase()];
|
|
13469
13550
|
} else {
|
|
13470
|
-
let triplet = sequenceString.slice(
|
|
13551
|
+
let triplet = sequenceString.slice(index - 2, index + 1);
|
|
13471
13552
|
if (!forward) {
|
|
13472
13553
|
triplet = getReverseComplementSequenceString(triplet);
|
|
13473
13554
|
}
|
|
@@ -13475,8 +13556,8 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13475
13556
|
}
|
|
13476
13557
|
codonRange = translateRange(
|
|
13477
13558
|
{
|
|
13478
|
-
start:
|
|
13479
|
-
end:
|
|
13559
|
+
start: index - 2,
|
|
13560
|
+
end: index
|
|
13480
13561
|
},
|
|
13481
13562
|
startOffset,
|
|
13482
13563
|
originalSequenceStringLength
|
|
@@ -13514,7 +13595,7 @@ function getAminoAcidDataForEachBaseOfDna(originalSequenceString, forward, optio
|
|
|
13514
13595
|
aminoAcidIndex--;
|
|
13515
13596
|
}
|
|
13516
13597
|
}
|
|
13517
|
-
|
|
13598
|
+
const lengthOfEndBpsNotCoveredByAminoAcids = sequenceStringLength - aminoAcidDataForEachBaseOfDNA.length;
|
|
13518
13599
|
codonRange = translateRange(
|
|
13519
13600
|
{
|
|
13520
13601
|
start: sequenceStringLength - lengthOfEndBpsNotCoveredByAminoAcids,
|
|
@@ -13604,10 +13685,10 @@ function tidyUpAnnotation(_annotation, {
|
|
|
13604
13685
|
annotation.name = "Untitled annotation";
|
|
13605
13686
|
}
|
|
13606
13687
|
if (provideNewIdsForAnnotations) {
|
|
13607
|
-
annotation.id =
|
|
13688
|
+
annotation.id = shortid$1();
|
|
13608
13689
|
}
|
|
13609
13690
|
if (!annotation.id && annotation.id !== 0 && !doNotProvideIdsForAnnotations) {
|
|
13610
|
-
annotation.id =
|
|
13691
|
+
annotation.id = shortid$1();
|
|
13611
13692
|
messages.push(
|
|
13612
13693
|
"Unable to detect valid ID for annotation, setting ID to " + annotation.id
|
|
13613
13694
|
);
|
|
@@ -13836,7 +13917,7 @@ function tidyUpSequenceData(pSeqData, options = {}) {
|
|
|
13836
13917
|
if (item.id || item.id === 0) {
|
|
13837
13918
|
itemId = item.id;
|
|
13838
13919
|
} else {
|
|
13839
|
-
itemId =
|
|
13920
|
+
itemId = shortid$1();
|
|
13840
13921
|
if (!doNotProvideIdsForAnnotations) {
|
|
13841
13922
|
item.id = itemId;
|
|
13842
13923
|
}
|
|
@@ -13899,7 +13980,7 @@ const reverseSeqDiff = /* @__PURE__ */ __name((diff2) => {
|
|
|
13899
13980
|
return reverse(diff2);
|
|
13900
13981
|
}, "reverseSeqDiff");
|
|
13901
13982
|
function getAllInsertionsInSeqReads(seqReads) {
|
|
13902
|
-
|
|
13983
|
+
const allInsertionsInSeqReads = [];
|
|
13903
13984
|
seqReads.forEach((seqRead) => {
|
|
13904
13985
|
const splitSeqRead = seqRead.cigar.match(/([0-9]*[MDI])/g);
|
|
13905
13986
|
for (let componentI = 0; componentI < splitSeqRead.length; componentI++) {
|
|
@@ -13916,7 +13997,7 @@ function getAllInsertionsInSeqReads(seqReads) {
|
|
|
13916
13997
|
bpPosOfInsertion += previousComponentNumber;
|
|
13917
13998
|
}
|
|
13918
13999
|
}
|
|
13919
|
-
|
|
14000
|
+
const insertionInfo = {
|
|
13920
14001
|
// keeping bpPos 1-based
|
|
13921
14002
|
bpPos: bpPosOfInsertion,
|
|
13922
14003
|
number: numberOfInsertions
|
|
@@ -13925,7 +14006,7 @@ function getAllInsertionsInSeqReads(seqReads) {
|
|
|
13925
14006
|
}
|
|
13926
14007
|
}
|
|
13927
14008
|
});
|
|
13928
|
-
|
|
14009
|
+
const sortedInsertions = allInsertionsInSeqReads.sort((a, b) => {
|
|
13929
14010
|
return a.bpPos - b.bpPos;
|
|
13930
14011
|
});
|
|
13931
14012
|
for (let i = 0; i < sortedInsertions.length - 1; i++) {
|
|
@@ -14019,16 +14100,16 @@ function getVirtualDigest({
|
|
|
14019
14100
|
const sortedCutsites = cutsites.sort((a, b) => {
|
|
14020
14101
|
return a.topSnipPosition - b.topSnipPosition;
|
|
14021
14102
|
});
|
|
14022
|
-
sortedCutsites.forEach((cutsite1,
|
|
14103
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
14023
14104
|
if (computePartialDigest && !computePartialDigestDisabled) {
|
|
14024
|
-
sortedCutsites.forEach((cs,
|
|
14025
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
14105
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
14106
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
14026
14107
|
});
|
|
14027
14108
|
}
|
|
14028
14109
|
if (!computeDigestDisabled) {
|
|
14029
14110
|
pairs.push([
|
|
14030
14111
|
cutsite1,
|
|
14031
|
-
sortedCutsites[
|
|
14112
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
14032
14113
|
]);
|
|
14033
14114
|
}
|
|
14034
14115
|
});
|
|
@@ -14117,7 +14198,7 @@ function isEnzymeType2S(e) {
|
|
|
14117
14198
|
}
|
|
14118
14199
|
__name(isEnzymeType2S, "isEnzymeType2S");
|
|
14119
14200
|
function insertGapsIntoRefSeq(refSeq, seqReads) {
|
|
14120
|
-
|
|
14201
|
+
const refSeqWithGaps = refSeq.split("");
|
|
14121
14202
|
const allInsertionsInSeqReads = getAllInsertionsInSeqReads(seqReads);
|
|
14122
14203
|
for (let i = 0; i < allInsertionsInSeqReads.length; i++) {
|
|
14123
14204
|
const bpPosOfInsertion = allInsertionsInSeqReads[i].bpPos;
|
|
@@ -14134,8 +14215,8 @@ function insertGapsIntoRefSeq(refSeq, seqReads) {
|
|
|
14134
14215
|
return refSeqWithGaps.join("");
|
|
14135
14216
|
}
|
|
14136
14217
|
__name(insertGapsIntoRefSeq, "insertGapsIntoRefSeq");
|
|
14137
|
-
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str,
|
|
14138
|
-
return str.slice(0,
|
|
14218
|
+
var spliceString = /* @__PURE__ */ __name(function spliceSlice(str, index, count, add) {
|
|
14219
|
+
return str.slice(0, index) + (add || "") + str.slice(index + count);
|
|
14139
14220
|
}, "spliceSlice");
|
|
14140
14221
|
const spliceString$1 = /* @__PURE__ */ getDefaultExportFromCjs(spliceString);
|
|
14141
14222
|
function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOrRange) {
|
|
@@ -14148,7 +14229,7 @@ function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOr
|
|
|
14148
14229
|
invertRange(caretPositionOrRange, bpString.length)
|
|
14149
14230
|
);
|
|
14150
14231
|
stringToReturn = "";
|
|
14151
|
-
ranges.forEach((range,
|
|
14232
|
+
ranges.forEach((range, index) => {
|
|
14152
14233
|
stringToReturn += getSequenceWithinRange(range, bpString);
|
|
14153
14234
|
if (ranges.length === 1) {
|
|
14154
14235
|
if (isPositionWithinRange(0, range, bpString.length, true, true)) {
|
|
@@ -14157,7 +14238,7 @@ function adjustBpsToReplaceOrInsert(bpString, insertString = "", caretPositionOr
|
|
|
14157
14238
|
stringToReturn = insertString + stringToReturn;
|
|
14158
14239
|
}
|
|
14159
14240
|
} else {
|
|
14160
|
-
if (
|
|
14241
|
+
if (index === 0)
|
|
14161
14242
|
stringToReturn += insertString;
|
|
14162
14243
|
}
|
|
14163
14244
|
});
|
|
@@ -14506,7 +14587,7 @@ function insertSequenceDataAtPositionOrRange(_sequenceDataToInsert, _existingSeq
|
|
|
14506
14587
|
_sequenceDataToInsert,
|
|
14507
14588
|
options
|
|
14508
14589
|
);
|
|
14509
|
-
|
|
14590
|
+
const newSequenceData = lodashExports.cloneDeep(existingSequenceData);
|
|
14510
14591
|
const insertLength = sequenceDataToInsert.proteinSequence ? sequenceDataToInsert.proteinSequence.length * 3 : sequenceDataToInsert.sequence.length;
|
|
14511
14592
|
let caretPosition = caretPositionOrRange;
|
|
14512
14593
|
const isInsertSameLengthAsSelection = sequenceDataToInsert.sequence.length === getRangeLength(caretPositionOrRange, existingSequenceData.sequence.length);
|
|
@@ -14648,9 +14729,9 @@ function insertIntoChromatogram({
|
|
|
14648
14729
|
if (justBaseCalls) {
|
|
14649
14730
|
return chromatogramData;
|
|
14650
14731
|
}
|
|
14651
|
-
|
|
14652
|
-
|
|
14653
|
-
for (let
|
|
14732
|
+
const baseTracesToInsert = [];
|
|
14733
|
+
const qualNumsToInsert = [];
|
|
14734
|
+
for (let index = 0; index < seqToInsert.length; index++) {
|
|
14654
14735
|
qualNumsToInsert.push(0);
|
|
14655
14736
|
const toPush = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
|
|
14656
14737
|
baseTracesToInsert.push({
|
|
@@ -22328,7 +22409,7 @@ function generateAnnotation(start, end, maxLength) {
|
|
|
22328
22409
|
return __spreadProps(__spreadValues({}, range), {
|
|
22329
22410
|
name: getRandomInt(0, 1e5).toString(),
|
|
22330
22411
|
type: "misc_feature",
|
|
22331
|
-
id:
|
|
22412
|
+
id: shortid$1(),
|
|
22332
22413
|
forward: Math.random() > 0.5,
|
|
22333
22414
|
notes: {}
|
|
22334
22415
|
});
|
|
@@ -22394,7 +22475,7 @@ function findNearestRangeOfSequenceOverlapToPosition(sequenceToSearch, overlapSe
|
|
|
22394
22475
|
}
|
|
22395
22476
|
const regex = new RegExp(overlapSequence, "ig");
|
|
22396
22477
|
let result;
|
|
22397
|
-
let
|
|
22478
|
+
let index;
|
|
22398
22479
|
let distance = Infinity;
|
|
22399
22480
|
while (result = regex.exec(sequenceToSearch + (isLinear ? "" : sequenceToSearch))) {
|
|
22400
22481
|
if (result.index > sequenceToSearch.length)
|
|
@@ -22404,13 +22485,13 @@ function findNearestRangeOfSequenceOverlapToPosition(sequenceToSearch, overlapSe
|
|
|
22404
22485
|
if (newDistance > distance) {
|
|
22405
22486
|
break;
|
|
22406
22487
|
}
|
|
22407
|
-
|
|
22488
|
+
index = result.index;
|
|
22408
22489
|
distance = newDistance;
|
|
22409
22490
|
}
|
|
22410
22491
|
return normalizeRange(
|
|
22411
22492
|
{
|
|
22412
|
-
start:
|
|
22413
|
-
end:
|
|
22493
|
+
start: index,
|
|
22494
|
+
end: index + overlapSequence.length - 1
|
|
22414
22495
|
},
|
|
22415
22496
|
sequenceToSearch.length
|
|
22416
22497
|
);
|
|
@@ -22453,13 +22534,13 @@ function getOrfsFromSequence(options) {
|
|
|
22453
22534
|
forward,
|
|
22454
22535
|
annotationTypePlural: "orfs",
|
|
22455
22536
|
isOrf: true,
|
|
22456
|
-
id:
|
|
22537
|
+
id: shortid$1()
|
|
22457
22538
|
});
|
|
22458
22539
|
}
|
|
22459
22540
|
}
|
|
22460
22541
|
}
|
|
22461
22542
|
const orfEnds = {};
|
|
22462
|
-
orfRanges.forEach((orf,
|
|
22543
|
+
orfRanges.forEach((orf, index) => {
|
|
22463
22544
|
const indexOfAlreadyExistingOrf = orfEnds[orf.end];
|
|
22464
22545
|
if (typeof indexOfAlreadyExistingOrf !== "undefined") {
|
|
22465
22546
|
let internalOrf = orf;
|
|
@@ -22467,7 +22548,7 @@ function getOrfsFromSequence(options) {
|
|
|
22467
22548
|
if (containingOrf.length < internalOrf.length) {
|
|
22468
22549
|
internalOrf = orfRanges[indexOfAlreadyExistingOrf];
|
|
22469
22550
|
containingOrf = orf;
|
|
22470
|
-
orfEnds[orf.end] =
|
|
22551
|
+
orfEnds[orf.end] = index;
|
|
22471
22552
|
}
|
|
22472
22553
|
const internalStartCodonIndex = forward ? internalOrf.start : originalSequenceLength - internalOrf.start - 1;
|
|
22473
22554
|
containingOrf.internalStartCodonIndices = [
|
|
@@ -22477,7 +22558,7 @@ function getOrfsFromSequence(options) {
|
|
|
22477
22558
|
];
|
|
22478
22559
|
internalOrf.remove = true;
|
|
22479
22560
|
} else {
|
|
22480
|
-
orfEnds[orf.end] =
|
|
22561
|
+
orfEnds[orf.end] = index;
|
|
22481
22562
|
if (!forward) {
|
|
22482
22563
|
const endHolder = orf.end;
|
|
22483
22564
|
orf.end = originalSequenceLength - orf.start - 1;
|
|
@@ -22512,14 +22593,13 @@ function findOrfsInPlasmid(sequence, circular, minimumOrfSize, useAdditionalOrfS
|
|
|
22512
22593
|
return forwardOrfs.concat(reverseOrfs);
|
|
22513
22594
|
}
|
|
22514
22595
|
__name(findOrfsInPlasmid, "findOrfsInPlasmid");
|
|
22515
|
-
|
|
22516
|
-
|
|
22517
|
-
if (typeof str !== "string") {
|
|
22596
|
+
function escapeStringRegexp(string) {
|
|
22597
|
+
if (typeof string !== "string") {
|
|
22518
22598
|
throw new TypeError("Expected a string");
|
|
22519
22599
|
}
|
|
22520
|
-
return
|
|
22521
|
-
}
|
|
22522
|
-
|
|
22600
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
22601
|
+
}
|
|
22602
|
+
__name(escapeStringRegexp, "escapeStringRegexp");
|
|
22523
22603
|
function getAminoAcidStringFromSequenceString(sequenceString) {
|
|
22524
22604
|
const aminoAcidsPerBase = getAminoAcidDataForEachBaseOfDna(
|
|
22525
22605
|
sequenceString,
|
|
@@ -22542,8 +22622,7 @@ function findSequenceMatches(sequence, searchString, options = {}) {
|
|
|
22542
22622
|
const { searchReverseStrand } = options;
|
|
22543
22623
|
if (searchReverseStrand) {
|
|
22544
22624
|
const sequenceLength = sequence.length;
|
|
22545
|
-
|
|
22546
|
-
reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22625
|
+
const reverseSeq = getReverseComplementSequenceString(sequence);
|
|
22547
22626
|
const reverseMatches = findSequenceMatchesTopStrand(
|
|
22548
22627
|
reverseSeq,
|
|
22549
22628
|
searchString,
|
|
@@ -22570,7 +22649,7 @@ function findSequenceMatchesTopStrand(sequence, searchString, options = {}) {
|
|
|
22570
22649
|
isProteinSequence,
|
|
22571
22650
|
isProteinSearch
|
|
22572
22651
|
} = options;
|
|
22573
|
-
let searchStringToUse = escapeStringRegexp
|
|
22652
|
+
let searchStringToUse = escapeStringRegexp(searchString);
|
|
22574
22653
|
if (isAmbiguous) {
|
|
22575
22654
|
if (isProteinSearch || isProteinSequence) {
|
|
22576
22655
|
searchStringToUse = convertAmbiguousStringToRegex(
|
|
@@ -22608,7 +22687,7 @@ function findSequenceMatchesTopStrand(sequence, searchString, options = {}) {
|
|
|
22608
22687
|
}
|
|
22609
22688
|
];
|
|
22610
22689
|
}
|
|
22611
|
-
|
|
22690
|
+
const ranges = [];
|
|
22612
22691
|
sequencesToCheck.forEach(({ seqToCheck, offset }) => {
|
|
22613
22692
|
const reg = new RegExp(searchStringToUse, "ig");
|
|
22614
22693
|
let match;
|
|
@@ -22853,7 +22932,7 @@ function getInsertBetweenVals(caretPosition, selectionLayer, sequenceLength) {
|
|
|
22853
22932
|
}
|
|
22854
22933
|
__name(getInsertBetweenVals, "getInsertBetweenVals");
|
|
22855
22934
|
function getLeftAndRightOfSequenceInRangeGivenPosition(range, position, sequence) {
|
|
22856
|
-
|
|
22935
|
+
const result = {
|
|
22857
22936
|
leftHandSide: "",
|
|
22858
22937
|
rightHandSide: ""
|
|
22859
22938
|
};
|
|
@@ -22879,15 +22958,15 @@ function getLeftAndRightOfSequenceInRangeGivenPosition(range, position, sequence
|
|
|
22879
22958
|
return result;
|
|
22880
22959
|
}
|
|
22881
22960
|
__name(getLeftAndRightOfSequenceInRangeGivenPosition, "getLeftAndRightOfSequenceInRangeGivenPosition");
|
|
22882
|
-
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn
|
|
22961
|
+
function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn) {
|
|
22883
22962
|
sequenceToSearchIn = sequenceToSearchIn.toLowerCase();
|
|
22884
22963
|
sequenceToFind = sequenceToFind.toLowerCase();
|
|
22885
22964
|
const lengthenedSeqToSearch = sequenceToSearchIn + sequenceToSearchIn;
|
|
22886
|
-
const
|
|
22887
|
-
if (
|
|
22965
|
+
const index = lengthenedSeqToSearch.indexOf(sequenceToFind);
|
|
22966
|
+
if (index > -1) {
|
|
22888
22967
|
return {
|
|
22889
|
-
start:
|
|
22890
|
-
end: modulatePositionByRange(
|
|
22968
|
+
start: index,
|
|
22969
|
+
end: modulatePositionByRange(index + sequenceToFind.length - 1, {
|
|
22891
22970
|
start: 0,
|
|
22892
22971
|
end: sequenceToSearchIn.length - 1
|
|
22893
22972
|
})
|
|
@@ -22899,15 +22978,15 @@ function getOverlapBetweenTwoSequences(sequenceToFind, sequenceToSearchIn, optio
|
|
|
22899
22978
|
__name(getOverlapBetweenTwoSequences, "getOverlapBetweenTwoSequences");
|
|
22900
22979
|
function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
22901
22980
|
restrictionEnzymes = restrictionEnzymes.length ? restrictionEnzymes : [restrictionEnzymes];
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
22981
|
+
const bps = seqData.sequence;
|
|
22982
|
+
const seqLen = bps.length;
|
|
22983
|
+
const circular = seqData.circular;
|
|
22905
22984
|
let cutsites = [];
|
|
22906
22985
|
restrictionEnzymes.forEach((enzyme) => {
|
|
22907
|
-
|
|
22986
|
+
const newCutsites = cutSequenceByRestrictionEnzyme(bps, circular, enzyme);
|
|
22908
22987
|
cutsites = cutsites.concat(newCutsites);
|
|
22909
22988
|
});
|
|
22910
|
-
|
|
22989
|
+
const parts = [];
|
|
22911
22990
|
if (cutsites.length < 1) {
|
|
22912
22991
|
return parts;
|
|
22913
22992
|
} else if (cutsites.length === 1) {
|
|
@@ -22920,16 +22999,16 @@ function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
|
22920
22999
|
);
|
|
22921
23000
|
return parts;
|
|
22922
23001
|
} else {
|
|
22923
|
-
|
|
23002
|
+
const pairs = pairwise(cutsites);
|
|
22924
23003
|
pairs.forEach((pair) => {
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
23004
|
+
const cut1 = pair[0];
|
|
23005
|
+
const cut2 = pair[1];
|
|
23006
|
+
const part1 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22928
23007
|
cut1,
|
|
22929
23008
|
cut2,
|
|
22930
23009
|
seqLen
|
|
22931
23010
|
);
|
|
22932
|
-
|
|
23011
|
+
const part2 = getPartBetweenEnzymesWithInclusiveOverhangs(
|
|
22933
23012
|
cut2,
|
|
22934
23013
|
cut1,
|
|
22935
23014
|
seqLen
|
|
@@ -22946,10 +23025,10 @@ function getPossiblePartsFromSequenceAndEnzyme(seqData, restrictionEnzymes) {
|
|
|
22946
23025
|
}
|
|
22947
23026
|
__name(getPossiblePartsFromSequenceAndEnzyme, "getPossiblePartsFromSequenceAndEnzyme");
|
|
22948
23027
|
function getPartBetweenEnzymesWithInclusiveOverhangs(cut1, cut2, seqLen) {
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22952
|
-
|
|
23028
|
+
const firstCutOffset = getEnzymeRelativeOffset(cut1.restrictionEnzyme);
|
|
23029
|
+
const secondCutOffset = getEnzymeRelativeOffset(cut2.restrictionEnzyme);
|
|
23030
|
+
const start = cut1.topSnipBeforeBottom ? cut1.topSnipPosition : cut1.bottomSnipPosition;
|
|
23031
|
+
const end = normalizePositionByRangeLength(
|
|
22953
23032
|
(cut2.topSnipBeforeBottom ? cut2.bottomSnipPosition : cut2.topSnipPosition) - 1,
|
|
22954
23033
|
seqLen
|
|
22955
23034
|
);
|
|
@@ -22981,7 +23060,7 @@ function pairwise(list) {
|
|
|
22981
23060
|
if (list.length < 2) {
|
|
22982
23061
|
return [];
|
|
22983
23062
|
}
|
|
22984
|
-
|
|
23063
|
+
const first = list[0], rest = list.slice(1), pairs = rest.map((x) => {
|
|
22985
23064
|
return [first, x];
|
|
22986
23065
|
});
|
|
22987
23066
|
return pairs.concat(pairwise(rest));
|
|
@@ -23065,8 +23144,8 @@ function guessIfSequenceIsDnaAndNotProtein(seq, options = {}) {
|
|
|
23065
23144
|
let count = 0;
|
|
23066
23145
|
if (!seq || !seq.length)
|
|
23067
23146
|
return true;
|
|
23068
|
-
for (let
|
|
23069
|
-
const letter = seq[
|
|
23147
|
+
for (let index = 0; index < seq.length; index++) {
|
|
23148
|
+
const letter = seq[index];
|
|
23070
23149
|
if (dnaLetterMap[letter.toUpperCase()]) {
|
|
23071
23150
|
count = count + 1;
|
|
23072
23151
|
}
|
|
@@ -23137,7 +23216,6 @@ function mapAnnotationsToRows(annotations, sequenceLength, bpsPerRow, { splitFor
|
|
|
23137
23216
|
}
|
|
23138
23217
|
__name(mapAnnotationsToRows, "mapAnnotationsToRows");
|
|
23139
23218
|
function mapAnnotationToRows({
|
|
23140
|
-
wrappedAnnotations,
|
|
23141
23219
|
annotation,
|
|
23142
23220
|
sequenceLength,
|
|
23143
23221
|
bpsPerRow,
|
|
@@ -23151,7 +23229,7 @@ function mapAnnotationToRows({
|
|
|
23151
23229
|
location || annotation,
|
|
23152
23230
|
sequenceLength
|
|
23153
23231
|
);
|
|
23154
|
-
ranges.forEach((range,
|
|
23232
|
+
ranges.forEach((range, index) => {
|
|
23155
23233
|
const startingRow = Math.floor(range.start / bpsPerRow);
|
|
23156
23234
|
const endingRow = Math.floor(range.end / bpsPerRow);
|
|
23157
23235
|
for (let rowNumber = startingRow; rowNumber <= endingRow; rowNumber++) {
|
|
@@ -23181,7 +23259,7 @@ function mapAnnotationToRows({
|
|
|
23181
23259
|
}
|
|
23182
23260
|
});
|
|
23183
23261
|
} else {
|
|
23184
|
-
if (
|
|
23262
|
+
if (index > 0 && //second half of an annotation range
|
|
23185
23263
|
annotationsForRow.length && //there are already annotations within the row
|
|
23186
23264
|
annotationsForRow[annotationsForRow.length - 1].annotation === annotation) {
|
|
23187
23265
|
yOffset = annotationsForRow[annotationsForRow.length - 1].yOffset;
|
|
@@ -23257,7 +23335,7 @@ function prepareRowData(sequenceData, bpsPerRow) {
|
|
|
23257
23335
|
}
|
|
23258
23336
|
__name(prepareRowData, "prepareRowData");
|
|
23259
23337
|
function condensePairwiseAlignmentDifferences(referenceSeq, alignedSeq) {
|
|
23260
|
-
|
|
23338
|
+
const overviewMinimapTrack = [];
|
|
23261
23339
|
const referenceSeqSplit = referenceSeq.toLowerCase().split("");
|
|
23262
23340
|
const alignedSeqSplit = alignedSeq.toLowerCase().split("");
|
|
23263
23341
|
const seqLength = alignedSeq.length;
|
|
@@ -23437,7 +23515,7 @@ function addGapsToSeqReads(refSeq, seqReads) {
|
|
|
23437
23515
|
return a.bpPos - b.bpPos;
|
|
23438
23516
|
});
|
|
23439
23517
|
otherInsertions = otherInsertions.filter(
|
|
23440
|
-
(object,
|
|
23518
|
+
(object, index) => index === otherInsertions.findIndex(
|
|
23441
23519
|
(obj) => JSON.stringify(obj) === JSON.stringify(object)
|
|
23442
23520
|
)
|
|
23443
23521
|
);
|
|
@@ -23756,21 +23834,21 @@ function getDigestFragmentsForCutsites(sequenceLength, circular, cutsites, opts
|
|
|
23756
23834
|
}
|
|
23757
23835
|
];
|
|
23758
23836
|
}
|
|
23759
|
-
sortedCutsites.forEach((cutsite1,
|
|
23760
|
-
if (!circular && !sortedCutsites[
|
|
23837
|
+
sortedCutsites.forEach((cutsite1, index) => {
|
|
23838
|
+
if (!circular && !sortedCutsites[index + 1]) {
|
|
23761
23839
|
return;
|
|
23762
23840
|
}
|
|
23763
23841
|
if (opts.computePartialDigests) {
|
|
23764
|
-
sortedCutsites.forEach((cs,
|
|
23765
|
-
if (
|
|
23842
|
+
sortedCutsites.forEach((cs, index2) => {
|
|
23843
|
+
if (index2 === index + 1 || index2 === 0) {
|
|
23766
23844
|
return;
|
|
23767
23845
|
}
|
|
23768
|
-
pairs.push([cutsite1, sortedCutsites[
|
|
23846
|
+
pairs.push([cutsite1, sortedCutsites[index2]]);
|
|
23769
23847
|
});
|
|
23770
23848
|
}
|
|
23771
23849
|
pairs.push([
|
|
23772
23850
|
cutsite1,
|
|
23773
|
-
sortedCutsites[
|
|
23851
|
+
sortedCutsites[index + 1] ? sortedCutsites[index + 1] : sortedCutsites[0]
|
|
23774
23852
|
]);
|
|
23775
23853
|
});
|
|
23776
23854
|
pairs.forEach(([cut1, cut2]) => {
|