This repository was archived by the owner on Dec 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstats.json
More file actions
1705 lines (1705 loc) · 212 KB
/
Copy pathstats.json
File metadata and controls
1705 lines (1705 loc) · 212 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"errors": [],
"warnings": [],
"version": "3.10.0",
"hash": "f25940fdcda5f7e50c69",
"time": 1897,
"publicPath": "",
"assetsByChunkName": {
"main": "remeasure.min.js"
},
"assets": [
{
"name": "remeasure.min.js",
"size": 21455,
"chunks": [
0
],
"chunkNames": [
"main"
],
"emitted": true
}
],
"filteredAssets": 0,
"entrypoints": {
"main": {
"chunks": [
0
],
"assets": [
"remeasure.min.js"
]
}
},
"chunks": [
{
"id": 0,
"rendered": true,
"initial": true,
"entry": true,
"extraAsync": false,
"size": 75973,
"names": [
"main"
],
"files": [
"remeasure.min.js"
],
"hash": "07f300baa33ee65971d5",
"parents": [],
"modules": [
{
"id": 0,
"identifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/constants.js",
"name": "./src/constants.js",
"index": 7,
"index2": 5,
"size": 2641,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"module": "./src/utils.js",
"moduleName": "./src/utils.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "9:0-237"
},
{
"moduleId": 5,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"module": "./src/index.js",
"moduleName": "./src/index.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "7:0-54"
},
{
"moduleId": 10,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"module": "./src/getMeasuredComponent.js",
"moduleName": "./src/getMeasuredComponent.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "14:0-46"
}
],
"usedExports": [
"ALL_BOUNDING_CLIENT_RECT_KEYS",
"ALL_DOM_ELEMENT_KEYS",
"ALL_KEYS",
"ALL_POSITION_KEYS",
"ALL_SIZE_KEYS",
"CLIENT_RECT_TYPE",
"DEFAULT_OPTIONS",
"ELEMENT_TYPE",
"FUNCTION_NAME_REGEXP",
"NATURAL_REGEXP",
"OPTIONS_SHAPE",
"VOID_ELEMENT_TAG_NAMES"
],
"providedExports": [
"DEFAULT_OPTIONS",
"BOUNDING_CLIENT_RECT_SIZE_KEYS",
"BOUNDING_CLIENT_RECT_POSITION_KEYS",
"ALL_BOUNDING_CLIENT_RECT_KEYS",
"DOM_ELEMENT_POSITION_KEYS",
"DOM_ELEMENT_SIZE_KEYS",
"FUNCTION_NAME_REGEXP",
"NATURAL_REGEXP",
"VOID_ELEMENT_TAG_NAMES",
"ALL_DOM_ELEMENT_KEYS",
"ALL_POSITION_KEYS",
"ALL_SIZE_KEYS",
"ALL_KEYS",
"CLIENT_RECT_TYPE",
"ELEMENT_TYPE",
"OPTIONS_SHAPE"
],
"optimizationBailout": [],
"depth": 2,
"source": "// external dependencies\nimport PropTypes from 'prop-types';\n\n/**\n * @constant {Object} DEFAULT_OPTIONS\n */\nexport var DEFAULT_OPTIONS = {\n debounce: 0,\n flatten: false,\n inheritedMethods: [],\n positionProp: 'position',\n renderOnResize: true,\n sizeProp: 'size'\n};\n\n/**\n * @constant {Array<string>} BOUNDING_CLIENT_RECT_SIZE_KEYS\n */\nexport var BOUNDING_CLIENT_RECT_SIZE_KEYS = ['height', 'width'];\n\n/**\n * @constant {Array<string>} BOUNDING_CLIENT_RECT_POSITION_KEYS\n */\nexport var BOUNDING_CLIENT_RECT_POSITION_KEYS = ['bottom', 'left', 'right', 'top'];\n\n/**\n * @constant {Array<string>} ALL_BOUNDING_CLIENT_RECT_KEYS\n */\nexport var ALL_BOUNDING_CLIENT_RECT_KEYS = [].concat(BOUNDING_CLIENT_RECT_POSITION_KEYS, BOUNDING_CLIENT_RECT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} DOM_ELEMENT_POSITION_KEYS\n */\nexport var DOM_ELEMENT_POSITION_KEYS = ['clientLeft', 'clientTop', 'offsetLeft', 'offsetTop', 'scrollLeft', 'scrollTop'];\n\n/**\n * @constant {Array<string>} DOM_ELEMENT_SIZE_KEYS\n */\nexport var DOM_ELEMENT_SIZE_KEYS = ['clientHeight', 'clientWidth', 'naturalHeight', 'naturalWidth', 'offsetHeight', 'offsetWidth', 'scrollHeight', 'scrollWidth'];\n\n/**\n * @constant {RegExp} FUNCTION_NAME_REGEXP\n */\nexport var FUNCTION_NAME_REGEXP = /^\\s*function\\s*([^\\(]*)/i;\n\n/**\n * @constant {RegExp} NATURAL_REGEXP\n */\nexport var NATURAL_REGEXP = /natural/;\n\n/**\n * @constant {Array<string>} VOID_ELEMENT_TAG_NAMES\n */\nexport var VOID_ELEMENT_TAG_NAMES = ['AREA', 'BASE', 'BR', 'COL', 'EMBED', 'HR', 'IMG', 'INPUT', 'LINK', 'MENUITEM', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'];\n\n/**\n * @constant {Array<string>} ALL_DOM_ELEMENT_KEYS\n */\nexport var ALL_DOM_ELEMENT_KEYS = [].concat(DOM_ELEMENT_POSITION_KEYS, DOM_ELEMENT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} ALL_POSITION_KEYS\n */\nexport var ALL_POSITION_KEYS = [].concat(DOM_ELEMENT_POSITION_KEYS, BOUNDING_CLIENT_RECT_POSITION_KEYS);\n\n/**\n * @constant {Array<string>} ALL_SIZE_KEYS\n */\nexport var ALL_SIZE_KEYS = [].concat(DOM_ELEMENT_SIZE_KEYS, BOUNDING_CLIENT_RECT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} ALL_KEYS\n */\nexport var ALL_KEYS = [].concat(ALL_POSITION_KEYS, ALL_SIZE_KEYS);\n\n/**\n * @constant {string} CLIENT_RECT_TYPE\n */\nexport var CLIENT_RECT_TYPE = 'clientRect';\n\n/**\n * @constant {string} ELEMENT_TYPE\n */\nexport var ELEMENT_TYPE = 'element';\n\n/**\n * @constant {Object} OPTIONS_SHAPE\n */\nexport var OPTIONS_SHAPE = {\n debounce: PropTypes.number,\n flatten: PropTypes.bool,\n inheritedMethods: PropTypes.arrayOf(PropTypes.string),\n isPure: PropTypes.bool,\n positionProp: PropTypes.string,\n renderOnResize: PropTypes.bool,\n sizeProp: PropTypes.string\n};"
},
{
"id": 1,
"identifier": "/home/tquetano/git/remeasure/node_modules/prop-types/index.js",
"name": "./node_modules/prop-types/index.js",
"index": 2,
"index2": 4,
"size": 956,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/constants.js",
"module": "./src/constants.js",
"moduleName": "./src/constants.js",
"type": "harmony import",
"userRequest": "prop-types",
"loc": "2:0-35"
},
{
"moduleId": 5,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"module": "./src/index.js",
"moduleName": "./src/index.js",
"type": "harmony import",
"userRequest": "prop-types",
"loc": "4:0-35"
}
],
"usedExports": [
"default"
],
"providedExports": null,
"optimizationBailout": [],
"depth": 2,
"source": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n"
},
{
"id": 2,
"identifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"name": "./src/utils.js",
"index": 11,
"index2": 14,
"size": 17214,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"module": "./src/index.js",
"moduleName": "./src/index.js",
"type": "harmony import",
"userRequest": "./utils",
"loc": "13:0-76"
},
{
"moduleId": 10,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"module": "./src/getMeasuredComponent.js",
"moduleName": "./src/getMeasuredComponent.js",
"type": "harmony import",
"userRequest": "./utils",
"loc": "17:0-245"
}
],
"usedExports": [
"clearValues",
"createFlattenConvenienceFunction",
"getComponentName",
"getElementValues",
"getKeysWithSourceAndType",
"getMeasuredKeys",
"getScopedValues",
"reduceMeasurementsToMatchingKeys",
"removeElementResize",
"setElement",
"setInheritedMethods",
"setValuesIfChanged",
"updateValuesViaRaf"
],
"providedExports": [
"some",
"getComponentName",
"haveValuesChanged",
"setValuesIfChanged",
"reduceMeasurementsToMatchingKeys",
"getShouldClear",
"clearValues",
"createUpdateValuesViaDebounce",
"updateValuesViaRaf",
"isElementVoidTag",
"setElementResize",
"removeElementResize",
"setElement",
"createIsKeyType",
"createFlattenConvenienceFunction",
"getScopedValues",
"getNaturalDimensionValue",
"getElementValues",
"getPropKeyNames",
"isPositionKey",
"isSizeKey",
"getKeyType",
"getKeysFromStringKey",
"getKeysSubsetWithType",
"getKeysWithSourceAndType",
"getValidKeys",
"getMeasuredKeys",
"setInheritedMethods"
],
"optimizationBailout": [],
"depth": 2,
"source": "var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n// external dependencies\nimport debounce from 'debounce';\nimport raf from 'raf';\nimport ResizeObserver from 'resize-observer-polyfill';\n\n// constants\nimport { ALL_BOUNDING_CLIENT_RECT_KEYS, ALL_DOM_ELEMENT_KEYS, ALL_KEYS, ALL_POSITION_KEYS, ALL_SIZE_KEYS, CLIENT_RECT_TYPE, DEFAULT_OPTIONS, ELEMENT_TYPE, FUNCTION_NAME_REGEXP, NATURAL_REGEXP, VOID_ELEMENT_TAG_NAMES } from './constants';\n\n/**\n * @private\n *\n * @function some\n *\n * @description\n * does any item in the array create a truthy result of calling fn\n *\n * @param {Array<*>} array the array to test\n * @param {function} fn the function to perform the test with\n * @returns {boolean} does any item in the array match\n */\nexport var some = function some(array, fn) {\n for (var index = 0; index < array.length; index++) {\n if (fn(array[index])) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * @private\n *\n * @function getComponentName\n *\n * @description\n * get the name of the component from displayName, the internal name, or fallback\n *\n * @param {Component} Component component to get the display name from\n * @returns {string} Component name\n */\nexport var getComponentName = function getComponentName(Component) {\n if (Component.displayName) {\n return Component.displayName;\n }\n\n if (Component.name) {\n return Component.name;\n }\n\n var match = Component.toString().match(FUNCTION_NAME_REGEXP);\n\n return match && match[1] || 'Component';\n};\n\n/**\n * @private\n *\n * @function haveValuesChanged\n *\n * @description\n * iterate through keys and determine if the values have\n * changed compared to what is stored in state\n *\n * @param {Array<Object>} keys keys to get from the state\n * @param {Object} values the new values to test\n * @param {Object} currentState the current values in state\n * @returns {boolean} have any of the keys changed\n */\nexport var haveValuesChanged = function haveValuesChanged(keys, values, currentState) {\n return some(keys, function (_ref) {\n var key = _ref.key;\n\n return values[key] !== currentState[key];\n });\n};\n\n/**\n * @private\n *\n * @function setValuesIfChanged\n *\n * @description\n * if the values have changed and the instance is mounted then set the values in state\n *\n * @param {MeasuredComponent} instance component instance\n * @param {function} instance.setState setState method of instance component\n * @param {Array<string>} keys keys to store in state\n * @param {Object} values updated values to store in state\n */\nexport var setValuesIfChanged = function setValuesIfChanged(instance, keys, values) {\n if (haveValuesChanged(keys, values, instance.measurements)) {\n instance.setMeasurements(values);\n }\n};\n\n/**\n * @private\n *\n * @function reduceMeasurementsToMatchingKeys\n *\n * @description\n * based on desiredKeys, build the initial measurements object\n *\n * @param {Array<string>} keys the keys requested from the decorator\n * @returns {Array<T>} the object of key: 0 default values\n */\nexport var reduceMeasurementsToMatchingKeys = function reduceMeasurementsToMatchingKeys(keys) {\n return keys.reduce(function (accumulatedInitialState, _ref2) {\n var key = _ref2.key;\n\n accumulatedInitialState[key] = 0;\n\n return accumulatedInitialState;\n }, {});\n};\n\n/**\n * @private\n *\n * @function getShouldClear\n *\n * @description\n * get whether the values should be cleared or not based on values in state\n *\n * @param {Object} measurements the current measurement values\n * @param {Array<Object>} selectedKeys the keys to iterate over\n * @returns {boolean} should the values be cleared or not\n */\nexport var getShouldClear = function getShouldClear(measurements, selectedKeys) {\n return some(selectedKeys, function (_ref3) {\n var key = _ref3.key;\n\n return !!measurements[key];\n });\n};\n\n/**\n * @private\n *\n * @function clearValues\n *\n * @description\n * create function to reset all values to 0 if there is no element present\n *\n * @param {MeasuredComponent} instance component instance\n * @param {Array<string>} selectedKeys keys to store in state\n */\nexport var clearValues = function clearValues(instance, selectedKeys) {\n if (getShouldClear(instance.measurements, selectedKeys)) {\n instance.setMeasurements(reduceMeasurementsToMatchingKeys(selectedKeys));\n }\n};\n\n/**\n * @private\n *\n * @function createUpdateValuesViaDebounce\n *\n * @description\n * create the function to update the values via debounce value\n *\n * @param {MeasuredComponent} instance component instance\n * @param {number} debounceValue debounce value for the instance provided\n * @returns {function(): void} function to update the values after debounce timing has passed\n */\nexport var createUpdateValuesViaDebounce = function createUpdateValuesViaDebounce(instance, debounceValue) {\n return debounce(instance.updateValuesIfChanged, debounceValue);\n};\n\n/**\n * @private\n *\n * @function createUpdateValuesViaRaf\n *\n * @description\n * create the function to update the values via requestAnimationFrame\n *\n * @param {MeasuredComponent} instance component instance\n */\nexport var updateValuesViaRaf = function updateValuesViaRaf(instance) {\n raf(instance.updateValuesIfChanged);\n};\n\n/**\n * @private\n *\n * @function isElementVoidTag\n *\n * @description\n * is the element passed a void tag name\n *\n * @param {HTMLElement} element\n * @returns {boolean}\n */\nexport var isElementVoidTag = function isElementVoidTag(element) {\n return !!~VOID_ELEMENT_TAG_NAMES.indexOf(element.tagName.toUpperCase());\n};\n\n/**\n * @private\n *\n * @function setElementResize\n *\n * @description\n * create the function to assign the onResize listener to the element\n *\n * @param {MeasuredComponent} instance component instance\n * @param {number} debounceValue debounce value for the instance provided\n */\nexport var setElementResize = function setElementResize(instance, debounceValue) {\n var element = instance.element;\n\n if (element && !isElementVoidTag(element)) {\n var resizeFn = debounceValue ? createUpdateValuesViaDebounce(instance, debounceValue) : updateValuesViaRaf.bind(null, instance);\n\n instance.resizeListener = resizeFn;\n instance.resizeObserver = new ResizeObserver(resizeFn);\n\n instance.resizeObserver.observe(element);\n }\n};\n\n/**\n * @private\n *\n * @function removeElementResize\n *\n * @description\n * remove listeners from the given element\n *\n * @param {MeasuredComponent} instance component instance\n * @param {HTMLElement} element element to remove listeners from\n */\nexport var removeElementResize = function removeElementResize(instance, element) {\n if (element) {\n instance.resizeObserver.disconnect(element);\n }\n\n instance.resizeListener = null;\n instance.resizeObserver = null;\n};\n\n/**\n * @private\n *\n * @function setElement\n *\n * @description\n * assign the element to the instance\n *\n * @param {MeasuredComponent} instance component instance\n * @param {HTMLElement|null} element element to assign to instance\n * @param {number} debounceValue debounce value for the instance provided\n * @param {boolean} renderOnResize should the component rerender on resize\n * @returns {void}\n */\nexport var setElement = function setElement(instance, element, debounceValue, renderOnResize) {\n var currentElement = instance.element;\n\n instance.element = element;\n\n if (!element) {\n return removeElementResize(instance, currentElement);\n }\n\n if (renderOnResize && !instance.resizeListener) {\n setElementResize(instance, debounceValue);\n }\n};\n\n/**\n * @private\n *\n * @function createIsKeyType\n *\n * @description\n * create a key type checker function\n *\n * @param {Array<string>} typeArray\n * @returns {function(string): boolean}\n */\nexport var createIsKeyType = function createIsKeyType(typeArray) {\n return function (key) {\n return !!~typeArray.indexOf(key);\n };\n};\n\n/**\n * @private\n *\n * @function createFlattenConvenienceFunction\n *\n * @description\n * create a convenience function that will flatten the values returned (specific to property if passed)\n *\n * @param {function} measure main measure function to get the decorator from\n * @param {string} property specific property to build convenience function for\n * @returns {function((function|Object), Object): function} decorator with flatten added as option\n */\nexport var createFlattenConvenienceFunction = function createFlattenConvenienceFunction(measure, property) {\n return function (component) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var isComponentFunction = typeof component === 'function';\n var decoratorOptions = isComponentFunction ? options : component;\n var decorator = measure(property, _extends({}, decoratorOptions, {\n flatten: true\n }));\n\n return isComponentFunction ? decorator(component) : decorator;\n };\n};\n\n/**\n * @private\n *\n * @function getScopedValues\n *\n * @description\n * based on the keys passed, create an object with either position\n * or size or both properties that are objects containing the respective\n * values for the associated keys\n *\n * @param {Object} values values to reduce by type\n * @param {Array<string>} keys the keys to assign to scopedValues\n * @param {boolean} flatten should the object be flat or not\n * @returns {Object} reduced scoped values\n */\nexport var getScopedValues = function getScopedValues(values, keys, _ref4) {\n var flatten = _ref4.flatten;\n\n return flatten ? values : keys.reduce(function (scopedValues, value) {\n if (!scopedValues[value.type]) {\n scopedValues[value.type] = {};\n }\n\n scopedValues[value.type][value.key] = values[value.key];\n\n return scopedValues;\n }, {});\n};\n\n/**\n * @private\n *\n * @function getNaturalDimensionValue\n *\n * @description\n * For naturalHeight and naturalWidth, coalesce the values\n * with scrollHeight and scrollWIdth if the element does not\n * natively support it\n *\n * @param {HTMLElement} source the element to get the size / position value from\n * @param {string} key the size / position value to retrieve from source\n * @returns {number}\n */\nexport var getNaturalDimensionValue = function getNaturalDimensionValue(source, key) {\n return source.hasOwnProperty(key) ? source[key] : source[key.replace(NATURAL_REGEXP, 'scroll')];\n};\n\n/**\n * @private\n *\n * @function getElementValues\n *\n * @description\n * get the values of the element or its bounding client rect\n *\n * @param {HTMLElement} element\n * @param {Array<Object>} keys\n * @returns {Object}\n */\nexport var getElementValues = function getElementValues(element, keys) {\n var boundingClientRect = element.getBoundingClientRect();\n\n return keys.reduce(function (values, value) {\n values[value.key] = value.source === CLIENT_RECT_TYPE ? boundingClientRect[value.key] : getNaturalDimensionValue(element, value.key);\n\n return values;\n }, {});\n};\n\n/**\n * @private\n *\n * @function getPropKeyNames\n *\n * @description\n * get the positionProp and sizeProp properties from options with defaults applied\n *\n * @param {string} [positionProp=DEFAULT_OPTIONS.positionProp] position property name\n * @param {string} [sizeProp=DEFAULT_OPTIONS.sizeProp] size property name\n * @returns {{positionProp, sizeProp}} object of positionProp and sizeProp\n */\nexport var getPropKeyNames = function getPropKeyNames(_ref5) {\n var _ref5$positionProp = _ref5.positionProp,\n positionProp = _ref5$positionProp === undefined ? DEFAULT_OPTIONS.positionProp : _ref5$positionProp,\n _ref5$sizeProp = _ref5.sizeProp,\n sizeProp = _ref5$sizeProp === undefined ? DEFAULT_OPTIONS.sizeProp : _ref5$sizeProp;\n\n return {\n positionProp: positionProp,\n sizeProp: sizeProp\n };\n};\n\n/**\n * @private\n *\n * @function isPositionKey\n *\n * @description\n * is the key passed a position key\n *\n * @param {string} key\n * @returns {boolean}\n */\nexport var isPositionKey = createIsKeyType(ALL_POSITION_KEYS);\n\n/**\n * @private\n *\n * @function isSizeKey\n *\n * @description\n * is the key passed a size key\n *\n * @param {string} key\n * @returns {boolean}\n */\nexport var isSizeKey = createIsKeyType(ALL_SIZE_KEYS);\n\n/**\n * @private\n *\n * @function getKeyType\n *\n * @description\n * get the type (position or size) of the key passed\n *\n * @param {string} key\n * @param {string} positionProp\n * @param {string} sizeProp\n * @returns {string}\n */\nexport var getKeyType = function getKeyType(key, _ref6) {\n var positionProp = _ref6.positionProp,\n sizeProp = _ref6.sizeProp;\n\n if (isPositionKey(key)) {\n return positionProp;\n }\n\n if (isSizeKey(key)) {\n return sizeProp;\n }\n\n return null;\n};\n\n/**\n * @private\n *\n * @function getKeysFromStringKey\n *\n * @description\n * get the keys to store in state based on the key and options passed\n *\n * @param {string} key string key passed to decorator\n * @param {string} [positionProp=DEFAULT_OPTIONS.positionProp] name of position property requested in options\n * @param {string} [sizeProp=DEFAULT_OPTIONS.sizeProp] name of position property requested in options\n * @returns {Array<string>} keys to store in state\n */\nexport var getKeysFromStringKey = function getKeysFromStringKey(key, _ref7) {\n var _ref7$positionProp = _ref7.positionProp,\n positionProp = _ref7$positionProp === undefined ? DEFAULT_OPTIONS.positionProp : _ref7$positionProp,\n _ref7$sizeProp = _ref7.sizeProp,\n sizeProp = _ref7$sizeProp === undefined ? DEFAULT_OPTIONS.sizeProp : _ref7$sizeProp;\n\n if (key === positionProp) {\n return ALL_POSITION_KEYS;\n }\n\n if (key === sizeProp) {\n return ALL_SIZE_KEYS;\n }\n\n return [key];\n};\n\n/**\n * @private\n *\n * @function getKeysSubsetWithType\n *\n * @description\n * get subset of array1 based on items existing in array2\n *\n * @param {Array<*>} sourceArray the array to filter\n * @param {Array<*>} valuesToExtract the array to find matches in\n * @param {string} source the source of the value the key relates to\n * @param {{positionProp: string, sizeProp: string}} propTypes the names of the scope categories\n * @returns {Array<T>} the resulting array of matching values from array1 and array2\n */\nexport var getKeysSubsetWithType = function getKeysSubsetWithType(sourceArray, valuesToExtract, source, propTypes) {\n return sourceArray.reduce(function (valuesWithTypes, key) {\n if (~valuesToExtract.indexOf(key)) {\n var type = getKeyType(key, propTypes);\n\n if (type !== null) {\n valuesWithTypes.push({\n key: key,\n source: source,\n type: type\n });\n }\n }\n\n return valuesWithTypes;\n }, []);\n};\n\n/**\n * @private\n *\n * @function getKeysWithSourceAndType\n *\n * @description\n * get the keys with mapped source (rect or element) and type (position or size)\n *\n * @param {Array<string>} keys keys to return mapped values for\n * @param {Object} options options passed to instance\n * @returns {Array<{key: string, source: string, type: string}>} keys with source and type mapped\n */\nexport var getKeysWithSourceAndType = function getKeysWithSourceAndType(keys, options) {\n var propKeyNames = getPropKeyNames(options);\n\n return [].concat(getKeysSubsetWithType(ALL_BOUNDING_CLIENT_RECT_KEYS, keys, CLIENT_RECT_TYPE, propKeyNames), getKeysSubsetWithType(ALL_DOM_ELEMENT_KEYS, keys, ELEMENT_TYPE, propKeyNames));\n};\n\n/**\n * @private\n *\n * @description\n * based on their existence in keysToTestAgainst, determine which of the keys\n * passed are considered valid\n *\n * @param {Array<string>} keys the keys to test\n * @param {Array<string>} keysToTestAgainst the keys to find matches from\n * @returns {Array<string>} the resulting matching key set\n */\nexport var getValidKeys = function getValidKeys(keys, keysToTestAgainst) {\n return keys.filter(function (key) {\n return ~keysToTestAgainst.indexOf(key);\n });\n};\n\n/**\n * @private\n *\n * @function getMeasuredKeys\n *\n * @description\n * based on the passed keys and options, get the keys that will be measured\n *\n * @param {Array<string>|string} passedKeys the keys passed to the decorator\n * @param {Object} options the options passed to the decorator\n * @returns {Array<string>} the keys to measure\n */\nexport var getMeasuredKeys = function getMeasuredKeys(passedKeys, options) {\n if (Array.isArray(passedKeys)) {\n return getValidKeys(passedKeys, ALL_KEYS);\n }\n\n if (typeof passedKeys === 'string') {\n return getKeysFromStringKey(passedKeys, options);\n }\n\n return ALL_KEYS;\n};\n\n/**\n * @private\n *\n * @description\n * set methods on this instance that will call the inherited instance method\n *\n * @param {ReactComponent} instance the instance to assign to\n * @param {Array<string>} inheritedMethods the names of inherited methods\n */\nexport var setInheritedMethods = function setInheritedMethods(instance, inheritedMethods) {\n inheritedMethods.forEach(function (method) {\n if (instance[method]) {\n throw new ReferenceError('You cannot have the method ' + method + ' inherited, as it is already taken by the MeasuredComponent HOC.');\n }\n\n instance[method] = function () {\n var _instance$originalCom;\n\n return (_instance$originalCom = instance.originalComponent)[method].apply(_instance$originalCom, arguments);\n };\n });\n};"
},
{
"id": 3,
"identifier": "/home/tquetano/git/remeasure/node_modules/webpack/buildin/global.js",
"name": "(webpack)/buildin/global.js",
"index": 14,
"index2": 9,
"size": 509,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/raf/index.js",
"issuerId": 14,
"issuerName": "./node_modules/raf/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 14,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/raf/index.js",
"module": "./node_modules/raf/index.js",
"moduleName": "./node_modules/raf/index.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-41"
},
{
"moduleId": 17,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js",
"module": "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js",
"moduleName": "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js",
"type": "cjs require",
"userRequest": "global",
"loc": "1:0-44"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 4,
"source": "var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n"
},
{
"id": 4,
"identifier": "multi /home/tquetano/git/remeasure/src/index.js",
"name": "multi ./src/index.js",
"index": 0,
"index2": 17,
"size": 28,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": null,
"issuerId": null,
"issuerName": null,
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 0
},
{
"id": 5,
"identifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"name": "./src/index.js",
"index": 1,
"index2": 16,
"size": 1892,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "multi /home/tquetano/git/remeasure/src/index.js",
"issuerId": 4,
"issuerName": "multi ./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 4,
"moduleIdentifier": "multi /home/tquetano/git/remeasure/src/index.js",
"module": "multi ./src/index.js",
"moduleName": "multi ./src/index.js",
"type": "single entry",
"userRequest": "/home/tquetano/git/remeasure/src/index.js",
"loc": "main:100000"
}
],
"usedExports": true,
"providedExports": [
"default"
],
"optimizationBailout": [],
"depth": 1,
"source": "var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n// external dependencies\nimport PropTypes from 'prop-types';\n\n// constants\nimport { ALL_KEYS, OPTIONS_SHAPE } from './constants';\n\n// component\nimport getMeasuredComponent from './getMeasuredComponent';\n\n// utils\nimport { createFlattenConvenienceFunction, getMeasuredKeys } from './utils';\n\n/**\n * @module remeasure\n */\n\n/**\n * @function measure\n *\n * @description\n * create higher-order component that injects size and position properties\n * into OriginalComponent as an object under the prop name size and position\n *\n * @param {ReactComponent|Array<string>|Object|string} passedKeys if used without parameters, the component that will be\n * measured, else either single key or array of keys to watch for measurement, or an object of options\n * @param {Object} [passedOptions={}] an object of options to apply for measuring\n * @returns {ReactComponent} the higher-order component that will measure the child and pass down size and\n *\n * position values as props\n */\nvar measure = function measure(passedKeys) {\n var passedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (typeof passedKeys === 'function') {\n return getMeasuredComponent(ALL_KEYS, passedOptions)(passedKeys);\n }\n\n var options = passedKeys && passedKeys.constructor === Object ? _extends({}, passedKeys) : _extends({}, passedOptions);\n\n PropTypes.checkPropTypes(OPTIONS_SHAPE, options, 'property', 'options');\n\n return getMeasuredComponent(getMeasuredKeys(passedKeys, options), options);\n};\n\nALL_KEYS.forEach(function (key) {\n measure[key] = createFlattenConvenienceFunction(measure, key);\n});\n\nexport default measure;"
},
{
"id": 6,
"identifier": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"name": "./node_modules/prop-types/factoryWithThrowingShims.js",
"index": 3,
"index2": 3,
"size": 1492,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/prop-types/index.js",
"issuerId": 1,
"issuerName": "./node_modules/prop-types/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 1,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/prop-types/index.js",
"module": "./node_modules/prop-types/index.js",
"moduleName": "./node_modules/prop-types/index.js",
"type": "cjs require",
"userRequest": "./factoryWithThrowingShims",
"loc": "27:19-56"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 3,
"source": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n"
},
{
"id": 7,
"identifier": "/home/tquetano/git/remeasure/node_modules/fbjs/lib/emptyFunction.js",
"name": "./node_modules/fbjs/lib/emptyFunction.js",
"index": 4,
"index2": 0,
"size": 959,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"issuerId": 6,
"issuerName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"module": "./node_modules/prop-types/factoryWithThrowingShims.js",
"moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"type": "cjs require",
"userRequest": "fbjs/lib/emptyFunction",
"loc": "10:20-53"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 4,
"source": "\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;"
},
{
"id": 8,
"identifier": "/home/tquetano/git/remeasure/node_modules/fbjs/lib/invariant.js",
"name": "./node_modules/fbjs/lib/invariant.js",
"index": 5,
"index2": 1,
"size": 1506,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"issuerId": 6,
"issuerName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"module": "./node_modules/prop-types/factoryWithThrowingShims.js",
"moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"type": "cjs require",
"userRequest": "fbjs/lib/invariant",
"loc": "11:16-45"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 4,
"source": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;"
},
{
"id": 9,
"identifier": "/home/tquetano/git/remeasure/node_modules/prop-types/lib/ReactPropTypesSecret.js",
"name": "./node_modules/prop-types/lib/ReactPropTypesSecret.js",
"index": 6,
"index2": 2,
"size": 314,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"issuerId": 6,
"issuerName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 6,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/prop-types/factoryWithThrowingShims.js",
"module": "./node_modules/prop-types/factoryWithThrowingShims.js",
"moduleName": "./node_modules/prop-types/factoryWithThrowingShims.js",
"type": "cjs require",
"userRequest": "./lib/ReactPropTypesSecret",
"loc": "12:27-64"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 4,
"source": "/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n"
},
{
"id": 10,
"identifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"name": "./src/getMeasuredComponent.js",
"index": 8,
"index2": 15,
"size": 8379,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 5,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"module": "./src/index.js",
"moduleName": "./src/index.js",
"type": "harmony import",
"userRequest": "./getMeasuredComponent",
"loc": "10:0-58"
}
],
"usedExports": [
"default"
],
"providedExports": [
"createComponentDidMount",
"createComponentDidUpdate",
"createComponentWillUnmount",
"createSetMeasurements",
"createSetOriginalRef",
"createUpdateValuesIfChanged",
"default"
],
"optimizationBailout": [],
"depth": 2,
"source": "var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// external dependencies\nimport React, { Component, PureComponent } from 'react';\nimport { findDOMNode } from 'react-dom';\n\n// constants\nimport { DEFAULT_OPTIONS } from './constants';\n\n// utils\nimport { clearValues, getComponentName, getElementValues, getKeysWithSourceAndType, getScopedValues, reduceMeasurementsToMatchingKeys, removeElementResize, setElement, setInheritedMethods, setValuesIfChanged, updateValuesViaRaf } from './utils';\n\nexport var createComponentDidMount = function createComponentDidMount(instance, selectedKeys) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _options$debounce = options.debounce,\n debounceValue = _options$debounce === undefined ? DEFAULT_OPTIONS.debounce : _options$debounce,\n _options$renderOnResi = options.renderOnResize,\n renderOnResize = _options$renderOnResi === undefined ? DEFAULT_OPTIONS.renderOnResize : _options$renderOnResi;\n\n /**\n * @private\n *\n * @function componentDidMount\n *\n * @description\n * on mount, set the element and its values\n */\n\n return function () {\n var element = findDOMNode(instance);\n\n instance._isMounted = true;\n\n setElement(instance, element, debounceValue, renderOnResize);\n\n if (element) {\n updateValuesViaRaf(instance);\n }\n };\n};\n\nexport var createComponentDidUpdate = function createComponentDidUpdate(instance, selectedKeys) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _options$debounce2 = options.debounce,\n debounceValue = _options$debounce2 === undefined ? DEFAULT_OPTIONS.debounce : _options$debounce2,\n _options$renderOnResi2 = options.renderOnResize,\n renderOnResize = _options$renderOnResi2 === undefined ? DEFAULT_OPTIONS.renderOnResize : _options$renderOnResi2;\n\n /**\n * @private\n *\n * @function componentDidUpdate\n *\n * @description\n * on update, set the element if it has changed, and update or clear the values based on its existence\n *\n * @returns {void}\n */\n\n return function () {\n var element = findDOMNode(instance);\n\n if (element !== instance.element) {\n setElement(instance, element, debounceValue, renderOnResize);\n }\n\n if (element) {\n return updateValuesViaRaf(instance);\n }\n\n clearValues(instance, selectedKeys);\n };\n};\n\nexport var createComponentWillUnmount = function createComponentWillUnmount(instance, selectedKeys) {\n /**\n * @private\n *\n * @function componentWillUnmount\n *\n * @description\n * on unmount, reset all measurements to 0 and remove the resize listener\n */\n return function () {\n instance._isMounted = false;\n\n instance.setMeasurements(reduceMeasurementsToMatchingKeys(selectedKeys));\n\n if (instance.element) {\n removeElementResize(instance, instance.element);\n\n instance.element = null;\n }\n };\n};\n\nexport var createSetMeasurements = function createSetMeasurements(instance) {\n /**\n * @private\n *\n * @function setMeasurements\n *\n * @description\n * set the measurements synchronously to the instance value and then call forceUpdate if mounted\n *\n * @param {Object} measurements the measurements to assign to the instance\n */\n return function (measurements) {\n instance.measurements = measurements;\n\n if (instance._isMounted) {\n instance.forceUpdate();\n }\n };\n};\n\nexport var createSetOriginalRef = function createSetOriginalRef(instance) {\n /**\n * @private\n *\n * @function setOriginalRef\n *\n * @description\n * set the reference to the original component instance to the instance of the HOC\n *\n * @param {HTMLElement|ReactComponent} component the component instance to assign\n */\n return function (component) {\n instance.originalComponent = component;\n };\n};\n\nexport var createUpdateValuesIfChanged = function createUpdateValuesIfChanged(instance, selectedKeys) {\n /**\n * @private\n *\n * @function updateValuesIfChanged\n *\n * @description\n * get the new values and assign them to state if they have changed\n */\n return function () {\n if (instance.element) {\n setValuesIfChanged(instance, selectedKeys, getElementValues(instance.element, selectedKeys));\n }\n };\n};\n\n/**\n * @private\n *\n * @function getMeasuredComponent\n *\n * @description\n * get the decorator to create a higher-order component that will measure the DOM node and pass the requested\n * size / position attributes as props to the PassedComponent\n *\n * @param {Array<string>} keys the keys to get the size / position of\n * @param {Object} options the additional options passed to the decorator\n * @returns {function(ReactComponent): ReactComponent} decorator to create the higher-order component\n */\nvar getMeasuredComponent = function getMeasuredComponent(keys, options) {\n var selectedKeys = getKeysWithSourceAndType(keys, options);\n var _options$inheritedMet = options.inheritedMethods,\n inheritedMethods = _options$inheritedMet === undefined ? [] : _options$inheritedMet,\n _options$isPure = options.isPure,\n isPure = _options$isPure === undefined ? false : _options$isPure;\n\n\n return function (PassedComponent) {\n var passedComponentPrototype = Object.getPrototypeOf(PassedComponent);\n var isPureComponent = passedComponentPrototype === PureComponent;\n var shouldApplyRef = isPureComponent || passedComponentPrototype === Component;\n\n var ComponentToExtend = isPure || isPureComponent ? PureComponent : Component;\n var displayName = getComponentName(PassedComponent);\n\n var MeasuredComponent = function (_ComponentToExtend) {\n _inherits(MeasuredComponent, _ComponentToExtend);\n\n function MeasuredComponent(props) {\n _classCallCheck(this, MeasuredComponent);\n\n var _this = _possibleConstructorReturn(this, _ComponentToExtend.call(this, props));\n\n _this.componentDidMount = createComponentDidMount(_this, selectedKeys, options);\n _this.componentDidUpdate = createComponentDidUpdate(_this, selectedKeys, options);\n _this.componentWillUnmount = createComponentWillUnmount(_this, selectedKeys);\n _this.setOriginalRef = createSetOriginalRef(_this);\n _this._isMounted = false;\n _this.element = null;\n _this.originalComponent = null;\n _this.hasResize = null;\n _this.measurements = reduceMeasurementsToMatchingKeys(selectedKeys);\n _this.setMeasurements = createSetMeasurements(_this);\n _this.updateValuesIfChanged = createUpdateValuesIfChanged(_this, selectedKeys);\n\n\n if (inheritedMethods.length) {\n setInheritedMethods(_this, inheritedMethods);\n }\n return _this;\n }\n\n // lifecycle methods\n\n\n // instance variables\n\n\n // instance methods\n\n\n MeasuredComponent.prototype.render = function render() {\n return React.createElement(PassedComponent, _extends({\n ref: shouldApplyRef ? this.setOriginalRef : null\n }, this.props, getScopedValues(this.measurements, selectedKeys, options)));\n };\n\n return MeasuredComponent;\n }(ComponentToExtend);\n\n MeasuredComponent.displayName = 'Measured(' + displayName + ')';\n\n\n return MeasuredComponent;\n };\n};\n\nexport default getMeasuredComponent;"
},
{
"id": 11,
"identifier": "external {\"amd\":\"react\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"root\":\"React\"}",
"name": "external {\"amd\":\"react\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"root\":\"React\"}",
"index": 9,
"index2": 6,
"size": 42,
"cacheable": false,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"issuerId": 10,
"issuerName": "./src/getMeasuredComponent.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"module": "./src/getMeasuredComponent.js",
"moduleName": "./src/getMeasuredComponent.js",
"type": "harmony import",
"userRequest": "react",
"loc": "10:0-56"
}
],
"usedExports": [
"Component",
"PureComponent",
"default"
],
"providedExports": null,
"optimizationBailout": [],
"depth": 3
},
{
"id": 12,
"identifier": "external {\"amd\":\"react-dom\",\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"root\":\"ReactDOM\"}",
"name": "external {\"amd\":\"react-dom\",\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"root\":\"ReactDOM\"}",
"index": 10,
"index2": 7,
"size": 42,
"cacheable": false,
"built": false,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"issuerId": 10,
"issuerName": "./src/getMeasuredComponent.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 10,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"module": "./src/getMeasuredComponent.js",
"moduleName": "./src/getMeasuredComponent.js",
"type": "harmony import",
"userRequest": "react-dom",
"loc": "11:0-40"
}
],
"usedExports": [
"findDOMNode"
],
"providedExports": null,
"optimizationBailout": [],
"depth": 3
},
{
"id": 13,
"identifier": "/home/tquetano/git/remeasure/node_modules/debounce/index.js",
"name": "./node_modules/debounce/index.js",
"index": 12,
"index2": 8,
"size": 1765,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"issuerId": 2,
"issuerName": "./src/utils.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"module": "./src/utils.js",
"moduleName": "./src/utils.js",
"type": "harmony import",
"userRequest": "debounce",
"loc": "4:0-32"
}
],
"usedExports": [
"default"
],
"providedExports": null,
"optimizationBailout": [],
"depth": 3,
"source": "/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n\nmodule.exports = function debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n"
},
{
"id": 14,
"identifier": "/home/tquetano/git/remeasure/node_modules/raf/index.js",
"name": "./node_modules/raf/index.js",
"index": 13,
"index2": 12,
"size": 1933,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"issuerId": 2,
"issuerName": "./src/utils.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"module": "./src/utils.js",
"moduleName": "./src/utils.js",
"type": "harmony import",
"userRequest": "raf",
"loc": "5:0-22"
}
],
"usedExports": [
"default"
],
"providedExports": null,
"optimizationBailout": [],
"depth": 3,
"source": "var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n"
},
{
"id": 15,
"identifier": "/home/tquetano/git/remeasure/node_modules/performance-now/lib/performance-now.js",
"name": "./node_modules/performance-now/lib/performance-now.js",
"index": 15,
"index2": 11,
"size": 1061,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/raf/index.js",
"issuerId": 14,
"issuerName": "./node_modules/raf/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 14,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/raf/index.js",
"module": "./node_modules/raf/index.js",
"moduleName": "./node_modules/raf/index.js",
"type": "cjs require",
"userRequest": "performance-now",
"loc": "1:10-36"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 4,
"source": "// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n"
},
{
"id": 16,
"identifier": "/home/tquetano/git/remeasure/node_modules/process/browser.js",
"name": "./node_modules/process/browser.js",
"index": 16,
"index2": 10,
"size": 5418,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/performance-now/lib/performance-now.js",
"issuerId": 15,
"issuerName": "./node_modules/performance-now/lib/performance-now.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 15,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/performance-now/lib/performance-now.js",
"module": "./node_modules/performance-now/lib/performance-now.js",
"moduleName": "./node_modules/performance-now/lib/performance-now.js",
"type": "cjs require",
"userRequest": "process",
"loc": "1:0-37"
}
],
"usedExports": true,
"providedExports": null,
"optimizationBailout": [],
"depth": 5,
"source": "// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n"
},
{
"id": 17,
"identifier": "/home/tquetano/git/remeasure/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js",
"name": "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js",
"index": 17,
"index2": 13,
"size": 29822,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"issuerId": 2,
"issuerName": "./src/utils.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"module": "./src/utils.js",
"moduleName": "./src/utils.js",
"type": "harmony import",
"userRequest": "resize-observer-polyfill",
"loc": "6:0-54"
}
],
"usedExports": [
"default"
],
"providedExports": [
"default"
],
"optimizationBailout": [],
"depth": 3,
"source": "/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = (function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\n function getIndex(arr, key) {\n var result = -1;\n\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n\n return true;\n }\n\n return false;\n });\n\n return result;\n }\n\n return (function () {\n function anonymous() {\n this.__entries__ = [];\n }\n\n var prototypeAccessors = { size: { configurable: true } };\n\n /**\r\n * @returns {boolean}\r\n */\n prototypeAccessors.size.get = function () {\n return this.__entries__.length;\n };\n\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\n anonymous.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n\n return entry && entry[1];\n };\n\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\n anonymous.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n anonymous.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n\n if (~index) {\n entries.splice(index, 1);\n }\n };\n\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n anonymous.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n\n /**\r\n * @returns {void}\r\n */\n anonymous.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\n anonymous.prototype.forEach = function (callback, ctx) {\n var this$1 = this;\n if ( ctx === void 0 ) ctx = null;\n\n for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\n var entry = list[i];\n\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n\n Object.defineProperties( anonymous.prototype, prototypeAccessors );\n\n return anonymous;\n }());\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\nvar global$1 = (function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n }\n\n // eslint-disable-next-line no-new-func\n return Function('return this')();\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\nvar requestAnimationFrame$1 = (function () {\n if (typeof requestAnimationFrame === 'function') {\n // It's required to use a bounded function because IE sometimes throws\n // an \"Invalid calling object\" error if rAF is invoked without the global\n // object on the left hand side.\n return requestAnimationFrame.bind(global$1);\n }\n\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\nvar throttle = function (callback, delay) {\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n\n callback();\n }\n\n if (trailingCall) {\n proxy();\n }\n }\n\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\n function proxy() {\n var timeStamp = Date.now();\n\n if (leadingCall) {\n // Reject immediately following calls.\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n }\n\n // Schedule new call to be in invoked when the pending one is resolved.\n // This is important for \"transitions\" which never actually start\n // immediately so there is a chance that we might miss one if change\n // happens amids the pending invocation.\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n\n setTimeout(timeoutCallback, delay);\n }\n\n lastCallTime = timeStamp;\n }\n\n return proxy;\n};\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n\n// A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\n\n// Check if MutationObserver is available.\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\nvar ResizeObserverController = function() {\n this.connected_ = false;\n this.mutationEventsAdded_ = false;\n this.mutationsObserver_ = null;\n this.observers_ = [];\n\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n};\n\n/**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\n\n\n/**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\n\n\n/**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\n\n/**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\nResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n }\n\n // Add listeners if they haven't been added yet.\n if (!this.connected_) {\n this.connect_();\n }\n};\n\n/**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer);\n\n // Remove observer if it's present in registry.\n if (~index) {\n observers.splice(index, 1);\n }\n\n // Remove listeners if controller has no connected observers.\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n};\n\n/**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_();\n\n // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n if (changesDetected) {\n this.refresh();\n }\n};\n\n/**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\nResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active observations.\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n });\n\n // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers, e.g. when multiple instances of\n // ResizeObserver are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\n\n return activeObservers.length > 0;\n};\n\n/**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.connect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.connected_) {\n return;\n }\n\n // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way it's possible to capture at least the\n // final state of an element.\n document.addEventListener('transitionend', this.onTransitionEnd_);\n\n window.addEventListener('resize', this.refresh);\n\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n } else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n\n this.mutationEventsAdded_ = true;\n }\n\n this.connected_ = true;\n};\n\n/**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.disconnect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.connected_) {\n return;\n }\n\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n};\n\n/**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\n var propertyName = ref.propertyName; if ( propertyName === void 0 ) propertyName = '';\n\n // Detect whether transition may affect dimensions of an element.\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n\n if (isReflowProperty) {\n this.refresh();\n }\n};\n\n/**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\nResizeObserverController.getInstance = function () {\n if (!this.instance_) {\n this.instance_ = new ResizeObserverController();\n }\n\n return this.instance_;\n};\n\nResizeObserverController.instance_ = null;\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\nvar defineConfigurable = (function (target, props) {\n for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\n var key = list[i];\n\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true\n });\n }\n\n return target;\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\nvar getWindowOf = (function (target) {\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\n\n // Return the local global object if it's not possible extract one from\n // provided element.\n return ownerGlobal || global$1;\n});\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\n\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\nfunction getBordersSize(styles) {\n var positions = [], len = arguments.length - 1;\n while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\n\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n\n return size + toFloat(value);\n }, 0);\n}\n\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\nfunction getPaddings(styles) {\n var positions = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n\n for (var i = 0, list = positions; i < list.length; i += 1) {\n var position = list[i];\n\n var value = styles['padding-' + position];\n\n paddings[position] = toFloat(value);\n }\n\n return paddings;\n}\n\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth;\n var clientHeight = target.clientHeight;\n\n // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom;\n\n // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll bars.\n var width = toFloat(styles.width),\n height = toFloat(styles.height);\n\n // Width & height include paddings and borders when the 'border-box' box\n // model is applied (except for IE).\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n }\n\n // Following steps can't be applied to the document's root element as its\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the <html> itself neither has\n // rendered scroll bars nor it can be clipped.\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n\n // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\nvar isSVGGraphicsElement = (function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\n }\n\n // If it's so, then check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method.\n // eslint-disable-next-line no-extra-parens\n return function (target) { return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'; };\n})();\n\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\n\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n\n return getHTMLElementContentRect(target);\n}\n\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\nfunction createReadOnlyRect(ref) {\n var x = ref.x;\n var y = ref.y;\n var width = ref.width;\n var height = ref.height;\n\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype);\n\n // Rectangle's properties are not writable and non-enumerable.\n defineConfigurable(rect, {\n x: x, y: y, width: width, height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n\n return rect;\n}\n\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\nfunction createRectInit(x, y, width, height) {\n return { x: x, y: y, width: width, height: height };\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\nvar ResizeObservation = function(target) {\n this.broadcastWidth = 0;\n this.broadcastHeight = 0;\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n\n this.target = target;\n};\n\n/**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n/**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\n\n\n/**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\nResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n\n this.contentRect_ = rect;\n\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n};\n\n/**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\nResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n\n return rect;\n};\n\nvar ResizeObserverEntry = function(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit);\n\n // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n defineConfigurable(this, { target: target, contentRect: contentRect });\n};\n\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\n this.activeObservations_ = [];\n this.observations_ = new MapShim();\n\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n};\n\n/**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\n\n\n/**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\n\n\n/**\r\n * Public ResizeObserver instance which will be passed to the callback\r\n * function and used as a value of it's \"this\" binding.\r\n *\r\n * @private {ResizeObserver}\r\n */\n\n/**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\nResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_;\n\n // Do nothing if element is already being observed.\n if (observations.has(target)) {\n return;\n }\n\n observations.set(target, new ResizeObservation(target));\n\n this.controller_.addObserver(this);\n\n // Force the update of observations.\n this.controller_.refresh();\n};\n\n/**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_;\n\n // Do nothing if element is not being observed.\n if (!observations.has(target)) {\n return;\n }\n\n observations.delete(target);\n\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n};\n\n/**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n};\n\n/**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.gatherActive = function () {\n var this$1 = this;\n\n this.clearActive();\n\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n this$1.activeObservations_.push(observation);\n }\n });\n};\n\n/**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n\n var ctx = this.callbackCtx_;\n\n // Create ResizeObserverEntry instance for every active observation.\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n};\n\n/**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\nResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n};\n\n/**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\nResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n};\n\n// Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\n\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\nvar ResizeObserver = function(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n var controller = ResizeObserverController.getInstance();\n var observer = new ResizeObserverSPI(callback, controller, this);\n\n observers.set(this, observer);\n};\n\n// Expose public methods of ResizeObserver.\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n return (ref = observers.get(this))[method].apply(ref, arguments);\n var ref;\n };\n});\n\nvar index = (function () {\n // Export existing implementation if available.\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n\n return ResizeObserver;\n})();\n\nexport default index;\n"
}
],
"filteredModules": 0,
"origins": [
{
"moduleId": 4,
"module": "multi /home/tquetano/git/remeasure/src/index.js",
"moduleIdentifier": "multi /home/tquetano/git/remeasure/src/index.js",
"moduleName": "multi ./src/index.js",
"loc": "",
"name": "main",
"reasons": []
}
]
}
],
"modules": [
{
"id": 0,
"identifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/constants.js",
"name": "./src/constants.js",
"index": 7,
"index2": 5,
"size": 2641,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 2,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/utils.js",
"module": "./src/utils.js",
"moduleName": "./src/utils.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "9:0-237"
},
{
"moduleId": 5,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"module": "./src/index.js",
"moduleName": "./src/index.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "7:0-54"
},
{
"moduleId": 10,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/getMeasuredComponent.js",
"module": "./src/getMeasuredComponent.js",
"moduleName": "./src/getMeasuredComponent.js",
"type": "harmony import",
"userRequest": "./constants",
"loc": "14:0-46"
}
],
"usedExports": [
"ALL_BOUNDING_CLIENT_RECT_KEYS",
"ALL_DOM_ELEMENT_KEYS",
"ALL_KEYS",
"ALL_POSITION_KEYS",
"ALL_SIZE_KEYS",
"CLIENT_RECT_TYPE",
"DEFAULT_OPTIONS",
"ELEMENT_TYPE",
"FUNCTION_NAME_REGEXP",
"NATURAL_REGEXP",
"OPTIONS_SHAPE",
"VOID_ELEMENT_TAG_NAMES"
],
"providedExports": [
"DEFAULT_OPTIONS",
"BOUNDING_CLIENT_RECT_SIZE_KEYS",
"BOUNDING_CLIENT_RECT_POSITION_KEYS",
"ALL_BOUNDING_CLIENT_RECT_KEYS",
"DOM_ELEMENT_POSITION_KEYS",
"DOM_ELEMENT_SIZE_KEYS",
"FUNCTION_NAME_REGEXP",
"NATURAL_REGEXP",
"VOID_ELEMENT_TAG_NAMES",
"ALL_DOM_ELEMENT_KEYS",
"ALL_POSITION_KEYS",
"ALL_SIZE_KEYS",
"ALL_KEYS",
"CLIENT_RECT_TYPE",
"ELEMENT_TYPE",
"OPTIONS_SHAPE"
],
"optimizationBailout": [],
"depth": 2,
"source": "// external dependencies\nimport PropTypes from 'prop-types';\n\n/**\n * @constant {Object} DEFAULT_OPTIONS\n */\nexport var DEFAULT_OPTIONS = {\n debounce: 0,\n flatten: false,\n inheritedMethods: [],\n positionProp: 'position',\n renderOnResize: true,\n sizeProp: 'size'\n};\n\n/**\n * @constant {Array<string>} BOUNDING_CLIENT_RECT_SIZE_KEYS\n */\nexport var BOUNDING_CLIENT_RECT_SIZE_KEYS = ['height', 'width'];\n\n/**\n * @constant {Array<string>} BOUNDING_CLIENT_RECT_POSITION_KEYS\n */\nexport var BOUNDING_CLIENT_RECT_POSITION_KEYS = ['bottom', 'left', 'right', 'top'];\n\n/**\n * @constant {Array<string>} ALL_BOUNDING_CLIENT_RECT_KEYS\n */\nexport var ALL_BOUNDING_CLIENT_RECT_KEYS = [].concat(BOUNDING_CLIENT_RECT_POSITION_KEYS, BOUNDING_CLIENT_RECT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} DOM_ELEMENT_POSITION_KEYS\n */\nexport var DOM_ELEMENT_POSITION_KEYS = ['clientLeft', 'clientTop', 'offsetLeft', 'offsetTop', 'scrollLeft', 'scrollTop'];\n\n/**\n * @constant {Array<string>} DOM_ELEMENT_SIZE_KEYS\n */\nexport var DOM_ELEMENT_SIZE_KEYS = ['clientHeight', 'clientWidth', 'naturalHeight', 'naturalWidth', 'offsetHeight', 'offsetWidth', 'scrollHeight', 'scrollWidth'];\n\n/**\n * @constant {RegExp} FUNCTION_NAME_REGEXP\n */\nexport var FUNCTION_NAME_REGEXP = /^\\s*function\\s*([^\\(]*)/i;\n\n/**\n * @constant {RegExp} NATURAL_REGEXP\n */\nexport var NATURAL_REGEXP = /natural/;\n\n/**\n * @constant {Array<string>} VOID_ELEMENT_TAG_NAMES\n */\nexport var VOID_ELEMENT_TAG_NAMES = ['AREA', 'BASE', 'BR', 'COL', 'EMBED', 'HR', 'IMG', 'INPUT', 'LINK', 'MENUITEM', 'META', 'PARAM', 'SOURCE', 'TRACK', 'WBR'];\n\n/**\n * @constant {Array<string>} ALL_DOM_ELEMENT_KEYS\n */\nexport var ALL_DOM_ELEMENT_KEYS = [].concat(DOM_ELEMENT_POSITION_KEYS, DOM_ELEMENT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} ALL_POSITION_KEYS\n */\nexport var ALL_POSITION_KEYS = [].concat(DOM_ELEMENT_POSITION_KEYS, BOUNDING_CLIENT_RECT_POSITION_KEYS);\n\n/**\n * @constant {Array<string>} ALL_SIZE_KEYS\n */\nexport var ALL_SIZE_KEYS = [].concat(DOM_ELEMENT_SIZE_KEYS, BOUNDING_CLIENT_RECT_SIZE_KEYS);\n\n/**\n * @constant {Array<string>} ALL_KEYS\n */\nexport var ALL_KEYS = [].concat(ALL_POSITION_KEYS, ALL_SIZE_KEYS);\n\n/**\n * @constant {string} CLIENT_RECT_TYPE\n */\nexport var CLIENT_RECT_TYPE = 'clientRect';\n\n/**\n * @constant {string} ELEMENT_TYPE\n */\nexport var ELEMENT_TYPE = 'element';\n\n/**\n * @constant {Object} OPTIONS_SHAPE\n */\nexport var OPTIONS_SHAPE = {\n debounce: PropTypes.number,\n flatten: PropTypes.bool,\n inheritedMethods: PropTypes.arrayOf(PropTypes.string),\n isPure: PropTypes.bool,\n positionProp: PropTypes.string,\n renderOnResize: PropTypes.bool,\n sizeProp: PropTypes.string\n};"
},
{
"id": 1,
"identifier": "/home/tquetano/git/remeasure/node_modules/prop-types/index.js",
"name": "./node_modules/prop-types/index.js",
"index": 2,
"index2": 4,
"size": 956,
"cacheable": true,
"built": true,
"optional": false,
"prefetched": false,
"chunks": [
0
],
"assets": [],
"issuer": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/index.js",
"issuerId": 5,
"issuerName": "./src/index.js",
"failed": false,
"errors": 0,
"warnings": 0,
"reasons": [
{
"moduleId": 0,
"moduleIdentifier": "/home/tquetano/git/remeasure/node_modules/babel-loader/lib/index.js!/home/tquetano/git/remeasure/node_modules/eslint-loader/index.js??ref--0!/home/tquetano/git/remeasure/src/constants.js",
"module": "./src/constants.js",
"moduleName": "./src/constants.js",
"type": "harmony import",
"userRequest": "prop-types",
"loc": "2:0-35"