willba-component-library 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -76,8 +76,6 @@
76
76
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
77
77
  };
78
78
 
79
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
80
-
81
79
  function getDefaultExportFromCjs (x) {
82
80
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
83
81
  }
@@ -90,76 +88,83 @@
90
88
  http://jedwatson.github.io/classnames
91
89
  */
92
90
 
93
- (function (module) {
94
- /* global define */
95
-
96
- (function () {
91
+ var hasRequiredClassnames;
97
92
 
98
- var hasOwn = {}.hasOwnProperty;
93
+ function requireClassnames () {
94
+ if (hasRequiredClassnames) return classnames.exports;
95
+ hasRequiredClassnames = 1;
96
+ (function (module) {
97
+ /* global define */
99
98
 
100
- function classNames () {
101
- var classes = '';
99
+ (function () {
102
100
 
103
- for (var i = 0; i < arguments.length; i++) {
104
- var arg = arguments[i];
105
- if (arg) {
106
- classes = appendClass(classes, parseValue(arg));
107
- }
108
- }
101
+ var hasOwn = {}.hasOwnProperty;
109
102
 
110
- return classes;
111
- }
103
+ function classNames () {
104
+ var classes = '';
112
105
 
113
- function parseValue (arg) {
114
- if (typeof arg === 'string' || typeof arg === 'number') {
115
- return arg;
116
- }
106
+ for (var i = 0; i < arguments.length; i++) {
107
+ var arg = arguments[i];
108
+ if (arg) {
109
+ classes = appendClass(classes, parseValue(arg));
110
+ }
111
+ }
117
112
 
118
- if (typeof arg !== 'object') {
119
- return '';
113
+ return classes;
120
114
  }
121
115
 
122
- if (Array.isArray(arg)) {
123
- return classNames.apply(null, arg);
124
- }
116
+ function parseValue (arg) {
117
+ if (typeof arg === 'string' || typeof arg === 'number') {
118
+ return arg;
119
+ }
125
120
 
126
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
127
- return arg.toString();
128
- }
121
+ if (typeof arg !== 'object') {
122
+ return '';
123
+ }
129
124
 
130
- var classes = '';
125
+ if (Array.isArray(arg)) {
126
+ return classNames.apply(null, arg);
127
+ }
131
128
 
132
- for (var key in arg) {
133
- if (hasOwn.call(arg, key) && arg[key]) {
134
- classes = appendClass(classes, key);
129
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
130
+ return arg.toString();
135
131
  }
136
- }
137
132
 
138
- return classes;
139
- }
133
+ var classes = '';
140
134
 
141
- function appendClass (value, newClass) {
142
- if (!newClass) {
143
- return value;
135
+ for (var key in arg) {
136
+ if (hasOwn.call(arg, key) && arg[key]) {
137
+ classes = appendClass(classes, key);
138
+ }
139
+ }
140
+
141
+ return classes;
144
142
  }
145
-
146
- if (value) {
147
- return value + ' ' + newClass;
143
+
144
+ function appendClass (value, newClass) {
145
+ if (!newClass) {
146
+ return value;
147
+ }
148
+
149
+ if (value) {
150
+ return value + ' ' + newClass;
151
+ }
152
+
153
+ return value + newClass;
148
154
  }
149
-
150
- return value + newClass;
151
- }
152
155
 
153
- if (module.exports) {
154
- classNames.default = classNames;
155
- module.exports = classNames;
156
- } else {
157
- window.classNames = classNames;
158
- }
159
- }());
160
- } (classnames));
156
+ if (module.exports) {
157
+ classNames.default = classNames;
158
+ module.exports = classNames;
159
+ } else {
160
+ window.classNames = classNames;
161
+ }
162
+ }());
163
+ } (classnames));
164
+ return classnames.exports;
165
+ }
161
166
 
162
- var classnamesExports = classnames.exports;
167
+ var classnamesExports = requireClassnames();
163
168
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
164
169
 
165
170
  function styleInject(css, ref) {
@@ -9421,1832 +9426,1841 @@
9421
9426
  return (jsxRuntime.jsx(RootProvider, __assign({}, props, { children: jsxRuntime.jsx(Root, { initialProps: props }) })));
9422
9427
  }
9423
9428
 
9424
- var reactResponsive = {exports: {}};
9425
-
9426
- (function (module, exports) {
9427
- (function webpackUniversalModuleDefinition(root, factory) {
9428
- module.exports = factory(React);
9429
- })(commonjsGlobal, (__WEBPACK_EXTERNAL_MODULE_react__) => {
9430
- return /******/ (() => { // webpackBootstrap
9431
- /******/ var __webpack_modules__ = ({
9432
-
9433
- /***/ "./node_modules/css-mediaquery/index.js":
9434
- /*!**********************************************!*\
9435
- !*** ./node_modules/css-mediaquery/index.js ***!
9436
- \**********************************************/
9437
- /***/ ((__unused_webpack_module, exports) => {
9438
- /*
9439
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
9440
- Copyrights licensed under the New BSD License.
9441
- See the accompanying LICENSE file for terms.
9442
- */
9443
-
9444
-
9445
-
9446
- exports.match = matchQuery;
9447
- exports.parse = parseQuery;
9448
-
9449
- // -----------------------------------------------------------------------------
9450
-
9451
- var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
9452
- RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
9453
- RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,
9454
- RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,
9455
- RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
9456
-
9457
- function matchQuery(mediaQuery, values) {
9458
- return parseQuery(mediaQuery).some(function (query) {
9459
- var inverse = query.inverse;
9460
-
9461
- // Either the parsed or specified `type` is "all", or the types must be
9462
- // equal for a match.
9463
- var typeMatch = query.type === 'all' || values.type === query.type;
9464
-
9465
- // Quit early when `type` doesn't match, but take "not" into account.
9466
- if ((typeMatch && inverse) || !(typeMatch || inverse)) {
9467
- return false;
9468
- }
9469
-
9470
- var expressionsMatch = query.expressions.every(function (expression) {
9471
- var feature = expression.feature,
9472
- modifier = expression.modifier,
9473
- expValue = expression.value,
9474
- value = values[feature];
9475
-
9476
- // Missing or falsy values don't match.
9477
- if (!value) { return false; }
9478
-
9479
- switch (feature) {
9480
- case 'orientation':
9481
- case 'scan':
9482
- return value.toLowerCase() === expValue.toLowerCase();
9483
-
9484
- case 'width':
9485
- case 'height':
9486
- case 'device-width':
9487
- case 'device-height':
9488
- expValue = toPx(expValue);
9489
- value = toPx(value);
9490
- break;
9491
-
9492
- case 'resolution':
9493
- expValue = toDpi(expValue);
9494
- value = toDpi(value);
9495
- break;
9496
-
9497
- case 'aspect-ratio':
9498
- case 'device-aspect-ratio':
9499
- case /* Deprecated */ 'device-pixel-ratio':
9500
- expValue = toDecimal(expValue);
9501
- value = toDecimal(value);
9502
- break;
9503
-
9504
- case 'grid':
9505
- case 'color':
9506
- case 'color-index':
9507
- case 'monochrome':
9508
- expValue = parseInt(expValue, 10) || 1;
9509
- value = parseInt(value, 10) || 0;
9510
- break;
9511
- }
9512
-
9513
- switch (modifier) {
9514
- case 'min': return value >= expValue;
9515
- case 'max': return value <= expValue;
9516
- default : return value === expValue;
9517
- }
9518
- });
9519
-
9520
- return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);
9521
- });
9522
- }
9429
+ var reactResponsive$1 = {exports: {}};
9430
+
9431
+ var reactResponsive = reactResponsive$1.exports;
9432
+
9433
+ var hasRequiredReactResponsive;
9434
+
9435
+ function requireReactResponsive () {
9436
+ if (hasRequiredReactResponsive) return reactResponsive$1.exports;
9437
+ hasRequiredReactResponsive = 1;
9438
+ (function (module, exports) {
9439
+ (function webpackUniversalModuleDefinition(root, factory) {
9440
+ module.exports = factory(React);
9441
+ })(reactResponsive, (__WEBPACK_EXTERNAL_MODULE_react__) => {
9442
+ return /******/ (() => { // webpackBootstrap
9443
+ /******/ var __webpack_modules__ = ({
9444
+
9445
+ /***/ "./node_modules/css-mediaquery/index.js":
9446
+ /*!**********************************************!*\
9447
+ !*** ./node_modules/css-mediaquery/index.js ***!
9448
+ \**********************************************/
9449
+ /***/ ((__unused_webpack_module, exports) => {
9450
+ /*
9451
+ Copyright (c) 2014, Yahoo! Inc. All rights reserved.
9452
+ Copyrights licensed under the New BSD License.
9453
+ See the accompanying LICENSE file for terms.
9454
+ */
9455
+
9456
+
9457
+
9458
+ exports.match = matchQuery;
9459
+ exports.parse = parseQuery;
9460
+
9461
+ // -----------------------------------------------------------------------------
9462
+
9463
+ var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
9464
+ RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
9465
+ RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,
9466
+ RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,
9467
+ RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
9468
+
9469
+ function matchQuery(mediaQuery, values) {
9470
+ return parseQuery(mediaQuery).some(function (query) {
9471
+ var inverse = query.inverse;
9472
+
9473
+ // Either the parsed or specified `type` is "all", or the types must be
9474
+ // equal for a match.
9475
+ var typeMatch = query.type === 'all' || values.type === query.type;
9476
+
9477
+ // Quit early when `type` doesn't match, but take "not" into account.
9478
+ if ((typeMatch && inverse) || !(typeMatch || inverse)) {
9479
+ return false;
9480
+ }
9481
+
9482
+ var expressionsMatch = query.expressions.every(function (expression) {
9483
+ var feature = expression.feature,
9484
+ modifier = expression.modifier,
9485
+ expValue = expression.value,
9486
+ value = values[feature];
9487
+
9488
+ // Missing or falsy values don't match.
9489
+ if (!value) { return false; }
9490
+
9491
+ switch (feature) {
9492
+ case 'orientation':
9493
+ case 'scan':
9494
+ return value.toLowerCase() === expValue.toLowerCase();
9495
+
9496
+ case 'width':
9497
+ case 'height':
9498
+ case 'device-width':
9499
+ case 'device-height':
9500
+ expValue = toPx(expValue);
9501
+ value = toPx(value);
9502
+ break;
9503
+
9504
+ case 'resolution':
9505
+ expValue = toDpi(expValue);
9506
+ value = toDpi(value);
9507
+ break;
9508
+
9509
+ case 'aspect-ratio':
9510
+ case 'device-aspect-ratio':
9511
+ case /* Deprecated */ 'device-pixel-ratio':
9512
+ expValue = toDecimal(expValue);
9513
+ value = toDecimal(value);
9514
+ break;
9515
+
9516
+ case 'grid':
9517
+ case 'color':
9518
+ case 'color-index':
9519
+ case 'monochrome':
9520
+ expValue = parseInt(expValue, 10) || 1;
9521
+ value = parseInt(value, 10) || 0;
9522
+ break;
9523
+ }
9524
+
9525
+ switch (modifier) {
9526
+ case 'min': return value >= expValue;
9527
+ case 'max': return value <= expValue;
9528
+ default : return value === expValue;
9529
+ }
9530
+ });
9531
+
9532
+ return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);
9533
+ });
9534
+ }
9523
9535
 
9524
- function parseQuery(mediaQuery) {
9525
- return mediaQuery.split(',').map(function (query) {
9526
- query = query.trim();
9536
+ function parseQuery(mediaQuery) {
9537
+ return mediaQuery.split(',').map(function (query) {
9538
+ query = query.trim();
9527
9539
 
9528
- var captures = query.match(RE_MEDIA_QUERY),
9529
- modifier = captures[1],
9530
- type = captures[2],
9531
- expressions = captures[3] || '',
9532
- parsed = {};
9540
+ var captures = query.match(RE_MEDIA_QUERY),
9541
+ modifier = captures[1],
9542
+ type = captures[2],
9543
+ expressions = captures[3] || '',
9544
+ parsed = {};
9533
9545
 
9534
- parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
9535
- parsed.type = type ? type.toLowerCase() : 'all';
9546
+ parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
9547
+ parsed.type = type ? type.toLowerCase() : 'all';
9536
9548
 
9537
- // Split expressions into a list.
9538
- expressions = expressions.match(/\([^\)]+\)/g) || [];
9549
+ // Split expressions into a list.
9550
+ expressions = expressions.match(/\([^\)]+\)/g) || [];
9539
9551
 
9540
- parsed.expressions = expressions.map(function (expression) {
9541
- var captures = expression.match(RE_MQ_EXPRESSION),
9542
- feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
9552
+ parsed.expressions = expressions.map(function (expression) {
9553
+ var captures = expression.match(RE_MQ_EXPRESSION),
9554
+ feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
9543
9555
 
9544
- return {
9545
- modifier: feature[1],
9546
- feature : feature[2],
9547
- value : captures[2]
9548
- };
9549
- });
9556
+ return {
9557
+ modifier: feature[1],
9558
+ feature : feature[2],
9559
+ value : captures[2]
9560
+ };
9561
+ });
9550
9562
 
9551
- return parsed;
9552
- });
9553
- }
9563
+ return parsed;
9564
+ });
9565
+ }
9554
9566
 
9555
- // -- Utilities ----------------------------------------------------------------
9567
+ // -- Utilities ----------------------------------------------------------------
9556
9568
 
9557
- function toDecimal(ratio) {
9558
- var decimal = Number(ratio),
9559
- numbers;
9569
+ function toDecimal(ratio) {
9570
+ var decimal = Number(ratio),
9571
+ numbers;
9560
9572
 
9561
- if (!decimal) {
9562
- numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
9563
- decimal = numbers[1] / numbers[2];
9564
- }
9573
+ if (!decimal) {
9574
+ numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
9575
+ decimal = numbers[1] / numbers[2];
9576
+ }
9565
9577
 
9566
- return decimal;
9567
- }
9578
+ return decimal;
9579
+ }
9568
9580
 
9569
- function toDpi(resolution) {
9570
- var value = parseFloat(resolution),
9571
- units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
9581
+ function toDpi(resolution) {
9582
+ var value = parseFloat(resolution),
9583
+ units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
9572
9584
 
9573
- switch (units) {
9574
- case 'dpcm': return value / 2.54;
9575
- case 'dppx': return value * 96;
9576
- default : return value;
9577
- }
9578
- }
9585
+ switch (units) {
9586
+ case 'dpcm': return value / 2.54;
9587
+ case 'dppx': return value * 96;
9588
+ default : return value;
9589
+ }
9590
+ }
9579
9591
 
9580
- function toPx(length) {
9581
- var value = parseFloat(length),
9582
- units = String(length).match(RE_LENGTH_UNIT)[1];
9583
-
9584
- switch (units) {
9585
- case 'em' : return value * 16;
9586
- case 'rem': return value * 16;
9587
- case 'cm' : return value * 96 / 2.54;
9588
- case 'mm' : return value * 96 / 2.54 / 10;
9589
- case 'in' : return value * 96;
9590
- case 'pt' : return value * 72;
9591
- case 'pc' : return value * 72 / 12;
9592
- default : return value;
9593
- }
9594
- }
9592
+ function toPx(length) {
9593
+ var value = parseFloat(length),
9594
+ units = String(length).match(RE_LENGTH_UNIT)[1];
9595
+
9596
+ switch (units) {
9597
+ case 'em' : return value * 16;
9598
+ case 'rem': return value * 16;
9599
+ case 'cm' : return value * 96 / 2.54;
9600
+ case 'mm' : return value * 96 / 2.54 / 10;
9601
+ case 'in' : return value * 96;
9602
+ case 'pt' : return value * 72;
9603
+ case 'pc' : return value * 72 / 12;
9604
+ default : return value;
9605
+ }
9606
+ }
9595
9607
 
9596
9608
 
9597
- /***/ }),
9598
-
9599
- /***/ "./node_modules/hyphenate-style-name/index.js":
9600
- /*!****************************************************!*\
9601
- !*** ./node_modules/hyphenate-style-name/index.js ***!
9602
- \****************************************************/
9603
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9604
- __webpack_require__.r(__webpack_exports__);
9605
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9606
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
9607
- /* harmony export */ });
9608
- /* eslint-disable no-var, prefer-template */
9609
- var uppercasePattern = /[A-Z]/g;
9610
- var msPattern = /^ms-/;
9611
- var cache = {};
9612
-
9613
- function toHyphenLower(match) {
9614
- return '-' + match.toLowerCase()
9615
- }
9609
+ /***/ }),
9610
+
9611
+ /***/ "./node_modules/hyphenate-style-name/index.js":
9612
+ /*!****************************************************!*\
9613
+ !*** ./node_modules/hyphenate-style-name/index.js ***!
9614
+ \****************************************************/
9615
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9616
+ __webpack_require__.r(__webpack_exports__);
9617
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9618
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
9619
+ /* harmony export */ });
9620
+ /* eslint-disable no-var, prefer-template */
9621
+ var uppercasePattern = /[A-Z]/g;
9622
+ var msPattern = /^ms-/;
9623
+ var cache = {};
9624
+
9625
+ function toHyphenLower(match) {
9626
+ return '-' + match.toLowerCase()
9627
+ }
9616
9628
 
9617
- function hyphenateStyleName(name) {
9618
- if (cache.hasOwnProperty(name)) {
9619
- return cache[name]
9620
- }
9629
+ function hyphenateStyleName(name) {
9630
+ if (cache.hasOwnProperty(name)) {
9631
+ return cache[name]
9632
+ }
9621
9633
 
9622
- var hName = name.replace(uppercasePattern, toHyphenLower);
9623
- return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
9624
- }
9634
+ var hName = name.replace(uppercasePattern, toHyphenLower);
9635
+ return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
9636
+ }
9625
9637
 
9626
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hyphenateStyleName);
9627
-
9628
-
9629
- /***/ }),
9630
-
9631
- /***/ "./node_modules/matchmediaquery/index.js":
9632
- /*!***********************************************!*\
9633
- !*** ./node_modules/matchmediaquery/index.js ***!
9634
- \***********************************************/
9635
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9636
-
9637
-
9638
- var staticMatch = (__webpack_require__(/*! css-mediaquery */ "./node_modules/css-mediaquery/index.js").match);
9639
- var dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;
9640
-
9641
- // our fake MediaQueryList
9642
- function Mql(query, values, forceStatic){
9643
- var self = this;
9644
- if(dynamicMatch && !forceStatic){
9645
- var mql = dynamicMatch.call(window, query);
9646
- this.matches = mql.matches;
9647
- this.media = mql.media;
9648
- // TODO: is there a time it makes sense to remove this listener?
9649
- mql.addListener(update);
9650
- } else {
9651
- this.matches = staticMatch(query, values);
9652
- this.media = query;
9653
- }
9654
-
9655
- this.addListener = addListener;
9656
- this.removeListener = removeListener;
9657
- this.dispose = dispose;
9658
-
9659
- function addListener(listener){
9660
- if(mql){
9661
- mql.addListener(listener);
9662
- }
9663
- }
9664
-
9665
- function removeListener(listener){
9666
- if(mql){
9667
- mql.removeListener(listener);
9668
- }
9669
- }
9670
-
9671
- // update ourselves!
9672
- function update(evt){
9673
- self.matches = evt.matches;
9674
- self.media = evt.media;
9675
- }
9676
-
9677
- function dispose(){
9678
- if(mql){
9679
- mql.removeListener(update);
9680
- }
9681
- }
9682
- }
9638
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hyphenateStyleName);
9639
+
9640
+
9641
+ /***/ }),
9642
+
9643
+ /***/ "./node_modules/matchmediaquery/index.js":
9644
+ /*!***********************************************!*\
9645
+ !*** ./node_modules/matchmediaquery/index.js ***!
9646
+ \***********************************************/
9647
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9648
+
9649
+
9650
+ var staticMatch = (__webpack_require__(/*! css-mediaquery */ "./node_modules/css-mediaquery/index.js").match);
9651
+ var dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;
9652
+
9653
+ // our fake MediaQueryList
9654
+ function Mql(query, values, forceStatic){
9655
+ var self = this;
9656
+ if(dynamicMatch && !forceStatic){
9657
+ var mql = dynamicMatch.call(window, query);
9658
+ this.matches = mql.matches;
9659
+ this.media = mql.media;
9660
+ // TODO: is there a time it makes sense to remove this listener?
9661
+ mql.addListener(update);
9662
+ } else {
9663
+ this.matches = staticMatch(query, values);
9664
+ this.media = query;
9665
+ }
9666
+
9667
+ this.addListener = addListener;
9668
+ this.removeListener = removeListener;
9669
+ this.dispose = dispose;
9670
+
9671
+ function addListener(listener){
9672
+ if(mql){
9673
+ mql.addListener(listener);
9674
+ }
9675
+ }
9676
+
9677
+ function removeListener(listener){
9678
+ if(mql){
9679
+ mql.removeListener(listener);
9680
+ }
9681
+ }
9682
+
9683
+ // update ourselves!
9684
+ function update(evt){
9685
+ self.matches = evt.matches;
9686
+ self.media = evt.media;
9687
+ }
9688
+
9689
+ function dispose(){
9690
+ if(mql){
9691
+ mql.removeListener(update);
9692
+ }
9693
+ }
9694
+ }
9683
9695
 
9684
- function matchMedia(query, values, forceStatic){
9685
- return new Mql(query, values, forceStatic);
9686
- }
9696
+ function matchMedia(query, values, forceStatic){
9697
+ return new Mql(query, values, forceStatic);
9698
+ }
9699
+
9700
+ module.exports = matchMedia;
9687
9701
 
9688
- module.exports = matchMedia;
9689
9702
 
9703
+ /***/ }),
9690
9704
 
9691
- /***/ }),
9705
+ /***/ "./node_modules/object-assign/index.js":
9706
+ /*!*********************************************!*\
9707
+ !*** ./node_modules/object-assign/index.js ***!
9708
+ \*********************************************/
9709
+ /***/ ((module) => {
9710
+ /*
9711
+ object-assign
9712
+ (c) Sindre Sorhus
9713
+ @license MIT
9714
+ */
9692
9715
 
9693
- /***/ "./node_modules/object-assign/index.js":
9694
- /*!*********************************************!*\
9695
- !*** ./node_modules/object-assign/index.js ***!
9696
- \*********************************************/
9697
- /***/ ((module) => {
9698
- /*
9699
- object-assign
9700
- (c) Sindre Sorhus
9701
- @license MIT
9702
- */
9703
9716
 
9717
+ /* eslint-disable no-unused-vars */
9718
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
9719
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
9720
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
9704
9721
 
9705
- /* eslint-disable no-unused-vars */
9706
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
9707
- var hasOwnProperty = Object.prototype.hasOwnProperty;
9708
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
9722
+ function toObject(val) {
9723
+ if (val === null || val === undefined) {
9724
+ throw new TypeError('Object.assign cannot be called with null or undefined');
9725
+ }
9709
9726
 
9710
- function toObject(val) {
9711
- if (val === null || val === undefined) {
9712
- throw new TypeError('Object.assign cannot be called with null or undefined');
9727
+ return Object(val);
9713
9728
  }
9714
9729
 
9715
- return Object(val);
9716
- }
9730
+ function shouldUseNative() {
9731
+ try {
9732
+ if (!Object.assign) {
9733
+ return false;
9734
+ }
9717
9735
 
9718
- function shouldUseNative() {
9719
- try {
9720
- if (!Object.assign) {
9721
- return false;
9722
- }
9736
+ // Detect buggy property enumeration order in older V8 versions.
9723
9737
 
9724
- // Detect buggy property enumeration order in older V8 versions.
9738
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
9739
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
9740
+ test1[5] = 'de';
9741
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
9742
+ return false;
9743
+ }
9725
9744
 
9726
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
9727
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
9728
- test1[5] = 'de';
9729
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
9730
- return false;
9731
- }
9745
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9746
+ var test2 = {};
9747
+ for (var i = 0; i < 10; i++) {
9748
+ test2['_' + String.fromCharCode(i)] = i;
9749
+ }
9750
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
9751
+ return test2[n];
9752
+ });
9753
+ if (order2.join('') !== '0123456789') {
9754
+ return false;
9755
+ }
9732
9756
 
9733
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9734
- var test2 = {};
9735
- for (var i = 0; i < 10; i++) {
9736
- test2['_' + String.fromCharCode(i)] = i;
9737
- }
9738
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
9739
- return test2[n];
9740
- });
9741
- if (order2.join('') !== '0123456789') {
9742
- return false;
9743
- }
9757
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9758
+ var test3 = {};
9759
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
9760
+ test3[letter] = letter;
9761
+ });
9762
+ if (Object.keys(Object.assign({}, test3)).join('') !==
9763
+ 'abcdefghijklmnopqrst') {
9764
+ return false;
9765
+ }
9744
9766
 
9745
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
9746
- var test3 = {};
9747
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
9748
- test3[letter] = letter;
9749
- });
9750
- if (Object.keys(Object.assign({}, test3)).join('') !==
9751
- 'abcdefghijklmnopqrst') {
9767
+ return true;
9768
+ } catch (err) {
9769
+ // We don't expect any of the above to throw, but better to be safe.
9752
9770
  return false;
9753
9771
  }
