willba-component-library 0.0.69 → 0.0.71

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.js CHANGED
@@ -21,8 +21,6 @@ function _interopNamespaceDefault(e) {
21
21
 
22
22
  var React__default__namespace = /*#__PURE__*/_interopNamespaceDefault(React__default);
23
23
 
24
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
25
-
26
24
  function getDefaultExportFromCjs (x) {
27
25
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
28
26
  }
@@ -402,82 +400,6 @@ function SelectButton(_a) {
402
400
  return (React__default.createElement("button", { className: "will-filter-bar-select-button", onClick: onClick, style: style }, label));
403
401
  }
404
402
 
405
- var DefaultContext = {
406
- color: undefined,
407
- size: undefined,
408
- className: undefined,
409
- style: undefined,
410
- attr: undefined
411
- };
412
- var IconContext = React__default.createContext && React__default.createContext(DefaultContext);
413
-
414
- var __assign$1 = undefined && undefined.__assign || function () {
415
- __assign$1 = Object.assign || function (t) {
416
- for (var s, i = 1, n = arguments.length; i < n; i++) {
417
- s = arguments[i];
418
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
419
- }
420
- return t;
421
- };
422
- return __assign$1.apply(this, arguments);
423
- };
424
- var __rest$1 = undefined && undefined.__rest || function (s, e) {
425
- var t = {};
426
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
427
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
428
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
429
- }
430
- return t;
431
- };
432
- function Tree2Element(tree) {
433
- return tree && tree.map(function (node, i) {
434
- return React__default.createElement(node.tag, __assign$1({
435
- key: i
436
- }, node.attr), Tree2Element(node.child));
437
- });
438
- }
439
- function GenIcon(data) {
440
- // eslint-disable-next-line react/display-name
441
- return function (props) {
442
- return React__default.createElement(IconBase, __assign$1({
443
- attr: __assign$1({}, data.attr)
444
- }, props), Tree2Element(data.child));
445
- };
446
- }
447
- function IconBase(props) {
448
- var elem = function (conf) {
449
- var attr = props.attr,
450
- size = props.size,
451
- title = props.title,
452
- svgProps = __rest$1(props, ["attr", "size", "title"]);
453
- var computedSize = size || conf.size || "1em";
454
- var className;
455
- if (conf.className) className = conf.className;
456
- if (props.className) className = (className ? className + " " : "") + props.className;
457
- return React__default.createElement("svg", __assign$1({
458
- stroke: "currentColor",
459
- fill: "currentColor",
460
- strokeWidth: "0"
461
- }, conf.attr, attr, svgProps, {
462
- className: className,
463
- style: __assign$1(__assign$1({
464
- color: props.color || conf.color
465
- }, conf.style), props.style),
466
- height: computedSize,
467
- width: computedSize,
468
- xmlns: "http://www.w3.org/2000/svg"
469
- }), title && React__default.createElement("title", null, title), props.children);
470
- };
471
- return IconContext !== undefined ? React__default.createElement(IconContext.Consumer, null, function (conf) {
472
- return elem(conf);
473
- }) : elem(DefaultContext);
474
- }
475
-
476
- // THIS FILE IS AUTO GENERATED
477
- function FaSearch (props) {
478
- return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"}}]})(props);
479
- }
480
-
481
403
  var css_248z$6 = ".will-filter-bar-submit-button {\n width: auto;\n height: auto;\n background-color: var(--will-primary);\n color: var(--will-white);\n padding: 10px 20px;\n border-radius: 20px;\n cursor: pointer;\n border: none;\n white-space: nowrap;\n text-transform: uppercase;\n font-size: 12px;\n display: flex;\n align-items: center;\n}\n\n.will-filter-bar-submit-button span {\n margin-right: 10px;\n display: flex;\n}\n\n@media (max-width: 1024px) {\n .will-filter-bar-submit-button {\n justify-content: center;\n margin-bottom: 25px;\n }\n}\n";
482
404
  styleInject(css_248z$6);
483
405
 
@@ -485,8 +407,7 @@ function SubmitButton(_a) {
485
407
  var onClick = _a.onClick;
486
408
  var t = useTranslation('filterBar').t;
487
409
  return (React__default.createElement("button", { className: "will-filter-bar-submit-button", onClick: onClick },
488
- React__default.createElement("span", null,
489
- React__default.createElement(FaSearch, null)),
410
+ React__default.createElement("span", null),
490
411
  t('submit.label')));
491
412
  }
492
413
 
@@ -6045,1833 +5966,6 @@ function DayPicker(props) {
6045
5966
  React__default.createElement(Root, { initialProps: props })));
6046
5967
  }
6047
5968
 
