immutable 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/immutable.d.ts +209 -11
- package/dist/immutable.es.js +22 -2
- package/dist/immutable.js +22 -2
- package/dist/immutable.min.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -637,6 +637,46 @@ Range(1, Infinity)
|
|
|
637
637
|
// 1006008
|
|
638
638
|
```
|
|
639
639
|
|
|
640
|
+
## Comparison of filter(), groupBy(), and partition()
|
|
641
|
+
|
|
642
|
+
The `filter()`, `groupBy()`, and `partition()` methods are similar in that they
|
|
643
|
+
all divide a collection into parts based on applying a function to each element.
|
|
644
|
+
All three call the predicate or grouping function once for each item in the
|
|
645
|
+
input collection. All three return zero or more collections of the same type as
|
|
646
|
+
their input. The returned collections are always distinct from the input
|
|
647
|
+
(according to `===`), even if the contents are identical.
|
|
648
|
+
|
|
649
|
+
Of these methods, `filter()` is the only one that is lazy and the only one which
|
|
650
|
+
discards items from the input collection. It is the simplest to use, and the
|
|
651
|
+
fact that it returns exactly one collection makes it easy to combine with other
|
|
652
|
+
methods to form a pipeline of operations.
|
|
653
|
+
|
|
654
|
+
The `partition()` method is similar to an eager version of `filter()`, but it
|
|
655
|
+
returns two collections; the first contains the items that would have been
|
|
656
|
+
discarded by `filter()`, and the second contains the items that would have been
|
|
657
|
+
kept. It always returns an array of exactly two collections, which can make it
|
|
658
|
+
easier to use than `groupBy()`. Compared to making two separate calls to
|
|
659
|
+
`filter()`, `partition()` makes half as many calls it the predicate passed to
|
|
660
|
+
it.
|
|
661
|
+
|
|
662
|
+
The `groupBy()` method is a more generalized version of `partition()` that can
|
|
663
|
+
group by an arbitrary function rather than just a predicate. It returns a map
|
|
664
|
+
with zero or more entries, where the keys are the values returned by the
|
|
665
|
+
grouping function, and the values are nonempty collections of the corresponding
|
|
666
|
+
arguments. Although `groupBy()` is more powerful than `partition()`, it can be
|
|
667
|
+
harder to use because it is not always possible predict in advance how many
|
|
668
|
+
entries the returned map will have and what their keys will be.
|
|
669
|
+
|
|
670
|
+
| Summary | `filter` | `partition` | `groupBy` |
|
|
671
|
+
|:------------------------------|:---------|:------------|:---------------|
|
|
672
|
+
| ease of use | easiest | moderate | hardest |
|
|
673
|
+
| generality | least | moderate | most |
|
|
674
|
+
| laziness | lazy | eager | eager |
|
|
675
|
+
| # of returned sub-collections | 1 | 2 | 0 or more |
|
|
676
|
+
| sub-collections may be empty | yes | yes | no |
|
|
677
|
+
| can discard items | yes | no | no |
|
|
678
|
+
| wrapping container | none | array | Map/OrderedMap |
|
|
679
|
+
|
|
640
680
|
## Additional Tools and Resources
|
|
641
681
|
|
|
642
682
|
- [Atom-store](https://github.com/jameshopkins/atom-store/)
|
package/dist/immutable.d.ts
CHANGED
|
@@ -91,6 +91,30 @@
|
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
93
|
declare namespace Immutable {
|
|
94
|
+
/**
|
|
95
|
+
* @ignore
|
|
96
|
+
*/
|
|
97
|
+
export type DeepCopy<T> = T extends Collection.Keyed<infer KeyedKey, infer V>
|
|
98
|
+
? // convert KeyedCollection to DeepCopy plain JS object
|
|
99
|
+
{
|
|
100
|
+
[key in KeyedKey extends string | number | symbol
|
|
101
|
+
? KeyedKey
|
|
102
|
+
: string]: DeepCopy<V>;
|
|
103
|
+
}
|
|
104
|
+
: // convert IndexedCollection or Immutable.Set to DeepCopy plain JS array
|
|
105
|
+
T extends Collection<infer _, infer V>
|
|
106
|
+
? Array<DeepCopy<V>>
|
|
107
|
+
: T extends string | number // Iterable scalar types : should be kept as is
|
|
108
|
+
? T
|
|
109
|
+
: T extends Iterable<infer V> // Iterable are converted to plain JS array
|
|
110
|
+
? Array<DeepCopy<V>>
|
|
111
|
+
: T extends object // plain JS object are converted deeply
|
|
112
|
+
? {
|
|
113
|
+
[ObjectKey in keyof T]: DeepCopy<T[ObjectKey]>;
|
|
114
|
+
}
|
|
115
|
+
: // other case : should be kept as is
|
|
116
|
+
T;
|
|
117
|
+
|
|
94
118
|
/**
|
|
95
119
|
* Lists are ordered indexed dense collections, much like a JavaScript
|
|
96
120
|
* Array.
|
|
@@ -588,6 +612,19 @@ declare namespace Immutable {
|
|
|
588
612
|
context?: unknown
|
|
589
613
|
): this;
|
|
590
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Returns a new List with the values for which the `predicate`
|
|
617
|
+
* function returns false and another for which is returns true.
|
|
618
|
+
*/
|
|
619
|
+
partition<F extends T, C>(
|
|
620
|
+
predicate: (this: C, value: T, index: number, iter: this) => value is F,
|
|
621
|
+
context?: C
|
|
622
|
+
): [List<T>, List<F>];
|
|
623
|
+
partition<C>(
|
|
624
|
+
predicate: (this: C, value: T, index: number, iter: this) => unknown,
|
|
625
|
+
context?: C
|
|
626
|
+
): [this, this];
|
|
627
|
+
|
|
591
628
|
/**
|
|
592
629
|
* Returns a List "zipped" with the provided collection.
|
|
593
630
|
*
|
|
@@ -1406,6 +1443,19 @@ declare namespace Immutable {
|
|
|
1406
1443
|
context?: unknown
|
|
1407
1444
|
): this;
|
|
1408
1445
|
|
|
1446
|
+
/**
|
|
1447
|
+
* Returns a new Map with the values for which the `predicate`
|
|
1448
|
+
* function returns false and another for which is returns true.
|
|
1449
|
+
*/
|
|
1450
|
+
partition<F extends V, C>(
|
|
1451
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
1452
|
+
context?: C
|
|
1453
|
+
): [Map<K, V>, Map<K, F>];
|
|
1454
|
+
partition<C>(
|
|
1455
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
1456
|
+
context?: C
|
|
1457
|
+
): [this, this];
|
|
1458
|
+
|
|
1409
1459
|
/**
|
|
1410
1460
|
* @see Collection.Keyed.flip
|
|
1411
1461
|
*/
|
|
@@ -1574,6 +1624,19 @@ declare namespace Immutable {
|
|
|
1574
1624
|
context?: unknown
|
|
1575
1625
|
): this;
|
|
1576
1626
|
|
|
1627
|
+
/**
|
|
1628
|
+
* Returns a new OrderedMap with the values for which the `predicate`
|
|
1629
|
+
* function returns false and another for which is returns true.
|
|
1630
|
+
*/
|
|
1631
|
+
partition<F extends V, C>(
|
|
1632
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
1633
|
+
context?: C
|
|
1634
|
+
): [OrderedMap<K, V>, OrderedMap<K, F>];
|
|
1635
|
+
partition<C>(
|
|
1636
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
1637
|
+
context?: C
|
|
1638
|
+
): [this, this];
|
|
1639
|
+
|
|
1577
1640
|
/**
|
|
1578
1641
|
* @see Collection.Keyed.flip
|
|
1579
1642
|
*/
|
|
@@ -1787,6 +1850,19 @@ declare namespace Immutable {
|
|
|
1787
1850
|
predicate: (value: T, key: T, iter: this) => unknown,
|
|
1788
1851
|
context?: unknown
|
|
1789
1852
|
): this;
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* Returns a new Set with the values for which the `predicate` function
|
|
1856
|
+
* returns false and another for which is returns true.
|
|
1857
|
+
*/
|
|
1858
|
+
partition<F extends T, C>(
|
|
1859
|
+
predicate: (this: C, value: T, key: T, iter: this) => value is F,
|
|
1860
|
+
context?: C
|
|
1861
|
+
): [Set<T>, Set<F>];
|
|
1862
|
+
partition<C>(
|
|
1863
|
+
predicate: (this: C, value: T, key: T, iter: this) => unknown,
|
|
1864
|
+
context?: C
|
|
1865
|
+
): [this, this];
|
|
1790
1866
|
}
|
|
1791
1867
|
|
|
1792
1868
|
/**
|
|
@@ -1887,6 +1963,19 @@ declare namespace Immutable {
|
|
|
1887
1963
|
context?: unknown
|
|
1888
1964
|
): this;
|
|
1889
1965
|
|
|
1966
|
+
/**
|
|
1967
|
+
* Returns a new OrderedSet with the values for which the `predicate`
|
|
1968
|
+
* function returns false and another for which is returns true.
|
|
1969
|
+
*/
|
|
1970
|
+
partition<F extends T, C>(
|
|
1971
|
+
predicate: (this: C, value: T, key: T, iter: this) => value is F,
|
|
1972
|
+
context?: C
|
|
1973
|
+
): [OrderedSet<T>, OrderedSet<F>];
|
|
1974
|
+
partition<C>(
|
|
1975
|
+
predicate: (this: C, value: T, key: T, iter: this) => unknown,
|
|
1976
|
+
context?: C
|
|
1977
|
+
): [this, this];
|
|
1978
|
+
|
|
1890
1979
|
/**
|
|
1891
1980
|
* Returns an OrderedSet of the same type "zipped" with the provided
|
|
1892
1981
|
* collections.
|
|
@@ -2601,7 +2690,7 @@ declare namespace Immutable {
|
|
|
2601
2690
|
* Note: This method may not be overridden. Objects with custom
|
|
2602
2691
|
* serialization to plain JS may override toJSON() instead.
|
|
2603
2692
|
*/
|
|
2604
|
-
toJS():
|
|
2693
|
+
toJS(): DeepCopy<TProps>;
|
|
2605
2694
|
|
|
2606
2695
|
/**
|
|
2607
2696
|
* Shallowly converts this Record to equivalent native JavaScript Object.
|
|
@@ -2761,14 +2850,14 @@ declare namespace Immutable {
|
|
|
2761
2850
|
*
|
|
2762
2851
|
* Converts keys to Strings.
|
|
2763
2852
|
*/
|
|
2764
|
-
toJS(): { [key
|
|
2853
|
+
toJS(): { [key in string | number | symbol]: DeepCopy<V> };
|
|
2765
2854
|
|
|
2766
2855
|
/**
|
|
2767
2856
|
* Shallowly converts this Keyed Seq to equivalent native JavaScript Object.
|
|
2768
2857
|
*
|
|
2769
2858
|
* Converts keys to Strings.
|
|
2770
2859
|
*/
|
|
2771
|
-
toJSON(): { [key
|
|
2860
|
+
toJSON(): { [key in string | number | symbol]: V };
|
|
2772
2861
|
|
|
2773
2862
|
/**
|
|
2774
2863
|
* Shallowly converts this collection to an Array.
|
|
@@ -2857,6 +2946,19 @@ declare namespace Immutable {
|
|
|
2857
2946
|
context?: unknown
|
|
2858
2947
|
): this;
|
|
2859
2948
|
|
|
2949
|
+
/**
|
|
2950
|
+
* Returns a new keyed Seq with the values for which the `predicate`
|
|
2951
|
+
* function returns false and another for which is returns true.
|
|
2952
|
+
*/
|
|
2953
|
+
partition<F extends V, C>(
|
|
2954
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
2955
|
+
context?: C
|
|
2956
|
+
): [Seq.Keyed<K, V>, Seq.Keyed<K, F>];
|
|
2957
|
+
partition<C>(
|
|
2958
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
2959
|
+
context?: C
|
|
2960
|
+
): [this, this];
|
|
2961
|
+
|
|
2860
2962
|
/**
|
|
2861
2963
|
* @see Collection.Keyed.flip
|
|
2862
2964
|
*/
|
|
@@ -2890,7 +2992,7 @@ declare namespace Immutable {
|
|
|
2890
2992
|
/**
|
|
2891
2993
|
* Deeply converts this Indexed Seq to equivalent native JavaScript Array.
|
|
2892
2994
|
*/
|
|
2893
|
-
toJS(): Array<
|
|
2995
|
+
toJS(): Array<DeepCopy<T>>;
|
|
2894
2996
|
|
|
2895
2997
|
/**
|
|
2896
2998
|
* Shallowly converts this Indexed Seq to equivalent native JavaScript Array.
|
|
@@ -2958,6 +3060,19 @@ declare namespace Immutable {
|
|
|
2958
3060
|
context?: unknown
|
|
2959
3061
|
): this;
|
|
2960
3062
|
|
|
3063
|
+
/**
|
|
3064
|
+
* Returns a new indexed Seq with the values for which the `predicate`
|
|
3065
|
+
* function returns false and another for which is returns true.
|
|
3066
|
+
*/
|
|
3067
|
+
partition<F extends T, C>(
|
|
3068
|
+
predicate: (this: C, value: T, index: number, iter: this) => value is F,
|
|
3069
|
+
context?: C
|
|
3070
|
+
): [Seq.Indexed<T>, Seq.Indexed<F>];
|
|
3071
|
+
partition<C>(
|
|
3072
|
+
predicate: (this: C, value: T, index: number, iter: this) => unknown,
|
|
3073
|
+
context?: C
|
|
3074
|
+
): [this, this];
|
|
3075
|
+
|
|
2961
3076
|
/**
|
|
2962
3077
|
* Returns a Seq "zipped" with the provided collections.
|
|
2963
3078
|
*
|
|
@@ -3052,7 +3167,7 @@ declare namespace Immutable {
|
|
|
3052
3167
|
/**
|
|
3053
3168
|
* Deeply converts this Set Seq to equivalent native JavaScript Array.
|
|
3054
3169
|
*/
|
|
3055
|
-
toJS(): Array<
|
|
3170
|
+
toJS(): Array<DeepCopy<T>>;
|
|
3056
3171
|
|
|
3057
3172
|
/**
|
|
3058
3173
|
* Shallowly converts this Set Seq to equivalent native JavaScript Array.
|
|
@@ -3120,6 +3235,19 @@ declare namespace Immutable {
|
|
|
3120
3235
|
context?: unknown
|
|
3121
3236
|
): this;
|
|
3122
3237
|
|
|
3238
|
+
/**
|
|
3239
|
+
* Returns a new set Seq with the values for which the `predicate`
|
|
3240
|
+
* function returns false and another for which is returns true.
|
|
3241
|
+
*/
|
|
3242
|
+
partition<F extends T, C>(
|
|
3243
|
+
predicate: (this: C, value: T, key: T, iter: this) => value is F,
|
|
3244
|
+
context?: C
|
|
3245
|
+
): [Seq.Set<T>, Seq.Set<F>];
|
|
3246
|
+
partition<C>(
|
|
3247
|
+
predicate: (this: C, value: T, key: T, iter: this) => unknown,
|
|
3248
|
+
context?: C
|
|
3249
|
+
): [this, this];
|
|
3250
|
+
|
|
3123
3251
|
[Symbol.iterator](): IterableIterator<T>;
|
|
3124
3252
|
}
|
|
3125
3253
|
}
|
|
@@ -3264,6 +3392,19 @@ declare namespace Immutable {
|
|
|
3264
3392
|
predicate: (value: V, key: K, iter: this) => unknown,
|
|
3265
3393
|
context?: unknown
|
|
3266
3394
|
): this;
|
|
3395
|
+
|
|
3396
|
+
/**
|
|
3397
|
+
* Returns a new Seq with the values for which the `predicate` function
|
|
3398
|
+
* returns false and another for which is returns true.
|
|
3399
|
+
*/
|
|
3400
|
+
partition<F extends V, C>(
|
|
3401
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
3402
|
+
context?: C
|
|
3403
|
+
): [Seq<K, V>, Seq<K, F>];
|
|
3404
|
+
partition<C>(
|
|
3405
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
3406
|
+
context?: C
|
|
3407
|
+
): [this, this];
|
|
3267
3408
|
}
|
|
3268
3409
|
|
|
3269
3410
|
/**
|
|
@@ -3336,14 +3477,14 @@ declare namespace Immutable {
|
|
|
3336
3477
|
*
|
|
3337
3478
|
* Converts keys to Strings.
|
|
3338
3479
|
*/
|
|
3339
|
-
toJS(): { [key
|
|
3480
|
+
toJS(): { [key in string | number | symbol]: DeepCopy<V> };
|
|
3340
3481
|
|
|
3341
3482
|
/**
|
|
3342
3483
|
* Shallowly converts this Keyed collection to equivalent native JavaScript Object.
|
|
3343
3484
|
*
|
|
3344
3485
|
* Converts keys to Strings.
|
|
3345
3486
|
*/
|
|
3346
|
-
toJSON(): { [key
|
|
3487
|
+
toJSON(): { [key in string | number | symbol]: V };
|
|
3347
3488
|
|
|
3348
3489
|
/**
|
|
3349
3490
|
* Shallowly converts this collection to an Array.
|
|
@@ -3470,6 +3611,20 @@ declare namespace Immutable {
|
|
|
3470
3611
|
context?: unknown
|
|
3471
3612
|
): this;
|
|
3472
3613
|
|
|
3614
|
+
/**
|
|
3615
|
+
* Returns a new keyed Collection with the values for which the
|
|
3616
|
+
* `predicate` function returns false and another for which is returns
|
|
3617
|
+
* true.
|
|
3618
|
+
*/
|
|
3619
|
+
partition<F extends V, C>(
|
|
3620
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
3621
|
+
context?: C
|
|
3622
|
+
): [Collection.Keyed<K, V>, Collection.Keyed<K, F>];
|
|
3623
|
+
partition<C>(
|
|
3624
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
3625
|
+
context?: C
|
|
3626
|
+
): [this, this];
|
|
3627
|
+
|
|
3473
3628
|
[Symbol.iterator](): IterableIterator<[K, V]>;
|
|
3474
3629
|
}
|
|
3475
3630
|
|
|
@@ -3504,7 +3659,7 @@ declare namespace Immutable {
|
|
|
3504
3659
|
/**
|
|
3505
3660
|
* Deeply converts this Indexed collection to equivalent native JavaScript Array.
|
|
3506
3661
|
*/
|
|
3507
|
-
toJS(): Array<
|
|
3662
|
+
toJS(): Array<DeepCopy<T>>;
|
|
3508
3663
|
|
|
3509
3664
|
/**
|
|
3510
3665
|
* Shallowly converts this Indexed collection to equivalent native JavaScript Array.
|
|
@@ -3767,6 +3922,20 @@ declare namespace Immutable {
|
|
|
3767
3922
|
context?: unknown
|
|
3768
3923
|
): this;
|
|
3769
3924
|
|
|
3925
|
+
/**
|
|
3926
|
+
* Returns a new indexed Collection with the values for which the
|
|
3927
|
+
* `predicate` function returns false and another for which is returns
|
|
3928
|
+
* true.
|
|
3929
|
+
*/
|
|
3930
|
+
partition<F extends T, C>(
|
|
3931
|
+
predicate: (this: C, value: T, index: number, iter: this) => value is F,
|
|
3932
|
+
context?: C
|
|
3933
|
+
): [Collection.Indexed<T>, Collection.Indexed<F>];
|
|
3934
|
+
partition<C>(
|
|
3935
|
+
predicate: (this: C, value: T, index: number, iter: this) => unknown,
|
|
3936
|
+
context?: C
|
|
3937
|
+
): [this, this];
|
|
3938
|
+
|
|
3770
3939
|
[Symbol.iterator](): IterableIterator<T>;
|
|
3771
3940
|
}
|
|
3772
3941
|
|
|
@@ -3801,7 +3970,7 @@ declare namespace Immutable {
|
|
|
3801
3970
|
/**
|
|
3802
3971
|
* Deeply converts this Set collection to equivalent native JavaScript Array.
|
|
3803
3972
|
*/
|
|
3804
|
-
toJS(): Array<
|
|
3973
|
+
toJS(): Array<DeepCopy<T>>;
|
|
3805
3974
|
|
|
3806
3975
|
/**
|
|
3807
3976
|
* Shallowly converts this Set collection to equivalent native JavaScript Array.
|
|
@@ -3869,6 +4038,20 @@ declare namespace Immutable {
|
|
|
3869
4038
|
context?: unknown
|
|
3870
4039
|
): this;
|
|
3871
4040
|
|
|
4041
|
+
/**
|
|
4042
|
+
* Returns a new set Collection with the values for which the
|
|
4043
|
+
* `predicate` function returns false and another for which is returns
|
|
4044
|
+
* true.
|
|
4045
|
+
*/
|
|
4046
|
+
partition<F extends T, C>(
|
|
4047
|
+
predicate: (this: C, value: T, key: T, iter: this) => value is F,
|
|
4048
|
+
context?: C
|
|
4049
|
+
): [Collection.Set<T>, Collection.Set<F>];
|
|
4050
|
+
partition<C>(
|
|
4051
|
+
predicate: (this: C, value: T, key: T, iter: this) => unknown,
|
|
4052
|
+
context?: C
|
|
4053
|
+
): [this, this];
|
|
4054
|
+
|
|
3872
4055
|
[Symbol.iterator](): IterableIterator<T>;
|
|
3873
4056
|
}
|
|
3874
4057
|
}
|
|
@@ -4049,7 +4232,9 @@ declare namespace Immutable {
|
|
|
4049
4232
|
* `Collection.Indexed`, and `Collection.Set` become `Array`, while
|
|
4050
4233
|
* `Collection.Keyed` become `Object`, converting keys to Strings.
|
|
4051
4234
|
*/
|
|
4052
|
-
toJS():
|
|
4235
|
+
toJS():
|
|
4236
|
+
| Array<DeepCopy<V>>
|
|
4237
|
+
| { [key in string | number | symbol]: DeepCopy<V> };
|
|
4053
4238
|
|
|
4054
4239
|
/**
|
|
4055
4240
|
* Shallowly converts this Collection to equivalent native JavaScript Array or Object.
|
|
@@ -4057,7 +4242,7 @@ declare namespace Immutable {
|
|
|
4057
4242
|
* `Collection.Indexed`, and `Collection.Set` become `Array`, while
|
|
4058
4243
|
* `Collection.Keyed` become `Object`, converting keys to Strings.
|
|
4059
4244
|
*/
|
|
4060
|
-
toJSON(): Array<V> | { [key
|
|
4245
|
+
toJSON(): Array<V> | { [key in string | number | symbol]: V };
|
|
4061
4246
|
|
|
4062
4247
|
/**
|
|
4063
4248
|
* Shallowly converts this collection to an Array.
|
|
@@ -4299,6 +4484,19 @@ declare namespace Immutable {
|
|
|
4299
4484
|
context?: unknown
|
|
4300
4485
|
): this;
|
|
4301
4486
|
|
|
4487
|
+
/**
|
|
4488
|
+
* Returns a new Collection with the values for which the `predicate`
|
|
4489
|
+
* function returns false and another for which is returns true.
|
|
4490
|
+
*/
|
|
4491
|
+
partition<F extends V, C>(
|
|
4492
|
+
predicate: (this: C, value: V, key: K, iter: this) => value is F,
|
|
4493
|
+
context?: C
|
|
4494
|
+
): [Collection<K, V>, Collection<K, F>];
|
|
4495
|
+
partition<C>(
|
|
4496
|
+
predicate: (this: C, value: V, key: K, iter: this) => unknown,
|
|
4497
|
+
context?: C
|
|
4498
|
+
): [this, this];
|
|
4499
|
+
|
|
4302
4500
|
/**
|
|
4303
4501
|
* Returns a new Collection of the same type in reverse order.
|
|
4304
4502
|
*/
|
package/dist/immutable.es.js
CHANGED
|
@@ -1410,6 +1410,18 @@ function groupByFactory(collection, grouper, context) {
|
|
|
1410
1410
|
return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();
|
|
1411
1411
|
}
|
|
1412
1412
|
|
|
1413
|
+
function partitionFactory(collection, predicate, context) {
|
|
1414
|
+
var isKeyedIter = isKeyed(collection);
|
|
1415
|
+
var groups = [[], []];
|
|
1416
|
+
collection.__iterate(function (v, k) {
|
|
1417
|
+
groups[predicate.call(context, v, k, collection) ? 1 : 0].push(
|
|
1418
|
+
isKeyedIter ? [k, v] : v
|
|
1419
|
+
);
|
|
1420
|
+
});
|
|
1421
|
+
var coerce = collectionClass(collection);
|
|
1422
|
+
return groups.map(function (arr) { return reify(collection, coerce(arr)); });
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1413
1425
|
function sliceFactory(collection, begin, end, useKeys) {
|
|
1414
1426
|
var originalSize = collection.size;
|
|
1415
1427
|
|
|
@@ -4407,7 +4419,11 @@ var Set = /*@__PURE__*/(function (SetCollection) {
|
|
|
4407
4419
|
}
|
|
4408
4420
|
return this.withMutations(function (set) {
|
|
4409
4421
|
for (var ii = 0; ii < iters.length; ii++) {
|
|
4410
|
-
|
|
4422
|
+
if (typeof iters[ii] === 'string') {
|
|
4423
|
+
set.add(iters[ii]);
|
|
4424
|
+
} else {
|
|
4425
|
+
SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });
|
|
4426
|
+
}
|
|
4411
4427
|
}
|
|
4412
4428
|
});
|
|
4413
4429
|
};
|
|
@@ -4844,6 +4860,10 @@ mixin(Collection, {
|
|
|
4844
4860
|
return reify(this, filterFactory(this, predicate, context, true));
|
|
4845
4861
|
},
|
|
4846
4862
|
|
|
4863
|
+
partition: function partition(predicate, context) {
|
|
4864
|
+
return partitionFactory(this, predicate, context);
|
|
4865
|
+
},
|
|
4866
|
+
|
|
4847
4867
|
find: function find(predicate, context, notSetValue) {
|
|
4848
4868
|
var entry = this.findEntry(predicate, context);
|
|
4849
4869
|
return entry ? entry[1] : notSetValue;
|
|
@@ -5866,7 +5886,7 @@ function defaultConverter(k, v) {
|
|
|
5866
5886
|
return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
|
|
5867
5887
|
}
|
|
5868
5888
|
|
|
5869
|
-
var version = "4.
|
|
5889
|
+
var version = "4.2.0";
|
|
5870
5890
|
|
|
5871
5891
|
var Immutable = {
|
|
5872
5892
|
version: version,
|
package/dist/immutable.js
CHANGED
|
@@ -1416,6 +1416,18 @@
|
|
|
1416
1416
|
return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
|
+
function partitionFactory(collection, predicate, context) {
|
|
1420
|
+
var isKeyedIter = isKeyed(collection);
|
|
1421
|
+
var groups = [[], []];
|
|
1422
|
+
collection.__iterate(function (v, k) {
|
|
1423
|
+
groups[predicate.call(context, v, k, collection) ? 1 : 0].push(
|
|
1424
|
+
isKeyedIter ? [k, v] : v
|
|
1425
|
+
);
|
|
1426
|
+
});
|
|
1427
|
+
var coerce = collectionClass(collection);
|
|
1428
|
+
return groups.map(function (arr) { return reify(collection, coerce(arr)); });
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1419
1431
|
function sliceFactory(collection, begin, end, useKeys) {
|
|
1420
1432
|
var originalSize = collection.size;
|
|
1421
1433
|
|
|
@@ -4413,7 +4425,11 @@
|
|
|
4413
4425
|
}
|
|
4414
4426
|
return this.withMutations(function (set) {
|
|
4415
4427
|
for (var ii = 0; ii < iters.length; ii++) {
|
|
4416
|
-
|
|
4428
|
+
if (typeof iters[ii] === 'string') {
|
|
4429
|
+
set.add(iters[ii]);
|
|
4430
|
+
} else {
|
|
4431
|
+
SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });
|
|
4432
|
+
}
|
|
4417
4433
|
}
|
|
4418
4434
|
});
|
|
4419
4435
|
};
|
|
@@ -4850,6 +4866,10 @@
|
|
|
4850
4866
|
return reify(this, filterFactory(this, predicate, context, true));
|
|
4851
4867
|
},
|
|
4852
4868
|
|
|
4869
|
+
partition: function partition(predicate, context) {
|
|
4870
|
+
return partitionFactory(this, predicate, context);
|
|
4871
|
+
},
|
|
4872
|
+
|
|
4853
4873
|
find: function find(predicate, context, notSetValue) {
|
|
4854
4874
|
var entry = this.findEntry(predicate, context);
|
|
4855
4875
|
return entry ? entry[1] : notSetValue;
|
|
@@ -5872,7 +5892,7 @@
|
|
|
5872
5892
|
return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();
|
|
5873
5893
|
}
|
|
5874
5894
|
|
|
5875
|
-
var version = "4.
|
|
5895
|
+
var version = "4.2.0";
|
|
5876
5896
|
|
|
5877
5897
|
var Immutable = {
|
|
5878
5898
|
version: version,
|
package/dist/immutable.min.js
CHANGED
|
@@ -42,14 +42,14 @@ var n,i=t&&t.array,o=a<r?0:a-r>>e,u=1+(c-r>>e);l<u&&(u=l);return function(){for(
|
|
|
42
42
|
t.forEach(function(t,e){return r.set(e,t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){t=this._map.get(t);return void 0!==t?this._list.get(t)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):zr()},e.prototype.set=function(t,e){return br(this,t,e)},e.prototype.remove=function(t){return br(this,t,v)},e.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],r)},t)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?Sr(e,r,t,this.__hash):0===this.size?zr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Ke);function Sr(t,e,r,n){var i=Object.create(wr.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function zr(){return mr=mr||Sr(Qe(),pr())}function br(t,e,r){var n,i,o=t._map,u=t._list,s=o.get(e),a=void 0!==s;if(r===v){if(!a)return t;l<=u.size&&2*o.size<=u.size?(n=(i=u.filter(function(t,e){return void 0!==t&&s!==e})).toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(a){if(r===u.get(s)[1])return t;n=o,i=u.set(s,[e,r])}else n=o.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t.__altered=!0,t):Sr(n,i)}wr.isOrderedMap=ft,wr.prototype[k]=!0,wr.prototype[e]=wr.prototype.remove;var Ir="@@__IMMUTABLE_STACK__@@";function Or(t){return!(!t||!t[Ir])}var Er=function(i){function t(t){return null==t?Dr():Or(t)?t:Dr().pushAll(t)}return i&&(t.__proto__=i),((
|
|
43
43
|
t.prototype=Object.create(i&&i.prototype)).constructor=t).of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(t,e){var r=this._head;for(t=h(this,t);r&&t--;)r=r.next;return r?r.value:e},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;0<=n;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Mr(e,r)},t.prototype.pushAll=function(t){if(0===(t=i(t)).size)return this;if(0===this.size&&Or(t))return t;te(t.size);var e=this.size,r=this._head;return t.__iterate(function(t){e++,r={value:t,next:r}},!0),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):Mr(e,r)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dr()},t.prototype.slice=function(t,e){if(p(t,e,this.size))return this;var r=y(t,this.size);if(w(e,this.size)!==this.size)return i.prototype.slice.call(this,t,e);for(var e=this.size-r,n=this._head;r--;)n=n.next;return this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):Mr(e,n)},t.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Mr(this.size,this._head,t,this.__hash):0===this.size?Dr():(this.__ownerID=t,this.__altered=!1,this)},t.prototype.__iterate=function(r,t){var n=this;if(t)return new tt(this.toArray()).__iterate(function(t,e){return r(t,e,n)},t);for(var e=0,i=this._head;i&&!1!==r(i.value,e++,this);)i=i.next;return e},t.prototype.__iterator=function(e,t){if(t)return new tt(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new P(function(){if(n){var t=n.value;return n=n.next,W(e,r++,t)}return N()})},t}(E);Er.isStack=Or;var jr,qr=Er.prototype;function Mr(t,e,r,n){
|
|
44
44
|
var i=Object.create(qr);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return jr=jr||Mr(0)}qr[Ir]=!0,qr.shift=qr.pop,qr.unshift=qr.push,qr.unshiftAll=qr.pushAll,qr.withMutations=Ae,qr.wasAltered=Ue,qr.asImmutable=Re,qr["@@transducer/init"]=qr.asMutable=ke,qr["@@transducer/step"]=function(t,e){return t.unshift(e)},qr["@@transducer/result"]=function(t){return t.asImmutable()};var xr="@@__IMMUTABLE_SET__@@";function Ar(t){return!(!t||!t[xr])}function kr(t){return Ar(t)&&R(t)}function Rr(r,t){if(r===t)return!0;if(!f(t)||void 0!==r.size&&void 0!==t.size&&r.size!==t.size||void 0!==r.__hash&&void 0!==t.__hash&&r.__hash!==t.__hash||a(r)!==a(t)||z(r)!==z(t)||R(r)!==R(t))return!1;if(0===r.size&&0===t.size)return!0;var n=!b(r);if(R(r)){var i=r.entries();return t.every(function(t,e){var r=i.next().value;return r&&_t(r[1],t)&&(n||_t(r[0],e))})&&i.next().done}var e,o=!1;void 0===r.size&&(void 0===t.size?"function"==typeof r.cacheResult&&r.cacheResult():(o=!0,e=r,r=t,t=e));var u=!0,t=t.__iterate(function(t,e){if(n?!r.has(t):o?!_t(t,r.get(e,v)):!_t(r.get(e,v),t))return u=!1});return u&&r.size===t}function Ur(e,r){function t(t){e.prototype[t]=r[t]}return Object.keys(r).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(r).forEach(t),e}function Kr(t){if(!t||"object"!=typeof t)return t;if(!f(t)){if(!ie(t))return t;t=F(t)}if(a(t)){var r={};return t.__iterate(function(t,e){r[e]=Kr(t)}),r}var e=[];return t.__iterate(function(t){e.push(Kr(t))}),e}var Tr=function(n){function e(r){return null==r?Wr():Ar(r)&&!R(r)?r:Wr().withMutations(function(e){var t=n(r);te(t.size),t.forEach(function(t){return e.add(t)})})}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.intersect=function(t){return(t=I(t).toArray()).length?Lr.intersect.apply(e(t.pop()),t):Wr()},e.union=function(t){return(t=I(t).toArray()).length?Lr.union.apply(e(t.pop()),t):Wr()},
|
|
45
|
-
e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Br(this,this._map.set(t,t))},e.prototype.remove=function(t){return Br(this,this._map.remove(t))},e.prototype.clear=function(){return Br(this,this._map.clear())},e.prototype.map=function(r,n){var i=this,o=!1,t=Br(this,this._map.mapEntries(function(t){var e=t[1],t=r.call(n,e,e,i);return t!==e&&(o=!0),[t,t]},n));return o?t:this},e.prototype.union=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];return 0===(r=r.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){for(var t=0;t<r.length;t++)n(r[t]).forEach(function(t){return e.add(t)})}):this.constructor(r[0])},e.prototype.intersect=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.subtract=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.sort=function(t){return an(Wt(this,t))},e.prototype.sortBy=function(t,e){return an(Wt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate(function(t){return e(t,t,r)},t)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(j);Tr.isSet=Ar
|
|
46
|
-
e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Pr(t,e){var r=Object.create(Lr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Wr(){return Cr=Cr||Pr(Qe())}Lr[xr]=!0,Lr[e]=Lr.remove,Lr.merge=Lr.concat=Lr.union,Lr.withMutations=Ae,Lr.asImmutable=Re,Lr["@@transducer/init"]=Lr.asMutable=ke,Lr["@@transducer/step"]=function(t,e){return t.add(e)},Lr["@@transducer/result"]=function(t){return t.asImmutable()},Lr.__empty=Wr,Lr.__make=Pr;var Nr,Hr=function(t){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);if($t(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,1+Math.ceil((e-t)/r-1)),0===this.size){if(Nr)return Nr;Nr=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},n.prototype.get=function(t,e){return this.has(t)?this._start+h(this,t)*this._step:e},n.prototype.includes=function(t){t=(t-this._start)/this._step;return 0<=t&&t<this.size&&t==Math.floor(t)},n.prototype.slice=function(t,e){return p(t,e,this.size)?this:(t=y(t,this.size),(e=w(e,this.size))<=t?new n(0,0):new n(this.get(t,this._end),this.get(e,this._end),this._step))},n.prototype.indexOf=function(t){t-=this._start;if(t%this._step==0){t=t/this._step;if(0<=t&&t<this.size)return t}return-1},n.prototype.lastIndexOf=function(t){return this.indexOf(t)},n.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==t(i,e?r-++o:o++,this);)i+=e?-n:n;return o},n.prototype.__iterator=function(e,r){var n=this.size,i=this._step,o=r?this._start+(n-1)*i:this._start,u=0;return new P(function(){if(u===n)return N();var t=o;return o+=r?-i:i,W(e,r?n-++u:u++,t)})},n.prototype.equals=function(t){
|
|
45
|
+
e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return Br(this,this._map.set(t,t))},e.prototype.remove=function(t){return Br(this,this._map.remove(t))},e.prototype.clear=function(){return Br(this,this._map.clear())},e.prototype.map=function(r,n){var i=this,o=!1,t=Br(this,this._map.mapEntries(function(t){var e=t[1],t=r.call(n,e,e,i);return t!==e&&(o=!0),[t,t]},n));return o?t:this},e.prototype.union=function(){for(var r=[],t=arguments.length;t--;)r[t]=arguments[t];return 0===(r=r.filter(function(t){return 0!==t.size})).length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){for(var t=0;t<r.length;t++)"string"==typeof r[t]?e.add(r[t]):n(r[t]).forEach(function(t){return e.add(t)})}):this.constructor(r[0])},e.prototype.intersect=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.subtract=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];if(0===t.length)return this;t=t.map(function(t){return n(t)});var r=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&r.push(e)}),this.withMutations(function(e){r.forEach(function(t){e.remove(t)})})},e.prototype.sort=function(t){return an(Wt(this,t))},e.prototype.sortBy=function(t,e){return an(Wt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate(function(t){return e(t,t,r)},t)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(j);Tr.isSet=Ar
|
|
46
|
+
;var Cr,Lr=Tr.prototype;function Br(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Pr(t,e){var r=Object.create(Lr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Wr(){return Cr=Cr||Pr(Qe())}Lr[xr]=!0,Lr[e]=Lr.remove,Lr.merge=Lr.concat=Lr.union,Lr.withMutations=Ae,Lr.asImmutable=Re,Lr["@@transducer/init"]=Lr.asMutable=ke,Lr["@@transducer/step"]=function(t,e){return t.add(e)},Lr["@@transducer/result"]=function(t){return t.asImmutable()},Lr.__empty=Wr,Lr.__make=Pr;var Nr,Hr=function(t){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);if($t(0!==r,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,1+Math.ceil((e-t)/r-1)),0===this.size){if(Nr)return Nr;Nr=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},n.prototype.get=function(t,e){return this.has(t)?this._start+h(this,t)*this._step:e},n.prototype.includes=function(t){t=(t-this._start)/this._step;return 0<=t&&t<this.size&&t==Math.floor(t)},n.prototype.slice=function(t,e){return p(t,e,this.size)?this:(t=y(t,this.size),(e=w(e,this.size))<=t?new n(0,0):new n(this.get(t,this._end),this.get(e,this._end),this._step))},n.prototype.indexOf=function(t){t-=this._start;if(t%this._step==0){t=t/this._step;if(0<=t&&t<this.size)return t}return-1},n.prototype.lastIndexOf=function(t){return this.indexOf(t)},n.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,i=e?this._start+(r-1)*n:this._start,o=0;o!==r&&!1!==t(i,e?r-++o:o++,this);)i+=e?-n:n;return o},n.prototype.__iterator=function(e,r){var n=this.size,i=this._step,o=r?this._start+(n-1)*i:this._start,u=0;return new P(function(){if(u===n)return N();var t=o;return o+=r?-i:i,W(e,r?n-++u:u++,t)})},n.prototype.equals=function(t){
|
|
47
47
|
return t instanceof n?this._start===t._start&&this._end===t._end&&this._step===t._step:Rr(this,t)},n}(Z);function Jr(t,e,r){for(var n=ee(e),i=0;i!==n.length;)if((t=se(t,n[i++],v))===v)return r;return t}function Vr(t,e){return Jr(this,t,e)}function Yr(t,e){return Jr(t,e,v)!==v}function Qr(){te(this.size);var r={};return this.__iterate(function(t,e){r[e]=t}),r}I.isIterable=f,I.isKeyed=a,I.isIndexed=z,I.isAssociative=b,I.isOrdered=R,I.Iterator=P,Ur(I,{toArray:function(){te(this.size);var r=Array(this.size||0),n=a(this),i=0;return this.__iterate(function(t,e){r[i++]=n?[e,t]:t}),r},toIndexedSeq:function(){return new At(this)},toJS:function(){return Kr(this)},toKeyedSeq:function(){return new xt(this,!0)},toMap:function(){return Ke(this.toKeyedSeq())},toObject:Qr,toOrderedMap:function(){return wr(this.toKeyedSeq())},toOrderedSet:function(){return an(a(this)?this.valueSeq():this)},toSet:function(){return Tr(a(this)?this.valueSeq():this)},toSetSeq:function(){return new kt(this)},toSeq:function(){return z(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Er(a(this)?this.valueSeq():this)},toList:function(){return ur(a(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Vt(this,function(t,e){var r=a(t);if(0===(e=[t].concat(e).map(function(t){return f(t)?r&&(t=O(t)):t=r?ot(t):ut(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size})).length)return t;if(1===e.length){var n=e[0];if(n===t||r&&a(n)||z(t)&&z(n))return n}return n=new tt(e),r?n=n.toKeyedSeq():z(t)||(n=n.toSetSeq()),(n=n.flatten(!0)).size=e.reduce(function(t,e){if(void 0!==t){e=e.size;if(void 0!==e)return t+e}},0),n}(this,t))},includes:function(e){return this.some(function(t){return _t(t,e)})},entries:function(){return this.__iterator(T)},every:function(n,i){te(this.size);var o=!0
|
|
48
|
-
;return this.__iterate(function(t,e,r){if(!n.call(i,t,e,r))return o=!1}),o},filter:function(t,e){return Vt(this,Ct(this,t,e,!0))},find:function(t,e,r){e=this.findEntry(t,e);return e?e[1]:r},forEach:function(t,e){return te(this.size),this.__iterate(e?t.bind(e):t)},join:function(e){te(this.size),e=void 0!==e?""+e:",";var r="",n=!0;return this.__iterate(function(t){n?n=!1:r+=e,r+=null!=t?""+t:""}),r},keys:function(){return this.__iterator(U)},map:function(t,e){return Vt(this,Kt(this,t,e))},reduce:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Vt(this,Tt(this,!0))},slice:function(t,e){return Vt(this,Lt(this,t,e,!0))},some:function(t,e){return!this.every(rn(t),e)},sort:function(t){return Vt(this,Wt(this,t))},values:function(){return this.__iterator(K)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return r=this,n=t,i=e,o=Ke().asMutable(),r.__iterate(function(t,e){o.update(n.call(i,t,e,r),0,function(t){return t+1})}),o.asImmutable();var r,n,i,o},equals:function(t){return Rr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new tt(t._cache);var e=t.toSeq().map(en).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(rn(t),e)},findEntry:function(n,i,t){var o=t;return this.__iterate(function(t,e,r){if(n.call(i,t,e,r))return!(o=[e,t])}),o},findKey:function(t,e){e=this.findEntry(t,e);return e&&e[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(
|
|
49
|
-
,t,e,r))}).flatten(!0)));var r,n,i,o},flatten:function(t){return Vt(this,Pt(this,t,!0))},fromEntrySeq:function(){return new Rt(this)},get:function(r,t){return this.find(function(t,e){return _t(e,r)},void 0,t)},getIn:Vr,groupBy:function(t,e){return function(n,t,i){var o=a(n),u=(R(n)?wr:Ke)().asMutable();n.__iterate(function(e,r){u.update(t.call(i,e,r,n),function(t){return(t=t||[]).push(o?[r,e]:e),t})});var e=Qt(n);return u.map(function(t){return Vt(n,e(t))}).asImmutable()}(this,t,e)},has:function(t){return this.get(t,v)!==v},hasIn:function(t){return Yr(this,t)},isSubset:function(e){return e="function"==typeof e.includes?e:I(e),this.every(function(t){return e.includes(t)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:I(t)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return _t(t,e)})},keySeq:function(){return this.toSeq().map(tn).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Nt(this,t)},maxBy:function(t,e){return Nt(this,e,t)},min:function(t){return Nt(this,t?nn(t):un)},minBy:function(t,e){return Nt(this,e?nn(e):un,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(rn(t),e)},sortBy:function(t,e){return Vt(this,Wt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Vt(this,(s=t,a=e,(e=Xt(r=this)).__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=0;return r.__iterate(function(t,e,r){return s.call(a,
|
|
50
|
-
;if(t.done)return t;var e=t.value,r=e[0],e=e[1];return s.call(a,e,r,i)?n===T?t:W(n,r,e,t):(u=!1,N())})},e));var r,s,a},takeUntil:function(t,e){return this.takeWhile(rn(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=R(t),r=a(t),n=e?1:0;return function(t,e){return e=pt(e,3432918353),e=pt(e<<15|e>>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=lt((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+sn(yt(t),yt(e))|0}:function(t,e){n=n+sn(yt(t),yt(e))|0}:e?function(t){n=31*n+yt(t)|0}:function(t){n=n+yt(t)|0}),n)}(this))}});var Xr=I.prototype;Xr[o]=!0,Xr[B]=Xr.values,Xr.toJSON=Xr.toArray,Xr.__toStringMapper=oe,Xr.inspect=Xr.toSource=function(){return""+this},Xr.chain=Xr.flatMap,Xr.contains=Xr.includes,Ur(O,{flip:function(){return Vt(this,Ut(this))},mapEntries:function(r,n){var i=this,o=0;return Vt(this,this.toSeq().map(function(t,e){return r.call(n,[e,t],o++,i)}).fromEntrySeq())},mapKeys:function(r,n){var i=this;return Vt(this,this.toSeq().flip().map(function(t,e){return r.call(n,t,e,i)}).flip())}});var Fr=O.prototype;Fr[s]=!0,Fr[B]=Xr.entries,Fr.toJSON=Qr,Fr.__toStringMapper=function(t,e){return oe(e)+": "+oe(t)},Ur(E,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(t,e){return Vt(this,Ct(this,t,e,!1))},findIndex:function(t,e){e=this.findEntry(t,e);return e?e[0]:-1},indexOf:function(t){t=this.keyOf(t);return void 0===t?-1:t},lastIndexOf:function(t){t=this.lastKeyOf(t);return void 0===t?-1:t},reverse:function(){return Vt(this,Tt(this,!1))},slice:function(t,e){return Vt(this,Lt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=y(t,t<0?this.count(
|
|
51
|
-
return this.get(0,t)},flatten:function(t){return Vt(this,Pt(this,t,!1))},get:function(r,t){return(r=h(this,r))<0||this.size===1/0||void 0!==this.size&&this.size<r?t:this.find(function(t,e){return e===r},void 0,t)},has:function(t){return 0<=(t=h(this,t))&&(void 0!==this.size?this.size===1/0||t<this.size:!!~this.indexOf(t))},interpose:function(t){return Vt(this,(u=t,(t=Xt(o=this)).size=o.size&&2*o.size-1,t.__iterateUncached=function(e,t){var r=this,n=0;return o.__iterate(function(t){return(!n||!1!==e(u,n++,r))&&!1!==e(t,n++,r)},t),n},t.__iteratorUncached=function(t,e){var r,n=o.__iterator(K,e),i=0;return new P(function(){return(!r||i%2)&&(r=n.next()).done?r:i%2?W(t,i++,u):W(t,i++,r.value,r)})},t));var o,u},interleave:function(){var t=[this].concat(Zt(arguments)),e=Jt(this.toSeq(),Z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Vt(this,r)},keySeq:function(){return Hr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!1))},zip:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t))},zipAll:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t,!0))},zipWith:function(t){var e=Zt(arguments);return Vt(e[0]=this,Jt(this,t,e))}});var Gr=E.prototype;Gr[S]=!0,Gr[k]=!0,Ur(j,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Zr=j.prototype;function $r(t,n,i,o,u,e){return te(t.size),t.__iterate(function(t,e,r){i=u?(u=!1,t):n.call(o,i,t,e,r)},e),i}function tn(t,e){return e}function en(t,e){return[e,t]}function rn(t){return function(){return!t.apply(this,arguments)}}function nn(t){return function(){return-t.apply(this,arguments)}}function on(){return Zt(arguments)}function un(t,e){return t<e?1:e<t?-1:0}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2
|
|
52
|
-
r);te(t.size),t.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Tr);an.isOrderedSet=kr;var cn,fn=an.prototype;function hn(t,e){var r=Object.create(fn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function _n(){return cn=cn||hn(zr())}fn[k]=!0,fn.zip=Gr.zip,fn.zipWith=Gr.zipWith,fn.zipAll=Gr.zipAll,fn.__empty=_n,fn.__make=hn;Gr=function(u,s){var a;!function(t){if(x(t))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(u);var c=function(t){var n=this;if(t instanceof c)return t;if(!(this instanceof c))return new c(t);if(!a){a=!0;var e=Object.keys(u),r=f._indices={};f._name=s,f._keys=e,f._defaultValues=u;for(var i=0;i<e.length;i++){var o=e[i];r[o]=i,f[o]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+vn(this)+' with property "'+o+'" since that property name is part of the Record API.'):function(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){$t(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}(f,o)}}return this.__ownerID=void 0,this._values=ur().withMutations(function(r){r.setSize(n._keys.length),O(t).forEach(function(t,e){r.set(n._indices[e],t===n._defaultValues[e]?void 0:t)})}),this},f=c.prototype=Object.create(pn);return f.constructor=c,s&&(
|
|
53
|
-
Gr.prototype.equals=function(t){return this===t||x(t)&&yn(this).equals(yn(t))},Gr.prototype.hashCode=function(){return yn(this).hashCode()},Gr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Gr.prototype.get=function(t,e){if(!this.has(t))return e;e=this._values.get(this._indices[t]);return void 0===e?this._defaultValues[t]:e},Gr.prototype.set=function(t,e){if(this.has(t)){e=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(e!==this._values&&!this.__ownerID)return ln(this,e)}return this},Gr.prototype.remove=function(t){return this.set(t)},Gr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:ln(this,t)},Gr.prototype.wasAltered=function(){return this._values.wasAltered()},Gr.prototype.toSeq=function(){return yn(this)},Gr.prototype.toJS=function(){return Kr(this)},Gr.prototype.entries=function(){return this.__iterator(T)},Gr.prototype.__iterator=function(t,e){return yn(this).__iterator(t,e)},Gr.prototype.__iterate=function(t,e){return yn(this).__iterate(t,e)},Gr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?ln(this,e,t):(this.__ownerID=t,this._values=e,this)},Gr.isRecord=x,Gr.getDescriptiveName=vn;var pn=Gr.prototype;function ln(t,e,r){t=Object.create(Object.getPrototypeOf(t));return t._values=e,t.__ownerID=r,t}function vn(t){return t.constructor.displayName||t.constructor.name||"Record"}function yn(e){return ot(e._keys.map(function(t){return[t,e.get(t)]}))}pn[D]=!0,pn[e]=pn.remove,pn.deleteIn=pn.removeIn=ve,pn.getIn=Vr,pn.hasIn=Xr.hasIn,pn.merge=me,pn.mergeWith=we,pn.mergeIn=De,pn.mergeDeep=qe,pn.mergeDeepWith=Me,pn.mergeDeepIn=xe,pn.setIn=pe,pn.update=de,pn.updateIn=ge,pn.withMutations=Ae,pn.asMutable=ke,pn.asImmutable=Re,pn[B]=pn.entries,pn.toJSON=pn.toObject=Xr.toObject,
|
|
54
|
-
,e),0===this.size){if(dn)return dn;dn=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},n.prototype.get=function(t,e){return this.has(t)?this._value:e},n.prototype.includes=function(t){return _t(this._value,t)},n.prototype.slice=function(t,e){var r=this.size;return p(t,e,r)?this:new n(this._value,w(e,r)-y(t,r))},n.prototype.reverse=function(){return this},n.prototype.indexOf=function(t){return _t(this._value,t)?0:-1},n.prototype.lastIndexOf=function(t){return _t(this._value,t)?this.size:-1},n.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},n.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new P(function(){return i===n?N():W(t,e?n-++i:i++,r._value)})},n.prototype.equals=function(t){return t instanceof n?_t(this._value,t._value):Rr(t)},n}(Z);function gn(t,e){return function r(n,i,o,t,u,e){if("string"!=typeof o&&!A(o)&&(X(o)||H(o)||ne(o))){if(~n.indexOf(o))throw new TypeError("Cannot convert circular structure to Immutable");n.push(o),u&&""!==t&&u.push(t);var t=i.call(e,t,F(o).map(function(t,e){return r(n,i,t,e,u,o)}),u&&u.slice());return n.pop(),u&&u.pop(),t}return o}([],e||mn,t,"",e&&2<e.length?[]:void 0,{"":t})}function mn(t,e){return z(e)?e.toList():a(e)?e.toMap():e.toSet()}B={version:"4.
|
|
55
|
-
t.Record=Gr,t.Repeat=e,t.Seq=F,t.Set=Tr,t.Stack=Er,t.default=B,t.fromJS=gn,t.get=se,t.getIn=Jr,t.has=ue,t.hasIn=Yr,t.hash=yt,t.is=_t,t.isAssociative=b,t.isCollection=f,t.isImmutable=A,t.isIndexed=z,t.isKeyed=a,t.isList=or,t.isMap=ct,t.isOrdered=R,t.isOrderedMap=ft,t.isOrderedSet=kr,t.isPlainObject=ne,t.isRecord=x,t.isSeq=M,t.isSet=Ar,t.isStack=Or,t.isValueObject=ht,t.merge=ze,t.mergeDeep=Ie,t.mergeDeepWith=Oe,t.mergeWith=be,t.remove=ce,t.removeIn=le,t.set=fe,t.setIn=_e,t.update=ye,t.updateIn=he,t.version="4.
|
|
48
|
+
;return this.__iterate(function(t,e,r){if(!n.call(i,t,e,r))return o=!1}),o},filter:function(t,e){return Vt(this,Ct(this,t,e,!0))},partition:function(t,e){return function(r,n,i){var o=a(r),u=[[],[]];r.__iterate(function(t,e){u[n.call(i,t,e,r)?1:0].push(o?[e,t]:t)});var e=Qt(r);return u.map(function(t){return Vt(r,e(t))})}(this,t,e)},find:function(t,e,r){e=this.findEntry(t,e);return e?e[1]:r},forEach:function(t,e){return te(this.size),this.__iterate(e?t.bind(e):t)},join:function(e){te(this.size),e=void 0!==e?""+e:",";var r="",n=!0;return this.__iterate(function(t){n?n=!1:r+=e,r+=null!=t?""+t:""}),r},keys:function(){return this.__iterator(U)},map:function(t,e){return Vt(this,Kt(this,t,e))},reduce:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return $r(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Vt(this,Tt(this,!0))},slice:function(t,e){return Vt(this,Lt(this,t,e,!0))},some:function(t,e){return!this.every(rn(t),e)},sort:function(t){return Vt(this,Wt(this,t))},values:function(){return this.__iterator(K)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(t,e){return c(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return r=this,n=t,i=e,o=Ke().asMutable(),r.__iterate(function(t,e){o.update(n.call(i,t,e,r),0,function(t){return t+1})}),o.asImmutable();var r,n,i,o},equals:function(t){return Rr(this,t)},entrySeq:function(){var t=this;if(t._cache)return new tt(t._cache);var e=t.toSeq().map(en).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(rn(t),e)},findEntry:function(n,i,t){var o=t;return this.__iterate(function(t,e,r){if(n.call(i,t,e,r))return!(o=[e,t])}),o},findKey:function(t,e){e=this.findEntry(t,e);return e&&e[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(
|
|
49
|
+
t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(r,null,t)},flatMap:function(t,e){return Vt(this,(n=t,i=e,o=Qt(r=this),r.toSeq().map(function(t,e){return o(n.call(i,t,e,r))}).flatten(!0)));var r,n,i,o},flatten:function(t){return Vt(this,Pt(this,t,!0))},fromEntrySeq:function(){return new Rt(this)},get:function(r,t){return this.find(function(t,e){return _t(e,r)},void 0,t)},getIn:Vr,groupBy:function(t,e){return function(n,t,i){var o=a(n),u=(R(n)?wr:Ke)().asMutable();n.__iterate(function(e,r){u.update(t.call(i,e,r,n),function(t){return(t=t||[]).push(o?[r,e]:e),t})});var e=Qt(n);return u.map(function(t){return Vt(n,e(t))}).asImmutable()}(this,t,e)},has:function(t){return this.get(t,v)!==v},hasIn:function(t){return Yr(this,t)},isSubset:function(e){return e="function"==typeof e.includes?e:I(e),this.every(function(t){return e.includes(t)})},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:I(t)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return _t(t,e)})},keySeq:function(){return this.toSeq().map(tn).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Nt(this,t)},maxBy:function(t,e){return Nt(this,e,t)},min:function(t){return Nt(this,t?nn(t):un)},minBy:function(t,e){return Nt(this,e?nn(e):un,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(rn(t),e)},sortBy:function(t,e){return Vt(this,Wt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Vt(this,(s=t,a=e,(e=Xt(r=this)).__iterateUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterate(n,t);var o=0;return r.__iterate(function(t,e,r){return s.call(a,
|
|
50
|
+
t,e,r)&&++o&&n(t,e,i)}),o},e.__iteratorUncached=function(n,t){var i=this;if(t)return this.cacheResult().__iterator(n,t);var o=r.__iterator(T,t),u=!0;return new P(function(){if(!u)return N();var t=o.next();if(t.done)return t;var e=t.value,r=e[0],e=e[1];return s.call(a,e,r,i)?n===T?t:W(n,r,e,t):(u=!1,N())})},e));var r,s,a},takeUntil:function(t,e){return this.takeWhile(rn(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=R(t),r=a(t),n=e?1:0;return function(t,e){return e=pt(e,3432918353),e=pt(e<<15|e>>>-15,461845907),e=pt(e<<13|e>>>-13,5),e=pt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=lt((e=pt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+sn(yt(t),yt(e))|0}:function(t,e){n=n+sn(yt(t),yt(e))|0}:e?function(t){n=31*n+yt(t)|0}:function(t){n=n+yt(t)|0}),n)}(this))}});var Xr=I.prototype;Xr[o]=!0,Xr[B]=Xr.values,Xr.toJSON=Xr.toArray,Xr.__toStringMapper=oe,Xr.inspect=Xr.toSource=function(){return""+this},Xr.chain=Xr.flatMap,Xr.contains=Xr.includes,Ur(O,{flip:function(){return Vt(this,Ut(this))},mapEntries:function(r,n){var i=this,o=0;return Vt(this,this.toSeq().map(function(t,e){return r.call(n,[e,t],o++,i)}).fromEntrySeq())},mapKeys:function(r,n){var i=this;return Vt(this,this.toSeq().flip().map(function(t,e){return r.call(n,t,e,i)}).flip())}});var Fr=O.prototype;Fr[s]=!0,Fr[B]=Xr.entries,Fr.toJSON=Qr,Fr.__toStringMapper=function(t,e){return oe(e)+": "+oe(t)},Ur(E,{toKeyedSeq:function(){return new xt(this,!1)},filter:function(t,e){return Vt(this,Ct(this,t,e,!1))},findIndex:function(t,e){e=this.findEntry(t,e);return e?e[0]:-1},indexOf:function(t){t=this.keyOf(t);return void 0===t?-1:t},lastIndexOf:function(t){t=this.lastKeyOf(t);return void 0===t?-1:t},reverse:function(){return Vt(this,Tt(this,!1))},slice:function(t,e){return Vt(this,Lt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=y(t,t<0?this.count(
|
|
51
|
+
):this.size);var n=this.slice(0,t);return Vt(this,1===r?n:n.concat(Zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){e=this.findLastEntry(t,e);return e?e[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Vt(this,Pt(this,t,!1))},get:function(r,t){return(r=h(this,r))<0||this.size===1/0||void 0!==this.size&&this.size<r?t:this.find(function(t,e){return e===r},void 0,t)},has:function(t){return 0<=(t=h(this,t))&&(void 0!==this.size?this.size===1/0||t<this.size:!!~this.indexOf(t))},interpose:function(t){return Vt(this,(u=t,(t=Xt(o=this)).size=o.size&&2*o.size-1,t.__iterateUncached=function(e,t){var r=this,n=0;return o.__iterate(function(t){return(!n||!1!==e(u,n++,r))&&!1!==e(t,n++,r)},t),n},t.__iteratorUncached=function(t,e){var r,n=o.__iterator(K,e),i=0;return new P(function(){return(!r||i%2)&&(r=n.next()).done?r:i%2?W(t,i++,u):W(t,i++,r.value,r)})},t));var o,u},interleave:function(){var t=[this].concat(Zt(arguments)),e=Jt(this.toSeq(),Z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Vt(this,r)},keySeq:function(){return Hr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Vt(this,Bt(this,t,e,!1))},zip:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t))},zipAll:function(){var t=[this].concat(Zt(arguments));return Vt(this,Jt(this,on,t,!0))},zipWith:function(t){var e=Zt(arguments);return Vt(e[0]=this,Jt(this,t,e))}});var Gr=E.prototype;Gr[S]=!0,Gr[k]=!0,Ur(j,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Zr=j.prototype;function $r(t,n,i,o,u,e){return te(t.size),t.__iterate(function(t,e,r){i=u?(u=!1,t):n.call(o,i,t,e,r)},e),i}function tn(t,e){return e}function en(t,e){return[e,t]}function rn(t){return function(){return!t.apply(this,arguments)}}function nn(t){return function(){return-t.apply(this,arguments)}}function on(){return Zt(arguments)}function un(t,e){return t<e?1:e<t?-1:0}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2
|
|
52
|
+
)|0}Zr.has=Xr.includes,Zr.contains=Zr.includes,Zr.keys=Zr.values,Ur(G,Fr),Ur(Z,Gr),Ur($,Zr);var an=function(t){function e(r){return null==r?_n():kr(r)?r:_n().withMutations(function(e){var t=j(r);te(t.size),t.forEach(function(t){return e.add(t)})})}return t&&(e.__proto__=t),((e.prototype=Object.create(t&&t.prototype)).constructor=e).of=function(){return this(arguments)},e.fromKeys=function(t){return this(O(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Tr);an.isOrderedSet=kr;var cn,fn=an.prototype;function hn(t,e){var r=Object.create(fn);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function _n(){return cn=cn||hn(zr())}fn[k]=!0,fn.zip=Gr.zip,fn.zipWith=Gr.zipWith,fn.zipAll=Gr.zipAll,fn.__empty=_n,fn.__make=hn;Gr=function(u,s){var a;!function(t){if(x(t))throw Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(A(t))throw Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(u);var c=function(t){var n=this;if(t instanceof c)return t;if(!(this instanceof c))return new c(t);if(!a){a=!0;var e=Object.keys(u),r=f._indices={};f._name=s,f._keys=e,f._defaultValues=u;for(var i=0;i<e.length;i++){var o=e[i];r[o]=i,f[o]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+vn(this)+' with property "'+o+'" since that property name is part of the Record API.'):function(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){$t(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}(f,o)}}return this.__ownerID=void 0,this._values=ur().withMutations(function(r){r.setSize(n._keys.length),O(t).forEach(function(t,e){r.set(n._indices[e],t===n._defaultValues[e]?void 0:t)})}),this},f=c.prototype=Object.create(pn);return f.constructor=c,s&&(
|
|
53
|
+
c.displayName=s),c};Gr.prototype.toString=function(){for(var t,e=vn(this)+" { ",r=this._keys,n=0,i=r.length;n!==i;n++)e+=(n?", ":"")+(t=r[n])+": "+oe(this.get(t));return e+" }"},Gr.prototype.equals=function(t){return this===t||x(t)&&yn(this).equals(yn(t))},Gr.prototype.hashCode=function(){return yn(this).hashCode()},Gr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Gr.prototype.get=function(t,e){if(!this.has(t))return e;e=this._values.get(this._indices[t]);return void 0===e?this._defaultValues[t]:e},Gr.prototype.set=function(t,e){if(this.has(t)){e=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(e!==this._values&&!this.__ownerID)return ln(this,e)}return this},Gr.prototype.remove=function(t){return this.set(t)},Gr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:ln(this,t)},Gr.prototype.wasAltered=function(){return this._values.wasAltered()},Gr.prototype.toSeq=function(){return yn(this)},Gr.prototype.toJS=function(){return Kr(this)},Gr.prototype.entries=function(){return this.__iterator(T)},Gr.prototype.__iterator=function(t,e){return yn(this).__iterator(t,e)},Gr.prototype.__iterate=function(t,e){return yn(this).__iterate(t,e)},Gr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?ln(this,e,t):(this.__ownerID=t,this._values=e,this)},Gr.isRecord=x,Gr.getDescriptiveName=vn;var pn=Gr.prototype;function ln(t,e,r){t=Object.create(Object.getPrototypeOf(t));return t._values=e,t.__ownerID=r,t}function vn(t){return t.constructor.displayName||t.constructor.name||"Record"}function yn(e){return ot(e._keys.map(function(t){return[t,e.get(t)]}))}pn[D]=!0,pn[e]=pn.remove,pn.deleteIn=pn.removeIn=ve,pn.getIn=Vr,pn.hasIn=Xr.hasIn,pn.merge=me,pn.mergeWith=we,pn.mergeIn=De,pn.mergeDeep=qe,pn.mergeDeepWith=Me,pn.mergeDeepIn=xe,pn.setIn=pe,pn.update=de,pn.updateIn=ge,pn.withMutations=Ae,pn.asMutable=ke,pn.asImmutable=Re,pn[B]=pn.entries,pn.toJSON=pn.toObject=Xr.toObject,
|
|
54
|
+
pn.inspect=pn.toSource=function(){return""+this};var dn,e=function(t){function n(t,e){if(!(this instanceof n))return new n(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(dn)return dn;dn=this}}return t&&(n.__proto__=t),((n.prototype=Object.create(t&&t.prototype)).constructor=n).prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},n.prototype.get=function(t,e){return this.has(t)?this._value:e},n.prototype.includes=function(t){return _t(this._value,t)},n.prototype.slice=function(t,e){var r=this.size;return p(t,e,r)?this:new n(this._value,w(e,r)-y(t,r))},n.prototype.reverse=function(){return this},n.prototype.indexOf=function(t){return _t(this._value,t)?0:-1},n.prototype.lastIndexOf=function(t){return _t(this._value,t)?this.size:-1},n.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},n.prototype.__iterator=function(t,e){var r=this,n=this.size,i=0;return new P(function(){return i===n?N():W(t,e?n-++i:i++,r._value)})},n.prototype.equals=function(t){return t instanceof n?_t(this._value,t._value):Rr(t)},n}(Z);function gn(t,e){return function r(n,i,o,t,u,e){if("string"!=typeof o&&!A(o)&&(X(o)||H(o)||ne(o))){if(~n.indexOf(o))throw new TypeError("Cannot convert circular structure to Immutable");n.push(o),u&&""!==t&&u.push(t);var t=i.call(e,t,F(o).map(function(t,e){return r(n,i,t,e,u,o)}),u&&u.slice());return n.pop(),u&&u.pop(),t}return o}([],e||mn,t,"",e&&2<e.length?[]:void 0,{"":t})}function mn(t,e){return z(e)?e.toList():a(e)?e.toMap():e.toSet()}B={version:"4.2.0",Collection:I,Iterable:I,Seq:F,Map:Ke,OrderedMap:wr,List:ur,Stack:Er,Set:Tr,OrderedSet:an,Record:Gr,Range:Hr,Repeat:e,is:_t,fromJS:gn,hash:yt,isImmutable:A,isCollection:f,isKeyed:a,isIndexed:z,isAssociative:b,isOrdered:R,isValueObject:ht,isPlainObject:ne,isSeq:M,isList:or,isMap:ct,isOrderedMap:ft,isStack:Or,isSet:Ar,isOrderedSet:kr,isRecord:x,get:se,getIn:Jr,has:ue,hasIn:Yr,merge:ze,mergeDeep:Ie,mergeWith:be,
|
|
55
|
+
mergeDeepWith:Oe,remove:ce,removeIn:le,set:fe,setIn:_e,update:ye,updateIn:he},Xr=I;t.Collection=I,t.Iterable=Xr,t.List=ur,t.Map=Ke,t.OrderedMap=wr,t.OrderedSet=an,t.Range=Hr,t.Record=Gr,t.Repeat=e,t.Seq=F,t.Set=Tr,t.Stack=Er,t.default=B,t.fromJS=gn,t.get=se,t.getIn=Jr,t.has=ue,t.hasIn=Yr,t.hash=yt,t.is=_t,t.isAssociative=b,t.isCollection=f,t.isImmutable=A,t.isIndexed=z,t.isKeyed=a,t.isList=or,t.isMap=ct,t.isOrdered=R,t.isOrderedMap=ft,t.isOrderedSet=kr,t.isPlainObject=ne,t.isRecord=x,t.isSeq=M,t.isSet=Ar,t.isStack=Or,t.isValueObject=ht,t.merge=ze,t.mergeDeep=Ie,t.mergeDeepWith=Oe,t.mergeWith=be,t.remove=ce,t.removeIn=le,t.set=fe,t.setIn=_e,t.update=ye,t.updateIn=he,t.version="4.2.0",Object.defineProperty(t,"__esModule",{value:!0})});
|