9754
-
9755
- return true;
9756
- } catch (err) {
9757
- // We don't expect any of the above to throw, but better to be safe.
9758
- return false;
9759
9772
  }
9760
- }
9761
9773
 
9762
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
9763
- var from;
9764
- var to = toObject(target);
9765
- var symbols;
9774
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
9775
+ var from;
9776
+ var to = toObject(target);
9777
+ var symbols;
9766
9778
 
9767
- for (var s = 1; s < arguments.length; s++) {
9768
- from = Object(arguments[s]);
9779
+ for (var s = 1; s < arguments.length; s++) {
9780
+ from = Object(arguments[s]);
9769
9781
 
9770
- for (var key in from) {
9771
- if (hasOwnProperty.call(from, key)) {
9772
- to[key] = from[key];
9782
+ for (var key in from) {
9783
+ if (hasOwnProperty.call(from, key)) {
9784
+ to[key] = from[key];
9785
+ }
9773
9786
  }
9774
- }
9775
9787
 
9776
- if (getOwnPropertySymbols) {
9777
- symbols = getOwnPropertySymbols(from);
9778
- for (var i = 0; i < symbols.length; i++) {
9779
- if (propIsEnumerable.call(from, symbols[i])) {
9780
- to[symbols[i]] = from[symbols[i]];
9788
+ if (getOwnPropertySymbols) {
9789
+ symbols = getOwnPropertySymbols(from);
9790
+ for (var i = 0; i < symbols.length; i++) {
9791
+ if (propIsEnumerable.call(from, symbols[i])) {
9792
+ to[symbols[i]] = from[symbols[i]];
9793
+ }
9781
9794
  }
9782
9795
  }
9783
9796
  }
9797
+
9798
+ return to;
9799
+ };
9800
+
9801
+
9802
+ /***/ }),
9803
+
9804
+ /***/ "./node_modules/prop-types/checkPropTypes.js":
9805
+ /*!***************************************************!*\
9806
+ !*** ./node_modules/prop-types/checkPropTypes.js ***!
9807
+ \***************************************************/
9808
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9809
+ /**
9810
+ * Copyright (c) 2013-present, Facebook, Inc.
9811
+ *
9812
+ * This source code is licensed under the MIT license found in the
9813
+ * LICENSE file in the root directory of this source tree.
9814
+ */
9815
+
9816
+
9817
+
9818
+ var printWarning = function() {};
9819
+
9820
+ {
9821
+ var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
9822
+ var loggedTypeFailures = {};
9823
+ var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
9824
+
9825
+ printWarning = function(text) {
9826
+ var message = 'Warning: ' + text;
9827
+ if (typeof console !== 'undefined') {
9828
+ console.error(message);
9829
+ }
9830
+ try {
9831
+ // --- Welcome to debugging React ---
9832
+ // This error was thrown as a convenience so that you can use this stack
9833
+ // to find the callsite that caused this warning to fire.
9834
+ throw new Error(message);
9835
+ } catch (x) { /**/ }
9836
+ };
9784
9837
  }
9785
9838
 
9786
- return to;
9787
- };
9788
-
9789
-
9790
- /***/ }),
9791
-
9792
- /***/ "./node_modules/prop-types/checkPropTypes.js":
9793
- /*!***************************************************!*\
9794
- !*** ./node_modules/prop-types/checkPropTypes.js ***!
9795
- \***************************************************/
9796
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9797
- /**
9798
- * Copyright (c) 2013-present, Facebook, Inc.
9799
- *
9800
- * This source code is licensed under the MIT license found in the
9801
- * LICENSE file in the root directory of this source tree.
9802
- */
9803
-
9804
-
9805
-
9806
- var printWarning = function() {};
9807
-
9808
- {
9809
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
9810
- var loggedTypeFailures = {};
9811
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
9812
-
9813
- printWarning = function(text) {
9814
- var message = 'Warning: ' + text;
9815
- if (typeof console !== 'undefined') {
9816
- console.error(message);
9817
- }
9818
- try {
9819
- // --- Welcome to debugging React ---
9820
- // This error was thrown as a convenience so that you can use this stack
9821
- // to find the callsite that caused this warning to fire.
9822
- throw new Error(message);
9823
- } catch (x) { /**/ }
9824
- };
9825
- }
9839
+ /**
9840
+ * Assert that the values match with the type specs.
9841
+ * Error messages are memorized and will only be shown once.
9842
+ *
9843
+ * @param {object} typeSpecs Map of name to a ReactPropType
9844
+ * @param {object} values Runtime values that need to be type-checked
9845
+ * @param {string} location e.g. "prop", "context", "child context"
9846
+ * @param {string} componentName Name of the component for error messages.
9847
+ * @param {?Function} getStack Returns the component stack.
9848
+ * @private
9849
+ */
9850
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
9851
+ {
9852
+ for (var typeSpecName in typeSpecs) {
9853
+ if (has(typeSpecs, typeSpecName)) {
9854
+ var error;
9855
+ // Prop type validation may throw. In case they do, we don't want to
9856
+ // fail the render phase where it didn't fail before. So we log it.
9857
+ // After these have been cleaned up, we'll let them throw.
9858
+ try {
9859
+ // This is intentionally an invariant that gets caught. It's the same
9860
+ // behavior as without this statement except with a better message.
9861
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
9862
+ var err = Error(
9863
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
9864
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
9865
+ 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
9866
+ );
9867
+ err.name = 'Invariant Violation';
9868
+ throw err;
9869
+ }
9870
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
9871
+ } catch (ex) {
9872
+ error = ex;
9873
+ }
9874
+ if (error && !(error instanceof Error)) {
9875
+ printWarning(
9876
+ (componentName || 'React class') + ': type specification of ' +
9877
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
9878
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
9879
+ 'You may have forgotten to pass an argument to the type checker ' +
9880
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
9881
+ 'shape all require an argument).'
9882
+ );
9883
+ }
9884
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
9885
+ // Only monitor this failure once because there tends to be a lot of the
9886
+ // same error.
9887
+ loggedTypeFailures[error.message] = true;
9888
+
9889
+ var stack = getStack ? getStack() : '';
9890
+
9891
+ printWarning(
9892
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
9893
+ );
9894
+ }
9895
+ }
9896
+ }
9897
+ }
9898
+ }
9826
9899
 