6048
- var reactResponsive = {exports: {}};
6049
-
6050
- (function (module, exports) {
6051
- (function webpackUniversalModuleDefinition(root, factory) {
6052
- module.exports = factory(React__default);
6053
- })(commonjsGlobal, (__WEBPACK_EXTERNAL_MODULE_react__) => {
6054
- return /******/ (() => { // webpackBootstrap
6055
- /******/ var __webpack_modules__ = ({
6056
-
6057
- /***/ "./node_modules/css-mediaquery/index.js":
6058
- /*!**********************************************!*\
6059
- !*** ./node_modules/css-mediaquery/index.js ***!
6060
- \**********************************************/
6061
- /***/ ((__unused_webpack_module, exports) => {
6062
- /*
6063
- Copyright (c) 2014, Yahoo! Inc. All rights reserved.
6064
- Copyrights licensed under the New BSD License.
6065
- See the accompanying LICENSE file for terms.
6066
- */
6067
-
6068
-
6069
-
6070
- exports.match = matchQuery;
6071
- exports.parse = parseQuery;
6072
-
6073
- // -----------------------------------------------------------------------------
6074
-
6075
- var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
6076
- RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
6077
- RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,
6078
- RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,
6079
- RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
6080
-
6081
- function matchQuery(mediaQuery, values) {
6082
- return parseQuery(mediaQuery).some(function (query) {
6083
- var inverse = query.inverse;
6084
-
6085
- // Either the parsed or specified `type` is "all", or the types must be
6086
- // equal for a match.
6087
- var typeMatch = query.type === 'all' || values.type === query.type;
6088
-
6089
- // Quit early when `type` doesn't match, but take "not" into account.
6090
- if ((typeMatch && inverse) || !(typeMatch || inverse)) {
6091
- return false;
6092
- }
6093
-
6094
- var expressionsMatch = query.expressions.every(function (expression) {
6095
- var feature = expression.feature,
6096
- modifier = expression.modifier,
6097
- expValue = expression.value,
6098
- value = values[feature];
6099
-
6100
- // Missing or falsy values don't match.
6101
- if (!value) { return false; }
6102
-
6103
- switch (feature) {
6104
- case 'orientation':
6105
- case 'scan':
6106
- return value.toLowerCase() === expValue.toLowerCase();
6107
-
6108
- case 'width':
6109
- case 'height':
6110
- case 'device-width':
6111
- case 'device-height':
6112
- expValue = toPx(expValue);
6113
- value = toPx(value);
6114
- break;
6115
-
6116
- case 'resolution':
6117
- expValue = toDpi(expValue);
6118
- value = toDpi(value);
6119
- break;
6120
-
6121
- case 'aspect-ratio':
6122
- case 'device-aspect-ratio':
6123
- case /* Deprecated */ 'device-pixel-ratio':
6124
- expValue = toDecimal(expValue);
6125
- value = toDecimal(value);
6126
- break;
6127
-
6128
- case 'grid':
6129
- case 'color':
6130
- case 'color-index':
6131
- case 'monochrome':
6132
- expValue = parseInt(expValue, 10) || 1;
6133
- value = parseInt(value, 10) || 0;
6134
- break;
6135
- }
6136
-
6137
- switch (modifier) {
6138
- case 'min': return value >= expValue;
6139
- case 'max': return value <= expValue;
6140
- default : return value === expValue;
6141
- }
6142
- });
6143
-
6144
- return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);
6145
- });
6146
- }
6147
-
6148
- function parseQuery(mediaQuery) {
6149
- return mediaQuery.split(',').map(function (query) {
6150
- query = query.trim();
6151
-
6152
- var captures = query.match(RE_MEDIA_QUERY),
6153
- modifier = captures[1],
6154
- type = captures[2],
6155
- expressions = captures[3] || '',
6156
- parsed = {};
6157
-
6158
- parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
6159
- parsed.type = type ? type.toLowerCase() : 'all';
6160
-
6161
- // Split expressions into a list.
6162
- expressions = expressions.match(/\([^\)]+\)/g) || [];
6163
-
6164
- parsed.expressions = expressions.map(function (expression) {
6165
- var captures = expression.match(RE_MQ_EXPRESSION),
6166
- feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
6167
-
6168
- return {
6169
- modifier: feature[1],
6170
- feature : feature[2],
6171
- value : captures[2]
6172
- };
6173
- });
6174
-
6175
- return parsed;
6176
- });
6177
- }
6178
-
6179
- // -- Utilities ----------------------------------------------------------------
6180
-
6181
- function toDecimal(ratio) {
6182
- var decimal = Number(ratio),
6183
- numbers;
6184
-
6185
- if (!decimal) {
6186
- numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
6187
- decimal = numbers[1] / numbers[2];
6188
- }
6189
-
6190
- return decimal;
6191
- }
6192
-
6193
- function toDpi(resolution) {
6194
- var value = parseFloat(resolution),
6195
- units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
6196
-
6197
- switch (units) {
6198
- case 'dpcm': return value / 2.54;
6199
- case 'dppx': return value * 96;
6200
- default : return value;
6201
- }
6202
- }
6203
-
6204
- function toPx(length) {
6205
- var value = parseFloat(length),
6206
- units = String(length).match(RE_LENGTH_UNIT)[1];
6207
-
6208
- switch (units) {
6209
- case 'em' : return value * 16;
6210
- case 'rem': return value * 16;
6211
- case 'cm' : return value * 96 / 2.54;
6212
- case 'mm' : return value * 96 / 2.54 / 10;
6213
- case 'in' : return value * 96;
6214
- case 'pt' : return value * 72;
6215
- case 'pc' : return value * 72 / 12;
6216
- default : return value;
6217
- }
6218
- }
6219
-
6220
-
6221
- /***/ }),
6222
-
6223
- /***/ "./node_modules/hyphenate-style-name/index.js":
6224
- /*!****************************************************!*\
6225
- !*** ./node_modules/hyphenate-style-name/index.js ***!
6226
- \****************************************************/
6227
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6228
- __webpack_require__.r(__webpack_exports__);
6229
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6230
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
6231
- /* harmony export */ });
6232
- /* eslint-disable no-var, prefer-template */
6233
- var uppercasePattern = /[A-Z]/g;
6234
- var msPattern = /^ms-/;
6235
- var cache = {};
6236
-
6237
- function toHyphenLower(match) {
6238
- return '-' + match.toLowerCase()
6239
- }
6240
-
6241
- function hyphenateStyleName(name) {
6242
- if (cache.hasOwnProperty(name)) {
6243
- return cache[name]
6244
- }
6245
-
6246
- var hName = name.replace(uppercasePattern, toHyphenLower);
6247
- return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)
6248
- }
6249
-
6250
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hyphenateStyleName);
6251
-
6252
-
6253
- /***/ }),
6254
-
6255
- /***/ "./node_modules/matchmediaquery/index.js":
6256
- /*!***********************************************!*\
6257
- !*** ./node_modules/matchmediaquery/index.js ***!
6258
- \***********************************************/
6259
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6260
-
6261
-
6262
- var staticMatch = (__webpack_require__(/*! css-mediaquery */ "./node_modules/css-mediaquery/index.js").match);
6263
- var dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;
6264
-
6265
- // our fake MediaQueryList
6266
- function Mql(query, values, forceStatic){
6267
- var self = this;
6268
- if(dynamicMatch && !forceStatic){
6269
- var mql = dynamicMatch.call(window, query);
6270
- this.matches = mql.matches;
6271
- this.media = mql.media;
6272
- // TODO: is there a time it makes sense to remove this listener?
6273
- mql.addListener(update);
6274
- } else {
6275
- this.matches = staticMatch(query, values);
6276
- this.media = query;
6277
- }
6278
-
6279
- this.addListener = addListener;
6280
- this.removeListener = removeListener;
6281
- this.dispose = dispose;
6282
-
6283
- function addListener(listener){
6284
- if(mql){
6285
- mql.addListener(listener);
6286
- }
6287
- }
6288
-
6289
- function removeListener(listener){
6290
- if(mql){
6291
- mql.removeListener(listener);
6292
- }
6293
- }
6294
-
6295
- // update ourselves!
6296
- function update(evt){
6297
- self.matches = evt.matches;
6298
- self.media = evt.media;
6299
- }
6300
-
6301
- function dispose(){
6302
- if(mql){
6303
- mql.removeListener(update);
6304
- }
6305
- }
6306
- }
6307
-
6308
- function matchMedia(query, values, forceStatic){
6309
- return new Mql(query, values, forceStatic);
6310
- }
6311
-
6312
- module.exports = matchMedia;
6313
-
6314
-
6315
- /***/ }),
6316
-
6317
- /***/ "./node_modules/object-assign/index.js":
6318
- /*!*********************************************!*\
6319
- !*** ./node_modules/object-assign/index.js ***!
6320
- \*********************************************/
6321
- /***/ ((module) => {
6322
- /*
6323
- object-assign
6324
- (c) Sindre Sorhus
6325
- @license MIT
6326
- */
6327
-
6328
-
6329
- /* eslint-disable no-unused-vars */
6330
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
6331
- var hasOwnProperty = Object.prototype.hasOwnProperty;
6332
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
6333
-
6334
- function toObject(val) {
6335
- if (val === null || val === undefined) {
6336
- throw new TypeError('Object.assign cannot be called with null or undefined');
6337
- }
6338
-
6339
- return Object(val);
6340
- }
6341
-
6342
- function shouldUseNative() {
6343
- try {
6344
- if (!Object.assign) {
6345
- return false;
6346
- }
6347
-
6348
- // Detect buggy property enumeration order in older V8 versions.
6349
-
6350
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
6351
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
6352
- test1[5] = 'de';
6353
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
6354
- return false;
6355
- }
6356
-
6357
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
6358
- var test2 = {};
6359
- for (var i = 0; i < 10; i++) {
6360
- test2['_' + String.fromCharCode(i)] = i;
6361
- }
6362
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
6363
- return test2[n];
6364
- });
6365
- if (order2.join('') !== '0123456789') {
6366
- return false;
6367
- }
6368
-
6369
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
6370
- var test3 = {};
6371
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
6372
- test3[letter] = letter;
6373
- });
6374
- if (Object.keys(Object.assign({}, test3)).join('') !==
6375
- 'abcdefghijklmnopqrst') {
6376
- return false;
6377
- }
6378
-
6379
- return true;
6380
- } catch (err) {
6381
- // We don't expect any of the above to throw, but better to be safe.
6382
- return false;
6383
- }
6384
- }
6385
-
6386
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
6387
- var from;
6388
- var to = toObject(target);
6389
- var symbols;
6390
-
6391
- for (var s = 1; s < arguments.length; s++) {
6392
- from = Object(arguments[s]);
6393
-
6394
- for (var key in from) {
6395
- if (hasOwnProperty.call(from, key)) {
6396
- to[key] = from[key];
6397
- }
6398
- }
6399
-
6400
- if (getOwnPropertySymbols) {
6401
- symbols = getOwnPropertySymbols(from);
6402
- for (var i = 0; i < symbols.length; i++) {
6403
- if (propIsEnumerable.call(from, symbols[i])) {
6404
- to[symbols[i]] = from[symbols[i]];
6405
- }
6406
- }
6407
- }
6408
- }
6409
-
6410
- return to;
6411
- };
6412
-
6413
-
6414
- /***/ }),
6415
-
6416
- /***/ "./node_modules/prop-types/checkPropTypes.js":
6417
- /*!***************************************************!*\
6418
- !*** ./node_modules/prop-types/checkPropTypes.js ***!
6419
- \***************************************************/
6420
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6421
- /**
6422
- * Copyright (c) 2013-present, Facebook, Inc.
6423
- *
6424
- * This source code is licensed under the MIT license found in the
6425
- * LICENSE file in the root directory of this source tree.
6426
- */
6427
-
6428
-
6429
-
6430
- var printWarning = function() {};
6431
-
6432
- {
6433
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
6434
- var loggedTypeFailures = {};
6435
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
6436
-
6437
- printWarning = function(text) {
6438
- var message = 'Warning: ' + text;
6439
- if (typeof console !== 'undefined') {
6440
- console.error(message);
6441
- }
6442
- try {
6443
- // --- Welcome to debugging React ---
6444
- // This error was thrown as a convenience so that you can use this stack
6445
- // to find the callsite that caused this warning to fire.
6446
- throw new Error(message);
6447
- } catch (x) { /**/ }
6448
- };
6449
- }
6450
-
6451
- /**
6452
- * Assert that the values match with the type specs.
6453
- * Error messages are memorized and will only be shown once.
6454
- *
6455
- * @param {object} typeSpecs Map of name to a ReactPropType
6456
- * @param {object} values Runtime values that need to be type-checked
6457
- * @param {string} location e.g. "prop", "context", "child context"
6458
- * @param {string} componentName Name of the component for error messages.
6459
- * @param {?Function} getStack Returns the component stack.
6460
- * @private
6461
- */
6462
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
6463
- {
6464
- for (var typeSpecName in typeSpecs) {
6465
- if (has(typeSpecs, typeSpecName)) {
6466
- var error;
6467
- // Prop type validation may throw. In case they do, we don't want to
6468
- // fail the render phase where it didn't fail before. So we log it.
6469
- // After these have been cleaned up, we'll let them throw.
6470
- try {
6471
- // This is intentionally an invariant that gets caught. It's the same
6472
- // behavior as without this statement except with a better message.
6473
- if (typeof typeSpecs[typeSpecName] !== 'function') {
6474
- var err = Error(
6475
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
6476
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
6477
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
6478
- );
6479
- err.name = 'Invariant Violation';
6480
- throw err;
6481
- }
6482
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
6483
- } catch (ex) {
6484
- error = ex;
6485
- }
6486
- if (error && !(error instanceof Error)) {
6487
- printWarning(
6488
- (componentName || 'React class') + ': type specification of ' +
6489
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
6490
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
6491
- 'You may have forgotten to pass an argument to the type checker ' +
6492
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
6493
- 'shape all require an argument).'
6494
- );
6495
- }
6496
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
6497
- // Only monitor this failure once because there tends to be a lot of the
6498
- // same error.
6499
- loggedTypeFailures[error.message] = true;
6500
-
6501
- var stack = getStack ? getStack() : '';
6502
-
6503
- printWarning(
6504
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
6505
- );
6506
- }
6507
- }
6508
- }
6509
- }
6510
- }
6511
-
6512
- /**
6513
- * Resets warning cache when testing.
6514
- *
6515
- * @private
6516
- */
6517
- checkPropTypes.resetWarningCache = function() {
6518
- {
6519
- loggedTypeFailures = {};
6520
- }
6521
- };
6522
-
6523
- module.exports = checkPropTypes;
6524
-
6525
-
6526
- /***/ }),
6527
-
6528
- /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js":
6529
- /*!************************************************************!*\
6530
- !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
6531
- \************************************************************/
6532
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6533
- /**
6534
- * Copyright (c) 2013-present, Facebook, Inc.
6535
- *
6536
- * This source code is licensed under the MIT license found in the
6537
- * LICENSE file in the root directory of this source tree.
6538
- */
6539
-
6540
-
6541
-
6542
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
6543
- var assign = __webpack_require__(/*! object-assign */ "./node_modules/object-assign/index.js");
6544
-
6545
- var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js");
6546
- var has = __webpack_require__(/*! ./lib/has */ "./node_modules/prop-types/lib/has.js");
6547
- var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "./node_modules/prop-types/checkPropTypes.js");
6548
-
6549
- var printWarning = function() {};
6550
-
6551
- {
6552
- printWarning = function(text) {
6553
- var message = 'Warning: ' + text;
6554
- if (typeof console !== 'undefined') {
6555
- console.error(message);
6556
- }
6557
- try {
6558
- // --- Welcome to debugging React ---
6559
- // This error was thrown as a convenience so that you can use this stack
6560
- // to find the callsite that caused this warning to fire.
6561
- throw new Error(message);
6562
- } catch (x) {}
6563
- };
6564
- }
6565
-
6566
- function emptyFunctionThatReturnsNull() {
6567
- return null;
6568
- }
6569
-
6570
- module.exports = function(isValidElement, throwOnDirectAccess) {
6571
- /* global Symbol */
6572
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
6573
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
6574
-
6575
- /**
6576
- * Returns the iterator method function contained on the iterable object.
6577
- *
6578
- * Be sure to invoke the function with the iterable as context:
6579
- *
6580
- * var iteratorFn = getIteratorFn(myIterable);
6581
- * if (iteratorFn) {
6582
- * var iterator = iteratorFn.call(myIterable);
6583
- * ...
6584
- * }
6585
- *
6586
- * @param {?object} maybeIterable
6587
- * @return {?function}
6588
- */
6589
- function getIteratorFn(maybeIterable) {
6590
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
6591
- if (typeof iteratorFn === 'function') {
6592
- return iteratorFn;
6593
- }
6594
- }
6595
-
6596
- /**
6597
- * Collection of methods that allow declaration and validation of props that are
6598
- * supplied to React components. Example usage:
6599
- *
6600
- * var Props = require('ReactPropTypes');
6601
- * var MyArticle = React.createClass({
6602
- * propTypes: {
6603
- * // An optional string prop named "description".
6604
- * description: Props.string,
6605
- *
6606
- * // A required enum prop named "category".
6607
- * category: Props.oneOf(['News','Photos']).isRequired,
6608
- *
6609
- * // A prop named "dialog" that requires an instance of Dialog.
6610
- * dialog: Props.instanceOf(Dialog).isRequired
6611
- * },
6612
- * render: function() { ... }
6613
- * });
6614
- *
6615
- * A more formal specification of how these methods are used:
6616
- *
6617
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
6618
- * decl := ReactPropTypes.{type}(.isRequired)?
6619
- *
6620
- * Each and every declaration produces a function with the same signature. This
6621
- * allows the creation of custom validation functions. For example:
6622
- *
6623
- * var MyLink = React.createClass({
6624
- * propTypes: {
6625
- * // An optional string or URI prop named "href".
6626
- * href: function(props, propName, componentName) {
6627
- * var propValue = props[propName];
6628
- * if (propValue != null && typeof propValue !== 'string' &&
6629
- * !(propValue instanceof URI)) {
6630
- * return new Error(
6631
- * 'Expected a string or an URI for ' + propName + ' in ' +
6632
- * componentName
6633
- * );
6634
- * }
6635
- * }
6636
- * },
6637
- * render: function() {...}
6638
- * });
6639
- *
6640
- * @internal
6641
- */
6642
-
6643
- var ANONYMOUS = '<<anonymous>>';
6644
-
6645
- // Important!
6646
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
6647
- var ReactPropTypes = {
6648
- array: createPrimitiveTypeChecker('array'),
6649
- bigint: createPrimitiveTypeChecker('bigint'),
6650
- bool: createPrimitiveTypeChecker('boolean'),
6651
- func: createPrimitiveTypeChecker('function'),
6652
- number: createPrimitiveTypeChecker('number'),
6653
- object: createPrimitiveTypeChecker('object'),
6654
- string: createPrimitiveTypeChecker('string'),
6655
- symbol: createPrimitiveTypeChecker('symbol'),
6656
-
6657
- any: createAnyTypeChecker(),
6658
- arrayOf: createArrayOfTypeChecker,
6659
- element: createElementTypeChecker(),
6660
- elementType: createElementTypeTypeChecker(),
6661
- instanceOf: createInstanceTypeChecker,
6662
- node: createNodeChecker(),
6663
- objectOf: createObjectOfTypeChecker,
6664
- oneOf: createEnumTypeChecker,
6665
- oneOfType: createUnionTypeChecker,
6666
- shape: createShapeTypeChecker,
6667
- exact: createStrictShapeTypeChecker,
6668
- };
6669
-
6670
- /**
6671
- * inlined Object.is polyfill to avoid requiring consumers ship their own
6672
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
6673
- */
6674
- /*eslint-disable no-self-compare*/
6675
- function is(x, y) {
6676
- // SameValue algorithm
6677
- if (x === y) {
6678
- // Steps 1-5, 7-10
6679
- // Steps 6.b-6.e: +0 != -0
6680
- return x !== 0 || 1 / x === 1 / y;
6681
- } else {
6682
- // Step 6.a: NaN == NaN
6683
- return x !== x && y !== y;
6684
- }
6685
- }
6686
- /*eslint-enable no-self-compare*/
6687
-
6688
- /**
6689
- * We use an Error-like object for backward compatibility as people may call
6690
- * PropTypes directly and inspect their output. However, we don't use real
6691
- * Errors anymore. We don't inspect their stack anyway, and creating them
6692
- * is prohibitively expensive if they are created too often, such as what
6693
- * happens in oneOfType() for any type before the one that matched.
6694
- */
6695
- function PropTypeError(message, data) {
6696
- this.message = message;
6697
- this.data = data && typeof data === 'object' ? data: {};
6698
- this.stack = '';
6699
- }
6700
- // Make `instanceof Error` still work for returned errors.
6701
- PropTypeError.prototype = Error.prototype;
6702
-
6703
- function createChainableTypeChecker(validate) {
6704
- {
6705
- var manualPropTypeCallCache = {};
6706
- var manualPropTypeWarningCount = 0;
6707
- }
6708
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
6709
- componentName = componentName || ANONYMOUS;
6710
- propFullName = propFullName || propName;
6711
-
6712
- if (secret !== ReactPropTypesSecret) {
6713
- if (throwOnDirectAccess) {
6714
- // New behavior only for users of `prop-types` package
6715
- var err = new Error(
6716
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
6717
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
6718
- 'Read more at http://fb.me/use-check-prop-types'
6719
- );
6720
- err.name = 'Invariant Violation';
6721
- throw err;
6722
- } else if ( typeof console !== 'undefined') {
6723
- // Old behavior for people using React.PropTypes
6724
- var cacheKey = componentName + ':' + propName;
6725
- if (
6726
- !manualPropTypeCallCache[cacheKey] &&
6727
- // Avoid spamming the console because they are often not actionable except for lib authors
6728
- manualPropTypeWarningCount < 3
6729
- ) {
6730
- printWarning(
6731
- 'You are manually calling a React.PropTypes validation ' +
6732
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
6733
- 'and will throw in the standalone `prop-types` package. ' +
6734
- 'You may be seeing this warning due to a third-party PropTypes ' +
6735
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
6736
- );
6737
- manualPropTypeCallCache[cacheKey] = true;
6738
- manualPropTypeWarningCount++;
6739
- }
6740
- }
6741
- }
6742
- if (props[propName] == null) {
6743
- if (isRequired) {
6744
- if (props[propName] === null) {
6745
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
6746
- }
6747
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
6748
- }
6749
- return null;
6750
- } else {
6751
- return validate(props, propName, componentName, location, propFullName);
6752
- }
6753
- }
6754
-
6755
- var chainedCheckType = checkType.bind(null, false);
6756
- chainedCheckType.isRequired = checkType.bind(null, true);
6757
-
6758
- return chainedCheckType;
6759
- }
6760
-
6761
- function createPrimitiveTypeChecker(expectedType) {
6762
- function validate(props, propName, componentName, location, propFullName, secret) {
6763
- var propValue = props[propName];
6764
- var propType = getPropType(propValue);
6765
- if (propType !== expectedType) {
6766
- // `propValue` being instance of, say, date/regexp, pass the 'object'
6767
- // check, but we can offer a more precise error message here rather than
6768
- // 'of type `object`'.
6769
- var preciseType = getPreciseType(propValue);
6770
-
6771
- return new PropTypeError(
6772
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
6773
- {expectedType: expectedType}
6774
- );
6775
- }
6776
- return null;
6777
- }
6778
- return createChainableTypeChecker(validate);
6779
- }
6780
-
6781
- function createAnyTypeChecker() {
6782
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
6783
- }
6784
-
6785
- function createArrayOfTypeChecker(typeChecker) {
6786
- function validate(props, propName, componentName, location, propFullName) {
6787
- if (typeof typeChecker !== 'function') {
6788
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
6789
- }
6790
- var propValue = props[propName];
6791
- if (!Array.isArray(propValue)) {
6792
- var propType = getPropType(propValue);
6793
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
6794
- }
6795
- for (var i = 0; i < propValue.length; i++) {
6796
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
6797
- if (error instanceof Error) {
6798
- return error;
6799
- }
6800
- }
6801
- return null;
6802
- }
6803
- return createChainableTypeChecker(validate);
6804
- }
6805
-
6806
- function createElementTypeChecker() {
6807
- function validate(props, propName, componentName, location, propFullName) {
6808
- var propValue = props[propName];
6809
- if (!isValidElement(propValue)) {
6810
- var propType = getPropType(propValue);
6811
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
6812
- }
6813
- return null;
6814
- }
6815
- return createChainableTypeChecker(validate);
6816
- }
6817
-
6818
- function createElementTypeTypeChecker() {
6819
- function validate(props, propName, componentName, location, propFullName) {
6820
- var propValue = props[propName];
6821
- if (!ReactIs.isValidElementType(propValue)) {
6822
- var propType = getPropType(propValue);
6823
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
6824
- }
6825
- return null;
6826
- }
6827
- return createChainableTypeChecker(validate);
6828
- }
6829
-
6830
- function createInstanceTypeChecker(expectedClass) {
6831
- function validate(props, propName, componentName, location, propFullName) {
6832
- if (!(props[propName] instanceof expectedClass)) {
6833
- var expectedClassName = expectedClass.name || ANONYMOUS;
6834
- var actualClassName = getClassName(props[propName]);
6835
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
6836
- }
6837
- return null;
6838
- }
6839
- return createChainableTypeChecker(validate);
6840
- }
6841
-
6842
- function createEnumTypeChecker(expectedValues) {
6843
- if (!Array.isArray(expectedValues)) {
6844
- {
6845
- if (arguments.length > 1) {
6846
- printWarning(
6847
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
6848
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
6849
- );
6850
- } else {
6851
- printWarning('Invalid argument supplied to oneOf, expected an array.');
6852
- }
6853
- }
6854
- return emptyFunctionThatReturnsNull;
6855
- }
6856
-
6857
- function validate(props, propName, componentName, location, propFullName) {
6858
- var propValue = props[propName];
6859
- for (var i = 0; i < expectedValues.length; i++) {
6860
- if (is(propValue, expectedValues[i])) {
6861
- return null;
6862
- }
6863
- }
6864
-
6865
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
6866
- var type = getPreciseType(value);
6867
- if (type === 'symbol') {
6868
- return String(value);
6869
- }
6870
- return value;
6871
- });
6872
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
6873
- }
6874
- return createChainableTypeChecker(validate);
6875
- }
6876
-
6877
- function createObjectOfTypeChecker(typeChecker) {
6878
- function validate(props, propName, componentName, location, propFullName) {
6879
- if (typeof typeChecker !== 'function') {
6880
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
6881
- }
6882
- var propValue = props[propName];
6883
- var propType = getPropType(propValue);
6884
- if (propType !== 'object') {
6885
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
6886
- }
6887
- for (var key in propValue) {
6888
- if (has(propValue, key)) {
6889
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
6890
- if (error instanceof Error) {
6891
- return error;
6892
- }
6893
- }
6894
- }
6895
- return null;
6896
- }
6897
- return createChainableTypeChecker(validate);
6898
- }
6899
-
6900
- function createUnionTypeChecker(arrayOfTypeCheckers) {
6901
- if (!Array.isArray(arrayOfTypeCheckers)) {
6902
- printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') ;
6903
- return emptyFunctionThatReturnsNull;
6904
- }
6905
-
6906
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
6907
- var checker = arrayOfTypeCheckers[i];
6908
- if (typeof checker !== 'function') {
6909
- printWarning(
6910
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
6911
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
6912
- );
6913
- return emptyFunctionThatReturnsNull;
6914
- }
6915
- }
6916
-
6917
- function validate(props, propName, componentName, location, propFullName) {
6918
- var expectedTypes = [];
6919
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
6920
- var checker = arrayOfTypeCheckers[i];
6921
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
6922
- if (checkerResult == null) {
6923
- return null;
6924
- }
6925
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
6926
- expectedTypes.push(checkerResult.data.expectedType);
6927
- }
6928
- }
6929
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
6930
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
6931
- }
6932
- return createChainableTypeChecker(validate);
6933
- }
6934
-
6935
- function createNodeChecker() {
6936
- function validate(props, propName, componentName, location, propFullName) {
6937
- if (!isNode(props[propName])) {
6938
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
6939
- }
6940
- return null;
6941
- }
6942
- return createChainableTypeChecker(validate);
6943
- }
6944
-
6945
- function invalidValidatorError(componentName, location, propFullName, key, type) {
6946
- return new PropTypeError(
6947
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
6948
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
6949
- );
6950
- }
6951
-
6952
- function createShapeTypeChecker(shapeTypes) {
6953
- function validate(props, propName, componentName, location, propFullName) {
6954
- var propValue = props[propName];
6955
- var propType = getPropType(propValue);
6956
- if (propType !== 'object') {
6957
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
6958
- }
6959
- for (var key in shapeTypes) {
6960
- var checker = shapeTypes[key];
6961
- if (typeof checker !== 'function') {
6962
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
6963
- }
6964
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
6965
- if (error) {
6966
- return error;
6967
- }
6968
- }
6969
- return null;
6970
- }
6971
- return createChainableTypeChecker(validate);
6972
- }
6973
-
6974
- function createStrictShapeTypeChecker(shapeTypes) {
6975
- function validate(props, propName, componentName, location, propFullName) {
6976
- var propValue = props[propName];
6977
- var propType = getPropType(propValue);
6978
- if (propType !== 'object') {
6979
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
6980
- }
6981
- // We need to check all keys in case some are required but missing from props.
6982
- var allKeys = assign({}, props[propName], shapeTypes);
6983
- for (var key in allKeys) {
6984
- var checker = shapeTypes[key];
6985
- if (has(shapeTypes, key) && typeof checker !== 'function') {
6986
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
6987
- }
6988
- if (!checker) {
6989
- return new PropTypeError(
6990
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
6991
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
6992
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
6993
- );
6994
- }
6995
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
6996
- if (error) {
6997
- return error;
6998
- }
6999
- }
7000
- return null;
7001
- }
7002
-
7003
- return createChainableTypeChecker(validate);
7004
- }
7005
-
7006
- function isNode(propValue) {
7007
- switch (typeof propValue) {
7008
- case 'number':
7009
- case 'string':
7010
- case 'undefined':
7011
- return true;
7012
- case 'boolean':
7013
- return !propValue;
7014
- case 'object':
7015
- if (Array.isArray(propValue)) {
7016
- return propValue.every(isNode);
7017
- }
7018
- if (propValue === null || isValidElement(propValue)) {
7019
- return true;
7020
- }
7021
-
7022
- var iteratorFn = getIteratorFn(propValue);
7023
- if (iteratorFn) {
7024
- var iterator = iteratorFn.call(propValue);
7025
- var step;
7026
- if (iteratorFn !== propValue.entries) {
7027
- while (!(step = iterator.next()).done) {
7028
- if (!isNode(step.value)) {
7029
- return false;
7030
- }
7031
- }
7032
- } else {
7033
- // Iterator will provide entry [k,v] tuples rather than values.
7034
- while (!(step = iterator.next()).done) {
7035
- var entry = step.value;
7036
- if (entry) {
7037
- if (!isNode(entry[1])) {
7038
- return false;
7039
- }
7040
- }
7041
- }
7042
- }
7043
- } else {
7044
- return false;
7045
- }
7046
-
7047
- return true;
7048
- default:
7049
- return false;
7050
- }
7051
- }
7052
-
7053
- function isSymbol(propType, propValue) {
7054
- // Native Symbol.
7055
- if (propType === 'symbol') {
7056
- return true;
7057
- }
7058
-
7059
- // falsy value can't be a Symbol
7060
- if (!propValue) {
7061
- return false;
7062
- }
7063
-
7064
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
7065
- if (propValue['@@toStringTag'] === 'Symbol') {
7066
- return true;
7067
- }
7068
-
7069
- // Fallback for non-spec compliant Symbols which are polyfilled.
7070
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
7071
- return true;
7072
- }
7073
-
7074
- return false;
7075
- }
7076
-
7077
- // Equivalent of `typeof` but with special handling for array and regexp.
7078
- function getPropType(propValue) {
7079
- var propType = typeof propValue;
7080
- if (Array.isArray(propValue)) {
7081
- return 'array';
7082
- }
7083
- if (propValue instanceof RegExp) {
7084
- // Old webkits (at least until Android 4.0) return 'function' rather than
7085
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
7086
- // passes PropTypes.object.
7087
- return 'object';
7088
- }
7089
- if (isSymbol(propType, propValue)) {
7090
- return 'symbol';
7091
- }
7092
- return propType;
7093
- }
7094
-
7095
- // This handles more types than `getPropType`. Only used for error messages.
7096
- // See `createPrimitiveTypeChecker`.
7097
- function getPreciseType(propValue) {
7098
- if (typeof propValue === 'undefined' || propValue === null) {
7099
- return '' + propValue;
7100
- }
7101
- var propType = getPropType(propValue);
7102
- if (propType === 'object') {
7103
- if (propValue instanceof Date) {
7104
- return 'date';
7105
- } else if (propValue instanceof RegExp) {
7106
- return 'regexp';
7107
- }
7108
- }
7109
- return propType;
7110
- }
7111
-
7112
- // Returns a string that is postfixed to a warning about an invalid type.
7113
- // For example, "undefined" or "of type array"
7114
- function getPostfixForTypeWarning(value) {
7115
- var type = getPreciseType(value);
7116
- switch (type) {
7117
- case 'array':
7118
- case 'object':
7119
- return 'an ' + type;
7120
- case 'boolean':
7121
- case 'date':
7122
- case 'regexp':
7123
- return 'a ' + type;
7124
- default:
7125
- return type;
7126
- }
7127
- }
7128
-
7129
- // Returns class name of the object, if any.
7130
- function getClassName(propValue) {
7131
- if (!propValue.constructor || !propValue.constructor.name) {
7132
- return ANONYMOUS;
7133
- }
7134
- return propValue.constructor.name;
7135
- }
7136
-
7137
- ReactPropTypes.checkPropTypes = checkPropTypes;
7138
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
7139
- ReactPropTypes.PropTypes = ReactPropTypes;
7140
-
7141
- return ReactPropTypes;
7142
- };
7143
-
7144
-
7145
- /***/ }),
7146
-
7147
- /***/ "./node_modules/prop-types/index.js":
7148
- /*!******************************************!*\
7149
- !*** ./node_modules/prop-types/index.js ***!
7150
- \******************************************/
7151
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7152
-
7153
- /**
7154
- * Copyright (c) 2013-present, Facebook, Inc.
7155
- *
7156
- * This source code is licensed under the MIT license found in the
7157
- * LICENSE file in the root directory of this source tree.
7158
- */
7159
-
7160
- {
7161
- var ReactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js");
7162
-
7163
- // By explicitly using `prop-types` you are opting into new development behavior.
7164
- // http://fb.me/prop-types-in-prod
7165
- var throwOnDirectAccess = true;
7166
- module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
7167
- }
7168
-
7169
-
7170
- /***/ }),
7171
-
7172
- /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js":
7173
- /*!*************************************************************!*\
7174
- !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
7175
- \*************************************************************/
7176
- /***/ ((module) => {
7177
- /**
7178
- * Copyright (c) 2013-present, Facebook, Inc.
7179
- *
7180
- * This source code is licensed under the MIT license found in the
7181
- * LICENSE file in the root directory of this source tree.
7182
- */
7183
-
7184
-
7185
-
7186
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
7187
-
7188
- module.exports = ReactPropTypesSecret;
7189
-
7190
-
7191
- /***/ }),
7192
-
7193
- /***/ "./node_modules/prop-types/lib/has.js":
7194
- /*!********************************************!*\
7195
- !*** ./node_modules/prop-types/lib/has.js ***!
7196
- \********************************************/
7197
- /***/ ((module) => {
7198
-
7199
- module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
7200
-
7201
-
7202
- /***/ }),
7203
-
7204
- /***/ "./node_modules/react-is/cjs/react-is.development.js":
7205
- /*!***********************************************************!*\
7206
- !*** ./node_modules/react-is/cjs/react-is.development.js ***!
7207
- \***********************************************************/
7208
- /***/ ((__unused_webpack_module, exports) => {
7209
- /** @license React v16.13.1
7210
- * react-is.development.js
7211
- *
7212
- * Copyright (c) Facebook, Inc. and its affiliates.
7213
- *
7214
- * This source code is licensed under the MIT license found in the
7215
- * LICENSE file in the root directory of this source tree.
7216
- */
7217
-
7218
-
7219
-
7220
-
7221
-
7222
- {
7223
- (function() {
7224
-
7225
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
7226
- // nor polyfill, then a plain number is used for performance.
7227
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
7228
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
7229
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
7230
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
7231
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
7232
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
7233
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
7234
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
7235
- // (unstable) APIs that have been removed. Can we remove the symbols?
7236
-
7237
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
7238
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
7239
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
7240
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
7241
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
7242
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
7243
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
7244
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
7245
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
7246
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
7247
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
7248
-
7249
- function isValidElementType(type) {
7250
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
7251
- 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);
7252
- }
7253
-
7254
- function typeOf(object) {
7255
- if (typeof object === 'object' && object !== null) {
7256
- var $$typeof = object.$$typeof;
7257
-
7258
- switch ($$typeof) {
7259
- case REACT_ELEMENT_TYPE:
7260
- var type = object.type;
7261
-
7262
- switch (type) {
7263
- case REACT_ASYNC_MODE_TYPE:
7264
- case REACT_CONCURRENT_MODE_TYPE:
7265
- case REACT_FRAGMENT_TYPE:
7266
- case REACT_PROFILER_TYPE:
7267
- case REACT_STRICT_MODE_TYPE:
7268
- case REACT_SUSPENSE_TYPE:
7269
- return type;
7270
-
7271
- default:
7272
- var $$typeofType = type && type.$$typeof;
7273
-
7274
- switch ($$typeofType) {
7275
- case REACT_CONTEXT_TYPE:
7276
- case REACT_FORWARD_REF_TYPE:
7277
- case REACT_LAZY_TYPE:
7278
- case REACT_MEMO_TYPE:
7279
- case REACT_PROVIDER_TYPE:
7280
- return $$typeofType;
7281
-
7282
- default:
7283
- return $$typeof;
7284
- }
7285
-
7286
- }
7287
-
7288
- case REACT_PORTAL_TYPE:
7289
- return $$typeof;
7290
- }
7291
- }
7292
-
7293
- return undefined;
7294
- } // AsyncMode is deprecated along with isAsyncMode
7295
-
7296
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
7297
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
7298
- var ContextConsumer = REACT_CONTEXT_TYPE;
7299
- var ContextProvider = REACT_PROVIDER_TYPE;
7300
- var Element = REACT_ELEMENT_TYPE;
7301
- var ForwardRef = REACT_FORWARD_REF_TYPE;
7302
- var Fragment = REACT_FRAGMENT_TYPE;
7303
- var Lazy = REACT_LAZY_TYPE;
7304
- var Memo = REACT_MEMO_TYPE;
7305
- var Portal = REACT_PORTAL_TYPE;
7306
- var Profiler = REACT_PROFILER_TYPE;
7307
- var StrictMode = REACT_STRICT_MODE_TYPE;
7308
- var Suspense = REACT_SUSPENSE_TYPE;
7309
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
7310
-
7311
- function isAsyncMode(object) {
7312
- {
7313
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
7314
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
7315
-
7316
- 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.');
7317
- }
7318
- }
7319
-
7320
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
7321
- }
7322
- function isConcurrentMode(object) {
7323
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
7324
- }
7325
- function isContextConsumer(object) {
7326
- return typeOf(object) === REACT_CONTEXT_TYPE;
7327
- }
7328
- function isContextProvider(object) {
7329
- return typeOf(object) === REACT_PROVIDER_TYPE;
7330
- }
7331
- function isElement(object) {
7332
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
7333
- }
7334
- function isForwardRef(object) {
7335
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
7336
- }
7337
- function isFragment(object) {
7338
- return typeOf(object) === REACT_FRAGMENT_TYPE;
7339
- }
7340
- function isLazy(object) {
7341
- return typeOf(object) === REACT_LAZY_TYPE;
7342
- }
7343
- function isMemo(object) {
7344
- return typeOf(object) === REACT_MEMO_TYPE;
7345
- }
7346
- function isPortal(object) {
7347
- return typeOf(object) === REACT_PORTAL_TYPE;
7348
- }
7349
- function isProfiler(object) {
7350
- return typeOf(object) === REACT_PROFILER_TYPE;
7351
- }
7352
- function isStrictMode(object) {
7353
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
7354
- }
7355
- function isSuspense(object) {
7356
- return typeOf(object) === REACT_SUSPENSE_TYPE;
7357
- }
7358
-
7359
- exports.AsyncMode = AsyncMode;
7360
- exports.ConcurrentMode = ConcurrentMode;
7361
- exports.ContextConsumer = ContextConsumer;
7362
- exports.ContextProvider = ContextProvider;
7363
- exports.Element = Element;
7364
- exports.ForwardRef = ForwardRef;
7365
- exports.Fragment = Fragment;
7366
- exports.Lazy = Lazy;
7367
- exports.Memo = Memo;
7368
- exports.Portal = Portal;
7369
- exports.Profiler = Profiler;
7370
- exports.StrictMode = StrictMode;
7371
- exports.Suspense = Suspense;
7372
- exports.isAsyncMode = isAsyncMode;
7373
- exports.isConcurrentMode = isConcurrentMode;
7374
- exports.isContextConsumer = isContextConsumer;
7375
- exports.isContextProvider = isContextProvider;
7376
- exports.isElement = isElement;
7377
- exports.isForwardRef = isForwardRef;
7378
- exports.isFragment = isFragment;
7379
- exports.isLazy = isLazy;
7380
- exports.isMemo = isMemo;
7381
- exports.isPortal = isPortal;
7382
- exports.isProfiler = isProfiler;
7383
- exports.isStrictMode = isStrictMode;
7384
- exports.isSuspense = isSuspense;
7385
- exports.isValidElementType = isValidElementType;
7386
- exports.typeOf = typeOf;
7387
- })();
7388
- }
7389
-
7390
-
7391
- /***/ }),
7392
-
7393
- /***/ "./node_modules/react-is/index.js":
7394
- /*!****************************************!*\
7395
- !*** ./node_modules/react-is/index.js ***!
7396
- \****************************************/
7397
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7398
-
7399
-
7400
- {
7401
- module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js");
7402
- }
7403
-
7404
-
7405
- /***/ }),
7406
-
7407
- /***/ "./node_modules/shallow-equal/dist/index.esm.js":
7408
- /*!******************************************************!*\
7409
- !*** ./node_modules/shallow-equal/dist/index.esm.js ***!
7410
- \******************************************************/
7411
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7412
- __webpack_require__.r(__webpack_exports__);
7413
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7414
- /* harmony export */ "shallowEqualArrays": () => (/* binding */ shallowEqualArrays),
7415
- /* harmony export */ "shallowEqualObjects": () => (/* binding */ shallowEqualObjects)
7416
- /* harmony export */ });
7417
- function shallowEqualObjects(objA, objB) {
7418
- if (objA === objB) {
7419
- return true;
7420
- }
7421
-
7422
- if (!objA || !objB) {
7423
- return false;
7424
- }
7425
-
7426
- var aKeys = Object.keys(objA);
7427
- var bKeys = Object.keys(objB);
7428
- var len = aKeys.length;
7429
-
7430
- if (bKeys.length !== len) {
7431
- return false;
7432
- }
7433
-
7434
- for (var i = 0; i < len; i++) {
7435
- var key = aKeys[i];
7436
-
7437
- if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
7438
- return false;
7439
- }
7440
- }
7441
-
7442
- return true;
7443
- }
7444
-
7445
- function shallowEqualArrays(arrA, arrB) {
7446
- if (arrA === arrB) {
7447
- return true;
7448
- }
7449
-
7450
- if (!arrA || !arrB) {
7451
- return false;
7452
- }
7453
-
7454
- var len = arrA.length;
7455
-
7456
- if (arrB.length !== len) {
7457
- return false;
7458
- }
7459
-
7460
- for (var i = 0; i < len; i++) {
7461
- if (arrA[i] !== arrB[i]) {
7462
- return false;
7463
- }
7464
- }
7465
-
7466
- return true;
7467
- }
7468
-
7469
-
7470
-
7471
-
7472
- /***/ }),
7473
-
7474
- /***/ "./src/Component.ts":
7475
- /*!**************************!*\
7476
- !*** ./src/Component.ts ***!
7477
- \**************************/
7478
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7479
-
7480
- var __rest = (this && this.__rest) || function (s, e) {
7481
- var t = {};
7482
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7483
- t[p] = s[p];
7484
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7485
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7486
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7487
- t[p[i]] = s[p[i]];
7488
- }
7489
- return t;
7490
- };
7491
- var __importDefault = (this && this.__importDefault) || function (mod) {
7492
- return (mod && mod.__esModule) ? mod : { "default": mod };
7493
- };
7494
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7495
- var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
7496
- // ReactNode and ReactElement typings are a little funky for functional components, so the ReactElement cast is needed on the return
7497
- var MediaQuery = function (_a) {
7498
- var children = _a.children, device = _a.device, onChange = _a.onChange, settings = __rest(_a, ["children", "device", "onChange"]);
7499
- var matches = (0, useMediaQuery_1.default)(settings, device, onChange);
7500
- if (typeof children === 'function') {
7501
- return children(matches);
7502
- }
7503
- return matches ? children : null;
7504
- };
7505
- exports["default"] = MediaQuery;
7506
-
7507
-
7508
- /***/ }),
7509
-
7510
- /***/ "./src/Context.ts":
7511
- /*!************************!*\
7512
- !*** ./src/Context.ts ***!
7513
- \************************/
7514
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
7515
-
7516
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7517
- var react_1 = __webpack_require__(/*! react */ "react");
7518
- var Context = (0, react_1.createContext)(undefined);
7519
- exports["default"] = Context;
7520
-
7521
-
7522
- /***/ }),
7523
-
7524
- /***/ "./src/index.ts":
7525
- /*!**********************!*\
7526
- !*** ./src/index.ts ***!
7527
- \**********************/
7528
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7529
-
7530
- var __importDefault = (this && this.__importDefault) || function (mod) {
7531
- return (mod && mod.__esModule) ? mod : { "default": mod };
7532
- };
7533
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7534
- exports.Context = exports.toQuery = exports.useMediaQuery = exports["default"] = void 0;
7535
- var useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ "./src/useMediaQuery.ts"));
7536
- exports.useMediaQuery = useMediaQuery_1.default;
7537
- var Component_1 = __importDefault(__webpack_require__(/*! ./Component */ "./src/Component.ts"));
7538
- exports["default"] = Component_1.default;
7539
- var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
7540
- exports.toQuery = toQuery_1.default;
7541
- var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
7542
- exports.Context = Context_1.default;
7543
-
7544
-
7545
- /***/ }),
7546
-
7547
- /***/ "./src/mediaQuery.ts":
7548
- /*!***************************!*\
7549
- !*** ./src/mediaQuery.ts ***!
7550
- \***************************/
7551
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7552
-
7553
- var __assign = (this && this.__assign) || function () {
7554
- __assign = Object.assign || function(t) {
7555
- for (var s, i = 1, n = arguments.length; i < n; i++) {
7556
- s = arguments[i];
7557
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7558
- t[p] = s[p];
7559
- }
7560
- return t;
7561
- };
7562
- return __assign.apply(this, arguments);
7563
- };
7564
- var __rest = (this && this.__rest) || function (s, e) {
7565
- var t = {};
7566
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7567
- t[p] = s[p];
7568
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7569
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7570
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7571
- t[p[i]] = s[p[i]];
7572
- }
7573
- return t;
7574
- };
7575
- var __importDefault = (this && this.__importDefault) || function (mod) {
7576
- return (mod && mod.__esModule) ? mod : { "default": mod };
7577
- };
7578
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7579
- var prop_types_1 = __importDefault(__webpack_require__(/*! prop-types */ "./node_modules/prop-types/index.js"));
7580
- var stringOrNumber = prop_types_1.default.oneOfType([
7581
- prop_types_1.default.string,
7582
- prop_types_1.default.number
7583
- ]);
7584
- // media types
7585
- var types = {
7586
- all: prop_types_1.default.bool,
7587
- grid: prop_types_1.default.bool,
7588
- aural: prop_types_1.default.bool,
7589
- braille: prop_types_1.default.bool,
7590
- handheld: prop_types_1.default.bool,
7591
- print: prop_types_1.default.bool,
7592
- projection: prop_types_1.default.bool,
7593
- screen: prop_types_1.default.bool,
7594
- tty: prop_types_1.default.bool,
7595
- tv: prop_types_1.default.bool,
7596
- embossed: prop_types_1.default.bool
7597
- };
7598
- // properties that match media queries
7599
- var matchers = {
7600
- orientation: prop_types_1.default.oneOf([
7601
- 'portrait',
7602
- 'landscape'
7603
- ]),
7604
- scan: prop_types_1.default.oneOf([
7605
- 'progressive',
7606
- 'interlace'
7607
- ]),
7608
- aspectRatio: prop_types_1.default.string,
7609
- deviceAspectRatio: prop_types_1.default.string,
7610
- height: stringOrNumber,
7611
- deviceHeight: stringOrNumber,
7612
- width: stringOrNumber,
7613
- deviceWidth: stringOrNumber,
7614
- color: prop_types_1.default.bool,
7615
- colorIndex: prop_types_1.default.bool,
7616
- monochrome: prop_types_1.default.bool,
7617
- resolution: stringOrNumber,
7618
- type: Object.keys(types)
7619
- };
7620
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
7621
- matchers.type; var featureMatchers = __rest(matchers
7622
- // media features
7623
- , ["type"]);
7624
- // media features
7625
- 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);
7626
- var all = __assign(__assign({}, types), features);
7627
- exports["default"] = {
7628
- all: all,
7629
- types: types,
7630
- matchers: matchers,
7631
- features: features
7632
- };
7633
-
7634
-
7635
- /***/ }),
7636
-
7637
- /***/ "./src/toQuery.ts":
7638
- /*!************************!*\
7639
- !*** ./src/toQuery.ts ***!
7640
- \************************/
7641
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7642
-
7643
- var __importDefault = (this && this.__importDefault) || function (mod) {
7644
- return (mod && mod.__esModule) ? mod : { "default": mod };
7645
- };
7646
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7647
- var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
7648
- var mediaQuery_1 = __importDefault(__webpack_require__(/*! ./mediaQuery */ "./src/mediaQuery.ts"));
7649
- var negate = function (cond) { return "not ".concat(cond); };
7650
- var keyVal = function (k, v) {
7651
- var realKey = (0, hyphenate_style_name_1.default)(k);
7652
- // px shorthand
7653
- if (typeof v === 'number') {
7654
- v = "".concat(v, "px");
7655
- }
7656
- if (v === true) {
7657
- return realKey;
7658
- }
7659
- if (v === false) {
7660
- return negate(realKey);
7661
- }
7662
- return "(".concat(realKey, ": ").concat(v, ")");
7663
- };
7664
- var join = function (conds) { return conds.join(' and '); };
7665
- var toQuery = function (obj) {
7666
- var rules = [];
7667
- Object.keys(mediaQuery_1.default.all).forEach(function (k) {
7668
- var v = obj[k];
7669
- if (v != null) {
7670
- rules.push(keyVal(k, v));
7671
- }
7672
- });
7673
- return join(rules);
7674
- };
7675
- exports["default"] = toQuery;
7676
-
7677
-
7678
- /***/ }),
7679
-
7680
- /***/ "./src/useMediaQuery.ts":
7681
- /*!******************************!*\
7682
- !*** ./src/useMediaQuery.ts ***!
7683
- \******************************/
7684
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
7685
-
7686
- var __importDefault = (this && this.__importDefault) || function (mod) {
7687
- return (mod && mod.__esModule) ? mod : { "default": mod };
7688
- };
7689
- Object.defineProperty(exports, "__esModule", ({ value: true }));
7690
- var react_1 = __webpack_require__(/*! react */ "react");
7691
- var matchmediaquery_1 = __importDefault(__webpack_require__(/*! matchmediaquery */ "./node_modules/matchmediaquery/index.js"));
7692
- var hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ "./node_modules/hyphenate-style-name/index.js"));
7693
- var shallow_equal_1 = __webpack_require__(/*! shallow-equal */ "./node_modules/shallow-equal/dist/index.esm.js");
7694
- var toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ "./src/toQuery.ts"));
7695
- var Context_1 = __importDefault(__webpack_require__(/*! ./Context */ "./src/Context.ts"));
7696
- var makeQuery = function (settings) { return settings.query || (0, toQuery_1.default)(settings); };
7697
- var hyphenateKeys = function (obj) {
7698
- if (!obj)
7699
- return undefined;
7700
- var keys = Object.keys(obj);
7701
- return keys.reduce(function (result, key) {
7702
- result[(0, hyphenate_style_name_1.default)(key)] = obj[key];
7703
- return result;
7704
- }, {});
7705
- };
7706
- var useIsUpdate = function () {
7707
- var ref = (0, react_1.useRef)(false);
7708
- (0, react_1.useEffect)(function () {
7709
- ref.current = true;
7710
- }, []);
7711
- return ref.current;
7712
- };
7713
- var useDevice = function (deviceFromProps) {
7714
- var deviceFromContext = (0, react_1.useContext)(Context_1.default);
7715
- var getDevice = function () {
7716
- return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
7717
- };
7718
- var _a = (0, react_1.useState)(getDevice), device = _a[0], setDevice = _a[1];
7719
- (0, react_1.useEffect)(function () {
7720
- var newDevice = getDevice();
7721
- if (!(0, shallow_equal_1.shallowEqualObjects)(device, newDevice)) {
7722
- setDevice(newDevice);
7723
- }
7724
- }, [deviceFromProps, deviceFromContext]);
7725
- return device;
7726
- };
7727
- var useQuery = function (settings) {
7728
- var getQuery = function () { return makeQuery(settings); };
7729
- var _a = (0, react_1.useState)(getQuery), query = _a[0], setQuery = _a[1];
7730
- (0, react_1.useEffect)(function () {
7731
- var newQuery = getQuery();
7732
- if (query !== newQuery) {
7733
- setQuery(newQuery);
7734
- }
7735
- }, [settings]);
7736
- return query;
7737
- };
7738
- var useMatchMedia = function (query, device) {
7739
- var getMatchMedia = function () { return (0, matchmediaquery_1.default)(query, device || {}, !!device); };
7740
- var _a = (0, react_1.useState)(getMatchMedia), mq = _a[0], setMq = _a[1];
7741
- var isUpdate = useIsUpdate();
7742
- (0, react_1.useEffect)(function () {
7743
- if (isUpdate) {
7744
- // skip on mounting, it has already been set
7745
- var newMq_1 = getMatchMedia();
7746
- setMq(newMq_1);
7747
- return function () {
7748
- if (newMq_1) {
7749
- newMq_1.dispose();
7750
- }
7751
- };
7752
- }
7753
- }, [query, device]);
7754
- return mq;
7755
- };
7756
- var useMatches = function (mediaQuery) {
7757
- var _a = (0, react_1.useState)(mediaQuery.matches), matches = _a[0], setMatches = _a[1];
7758
- (0, react_1.useEffect)(function () {
7759
- var updateMatches = function (ev) {
7760
- setMatches(ev.matches);
7761
- };
7762
- mediaQuery.addListener(updateMatches);
7763
- setMatches(mediaQuery.matches);
7764
- return function () {
7765
- mediaQuery.removeListener(updateMatches);
7766
- };
7767
- }, [mediaQuery]);
7768
- return matches;
7769
- };
7770
- var useMediaQuery = function (settings, device, onChange) {
7771
- var deviceSettings = useDevice(device);
7772
- var query = useQuery(settings);
7773
- if (!query)
7774
- throw new Error('Invalid or missing MediaQuery!');
7775
- var mq = useMatchMedia(query, deviceSettings);
7776
- var matches = useMatches(mq);
7777
- var isUpdate = useIsUpdate();
7778
- (0, react_1.useEffect)(function () {
7779
- if (isUpdate && onChange) {
7780
- onChange(matches);
7781
- }
7782
- }, [matches]);
7783
- (0, react_1.useEffect)(function () { return function () {
7784
- if (mq) {
7785
- mq.dispose();
7786
- }
7787
- }; }, []);
7788
- return matches;
7789
- };
7790
- exports["default"] = useMediaQuery;
7791
-
7792
-
7793
- /***/ }),
7794
-
7795
- /***/ "react":
7796
- /*!**************************************************************************************!*\
7797
- !*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
7798
- \**************************************************************************************/
7799
- /***/ ((module) => {
7800
- module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
7801
-
7802
- /***/ })
7803
-
7804
- /******/ });
7805
- /************************************************************************/
7806
- /******/ // The module cache
7807
- /******/ var __webpack_module_cache__ = {};
7808
- /******/
7809
- /******/ // The require function
7810
- /******/ function __webpack_require__(moduleId) {
7811
- /******/ // Check if module is in cache
7812
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
7813
- /******/ if (cachedModule !== undefined) {
7814
- /******/ return cachedModule.exports;
7815
- /******/ }
7816
- /******/ // Create a new module (and put it into the cache)
7817
- /******/ var module = __webpack_module_cache__[moduleId] = {
7818
- /******/ // no module.id needed
7819
- /******/ // no module.loaded needed
7820
- /******/ exports: {}
7821
- /******/ };
7822
- /******/
7823
- /******/ // Execute the module function
7824
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
7825
- /******/
7826
- /******/ // Return the exports of the module
7827
- /******/ return module.exports;
7828
- /******/ }
7829
- /******/
7830
- /************************************************************************/
7831
- /******/ /* webpack/runtime/define property getters */
7832
- /******/ (() => {
7833
- /******/ // define getter functions for harmony exports
7834
- /******/ __webpack_require__.d = (exports, definition) => {
7835
- /******/ for(var key in definition) {
7836
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
7837
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
7838
- /******/ }
7839
- /******/ }
7840
- /******/ };
7841
- /******/ })();
7842
- /******/
7843
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
7844
- /******/ (() => {
7845
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
7846
- /******/ })();
7847
- /******/
7848
- /******/ /* webpack/runtime/make namespace object */
7849
- /******/ (() => {
7850
- /******/ // define __esModule on exports
7851
- /******/ __webpack_require__.r = (exports) => {
7852
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
7853
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7854
- /******/ }
7855
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
7856
- /******/ };
7857
- /******/ })();
7858
- /******/
7859
- /************************************************************************/
7860
- /******/
7861
- /******/ // startup
7862
- /******/ // Load entry module and return exports
7863
- /******/ // This entry module is referenced by other modules so it can't be inlined
7864
- /******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
7865
- /******/
7866
- /******/ return __webpack_exports__;
7867
- /******/ })()
7868
- ;
7869
- });
7870
-
7871
- } (reactResponsive));
7872
-
7873
- var reactResponsiveExports = reactResponsive.exports;
7874
-
7875
5969
  var css_248z$5 = ".rdp {\n --rdp-cell-size: 40px;\n --rdp-caption-font-size: 18px;\n --rdp-accent-color: #0000ff;\n --rdp-background-color: #e7edff;\n --rdp-accent-color-dark: #3003e1;\n --rdp-background-color-dark: #180270;\n --rdp-outline: 2px solid var(--rdp-accent-color); /* Outline border for focused elements */\n --rdp-outline-selected: 3px solid var(--rdp-accent-color); /* Outline border for focused _and_ selected elements */\n\n margin: 1em;\n}\n\n/* Hide elements for devices that are not screen readers */\n.rdp-vhidden {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n background: transparent;\n border: 0;\n -moz-appearance: none;\n -webkit-appearance: none;\n appearance: none;\n position: absolute !important;\n top: 0;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n border: 0 !important;\n}\n\n/* Buttons */\n.rdp-button_reset {\n appearance: none;\n position: relative;\n margin: 0;\n padding: 0;\n cursor: default;\n color: inherit;\n background: none;\n font: inherit;\n\n -moz-appearance: none;\n -webkit-appearance: none;\n}\n\n.rdp-button_reset:focus-visible {\n /* Make sure to reset outline only when :focus-visible is supported */\n outline: none;\n}\n\n.rdp-button {\n border: 2px solid transparent;\n}\n\n.rdp-button[disabled]:not(.rdp-day_selected) {\n opacity: 0.25;\n}\n\n.rdp-button:not([disabled]) {\n cursor: pointer;\n}\n\n.rdp-button:focus-visible:not([disabled]) {\n color: inherit;\n background-color: var(--rdp-background-color);\n border: var(--rdp-outline);\n}\n\n.rdp-button:hover:not([disabled]):not(.rdp-day_selected) {\n background-color: var(--rdp-background-color);\n}\n\n.rdp-months {\n display: flex;\n}\n\n.rdp-month {\n margin: 0 1em;\n}\n\n.rdp-month:first-child {\n margin-left: 0;\n}\n\n.rdp-month:last-child {\n margin-right: 0;\n}\n\n.rdp-table {\n margin: 0;\n max-width: calc(var(--rdp-cell-size) * 7);\n border-collapse: collapse;\n}\n\n.rdp-with_weeknumber .rdp-table {\n max-width: calc(var(--rdp-cell-size) * 8);\n border-collapse: collapse;\n}\n\n.rdp-caption {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n text-align: left;\n}\n\n.rdp-multiple_months .rdp-caption {\n position: relative;\n display: block;\n text-align: center;\n}\n\n.rdp-caption_dropdowns {\n position: relative;\n display: inline-flex;\n}\n\n.rdp-caption_label {\n position: relative;\n z-index: 1;\n display: inline-flex;\n align-items: center;\n margin: 0;\n padding: 0 0.25em;\n white-space: nowrap;\n color: currentColor;\n border: 0;\n border: 2px solid transparent;\n font-family: inherit;\n font-size: var(--rdp-caption-font-size);\n font-weight: bold;\n}\n\n.rdp-nav {\n white-space: nowrap;\n}\n\n.rdp-multiple_months .rdp-caption_start .rdp-nav {\n position: absolute;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n}\n\n.rdp-multiple_months .rdp-caption_end .rdp-nav {\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n}\n\n.rdp-nav_button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--rdp-cell-size);\n height: var(--rdp-cell-size);\n padding: 0.25em;\n border-radius: 100%;\n}\n\n/* ---------- */\n/* Dropdowns */\n/* ---------- */\n\n.rdp-dropdown_year,\n.rdp-dropdown_month {\n position: relative;\n display: inline-flex;\n align-items: center;\n}\n\n.rdp-dropdown {\n appearance: none;\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n margin: 0;\n padding: 0;\n cursor: inherit;\n opacity: 0;\n border: none;\n background-color: transparent;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n.rdp-dropdown[disabled] {\n opacity: unset;\n color: unset;\n}\n\n.rdp-dropdown:focus-visible:not([disabled]) + .rdp-caption_label {\n background-color: var(--rdp-background-color);\n border: var(--rdp-outline);\n border-radius: 6px;\n}\n\n.rdp-dropdown_icon {\n margin: 0 0 0 5px;\n}\n\n.rdp-head {\n border: 0;\n}\n\n.rdp-head_row,\n.rdp-row {\n height: 100%;\n}\n\n.rdp-head_cell {\n vertical-align: middle;\n font-size: 0.75em;\n font-weight: 700;\n text-align: center;\n height: 100%;\n height: var(--rdp-cell-size);\n padding: 0;\n text-transform: uppercase;\n}\n\n.rdp-tbody {\n border: 0;\n}\n\n.rdp-tfoot {\n margin: 0.5em;\n}\n\n.rdp-cell {\n width: var(--rdp-cell-size);\n height: 100%;\n height: var(--rdp-cell-size);\n padding: 0;\n text-align: center;\n}\n\n.rdp-weeknumber {\n font-size: 0.75em;\n}\n\n.rdp-weeknumber,\n.rdp-day {\n display: flex;\n overflow: hidden;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: var(--rdp-cell-size);\n max-width: var(--rdp-cell-size);\n height: var(--rdp-cell-size);\n margin: 0;\n border: 2px solid transparent;\n border-radius: 100%;\n}\n\n.rdp-day_today:not(.rdp-day_outside) {\n font-weight: bold;\n}\n\n.rdp-day_selected,\n.rdp-day_selected:focus-visible,\n.rdp-day_selected:hover {\n color: white;\n opacity: 1;\n background-color: var(--rdp-accent-color);\n}\n\n.rdp-day_outside {\n opacity: 0.5;\n}\n\n.rdp-day_selected:focus-visible {\n /* Since the background is the same use again the outline */\n outline: var(--rdp-outline);\n outline-offset: 2px;\n z-index: 1;\n}\n\n.rdp:not([dir='rtl']) .rdp-day_range_start:not(.rdp-day_range_end) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.rdp:not([dir='rtl']) .rdp-day_range_end:not(.rdp-day_range_start) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.rdp[dir='rtl'] .rdp-day_range_start:not(.rdp-day_range_end) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n\n.rdp[dir='rtl'] .rdp-day_range_end:not(.rdp-day_range_start) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n\n.rdp-day_range_end.rdp-day_range_start {\n border-radius: 100%;\n}\n\n.rdp-day_range_middle {\n border-radius: 0;\n}";
