immutable 4.0.0-rc.8 → 4.0.0-rc.9
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 +1 -1
- package/dist/immutable-nonambient.d.ts +464 -466
- package/dist/immutable.d.ts +464 -466
- package/dist/immutable.es.js +1 -1
- package/dist/immutable.js +1 -1
- package/dist/immutable.js.flow +49 -39
- package/dist/immutable.min.js +1 -1
- package/package.json +1 -1
package/dist/immutable.es.js
CHANGED
package/dist/immutable.js
CHANGED
package/dist/immutable.js.flow
CHANGED
|
@@ -49,6 +49,12 @@ type $ValOf<C, K = $KeyOf<C>> = $Call<
|
|
|
49
49
|
K
|
|
50
50
|
>;
|
|
51
51
|
|
|
52
|
+
type $IterableOf<C> = $Call<
|
|
53
|
+
& (<V: Array<any> | IndexedCollection<any> | SetCollection<any>>(V) => Iterable<$ValOf<V>>)
|
|
54
|
+
& (<V: KeyedCollection<any, any> | RecordInstance<any> | PlainObjInput<any, any>>(V) => Iterable<[$KeyOf<V>, $ValOf<V>]>),
|
|
55
|
+
C
|
|
56
|
+
>;
|
|
57
|
+
|
|
52
58
|
declare class _Collection<K, +V> /*implements ValueObject*/ {
|
|
53
59
|
equals(other: mixed): boolean;
|
|
54
60
|
hashCode(): number;
|
|
@@ -1372,6 +1378,10 @@ type RecordFactory<Values: Object> = Class<RecordInstance<Values>>;
|
|
|
1372
1378
|
// The type of runtime Record instances.
|
|
1373
1379
|
type RecordOf<Values: Object> = RecordInstance<Values> & Values;
|
|
1374
1380
|
|
|
1381
|
+
// The values of a Record instance.
|
|
1382
|
+
type _RecordValues<T, R: RecordInstance<T> | T> = R;
|
|
1383
|
+
type RecordValues<R> = _RecordValues<*, R>;
|
|
1384
|
+
|
|
1375
1385
|
declare function isRecord(maybeRecord: any): boolean %checks(maybeRecord instanceof RecordInstance);
|
|
1376
1386
|
declare class Record {
|
|
1377
1387
|
static <Values: Object>(spec: Values, name?: string): RecordFactory<Values>;
|
|
@@ -1383,10 +1393,10 @@ declare class Record {
|
|
|
1383
1393
|
}
|
|
1384
1394
|
|
|
1385
1395
|
declare class RecordInstance<T: Object> {
|
|
1386
|
-
static (values?:
|
|
1396
|
+
static (values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): RecordOf<T>;
|
|
1387
1397
|
// Note: a constructor can only create an instance of RecordInstance<T>,
|
|
1388
1398
|
// it's encouraged to not use `new` when creating Records.
|
|
1389
|
-
constructor (values?:
|
|
1399
|
+
constructor (values?: Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>): void;
|
|
1390
1400
|
|
|
1391
1401
|
size: number;
|
|
1392
1402
|
|
|
@@ -1397,26 +1407,26 @@ declare class RecordInstance<T: Object> {
|
|
|
1397
1407
|
|
|
1398
1408
|
getIn(keyPath: [], notSetValue?: mixed): this & T;
|
|
1399
1409
|
getIn<K: $Keys<T>>(keyPath: [K], notSetValue?: mixed): $ElementType<T, K>;
|
|
1400
|
-
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1401
|
-
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1402
|
-
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1403
|
-
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1410
|
+
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2], notSetValue: NSV): $ValOf<$ValOf<T, K>, K2> | NSV;
|
|
1411
|
+
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3], notSetValue: NSV): $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV;
|
|
1412
|
+
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>>(keyPath: [K, K2, K3, K4], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV;
|
|
1413
|
+
getIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5], notSetValue: NSV): $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV;
|
|
1404
1414
|
|
|
1405
1415
|
equals(other: any): boolean;
|
|
1406
1416
|
hashCode(): number;
|
|
1407
1417
|
|
|
1408
1418
|
set<K: $Keys<T>>(key: K, value: $ElementType<T, K>): this & T;
|
|
1409
1419
|
update<K: $Keys<T>>(key: K, updater: (value: $ElementType<T, K>) => $ElementType<T, K>): this & T;
|
|
1410
|
-
merge(...collections: Array
|
|
1411
|
-
mergeDeep(...collections: Array
|
|
1420
|
+
merge(...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>): this & T;
|
|
1421
|
+
mergeDeep(...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>): this & T;
|
|
1412
1422
|
|
|
1413
1423
|
mergeWith(
|
|
1414
|
-
merger: (oldVal:
|
|
1415
|
-
...collections: Array
|
|
1424
|
+
merger: (oldVal: $ValOf<T>, newVal: $ValOf<T>, key: $Keys<T>) => $ValOf<T>,
|
|
1425
|
+
...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
|
|
1416
1426
|
): this & T;
|
|
1417
1427
|
mergeDeepWith(
|
|
1418
1428
|
merger: (oldVal: any, newVal: any, key: any) => any,
|
|
1419
|
-
...collections: Array
|
|
1429
|
+
...collections: Array<Iterable<[$Keys<T>, $ValOf<T>]> | $Shape<T>>
|
|
1420
1430
|
): this & T;
|
|
1421
1431
|
|
|
1422
1432
|
delete<K: $Keys<T>>(key: K): this & T;
|
|
@@ -1424,38 +1434,38 @@ declare class RecordInstance<T: Object> {
|
|
|
1424
1434
|
clear(): this & T;
|
|
1425
1435
|
|
|
1426
1436
|
setIn<S>(keyPath: [], value: S): S;
|
|
1427
|
-
setIn<K: $Keys<T>, S: $
|
|
1428
|
-
setIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1429
|
-
setIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1430
|
-
setIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1431
|
-
setIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1437
|
+
setIn<K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], value: S): this & T;
|
|
1438
|
+
setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], value: S): this & T;
|
|
1439
|
+
setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], value: S): this & T;
|
|
1440
|
+
setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], value: S): this & T;
|
|
1441
|
+
setIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], value: S): this & T;
|
|
1432
1442
|
|
|
1433
1443
|
deleteIn(keyPath: []): void;
|
|
1434
1444
|
deleteIn<K: $Keys<T>>(keyPath: [K]): this & T;
|
|
1435
|
-
deleteIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1436
|
-
deleteIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1437
|
-
deleteIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1438
|
-
deleteIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1445
|
+
deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2]): this & T;
|
|
1446
|
+
deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3]): this & T;
|
|
1447
|
+
deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>>(keyPath: [K, K2, K3, K4]): this & T;
|
|
1448
|
+
deleteIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5]): this & T;
|
|
1439
1449
|
|
|
1440
1450
|
removeIn(keyPath: []): void;
|
|
1441
1451
|
removeIn<K: $Keys<T>>(keyPath: [K]): this & T;
|
|
1442
|
-
removeIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1443
|
-
removeIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1444
|
-
removeIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1445
|
-
removeIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1452
|
+
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>>(keyPath: [K, K2]): this & T;
|
|
1453
|
+
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>>(keyPath: [K, K2, K3]): this & T;
|
|
1454
|
+
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>>(keyPath: [K, K2, K3, K4]): this & T;
|
|
1455
|
+
removeIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>>(keyPath: [K, K2, K3, K4, K5]): this & T;
|
|
1446
1456
|
|
|
1447
1457
|
updateIn<U>(keyPath: [], notSetValue: mixed, updater: (value: this) => U): U;
|
|
1448
1458
|
updateIn<U>(keyPath: [], updater: (value: this) => U): U;
|
|
1449
|
-
updateIn<NSV, K: $Keys<T>, S: $
|
|
1450
|
-
updateIn<K: $Keys<T>, S: $
|
|
1451
|
-
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1452
|
-
updateIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1453
|
-
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1454
|
-
updateIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1455
|
-
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1456
|
-
updateIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1457
|
-
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$
|
|
1458
|
-
updateIn<K: $Keys<T>, K2: $KeyOf<$
|
|
1459
|
+
updateIn<NSV, K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], notSetValue: NSV, updater: (value: $ValOf<T, K>) => S): this & T;
|
|
1460
|
+
updateIn<K: $Keys<T>, S: $ValOf<T, K>>(keyPath: [K], updater: (value: $ValOf<T, K>) => S): this & T;
|
|
1461
|
+
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], notSetValue: NSV, updater: (value: $ValOf<$ValOf<T, K>, K2> | NSV) => S): this & T;
|
|
1462
|
+
updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, S: $ValOf<$ValOf<T, K>, K2>>(keyPath: [K, K2], updater: (value: $ValOf<$ValOf<T, K>, K2>) => S): this & T;
|
|
1463
|
+
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3> | NSV) => S): this & T;
|
|
1464
|
+
updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, S: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>(keyPath: [K, K2, K3], updater: (value: $ValOf<$ValOf<$ValOf<T, K>, K2>, K3>) => S): this & T;
|
|
1465
|
+
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4> | NSV) => S): this & T;
|
|
1466
|
+
updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, S: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>(keyPath: [K, K2, K3, K4], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>) => S): this & T;
|
|
1467
|
+
updateIn<NSV, K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], notSetValue: NSV, updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5> | NSV) => S): this & T;
|
|
1468
|
+
updateIn<K: $Keys<T>, K2: $KeyOf<$ValOf<T, K>>, K3: $KeyOf<$ValOf<$ValOf<T, K>, K2>>, K4: $KeyOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>>, K5: $KeyOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>>, S: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>>(keyPath: [K, K2, K3, K4, K5], updater: (value: $ValOf<$ValOf<$ValOf<$ValOf<$ValOf<T, K>, K2>, K3>, K4>, K5>) => S): this & T;
|
|
1459
1469
|
|
|
1460
1470
|
mergeIn(keyPath: Iterable<mixed>, ...collections: Array<any>): this & T;
|
|
1461
1471
|
mergeDeepIn(keyPath: Iterable<mixed>, ...collections: Array<any>): this & T;
|
|
@@ -1471,7 +1481,7 @@ declare class RecordInstance<T: Object> {
|
|
|
1471
1481
|
wasAltered(): boolean;
|
|
1472
1482
|
asImmutable(): this & T;
|
|
1473
1483
|
|
|
1474
|
-
@@iterator(): Iterator<[$Keys<T>,
|
|
1484
|
+
@@iterator(): Iterator<[$Keys<T>, $ValOf<T>]>;
|
|
1475
1485
|
}
|
|
1476
1486
|
|
|
1477
1487
|
declare function fromJS(
|
|
@@ -1533,21 +1543,21 @@ declare function updateIn<C, K: $KeyOf<C>, K2: $KeyOf<$ValOf<C, K>>, K3: $KeyOf<
|
|
|
1533
1543
|
|
|
1534
1544
|
declare function merge<C>(
|
|
1535
1545
|
collection: C,
|
|
1536
|
-
...collections: Array
|
|
1546
|
+
...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
|
|
1537
1547
|
): C;
|
|
1538
1548
|
declare function mergeWith<C>(
|
|
1539
1549
|
merger: (oldVal: $ValOf<C>, newVal: $ValOf<C>, key: $KeyOf<C>) => $ValOf<C>,
|
|
1540
1550
|
collection: C,
|
|
1541
|
-
...collections: Array
|
|
1551
|
+
...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
|
|
1542
1552
|
): C;
|
|
1543
1553
|
declare function mergeDeep<C>(
|
|
1544
1554
|
collection: C,
|
|
1545
|
-
...collections: Array
|
|
1555
|
+
...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
|
|
1546
1556
|
): C;
|
|
1547
1557
|
declare function mergeDeepWith<C>(
|
|
1548
1558
|
merger: (oldVal: any, newVal: any, key: any) => mixed,
|
|
1549
1559
|
collection: C,
|
|
1550
|
-
...collections: Array
|
|
1560
|
+
...collections: Array<$IterableOf<C> | $Shape<RecordValues<C>> | PlainObjInput<$KeyOf<C>, $ValOf<C>>>
|
|
1551
1561
|
): C;
|
|
1552
1562
|
|
|
1553
1563
|
export {
|
package/dist/immutable.min.js
CHANGED
|
@@ -34,5 +34,5 @@ return this.__iterator(ze)},butLast:function(){return this.slice(0,-1)},isEmpty:
|
|
|
34
34
|
return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,r){return nt(this,Q(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(Nr(t),r)},sortBy:function(t,r){return nt(this,$(this,r,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,r){return nt(this,Y(this,t,r))},takeUntil:function(t,r){return this.takeWhile(Nr(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Vr(this))}});var An=ye.prototype;An[he]=!0,An[Oe]=An.values,An.toJSON=An.toArray,An.__toStringMapper=vt,An.inspect=An.toSource=function(){return""+this},An.chain=An.flatMap,An.contains=An.includes,Mr(de,{flip:function(){return nt(this,B(this))},mapEntries:function(t,r){var e=this,n=0;return nt(this,this.toSeq().map(function(i,o){return t.call(r,[o,i],n++,e)}).fromEntrySeq())},mapKeys:function(t,r){var e=this;return nt(this,this.toSeq().flip().map(function(n,i){return t.call(r,n,i,e)}).flip())}});var jn=de.prototype;jn[pe]=!0,jn[Oe]=An.entries,jn.toJSON=Cr,jn.__toStringMapper=function(t,r){return vt(r)+": "+vt(t)},Mr(ge,{toKeyedSeq:function(){return new Xe(this,!1)},filter:function(t,r){return nt(this,P(this,t,r,!1))},findIndex:function(t,r){var e=this.findEntry(t,r);return e?e[0]:-1},indexOf:function(t){var r=this.keyOf(t);return void 0===r?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return void 0===r?-1:r},reverse:function(){return nt(this,N(this,!1))},slice:function(t,r){return nt(this,V(this,t,r,!1))},splice:function(t,r){var e=arguments.length;if(r=Math.max(r||0,0),0===e||2===e&&!r)return this;t=a(t,t<0?this.count():this.size);var n=this.slice(0,t);return nt(this,1===e?n:n.concat(ct(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var e=this.findLastEntry(t,r);return e?e[0]:-1},first:function(){return this.get(0)},flatten:function(t){return nt(this,F(this,t,!1))},get:function(t,r){return t=o(this,t),
|
|
35
35
|
t<0||this.size===1/0||void 0!==this.size&&t>this.size?r:this.find(function(r,e){return e===t},void 0,r)},has:function(t){return(t=o(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:this.indexOf(t)!==-1)},interpose:function(t){return nt(this,Z(this,t))},interleave:function(){var t=[this].concat(ct(arguments)),r=et(this.toSeq(),xe.of,t),e=r.flatten(!0);return r.size&&(e.size=r.size*t.length),nt(this,e)},keySeq:function(){return xn(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,r){return nt(this,Q(this,t,r,!1))},zip:function(){return nt(this,et(this,Jr,[this].concat(ct(arguments))))},zipAll:function(){return nt(this,et(this,Jr,[this].concat(ct(arguments)),!0))},zipWith:function(t){var r=ct(arguments);return r[0]=this,nt(this,et(this,t,r))}});var kn=ge.prototype;kn[_e]=!0,kn[le]=!0,Mr(me,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),me.prototype.has=An.includes,me.prototype.contains=me.prototype.includes,Mr(De,de.prototype),Mr(xe,ge.prototype),Mr(Ae,me.prototype);var Rn=function(t){function r(t){return null===t||void 0===t?Gr():Xr(t)?t:Gr().withMutations(function(r){var e=me(t);ht(e.size),e.forEach(function(t){return r.add(t)})})}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.of=function(){return this(arguments)},r.fromKeys=function(t){return this(de(t).keySeq())},r.prototype.toString=function(){return this.__toString("OrderedSet {","}")},r}(On);Rn.isOrderedSet=Xr;var Un=Rn.prototype;Un[le]=!0,Un.zip=kn.zip,Un.zipWith=kn.zipWith,Un.__empty=Gr,Un.__make=Fr;var Kn,Tn=function(t,r){var e,n=function(o){var u=this;if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!e){e=!0;var s=Object.keys(t),a=i._indices={};i._name=r,i._keys=s,i._defaultValues=t;for(var c=0;c<s.length;c++){var f=s[c];a[f]=c,
|
|
36
36
|
i[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+$r(u)+' with property "'+f+'" since that property name is part of the Record API.'):re(i,f)}}this.__ownerID=void 0,this._values=_n().withMutations(function(t){t.setSize(u._keys.length),de(o).forEach(function(r,e){t.set(u._indices[e],r===u._defaultValues[e]?void 0:r)})})},i=n.prototype=Object.create(Cn);return i.constructor=n,n};Tn.prototype.toString=function(){for(var t,r=this,e=$r(this)+" { ",n=this._keys,i=0,o=n.length;i!==o;i++)t=n[i],e+=(i?", ":"")+t+": "+vt(r.get(t));return e+" }"},Tn.prototype.equals=function(t){return this===t||t&&this._keys===t._keys&&te(this).equals(te(t))},Tn.prototype.hashCode=function(){return te(this).hashCode()},Tn.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Tn.prototype.get=function(t,r){if(!this.has(t))return r;var e=this._indices[t],n=this._values.get(e);return void 0===n?this._defaultValues[t]:n},Tn.prototype.set=function(t,r){if(this.has(t)){var e=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(e!==this._values&&!this.__ownerID)return Zr(this,e)}return this},Tn.prototype.remove=function(t){return this.set(t)},Tn.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Zr(this,t)},Tn.prototype.wasAltered=function(){return this._values.wasAltered()},Tn.prototype.toSeq=function(){return te(this)},Tn.prototype.toJS=function(){return Dr(this)},Tn.prototype.entries=function(){return this.__iterator(Se)},Tn.prototype.__iterator=function(t,r){return te(this).__iterator(t,r)},Tn.prototype.__iterate=function(t,r){return te(this).__iterate(t,r)},Tn.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?Zr(this,r,t):(this.__ownerID=t,this._values=r,this)},Tn.isRecord=g,Tn.getDescriptiveName=$r;var Cn=Tn.prototype;Cn[ve]=!0,Cn.delete=Cn.remove,Cn.deleteIn=Cn.removeIn=Et,Cn.getIn=Ur,Cn.hasIn=An.hasIn,Cn.merge=xt,Cn.mergeWith=At,Cn.mergeIn=Nt,Cn.mergeDeep=Bt,
|
|
37
|
-
Cn.mergeDeepWith=Wt,Cn.mergeDeepIn=Pt,Cn.setIn=bt,Cn.update=Mt,Cn.updateIn=Dt,Cn.withMutations=Jt,Cn.asMutable=Ht,Cn.asImmutable=Vt,Cn[Oe]=Cn.entries,Cn.toJSON=Cn.toObject=An.toObject,Cn.inspect=Cn.toSource=function(){return""+this};var Ln,Bn=function(t){function r(t,e){if(!(this instanceof r))return new r(t,e);if(this._value=t,0===(this.size=void 0===e?1/0:Math.max(0,e))){if(Ln)return Ln;Ln=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(t,r){return this.has(t)?this._value:r},r.prototype.includes=function(t){return k(this._value,t)},r.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new r(this._value,c(e,n)-a(t,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(t){return k(this._value,t)?0:-1},r.prototype.lastIndexOf=function(t){return k(this._value,t)?this.size:-1},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=0;i!==n&&t(e._value,r?n-++i:i++,e)!==!1;);return i},r.prototype.__iterator=function(t,r){var e=this,n=this.size,i=0;return new Ee(function(){return i===n?z():w(t,r?n-++i:i++,e._value)})},r.prototype.equals=function(t){return t instanceof r?k(this._value,t._value):qr(t)},r}(xe),Wn={version:"4.0.0-rc.
|
|
37
|
+
Cn.mergeDeepWith=Wt,Cn.mergeDeepIn=Pt,Cn.setIn=bt,Cn.update=Mt,Cn.updateIn=Dt,Cn.withMutations=Jt,Cn.asMutable=Ht,Cn.asImmutable=Vt,Cn[Oe]=Cn.entries,Cn.toJSON=Cn.toObject=An.toObject,Cn.inspect=Cn.toSource=function(){return""+this};var Ln,Bn=function(t){function r(t,e){if(!(this instanceof r))return new r(t,e);if(this._value=t,0===(this.size=void 0===e?1/0:Math.max(0,e))){if(Ln)return Ln;Ln=this}}return t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},r.prototype.get=function(t,r){return this.has(t)?this._value:r},r.prototype.includes=function(t){return k(this._value,t)},r.prototype.slice=function(t,e){var n=this.size;return s(t,e,n)?this:new r(this._value,c(e,n)-a(t,n))},r.prototype.reverse=function(){return this},r.prototype.indexOf=function(t){return k(this._value,t)?0:-1},r.prototype.lastIndexOf=function(t){return k(this._value,t)?this.size:-1},r.prototype.__iterate=function(t,r){for(var e=this,n=this.size,i=0;i!==n&&t(e._value,r?n-++i:i++,e)!==!1;);return i},r.prototype.__iterator=function(t,r){var e=this,n=this.size,i=0;return new Ee(function(){return i===n?z():w(t,r?n-++i:i++,e._value)})},r.prototype.equals=function(t){return t instanceof r?k(this._value,t._value):qr(t)},r}(xe),Wn={version:"4.0.0-rc.9",Collection:ye,Iterable:ye,Seq:Me,Map:$e,OrderedMap:mn,List:_n,Stack:zn,Set:On,OrderedSet:Rn,Record:Tn,Range:xn,Repeat:Bn,is:k,fromJS:ee,hash:U,isImmutable:p,isCollection:_,isKeyed:l,isIndexed:v,isAssociative:y,isOrdered:d,isValueObject:m,get:dt,getIn:Rr,has:yt,hasIn:Kr,merge:kt,mergeDeep:Ut,mergeWith:Rt,mergeDeepWith:Kt,remove:mt,removeIn:Ot,set:wt,setIn:It,update:qt,updateIn:zt},Nn=ye;t.default=Wn,t.version="4.0.0-rc.9",t.Collection=ye,t.Iterable=Nn,t.Seq=Me,t.Map=$e,t.OrderedMap=mn,t.List=_n,t.Stack=zn,t.Set=On,t.OrderedSet=Rn,t.Record=Tn,t.Range=xn,t.Repeat=Bn,t.is=k,t.fromJS=ee,t.hash=U,t.isImmutable=p,t.isCollection=_,t.isKeyed=l,t.isIndexed=v,
|
|
38
38
|
t.isAssociative=y,t.isOrdered=d,t.isValueObject=m,t.get=dt,t.getIn=Rr,t.has=yt,t.hasIn=Kr,t.merge=kt,t.mergeDeep=Ut,t.mergeWith=Rt,t.mergeDeepWith=Kt,t.remove=mt,t.removeIn=Ot,t.set=wt,t.setIn=It,t.update=qt,t.updateIn=zt,Object.defineProperty(t,"__esModule",{value:!0})});
|