9827
- /**
9828
- * Assert that the values match with the type specs.
9829
- * Error messages are memorized and will only be shown once.
9830
- *
9831
- * @param {object} typeSpecs Map of name to a ReactPropType
9832
- * @param {object} values Runtime values that need to be type-checked
9833
- * @param {string} location e.g. "prop", "context", "child context"
9834
- * @param {string} componentName Name of the component for error messages.
9835
- * @param {?Function} getStack Returns the component stack.
9836
- * @private
9837
- */
9838
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
9839
- {
9840
- for (var typeSpecName in typeSpecs) {
9841
- if (has(typeSpecs, typeSpecName)) {
9842
- var error;
9843
- // Prop type validation may throw. In case they do, we don't want to
9844
- // fail the render phase where it didn't fail before. So we log it.
9845
- // After these have been cleaned up, we'll let them throw.
9846
- try {
9847
- // This is intentionally an invariant that gets caught. It's the same
9848
- // behavior as without this statement except with a better message.
9849
- if (typeof typeSpecs[typeSpecName] !== 'function') {
9850
- var err = Error(
9851
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
9852
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
9853
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
9854
- );
9855
- err.name = 'Invariant Violation';
9856
- throw err;
9857
- }
9858
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
9859
- } catch (ex) {
9860
- error = ex;
9861
- }
9862
- if (error && !(error instanceof Error)) {
9863
- printWarning(
9864
- (componentName || 'React class') + ': type specification of ' +
9865
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
9866
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
9867
- 'You may have forgotten to pass an argument to the type checker ' +
9868
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
9869
- 'shape all require an argument).'
9870
- );
9871
- }
9872
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
9873
- // Only monitor this failure once because there tends to be a lot of the
9874
- // same error.
9875
- loggedTypeFailures[error.message] = true;
9876
-
9877
- var stack = getStack ? getStack() : '';
9878
-
9879
- printWarning(
9880
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
9881
- );
9882
- }
9883
- }
9884
- }
9885
- }
9886
- }
9900
+ /**
9901
+ * Resets warning cache when testing.
9902
+ *
9903
+ * @private
9904
+ */
9905
+ checkPropTypes.resetWarningCache = function() {
9906
+ {
9907
+ loggedTypeFailures = {};
9908
+ }
9909
+ };
9910
+
9911
+ module.exports = checkPropTypes;
9912
+
9913
+
9914
+ /***/ }),
9915
+
9916
+ /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
9917
+ /*!************************************************************!*\
9918
+ !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
9919
+ \************************************************************/
9920
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9921
+ /**
9922
+ * Copyright (c) 2013-present, Facebook, Inc.
9923
+ *
9924
+ * This source code is licensed under the MIT license found in the
9925
+ * LICENSE file in the root directory of this source tree.
9926
+ */
9927
+
9928
+
9929
+
9930
+ var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
9931
+ var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
9932
+
9933
+ var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
9934
+ var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
9935
+ var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
9936
+
9937
+ var printWarning = function() {};
9938
+
9939
+ {
9940
+ printWarning = function(text) {
9941
+ var message = 'Warning: ' + text;
9942
+ if (typeof console !== 'undefined') {
9943
+ console.error(message);
9944
+ }
9945
+ try {
9946
+ // --- Welcome to debugging React ---
9947
+ // This error was thrown as a convenience so that you can use this stack
9948
+ // to find the callsite that caused this warning to fire.
9949
+ throw new Error(message);
9950
+ } catch (x) {}
9951
+ };
9952
+ }
9887
9953
 
9888
- /**
9889
- * Resets warning cache when testing.
9890
- *
9891
- * @private
9892
- */
9893
- checkPropTypes.resetWarningCache = function() {
9894
- {
9895
- loggedTypeFailures = {};
9896
- }
9897
- };
9898
-
9899
- module.exports = checkPropTypes;
9900
-
9901
-
9902
- /***/ }),
9903
-
9904
- /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
9905
- /*!************************************************************!*\
9906
- !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
9907
- \************************************************************/
9908
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
9909
- /**
9910
- * Copyright (c) 2013-present, Facebook, Inc.
9911
- *
9912
- * This source code is licensed under the MIT license found in the
9913
- * LICENSE file in the root directory of this source tree.
9914
- */
9915
-
9916
-
9917
-
9918
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
9919
- var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
9920
-
9921
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
9922
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
9923
- var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
9924
-
9925
- var printWarning = function() {};
9926
-
9927
- {
9928
- printWarning = function(text) {
9929
- var message = 'Warning: ' + text;
9930
- if (typeof console !== 'undefined') {
9931
- console.error(message);
9932
- }
9933
- try {
9934
- // --- Welcome to debugging React ---
9935
- // This error was thrown as a convenience so that you can use this stack
9936
- // to find the callsite that caused this warning to fire.
9937
- throw new Error(message);
9938
- } catch (x) {}
9939
- };
9940
- }
9954
+ function emptyFunctionThatReturnsNull() {
9955
+ return null;
9956
+ }
9941
9957
 
9942
- function emptyFunctionThatReturnsNull() {
9943
- return null;
9944
- }
9958
+ module.exports = function(isValidElement, throwOnDirectAccess) {
9959
+ /* global Symbol */
9960
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
9961
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
9962
+
9963
+ /**
9964
+ * Returns the iterator method function contained on the iterable object.
9965
+ *
9966
+ * Be sure to invoke the function with the iterable as context:
9967
+ *
9968
+ * var iteratorFn = getIteratorFn(myIterable);
9969
+ * if (iteratorFn) {
9970
+ * var iterator = iteratorFn.call(myIterable);
9971
+ * ...
9972
+ * }
9973
+ *
9974
+ * @param {?object} maybeIterable
9975
+ * @return {?function}
9976
+ */
9977
+ function getIteratorFn(maybeIterable) {
9978
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
9979
+ if (typeof iteratorFn === 'function') {
9980
+ return iteratorFn;
9981
+ }
9982
+ }
9983
+
9984
+ /**
9985
+ * Collection of methods that allow declaration and validation of props that are
9986
+ * supplied to React components. Example usage:
9987
+ *
9988
+ * var Props = require('ReactPropTypes');
9989
+ * var MyArticle = React.createClass({
9990
+ * propTypes: {
9991
+ * // An optional string prop named "description".
9992
+ * description: Props.string,
9993
+ *
9994
+ * // A required enum prop named "category".
9995
+ * category: Props.oneOf(['News','Photos']).isRequired,
9996
+ *
9997
+ * // A prop named "dialog" that requires an instance of Dialog.
9998
+ * dialog: Props.instanceOf(Dialog).isRequired
9999
+ * },
10000
+ * render: function() { ... }
10001
+ * });
10002
+ *
10003
+ * A more formal specification of how these methods are used:
10004
+ *
10005
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
10006
+ * decl := ReactPropTypes.{type}(.isRequired)?
10007
+ *
10008
+ * Each and every declaration produces a function with the same signature. This
10009
+ * allows the creation of custom validation functions. For example:
10010
+ *
10011
+ * var MyLink = React.createClass({
10012
+ * propTypes: {
10013
+ * // An optional string or URI prop named "href".
10014
+ * href: function(props, propName, componentName) {
10015
+ * var propValue = props[propName];
10016
+ * if (propValue != null && typeof propValue !== 'string' &&
10017
+ * !(propValue instanceof URI)) {
10018
+ * return new Error(
10019
+ * 'Expected a string or an URI for ' + propName + ' in ' +
10020
+ * componentName
10021
+ * );
10022
+ * }
10023
+ * }
10024
+ * },
10025
+ * render: function() {...}
10026
+ * });
10027
+ *
10028
+ * @internal
10029
+ */
10030
+
10031
+ var ANONYMOUS = '<<anonymous>>';
10032
+
10033
+ // Important!
10034
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
10035
+ var ReactPropTypes = {
10036
+ array: createPrimitiveTypeChecker('array'),
10037
+ bigint: createPrimitiveTypeChecker('bigint'),
10038
+ bool: createPrimitiveTypeChecker('boolean'),
10039
+ func: createPrimitiveTypeChecker('function'),
10040
+ number: createPrimitiveTypeChecker('number'),
10041
+ object: createPrimitiveTypeChecker('object'),
10042
+ string: createPrimitiveTypeChecker('string'),
10043
+ symbol: createPrimitiveTypeChecker('symbol'),
10044
+
10045
+ any: createAnyTypeChecker(),
10046
+ arrayOf: createArrayOfTypeChecker,
10047
+ element: createElementTypeChecker(),
10048
+ elementType: createElementTypeTypeChecker(),
10049
+ instanceOf: createInstanceTypeChecker,
10050
+ node: createNodeChecker(),
10051
+ objectOf: createObjectOfTypeChecker,
10052
+ oneOf: createEnumTypeChecker,
10053
+ oneOfType: createUnionTypeChecker,
10054
+ shape: createShapeTypeChecker,
10055
+ exact: createStrictShapeTypeChecker,
10056
+ };
10057
+
10058
+ /**
10059
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
10060
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
10061
+ */
10062
+ /*eslint-disable no-self-compare*/
10063
+ function is(x, y) {
10064
+ // SameValue algorithm
10065
+ if (x === y) {
10066
+ // Steps 1-5, 7-10
10067
+ // Steps 6.b-6.e: +0 != -0
10068
+ return x !== 0 || 1 / x === 1 / y;
10069
+ } else {
10070
+ // Step 6.a: NaN == NaN
10071
+ return x !== x && y !== y;
10072
+ }
10073
+ }
10074
+ /*eslint-enable no-self-compare*/
10075
+
10076
+ /**
10077
+ * We use an Error-like object for backward compatibility as people may call
10078
+ * PropTypes directly and inspect their output. However, we don't use real
10079
+ * Errors anymore. We don't inspect their stack anyway, and creating them
10080
+ * is prohibitively expensive if they are created too often, such as what
10081
+ * happens in oneOfType() for any type before the one that matched.
10082
+ */
10083
+ function PropTypeError(message, data) {
10084
+ this.message = message;
10085
+ this.data = data && typeof data === 'object' ? data: {};
10086
+ this.stack = '';
10087
+ }
10088
+ // Make `instanceof Error` still work for returned errors.
10089
+ PropTypeError.prototype = Error.prototype;
10090
+
10091
+ function createChainableTypeChecker(validate) {
10092
+ {
10093
+ var manualPropTypeCallCache = {};
10094
+ var manualPropTypeWarningCount = 0;
10095
+ }
10096
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
10097
+ componentName = componentName || ANONYMOUS;
10098
+ propFullName = propFullName || propName;
10099
+
10100
+ if (secret !== ReactPropTypesSecret) {
10101
+ if (throwOnDirectAccess) {
10102
+ // New behavior only for users of `prop-types` package
10103
+ var err = new Error(
10104
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
10105
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
10106
+ 'Read more at http://fb.me/use-check-prop-types'
10107
+ );
10108
+ err.name = 'Invariant Violation';
10109
+ throw err;
10110
+ } else if ( typeof console !== 'undefined') {
10111
+ // Old behavior for people using React.PropTypes
10112
+ var cacheKey = componentName + ':' + propName;
10113
+ if (
10114
+ !manualPropTypeCallCache[cacheKey] &&
10115
+ // Avoid spamming the console because they are often not actionable except for lib authors
10116
+ manualPropTypeWarningCount < 3
10117
+ ) {
10118
+ printWarning(
10119
+ 'You are manually calling a React.PropTypes validation ' +
10120
+ 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
10121
+ 'and will throw in the standalone `prop-types` package. ' +
10122
+ 'You may be seeing this warning due to a third-party PropTypes ' +
10123
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
10124
+ );
10125
+ manualPropTypeCallCache[cacheKey] = true;
10126
+ manualPropTypeWarningCount++;
10127
+ }
10128
+ }
10129
+ }
10130
+ if (props[propName] == null) {
10131
+ if (isRequired) {
10132
+ if (props[propName] === null) {
10133
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
10134
+ }
10135
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
10136
+ }
10137
+ return null;
10138
+ } else {
10139
+ return validate(props, propName, componentName, location, propFullName);
10140
+ }
10141
+ }
10142
+
10143
+ var chainedCheckType = checkType.bind(null, false);
10144
+ chainedCheckType.isRequired = checkType.bind(null, true);
10145
+
10146
+ return chainedCheckType;
10147
+ }
10148
+
10149
+ function createPrimitiveTypeChecker(expectedType) {
10150
+ function validate(props, propName, componentName, location, propFullName, secret) {
10151
+ var propValue = props[propName];
10152
+ var propType = getPropType(propValue);
10153
+ if (propType !== expectedType) {
10154
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
10155
+ // check, but we can offer a more precise error message here rather than
10156
+ // 'of type `object`'.
10157
+ var preciseType = getPreciseType(propValue);
10158
+
10159
+ return new PropTypeError(
10160
+ 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
10161
+ {expectedType: expectedType}
10162
+ );
10163
+ }
10164
+ return null;
10165
+ }
10166
+ return createChainableTypeChecker(validate);
10167
+ }
10168
+
10169
+ function createAnyTypeChecker() {
10170
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
10171
+ }
10172
+
10173
+ function createArrayOfTypeChecker(typeChecker) {
10174
+ function validate(props, propName, componentName, location, propFullName) {
10175
+ if (typeof typeChecker !== 'function') {
10176
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
10177
+ }
10178
+ var propValue = props[propName];
10179
+ if (!Array.isArray(propValue)) {
10180
+ var propType = getPropType(propValue);
10181
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
10182
+ }
10183
+ for (var i = 0; i < propValue.length; i++) {
10184
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
10185
+ if (error instanceof Error) {
10186
+ return error;
10187
+ }
10188
+ }
10189
+ return null;
10190
+ }
10191
+ return createChainableTypeChecker(validate);
10192
+ }
10193
+
10194
+ function createElementTypeChecker() {
10195
+ function validate(props, propName, componentName, location, propFullName) {
10196
+ var propValue = props[propName];
10197
+ if (!isValidElement(propValue)) {
10198
+ var propType = getPropType(propValue);
10199
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
10200
+ }
10201
+ return null;
10202
+ }
10203
+ return createChainableTypeChecker(validate);
10204
+ }
10205
+
10206
+ function createElementTypeTypeChecker() {
10207
+ function validate(props, propName, componentName, location, propFullName) {
10208
+ var propValue = props[propName];
10209
+ if (!ReactIs.isValidElementType(propValue)) {
10210
+ var propType = getPropType(propValue);
10211
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
10212
+ }
10213
+ return null;
10214
+ }
10215
+ return createChainableTypeChecker(validate);
10216
+ }
10217
+
10218
+ function createInstanceTypeChecker(expectedClass) {
10219
+ function validate(props, propName, componentName, location, propFullName) {
10220
+ if (!(props[propName] instanceof expectedClass)) {
10221
+ var expectedClassName = expectedClass.name || ANONYMOUS;
10222
+ var actualClassName = getClassName(props[propName]);
10223
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
10224
+ }
10225
+ return null;
10226
+ }
10227
+ return createChainableTypeChecker(validate);
10228
+ }
10229
+
10230
+ function createEnumTypeChecker(expectedValues) {
10231
+ if (!Array.isArray(expectedValues)) {
10232
+ {
10233
+ if (arguments.length > 1) {
10234
+ printWarning(
10235
+ 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
10236
+ 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
10237
+ );
10238
+ } else {
10239
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
10240
+ }
10241
+ }
10242
+ return emptyFunctionThatReturnsNull;
10243
+ }
10244
+
10245
+ function validate(props, propName, componentName, location, propFullName) {
10246
+ var propValue = props[propName];
10247
+ for (var i = 0; i < expectedValues.length; i++) {
10248
+ if (is(propValue, expectedValues[i])) {
10249
+ return null;
10250
+ }
10251
+ }
10252
+
10253
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
10254
+ var type = getPreciseType(value);
10255
+ if (type === 'symbol') {
10256
+ return String(value);
10257
+ }
10258
+ return value;
10259
+ });
10260
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
10261
+ }
10262
+ return createChainableTypeChecker(validate);
10263
+ }
10264
+
10265
+ function createObjectOfTypeChecker(typeChecker) {
10266
+ function validate(props, propName, componentName, location, propFullName) {
10267
+ if (typeof typeChecker !== 'function') {
10268
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
10269
+ }
10270
+ var propValue = props[propName];
10271
+ var propType = getPropType(propValue);
10272
+ if (propType !== 'object') {
10273
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
10274
+ }
10275
+ for (var key in propValue) {
10276
+ if (has(propValue, key)) {
10277
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10278
+ if (error instanceof Error) {
10279
+ return error;
10280
+ }
10281
+ }
10282
+ }
10283
+ return null;
10284
+ }
10285
+ return createChainableTypeChecker(validate);
10286
+ }
10287
+
10288
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
10289
+ if (!Array.isArray(arrayOfTypeCheckers)) {
10290
+ printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') ;
10291
+ return emptyFunctionThatReturnsNull;
10292
+ }
10293
+
10294
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
10295
+ var checker = arrayOfTypeCheckers[i];
10296
+ if (typeof checker !== 'function') {
10297
+ printWarning(
10298
+ 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
10299
+ 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
10300
+ );
10301
+ return emptyFunctionThatReturnsNull;
10302
+ }
10303
+ }
10304
+
10305
+ function validate(props, propName, componentName, location, propFullName) {
10306
+ var expectedTypes = [];
10307
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
10308
+ var checker = arrayOfTypeCheckers[i];
10309
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
10310
+ if (checkerResult == null) {
10311
+ return null;
10312
+ }
10313
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
10314
+ expectedTypes.push(checkerResult.data.expectedType);
10315
+ }
10316
+ }
10317
+ var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
10318
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
10319
+ }
10320
+ return createChainableTypeChecker(validate);
10321
+ }
10322
+
10323
+ function createNodeChecker() {
10324
+ function validate(props, propName, componentName, location, propFullName) {
10325
+ if (!isNode(props[propName])) {
10326
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
10327
+ }
10328
+ return null;
10329
+ }
10330
+ return createChainableTypeChecker(validate);
10331
+ }
10332
+
10333
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
10334
+ return new PropTypeError(
10335
+ (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
10336
+ 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
10337
+ );
10338
+ }
10339
+
10340
+ function createShapeTypeChecker(shapeTypes) {
10341
+ function validate(props, propName, componentName, location, propFullName) {
10342
+ var propValue = props[propName];
10343
+ var propType = getPropType(propValue);
10344
+ if (propType !== 'object') {
10345
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
10346
+ }
10347
+ for (var key in shapeTypes) {
10348
+ var checker = shapeTypes[key];
10349
+ if (typeof checker !== 'function') {
10350
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
10351
+ }
10352
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10353
+ if (error) {
10354
+ return error;
10355
+ }
10356
+ }
10357
+ return null;
10358
+ }
10359
+ return createChainableTypeChecker(validate);
10360
+ }
10361
+
10362
+ function createStrictShapeTypeChecker(shapeTypes) {
10363
+ function validate(props, propName, componentName, location, propFullName) {
10364
+ var propValue = props[propName];
10365
+ var propType = getPropType(propValue);
10366
+ if (propType !== 'object') {
10367
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
10368
+ }
10369
+ // We need to check all keys in case some are required but missing from props.
10370
+ var allKeys = assign({}, props[propName], shapeTypes);
10371
+ for (var key in allKeys) {
10372
+ var checker = shapeTypes[key];
10373
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
10374
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
10375
+ }
10376
+ if (!checker) {
10377
+ return new PropTypeError(
10378
+ 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
10379
+ '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
10380
+ '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
10381
+ );
10382
+ }
10383
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10384
+ if (error) {
10385
+ return error;
10386
+ }
10387
+ }
10388
+ return null;
10389
+ }
10390
+
10391
+ return createChainableTypeChecker(validate);
10392
+ }
10393
+
10394
+ function isNode(propValue) {
10395
+ switch (typeof propValue) {
10396
+ case 'number':
10397
+ case 'string':
10398
+ case 'undefined':
10399
+ return true;
10400
+ case 'boolean':
10401
+ return !propValue;
10402
+ case 'object':
10403
+ if (Array.isArray(propValue)) {
10404
+ return propValue.every(isNode);
10405
+ }
10406
+ if (propValue === null || isValidElement(propValue)) {
10407
+ return true;
10408
+ }
10409
+
10410
+ var iteratorFn = getIteratorFn(propValue);
10411
+ if (iteratorFn) {
10412
+ var iterator = iteratorFn.call(propValue);
10413
+ var step;
10414
+ if (iteratorFn !== propValue.entries) {
10415
+ while (!(step = iterator.next()).done) {
10416
+ if (!isNode(step.value)) {
10417
+ return false;
10418
+ }
10419
+ }
10420
+ } else {
10421
+ // Iterator will provide entry [k,v] tuples rather than values.
10422
+ while (!(step = iterator.next()).done) {
10423
+ var entry = step.value;
10424
+ if (entry) {
10425
+ if (!isNode(entry[1])) {
10426
+ return false;
10427
+ }
10428
+ }
10429
+ }
10430
+ }
10431
+ } else {
10432
+ return false;
10433
+ }
10434
+
10435
+ return true;
10436
+ default:
10437
+ return false;
10438
+ }
10439
+ }
10440
+
10441
+ function isSymbol(propType, propValue) {
10442
+ // Native Symbol.
10443
+ if (propType === 'symbol') {
10444
+ return true;
10445
+ }
10446
+
10447
+ // falsy value can't be a Symbol
10448
+ if (!propValue) {
10449
+ return false;
10450
+ }
10451
+
10452
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
10453
+ if (propValue['@@toStringTag'] === 'Symbol') {
10454
+ return true;
10455
+ }
10456
+
10457
+ // Fallback for non-spec compliant Symbols which are polyfilled.
10458
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
10459
+ return true;
10460
+ }
10461
+
10462
+ return false;
10463
+ }
10464
+
10465
+ // Equivalent of `typeof` but with special handling for array and regexp.
10466
+ function getPropType(propValue) {
10467
+ var propType = typeof propValue;
10468
+ if (Array.isArray(propValue)) {
10469
+ return 'array';
10470
+ }
10471
+ if (propValue instanceof RegExp) {
10472
+ // Old webkits (at least until Android 4.0) return 'function' rather than
10473
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
10474
+ // passes PropTypes.object.
10475
+ return 'object';
10476
+ }
10477
+ if (isSymbol(propType, propValue)) {
10478
+ return 'symbol';
10479
+ }
10480
+ return propType;
10481
+ }
10482
+
10483
+ // This handles more types than `getPropType`. Only used for error messages.
10484
+ // See `createPrimitiveTypeChecker`.
10485
+ function getPreciseType(propValue) {
10486
+ if (typeof propValue === 'undefined' || propValue === null) {
10487
+ return '' + propValue;
10488
+ }
10489
+ var propType = getPropType(propValue);
10490
+ if (propType === 'object') {
10491
+ if (propValue instanceof Date) {
10492
+ return 'date';
10493
+ } else if (propValue instanceof RegExp) {
10494
+ return 'regexp';
10495
+ }
10496
+ }
10497
+ return propType;
10498
+ }
10499
+
10500
+ // Returns a string that is postfixed to a warning about an invalid type.
10501
+ // For example, "undefined" or "of type array"
10502
+ function getPostfixForTypeWarning(value) {
10503
+ var type = getPreciseType(value);
10504
+ switch (type) {
10505
+ case 'array':
10506
+ case 'object':
10507
+ return 'an ' + type;
10508
+ case 'boolean':
10509
+ case 'date':
10510
+ case 'regexp':
10511
+ return 'a ' + type;
10512
+ default:
10513
+ return type;
10514
+ }
10515
+ }
10516
+
10517
+ // Returns class name of the object, if any.
10518
+ function getClassName(propValue) {
10519
+ if (!propValue.constructor || !propValue.constructor.name) {
10520
+ return ANONYMOUS;
10521
+ }
10522
+ return propValue.constructor.name;
10523
+ }
10524
+
10525
+ ReactPropTypes.checkPropTypes = checkPropTypes;
10526
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
10527
+ ReactPropTypes.PropTypes = ReactPropTypes;
10528
+
10529
+ return ReactPropTypes;
10530
+ };
10531
+
10532
+
10533
+ /***/ }),
10534
+
10535
+ /***/ "./node_modules/prop-types/index.js":
10536
+ /*!******************************************!*\
10537
+ !*** ./node_modules/prop-types/index.js ***!
10538
+ \******************************************/
10539
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10540
+
10541
+ /**
10542
+ * Copyright (c) 2013-present, Facebook, Inc.
10543
+ *
10544
+ * This source code is licensed under the MIT license found in the
10545
+ * LICENSE file in the root directory of this source tree.
10546
+ */
10547
+
10548
+ {
10549
+ var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10550
+
10551
+ // By explicitly using `prop-types` you are opting into new development behavior.
10552
+ // http://fb.me/prop-types-in-prod
10553
+ var throwOnDirectAccess = true;
10554
+ module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
10555
+ }
9945
10556
 