7876
5970
  styleInject(css_248z$5);
7877
5971
 
@@ -7882,7 +5976,7 @@ var currentMonth = new Date();
7882
5976
  function Calendar(_a) {
7883
5977
  var calendarRange = _a.calendarRange, setCalendarRange = _a.setCalendarRange;
7884
5978
  var t = useTranslation('filterBar').t;
7885
- var isTablet = reactResponsiveExports.useMediaQuery({ maxWidth: 1024 });
5979
+ //const isTablet = useMediaQuery({ maxWidth: 1024 })
7886
5980
  var defaultCalendarSelected = {
7887
5981
  from: currentMonth,
7888
5982
  to: addDays(currentMonth, 0),
@@ -7895,7 +5989,9 @@ function Calendar(_a) {
7895
5989
  React__default.createElement("div", { className: "will-calendar-filter-header" },
7896
5990
  React__default.createElement("h3", { className: "will-calendar-filter-title" }, t('calendar.title'))),
7897
5991
  React__default.createElement("div", { className: "will-calendar-filter-container" },
7898
- React__default.createElement(DayPicker, { id: "will-calendar", mode: "range", showOutsideDays: true, fixedWeeks: true, numberOfMonths: !isTablet ? 2 : 1, weekStartsOn: 1, max: 31, defaultMonth: currentMonth, selected: calendarRange, onSelect: setCalendarRange }))));
5992
+ React__default.createElement(DayPicker, { id: "will-calendar", mode: "range", showOutsideDays: true, fixedWeeks: true,
5993
+ //numberOfMonths={!isTablet ? 2 : 1}
5994
+ numberOfMonths: 2, weekStartsOn: 1, max: 31, defaultMonth: currentMonth, selected: calendarRange, onSelect: setCalendarRange }))));
7899
5995
  }
7900
5996
 
7901
5997
  var css_248z$3 = ".will-filter-bar-guests {\n text-align: initial;\n}\n\n.will-guests-filter-title {\n font-size: 16px;\n text-transform: uppercase;\n margin: 10px 0;\n}\n\n.will-guests-filter-subtitle {\n font-size: 15px;\n font-weight: 500;\n color:var(--will-text)\n}\n\n\n.will-guests-filter-label, .will-guests-filter-count {\n font-size: 18px;\n color: var(--will-text)\n}\n\n.will-guests-filter-container {\n display: flex;\n margin-top: 30px;\n}\n\n.will-guests-filter-inner {\n display: flex;\n align-items: center;\n}\n\n.will-guests-filter-inner:not(:last-child) {\n margin-right: 50px;\n}\n\n.will-guests-filter-label {\n display: block;\n margin-right: 20px;\n font-weight: bold;\n}\n\n.will-guests-filter-inner > div {\n display: flex;\n align-items: center;\n}\n\n.will-guests-filter-count {\n margin: 0 15px;\n}\n\n.will-guests-filter-button {\n border-radius: 50%;\n border: none;\n background-color: var(--will-onahau);\n width: 25px;\n height: 25px;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 20px;\n cursor: pointer;\n}";