@@ -62,13 +62,18 @@ return /******/ (function(modules) { // webpackBootstrap
62
62
63
63
var _immutable2 = _interopRequireDefault ( _immutable ) ;
64
64
65
- var _map = __webpack_require__ ( 2 ) ;
65
+ var _list = __webpack_require__ ( 2 ) ;
66
+
67
+ var _list2 = _interopRequireDefault ( _list ) ;
68
+
69
+ var _map = __webpack_require__ ( 3 ) ;
66
70
67
71
var _map2 = _interopRequireDefault ( _map ) ;
68
72
69
73
function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
70
74
71
75
module . exports = _extends ( { } , _immutable2 . default , {
76
+ List : _list2 . default ,
72
77
Map : _map2 . default
73
78
} ) ;
74
79
@@ -88,7 +93,7 @@ return /******/ (function(modules) { // webpackBootstrap
88
93
( function ( global , factory ) {
89
94
true ? module . exports = factory ( ) :
90
95
typeof define === 'function' && define . amd ? define ( factory ) :
91
- global . Immutable = factory ( ) ;
96
+ ( global . Immutable = factory ( ) ) ;
92
97
} ( this , function ( ) { 'use strict' ; var SLICE$0 = Array . prototype . slice ;
93
98
94
99
function createClass ( ctor , superClass ) {
@@ -983,7 +988,7 @@ return /******/ (function(modules) { // webpackBootstrap
983
988
}
984
989
return 'Range [ ' +
985
990
this . _start + '...' + this . _end +
986
- ( this . _step > 1 ? ' by ' + this . _step : '' ) +
991
+ ( this . _step !== 1 ? ' by ' + this . _step : '' ) +
987
992
' ]' ;
988
993
} ;
989
994
@@ -1115,6 +1120,9 @@ return /******/ (function(modules) { // webpackBootstrap
1115
1120
}
1116
1121
var type = typeof o ;
1117
1122
if ( type === 'number' ) {
1123
+ if ( o !== o || o === Infinity ) {
1124
+ return 0 ;
1125
+ }
1118
1126
var h = o | 0 ;
1119
1127
if ( h !== o ) {
1120
1128
h ^= o * 0xFFFFFFFF ;
@@ -1300,6 +1308,17 @@ return /******/ (function(modules) { // webpackBootstrap
1300
1308
} ) ;
1301
1309
}
1302
1310
1311
+ Map . of = function ( ) { var keyValues = SLICE$0 . call ( arguments , 0 ) ;
1312
+ return emptyMap ( ) . withMutations ( function ( map ) {
1313
+ for ( var i = 0 ; i < keyValues . length ; i += 2 ) {
1314
+ if ( i + 1 >= keyValues . length ) {
1315
+ throw new Error ( 'Missing value for key: ' + keyValues [ i ] ) ;
1316
+ }
1317
+ map . set ( keyValues [ i ] , keyValues [ i + 1 ] ) ;
1318
+ }
1319
+ } ) ;
1320
+ } ;
1321
+
1303
1322
Map . prototype . toString = function ( ) {
1304
1323
return this . __toString ( 'Map {' , '}' ) ;
1305
1324
} ;
@@ -3212,7 +3231,11 @@ return /******/ (function(modules) { // webpackBootstrap
3212
3231
begin = begin | 0 ;
3213
3232
}
3214
3233
if ( end !== undefined ) {
3215
- end = end | 0 ;
3234
+ if ( end === Infinity ) {
3235
+ end = originalSize ;
3236
+ } else {
3237
+ end = end | 0 ;
3238
+ }
3216
3239
}
3217
3240
3218
3241
if ( wholeSlice ( begin , end , originalSize ) ) {
@@ -3749,6 +3772,12 @@ return /******/ (function(modules) { // webpackBootstrap
3749
3772
if ( ! this . has ( k ) ) {
3750
3773
throw new Error ( 'Cannot set unknown key "' + k + '" on ' + recordName ( this ) ) ;
3751
3774
}
3775
+ if ( this . _map && ! this . _map . has ( k ) ) {
3776
+ var defaultVal = this . _defaultValues [ k ] ;
3777
+ if ( v === defaultVal ) {
3778
+ return this ;
3779
+ }
3780
+ }
3752
3781
var newMap = this . _map && this . _map . set ( k , v ) ;
3753
3782
if ( this . __ownerID || newMap === this . _map ) {
3754
3783
return this ;
@@ -4432,21 +4461,6 @@ return /******/ (function(modules) { // webpackBootstrap
4432
4461
return entry ? entry [ 1 ] : notSetValue ;
4433
4462
} ,
4434
4463
4435
- findEntry : function ( predicate , context ) {
4436
- var found ;
4437
- this . __iterate ( function ( v , k , c ) {
4438
- if ( predicate . call ( context , v , k , c ) ) {
4439
- found = [ k , v ] ;
4440
- return false ;
4441
- }
4442
- } ) ;
4443
- return found ;
4444
- } ,
4445
-
4446
- findLastEntry : function ( predicate , context ) {
4447
- return this . toSeq ( ) . reverse ( ) . findEntry ( predicate , context ) ;
4448
- } ,
4449
-
4450
4464
forEach : function ( sideEffect , context ) {
4451
4465
assertNotInfinite ( this . size ) ;
4452
4466
return this . __iterate ( context ? sideEffect . bind ( context ) : sideEffect ) ;
@@ -4557,10 +4571,34 @@ return /******/ (function(modules) { // webpackBootstrap
4557
4571
return this . filter ( not ( predicate ) , context ) ;
4558
4572
} ,
4559
4573
4574
+ findEntry : function ( predicate , context , notSetValue ) {
4575
+ var found = notSetValue ;
4576
+ this . __iterate ( function ( v , k , c ) {
4577
+ if ( predicate . call ( context , v , k , c ) ) {
4578
+ found = [ k , v ] ;
4579
+ return false ;
4580
+ }
4581
+ } ) ;
4582
+ return found ;
4583
+ } ,
4584
+
4585
+ findKey : function ( predicate , context ) {
4586
+ var entry = this . findEntry ( predicate , context ) ;
4587
+ return entry && entry [ 0 ] ;
4588
+ } ,
4589
+
4560
4590
findLast : function ( predicate , context , notSetValue ) {
4561
4591
return this . toKeyedSeq ( ) . reverse ( ) . find ( predicate , context , notSetValue ) ;
4562
4592
} ,
4563
4593
4594
+ findLastEntry : function ( predicate , context , notSetValue ) {
4595
+ return this . toKeyedSeq ( ) . reverse ( ) . findEntry ( predicate , context , notSetValue ) ;
4596
+ } ,
4597
+
4598
+ findLastKey : function ( predicate , context ) {
4599
+ return this . toKeyedSeq ( ) . reverse ( ) . findKey ( predicate , context ) ;
4600
+ } ,
4601
+
4564
4602
first : function ( ) {
4565
4603
return this . find ( returnTrue ) ;
4566
4604
} ,
@@ -4619,6 +4657,10 @@ return /******/ (function(modules) { // webpackBootstrap
4619
4657
return iter . isSubset ( this ) ;
4620
4658
} ,
4621
4659
4660
+ keyOf : function ( searchValue ) {
4661
+ return this . findKey ( function ( value ) { return is ( value , searchValue ) } ) ;
4662
+ } ,
4663
+
4622
4664
keySeq : function ( ) {
4623
4665
return this . toSeq ( ) . map ( keyMapper ) . toIndexedSeq ( ) ;
4624
4666
} ,
@@ -4627,6 +4669,10 @@ return /******/ (function(modules) { // webpackBootstrap
4627
4669
return this . toSeq ( ) . reverse ( ) . first ( ) ;
4628
4670
} ,
4629
4671
4672
+ lastKeyOf : function ( searchValue ) {
4673
+ return this . toKeyedSeq ( ) . reverse ( ) . keyOf ( searchValue ) ;
4674
+ } ,
4675
+
4630
4676
max : function ( comparator ) {
4631
4677
return maxFactory ( this , comparator ) ;
4632
4678
} ,
@@ -4717,35 +4763,6 @@ return /******/ (function(modules) { // webpackBootstrap
4717
4763
IterablePrototype . chain = IterablePrototype . flatMap ;
4718
4764
IterablePrototype . contains = IterablePrototype . includes ;
4719
4765
4720
- // Temporary warning about using length
4721
- ( function ( ) {
4722
- try {
4723
- Object . defineProperty ( IterablePrototype , 'length' , {
4724
- get : function ( ) {
4725
- if ( ! Iterable . noLengthWarning ) {
4726
- var stack ;
4727
- try {
4728
- throw new Error ( ) ;
4729
- } catch ( error ) {
4730
- stack = error . stack ;
4731
- }
4732
- if ( stack . indexOf ( '_wrapObject' ) === - 1 ) {
4733
- console && console . warn && console . warn (
4734
- 'iterable.length has been deprecated, ' +
4735
- 'use iterable.size or iterable.count(). ' +
4736
- 'This warning will become a silent error in a future version. ' +
4737
- stack
4738
- ) ;
4739
- return this . size ;
4740
- }
4741
- }
4742
- }
4743
- } ) ;
4744
- } catch ( e ) { }
4745
- } ) ( ) ;
4746
-
4747
-
4748
-
4749
4766
mixin ( KeyedIterable , {
4750
4767
4751
4768
// ### More sequential methods
@@ -4754,23 +4771,6 @@ return /******/ (function(modules) { // webpackBootstrap
4754
4771
return reify ( this , flipFactory ( this ) ) ;
4755
4772
} ,
4756
4773
4757
- findKey : function ( predicate , context ) {
4758
- var entry = this . findEntry ( predicate , context ) ;
4759
- return entry && entry [ 0 ] ;
4760
- } ,
4761
-
4762
- findLastKey : function ( predicate , context ) {
4763
- return this . toSeq ( ) . reverse ( ) . findKey ( predicate , context ) ;
4764
- } ,
4765
-
4766
- keyOf : function ( searchValue ) {
4767
- return this . findKey ( function ( value ) { return is ( value , searchValue ) } ) ;
4768
- } ,
4769
-
4770
- lastKeyOf : function ( searchValue ) {
4771
- return this . findLastKey ( function ( value ) { return is ( value , searchValue ) } ) ;
4772
- } ,
4773
-
4774
4774
mapEntries : function ( mapper , context ) { var this$0 = this ;
4775
4775
var iterations = 0 ;
4776
4776
return reify ( this ,
@@ -4819,16 +4819,13 @@ return /******/ (function(modules) { // webpackBootstrap
4819
4819
} ,
4820
4820
4821
4821
indexOf : function ( searchValue ) {
4822
- var key = this . toKeyedSeq ( ) . keyOf ( searchValue ) ;
4822
+ var key = this . keyOf ( searchValue ) ;
4823
4823
return key === undefined ? - 1 : key ;
4824
4824
} ,
4825
4825
4826
4826
lastIndexOf : function ( searchValue ) {
4827
- var key = this . toKeyedSeq ( ) . reverse ( ) . keyOf ( searchValue ) ;
4827
+ var key = this . lastKeyOf ( searchValue ) ;
4828
4828
return key === undefined ? - 1 : key ;
4829
-
4830
- // var index =
4831
- // return this.toSeq().reverse().indexOf(searchValue);
4832
4829
} ,
4833
4830
4834
4831
reverse : function ( ) {
@@ -4862,8 +4859,8 @@ return /******/ (function(modules) { // webpackBootstrap
4862
4859
// ### More collection methods
4863
4860
4864
4861
findLastIndex : function ( predicate , context ) {
4865
- var key = this . toKeyedSeq ( ) . findLastKey ( predicate , context ) ;
4866
- return key === undefined ? - 1 : key ;
4862
+ var entry = this . findLastEntry ( predicate , context ) ;
4863
+ return entry ? entry [ 0 ] : - 1 ;
4867
4864
} ,
4868
4865
4869
4866
first : function ( ) {
@@ -4904,6 +4901,10 @@ return /******/ (function(modules) { // webpackBootstrap
4904
4901
return reify ( this , interleaved ) ;
4905
4902
} ,
4906
4903
4904
+ keySeq : function ( ) {
4905
+ return Range ( 0 , this . size ) ;
4906
+ } ,
4907
+
4907
4908
last : function ( ) {
4908
4909
return this . get ( - 1 ) ;
4909
4910
} ,
@@ -4952,6 +4953,7 @@ return /******/ (function(modules) { // webpackBootstrap
4952
4953
} ) ;
4953
4954
4954
4955
SetIterable . prototype . has = IterablePrototype . includes ;
4956
+ SetIterable . prototype . contains = SetIterable . prototype . includes ;
4955
4957
4956
4958
4957
4959
// Mixin subclasses
@@ -4988,7 +4990,7 @@ return /******/ (function(modules) { // webpackBootstrap
4988
4990
}
4989
4991
4990
4992
function quoteString ( value ) {
4991
- return typeof value === 'string' ? JSON . stringify ( value ) : value ;
4993
+ return typeof value === 'string' ? JSON . stringify ( value ) : String ( value ) ;
4992
4994
}
4993
4995
4994
4996
function defaultZipper ( ) {
@@ -5071,8 +5073,33 @@ return /******/ (function(modules) { // webpackBootstrap
5071
5073
5072
5074
var _immutable = __webpack_require__ ( 1 ) ;
5073
5075
5076
+ exports . default = function ( initialData ) {
5077
+ var immutableList = ( 0 , _immutable . List ) ( initialData ) ;
5078
+
5079
+ return new Proxy ( immutableList , {
5080
+ get : function get ( proxy , name ) {
5081
+ var immutableName = name === 'length' ? 'size' : name ;
5082
+
5083
+ return immutableList . get ( immutableName ) || immutableList [ immutableName ] ;
5084
+ }
5085
+ } ) ;
5086
+ } ;
5087
+
5088
+ /***/ } ,
5089
+ /* 3 */
5090
+ /***/ function ( module , exports , __webpack_require__ ) {
5091
+
5092
+ 'use strict' ;
5093
+
5094
+ Object . defineProperty ( exports , "__esModule" , {
5095
+ value : true
5096
+ } ) ;
5097
+
5098
+ var _immutable = __webpack_require__ ( 1 ) ;
5099
+
5074
5100
exports . default = function ( initialData ) {
5075
5101
var immutableMap = ( 0 , _immutable . Map ) ( initialData ) ;
5102
+
5076
5103
return new Proxy ( immutableMap , {
5077
5104
get : function get ( proxy , name ) {
5078
5105
return immutableMap . get ( name ) || immutableMap [ name ] ;
0 commit comments