9946
- module.exports = function(isValidElement, throwOnDirectAccess) {
9947
- /* global Symbol */
9948
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
9949
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
9950
-
9951
- /**
9952
- * Returns the iterator method function contained on the iterable object.
9953
- *
9954
- * Be sure to invoke the function with the iterable as context:
9955
- *
9956
- * var iteratorFn = getIteratorFn(myIterable);
9957
- * if (iteratorFn) {
9958
- * var iterator = iteratorFn.call(myIterable);
9959
- * ...
9960
- * }
9961
- *
9962
- * @param {?object} maybeIterable
9963
- * @return {?function}
9964
- */
9965
- function getIteratorFn(maybeIterable) {
9966
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
9967
- if (typeof iteratorFn === 'function') {
9968
- return iteratorFn;
9969
- }
9970
- }
9971
-
9972
- /**
9973
- * Collection of methods that allow declaration and validation of props that are
9974
- * supplied to React components. Example usage:
9975
- *
9976
- * var Props = require('ReactPropTypes');
9977
- * var MyArticle = React.createClass({
9978
- * propTypes: {
9979
- * // An optional string prop named "description".
9980
- * description: Props.string,
9981
- *
9982
- * // A required enum prop named "category".
9983
- * category: Props.oneOf(['News','Photos']).isRequired,
9984
- *
9985
- * // A prop named "dialog" that requires an instance of Dialog.
9986
- * dialog: Props.instanceOf(Dialog).isRequired
9987
- * },
9988
- * render: function() { ... }
9989
- * });
9990
- *
9991
- * A more formal specification of how these methods are used:
9992
- *
9993
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
9994
- * decl := ReactPropTypes.{type}(.isRequired)?
9995
- *
9996
- * Each and every declaration produces a function with the same signature. This
9997
- * allows the creation of custom validation functions. For example:
9998
- *
9999
- * var MyLink = React.createClass({
10000
- * propTypes: {
10001
- * // An optional string or URI prop named "href".
10002
- * href: function(props, propName, componentName) {
10003
- * var propValue = props[propName];
10004
- * if (propValue != null && typeof propValue !== 'string' &&
10005
- * !(propValue instanceof URI)) {
10006
- * return new Error(
10007
- * 'Expected a string or an URI for ' + propName + ' in ' +
10008
- * componentName
10009
- * );
10010
- * }
10011
- * }
10012
- * },
10013
- * render: function() {...}
10014
- * });
10015
- *
10016
- * @internal
10017
- */
10018
-
10019
- var ANONYMOUS = '<<anonymous>>';
10020
-
10021
- // Important!
10022
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
10023
- var ReactPropTypes = {
10024
- array: createPrimitiveTypeChecker('array'),
10025
- bigint: createPrimitiveTypeChecker('bigint'),
10026
- bool: createPrimitiveTypeChecker('boolean'),
10027
- func: createPrimitiveTypeChecker('function'),
10028
- number: createPrimitiveTypeChecker('number'),
10029
- object: createPrimitiveTypeChecker('object'),
10030
- string: createPrimitiveTypeChecker('string'),
10031
- symbol: createPrimitiveTypeChecker('symbol'),
10032
-
10033
- any: createAnyTypeChecker(),
10034
- arrayOf: createArrayOfTypeChecker,
10035
- element: createElementTypeChecker(),
10036
- elementType: createElementTypeTypeChecker(),
10037
- instanceOf: createInstanceTypeChecker,
10038
- node: createNodeChecker(),
10039
- objectOf: createObjectOfTypeChecker,
10040
- oneOf: createEnumTypeChecker,
10041
- oneOfType: createUnionTypeChecker,
10042
- shape: createShapeTypeChecker,
10043
- exact: createStrictShapeTypeChecker,
10044
- };
10045
-
10046
- /**
10047
- * inlined Object.is polyfill to avoid requiring consumers ship their own
10048
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
10049
- */
10050
- /*eslint-disable no-self-compare*/
10051
- function is(x, y) {
10052
- // SameValue algorithm
10053
- if (x === y) {
10054
- // Steps 1-5, 7-10
10055
- // Steps 6.b-6.e: +0 != -0
10056
- return x !== 0 || 1 / x === 1 / y;
10057
- } else {
10058
- // Step 6.a: NaN == NaN
10059
- return x !== x && y !== y;
10060
- }
10061
- }
10062
- /*eslint-enable no-self-compare*/
10063
-
10064
- /**
10065
- * We use an Error-like object for backward compatibility as people may call
10066
- * PropTypes directly and inspect their output. However, we don't use real
10067
- * Errors anymore. We don't inspect their stack anyway, and creating them
10068
- * is prohibitively expensive if they are created too often, such as what
10069
- * happens in oneOfType() for any type before the one that matched.
10070
- */
10071
- function PropTypeError(message, data) {
10072
- this.message = message;
10073
- this.data = data && typeof data === 'object' ? data: {};
10074
- this.stack = '';
10075
- }
10076
- // Make `instanceof Error` still work for returned errors.
10077
- PropTypeError.prototype = Error.prototype;
10078
-
10079
- function createChainableTypeChecker(validate) {
10080
- {
10081
- var manualPropTypeCallCache = {};
10082
- var manualPropTypeWarningCount = 0;
10083
- }
10084
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
10085
- componentName = componentName || ANONYMOUS;
10086
- propFullName = propFullName || propName;
10087
-
10088
- if (secret !== ReactPropTypesSecret) {
10089
- if (throwOnDirectAccess) {
10090
- // New behavior only for users of `prop-types` package
10091
- var err = new Error(
10092
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
10093
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
10094
- 'Read more at http://fb.me/use-check-prop-types'
10095
- );
10096
- err.name = 'Invariant Violation';
10097
- throw err;
10098
- } else if ( typeof console !== 'undefined') {
10099
- // Old behavior for people using React.PropTypes
10100
- var cacheKey = componentName + ':' + propName;
10101
- if (
10102
- !manualPropTypeCallCache[cacheKey] &&
10103
- // Avoid spamming the console because they are often not actionable except for lib authors
10104
- manualPropTypeWarningCount < 3
10105
- ) {
10106
- printWarning(
10107
- 'You are manually calling a React.PropTypes validation ' +
10108
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
10109
- 'and will throw in the standalone `prop-types` package. ' +
10110
- 'You may be seeing this warning due to a third-party PropTypes ' +
10111
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
10112
- );
10113
- manualPropTypeCallCache[cacheKey] = true;
10114
- manualPropTypeWarningCount++;
10115
- }
10116
- }
10117
- }
10118
- if (props[propName] == null) {
10119
- if (isRequired) {
10120
- if (props[propName] === null) {
10121
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
10122
- }
10123
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
10124
- }
10125
- return null;
10126
- } else {
10127
- return validate(props, propName, componentName, location, propFullName);
10128
- }
10129
- }
10130
-
10131
- var chainedCheckType = checkType.bind(null, false);
10132
- chainedCheckType.isRequired = checkType.bind(null, true);
10133
-
10134
- return chainedCheckType;
10135
- }
10136
-
10137
- function createPrimitiveTypeChecker(expectedType) {
10138
- function validate(props, propName, componentName, location, propFullName, secret) {
10139
- var propValue = props[propName];
10140
- var propType = getPropType(propValue);
10141
- if (propType !== expectedType) {
10142
- // `propValue` being instance of, say, date/regexp, pass the 'object'
10143
- // check, but we can offer a more precise error message here rather than
10144
- // 'of type `object`'.
10145
- var preciseType = getPreciseType(propValue);
10146
-
10147
- return new PropTypeError(
10148
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
10149
- {expectedType: expectedType}
10150
- );
10151
- }
10152
- return null;
10153
- }
10154
- return createChainableTypeChecker(validate);
10155
- }
10156
-
10157
- function createAnyTypeChecker() {
10158
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
10159
- }
10160
-
10161
- function createArrayOfTypeChecker(typeChecker) {
10162
- function validate(props, propName, componentName, location, propFullName) {
10163
- if (typeof typeChecker !== 'function') {
10164
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
10165
- }
10166
- var propValue = props[propName];
10167
- if (!Array.isArray(propValue)) {
10168
- var propType = getPropType(propValue);
10169
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
10170
- }
10171
- for (var i = 0; i < propValue.length; i++) {
10172
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
10173
- if (error instanceof Error) {
10174
- return error;
10175
- }
10176
- }
10177
- return null;
10178
- }
10179
- return createChainableTypeChecker(validate);
10180
- }
10181
-
10182
- function createElementTypeChecker() {
10183
- function validate(props, propName, componentName, location, propFullName) {
10184
- var propValue = props[propName];
10185
- if (!isValidElement(propValue)) {
10186
- var propType = getPropType(propValue);
10187
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
10188
- }
10189
- return null;
10190
- }
10191
- return createChainableTypeChecker(validate);
10192
- }
10193
-
10194
- function createElementTypeTypeChecker() {
10195
- function validate(props, propName, componentName, location, propFullName) {
10196
- var propValue = props[propName];
10197
- if (!ReactIs.isValidElementType(propValue)) {
10198
- var propType = getPropType(propValue);
10199
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
10200
- }
10201
- return null;
10202
- }
10203
- return createChainableTypeChecker(validate);
10204
- }
10205
-
10206
- function createInstanceTypeChecker(expectedClass) {
10207
- function validate(props, propName, componentName, location, propFullName) {
10208
- if (!(props[propName] instanceof expectedClass)) {
10209
- var expectedClassName = expectedClass.name || ANONYMOUS;
10210
- var actualClassName = getClassName(props[propName]);
10211
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
10212
- }
10213
- return null;
10214
- }
10215
- return createChainableTypeChecker(validate);
10216
- }
10217
-
10218
- function createEnumTypeChecker(expectedValues) {
10219
- if (!Array.isArray(expectedValues)) {
10220
- {
10221
- if (arguments.length > 1) {
10222
- printWarning(
10223
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
10224
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
10225
- );
10226
- } else {
10227
- printWarning('Invalid argument supplied to oneOf, expected an array.');
10228
- }
10229
- }
10230
- return emptyFunctionThatReturnsNull;
10231
- }
10232
-
10233
- function validate(props, propName, componentName, location, propFullName) {
10234
- var propValue = props[propName];
10235
- for (var i = 0; i < expectedValues.length; i++) {
10236
- if (is(propValue, expectedValues[i])) {
10237
- return null;
10238
- }
10239
- }
10240
-
10241
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
10242
- var type = getPreciseType(value);
10243
- if (type === 'symbol') {
10244
- return String(value);
10245
- }
10246
- return value;
10247
- });
10248
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
10249
- }
10250
- return createChainableTypeChecker(validate);
10251
- }
10252
-
10253
- function createObjectOfTypeChecker(typeChecker) {
10254
- function validate(props, propName, componentName, location, propFullName) {
10255
- if (typeof typeChecker !== 'function') {
10256
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
10257
- }
10258
- var propValue = props[propName];
10259
- var propType = getPropType(propValue);
10260
- if (propType !== 'object') {
10261
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
10262
- }
10263
- for (var key in propValue) {
10264
- if (has(propValue, key)) {
10265
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10266
- if (error instanceof Error) {
10267
- return error;
10268
- }
10269
- }
10270
- }
10271
- return null;
10272
- }
10273
- return createChainableTypeChecker(validate);
10274
- }
10275
-
10276
- function createUnionTypeChecker(arrayOfTypeCheckers) {
10277
- if (!Array.isArray(arrayOfTypeCheckers)) {
10278
- printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') ;
10279
- return emptyFunctionThatReturnsNull;
10280
- }
10281
-
10282
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
10283
- var checker = arrayOfTypeCheckers[i];
10284
- if (typeof checker !== 'function') {
10285
- printWarning(
10286
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
10287
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
10288
- );
10289
- return emptyFunctionThatReturnsNull;
10290
- }
10291
- }
10292
-
10293
- function validate(props, propName, componentName, location, propFullName) {
10294
- var expectedTypes = [];
10295
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
10296
- var checker = arrayOfTypeCheckers[i];
10297
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
10298
- if (checkerResult == null) {
10299
- return null;
10300
- }
10301
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
10302
- expectedTypes.push(checkerResult.data.expectedType);
10303
- }
10304
- }
10305
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
10306
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
10307
- }
10308
- return createChainableTypeChecker(validate);
10309
- }
10310
-
10311
- function createNodeChecker() {
10312
- function validate(props, propName, componentName, location, propFullName) {
10313
- if (!isNode(props[propName])) {
10314
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
10315
- }
10316
- return null;
10317
- }
10318
- return createChainableTypeChecker(validate);
10319
- }
10320
-
10321
- function invalidValidatorError(componentName, location, propFullName, key, type) {
10322
- return new PropTypeError(
10323
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
10324
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
10325
- );
10326
- }
10327
-
10328
- function createShapeTypeChecker(shapeTypes) {
10329
- function validate(props, propName, componentName, location, propFullName) {
10330
- var propValue = props[propName];
10331
- var propType = getPropType(propValue);
10332
- if (propType !== 'object') {
10333
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
10334
- }
10335
- for (var key in shapeTypes) {
10336
- var checker = shapeTypes[key];
10337
- if (typeof checker !== 'function') {
10338
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
10339
- }
10340
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10341
- if (error) {
10342
- return error;
10343
- }
10344
- }
10345
- return null;
10346
- }
10347
- return createChainableTypeChecker(validate);
10348
- }
10349
-
10350
- function createStrictShapeTypeChecker(shapeTypes) {
10351
- function validate(props, propName, componentName, location, propFullName) {
10352
- var propValue = props[propName];
10353
- var propType = getPropType(propValue);
10354
- if (propType !== 'object') {
10355
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
10356
- }
10357
- // We need to check all keys in case some are required but missing from props.
10358
- var allKeys = assign({}, props[propName], shapeTypes);
10359
- for (var key in allKeys) {
10360
- var checker = shapeTypes[key];
10361
- if (has(shapeTypes, key) && typeof checker !== 'function') {
10362
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
10363
- }
10364
- if (!checker) {
10365
- return new PropTypeError(
10366
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
10367
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
10368
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
10369
- );
10370
- }
10371
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
10372
- if (error) {
10373
- return error;
10374
- }
10375
- }
10376
- return null;
10377
- }
10378
-
10379
- return createChainableTypeChecker(validate);
10380
- }
10381
-
10382
- function isNode(propValue) {
10383
- switch (typeof propValue) {
10384
- case 'number':
10385
- case 'string':
10386
- case 'undefined':
10387
- return true;
10388
- case 'boolean':
10389
- return !propValue;
10390
- case 'object':
10391
- if (Array.isArray(propValue)) {
10392
- return propValue.every(isNode);
10393
- }
10394
- if (propValue === null || isValidElement(propValue)) {
10395
- return true;
10396
- }
10397
-
10398
- var iteratorFn = getIteratorFn(propValue);
10399
- if (iteratorFn) {
10400
- var iterator = iteratorFn.call(propValue);
10401
- var step;
10402
- if (iteratorFn !== propValue.entries) {
10403
- while (!(step = iterator.next()).done) {
10404
- if (!isNode(step.value)) {
10405
- return false;
10406
- }
10407
- }
10408
- } else {
10409
- // Iterator will provide entry [k,v] tuples rather than values.
10410
- while (!(step = iterator.next()).done) {
10411
- var entry = step.value;
10412
- if (entry) {
10413
- if (!isNode(entry[1])) {
10414
- return false;
10415
- }
10416
- }
10417
- }
10418
- }
10419
- } else {
10420
- return false;
10421
- }
10422
-
10423
- return true;
10424
- default:
10425
- return false;
10426
- }
10427
- }
10428
-
10429
- function isSymbol(propType, propValue) {
10430
- // Native Symbol.
10431
- if (propType === 'symbol') {
10432
- return true;
10433
- }
10434
-
10435
- // falsy value can't be a Symbol
10436
- if (!propValue) {
10437
- return false;
10438
- }
10439
-
10440
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
10441
- if (propValue['@@toStringTag'] === 'Symbol') {
10442
- return true;
10443
- }
10444
-
10445
- // Fallback for non-spec compliant Symbols which are polyfilled.
10446
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
10447
- return true;
10448
- }
10449
-
10450
- return false;
10451
- }
10452
-
10453
- // Equivalent of `typeof` but with special handling for array and regexp.
10454
- function getPropType(propValue) {
10455
- var propType = typeof propValue;
10456
- if (Array.isArray(propValue)) {
10457
- return 'array';
10458
- }
10459
- if (propValue instanceof RegExp) {
10460
- // Old webkits (at least until Android 4.0) return 'function' rather than
10461
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
10462
- // passes PropTypes.object.
10463
- return 'object';
10464
- }
10465
- if (isSymbol(propType, propValue)) {
10466
- return 'symbol';
10467
- }
10468
- return propType;
10469
- }
10470
-
10471
- // This handles more types than `getPropType`. Only used for error messages.
10472
- // See `createPrimitiveTypeChecker`.
10473
- function getPreciseType(propValue) {
10474
- if (typeof propValue === 'undefined' || propValue === null) {
10475
- return '' + propValue;
10476
- }
10477
- var propType = getPropType(propValue);
10478
- if (propType === 'object') {
10479
- if (propValue instanceof Date) {
10480
- return 'date';
10481
- } else if (propValue instanceof RegExp) {
10482
- return 'regexp';
10483
- }
10484
- }
10485
- return propType;
10486
- }
10487
-
10488
- // Returns a string that is postfixed to a warning about an invalid type.
10489
- // For example, "undefined" or "of type array"
10490
- function getPostfixForTypeWarning(value) {
10491
- var type = getPreciseType(value);
10492
- switch (type) {
10493
- case 'array':
10494
- case 'object':
10495
- return 'an ' + type;
10496
- case 'boolean':
10497
- case 'date':
10498
- case 'regexp':
10499
- return 'a ' + type;
10500
- default:
10501
- return type;
10502
- }
10503
- }
10504
-
10505
- // Returns class name of the object, if any.
10506
- function getClassName(propValue) {
10507
- if (!propValue.constructor || !propValue.constructor.name) {
10508
- return ANONYMOUS;
10509
- }
10510
- return propValue.constructor.name;
10511
- }
10512
-
10513
- ReactPropTypes.checkPropTypes = checkPropTypes;
10514
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
10515
- ReactPropTypes.PropTypes = ReactPropTypes;
10516
-
10517
- return ReactPropTypes;
10518
- };
10519
-
10520
-
10521
- /***/ }),
10522
-
10523
- /***/ "./node_modules/prop-types/index.js":
10524
- /*!******************************************!*\
10525
- !*** ./node_modules/prop-types/index.js ***!
10526
- \******************************************/
10527
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10528
-
10529
- /**
10530
- * Copyright (c) 2013-present, Facebook, Inc.
10531
- *
10532
- * This source code is licensed under the MIT license found in the
10533
- * LICENSE file in the root directory of this source tree.
10534
- */
10535
-
10536
- {
10537
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
10538
-
10539
- // By explicitly using `prop-types` you are opting into new development behavior.
10540
- // http://fb.me/prop-types-in-prod
10541
- var throwOnDirectAccess = true;
10542
- module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
10543
- }
10544
10557
 
10558
+ /***/ }),
10545
10559
 
10546
- /***/ }),
10560
+ /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
10561
+ /*!*************************************************************!*\
10562
+ !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
10563
+ \*************************************************************/
10564
+ /***/ ((module) => {
10565
+ /**
10566
+ * Copyright (c) 2013-present, Facebook, Inc.
10567
+ *
10568
+ * This source code is licensed under the MIT license found in the
10569
+ * LICENSE file in the root directory of this source tree.
10570
+ */
10547
10571
 
10548
- /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
10549
- /*!*************************************************************!*\
10550
- !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
10551
- \*************************************************************/
10552
- /***/ ((module) => {
10553
- /**
10554
- * Copyright (c) 2013-present, Facebook, Inc.
10555
- *
10556
- * This source code is licensed under the MIT license found in the
10557
- * LICENSE file in the root directory of this source tree.
10558
- */
10559
10572
 
10560
10573
 
10574
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
10561
10575
 
10562
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
10576
+ module.exports = ReactPropTypesSecret;
10563
10577
 
10564
- module.exports = ReactPropTypesSecret;
10565
10578
 
10579
+ /***/ }),
10566
10580
 
10567
- /***/ }),
10581
+ /***/ "./node_modules/prop-types/lib/has.js":
10582
+ /*!********************************************!*\
10583
+ !*** ./node_modules/prop-types/lib/has.js ***!
10584
+ \********************************************/
10585
+ /***/ ((module) => {
10568
10586
 
10569
- /***/ "./node_modules/prop-types/lib/has.js":
10570
- /*!********************************************!*\
10571
- !*** ./node_modules/prop-types/lib/has.js ***!
10572
- \********************************************/
10573
- /***/ ((module) => {
10587
+ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
10574
10588
 
10575
- module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
10576
10589
 
10590
+ /***/ }),
10577
10591
 
10578
- /***/ }),
10592
+ /***/ "./node_modules/react-is/cjs/react-is.development.js":
10593
+ /*!***********************************************************!*\
10594
+ !*** ./node_modules/react-is/cjs/react-is.development.js ***!
10595
+ \***********************************************************/
10596
+ /***/ ((__unused_webpack_module, exports) => {
10597
+ /** @license React v16.13.1
10598
+ * react-is.development.js
10599
+ *
10600
+ * Copyright (c) Facebook, Inc. and its affiliates.
10601
+ *
10602
+ * This source code is licensed under the MIT license found in the
10603
+ * LICENSE file in the root directory of this source tree.
10604
+ */
10579
10605
 
10580
- /***/ "./node_modules/react-is/cjs/react-is.development.js":
10581
- /*!***********************************************************!*\
10582
- !*** ./node_modules/react-is/cjs/react-is.development.js ***!
10583
- \***********************************************************/
10584
- /***/ ((__unused_webpack_module, exports) => {
10585
- /** @license React v16.13.1
10586
- * react-is.development.js
10587
- *
10588
- * Copyright (c) Facebook, Inc. and its affiliates.
10589
- *
10590
- * This source code is licensed under the MIT license found in the
10591
- * LICENSE file in the root directory of this source tree.
10592
- */
10593
10606
 
10594
10607
 
10595
10608
 
10596
10609
 
10610
+ {
10611
+ (function() {
10597
10612
 
10598
- {
10599
- (function() {
10613
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
10614
+ // nor polyfill, then a plain number is used for performance.
10615
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
10616
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
10617
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
10618
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
10619
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
10620
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
10621
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
10622
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
10623
+ // (unstable) APIs that have been removed. Can we remove the symbols?
10600
10624
 
10601
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
10602
- // nor polyfill, then a plain number is used for performance.
10603
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
10604
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
10605
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
10606
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
10607
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
10608
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
10609
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
10610
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
10611
- // (unstable) APIs that have been removed. Can we remove the symbols?
10625
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
10626
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
10627
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
10628
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
10629
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
10630
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
10631
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
10632
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
10633
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
10634
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
10635
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
10612
10636
 
10613
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
10614
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
10615
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
10616
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
10617
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
10618
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
10619
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
10620
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
10621
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
10622
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
10623
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
10637
+ function isValidElementType(type) {
10638
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
10639
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
10640
+ }
10624
10641
 
10625
- function isValidElementType(type) {
10626
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
10627
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
10628
- }
10642
+ function typeOf(object) {
10643
+ if (typeof object === 'object' && object !== null) {
10644
+ var $$typeof = object.$$typeof;
10645
+
10646
+ switch ($$typeof) {
10647
+ case REACT_ELEMENT_TYPE:
10648
+ var type = object.type;
10649
+
10650
+ switch (type) {
10651
+ case REACT_ASYNC_MODE_TYPE:
10652
+ case REACT_CONCURRENT_MODE_TYPE:
10653
+ case REACT_FRAGMENT_TYPE:
10654
+ case REACT_PROFILER_TYPE:
10655
+ case REACT_STRICT_MODE_TYPE:
10656
+ case REACT_SUSPENSE_TYPE:
10657
+ return type;
10658
+
10659
+ default:
10660
+ var $$typeofType = type && type.$$typeof;
10661
+
10662
+ switch ($$typeofType) {
10663
+ case REACT_CONTEXT_TYPE:
10664
+ case REACT_FORWARD_REF_TYPE:
10665
+ case REACT_LAZY_TYPE:
10666
+ case REACT_MEMO_TYPE:
10667
+ case REACT_PROVIDER_TYPE:
10668
+ return $$typeofType;
10669
+
10670
+ default:
10671
+ return $$typeof;
10672
+ }
10673
+
10674
+ }
10675
+
10676
+ case REACT_PORTAL_TYPE:
10677
+ return $$typeof;
10678
+ }
10679
+ }
10680
+
10681
+ return undefined;
10682
+ } // AsyncMode is deprecated along with isAsyncMode
10683
+
10684
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
10685
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
10686
+ var ContextConsumer = REACT_CONTEXT_TYPE;
10687
+ var ContextProvider = REACT_PROVIDER_TYPE;
10688
+ var Element = REACT_ELEMENT_TYPE;
10689
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
10690
+ var Fragment = REACT_FRAGMENT_TYPE;
10691
+ var Lazy = REACT_LAZY_TYPE;
10692
+ var Memo = REACT_MEMO_TYPE;
10693
+ var Portal = REACT_PORTAL_TYPE;
10694
+ var Profiler = REACT_PROFILER_TYPE;
10695
+ var StrictMode = REACT_STRICT_MODE_TYPE;
10696
+ var Suspense = REACT_SUSPENSE_TYPE;
10697
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
10698
+
10699
+ function isAsyncMode(object) {
10700
+ {
10701
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
10702
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
10703
+
10704
+ console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
10705
+ }
10706
+ }
10707
+
10708
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
10709
+ }
10710
+ function isConcurrentMode(object) {
10711
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
10712
+ }
10713
+ function isContextConsumer(object) {
10714
+ return typeOf(object) === REACT_CONTEXT_TYPE;
10715
+ }
10716
+ function isContextProvider(object) {
10717
+ return typeOf(object) === REACT_PROVIDER_TYPE;
10718
+ }
10719
+ function isElement(object) {
10720
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
10721
+ }
10722
+ function isForwardRef(object) {
10723
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
10724
+ }
10725
+ function isFragment(object) {
10726
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
10727
+ }
10728
+ function isLazy(object) {
10729
+ return typeOf(object) === REACT_LAZY_TYPE;
10730
+ }
10731
+ function isMemo(object) {
10732
+ return typeOf(object) === REACT_MEMO_TYPE;
10733
+ }
10734
+ function isPortal(object) {
10735
+ return typeOf(object) === REACT_PORTAL_TYPE;
10736
+ }
10737
+ function isProfiler(object) {
10738
+ return typeOf(object) === REACT_PROFILER_TYPE;
10739
+ }
10740
+ function isStrictMode(object) {
10741
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
10742
+ }
10743
+ function isSuspense(object) {
10744
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
10745
+ }
10629
10746
 
10630
- function typeOf(object) {
10631
- if (typeof object === 'object' && object !== null) {
10632
- var $$typeof = object.$$typeof;
10633
-
10634
- switch ($$typeof) {
10635
- case REACT_ELEMENT_TYPE:
10636
- var type = object.type;
10637
-
10638
- switch (type) {
10639
- case REACT_ASYNC_MODE_TYPE:
10640
- case REACT_CONCURRENT_MODE_TYPE:
10641
- case REACT_FRAGMENT_TYPE:
10642
- case REACT_PROFILER_TYPE:
10643
- case REACT_STRICT_MODE_TYPE:
10644
- case REACT_SUSPENSE_TYPE:
10645
- return type;
10646
-
10647
- default:
10648
- var $$typeofType = type && type.$$typeof;
10649
-
10650
- switch ($$typeofType) {
10651
- case REACT_CONTEXT_TYPE:
10652
- case REACT_FORWARD_REF_TYPE:
10653
- case REACT_LAZY_TYPE:
10654
- case REACT_MEMO_TYPE:
10655
- case REACT_PROVIDER_TYPE:
10656
- return $$typeofType;
10657
-
10658
- default:
10659
- return $$typeof;
10660
- }
10661
-
10662
- }
10663
-
10664
- case REACT_PORTAL_TYPE:
10665
- return $$typeof;
10666
- }
10667
- }
10668
-
10669
- return undefined;
10670
- } // AsyncMode is deprecated along with isAsyncMode
10671
-
10672
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
10673
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
10674
- var ContextConsumer = REACT_CONTEXT_TYPE;
10675
- var ContextProvider = REACT_PROVIDER_TYPE;
10676
- var Element = REACT_ELEMENT_TYPE;
10677
- var ForwardRef = REACT_FORWARD_REF_TYPE;
10678
- var Fragment = REACT_FRAGMENT_TYPE;
10679
- var Lazy = REACT_LAZY_TYPE;
10680
- var Memo = REACT_MEMO_TYPE;
10681
- var Portal = REACT_PORTAL_TYPE;
10682
- var Profiler = REACT_PROFILER_TYPE;
10683
- var StrictMode = REACT_STRICT_MODE_TYPE;
10684
- var Suspense = REACT_SUSPENSE_TYPE;
10685
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
10686
-
10687
- function isAsyncMode(object) {
10688
- {
10689
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
10690
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
10691
-
10692
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
10693
- }
10694
- }
10695
-
10696
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
10697
- }
10698
- function isConcurrentMode(object) {
10699
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
10700
- }
10701
- function isContextConsumer(object) {
10702
- return typeOf(object) === REACT_CONTEXT_TYPE;
10703
- }
10704
- function isContextProvider(object) {
10705
- return typeOf(object) === REACT_PROVIDER_TYPE;
10706
- }
10707
- function isElement(object) {
10708
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
10709
- }
10710
- function isForwardRef(object) {
10711
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
10712
- }
10713
- function isFragment(object) {
10714
- return typeOf(object) === REACT_FRAGMENT_TYPE;
10715
- }
10716
- function isLazy(object) {
10717
- return typeOf(object) === REACT_LAZY_TYPE;
10718
- }
10719
- function isMemo(object) {
10720
- return typeOf(object) === REACT_MEMO_TYPE;
10721
- }
10722
- function isPortal(object) {
10723
- return typeOf(object) === REACT_PORTAL_TYPE;
10724
- }
10725
- function isProfiler(object) {
10726
- return typeOf(object) === REACT_PROFILER_TYPE;
10727
- }
10728
- function isStrictMode(object) {
10729
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
10730
- }
10731
- function isSuspense(object) {
10732
- return typeOf(object) === REACT_SUSPENSE_TYPE;
10733
- }
10747
+ exports.AsyncMode = AsyncMode;
10748
+ exports.ConcurrentMode = ConcurrentMode;
10749
+ exports.ContextConsumer = ContextConsumer;
10750
+ exports.ContextProvider = ContextProvider;
10751
+ exports.Element = Element;
10752
+ exports.ForwardRef = ForwardRef;
10753
+ exports.Fragment = Fragment;
10754
+ exports.Lazy = Lazy;
10755
+ exports.Memo = Memo;
10756
+ exports.Portal = Portal;
10757
+ exports.Profiler = Profiler;
10758
+ exports.StrictMode = StrictMode;
10759
+ exports.Suspense = Suspense;
10760
+ exports.isAsyncMode = isAsyncMode;
10761
+ exports.isConcurrentMode = isConcurrentMode;
10762
+ exports.isContextConsumer = isContextConsumer;
10763
+ exports.isContextProvider = isContextProvider;
10764
+ exports.isElement = isElement;
10765
+ exports.isForwardRef = isForwardRef;
10766
+ exports.isFragment = isFragment;
10767
+ exports.isLazy = isLazy;
10768
+ exports.isMemo = isMemo;
10769
+ exports.isPortal = isPortal;
10770
+ exports.isProfiler = isProfiler;
10771
+ exports.isStrictMode = isStrictMode;
10772
+ exports.isSuspense = isSuspense;
10773
+ exports.isValidElementType = isValidElementType;
10774
+ exports.typeOf = typeOf;
10775
+ })();
10776
+ }
10734
10777
 
10735
- exports.AsyncMode = AsyncMode;
10736
- exports.ConcurrentMode = ConcurrentMode;
10737
- exports.ContextConsumer = ContextConsumer;
10738
- exports.ContextProvider = ContextProvider;
10739
- exports.Element = Element;
10740
- exports.ForwardRef = ForwardRef;
10741
- exports.Fragment = Fragment;
10742
- exports.Lazy = Lazy;
10743
- exports.Memo = Memo;
10744
- exports.Portal = Portal;
10745
- exports.Profiler = Profiler;
10746
- exports.StrictMode = StrictMode;
10747
- exports.Suspense = Suspense;
10748
- exports.isAsyncMode = isAsyncMode;
10749
- exports.isConcurrentMode = isConcurrentMode;
10750
- exports.isContextConsumer = isContextConsumer;
10751
- exports.isContextProvider = isContextProvider;
10752
- exports.isElement = isElement;
10753
- exports.isForwardRef = isForwardRef;
10754
- exports.isFragment = isFragment;
10755
- exports.isLazy = isLazy;
10756
- exports.isMemo = isMemo;
10757
- exports.isPortal = isPortal;
10758
- exports.isProfiler = isProfiler;
10759
- exports.isStrictMode = isStrictMode;
10760
- exports.isSuspense = isSuspense;
10761
- exports.isValidElementType = isValidElementType;
10762
- exports.typeOf = typeOf;
10763
- })();
10764
- }
10765
10778
 
10779
+ /***/ }),
10766
10780
 
10767
- /***/ }),
10781
+ /***/ "./node_modules/react-is/index.js":
10782
+ /*!****************************************!*\
10783
+ !*** ./node_modules/react-is/index.js ***!
10784
+ \****************************************/
10785
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10768
10786
 
10769
- /***/ "./node_modules/react-is/index.js":
10770
- /*!****************************************!*\
10771
- !*** ./node_modules/react-is/index.js ***!
10772
- \****************************************/
10773
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10774
10787
 
10788
+ {
10789
+ module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
10790
+ }
10775
10791
 
10776
- {
10777
- module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
10778
- }
10779
10792
 
10793
+ /***/ }),
10794
+
10795
+ /***/ "./node_modules/shallow-equal/dist/index.esm.js":
10796
+ /*!******************************************************!*\
10797
+ !*** ./node_modules/shallow-equal/dist/index.esm.js ***!
10798
+ \******************************************************/
10799
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10800
+ __webpack_require__.r(__webpack_exports__);
10801
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10802
+ /* harmony export */ "shallowEqualArrays": () => (/* binding */ shallowEqualArrays),
10803
+ /* harmony export */ "shallowEqualObjects": () => (/* binding */ shallowEqualObjects)
10804
+ /* harmony export */ });
10805
+ function shallowEqualObjects(objA, objB) {
10806
+ if (objA === objB) {
10807
+ return true;
10808
+ }
10809
+
10810
+ if (!objA || !objB) {
10811
+ return false;
10812
+ }
10813
+
10814
+ var aKeys = Object.keys(objA);
10815
+ var bKeys = Object.keys(objB);
10816
+ var len = aKeys.length;
10817
+
10818
+ if (bKeys.length !== len) {
10819
+ return false;
10820
+ }
10821
+
10822
+ for (var i = 0; i < len; i++) {
10823
+ var key = aKeys[i];
10824
+
10825
+ if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
10826
+ return false;
10827
+ }
10828
+ }
10829
+
10830
+ return true;
10831
+ }
10780
10832
 
10781
- /***/ }),
10782
-
10783
- /***/ "./node_modules/shallow-equal/dist/index.esm.js":
10784
- /*!******************************************************!*\
10785
- !*** ./node_modules/shallow-equal/dist/index.esm.js ***!
10786
- \******************************************************/
10787
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10788
- __webpack_require__.r(__webpack_exports__);
10789
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10790
- /* harmony export */ "shallowEqualArrays": () => (/* binding */ shallowEqualArrays),
10791
- /* harmony export */ "shallowEqualObjects": () => (/* binding */ shallowEqualObjects)
10792
- /* harmony export */ });
10793
- function shallowEqualObjects(objA, objB) {
10794
- if (objA === objB) {
10795
- return true;
10796
- }
10797
-
10798
- if (!objA || !objB) {
10799
- return false;
10800
- }
10801
-
10802
- var aKeys = Object.keys(objA);
10803
- var bKeys = Object.keys(objB);
10804
- var len = aKeys.length;
10805
-
10806
- if (bKeys.length !== len) {
10807
- return false;
10808
- }
10809
-
10810
- for (var i = 0; i < len; i++) {
10811
- var key = aKeys[i];
10812
-
10813
- if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
10814
- return false;
10815
- }
10816
- }
10817
-
10818
- return true;
10819
- }
10833
+ function shallowEqualArrays(arrA, arrB) {
10834
+ if (arrA === arrB) {
10835
+ return true;
10836
+ }
10820
10837
 
10821
- function shallowEqualArrays(arrA, arrB) {
10822
- if (arrA === arrB) {
10823
- return true;
10824
- }
10838
+ if (!arrA || !arrB) {
10839
+ return false;
10840
+ }
10825
10841
 
10826
- if (!arrA || !arrB) {
10827
- return false;
10828
- }
10842
+ var len = arrA.length;
10829
10843
 
10830
- var len = arrA.length;
10844
+ if (arrB.length !== len) {
10845
+ return false;
10846
+ }
10831
10847
 
10832
- if (arrB.length !== len) {
10833
- return false;
10834
- }
10848
+ for (var i = 0; i < len; i++) {
10849
+ if (arrA[i] !== arrB[i]) {
10850
+ return false;
10851
+ }
10852
+ }
10835
10853
 
10836
- for (var i = 0; i < len; i++) {
10837
- if (arrA[i] !== arrB[i]) {
10838
- return false;
10839
- }
10840
- }
10854
+ return true;
10855
+ }
10841
10856
 
10842
- return true;
10843
- }
10844
10857
 
10845
10858
 
10846
10859
 
10860
+ /***/ }),
10861
+
10862
+ /***/ "./src/Component.ts":
10863
+ /*!**************************!*\
10864
+ !*** ./src/Component.ts ***!
10865
+ \**************************/
10866
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10867
+
10868
+ var __rest = (this && this.__rest) || function (s, e) {
10869
+ var t = {};
10870
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10871
+ t[p] = s[p];
10872
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
10873
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10874
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10875
+ t[p[i]] = s[p[i]];
10876
+ }
10877
+ return t;
10878
+ };
10879
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10880
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10881
+ };
10882
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10883
+ var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
10884
+ // ReactNode and ReactElement typings are a little funky for functional components, so the ReactElement cast is needed on the return
10885
+ var MediaQuery = function (_a) {
10886
+ var children = _a.children, device = _a.device, onChange = _a.onChange, settings = __rest(_a, ["children", "device", "onChange"]);
10887
+ var matches = (0, useMediaQuery_1.default)(settings, device, onChange);
10888
+ if (typeof children === 'function') {
10889
+ return children(matches);
10890
+ }
10891
+ return matches ? children : null;
10892
+ };
10893
+ exports["default"] = MediaQuery;
10894
+
10895
+
10896
+ /***/ }),
10897
+
10898
+ /***/ "./src/Context.ts":
10899
+ /*!************************!*\
10900
+ !*** ./src/Context.ts ***!
10901
+ \************************/
10902
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10903
+
10904
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10905
+ var react_1 = __webpack_require__(/*! react */ "react");
10906
+ var Context = (0, react_1.createContext)(undefined);
10907
+ exports["default"] = Context;
10908
+
10909
+
10910
+ /***/ }),
10911
+
10912
+ /***/ "./src/index.ts":
10913
+ /*!**********************!*\
10914
+ !*** ./src/index.ts ***!
10915
+ \**********************/
10916
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10917
+
10918
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10919
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10920
+ };
10921
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10922
+ exports.Context = exports.toQuery = exports.useMediaQuery = exports["default"] = void 0;
10923
+ var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
10924
+ exports.useMediaQuery = useMediaQuery_1.default;
10925
+ var Component_1 = __importDefault(__webpack_require__(/*! ./Component */ "./src/Component.ts"));
10926
+ exports["default"] = Component_1.default;
10927
+ var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
10928
+ exports.toQuery = toQuery_1.default;
10929
+ var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
10930
+ exports.Context = Context_1.default;
10931
+
10932
+
10933
+ /***/ }),
10934
+
10935
+ /***/ "./src/mediaQuery.ts":
10936
+ /*!***************************!*\
10937
+ !*** ./src/mediaQuery.ts ***!
10938
+ \***************************/
10939
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10940
+
10941
+ var __assign = (this && this.__assign) || function () {
10942
+ __assign = Object.assign || function(t) {
10943
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
10944
+ s = arguments[i];
10945
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10946
+ t[p] = s[p];
10947
+ }
10948
+ return t;
10949
+ };
10950
+ return __assign.apply(this, arguments);
10951
+ };
10952
+ var __rest = (this && this.__rest) || function (s, e) {
10953
+ var t = {};
10954
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10955
+ t[p] = s[p];
10956
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
10957
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10958
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10959
+ t[p[i]] = s[p[i]];
10960
+ }
10961
+ return t;
10962
+ };
10963
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10964
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10965
+ };
10966
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
10967
+ var prop_types_1 = __importDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
10968
+ var stringOrNumber = prop_types_1.default.oneOfType([
10969
+ prop_types_1.default.string,
10970
+ prop_types_1.default.number
10971
+ ]);
10972
+ // media types
10973
+ var types = {
10974
+ all: prop_types_1.default.bool,
10975
+ grid: prop_types_1.default.bool,
10976
+ aural: prop_types_1.default.bool,
10977
+ braille: prop_types_1.default.bool,
10978
+ handheld: prop_types_1.default.bool,
10979
+ print: prop_types_1.default.bool,
10980
+ projection: prop_types_1.default.bool,
10981
+ screen: prop_types_1.default.bool,
10982
+ tty: prop_types_1.default.bool,
10983
+ tv: prop_types_1.default.bool,
10984
+ embossed: prop_types_1.default.bool
10985
+ };
10986
+ // properties that match media queries
10987
+ var matchers = {
10988
+ orientation: prop_types_1.default.oneOf([
10989
+ 'portrait',
10990
+ 'landscape'
10991
+ ]),
10992
+ scan: prop_types_1.default.oneOf([
10993
+ 'progressive',
10994
+ 'interlace'
10995
+ ]),
10996
+ aspectRatio: prop_types_1.default.string,
10997
+ deviceAspectRatio: prop_types_1.default.string,
10998
+ height: stringOrNumber,
10999
+ deviceHeight: stringOrNumber,
11000
+ width: stringOrNumber,
11001
+ deviceWidth: stringOrNumber,
11002
+ color: prop_types_1.default.bool,
11003
+ colorIndex: prop_types_1.default.bool,
11004
+ monochrome: prop_types_1.default.bool,
11005
+ resolution: stringOrNumber,
11006
+ type: Object.keys(types)
11007
+ };
11008
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11009
+ matchers.type; var featureMatchers = __rest(matchers
11010
+ // media features
11011
+ , ["type"]);
11012
+ // media features
11013
+ var features = __assign({ minAspectRatio: prop_types_1.default.string, maxAspectRatio: prop_types_1.default.string, minDeviceAspectRatio: prop_types_1.default.string, maxDeviceAspectRatio: prop_types_1.default.string, minHeight: stringOrNumber, maxHeight: stringOrNumber, minDeviceHeight: stringOrNumber, maxDeviceHeight: stringOrNumber, minWidth: stringOrNumber, maxWidth: stringOrNumber, minDeviceWidth: stringOrNumber, maxDeviceWidth: stringOrNumber, minColor: prop_types_1.default.number, maxColor: prop_types_1.default.number, minColorIndex: prop_types_1.default.number, maxColorIndex: prop_types_1.default.number, minMonochrome: prop_types_1.default.number, maxMonochrome: prop_types_1.default.number, minResolution: stringOrNumber, maxResolution: stringOrNumber }, featureMatchers);
11014
+ var all = __assign(__assign({}, types), features);
11015
+ exports["default"] = {
11016
+ all: all,
11017
+ types: types,
11018
+ matchers: matchers,
11019
+ features: features
11020
+ };
11021
+
11022
+
11023
+ /***/ }),
11024
+
11025
+ /***/ "./src/toQuery.ts":
11026
+ /*!************************!*\
11027
+ !*** ./src/toQuery.ts ***!
11028
+ \************************/
11029
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11030
+
11031
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11032
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11033
+ };
11034
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
11035
+ var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
11036
+ var mediaQuery_1 = __importDefault(__webpack_require__(/*! ./mediaQuery */ "./src/mediaQuery.ts"));
11037
+ var negate = function (cond) { return "not ".concat(cond); };
11038
+ var keyVal = function (k, v) {
11039
+ var realKey = (0, hyphenate_style_name_1.default)(k);
11040
+ // px shorthand
11041
+ if (typeof v === 'number') {
11042
+ v = "".concat(v, "px");
11043
+ }
11044
+ if (v === true) {
11045
+ return realKey;
11046
+ }
11047
+ if (v === false) {
11048
+ return negate(realKey);
11049
+ }
11050
+ return "(".concat(realKey, ": ").concat(v, ")");
11051
+ };
11052
+ var join = function (conds) { return conds.join(' and '); };
11053
+ var toQuery = function (obj) {
11054
+ var rules = [];
11055
+ Object.keys(mediaQuery_1.default.all).forEach(function (k) {
11056
+ var v = obj[k];
11057
+ if (v != null) {
11058
+ rules.push(keyVal(k, v));
11059
+ }
11060
+ });
11061
+ return join(rules);
11062
+ };
11063
+ exports["default"] = toQuery;
11064
+
11065
+
11066
+ /***/ }),
11067
+
11068
+ /***/ "./src/useMediaQuery.ts":
11069
+ /*!******************************!*\
11070
+ !*** ./src/useMediaQuery.ts ***!
11071
+ \******************************/
11072
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11073
+
11074
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11075
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11076
+ };
11077
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
11078
+ var react_1 = __webpack_require__(/*! react */ "react");
11079
+ var matchmediaquery_1 = __importDefault(__webpack_require__(/*! matchmediaquery */ "./node_modules/matchmediaquery/index.js"));
11080
+ var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
11081
+ var shallow_equal_1 = __webpack_require__(/*! shallow-equal */ "./node_modules/shallow-equal/dist/index.esm.js");
11082
+ var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
11083
+ var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
11084
+ var makeQuery = function (settings) { return settings.query || (0, toQuery_1.default)(settings); };
11085
+ var hyphenateKeys = function (obj) {
11086
+ if (!obj)
11087
+ return undefined;
11088
+ var keys = Object.keys(obj);
11089
+ return keys.reduce(function (result, key) {
11090
+ result[(0, hyphenate_style_name_1.default)(key)] = obj[key];
11091
+ return result;
11092
+ }, {});
11093
+ };
11094
+ var useIsUpdate = function () {
11095
+ var ref = (0, react_1.useRef)(false);
11096
+ (0, react_1.useEffect)(function () {
11097
+ ref.current = true;
11098
+ }, []);
11099
+ return ref.current;
11100
+ };
11101
+ var useDevice = function (deviceFromProps) {
11102
+ var deviceFromContext = (0, react_1.useContext)(Context_1.default);
11103
+ var getDevice = function () {
11104
+ return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
11105
+ };
11106
+ var _a = (0, react_1.useState)(getDevice), device = _a[0], setDevice = _a[1];
11107
+ (0, react_1.useEffect)(function () {
11108
+ var newDevice = getDevice();
11109
+ if (!(0, shallow_equal_1.shallowEqualObjects)(device, newDevice)) {
11110
+ setDevice(newDevice);
11111
+ }
11112
+ }, [deviceFromProps, deviceFromContext]);
11113
+ return device;
11114
+ };
11115
+ var useQuery = function (settings) {
11116
+ var getQuery = function () { return makeQuery(settings); };
11117
+ var _a = (0, react_1.useState)(getQuery), query = _a[0], setQuery = _a[1];
11118
+ (0, react_1.useEffect)(function () {
11119
+ var newQuery = getQuery();
11120
+ if (query !== newQuery) {
11121
+ setQuery(newQuery);
11122
+ }
11123
+ }, [settings]);
11124
+ return query;
11125
+ };
11126
+ var useMatchMedia = function (query, device) {
11127
+ var getMatchMedia = function () { return (0, matchmediaquery_1.default)(query, device || {}, !!device); };
11128
+ var _a = (0, react_1.useState)(getMatchMedia), mq = _a[0], setMq = _a[1];
11129
+ var isUpdate = useIsUpdate();
11130
+ (0, react_1.useEffect)(function () {
11131
+ if (isUpdate) {
11132
+ // skip on mounting, it has already been set
11133
+ var newMq_1 = getMatchMedia();
11134
+ setMq(newMq_1);
11135
+ return function () {
11136
+ if (newMq_1) {
11137
+ newMq_1.dispose();
11138
+ }
11139
+ };
11140
+ }
11141
+ }, [query, device]);
11142
+ return mq;
11143
+ };
11144
+ var useMatches = function (mediaQuery) {
11145
+ var _a = (0, react_1.useState)(mediaQuery.matches), matches = _a[0], setMatches = _a[1];
11146
+ (0, react_1.useEffect)(function () {
11147
+ var updateMatches = function (ev) {
11148
+ setMatches(ev.matches);
11149
+ };
11150
+ mediaQuery.addListener(updateMatches);
11151
+ setMatches(mediaQuery.matches);
11152
+ return function () {
11153
+ mediaQuery.removeListener(updateMatches);
11154
+ };
11155
+ }, [mediaQuery]);
11156
+ return matches;
11157
+ };
11158
+ var useMediaQuery = function (settings, device, onChange) {
11159
+ var deviceSettings = useDevice(device);
11160
+ var query = useQuery(settings);
11161
+ if (!query)
11162
+ throw new Error('Invalid or missing MediaQuery!');
11163
+ var mq = useMatchMedia(query, deviceSettings);
11164
+ var matches = useMatches(mq);
11165
+ var isUpdate = useIsUpdate();
11166
+ (0, react_1.useEffect)(function () {
11167
+ if (isUpdate && onChange) {
11168
+ onChange(matches);
11169
+ }
11170
+ }, [matches]);
11171
+ (0, react_1.useEffect)(function () { return function () {
11172
+ if (mq) {
11173
+ mq.dispose();
11174
+ }
11175
+ }; }, []);
11176
+ return matches;
11177
+ };
11178
+ exports["default"] = useMediaQuery;
11179
+
11180
+
11181
+ /***/ }),
11182
+
11183
+ /***/ "react":
11184
+ /*!**************************************************************************************!*\
11185
+ !*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
11186
+ \**************************************************************************************/
11187
+ /***/ ((module) => {
11188
+ module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
11189
+
11190
+ /***/ })
11191
+
11192
+ /******/ });
11193
+ /************************************************************************/
11194
+ /******/ // The module cache
11195
+ /******/ var __webpack_module_cache__ = {};
11196
+ /******/
11197
+ /******/ // The require function
11198
+ /******/ function __webpack_require__(moduleId) {
11199
+ /******/ // Check if module is in cache
11200
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
11201
+ /******/ if (cachedModule !== undefined) {
11202
+ /******/ return cachedModule.exports;
11203
+ /******/ }
11204
+ /******/ // Create a new module (and put it into the cache)
11205
+ /******/ var module = __webpack_module_cache__[moduleId] = {
11206
+ /******/ // no module.id needed
11207
+ /******/ // no module.loaded needed
11208
+ /******/ exports: {}
11209
+ /******/ };
11210
+ /******/
11211
+ /******/ // Execute the module function
11212
+ /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
11213
+ /******/
11214
+ /******/ // Return the exports of the module
11215
+ /******/ return module.exports;
11216
+ /******/ }
11217
+ /******/
11218
+ /************************************************************************/
11219
+ /******/ /* webpack/runtime/define property getters */
11220
+ /******/ (() => {
11221
+ /******/ // define getter functions for harmony exports
11222
+ /******/ __webpack_require__.d = (exports, definition) => {
11223
+ /******/ for(var key in definition) {
11224
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
11225
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
11226
+ /******/ }
11227
+ /******/ }
11228
+ /******/ };
11229
+ /******/ })();
11230
+ /******/
11231
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
11232
+ /******/ (() => {
11233
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
11234
+ /******/ })();
11235
+ /******/
11236
+ /******/ /* webpack/runtime/make namespace object */
11237
+ /******/ (() => {
11238
+ /******/ // define __esModule on exports
11239
+ /******/ __webpack_require__.r = (exports) => {
11240
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
11241
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
11242
+ /******/ }
11243
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
11244
+ /******/ };
11245
+ /******/ })();
11246
+ /******/
11247
+ /************************************************************************/
11248
+ /******/
11249
+ /******/ // startup
11250
+ /******/ // Load entry module and return exports
11251
+ /******/ // This entry module is referenced by other modules so it can't be inlined
11252
+ /******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
11253
+ /******/
11254
+ /******/ return __webpack_exports__;
11255
+ /******/ })()
11256
+ ;
11257
+ });
11258
+
11259
+ } (reactResponsive$1));
11260
+ return reactResponsive$1.exports;
11261
+ }
10847
11262
 
10848
- /***/ }),
10849
-
10850
- /***/ "./src/Component.ts":
10851
- /*!**************************!*\
10852
- !*** ./src/Component.ts ***!
10853
- \**************************/
10854
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10855
-
10856
- var __rest = (this && this.__rest) || function (s, e) {
10857
- var t = {};
10858
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10859
- t[p] = s[p];
10860
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
10861
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10862
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10863
- t[p[i]] = s[p[i]];
10864
- }
10865
- return t;
10866
- };
10867
- var __importDefault = (this && this.__importDefault) || function (mod) {
10868
- return (mod && mod.__esModule) ? mod : { "default": mod };
10869
- };
10870
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10871
- var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
10872
- // ReactNode and ReactElement typings are a little funky for functional components, so the ReactElement cast is needed on the return
10873
- var MediaQuery = function (_a) {
10874
- var children = _a.children, device = _a.device, onChange = _a.onChange, settings = __rest(_a, ["children", "device", "onChange"]);
10875
- var matches = (0, useMediaQuery_1.default)(settings, device, onChange);
10876
- if (typeof children === 'function') {
10877
- return children(matches);
10878
- }
10879
- return matches ? children : null;
10880
- };
10881
- exports["default"] = MediaQuery;
10882
-
10883
-
10884
- /***/ }),
10885
-
10886
- /***/ "./src/Context.ts":
10887
- /*!************************!*\
10888
- !*** ./src/Context.ts ***!
10889
- \************************/
10890
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
10891
-
10892
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10893
- var react_1 = __webpack_require__(/*! react */ "react");
10894
- var Context = (0, react_1.createContext)(undefined);
10895
- exports["default"] = Context;
10896
-
10897
-
10898
- /***/ }),
10899
-
10900
- /***/ "./src/index.ts":
10901
- /*!**********************!*\
10902
- !*** ./src/index.ts ***!
10903
- \**********************/
10904
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10905
-
10906
- var __importDefault = (this && this.__importDefault) || function (mod) {
10907
- return (mod && mod.__esModule) ? mod : { "default": mod };
10908
- };
10909
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10910
- exports.Context = exports.toQuery = exports.useMediaQuery = exports["default"] = void 0;
10911
- var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
10912
- exports.useMediaQuery = useMediaQuery_1.default;
10913
- var Component_1 = __importDefault(__webpack_require__(/*! ./Component */ "./src/Component.ts"));
10914
- exports["default"] = Component_1.default;
10915
- var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
10916
- exports.toQuery = toQuery_1.default;
10917
- var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
10918
- exports.Context = Context_1.default;
10919
-
10920
-
10921
- /***/ }),
10922
-
10923
- /***/ "./src/mediaQuery.ts":
10924
- /*!***************************!*\
10925
- !*** ./src/mediaQuery.ts ***!
10926
- \***************************/
10927
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
10928
-
10929
- var __assign = (this && this.__assign) || function () {
10930
- __assign = Object.assign || function(t) {
10931
- for (var s, i = 1, n = arguments.length; i < n; i++) {
10932
- s = arguments[i];
10933
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10934
- t[p] = s[p];
10935
- }
10936
- return t;
10937
- };
10938
- return __assign.apply(this, arguments);
10939
- };
10940
- var __rest = (this && this.__rest) || function (s, e) {
10941
- var t = {};
10942
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
10943
- t[p] = s[p];
10944
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
10945
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
10946
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
10947
- t[p[i]] = s[p[i]];
10948
- }
10949
- return t;
10950
- };
10951
- var __importDefault = (this && this.__importDefault) || function (mod) {
10952
- return (mod && mod.__esModule) ? mod : { "default": mod };
10953
- };
10954
- Object.defineProperty(exports, "__esModule", ({ value: true }));
10955
- var prop_types_1 = __importDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
10956
- var stringOrNumber = prop_types_1.default.oneOfType([
10957
- prop_types_1.default.string,
10958
- prop_types_1.default.number
10959
- ]);
10960
- // media types
10961
- var types = {
10962
- all: prop_types_1.default.bool,
10963
- grid: prop_types_1.default.bool,
10964
- aural: prop_types_1.default.bool,
10965
- braille: prop_types_1.default.bool,
10966
- handheld: prop_types_1.default.bool,
10967
- print: prop_types_1.default.bool,
10968
- projection: prop_types_1.default.bool,
10969
- screen: prop_types_1.default.bool,
10970
- tty: prop_types_1.default.bool,
10971
- tv: prop_types_1.default.bool,
10972
- embossed: prop_types_1.default.bool
10973
- };
10974
- // properties that match media queries
10975
- var matchers = {
10976
- orientation: prop_types_1.default.oneOf([
10977
- 'portrait',
10978
- 'landscape'
10979
- ]),
10980
- scan: prop_types_1.default.oneOf([
10981
- 'progressive',
10982
- 'interlace'
10983
- ]),
10984
- aspectRatio: prop_types_1.default.string,
10985
- deviceAspectRatio: prop_types_1.default.string,
10986
- height: stringOrNumber,
10987
- deviceHeight: stringOrNumber,
10988
- width: stringOrNumber,
10989
- deviceWidth: stringOrNumber,
10990
- color: prop_types_1.default.bool,
10991
- colorIndex: prop_types_1.default.bool,
10992
- monochrome: prop_types_1.default.bool,
10993
- resolution: stringOrNumber,
10994
- type: Object.keys(types)
10995
- };
10996
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
10997
- matchers.type; var featureMatchers = __rest(matchers
10998
- // media features
10999
- , ["type"]);
11000
- // media features
11001
- var features = __assign({ minAspectRatio: prop_types_1.default.string, maxAspectRatio: prop_types_1.default.string, minDeviceAspectRatio: prop_types_1.default.string, maxDeviceAspectRatio: prop_types_1.default.string, minHeight: stringOrNumber, maxHeight: stringOrNumber, minDeviceHeight: stringOrNumber, maxDeviceHeight: stringOrNumber, minWidth: stringOrNumber, maxWidth: stringOrNumber, minDeviceWidth: stringOrNumber, maxDeviceWidth: stringOrNumber, minColor: prop_types_1.default.number, maxColor: prop_types_1.default.number, minColorIndex: prop_types_1.default.number, maxColorIndex: prop_types_1.default.number, minMonochrome: prop_types_1.default.number, maxMonochrome: prop_types_1.default.number, minResolution: stringOrNumber, maxResolution: stringOrNumber }, featureMatchers);
11002
- var all = __assign(__assign({}, types), features);
11003
- exports["default"] = {
11004
- all: all,
11005
- types: types,
11006
- matchers: matchers,
11007
- features: features
11008
- };
11009
-
11010
-
11011
- /***/ }),
11012
-
11013
- /***/ "./src/toQuery.ts":
11014
- /*!************************!*\
11015
- !*** ./src/toQuery.ts ***!
11016
- \************************/
11017
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11018
-
11019
- var __importDefault = (this && this.__importDefault) || function (mod) {
11020
- return (mod && mod.__esModule) ? mod : { "default": mod };
11021
- };
11022
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11023
- var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
11024
- var mediaQuery_1 = __importDefault(__webpack_require__(/*! ./mediaQuery */ "./src/mediaQuery.ts"));
11025
- var negate = function (cond) { return "not ".concat(cond); };
11026
- var keyVal = function (k, v) {
11027
- var realKey = (0, hyphenate_style_name_1.default)(k);
11028
- // px shorthand
11029
- if (typeof v === 'number') {
11030
- v = "".concat(v, "px");
11031
- }
11032
- if (v === true) {
11033
- return realKey;
11034
- }
11035
- if (v === false) {
11036
- return negate(realKey);
11037
- }
11038
- return "(".concat(realKey, ": ").concat(v, ")");
11039
- };
11040
- var join = function (conds) { return conds.join(' and '); };
11041
- var toQuery = function (obj) {
11042
- var rules = [];
11043
- Object.keys(mediaQuery_1.default.all).forEach(function (k) {
11044
- var v = obj[k];
11045
- if (v != null) {
11046
- rules.push(keyVal(k, v));
11047
- }
11048
- });
11049
- return join(rules);
11050
- };
11051
- exports["default"] = toQuery;
11052
-
11053
-
11054
- /***/ }),
11055
-
11056
- /***/ "./src/useMediaQuery.ts":
11057
- /*!******************************!*\
11058
- !*** ./src/useMediaQuery.ts ***!
11059
- \******************************/
11060
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
11061
-
11062
- var __importDefault = (this && this.__importDefault) || function (mod) {
11063
- return (mod && mod.__esModule) ? mod : { "default": mod };
11064
- };
11065
- Object.defineProperty(exports, "__esModule", ({ value: true }));
11066
- var react_1 = __webpack_require__(/*! react */ "react");
11067
- var matchmediaquery_1 = __importDefault(__webpack_require__(/*! matchmediaquery */ "./node_modules/matchmediaquery/index.js"));
11068
- var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
11069
- var shallow_equal_1 = __webpack_require__(/*! shallow-equal */ "./node_modules/shallow-equal/dist/index.esm.js");
11070
- var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
11071
- var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
11072
- var makeQuery = function (settings) { return settings.query || (0, toQuery_1.default)(settings); };
11073
- var hyphenateKeys = function (obj) {
11074
- if (!obj)
11075
- return undefined;
11076
- var keys = Object.keys(obj);
11077
- return keys.reduce(function (result, key) {
11078
- result[(0, hyphenate_style_name_1.default)(key)] = obj[key];
11079
- return result;
11080
- }, {});
11081
- };
11082
- var useIsUpdate = function () {
11083
- var ref = (0, react_1.useRef)(false);
11084
- (0, react_1.useEffect)(function () {
11085
- ref.current = true;
11086
- }, []);
11087
- return ref.current;
11088
- };
11089
- var useDevice = function (deviceFromProps) {
11090
- var deviceFromContext = (0, react_1.useContext)(Context_1.default);
11091
- var getDevice = function () {
11092
- return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
11093
- };
11094
- var _a = (0, react_1.useState)(getDevice), device = _a[0], setDevice = _a[1];
11095
- (0, react_1.useEffect)(function () {
11096
- var newDevice = getDevice();
11097
- if (!(0, shallow_equal_1.shallowEqualObjects)(device, newDevice)) {
11098
- setDevice(newDevice);
11099
- }
11100
- }, [deviceFromProps, deviceFromContext]);
11101
- return device;
11102
- };
11103
- var useQuery = function (settings) {
11104
- var getQuery = function () { return makeQuery(settings); };
11105
- var _a = (0, react_1.useState)(getQuery), query = _a[0], setQuery = _a[1];
11106
- (0, react_1.useEffect)(function () {
11107
- var newQuery = getQuery();
11108
- if (query !== newQuery) {
11109
- setQuery(newQuery);
11110
- }
11111
- }, [settings]);
11112
- return query;
11113
- };
11114
- var useMatchMedia = function (query, device) {
11115
- var getMatchMedia = function () { return (0, matchmediaquery_1.default)(query, device || {}, !!device); };
11116
- var _a = (0, react_1.useState)(getMatchMedia), mq = _a[0], setMq = _a[1];
11117
- var isUpdate = useIsUpdate();
11118
- (0, react_1.useEffect)(function () {
11119
- if (isUpdate) {
11120
- // skip on mounting, it has already been set
11121
- var newMq_1 = getMatchMedia();
11122
- setMq(newMq_1);
11123
- return function () {
11124
- if (newMq_1) {
11125
- newMq_1.dispose();
11126
- }
11127
- };
11128
- }
11129
- }, [query, device]);
11130
- return mq;
11131
- };
11132
- var useMatches = function (mediaQuery) {
11133
- var _a = (0, react_1.useState)(mediaQuery.matches), matches = _a[0], setMatches = _a[1];
11134
- (0, react_1.useEffect)(function () {
11135
- var updateMatches = function (ev) {
11136
- setMatches(ev.matches);
11137
- };
11138
- mediaQuery.addListener(updateMatches);
11139
- setMatches(mediaQuery.matches);
11140
- return function () {
11141
- mediaQuery.removeListener(updateMatches);
11142
- };
11143
- }, [mediaQuery]);
11144
- return matches;
11145
- };
11146
- var useMediaQuery = function (settings, device, onChange) {
11147
- var deviceSettings = useDevice(device);
11148
- var query = useQuery(settings);
11149
- if (!query)
11150
- throw new Error('Invalid or missing MediaQuery!');
11151
- var mq = useMatchMedia(query, deviceSettings);
11152
- var matches = useMatches(mq);
11153
- var isUpdate = useIsUpdate();
11154
- (0, react_1.useEffect)(function () {
11155
- if (isUpdate && onChange) {
11156
- onChange(matches);
11157
- }
11158
- }, [matches]);
11159
- (0, react_1.useEffect)(function () { return function () {
11160
- if (mq) {
11161
- mq.dispose();
11162
- }
11163
- }; }, []);
11164
- return matches;
11165
- };
11166
- exports["default"] = useMediaQuery;
11167
-
11168
-
11169
- /***/ }),
11170
-
11171
- /***/ "react":
11172
- /*!**************************************************************************************!*\
11173
- !*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
11174
- \**************************************************************************************/
11175
- /***/ ((module) => {
11176
- module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
11177
-
11178
- /***/ })
11179
-
11180
- /******/ });
11181
- /************************************************************************/
11182
- /******/ // The module cache
11183
- /******/ var __webpack_module_cache__ = {};
11184
- /******/
11185
- /******/ // The require function
11186
- /******/ function __webpack_require__(moduleId) {
11187
- /******/ // Check if module is in cache
11188
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
11189
- /******/ if (cachedModule !== undefined) {
11190
- /******/ return cachedModule.exports;
11191
- /******/ }
11192
- /******/ // Create a new module (and put it into the cache)
11193
- /******/ var module = __webpack_module_cache__[moduleId] = {
11194
- /******/ // no module.id needed
11195
- /******/ // no module.loaded needed
11196
- /******/ exports: {}
11197
- /******/ };
11198
- /******/
11199
- /******/ // Execute the module function
11200
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
11201
- /******/
11202
- /******/ // Return the exports of the module
11203
- /******/ return module.exports;
11204
- /******/ }
11205
- /******/
11206
- /************************************************************************/
11207
- /******/ /* webpack/runtime/define property getters */
11208
- /******/ (() => {
11209
- /******/ // define getter functions for harmony exports
11210
- /******/ __webpack_require__.d = (exports, definition) => {
11211
- /******/ for(var key in definition) {
11212
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
11213
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
11214
- /******/ }
11215
- /******/ }
11216
- /******/ };
11217
- /******/ })();
11218
- /******/
11219
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
11220
- /******/ (() => {
11221
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
11222
- /******/ })();
11223
- /******/
11224
- /******/ /* webpack/runtime/make namespace object */
11225
- /******/ (() => {
11226
- /******/ // define __esModule on exports
11227
- /******/ __webpack_require__.r = (exports) => {
11228
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
11229
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
11230
- /******/ }
11231
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
11232
- /******/ };
11233
- /******/ })();
11234
- /******/
11235
- /************************************************************************/
11236
- /******/
11237
- /******/ // startup
11238
- /******/ // Load entry module and return exports
11239
- /******/ // This entry module is referenced by other modules so it can't be inlined
11240
- /******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
11241
- /******/
11242
- /******/ return __webpack_exports__;
11243
- /******/ })()
11244
- ;
11245
- });
11246
-
11247
- } (reactResponsive));
11248
-
11249
- var reactResponsiveExports = reactResponsive.exports;
11263
+ var reactResponsiveExports = /*@__PURE__*/ requireReactResponsive();
11250
11264
 
11251
11265
  var IconsSvg = function (_a) {
11252
11266
  var fill = _a.fill, size = _a.size, icon = _a.icon;
@@ -11980,7 +11994,7 @@
11980
11994
  // Set selected locations from URL - handle all locationIds
11981
11995
  if (((_a = locations === null || locations === void 0 ? void 0 : locations.data) === null || _a === void 0 ? void 0 : _a.length) && locationIdParams.length) {
11982
11996
  var matchedLocations = locations.data.filter(function (location) {
11983
- return locationIdParams.includes(location.id);
11997
+ return locationIdParams.includes(location.id.toString());
11984
11998
  });
11985
11999
  setSelectedLocations(matchedLocations);
11986
12000
  }
@@ -12033,13 +12047,24 @@
12033
12047
  ageCategoryCounts: ageCategoryCounts,
12034
12048
  ageCategories: ageCategories,
12035
12049
  }),
12050
+ selectedLocations: selectedLocations
12051
+ .map(function (location) { return location.id.toString(); })
12052
+ .join(','),
12036
12053
  };
12037
12054
  var querySearchParams = new URLSearchParams();
12038
12055
  try {
12039
12056
  for (var _b = __values(Object.entries(newParams)), _c = _b.next(); !_c.done; _c = _b.next()) {
12040
12057
  var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
12041
12058
  if (value) {
12042
- querySearchParams.append(key, value.toString());
12059
+ if (key === 'selectedLocations' && !!selectedLocations.length) {
12060
+ // Append all selected locationIds
12061
+ selectedLocations.forEach(function (location) {
12062
+ querySearchParams.append('locationId', location.id.toString());
12063
+ });
12064
+ }
12065
+ else {
12066
+ querySearchParams.append(key, value.toString());
12067
+ }
12043
12068
  }
12044
12069
  }
12045
12070
  }
@@ -12050,10 +12075,6 @@
12050
12075
  }
12051
12076
  finally { if (e_2) throw e_2.error; }
12052
12077
  }
12053
- // Append all selected locationIds
12054
- selectedLocations.forEach(function (location) {
12055
- querySearchParams.append('locationId', location.id);
12056
- });
12057
12078
  handleSelectedFilter(false);
12058
12079
  if (onSubmit && window.location.href.includes(selectedPath)) {
12059
12080
  onSubmit(newParams);