@alma/widgets 2.7.1 → 2.8.4
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/dist/raw/widgets.css +6 -2
- package/dist/raw/widgets.js +184 -121
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +184 -121
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +179 -118
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +2626 -1081
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/PaymentPlans/__tests__/Monochrome.test.d.ts +1 -0
- package/dist/types/Widgets/PaymentPlans/index.d.ts +1 -0
- package/dist/types/assets/Logo.d.ts +3 -2
- package/dist/types/hooks/useButtonAnimation.d.ts +2 -1
- package/dist/types/types.d.ts +5 -4
- package/dist/widgets.css +1 -1
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +1 -2
package/dist/raw/widgets.umd.js
CHANGED
|
@@ -34,13 +34,21 @@
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
var ceil = Math.ceil;
|
|
37
|
-
var floor = Math.floor; // `
|
|
37
|
+
var floor = Math.floor; // `Math.trunc` method
|
|
38
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
39
|
+
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
40
|
+
|
|
41
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
42
|
+
var n = +x;
|
|
43
|
+
return (n > 0 ? floor : ceil)(n);
|
|
44
|
+
};
|
|
45
|
+
|
|
38
46
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
39
47
|
|
|
40
48
|
var toIntegerOrInfinity = function (argument) {
|
|
41
|
-
var number = +argument; // eslint-disable-next-line no-self-compare --
|
|
49
|
+
var number = +argument; // eslint-disable-next-line no-self-compare -- NaN check
|
|
42
50
|
|
|
43
|
-
return number !== number || number === 0 ? 0 : (number
|
|
51
|
+
return number !== number || number === 0 ? 0 : mathTrunc(number);
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -77,7 +85,7 @@
|
|
|
77
85
|
|
|
78
86
|
var defineProperty = Object.defineProperty;
|
|
79
87
|
|
|
80
|
-
var
|
|
88
|
+
var defineGlobalProperty = function (key, value) {
|
|
81
89
|
try {
|
|
82
90
|
defineProperty(global_1, key, {
|
|
83
91
|
value: value,
|
|
@@ -92,34 +100,34 @@
|
|
|
92
100
|
};
|
|
93
101
|
|
|
94
102
|
var SHARED = '__core-js_shared__';
|
|
95
|
-
var store = global_1[SHARED] ||
|
|
103
|
+
var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
96
104
|
var sharedStore = store;
|
|
97
105
|
|
|
98
106
|
var shared = createCommonjsModule(function (module) {
|
|
99
107
|
(module.exports = function (key, value) {
|
|
100
108
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
101
109
|
})('versions', []).push({
|
|
102
|
-
version: '3.22.
|
|
110
|
+
version: '3.22.8',
|
|
103
111
|
mode: 'global',
|
|
104
112
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
105
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.22.
|
|
113
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
|
|
106
114
|
source: 'https://github.com/zloirock/core-js'
|
|
107
115
|
});
|
|
108
116
|
});
|
|
109
117
|
|
|
110
|
-
var TypeError
|
|
118
|
+
var $TypeError = TypeError; // `RequireObjectCoercible` abstract operation
|
|
111
119
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
112
120
|
|
|
113
121
|
var requireObjectCoercible = function (it) {
|
|
114
|
-
if (it == undefined) throw TypeError
|
|
122
|
+
if (it == undefined) throw $TypeError("Can't call method on " + it);
|
|
115
123
|
return it;
|
|
116
124
|
};
|
|
117
125
|
|
|
118
|
-
var Object
|
|
126
|
+
var $Object = Object; // `ToObject` abstract operation
|
|
119
127
|
// https://tc39.es/ecma262/#sec-toobject
|
|
120
128
|
|
|
121
129
|
var toObject = function (argument) {
|
|
122
|
-
return Object
|
|
130
|
+
return $Object(requireObjectCoercible(argument));
|
|
123
131
|
};
|
|
124
132
|
|
|
125
133
|
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
@@ -229,7 +237,7 @@
|
|
|
229
237
|
};
|
|
230
238
|
|
|
231
239
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
232
|
-
var Object$
|
|
240
|
+
var $Object$1 = Object; // ES3 wrong here
|
|
233
241
|
|
|
234
242
|
var CORRECT_ARGUMENTS = classofRaw(function () {
|
|
235
243
|
return arguments;
|
|
@@ -247,16 +255,16 @@
|
|
|
247
255
|
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
248
256
|
var O, tag, result;
|
|
249
257
|
return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
|
|
250
|
-
: typeof (tag = tryGet(O = Object$
|
|
258
|
+
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
|
|
251
259
|
: CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
|
|
252
260
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
253
261
|
};
|
|
254
262
|
|
|
255
|
-
var String
|
|
263
|
+
var $String = String;
|
|
256
264
|
|
|
257
265
|
var toString_1 = function (argument) {
|
|
258
266
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
259
|
-
return String
|
|
267
|
+
return $String(argument);
|
|
260
268
|
};
|
|
261
269
|
|
|
262
270
|
var charAt = functionUncurryThis(''.charAt);
|
|
@@ -339,12 +347,12 @@
|
|
|
339
347
|
}).prototype != 42;
|
|
340
348
|
});
|
|
341
349
|
|
|
342
|
-
var String$
|
|
343
|
-
var TypeError$
|
|
350
|
+
var $String$1 = String;
|
|
351
|
+
var $TypeError$1 = TypeError; // `Assert: Type(argument) is Object`
|
|
344
352
|
|
|
345
353
|
var anObject = function (argument) {
|
|
346
354
|
if (isObject(argument)) return argument;
|
|
347
|
-
throw TypeError$
|
|
355
|
+
throw $TypeError$1($String$1(argument) + ' is not an object');
|
|
348
356
|
};
|
|
349
357
|
|
|
350
358
|
var call$1 = Function.prototype.call;
|
|
@@ -354,29 +362,29 @@
|
|
|
354
362
|
|
|
355
363
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
356
364
|
|
|
357
|
-
var Object$
|
|
365
|
+
var $Object$2 = Object;
|
|
358
366
|
var isSymbol = useSymbolAsUid ? function (it) {
|
|
359
367
|
return typeof it == 'symbol';
|
|
360
368
|
} : function (it) {
|
|
361
369
|
var $Symbol = getBuiltIn('Symbol');
|
|
362
|
-
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$
|
|
370
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$2(it));
|
|
363
371
|
};
|
|
364
372
|
|
|
365
|
-
var String$
|
|
373
|
+
var $String$2 = String;
|
|
366
374
|
|
|
367
375
|
var tryToString = function (argument) {
|
|
368
376
|
try {
|
|
369
|
-
return String$
|
|
377
|
+
return $String$2(argument);
|
|
370
378
|
} catch (error) {
|
|
371
379
|
return 'Object';
|
|
372
380
|
}
|
|
373
381
|
};
|
|
374
382
|
|
|
375
|
-
var TypeError$
|
|
383
|
+
var $TypeError$2 = TypeError; // `Assert: IsCallable(argument) is true`
|
|
376
384
|
|
|
377
385
|
var aCallable = function (argument) {
|
|
378
386
|
if (isCallable(argument)) return argument;
|
|
379
|
-
throw TypeError$
|
|
387
|
+
throw $TypeError$2(tryToString(argument) + ' is not a function');
|
|
380
388
|
};
|
|
381
389
|
|
|
382
390
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
@@ -386,7 +394,7 @@
|
|
|
386
394
|
return func == null ? undefined : aCallable(func);
|
|
387
395
|
};
|
|
388
396
|
|
|
389
|
-
var TypeError$
|
|
397
|
+
var $TypeError$3 = TypeError; // `OrdinaryToPrimitive` abstract operation
|
|
390
398
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
391
399
|
|
|
392
400
|
var ordinaryToPrimitive = function (input, pref) {
|
|
@@ -394,10 +402,10 @@
|
|
|
394
402
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
395
403
|
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
396
404
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
397
|
-
throw TypeError$
|
|
405
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
398
406
|
};
|
|
399
407
|
|
|
400
|
-
var TypeError$
|
|
408
|
+
var $TypeError$4 = TypeError;
|
|
401
409
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
|
|
402
410
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
403
411
|
|
|
@@ -410,7 +418,7 @@
|
|
|
410
418
|
if (pref === undefined) pref = 'default';
|
|
411
419
|
result = functionCall(exoticToPrim, input, pref);
|
|
412
420
|
if (!isObject(result) || isSymbol(result)) return result;
|
|
413
|
-
throw TypeError$
|
|
421
|
+
throw $TypeError$4("Can't convert object to primitive value");
|
|
414
422
|
}
|
|
415
423
|
|
|
416
424
|
if (pref === undefined) pref = 'number';
|
|
@@ -424,7 +432,7 @@
|
|
|
424
432
|
return isSymbol(key) ? key : key + '';
|
|
425
433
|
};
|
|
426
434
|
|
|
427
|
-
var TypeError$
|
|
435
|
+
var $TypeError$5 = TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
428
436
|
|
|
429
437
|
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
430
438
|
|
|
@@ -462,7 +470,7 @@
|
|
|
462
470
|
} catch (error) {
|
|
463
471
|
/* empty */
|
|
464
472
|
}
|
|
465
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
473
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$5('Accessors not supported');
|
|
466
474
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
467
475
|
return O;
|
|
468
476
|
};
|
|
@@ -495,7 +503,7 @@
|
|
|
495
503
|
var hiddenKeys = {};
|
|
496
504
|
|
|
497
505
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
498
|
-
var TypeError$
|
|
506
|
+
var TypeError$1 = global_1.TypeError;
|
|
499
507
|
var WeakMap$2 = global_1.WeakMap;
|
|
500
508
|
var set, get, has;
|
|
501
509
|
|
|
@@ -508,7 +516,7 @@
|
|
|
508
516
|
var state;
|
|
509
517
|
|
|
510
518
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
511
|
-
throw TypeError$
|
|
519
|
+
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
512
520
|
}
|
|
513
521
|
|
|
514
522
|
return state;
|
|
@@ -522,7 +530,7 @@
|
|
|
522
530
|
var wmset = functionUncurryThis(store$1.set);
|
|
523
531
|
|
|
524
532
|
set = function (it, metadata) {
|
|
525
|
-
if (wmhas(store$1, it)) throw new TypeError$
|
|
533
|
+
if (wmhas(store$1, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
526
534
|
metadata.facade = it;
|
|
527
535
|
wmset(store$1, it, metadata);
|
|
528
536
|
return metadata;
|
|
@@ -540,7 +548,7 @@
|
|
|
540
548
|
hiddenKeys[STATE] = true;
|
|
541
549
|
|
|
542
550
|
set = function (it, metadata) {
|
|
543
|
-
if (hasOwnProperty_1(it, STATE)) throw new TypeError$
|
|
551
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
544
552
|
metadata.facade = it;
|
|
545
553
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
546
554
|
return metadata;
|
|
@@ -580,16 +588,16 @@
|
|
|
580
588
|
f: f$1
|
|
581
589
|
};
|
|
582
590
|
|
|
583
|
-
var Object$
|
|
591
|
+
var $Object$3 = Object;
|
|
584
592
|
var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
585
593
|
|
|
586
594
|
var indexedObject = fails(function () {
|
|
587
595
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
588
596
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
589
|
-
return
|
|
597
|
+
return !$Object$3('z').propertyIsEnumerable(0);
|
|
590
598
|
}) ? function (it) {
|
|
591
|
-
return classofRaw(it) == 'String' ? split(it, '') : Object$
|
|
592
|
-
} : Object$
|
|
599
|
+
return classofRaw(it) == 'String' ? split(it, '') : $Object$3(it);
|
|
600
|
+
} : $Object$3;
|
|
593
601
|
|
|
594
602
|
var toIndexedObject = function (it) {
|
|
595
603
|
return indexedObject(requireObjectCoercible(it));
|
|
@@ -628,49 +636,84 @@
|
|
|
628
636
|
CONFIGURABLE: CONFIGURABLE$1
|
|
629
637
|
};
|
|
630
638
|
|
|
631
|
-
var
|
|
639
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
632
640
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
633
|
-
var getInternalState = internalState.get;
|
|
634
641
|
var enforceInternalState = internalState.enforce;
|
|
642
|
+
var getInternalState = internalState.get; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
643
|
+
|
|
644
|
+
var defineProperty = Object.defineProperty;
|
|
645
|
+
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
646
|
+
return defineProperty(function () {
|
|
647
|
+
/* empty */
|
|
648
|
+
}, 'length', {
|
|
649
|
+
value: 8
|
|
650
|
+
}).length !== 8;
|
|
651
|
+
});
|
|
635
652
|
var TEMPLATE = String(String).split('String');
|
|
636
|
-
(module.exports = function (O, key, value, options) {
|
|
637
|
-
var unsafe = options ? !!options.unsafe : false;
|
|
638
|
-
var simple = options ? !!options.enumerable : false;
|
|
639
|
-
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
640
|
-
var name = options && options.name !== undefined ? options.name : key;
|
|
641
|
-
var state;
|
|
642
653
|
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
654
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
655
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
656
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
657
|
+
}
|
|
647
658
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
}
|
|
659
|
+
if (options && options.getter) name = 'get ' + name;
|
|
660
|
+
if (options && options.setter) name = 'set ' + name;
|
|
651
661
|
|
|
652
|
-
|
|
662
|
+
if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
663
|
+
defineProperty(value, 'name', {
|
|
664
|
+
value: name,
|
|
665
|
+
configurable: true
|
|
666
|
+
});
|
|
667
|
+
}
|
|
653
668
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
669
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
670
|
+
defineProperty(value, 'length', {
|
|
671
|
+
value: options.arity
|
|
672
|
+
});
|
|
657
673
|
}
|
|
658
674
|
|
|
659
|
-
|
|
660
|
-
if (
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
675
|
+
try {
|
|
676
|
+
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
677
|
+
if (descriptors) defineProperty(value, 'prototype', {
|
|
678
|
+
writable: false
|
|
679
|
+
}); // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
680
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
681
|
+
} catch (error) {
|
|
682
|
+
/* empty */
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
var state = enforceInternalState(value);
|
|
686
|
+
|
|
687
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
|
688
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
666
689
|
}
|
|
667
690
|
|
|
668
|
-
|
|
669
|
-
}
|
|
691
|
+
return value;
|
|
692
|
+
}; // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
693
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
670
697
|
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
671
|
-
});
|
|
698
|
+
}, 'toString');
|
|
672
699
|
});
|
|
673
700
|
|
|
701
|
+
var defineBuiltIn = function (O, key, value, options) {
|
|
702
|
+
if (!options) options = {};
|
|
703
|
+
var simple = options.enumerable;
|
|
704
|
+
var name = options.name !== undefined ? options.name : key;
|
|
705
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
706
|
+
|
|
707
|
+
if (options.global) {
|
|
708
|
+
if (simple) O[key] = value;else defineGlobalProperty(key, value);
|
|
709
|
+
} else {
|
|
710
|
+
if (!options.unsafe) delete O[key];else if (O[key]) simple = true;
|
|
711
|
+
if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value);
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
return O;
|
|
715
|
+
};
|
|
716
|
+
|
|
674
717
|
var max = Math.max;
|
|
675
718
|
var min = Math.min; // Helper for a popular repeating case of the spec:
|
|
676
719
|
// Let integer be ? ToInteger(index).
|
|
@@ -802,19 +845,19 @@
|
|
|
802
845
|
|
|
803
846
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
804
847
|
/*
|
|
805
|
-
options.target
|
|
806
|
-
options.global
|
|
807
|
-
options.stat
|
|
808
|
-
options.proto
|
|
809
|
-
options.real
|
|
810
|
-
options.forced
|
|
811
|
-
options.bind
|
|
812
|
-
options.wrap
|
|
813
|
-
options.unsafe
|
|
814
|
-
options.sham
|
|
815
|
-
options.enumerable
|
|
816
|
-
options.
|
|
817
|
-
options.name
|
|
848
|
+
options.target - name of the target object
|
|
849
|
+
options.global - target is the global object
|
|
850
|
+
options.stat - export as static methods of target
|
|
851
|
+
options.proto - export as prototype methods of target
|
|
852
|
+
options.real - real prototype method for the `pure` version
|
|
853
|
+
options.forced - export even if the native feature is available
|
|
854
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
855
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
856
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
857
|
+
options.sham - add a flag to not completely full polyfills
|
|
858
|
+
options.enumerable - export as enumerable property
|
|
859
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
860
|
+
options.name - the .name of the function if it does not match the key
|
|
818
861
|
*/
|
|
819
862
|
|
|
820
863
|
var _export = function (options, source) {
|
|
@@ -826,7 +869,7 @@
|
|
|
826
869
|
if (GLOBAL) {
|
|
827
870
|
target = global_1;
|
|
828
871
|
} else if (STATIC) {
|
|
829
|
-
target = global_1[TARGET] ||
|
|
872
|
+
target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
|
|
830
873
|
} else {
|
|
831
874
|
target = (global_1[TARGET] || {}).prototype;
|
|
832
875
|
}
|
|
@@ -834,7 +877,7 @@
|
|
|
834
877
|
if (target) for (key in source) {
|
|
835
878
|
sourceProperty = source[key];
|
|
836
879
|
|
|
837
|
-
if (options.
|
|
880
|
+
if (options.dontCallGetSet) {
|
|
838
881
|
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
839
882
|
targetProperty = descriptor && descriptor.value;
|
|
840
883
|
} else targetProperty = target[key];
|
|
@@ -849,10 +892,9 @@
|
|
|
849
892
|
|
|
850
893
|
if (options.sham || targetProperty && targetProperty.sham) {
|
|
851
894
|
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
852
|
-
}
|
|
853
|
-
|
|
895
|
+
}
|
|
854
896
|
|
|
855
|
-
|
|
897
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
856
898
|
}
|
|
857
899
|
};
|
|
858
900
|
|
|
@@ -980,11 +1022,12 @@
|
|
|
980
1022
|
});
|
|
981
1023
|
|
|
982
1024
|
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
983
|
-
var Object$
|
|
984
|
-
var ObjectPrototype = Object$
|
|
1025
|
+
var $Object$4 = Object;
|
|
1026
|
+
var ObjectPrototype = $Object$4.prototype; // `Object.getPrototypeOf` method
|
|
985
1027
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1028
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe
|
|
986
1029
|
|
|
987
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object$
|
|
1030
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
988
1031
|
var object = toObject(O);
|
|
989
1032
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
990
1033
|
var constructor = object.constructor;
|
|
@@ -993,7 +1036,7 @@
|
|
|
993
1036
|
return constructor.prototype;
|
|
994
1037
|
}
|
|
995
1038
|
|
|
996
|
-
return object instanceof Object$
|
|
1039
|
+
return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
997
1040
|
};
|
|
998
1041
|
|
|
999
1042
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
@@ -1021,7 +1064,7 @@
|
|
|
1021
1064
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1022
1065
|
|
|
1023
1066
|
if (!isCallable(IteratorPrototype[ITERATOR])) {
|
|
1024
|
-
|
|
1067
|
+
defineBuiltIn(IteratorPrototype, ITERATOR, function () {
|
|
1025
1068
|
return this;
|
|
1026
1069
|
});
|
|
1027
1070
|
}
|
|
@@ -1063,12 +1106,12 @@
|
|
|
1063
1106
|
return IteratorConstructor;
|
|
1064
1107
|
};
|
|
1065
1108
|
|
|
1066
|
-
var String$
|
|
1067
|
-
var TypeError$
|
|
1109
|
+
var $String$3 = String;
|
|
1110
|
+
var $TypeError$6 = TypeError;
|
|
1068
1111
|
|
|
1069
1112
|
var aPossiblePrototype = function (argument) {
|
|
1070
1113
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1071
|
-
throw TypeError$
|
|
1114
|
+
throw $TypeError$6("Can't set " + $String$3(argument) + ' as a prototype');
|
|
1072
1115
|
};
|
|
1073
1116
|
|
|
1074
1117
|
/* eslint-disable no-proto -- safe */
|
|
@@ -1157,7 +1200,7 @@
|
|
|
1157
1200
|
if (objectSetPrototypeOf) {
|
|
1158
1201
|
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
1159
1202
|
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1160
|
-
|
|
1203
|
+
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
|
1161
1204
|
}
|
|
1162
1205
|
} // Set @@toStringTag to native iterators
|
|
1163
1206
|
|
|
@@ -1188,7 +1231,7 @@
|
|
|
1188
1231
|
};
|
|
1189
1232
|
if (FORCED) for (KEY in methods) {
|
|
1190
1233
|
if (BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1191
|
-
|
|
1234
|
+
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1192
1235
|
}
|
|
1193
1236
|
} else _export({
|
|
1194
1237
|
target: NAME,
|
|
@@ -1199,7 +1242,7 @@
|
|
|
1199
1242
|
|
|
1200
1243
|
|
|
1201
1244
|
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1202
|
-
|
|
1245
|
+
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, {
|
|
1203
1246
|
name: DEFAULT
|
|
1204
1247
|
});
|
|
1205
1248
|
}
|
|
@@ -1350,15 +1393,15 @@
|
|
|
1350
1393
|
if (it != undefined) return getMethod(it, ITERATOR$3) || getMethod(it, '@@iterator') || iterators[classof(it)];
|
|
1351
1394
|
};
|
|
1352
1395
|
|
|
1353
|
-
var TypeError$
|
|
1396
|
+
var $TypeError$7 = TypeError;
|
|
1354
1397
|
|
|
1355
1398
|
var getIterator = function (argument, usingIterator) {
|
|
1356
1399
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
1357
1400
|
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
1358
|
-
throw TypeError$
|
|
1401
|
+
throw $TypeError$7(tryToString(argument) + ' is not iterable');
|
|
1359
1402
|
};
|
|
1360
1403
|
|
|
1361
|
-
var Array
|
|
1404
|
+
var $Array = Array; // `Array.from` method implementation
|
|
1362
1405
|
// https://tc39.es/ecma262/#sec-array.from
|
|
1363
1406
|
|
|
1364
1407
|
var arrayFrom = function from(arrayLike
|
|
@@ -1374,7 +1417,7 @@
|
|
|
1374
1417
|
var index = 0;
|
|
1375
1418
|
var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
1376
1419
|
|
|
1377
|
-
if (iteratorMethod && !(this
|
|
1420
|
+
if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
|
|
1378
1421
|
iterator = getIterator(O, iteratorMethod);
|
|
1379
1422
|
next = iterator.next;
|
|
1380
1423
|
result = IS_CONSTRUCTOR ? new this() : [];
|
|
@@ -1385,7 +1428,7 @@
|
|
|
1385
1428
|
}
|
|
1386
1429
|
} else {
|
|
1387
1430
|
length = lengthOfArrayLike(O);
|
|
1388
|
-
result = IS_CONSTRUCTOR ? new this(length) : Array
|
|
1431
|
+
result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
|
|
1389
1432
|
|
|
1390
1433
|
for (; length > index; index++) {
|
|
1391
1434
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
@@ -2324,7 +2367,7 @@
|
|
|
2324
2367
|
}
|
|
2325
2368
|
});
|
|
2326
2369
|
|
|
2327
|
-
|
|
2370
|
+
/******************************************************************************
|
|
2328
2371
|
Copyright (c) Microsoft Corporation.
|
|
2329
2372
|
|
|
2330
2373
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -3297,6 +3340,360 @@
|
|
|
3297
3340
|
return result;
|
|
3298
3341
|
}
|
|
3299
3342
|
|
|
3343
|
+
// @generated from time-data-gen.ts
|
|
3344
|
+
// prettier-ignore
|
|
3345
|
+
var timeData = {
|
|
3346
|
+
"AX": ["H"],
|
|
3347
|
+
"BQ": ["H"],
|
|
3348
|
+
"CP": ["H"],
|
|
3349
|
+
"CZ": ["H"],
|
|
3350
|
+
"DK": ["H"],
|
|
3351
|
+
"FI": ["H"],
|
|
3352
|
+
"ID": ["H"],
|
|
3353
|
+
"IS": ["H"],
|
|
3354
|
+
"ML": ["H"],
|
|
3355
|
+
"NE": ["H"],
|
|
3356
|
+
"RU": ["H"],
|
|
3357
|
+
"SE": ["H"],
|
|
3358
|
+
"SJ": ["H"],
|
|
3359
|
+
"SK": ["H"],
|
|
3360
|
+
"AS": ["h", "H"],
|
|
3361
|
+
"BT": ["h", "H"],
|
|
3362
|
+
"DJ": ["h", "H"],
|
|
3363
|
+
"ER": ["h", "H"],
|
|
3364
|
+
"GH": ["h", "H"],
|
|
3365
|
+
"IN": ["h", "H"],
|
|
3366
|
+
"LS": ["h", "H"],
|
|
3367
|
+
"PG": ["h", "H"],
|
|
3368
|
+
"PW": ["h", "H"],
|
|
3369
|
+
"SO": ["h", "H"],
|
|
3370
|
+
"TO": ["h", "H"],
|
|
3371
|
+
"VU": ["h", "H"],
|
|
3372
|
+
"WS": ["h", "H"],
|
|
3373
|
+
"001": ["H", "h"],
|
|
3374
|
+
"AL": ["h", "H", "hB"],
|
|
3375
|
+
"TD": ["h", "H", "hB"],
|
|
3376
|
+
"ca-ES": ["H", "h", "hB"],
|
|
3377
|
+
"CF": ["H", "h", "hB"],
|
|
3378
|
+
"CM": ["H", "h", "hB"],
|
|
3379
|
+
"fr-CA": ["H", "h", "hB"],
|
|
3380
|
+
"gl-ES": ["H", "h", "hB"],
|
|
3381
|
+
"it-CH": ["H", "h", "hB"],
|
|
3382
|
+
"it-IT": ["H", "h", "hB"],
|
|
3383
|
+
"LU": ["H", "h", "hB"],
|
|
3384
|
+
"NP": ["H", "h", "hB"],
|
|
3385
|
+
"PF": ["H", "h", "hB"],
|
|
3386
|
+
"SC": ["H", "h", "hB"],
|
|
3387
|
+
"SM": ["H", "h", "hB"],
|
|
3388
|
+
"SN": ["H", "h", "hB"],
|
|
3389
|
+
"TF": ["H", "h", "hB"],
|
|
3390
|
+
"VA": ["H", "h", "hB"],
|
|
3391
|
+
"CY": ["h", "H", "hb", "hB"],
|
|
3392
|
+
"GR": ["h", "H", "hb", "hB"],
|
|
3393
|
+
"CO": ["h", "H", "hB", "hb"],
|
|
3394
|
+
"DO": ["h", "H", "hB", "hb"],
|
|
3395
|
+
"KP": ["h", "H", "hB", "hb"],
|
|
3396
|
+
"KR": ["h", "H", "hB", "hb"],
|
|
3397
|
+
"NA": ["h", "H", "hB", "hb"],
|
|
3398
|
+
"PA": ["h", "H", "hB", "hb"],
|
|
3399
|
+
"PR": ["h", "H", "hB", "hb"],
|
|
3400
|
+
"VE": ["h", "H", "hB", "hb"],
|
|
3401
|
+
"AC": ["H", "h", "hb", "hB"],
|
|
3402
|
+
"AI": ["H", "h", "hb", "hB"],
|
|
3403
|
+
"BW": ["H", "h", "hb", "hB"],
|
|
3404
|
+
"BZ": ["H", "h", "hb", "hB"],
|
|
3405
|
+
"CC": ["H", "h", "hb", "hB"],
|
|
3406
|
+
"CK": ["H", "h", "hb", "hB"],
|
|
3407
|
+
"CX": ["H", "h", "hb", "hB"],
|
|
3408
|
+
"DG": ["H", "h", "hb", "hB"],
|
|
3409
|
+
"FK": ["H", "h", "hb", "hB"],
|
|
3410
|
+
"GB": ["H", "h", "hb", "hB"],
|
|
3411
|
+
"GG": ["H", "h", "hb", "hB"],
|
|
3412
|
+
"GI": ["H", "h", "hb", "hB"],
|
|
3413
|
+
"IE": ["H", "h", "hb", "hB"],
|
|
3414
|
+
"IM": ["H", "h", "hb", "hB"],
|
|
3415
|
+
"IO": ["H", "h", "hb", "hB"],
|
|
3416
|
+
"JE": ["H", "h", "hb", "hB"],
|
|
3417
|
+
"LT": ["H", "h", "hb", "hB"],
|
|
3418
|
+
"MK": ["H", "h", "hb", "hB"],
|
|
3419
|
+
"MN": ["H", "h", "hb", "hB"],
|
|
3420
|
+
"MS": ["H", "h", "hb", "hB"],
|
|
3421
|
+
"NF": ["H", "h", "hb", "hB"],
|
|
3422
|
+
"NG": ["H", "h", "hb", "hB"],
|
|
3423
|
+
"NR": ["H", "h", "hb", "hB"],
|
|
3424
|
+
"NU": ["H", "h", "hb", "hB"],
|
|
3425
|
+
"PN": ["H", "h", "hb", "hB"],
|
|
3426
|
+
"SH": ["H", "h", "hb", "hB"],
|
|
3427
|
+
"SX": ["H", "h", "hb", "hB"],
|
|
3428
|
+
"TA": ["H", "h", "hb", "hB"],
|
|
3429
|
+
"ZA": ["H", "h", "hb", "hB"],
|
|
3430
|
+
"af-ZA": ["H", "h", "hB", "hb"],
|
|
3431
|
+
"AR": ["H", "h", "hB", "hb"],
|
|
3432
|
+
"CL": ["H", "h", "hB", "hb"],
|
|
3433
|
+
"CR": ["H", "h", "hB", "hb"],
|
|
3434
|
+
"CU": ["H", "h", "hB", "hb"],
|
|
3435
|
+
"EA": ["H", "h", "hB", "hb"],
|
|
3436
|
+
"es-BO": ["H", "h", "hB", "hb"],
|
|
3437
|
+
"es-BR": ["H", "h", "hB", "hb"],
|
|
3438
|
+
"es-EC": ["H", "h", "hB", "hb"],
|
|
3439
|
+
"es-ES": ["H", "h", "hB", "hb"],
|
|
3440
|
+
"es-GQ": ["H", "h", "hB", "hb"],
|
|
3441
|
+
"es-PE": ["H", "h", "hB", "hb"],
|
|
3442
|
+
"GT": ["H", "h", "hB", "hb"],
|
|
3443
|
+
"HN": ["H", "h", "hB", "hb"],
|
|
3444
|
+
"IC": ["H", "h", "hB", "hb"],
|
|
3445
|
+
"KG": ["H", "h", "hB", "hb"],
|
|
3446
|
+
"KM": ["H", "h", "hB", "hb"],
|
|
3447
|
+
"LK": ["H", "h", "hB", "hb"],
|
|
3448
|
+
"MA": ["H", "h", "hB", "hb"],
|
|
3449
|
+
"MX": ["H", "h", "hB", "hb"],
|
|
3450
|
+
"NI": ["H", "h", "hB", "hb"],
|
|
3451
|
+
"PY": ["H", "h", "hB", "hb"],
|
|
3452
|
+
"SV": ["H", "h", "hB", "hb"],
|
|
3453
|
+
"UY": ["H", "h", "hB", "hb"],
|
|
3454
|
+
"JP": ["H", "h", "K"],
|
|
3455
|
+
"AD": ["H", "hB"],
|
|
3456
|
+
"AM": ["H", "hB"],
|
|
3457
|
+
"AO": ["H", "hB"],
|
|
3458
|
+
"AT": ["H", "hB"],
|
|
3459
|
+
"AW": ["H", "hB"],
|
|
3460
|
+
"BE": ["H", "hB"],
|
|
3461
|
+
"BF": ["H", "hB"],
|
|
3462
|
+
"BJ": ["H", "hB"],
|
|
3463
|
+
"BL": ["H", "hB"],
|
|
3464
|
+
"BR": ["H", "hB"],
|
|
3465
|
+
"CG": ["H", "hB"],
|
|
3466
|
+
"CI": ["H", "hB"],
|
|
3467
|
+
"CV": ["H", "hB"],
|
|
3468
|
+
"DE": ["H", "hB"],
|
|
3469
|
+
"EE": ["H", "hB"],
|
|
3470
|
+
"FR": ["H", "hB"],
|
|
3471
|
+
"GA": ["H", "hB"],
|
|
3472
|
+
"GF": ["H", "hB"],
|
|
3473
|
+
"GN": ["H", "hB"],
|
|
3474
|
+
"GP": ["H", "hB"],
|
|
3475
|
+
"GW": ["H", "hB"],
|
|
3476
|
+
"HR": ["H", "hB"],
|
|
3477
|
+
"IL": ["H", "hB"],
|
|
3478
|
+
"IT": ["H", "hB"],
|
|
3479
|
+
"KZ": ["H", "hB"],
|
|
3480
|
+
"MC": ["H", "hB"],
|
|
3481
|
+
"MD": ["H", "hB"],
|
|
3482
|
+
"MF": ["H", "hB"],
|
|
3483
|
+
"MQ": ["H", "hB"],
|
|
3484
|
+
"MZ": ["H", "hB"],
|
|
3485
|
+
"NC": ["H", "hB"],
|
|
3486
|
+
"NL": ["H", "hB"],
|
|
3487
|
+
"PM": ["H", "hB"],
|
|
3488
|
+
"PT": ["H", "hB"],
|
|
3489
|
+
"RE": ["H", "hB"],
|
|
3490
|
+
"RO": ["H", "hB"],
|
|
3491
|
+
"SI": ["H", "hB"],
|
|
3492
|
+
"SR": ["H", "hB"],
|
|
3493
|
+
"ST": ["H", "hB"],
|
|
3494
|
+
"TG": ["H", "hB"],
|
|
3495
|
+
"TR": ["H", "hB"],
|
|
3496
|
+
"WF": ["H", "hB"],
|
|
3497
|
+
"YT": ["H", "hB"],
|
|
3498
|
+
"BD": ["h", "hB", "H"],
|
|
3499
|
+
"PK": ["h", "hB", "H"],
|
|
3500
|
+
"AZ": ["H", "hB", "h"],
|
|
3501
|
+
"BA": ["H", "hB", "h"],
|
|
3502
|
+
"BG": ["H", "hB", "h"],
|
|
3503
|
+
"CH": ["H", "hB", "h"],
|
|
3504
|
+
"GE": ["H", "hB", "h"],
|
|
3505
|
+
"LI": ["H", "hB", "h"],
|
|
3506
|
+
"ME": ["H", "hB", "h"],
|
|
3507
|
+
"RS": ["H", "hB", "h"],
|
|
3508
|
+
"UA": ["H", "hB", "h"],
|
|
3509
|
+
"UZ": ["H", "hB", "h"],
|
|
3510
|
+
"XK": ["H", "hB", "h"],
|
|
3511
|
+
"AG": ["h", "hb", "H", "hB"],
|
|
3512
|
+
"AU": ["h", "hb", "H", "hB"],
|
|
3513
|
+
"BB": ["h", "hb", "H", "hB"],
|
|
3514
|
+
"BM": ["h", "hb", "H", "hB"],
|
|
3515
|
+
"BS": ["h", "hb", "H", "hB"],
|
|
3516
|
+
"CA": ["h", "hb", "H", "hB"],
|
|
3517
|
+
"DM": ["h", "hb", "H", "hB"],
|
|
3518
|
+
"en-001": ["h", "hb", "H", "hB"],
|
|
3519
|
+
"FJ": ["h", "hb", "H", "hB"],
|
|
3520
|
+
"FM": ["h", "hb", "H", "hB"],
|
|
3521
|
+
"GD": ["h", "hb", "H", "hB"],
|
|
3522
|
+
"GM": ["h", "hb", "H", "hB"],
|
|
3523
|
+
"GU": ["h", "hb", "H", "hB"],
|
|
3524
|
+
"GY": ["h", "hb", "H", "hB"],
|
|
3525
|
+
"JM": ["h", "hb", "H", "hB"],
|
|
3526
|
+
"KI": ["h", "hb", "H", "hB"],
|
|
3527
|
+
"KN": ["h", "hb", "H", "hB"],
|
|
3528
|
+
"KY": ["h", "hb", "H", "hB"],
|
|
3529
|
+
"LC": ["h", "hb", "H", "hB"],
|
|
3530
|
+
"LR": ["h", "hb", "H", "hB"],
|
|
3531
|
+
"MH": ["h", "hb", "H", "hB"],
|
|
3532
|
+
"MP": ["h", "hb", "H", "hB"],
|
|
3533
|
+
"MW": ["h", "hb", "H", "hB"],
|
|
3534
|
+
"NZ": ["h", "hb", "H", "hB"],
|
|
3535
|
+
"SB": ["h", "hb", "H", "hB"],
|
|
3536
|
+
"SG": ["h", "hb", "H", "hB"],
|
|
3537
|
+
"SL": ["h", "hb", "H", "hB"],
|
|
3538
|
+
"SS": ["h", "hb", "H", "hB"],
|
|
3539
|
+
"SZ": ["h", "hb", "H", "hB"],
|
|
3540
|
+
"TC": ["h", "hb", "H", "hB"],
|
|
3541
|
+
"TT": ["h", "hb", "H", "hB"],
|
|
3542
|
+
"UM": ["h", "hb", "H", "hB"],
|
|
3543
|
+
"US": ["h", "hb", "H", "hB"],
|
|
3544
|
+
"VC": ["h", "hb", "H", "hB"],
|
|
3545
|
+
"VG": ["h", "hb", "H", "hB"],
|
|
3546
|
+
"VI": ["h", "hb", "H", "hB"],
|
|
3547
|
+
"ZM": ["h", "hb", "H", "hB"],
|
|
3548
|
+
"BO": ["H", "hB", "h", "hb"],
|
|
3549
|
+
"EC": ["H", "hB", "h", "hb"],
|
|
3550
|
+
"ES": ["H", "hB", "h", "hb"],
|
|
3551
|
+
"GQ": ["H", "hB", "h", "hb"],
|
|
3552
|
+
"PE": ["H", "hB", "h", "hb"],
|
|
3553
|
+
"AE": ["h", "hB", "hb", "H"],
|
|
3554
|
+
"ar-001": ["h", "hB", "hb", "H"],
|
|
3555
|
+
"BH": ["h", "hB", "hb", "H"],
|
|
3556
|
+
"DZ": ["h", "hB", "hb", "H"],
|
|
3557
|
+
"EG": ["h", "hB", "hb", "H"],
|
|
3558
|
+
"EH": ["h", "hB", "hb", "H"],
|
|
3559
|
+
"HK": ["h", "hB", "hb", "H"],
|
|
3560
|
+
"IQ": ["h", "hB", "hb", "H"],
|
|
3561
|
+
"JO": ["h", "hB", "hb", "H"],
|
|
3562
|
+
"KW": ["h", "hB", "hb", "H"],
|
|
3563
|
+
"LB": ["h", "hB", "hb", "H"],
|
|
3564
|
+
"LY": ["h", "hB", "hb", "H"],
|
|
3565
|
+
"MO": ["h", "hB", "hb", "H"],
|
|
3566
|
+
"MR": ["h", "hB", "hb", "H"],
|
|
3567
|
+
"OM": ["h", "hB", "hb", "H"],
|
|
3568
|
+
"PH": ["h", "hB", "hb", "H"],
|
|
3569
|
+
"PS": ["h", "hB", "hb", "H"],
|
|
3570
|
+
"QA": ["h", "hB", "hb", "H"],
|
|
3571
|
+
"SA": ["h", "hB", "hb", "H"],
|
|
3572
|
+
"SD": ["h", "hB", "hb", "H"],
|
|
3573
|
+
"SY": ["h", "hB", "hb", "H"],
|
|
3574
|
+
"TN": ["h", "hB", "hb", "H"],
|
|
3575
|
+
"YE": ["h", "hB", "hb", "H"],
|
|
3576
|
+
"AF": ["H", "hb", "hB", "h"],
|
|
3577
|
+
"LA": ["H", "hb", "hB", "h"],
|
|
3578
|
+
"CN": ["H", "hB", "hb", "h"],
|
|
3579
|
+
"LV": ["H", "hB", "hb", "h"],
|
|
3580
|
+
"TL": ["H", "hB", "hb", "h"],
|
|
3581
|
+
"zu-ZA": ["H", "hB", "hb", "h"],
|
|
3582
|
+
"CD": ["hB", "H"],
|
|
3583
|
+
"IR": ["hB", "H"],
|
|
3584
|
+
"hi-IN": ["hB", "h", "H"],
|
|
3585
|
+
"kn-IN": ["hB", "h", "H"],
|
|
3586
|
+
"ml-IN": ["hB", "h", "H"],
|
|
3587
|
+
"te-IN": ["hB", "h", "H"],
|
|
3588
|
+
"KH": ["hB", "h", "H", "hb"],
|
|
3589
|
+
"ta-IN": ["hB", "h", "hb", "H"],
|
|
3590
|
+
"BN": ["hb", "hB", "h", "H"],
|
|
3591
|
+
"MY": ["hb", "hB", "h", "H"],
|
|
3592
|
+
"ET": ["hB", "hb", "h", "H"],
|
|
3593
|
+
"gu-IN": ["hB", "hb", "h", "H"],
|
|
3594
|
+
"mr-IN": ["hB", "hb", "h", "H"],
|
|
3595
|
+
"pa-IN": ["hB", "hb", "h", "H"],
|
|
3596
|
+
"TW": ["hB", "hb", "h", "H"],
|
|
3597
|
+
"KE": ["hB", "hb", "H", "h"],
|
|
3598
|
+
"MM": ["hB", "hb", "H", "h"],
|
|
3599
|
+
"TZ": ["hB", "hb", "H", "h"],
|
|
3600
|
+
"UG": ["hB", "hb", "H", "h"]
|
|
3601
|
+
};
|
|
3602
|
+
|
|
3603
|
+
/**
|
|
3604
|
+
* Returns the best matching date time pattern if a date time skeleton
|
|
3605
|
+
* pattern is provided with a locale. Follows the Unicode specification:
|
|
3606
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
|
|
3607
|
+
* @param skeleton date time skeleton pattern that possibly includes j, J or C
|
|
3608
|
+
* @param locale
|
|
3609
|
+
*/
|
|
3610
|
+
|
|
3611
|
+
function getBestPattern(skeleton, locale) {
|
|
3612
|
+
var skeletonCopy = '';
|
|
3613
|
+
|
|
3614
|
+
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
|
|
3615
|
+
var patternChar = skeleton.charAt(patternPos);
|
|
3616
|
+
|
|
3617
|
+
if (patternChar === 'j') {
|
|
3618
|
+
var extraLength = 0;
|
|
3619
|
+
|
|
3620
|
+
while (patternPos + 1 < skeleton.length && skeleton.charAt(patternPos + 1) === patternChar) {
|
|
3621
|
+
extraLength++;
|
|
3622
|
+
patternPos++;
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3625
|
+
var hourLen = 1 + (extraLength & 1);
|
|
3626
|
+
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
|
|
3627
|
+
var dayPeriodChar = 'a';
|
|
3628
|
+
var hourChar = getDefaultHourSymbolFromLocale(locale);
|
|
3629
|
+
|
|
3630
|
+
if (hourChar == 'H' || hourChar == 'k') {
|
|
3631
|
+
dayPeriodLen = 0;
|
|
3632
|
+
}
|
|
3633
|
+
|
|
3634
|
+
while (dayPeriodLen-- > 0) {
|
|
3635
|
+
skeletonCopy += dayPeriodChar;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
while (hourLen-- > 0) {
|
|
3639
|
+
skeletonCopy = hourChar + skeletonCopy;
|
|
3640
|
+
}
|
|
3641
|
+
} else if (patternChar === 'J') {
|
|
3642
|
+
skeletonCopy += 'H';
|
|
3643
|
+
} else {
|
|
3644
|
+
skeletonCopy += patternChar;
|
|
3645
|
+
}
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3648
|
+
return skeletonCopy;
|
|
3649
|
+
}
|
|
3650
|
+
/**
|
|
3651
|
+
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
|
|
3652
|
+
* of the given `locale` to the corresponding time pattern.
|
|
3653
|
+
* @param locale
|
|
3654
|
+
*/
|
|
3655
|
+
|
|
3656
|
+
function getDefaultHourSymbolFromLocale(locale) {
|
|
3657
|
+
var hourCycle = locale.hourCycle;
|
|
3658
|
+
|
|
3659
|
+
if (hourCycle === undefined && // @ts-ignore hourCycle(s) is not identified yet
|
|
3660
|
+
locale.hourCycles && // @ts-ignore
|
|
3661
|
+
locale.hourCycles.length) {
|
|
3662
|
+
// @ts-ignore
|
|
3663
|
+
hourCycle = locale.hourCycles[0];
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
if (hourCycle) {
|
|
3667
|
+
switch (hourCycle) {
|
|
3668
|
+
case 'h24':
|
|
3669
|
+
return 'k';
|
|
3670
|
+
|
|
3671
|
+
case 'h23':
|
|
3672
|
+
return 'H';
|
|
3673
|
+
|
|
3674
|
+
case 'h12':
|
|
3675
|
+
return 'h';
|
|
3676
|
+
|
|
3677
|
+
case 'h11':
|
|
3678
|
+
return 'K';
|
|
3679
|
+
|
|
3680
|
+
default:
|
|
3681
|
+
throw new Error('Invalid hourCycle');
|
|
3682
|
+
}
|
|
3683
|
+
} // TODO: Once hourCycle is fully supported remove the following with data generation
|
|
3684
|
+
|
|
3685
|
+
|
|
3686
|
+
var languageTag = locale.language;
|
|
3687
|
+
var regionTag;
|
|
3688
|
+
|
|
3689
|
+
if (languageTag !== 'root') {
|
|
3690
|
+
regionTag = locale.maximize().region;
|
|
3691
|
+
}
|
|
3692
|
+
|
|
3693
|
+
var hourCycles = timeData[regionTag || ''] || timeData[languageTag || ''] || timeData["".concat(languageTag, "-001")] || timeData['001'];
|
|
3694
|
+
return hourCycles[0];
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3300
3697
|
var _a;
|
|
3301
3698
|
var SPACE_SEPARATOR_START_REGEX = new RegExp("^".concat(SPACE_SEPARATOR_REGEX.source, "*"));
|
|
3302
3699
|
var SPACE_SEPARATOR_END_REGEX = new RegExp("".concat(SPACE_SEPARATOR_REGEX.source, "*$"));
|
|
@@ -3462,6 +3859,7 @@
|
|
|
3462
3859
|
column: 1
|
|
3463
3860
|
};
|
|
3464
3861
|
this.ignoreTag = !!options.ignoreTag;
|
|
3862
|
+
this.locale = options.locale;
|
|
3465
3863
|
this.requiresOtherClause = !!options.requiresOtherClause;
|
|
3466
3864
|
this.shouldParseSkeletons = !!options.shouldParseSkeletons;
|
|
3467
3865
|
}
|
|
@@ -3957,11 +4355,19 @@
|
|
|
3957
4355
|
return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);
|
|
3958
4356
|
}
|
|
3959
4357
|
|
|
4358
|
+
var dateTimePattern = skeleton; // Get "best match" pattern only if locale is passed, if not, let it
|
|
4359
|
+
// pass as-is where `parseDateTimeSkeleton()` will throw an error
|
|
4360
|
+
// for unsupported patterns.
|
|
4361
|
+
|
|
4362
|
+
if (this.locale) {
|
|
4363
|
+
dateTimePattern = getBestPattern(skeleton, this.locale);
|
|
4364
|
+
}
|
|
4365
|
+
|
|
3960
4366
|
var style = {
|
|
3961
4367
|
type: SKELETON_TYPE.dateTime,
|
|
3962
|
-
pattern:
|
|
4368
|
+
pattern: dateTimePattern,
|
|
3963
4369
|
location: styleAndLocation.styleLocation,
|
|
3964
|
-
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(
|
|
4370
|
+
parsedOptions: this.shouldParseSkeletons ? parseDateTimeSkeleton(dateTimePattern) : {}
|
|
3965
4371
|
};
|
|
3966
4372
|
var type = argType === 'date' ? TYPE.date : TYPE.time;
|
|
3967
4373
|
return {
|
|
@@ -5072,13 +5478,17 @@
|
|
|
5072
5478
|
|
|
5073
5479
|
this.resolvedOptions = function () {
|
|
5074
5480
|
return {
|
|
5075
|
-
locale:
|
|
5481
|
+
locale: _this.resolvedLocale.toString()
|
|
5076
5482
|
};
|
|
5077
5483
|
};
|
|
5078
5484
|
|
|
5079
5485
|
this.getAst = function () {
|
|
5080
5486
|
return _this.ast;
|
|
5081
|
-
};
|
|
5487
|
+
}; // Defined first because it's used to build the format pattern.
|
|
5488
|
+
|
|
5489
|
+
|
|
5490
|
+
this.locales = locales;
|
|
5491
|
+
this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);
|
|
5082
5492
|
|
|
5083
5493
|
if (typeof message === 'string') {
|
|
5084
5494
|
this.message = message;
|
|
@@ -5089,7 +5499,8 @@
|
|
|
5089
5499
|
|
|
5090
5500
|
|
|
5091
5501
|
this.ast = IntlMessageFormat.__parse(message, {
|
|
5092
|
-
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag
|
|
5502
|
+
ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,
|
|
5503
|
+
locale: this.resolvedLocale
|
|
5093
5504
|
});
|
|
5094
5505
|
} else {
|
|
5095
5506
|
this.ast = message;
|
|
@@ -5101,9 +5512,7 @@
|
|
|
5101
5512
|
// formats.
|
|
5102
5513
|
|
|
5103
5514
|
|
|
5104
|
-
this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
|
|
5105
|
-
|
|
5106
|
-
this.locales = locales;
|
|
5515
|
+
this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
|
|
5107
5516
|
this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
|
|
5108
5517
|
}
|
|
5109
5518
|
|
|
@@ -5119,6 +5528,17 @@
|
|
|
5119
5528
|
configurable: true
|
|
5120
5529
|
});
|
|
5121
5530
|
IntlMessageFormat.memoizedDefaultLocale = null;
|
|
5531
|
+
|
|
5532
|
+
IntlMessageFormat.resolveLocale = function (locales) {
|
|
5533
|
+
var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
|
|
5534
|
+
|
|
5535
|
+
if (supportedLocales.length > 0) {
|
|
5536
|
+
return new Intl.Locale(supportedLocales[0]);
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5539
|
+
return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);
|
|
5540
|
+
};
|
|
5541
|
+
|
|
5122
5542
|
IntlMessageFormat.__parse = parse; // Default format options used as the prototype of the `formats` provided to the
|
|
5123
5543
|
// constructor. These are used when constructing the internal Intl.NumberFormat
|
|
5124
5544
|
// and Intl.DateTimeFormat instances.
|
|
@@ -6297,7 +6717,7 @@
|
|
|
6297
6717
|
"eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
|
|
6298
6718
|
"eligibility-modal.total": "Insgesamt",
|
|
6299
6719
|
"installments.today": "Heute",
|
|
6300
|
-
"payment-plan-strings.day-abbreviation": "
|
|
6720
|
+
"payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
|
|
6301
6721
|
"payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
|
|
6302
6722
|
"payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
|
|
6303
6723
|
"payment-plan-strings.ineligible-greater-than-max": "Bis zu {maxAmount}",
|
|
@@ -14425,7 +14845,7 @@
|
|
|
14425
14845
|
});
|
|
14426
14846
|
|
|
14427
14847
|
function _extends() {
|
|
14428
|
-
_extends = Object.assign
|
|
14848
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14429
14849
|
for (var i = 1; i < arguments.length; i++) {
|
|
14430
14850
|
var source = arguments[i];
|
|
14431
14851
|
|
|
@@ -14438,7 +14858,6 @@
|
|
|
14438
14858
|
|
|
14439
14859
|
return target;
|
|
14440
14860
|
};
|
|
14441
|
-
|
|
14442
14861
|
return _extends.apply(this, arguments);
|
|
14443
14862
|
}
|
|
14444
14863
|
|
|
@@ -14903,7 +15322,7 @@
|
|
|
14903
15322
|
* http://api.jqueryui.com/category/ui-core/
|
|
14904
15323
|
*/
|
|
14905
15324
|
|
|
14906
|
-
var tabbableNode = /input|select|textarea|button|object/;
|
|
15325
|
+
var tabbableNode = /input|select|textarea|button|object|iframe/;
|
|
14907
15326
|
|
|
14908
15327
|
function hidesContents(element) {
|
|
14909
15328
|
var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0; // If the node is empty, this is good enough
|
|
@@ -16824,1143 +17243,2248 @@
|
|
|
16824
17243
|
};
|
|
16825
17244
|
|
|
16826
17245
|
var reactResponsive = createCommonjsModule(function (module, exports) {
|
|
16827
|
-
|
|
16828
|
-
|
|
16829
|
-
}(
|
|
16830
|
-
return
|
|
16831
|
-
|
|
16832
|
-
|
|
16833
|
-
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
|
|
16837
|
-
|
|
16838
|
-
|
|
16839
|
-
|
|
16840
|
-
|
|
16841
|
-
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16845
|
-
|
|
16846
|
-
|
|
16847
|
-
|
|
16848
|
-
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
|
|
16852
|
-
|
|
16853
|
-
|
|
16854
|
-
|
|
16855
|
-
|
|
16856
|
-
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16862
|
-
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
var react_1 = __importDefault(__webpack_require__(1)),
|
|
16871
|
-
matchmediaquery_1 = __importDefault(__webpack_require__(9)),
|
|
16872
|
-
hyphenate_style_name_1 = __importDefault(__webpack_require__(2)),
|
|
16873
|
-
shallow_equal_1 = __webpack_require__(11),
|
|
16874
|
-
toQuery_1 = __importDefault(__webpack_require__(3)),
|
|
16875
|
-
Context_1 = __importDefault(__webpack_require__(7)),
|
|
16876
|
-
makeQuery = function (settings) {
|
|
16877
|
-
return settings.query || (0, toQuery_1.default)(settings);
|
|
16878
|
-
},
|
|
16879
|
-
hyphenateKeys = function (obj) {
|
|
16880
|
-
if (obj) {
|
|
16881
|
-
return Object.keys(obj).reduce(function (result, key) {
|
|
16882
|
-
return result[(0, hyphenate_style_name_1.default)(key)] = obj[key], result;
|
|
16883
|
-
}, {});
|
|
16884
|
-
}
|
|
16885
|
-
},
|
|
16886
|
-
useIsUpdate = function () {
|
|
16887
|
-
var ref = react_1.default.useRef(!1);
|
|
16888
|
-
return react_1.default.useEffect(function () {
|
|
16889
|
-
ref.current = !0;
|
|
16890
|
-
}, []), ref.current;
|
|
16891
|
-
},
|
|
16892
|
-
useDevice = function (deviceFromProps) {
|
|
16893
|
-
var deviceFromContext = react_1.default.useContext(Context_1.default),
|
|
16894
|
-
getDevice = function () {
|
|
16895
|
-
return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
|
|
16896
|
-
},
|
|
16897
|
-
_a = react_1.default.useState(getDevice),
|
|
16898
|
-
device = _a[0],
|
|
16899
|
-
setDevice = _a[1];
|
|
16900
|
-
|
|
16901
|
-
return react_1.default.useEffect(function () {
|
|
16902
|
-
var newDevice = getDevice();
|
|
16903
|
-
(0, shallow_equal_1.shallowEqualObjects)(device, newDevice) || setDevice(newDevice);
|
|
16904
|
-
}, [deviceFromProps, deviceFromContext]), device;
|
|
16905
|
-
},
|
|
16906
|
-
useQuery = function (settings) {
|
|
16907
|
-
var getQuery = function () {
|
|
16908
|
-
return makeQuery(settings);
|
|
16909
|
-
},
|
|
16910
|
-
_a = react_1.default.useState(getQuery),
|
|
16911
|
-
query = _a[0],
|
|
16912
|
-
setQuery = _a[1];
|
|
16913
|
-
|
|
16914
|
-
return react_1.default.useEffect(function () {
|
|
16915
|
-
var newQuery = getQuery();
|
|
16916
|
-
query !== newQuery && setQuery(newQuery);
|
|
16917
|
-
}, [settings]), query;
|
|
16918
|
-
},
|
|
16919
|
-
useMatchMedia = function (query, device) {
|
|
16920
|
-
var getMatchMedia = function () {
|
|
16921
|
-
return (0, matchmediaquery_1.default)(query, device || {}, !!device);
|
|
16922
|
-
},
|
|
16923
|
-
_a = react_1.default.useState(getMatchMedia),
|
|
16924
|
-
mq = _a[0],
|
|
16925
|
-
setMq = _a[1],
|
|
16926
|
-
isUpdate = useIsUpdate();
|
|
16927
|
-
|
|
16928
|
-
return react_1.default.useEffect(function () {
|
|
16929
|
-
if (isUpdate) {
|
|
16930
|
-
var newMq_1 = getMatchMedia();
|
|
16931
|
-
return setMq(newMq_1), function () {
|
|
16932
|
-
newMq_1 && newMq_1.dispose();
|
|
16933
|
-
};
|
|
16934
|
-
}
|
|
16935
|
-
}, [query, device]), mq;
|
|
16936
|
-
},
|
|
16937
|
-
useMatches = function (mediaQuery) {
|
|
16938
|
-
var _a = react_1.default.useState(mediaQuery.matches),
|
|
16939
|
-
matches = _a[0],
|
|
16940
|
-
setMatches = _a[1];
|
|
16941
|
-
|
|
16942
|
-
return react_1.default.useEffect(function () {
|
|
16943
|
-
var updateMatches = function () {
|
|
16944
|
-
setMatches(mediaQuery.matches);
|
|
16945
|
-
};
|
|
17246
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
17247
|
+
module.exports = factory(react);
|
|
17248
|
+
})(commonjsGlobal, __WEBPACK_EXTERNAL_MODULE_react__ => {
|
|
17249
|
+
return (
|
|
17250
|
+
/******/
|
|
17251
|
+
(() => {
|
|
17252
|
+
// webpackBootstrap
|
|
17253
|
+
|
|
17254
|
+
/******/
|
|
17255
|
+
var __webpack_modules__ = {
|
|
17256
|
+
/***/
|
|
17257
|
+
"./node_modules/css-mediaquery/index.js":
|
|
17258
|
+
/*!**********************************************!*\
|
|
17259
|
+
!*** ./node_modules/css-mediaquery/index.js ***!
|
|
17260
|
+
\**********************************************/
|
|
17261
|
+
|
|
17262
|
+
/***/
|
|
17263
|
+
(__unused_webpack_module, exports) => {
|
|
17264
|
+
/*
|
|
17265
|
+
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
|
|
17266
|
+
Copyrights licensed under the New BSD License.
|
|
17267
|
+
See the accompanying LICENSE file for terms.
|
|
17268
|
+
*/
|
|
17269
|
+
|
|
17270
|
+
exports.match = matchQuery;
|
|
17271
|
+
exports.parse = parseQuery; // -----------------------------------------------------------------------------
|
|
17272
|
+
|
|
17273
|
+
var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,
|
|
17274
|
+
RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,
|
|
17275
|
+
RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,
|
|
17276
|
+
RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,
|
|
17277
|
+
RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
|
|
17278
|
+
|
|
17279
|
+
function matchQuery(mediaQuery, values) {
|
|
17280
|
+
return parseQuery(mediaQuery).some(function (query) {
|
|
17281
|
+
var inverse = query.inverse; // Either the parsed or specified `type` is "all", or the types must be
|
|
17282
|
+
// equal for a match.
|
|
17283
|
+
|
|
17284
|
+
var typeMatch = query.type === 'all' || values.type === query.type; // Quit early when `type` doesn't match, but take "not" into account.
|
|
17285
|
+
|
|
17286
|
+
if (typeMatch && inverse || !(typeMatch || inverse)) {
|
|
17287
|
+
return false;
|
|
17288
|
+
}
|
|
16946
17289
|
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
useMediaQuery = function (settings, device, onChange) {
|
|
16953
|
-
var deviceSettings = useDevice(device),
|
|
16954
|
-
query = useQuery(settings);
|
|
16955
|
-
if (!query) throw new Error("Invalid or missing MediaQuery!");
|
|
16956
|
-
var mq = useMatchMedia(query, deviceSettings),
|
|
16957
|
-
matches = useMatches(mq),
|
|
16958
|
-
isUpdate = useIsUpdate();
|
|
16959
|
-
return react_1.default.useEffect(function () {
|
|
16960
|
-
isUpdate && onChange && onChange(matches);
|
|
16961
|
-
}, [matches]), react_1.default.useEffect(function () {
|
|
16962
|
-
return function () {
|
|
16963
|
-
mq && mq.dispose();
|
|
16964
|
-
};
|
|
16965
|
-
}, []), matches;
|
|
16966
|
-
};
|
|
17290
|
+
var expressionsMatch = query.expressions.every(function (expression) {
|
|
17291
|
+
var feature = expression.feature,
|
|
17292
|
+
modifier = expression.modifier,
|
|
17293
|
+
expValue = expression.value,
|
|
17294
|
+
value = values[feature]; // Missing or falsy values don't match.
|
|
16967
17295
|
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
}, function (module, __webpack_exports__, __webpack_require__) {
|
|
17296
|
+
if (!value) {
|
|
17297
|
+
return false;
|
|
17298
|
+
}
|
|
16972
17299
|
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
17300
|
+
switch (feature) {
|
|
17301
|
+
case 'orientation':
|
|
17302
|
+
case 'scan':
|
|
17303
|
+
return value.toLowerCase() === expValue.toLowerCase();
|
|
17304
|
+
|
|
17305
|
+
case 'width':
|
|
17306
|
+
case 'height':
|
|
17307
|
+
case 'device-width':
|
|
17308
|
+
case 'device-height':
|
|
17309
|
+
expValue = toPx(expValue);
|
|
17310
|
+
value = toPx(value);
|
|
17311
|
+
break;
|
|
17312
|
+
|
|
17313
|
+
case 'resolution':
|
|
17314
|
+
expValue = toDpi(expValue);
|
|
17315
|
+
value = toDpi(value);
|
|
17316
|
+
break;
|
|
17317
|
+
|
|
17318
|
+
case 'aspect-ratio':
|
|
17319
|
+
case 'device-aspect-ratio':
|
|
17320
|
+
case
|
|
17321
|
+
/* Deprecated */
|
|
17322
|
+
'device-pixel-ratio':
|
|
17323
|
+
expValue = toDecimal(expValue);
|
|
17324
|
+
value = toDecimal(value);
|
|
17325
|
+
break;
|
|
17326
|
+
|
|
17327
|
+
case 'grid':
|
|
17328
|
+
case 'color':
|
|
17329
|
+
case 'color-index':
|
|
17330
|
+
case 'monochrome':
|
|
17331
|
+
expValue = parseInt(expValue, 10) || 1;
|
|
17332
|
+
value = parseInt(value, 10) || 0;
|
|
17333
|
+
break;
|
|
17334
|
+
}
|
|
16976
17335
|
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
return cache[name] = msPattern.test(hName) ? "-" + hName : hName;
|
|
16981
|
-
}
|
|
17336
|
+
switch (modifier) {
|
|
17337
|
+
case 'min':
|
|
17338
|
+
return value >= expValue;
|
|
16982
17339
|
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
});
|
|
16986
|
-
var uppercasePattern = /[A-Z]/g,
|
|
16987
|
-
msPattern = /^ms-/,
|
|
16988
|
-
cache = {};
|
|
16989
|
-
__webpack_exports__.default = hyphenateStyleName;
|
|
16990
|
-
}, function (module, exports, __webpack_require__) {
|
|
16991
|
-
|
|
16992
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
|
16993
|
-
return mod && mod.__esModule ? mod : {
|
|
16994
|
-
default: mod
|
|
16995
|
-
};
|
|
16996
|
-
};
|
|
17340
|
+
case 'max':
|
|
17341
|
+
return value <= expValue;
|
|
16997
17342
|
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17343
|
+
default:
|
|
17344
|
+
return value === expValue;
|
|
17345
|
+
}
|
|
17346
|
+
});
|
|
17347
|
+
return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
|
17348
|
+
});
|
|
17349
|
+
}
|
|
17001
17350
|
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17351
|
+
function parseQuery(mediaQuery) {
|
|
17352
|
+
return mediaQuery.split(',').map(function (query) {
|
|
17353
|
+
query = query.trim();
|
|
17354
|
+
var captures = query.match(RE_MEDIA_QUERY),
|
|
17355
|
+
modifier = captures[1],
|
|
17356
|
+
type = captures[2],
|
|
17357
|
+
expressions = captures[3] || '',
|
|
17358
|
+
parsed = {};
|
|
17359
|
+
parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';
|
|
17360
|
+
parsed.type = type ? type.toLowerCase() : 'all'; // Split expressions into a list.
|
|
17361
|
+
|
|
17362
|
+
expressions = expressions.match(/\([^\)]+\)/g) || [];
|
|
17363
|
+
parsed.expressions = expressions.map(function (expression) {
|
|
17364
|
+
var captures = expression.match(RE_MQ_EXPRESSION),
|
|
17365
|
+
feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
|
|
17366
|
+
return {
|
|
17367
|
+
modifier: feature[1],
|
|
17368
|
+
feature: feature[2],
|
|
17369
|
+
value: captures[2]
|
|
17370
|
+
};
|
|
17371
|
+
});
|
|
17372
|
+
return parsed;
|
|
17373
|
+
});
|
|
17374
|
+
} // -- Utilities ----------------------------------------------------------------
|
|
17021
17375
|
|
|
17022
|
-
exports.default = toQuery;
|
|
17023
|
-
}, function (module, exports, __webpack_require__) {
|
|
17024
17376
|
|
|
17025
|
-
|
|
17026
|
-
|
|
17377
|
+
function toDecimal(ratio) {
|
|
17378
|
+
var decimal = Number(ratio),
|
|
17379
|
+
numbers;
|
|
17027
17380
|
|
|
17028
|
-
|
|
17029
|
-
|
|
17030
|
-
|
|
17031
|
-
|
|
17381
|
+
if (!decimal) {
|
|
17382
|
+
numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/);
|
|
17383
|
+
decimal = numbers[1] / numbers[2];
|
|
17384
|
+
}
|
|
17032
17385
|
|
|
17033
|
-
|
|
17034
|
-
|
|
17035
|
-
default: mod
|
|
17036
|
-
};
|
|
17037
|
-
};
|
|
17386
|
+
return decimal;
|
|
17387
|
+
}
|
|
17038
17388
|
|
|
17039
|
-
|
|
17040
|
-
|
|
17041
|
-
|
|
17389
|
+
function toDpi(resolution) {
|
|
17390
|
+
var value = parseFloat(resolution),
|
|
17391
|
+
units = String(resolution).match(RE_RESOLUTION_UNIT)[1];
|
|
17042
17392
|
|
|
17043
|
-
|
|
17044
|
-
|
|
17393
|
+
switch (units) {
|
|
17394
|
+
case 'dpcm':
|
|
17395
|
+
return value / 2.54;
|
|
17045
17396
|
|
|
17046
|
-
|
|
17047
|
-
|
|
17397
|
+
case 'dppx':
|
|
17398
|
+
return value * 96;
|
|
17048
17399
|
|
|
17049
|
-
|
|
17050
|
-
|
|
17051
|
-
|
|
17052
|
-
|
|
17053
|
-
};
|
|
17400
|
+
default:
|
|
17401
|
+
return value;
|
|
17402
|
+
}
|
|
17403
|
+
}
|
|
17054
17404
|
|
|
17055
|
-
|
|
17056
|
-
|
|
17057
|
-
|
|
17405
|
+
function toPx(length) {
|
|
17406
|
+
var value = parseFloat(length),
|
|
17407
|
+
units = String(length).match(RE_LENGTH_UNIT)[1];
|
|
17058
17408
|
|
|
17059
|
-
|
|
17409
|
+
switch (units) {
|
|
17410
|
+
case 'em':
|
|
17411
|
+
return value * 16;
|
|
17060
17412
|
|
|
17061
|
-
|
|
17413
|
+
case 'rem':
|
|
17414
|
+
return value * 16;
|
|
17062
17415
|
|
|
17063
|
-
|
|
17416
|
+
case 'cm':
|
|
17417
|
+
return value * 96 / 2.54;
|
|
17064
17418
|
|
|
17065
|
-
|
|
17419
|
+
case 'mm':
|
|
17420
|
+
return value * 96 / 2.54 / 10;
|
|
17066
17421
|
|
|
17067
|
-
|
|
17422
|
+
case 'in':
|
|
17423
|
+
return value * 96;
|
|
17068
17424
|
|
|
17069
|
-
|
|
17425
|
+
case 'pt':
|
|
17426
|
+
return value * 72;
|
|
17070
17427
|
|
|
17071
|
-
|
|
17428
|
+
case 'pc':
|
|
17429
|
+
return value * 72 / 12;
|
|
17072
17430
|
|
|
17073
|
-
|
|
17074
|
-
|
|
17431
|
+
default:
|
|
17432
|
+
return value;
|
|
17433
|
+
}
|
|
17434
|
+
}
|
|
17435
|
+
/***/
|
|
17075
17436
|
|
|
17076
|
-
|
|
17077
|
-
function addListener(listener) {
|
|
17078
|
-
mql && mql.addListener(listener);
|
|
17079
|
-
}
|
|
17437
|
+
},
|
|
17080
17438
|
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17439
|
+
/***/
|
|
17440
|
+
"./node_modules/hyphenate-style-name/index.js":
|
|
17441
|
+
/*!****************************************************!*\
|
|
17442
|
+
!*** ./node_modules/hyphenate-style-name/index.js ***!
|
|
17443
|
+
\****************************************************/
|
|
17084
17444
|
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
}
|
|
17445
|
+
/***/
|
|
17446
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17088
17447
|
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
}
|
|
17448
|
+
__webpack_require__.r(__webpack_exports__);
|
|
17449
|
+
/* harmony export */
|
|
17092
17450
|
|
|
17093
|
-
var self = this;
|
|
17094
17451
|
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17452
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
17453
|
+
/* harmony export */
|
|
17454
|
+
"default": () => __WEBPACK_DEFAULT_EXPORT__
|
|
17455
|
+
/* harmony export */
|
|
17099
17456
|
|
|
17100
|
-
|
|
17101
|
-
|
|
17457
|
+
});
|
|
17458
|
+
/* eslint-disable no-var, prefer-template */
|
|
17102
17459
|
|
|
17103
|
-
function matchMedia(query, values, forceStatic) {
|
|
17104
|
-
return new Mql(query, values, forceStatic);
|
|
17105
|
-
}
|
|
17106
17460
|
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
module.exports = matchMedia;
|
|
17111
|
-
}, function (module, exports, __webpack_require__) {
|
|
17112
|
-
|
|
17113
|
-
function matchQuery(mediaQuery, values) {
|
|
17114
|
-
return parseQuery(mediaQuery).some(function (query) {
|
|
17115
|
-
var inverse = query.inverse,
|
|
17116
|
-
typeMatch = "all" === query.type || values.type === query.type;
|
|
17117
|
-
if (typeMatch && inverse || !typeMatch && !inverse) return !1;
|
|
17118
|
-
var expressionsMatch = query.expressions.every(function (expression) {
|
|
17119
|
-
var feature = expression.feature,
|
|
17120
|
-
modifier = expression.modifier,
|
|
17121
|
-
expValue = expression.value,
|
|
17122
|
-
value = values[feature];
|
|
17123
|
-
if (!value) return !1;
|
|
17124
|
-
|
|
17125
|
-
switch (feature) {
|
|
17126
|
-
case "orientation":
|
|
17127
|
-
case "scan":
|
|
17128
|
-
return value.toLowerCase() === expValue.toLowerCase();
|
|
17129
|
-
|
|
17130
|
-
case "width":
|
|
17131
|
-
case "height":
|
|
17132
|
-
case "device-width":
|
|
17133
|
-
case "device-height":
|
|
17134
|
-
expValue = toPx(expValue), value = toPx(value);
|
|
17135
|
-
break;
|
|
17461
|
+
var uppercasePattern = /[A-Z]/g;
|
|
17462
|
+
var msPattern = /^ms-/;
|
|
17463
|
+
var cache = {};
|
|
17136
17464
|
|
|
17137
|
-
|
|
17138
|
-
|
|
17139
|
-
|
|
17465
|
+
function toHyphenLower(match) {
|
|
17466
|
+
return '-' + match.toLowerCase();
|
|
17467
|
+
}
|
|
17140
17468
|
|
|
17141
|
-
|
|
17142
|
-
|
|
17143
|
-
|
|
17144
|
-
|
|
17145
|
-
break;
|
|
17469
|
+
function hyphenateStyleName(name) {
|
|
17470
|
+
if (cache.hasOwnProperty(name)) {
|
|
17471
|
+
return cache[name];
|
|
17472
|
+
}
|
|
17146
17473
|
|
|
17147
|
-
|
|
17148
|
-
|
|
17149
|
-
case "color-index":
|
|
17150
|
-
case "monochrome":
|
|
17151
|
-
expValue = parseInt(expValue, 10) || 1, value = parseInt(value, 10) || 0;
|
|
17474
|
+
var hName = name.replace(uppercasePattern, toHyphenLower);
|
|
17475
|
+
return cache[name] = msPattern.test(hName) ? '-' + hName : hName;
|
|
17152
17476
|
}
|
|
17477
|
+
/* harmony default export */
|
|
17153
17478
|
|
|
17154
|
-
switch (modifier) {
|
|
17155
|
-
case "min":
|
|
17156
|
-
return value >= expValue;
|
|
17157
17479
|
|
|
17158
|
-
|
|
17159
|
-
|
|
17480
|
+
const __WEBPACK_DEFAULT_EXPORT__ = hyphenateStyleName;
|
|
17481
|
+
/***/
|
|
17482
|
+
},
|
|
17160
17483
|
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
});
|
|
17167
|
-
}
|
|
17484
|
+
/***/
|
|
17485
|
+
"./node_modules/matchmediaquery/index.js":
|
|
17486
|
+
/*!***********************************************!*\
|
|
17487
|
+
!*** ./node_modules/matchmediaquery/index.js ***!
|
|
17488
|
+
\***********************************************/
|
|
17168
17489
|
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
query = query.trim();
|
|
17172
|
-
var captures = query.match(RE_MEDIA_QUERY),
|
|
17173
|
-
modifier = captures[1],
|
|
17174
|
-
type = captures[2],
|
|
17175
|
-
expressions = captures[3] || "",
|
|
17176
|
-
parsed = {};
|
|
17177
|
-
return parsed.inverse = !!modifier && "not" === modifier.toLowerCase(), parsed.type = type ? type.toLowerCase() : "all", expressions = expressions.match(/\([^\)]+\)/g) || [], parsed.expressions = expressions.map(function (expression) {
|
|
17178
|
-
var captures = expression.match(RE_MQ_EXPRESSION),
|
|
17179
|
-
feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
|
|
17180
|
-
return {
|
|
17181
|
-
modifier: feature[1],
|
|
17182
|
-
feature: feature[2],
|
|
17183
|
-
value: captures[2]
|
|
17184
|
-
};
|
|
17185
|
-
}), parsed;
|
|
17186
|
-
});
|
|
17187
|
-
}
|
|
17490
|
+
/***/
|
|
17491
|
+
(module, __unused_webpack_exports, __webpack_require__) => {
|
|
17188
17492
|
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
17193
|
-
}
|
|
17493
|
+
var staticMatch = __webpack_require__(
|
|
17494
|
+
/*! css-mediaquery */
|
|
17495
|
+
"./node_modules/css-mediaquery/index.js").match;
|
|
17194
17496
|
|
|
17195
|
-
|
|
17196
|
-
var value = parseFloat(resolution);
|
|
17497
|
+
var dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null; // our fake MediaQueryList
|
|
17197
17498
|
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
return value / 2.54;
|
|
17499
|
+
function Mql(query, values, forceStatic) {
|
|
17500
|
+
var self = this;
|
|
17201
17501
|
|
|
17202
|
-
|
|
17203
|
-
|
|
17502
|
+
if (dynamicMatch && !forceStatic) {
|
|
17503
|
+
var mql = dynamicMatch.call(window, query);
|
|
17504
|
+
this.matches = mql.matches;
|
|
17505
|
+
this.media = mql.media; // TODO: is there a time it makes sense to remove this listener?
|
|
17204
17506
|
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17507
|
+
mql.addListener(update);
|
|
17508
|
+
} else {
|
|
17509
|
+
this.matches = staticMatch(query, values);
|
|
17510
|
+
this.media = query;
|
|
17511
|
+
}
|
|
17209
17512
|
|
|
17210
|
-
|
|
17211
|
-
|
|
17513
|
+
this.addListener = addListener;
|
|
17514
|
+
this.removeListener = removeListener;
|
|
17515
|
+
this.dispose = dispose;
|
|
17212
17516
|
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17517
|
+
function addListener(listener) {
|
|
17518
|
+
if (mql) {
|
|
17519
|
+
mql.addListener(listener);
|
|
17520
|
+
}
|
|
17521
|
+
}
|
|
17217
17522
|
|
|
17218
|
-
|
|
17219
|
-
|
|
17523
|
+
function removeListener(listener) {
|
|
17524
|
+
if (mql) {
|
|
17525
|
+
mql.removeListener(listener);
|
|
17526
|
+
}
|
|
17527
|
+
} // update ourselves!
|
|
17220
17528
|
|
|
17221
|
-
case "mm":
|
|
17222
|
-
return 96 * value / 2.54 / 10;
|
|
17223
17529
|
|
|
17224
|
-
|
|
17225
|
-
|
|
17530
|
+
function update(evt) {
|
|
17531
|
+
self.matches = evt.matches;
|
|
17532
|
+
self.media = evt.media;
|
|
17533
|
+
}
|
|
17226
17534
|
|
|
17227
|
-
|
|
17228
|
-
|
|
17535
|
+
function dispose() {
|
|
17536
|
+
if (mql) {
|
|
17537
|
+
mql.removeListener(update);
|
|
17538
|
+
}
|
|
17539
|
+
}
|
|
17540
|
+
}
|
|
17229
17541
|
|
|
17230
|
-
|
|
17231
|
-
|
|
17542
|
+
function matchMedia(query, values, forceStatic) {
|
|
17543
|
+
return new Mql(query, values, forceStatic);
|
|
17544
|
+
}
|
|
17232
17545
|
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
}
|
|
17546
|
+
module.exports = matchMedia;
|
|
17547
|
+
/***/
|
|
17548
|
+
},
|
|
17237
17549
|
|
|
17238
|
-
|
|
17239
|
-
|
|
17240
|
-
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
|
|
17244
|
-
|
|
17245
|
-
|
|
17246
|
-
|
|
17247
|
-
|
|
17248
|
-
|
|
17249
|
-
|
|
17250
|
-
|
|
17251
|
-
|
|
17252
|
-
|
|
17253
|
-
|
|
17254
|
-
|
|
17255
|
-
|
|
17256
|
-
|
|
17257
|
-
|
|
17550
|
+
/***/
|
|
17551
|
+
"./node_modules/object-assign/index.js":
|
|
17552
|
+
/*!*********************************************!*\
|
|
17553
|
+
!*** ./node_modules/object-assign/index.js ***!
|
|
17554
|
+
\*********************************************/
|
|
17555
|
+
|
|
17556
|
+
/***/
|
|
17557
|
+
module => {
|
|
17558
|
+
/*
|
|
17559
|
+
object-assign
|
|
17560
|
+
(c) Sindre Sorhus
|
|
17561
|
+
@license MIT
|
|
17562
|
+
*/
|
|
17563
|
+
|
|
17564
|
+
/* eslint-disable no-unused-vars */
|
|
17565
|
+
|
|
17566
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
17567
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
17568
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
17569
|
+
|
|
17570
|
+
function toObject(val) {
|
|
17571
|
+
if (val === null || val === undefined) {
|
|
17572
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
17573
|
+
}
|
|
17258
17574
|
|
|
17259
|
-
|
|
17260
|
-
|
|
17575
|
+
return Object(val);
|
|
17576
|
+
}
|
|
17261
17577
|
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
|
|
17266
|
-
|
|
17578
|
+
function shouldUseNative() {
|
|
17579
|
+
try {
|
|
17580
|
+
if (!Object.assign) {
|
|
17581
|
+
return false;
|
|
17582
|
+
} // Detect buggy property enumeration order in older V8 versions.
|
|
17583
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
17267
17584
|
|
|
17268
|
-
for (var i = 0; i < len; i++) if (arrA[i] !== arrB[i]) return !1;
|
|
17269
17585
|
|
|
17270
|
-
|
|
17271
|
-
}
|
|
17586
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
17272
17587
|
|
|
17273
|
-
|
|
17274
|
-
value: !0
|
|
17275
|
-
}), __webpack_require__.d(__webpack_exports__, "shallowEqualArrays", function () {
|
|
17276
|
-
return shallowEqualArrays;
|
|
17277
|
-
}), __webpack_require__.d(__webpack_exports__, "shallowEqualObjects", function () {
|
|
17278
|
-
return shallowEqualObjects;
|
|
17279
|
-
});
|
|
17280
|
-
}, function (module, exports, __webpack_require__) {
|
|
17588
|
+
test1[5] = 'de';
|
|
17281
17589
|
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
s = arguments[i];
|
|
17590
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
17591
|
+
return false;
|
|
17592
|
+
} // https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
17286
17593
|
|
|
17287
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
|
|
17288
|
-
}
|
|
17289
17594
|
|
|
17290
|
-
|
|
17291
|
-
}, __assign.apply(this, arguments);
|
|
17292
|
-
},
|
|
17293
|
-
__rest = this && this.__rest || function (s, e) {
|
|
17294
|
-
var t = {};
|
|
17595
|
+
var test2 = {};
|
|
17295
17596
|
|
|
17296
|
-
|
|
17597
|
+
for (var i = 0; i < 10; i++) {
|
|
17598
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
17599
|
+
}
|
|
17297
17600
|
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
__importDefault = this && this.__importDefault || function (mod) {
|
|
17302
|
-
return mod && mod.__esModule ? mod : {
|
|
17303
|
-
default: mod
|
|
17304
|
-
};
|
|
17305
|
-
};
|
|
17601
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
17602
|
+
return test2[n];
|
|
17603
|
+
});
|
|
17306
17604
|
|
|
17307
|
-
|
|
17308
|
-
|
|
17309
|
-
|
|
17605
|
+
if (order2.join('') !== '0123456789') {
|
|
17606
|
+
return false;
|
|
17607
|
+
} // https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
17310
17608
|
|
|
17311
|
-
var prop_types_1 = __importDefault(__webpack_require__(13)),
|
|
17312
|
-
stringOrNumber = prop_types_1.default.oneOfType([prop_types_1.default.string, prop_types_1.default.number]),
|
|
17313
|
-
types = {
|
|
17314
|
-
all: prop_types_1.default.bool,
|
|
17315
|
-
grid: prop_types_1.default.bool,
|
|
17316
|
-
aural: prop_types_1.default.bool,
|
|
17317
|
-
braille: prop_types_1.default.bool,
|
|
17318
|
-
handheld: prop_types_1.default.bool,
|
|
17319
|
-
print: prop_types_1.default.bool,
|
|
17320
|
-
projection: prop_types_1.default.bool,
|
|
17321
|
-
screen: prop_types_1.default.bool,
|
|
17322
|
-
tty: prop_types_1.default.bool,
|
|
17323
|
-
tv: prop_types_1.default.bool,
|
|
17324
|
-
embossed: prop_types_1.default.bool
|
|
17325
|
-
},
|
|
17326
|
-
matchers = {
|
|
17327
|
-
orientation: prop_types_1.default.oneOf(["portrait", "landscape"]),
|
|
17328
|
-
scan: prop_types_1.default.oneOf(["progressive", "interlace"]),
|
|
17329
|
-
aspectRatio: prop_types_1.default.string,
|
|
17330
|
-
deviceAspectRatio: prop_types_1.default.string,
|
|
17331
|
-
height: stringOrNumber,
|
|
17332
|
-
deviceHeight: stringOrNumber,
|
|
17333
|
-
width: stringOrNumber,
|
|
17334
|
-
deviceWidth: stringOrNumber,
|
|
17335
|
-
color: prop_types_1.default.bool,
|
|
17336
|
-
colorIndex: prop_types_1.default.bool,
|
|
17337
|
-
monochrome: prop_types_1.default.bool,
|
|
17338
|
-
resolution: stringOrNumber,
|
|
17339
|
-
type: Object.keys(types)
|
|
17340
|
-
},
|
|
17341
|
-
featureMatchers = __rest(matchers, ["type"]),
|
|
17342
|
-
features = __assign({
|
|
17343
|
-
minAspectRatio: prop_types_1.default.string,
|
|
17344
|
-
maxAspectRatio: prop_types_1.default.string,
|
|
17345
|
-
minDeviceAspectRatio: prop_types_1.default.string,
|
|
17346
|
-
maxDeviceAspectRatio: prop_types_1.default.string,
|
|
17347
|
-
minHeight: stringOrNumber,
|
|
17348
|
-
maxHeight: stringOrNumber,
|
|
17349
|
-
minDeviceHeight: stringOrNumber,
|
|
17350
|
-
maxDeviceHeight: stringOrNumber,
|
|
17351
|
-
minWidth: stringOrNumber,
|
|
17352
|
-
maxWidth: stringOrNumber,
|
|
17353
|
-
minDeviceWidth: stringOrNumber,
|
|
17354
|
-
maxDeviceWidth: stringOrNumber,
|
|
17355
|
-
minColor: prop_types_1.default.number,
|
|
17356
|
-
maxColor: prop_types_1.default.number,
|
|
17357
|
-
minColorIndex: prop_types_1.default.number,
|
|
17358
|
-
maxColorIndex: prop_types_1.default.number,
|
|
17359
|
-
minMonochrome: prop_types_1.default.number,
|
|
17360
|
-
maxMonochrome: prop_types_1.default.number,
|
|
17361
|
-
minResolution: stringOrNumber,
|
|
17362
|
-
maxResolution: stringOrNumber
|
|
17363
|
-
}, featureMatchers),
|
|
17364
|
-
all = __assign(__assign({}, types), features);
|
|
17365
|
-
|
|
17366
|
-
exports.default = {
|
|
17367
|
-
all: all,
|
|
17368
|
-
types: types,
|
|
17369
|
-
matchers: matchers,
|
|
17370
|
-
features: features
|
|
17371
|
-
};
|
|
17372
|
-
}, function (module, exports, __webpack_require__) {
|
|
17373
|
-
var ReactIs = __webpack_require__(4);
|
|
17374
17609
|
|
|
17375
|
-
|
|
17376
|
-
|
|
17610
|
+
var test3 = {};
|
|
17611
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
17612
|
+
test3[letter] = letter;
|
|
17613
|
+
});
|
|
17377
17614
|
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
}
|
|
17615
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
17616
|
+
return false;
|
|
17617
|
+
}
|
|
17382
17618
|
|
|
17383
|
-
|
|
17384
|
-
|
|
17385
|
-
|
|
17619
|
+
return true;
|
|
17620
|
+
} catch (err) {
|
|
17621
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
17622
|
+
return false;
|
|
17623
|
+
}
|
|
17624
|
+
}
|
|
17386
17625
|
|
|
17387
|
-
|
|
17388
|
-
|
|
17389
|
-
|
|
17626
|
+
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
17627
|
+
var from;
|
|
17628
|
+
var to = toObject(target);
|
|
17629
|
+
var symbols;
|
|
17390
17630
|
|
|
17391
|
-
|
|
17392
|
-
|
|
17393
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
17394
|
-
case REACT_FRAGMENT_TYPE:
|
|
17395
|
-
case REACT_PROFILER_TYPE:
|
|
17396
|
-
case REACT_STRICT_MODE_TYPE:
|
|
17397
|
-
case REACT_SUSPENSE_TYPE:
|
|
17398
|
-
return type;
|
|
17631
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
17632
|
+
from = Object(arguments[s]);
|
|
17399
17633
|
|
|
17400
|
-
|
|
17401
|
-
|
|
17634
|
+
for (var key in from) {
|
|
17635
|
+
if (hasOwnProperty.call(from, key)) {
|
|
17636
|
+
to[key] = from[key];
|
|
17637
|
+
}
|
|
17638
|
+
}
|
|
17402
17639
|
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
case REACT_FORWARD_REF_TYPE:
|
|
17406
|
-
case REACT_LAZY_TYPE:
|
|
17407
|
-
case REACT_MEMO_TYPE:
|
|
17408
|
-
case REACT_PROVIDER_TYPE:
|
|
17409
|
-
return $$typeofType;
|
|
17640
|
+
if (getOwnPropertySymbols) {
|
|
17641
|
+
symbols = getOwnPropertySymbols(from);
|
|
17410
17642
|
|
|
17411
|
-
|
|
17412
|
-
|
|
17643
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
17644
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
17645
|
+
to[symbols[i]] = from[symbols[i]];
|
|
17413
17646
|
}
|
|
17414
|
-
|
|
17647
|
+
}
|
|
17415
17648
|
}
|
|
17649
|
+
}
|
|
17416
17650
|
|
|
17417
|
-
|
|
17418
|
-
|
|
17419
|
-
|
|
17420
|
-
}
|
|
17421
|
-
}
|
|
17422
|
-
|
|
17423
|
-
function isAsyncMode(object) {
|
|
17424
|
-
return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0, 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.")), isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
17425
|
-
}
|
|
17651
|
+
return to;
|
|
17652
|
+
};
|
|
17653
|
+
/***/
|
|
17654
|
+
},
|
|
17426
17655
|
|
|
17427
|
-
|
|
17428
|
-
|
|
17429
|
-
|
|
17656
|
+
/***/
|
|
17657
|
+
"./node_modules/prop-types/checkPropTypes.js":
|
|
17658
|
+
/*!***************************************************!*\
|
|
17659
|
+
!*** ./node_modules/prop-types/checkPropTypes.js ***!
|
|
17660
|
+
\***************************************************/
|
|
17430
17661
|
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17662
|
+
/***/
|
|
17663
|
+
(module, __unused_webpack_exports, __webpack_require__) => {
|
|
17664
|
+
/**
|
|
17665
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
17666
|
+
*
|
|
17667
|
+
* This source code is licensed under the MIT license found in the
|
|
17668
|
+
* LICENSE file in the root directory of this source tree.
|
|
17669
|
+
*/
|
|
17434
17670
|
|
|
17435
|
-
|
|
17436
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
17437
|
-
}
|
|
17671
|
+
var printWarning = function () {};
|
|
17438
17672
|
|
|
17439
|
-
|
|
17440
|
-
|
|
17441
|
-
|
|
17673
|
+
{
|
|
17674
|
+
var ReactPropTypesSecret = __webpack_require__(
|
|
17675
|
+
/*! ./lib/ReactPropTypesSecret */
|
|
17676
|
+
"./node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
|
17442
17677
|
|
|
17443
|
-
|
|
17444
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
17445
|
-
}
|
|
17678
|
+
var loggedTypeFailures = {};
|
|
17446
17679
|
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17680
|
+
var has = __webpack_require__(
|
|
17681
|
+
/*! ./lib/has */
|
|
17682
|
+
"./node_modules/prop-types/lib/has.js");
|
|
17450
17683
|
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
}
|
|
17684
|
+
printWarning = function (text) {
|
|
17685
|
+
var message = 'Warning: ' + text;
|
|
17454
17686
|
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17687
|
+
if (typeof console !== 'undefined') {
|
|
17688
|
+
console.error(message);
|
|
17689
|
+
}
|
|
17458
17690
|
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17691
|
+
try {
|
|
17692
|
+
// --- Welcome to debugging React ---
|
|
17693
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
17694
|
+
// to find the callsite that caused this warning to fire.
|
|
17695
|
+
throw new Error(message);
|
|
17696
|
+
} catch (x) {
|
|
17697
|
+
/**/
|
|
17698
|
+
}
|
|
17699
|
+
};
|
|
17700
|
+
}
|
|
17701
|
+
/**
|
|
17702
|
+
* Assert that the values match with the type specs.
|
|
17703
|
+
* Error messages are memorized and will only be shown once.
|
|
17704
|
+
*
|
|
17705
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
17706
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
17707
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
17708
|
+
* @param {string} componentName Name of the component for error messages.
|
|
17709
|
+
* @param {?Function} getStack Returns the component stack.
|
|
17710
|
+
* @private
|
|
17711
|
+
*/
|
|
17712
|
+
|
|
17713
|
+
|
|
17714
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
17715
|
+
{
|
|
17716
|
+
for (var typeSpecName in typeSpecs) {
|
|
17717
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
17718
|
+
var error; // Prop type validation may throw. In case they do, we don't want to
|
|
17719
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
17720
|
+
// After these have been cleaned up, we'll let them throw.
|
|
17721
|
+
|
|
17722
|
+
try {
|
|
17723
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
17724
|
+
// behavior as without this statement except with a better message.
|
|
17725
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
17726
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
17727
|
+
err.name = 'Invariant Violation';
|
|
17728
|
+
throw err;
|
|
17729
|
+
}
|
|
17730
|
+
|
|
17731
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
17732
|
+
} catch (ex) {
|
|
17733
|
+
error = ex;
|
|
17734
|
+
}
|
|
17462
17735
|
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17736
|
+
if (error && !(error instanceof Error)) {
|
|
17737
|
+
printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
|
|
17738
|
+
}
|
|
17466
17739
|
|
|
17467
|
-
|
|
17468
|
-
|
|
17469
|
-
|
|
17740
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
17741
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
17742
|
+
// same error.
|
|
17743
|
+
loggedTypeFailures[error.message] = true;
|
|
17744
|
+
var stack = getStack ? getStack() : '';
|
|
17745
|
+
printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
|
|
17746
|
+
}
|
|
17747
|
+
}
|
|
17748
|
+
}
|
|
17749
|
+
}
|
|
17750
|
+
}
|
|
17751
|
+
/**
|
|
17752
|
+
* Resets warning cache when testing.
|
|
17753
|
+
*
|
|
17754
|
+
* @private
|
|
17755
|
+
*/
|
|
17470
17756
|
|
|
17471
|
-
function isSuspense(object) {
|
|
17472
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
17473
|
-
}
|
|
17474
17757
|
|
|
17475
|
-
|
|
17476
|
-
|
|
17477
|
-
|
|
17478
|
-
|
|
17479
|
-
|
|
17480
|
-
REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
|
|
17481
|
-
REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
|
|
17482
|
-
REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
|
|
17483
|
-
REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111,
|
|
17484
|
-
REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111,
|
|
17485
|
-
REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
|
|
17486
|
-
REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
|
|
17487
|
-
REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120,
|
|
17488
|
-
REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
|
|
17489
|
-
REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116,
|
|
17490
|
-
REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121,
|
|
17491
|
-
REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117,
|
|
17492
|
-
REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118,
|
|
17493
|
-
REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119,
|
|
17494
|
-
AsyncMode = REACT_ASYNC_MODE_TYPE,
|
|
17495
|
-
ConcurrentMode = REACT_CONCURRENT_MODE_TYPE,
|
|
17496
|
-
ContextConsumer = REACT_CONTEXT_TYPE,
|
|
17497
|
-
ContextProvider = REACT_PROVIDER_TYPE,
|
|
17498
|
-
Element = REACT_ELEMENT_TYPE,
|
|
17499
|
-
ForwardRef = REACT_FORWARD_REF_TYPE,
|
|
17500
|
-
Fragment = REACT_FRAGMENT_TYPE,
|
|
17501
|
-
Lazy = REACT_LAZY_TYPE,
|
|
17502
|
-
Memo = REACT_MEMO_TYPE,
|
|
17503
|
-
Portal = REACT_PORTAL_TYPE,
|
|
17504
|
-
Profiler = REACT_PROFILER_TYPE,
|
|
17505
|
-
StrictMode = REACT_STRICT_MODE_TYPE,
|
|
17506
|
-
Suspense = REACT_SUSPENSE_TYPE,
|
|
17507
|
-
hasWarnedAboutDeprecatedIsAsyncMode = !1;
|
|
17508
|
-
exports.AsyncMode = AsyncMode, exports.ConcurrentMode = ConcurrentMode, exports.ContextConsumer = ContextConsumer, exports.ContextProvider = ContextProvider, exports.Element = Element, exports.ForwardRef = ForwardRef, exports.Fragment = Fragment, exports.Lazy = Lazy, exports.Memo = Memo, exports.Portal = Portal, exports.Profiler = Profiler, exports.StrictMode = StrictMode, exports.Suspense = Suspense, exports.isAsyncMode = isAsyncMode, exports.isConcurrentMode = isConcurrentMode, exports.isContextConsumer = isContextConsumer, exports.isContextProvider = isContextProvider, exports.isElement = isElement, exports.isForwardRef = isForwardRef, exports.isFragment = isFragment, exports.isLazy = isLazy, exports.isMemo = isMemo, exports.isPortal = isPortal, exports.isProfiler = isProfiler, exports.isStrictMode = isStrictMode, exports.isSuspense = isSuspense, exports.isValidElementType = isValidElementType, exports.typeOf = typeOf;
|
|
17509
|
-
}();
|
|
17510
|
-
}, function (module, exports, __webpack_require__) {
|
|
17511
|
-
|
|
17512
|
-
function emptyFunctionThatReturnsNull() {
|
|
17513
|
-
return null;
|
|
17514
|
-
}
|
|
17758
|
+
checkPropTypes.resetWarningCache = function () {
|
|
17759
|
+
{
|
|
17760
|
+
loggedTypeFailures = {};
|
|
17761
|
+
}
|
|
17762
|
+
};
|
|
17515
17763
|
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
has = __webpack_require__(6),
|
|
17520
|
-
checkPropTypes = __webpack_require__(17),
|
|
17521
|
-
printWarning = function () {};
|
|
17764
|
+
module.exports = checkPropTypes;
|
|
17765
|
+
/***/
|
|
17766
|
+
},
|
|
17522
17767
|
|
|
17523
|
-
|
|
17524
|
-
|
|
17525
|
-
|
|
17768
|
+
/***/
|
|
17769
|
+
"./node_modules/prop-types/factoryWithTypeCheckers.js":
|
|
17770
|
+
/*!************************************************************!*\
|
|
17771
|
+
!*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!
|
|
17772
|
+
\************************************************************/
|
|
17773
|
+
|
|
17774
|
+
/***/
|
|
17775
|
+
(module, __unused_webpack_exports, __webpack_require__) => {
|
|
17776
|
+
/**
|
|
17777
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
17778
|
+
*
|
|
17779
|
+
* This source code is licensed under the MIT license found in the
|
|
17780
|
+
* LICENSE file in the root directory of this source tree.
|
|
17781
|
+
*/
|
|
17782
|
+
|
|
17783
|
+
var ReactIs = __webpack_require__(
|
|
17784
|
+
/*! react-is */
|
|
17785
|
+
"./node_modules/react-is/index.js");
|
|
17786
|
+
|
|
17787
|
+
var assign = __webpack_require__(
|
|
17788
|
+
/*! object-assign */
|
|
17789
|
+
"./node_modules/object-assign/index.js");
|
|
17790
|
+
|
|
17791
|
+
var ReactPropTypesSecret = __webpack_require__(
|
|
17792
|
+
/*! ./lib/ReactPropTypesSecret */
|
|
17793
|
+
"./node_modules/prop-types/lib/ReactPropTypesSecret.js");
|
|
17794
|
+
|
|
17795
|
+
var has = __webpack_require__(
|
|
17796
|
+
/*! ./lib/has */
|
|
17797
|
+
"./node_modules/prop-types/lib/has.js");
|
|
17798
|
+
|
|
17799
|
+
var checkPropTypes = __webpack_require__(
|
|
17800
|
+
/*! ./checkPropTypes */
|
|
17801
|
+
"./node_modules/prop-types/checkPropTypes.js");
|
|
17802
|
+
|
|
17803
|
+
var printWarning = function () {};
|
|
17804
|
+
|
|
17805
|
+
{
|
|
17806
|
+
printWarning = function (text) {
|
|
17807
|
+
var message = 'Warning: ' + text;
|
|
17808
|
+
|
|
17809
|
+
if (typeof console !== 'undefined') {
|
|
17810
|
+
console.error(message);
|
|
17811
|
+
}
|
|
17526
17812
|
|
|
17527
|
-
|
|
17528
|
-
|
|
17529
|
-
|
|
17530
|
-
|
|
17531
|
-
|
|
17532
|
-
|
|
17533
|
-
|
|
17534
|
-
|
|
17813
|
+
try {
|
|
17814
|
+
// --- Welcome to debugging React ---
|
|
17815
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
17816
|
+
// to find the callsite that caused this warning to fire.
|
|
17817
|
+
throw new Error(message);
|
|
17818
|
+
} catch (x) {}
|
|
17819
|
+
};
|
|
17820
|
+
}
|
|
17535
17821
|
|
|
17536
|
-
|
|
17537
|
-
|
|
17538
|
-
|
|
17822
|
+
function emptyFunctionThatReturnsNull() {
|
|
17823
|
+
return null;
|
|
17824
|
+
}
|
|
17539
17825
|
|
|
17540
|
-
|
|
17541
|
-
|
|
17542
|
-
|
|
17826
|
+
module.exports = function (isValidElement, throwOnDirectAccess) {
|
|
17827
|
+
/* global Symbol */
|
|
17828
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
17829
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
17830
|
+
|
|
17831
|
+
/**
|
|
17832
|
+
* Returns the iterator method function contained on the iterable object.
|
|
17833
|
+
*
|
|
17834
|
+
* Be sure to invoke the function with the iterable as context:
|
|
17835
|
+
*
|
|
17836
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
17837
|
+
* if (iteratorFn) {
|
|
17838
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
17839
|
+
* ...
|
|
17840
|
+
* }
|
|
17841
|
+
*
|
|
17842
|
+
* @param {?object} maybeIterable
|
|
17843
|
+
* @return {?function}
|
|
17844
|
+
*/
|
|
17845
|
+
|
|
17846
|
+
function getIteratorFn(maybeIterable) {
|
|
17847
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
17848
|
+
|
|
17849
|
+
if (typeof iteratorFn === 'function') {
|
|
17850
|
+
return iteratorFn;
|
|
17851
|
+
}
|
|
17852
|
+
}
|
|
17853
|
+
/**
|
|
17854
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
17855
|
+
* supplied to React components. Example usage:
|
|
17856
|
+
*
|
|
17857
|
+
* var Props = require('ReactPropTypes');
|
|
17858
|
+
* var MyArticle = React.createClass({
|
|
17859
|
+
* propTypes: {
|
|
17860
|
+
* // An optional string prop named "description".
|
|
17861
|
+
* description: Props.string,
|
|
17862
|
+
*
|
|
17863
|
+
* // A required enum prop named "category".
|
|
17864
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
17865
|
+
*
|
|
17866
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
17867
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
17868
|
+
* },
|
|
17869
|
+
* render: function() { ... }
|
|
17870
|
+
* });
|
|
17871
|
+
*
|
|
17872
|
+
* A more formal specification of how these methods are used:
|
|
17873
|
+
*
|
|
17874
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
17875
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
17876
|
+
*
|
|
17877
|
+
* Each and every declaration produces a function with the same signature. This
|
|
17878
|
+
* allows the creation of custom validation functions. For example:
|
|
17879
|
+
*
|
|
17880
|
+
* var MyLink = React.createClass({
|
|
17881
|
+
* propTypes: {
|
|
17882
|
+
* // An optional string or URI prop named "href".
|
|
17883
|
+
* href: function(props, propName, componentName) {
|
|
17884
|
+
* var propValue = props[propName];
|
|
17885
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
17886
|
+
* !(propValue instanceof URI)) {
|
|
17887
|
+
* return new Error(
|
|
17888
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
17889
|
+
* componentName
|
|
17890
|
+
* );
|
|
17891
|
+
* }
|
|
17892
|
+
* }
|
|
17893
|
+
* },
|
|
17894
|
+
* render: function() {...}
|
|
17895
|
+
* });
|
|
17896
|
+
*
|
|
17897
|
+
* @internal
|
|
17898
|
+
*/
|
|
17899
|
+
|
|
17900
|
+
|
|
17901
|
+
var ANONYMOUS = '<<anonymous>>'; // Important!
|
|
17902
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
17903
|
+
|
|
17904
|
+
var ReactPropTypes = {
|
|
17905
|
+
array: createPrimitiveTypeChecker('array'),
|
|
17906
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
17907
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
17908
|
+
func: createPrimitiveTypeChecker('function'),
|
|
17909
|
+
number: createPrimitiveTypeChecker('number'),
|
|
17910
|
+
object: createPrimitiveTypeChecker('object'),
|
|
17911
|
+
string: createPrimitiveTypeChecker('string'),
|
|
17912
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
17913
|
+
any: createAnyTypeChecker(),
|
|
17914
|
+
arrayOf: createArrayOfTypeChecker,
|
|
17915
|
+
element: createElementTypeChecker(),
|
|
17916
|
+
elementType: createElementTypeTypeChecker(),
|
|
17917
|
+
instanceOf: createInstanceTypeChecker,
|
|
17918
|
+
node: createNodeChecker(),
|
|
17919
|
+
objectOf: createObjectOfTypeChecker,
|
|
17920
|
+
oneOf: createEnumTypeChecker,
|
|
17921
|
+
oneOfType: createUnionTypeChecker,
|
|
17922
|
+
shape: createShapeTypeChecker,
|
|
17923
|
+
exact: createStrictShapeTypeChecker
|
|
17924
|
+
};
|
|
17925
|
+
/**
|
|
17926
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
17927
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
17928
|
+
*/
|
|
17929
|
+
|
|
17930
|
+
/*eslint-disable no-self-compare*/
|
|
17931
|
+
|
|
17932
|
+
function is(x, y) {
|
|
17933
|
+
// SameValue algorithm
|
|
17934
|
+
if (x === y) {
|
|
17935
|
+
// Steps 1-5, 7-10
|
|
17936
|
+
// Steps 6.b-6.e: +0 != -0
|
|
17937
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
17938
|
+
} else {
|
|
17939
|
+
// Step 6.a: NaN == NaN
|
|
17940
|
+
return x !== x && y !== y;
|
|
17941
|
+
}
|
|
17942
|
+
}
|
|
17943
|
+
/*eslint-enable no-self-compare*/
|
|
17944
|
+
|
|
17945
|
+
/**
|
|
17946
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
17947
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
17948
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
17949
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
17950
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
17951
|
+
*/
|
|
17952
|
+
|
|
17953
|
+
|
|
17954
|
+
function PropTypeError(message, data) {
|
|
17955
|
+
this.message = message;
|
|
17956
|
+
this.data = data && typeof data === 'object' ? data : {};
|
|
17957
|
+
this.stack = '';
|
|
17958
|
+
} // Make `instanceof Error` still work for returned errors.
|
|
17543
17959
|
|
|
17544
|
-
|
|
17545
|
-
|
|
17546
|
-
|
|
17547
|
-
|
|
17548
|
-
|
|
17549
|
-
|
|
17960
|
+
|
|
17961
|
+
PropTypeError.prototype = Error.prototype;
|
|
17962
|
+
|
|
17963
|
+
function createChainableTypeChecker(validate) {
|
|
17964
|
+
{
|
|
17965
|
+
var manualPropTypeCallCache = {};
|
|
17966
|
+
var manualPropTypeWarningCount = 0;
|
|
17967
|
+
}
|
|
17968
|
+
|
|
17969
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
17970
|
+
componentName = componentName || ANONYMOUS;
|
|
17971
|
+
propFullName = propFullName || propName;
|
|
17972
|
+
|
|
17973
|
+
if (secret !== ReactPropTypesSecret) {
|
|
17974
|
+
if (throwOnDirectAccess) {
|
|
17975
|
+
// New behavior only for users of `prop-types` package
|
|
17976
|
+
var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
|
17977
|
+
err.name = 'Invariant Violation';
|
|
17978
|
+
throw err;
|
|
17979
|
+
} else if ( typeof console !== 'undefined') {
|
|
17980
|
+
// Old behavior for people using React.PropTypes
|
|
17981
|
+
var cacheKey = componentName + ':' + propName;
|
|
17982
|
+
|
|
17983
|
+
if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
17984
|
+
manualPropTypeWarningCount < 3) {
|
|
17985
|
+
printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
|
|
17986
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
17987
|
+
manualPropTypeWarningCount++;
|
|
17988
|
+
}
|
|
17989
|
+
}
|
|
17990
|
+
}
|
|
17991
|
+
|
|
17992
|
+
if (props[propName] == null) {
|
|
17993
|
+
if (isRequired) {
|
|
17994
|
+
if (props[propName] === null) {
|
|
17995
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
17996
|
+
}
|
|
17997
|
+
|
|
17998
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
17999
|
+
}
|
|
18000
|
+
|
|
18001
|
+
return null;
|
|
18002
|
+
} else {
|
|
18003
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
18004
|
+
}
|
|
18005
|
+
}
|
|
18006
|
+
|
|
18007
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
18008
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
18009
|
+
return chainedCheckType;
|
|
17550
18010
|
}
|
|
17551
18011
|
|
|
17552
|
-
|
|
17553
|
-
|
|
17554
|
-
|
|
18012
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
18013
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
18014
|
+
var propValue = props[propName];
|
|
18015
|
+
var propType = getPropType(propValue);
|
|
18016
|
+
|
|
18017
|
+
if (propType !== expectedType) {
|
|
18018
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
18019
|
+
// check, but we can offer a more precise error message here rather than
|
|
18020
|
+
// 'of type `object`'.
|
|
18021
|
+
var preciseType = getPreciseType(propValue);
|
|
18022
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
|
|
18023
|
+
expectedType: expectedType
|
|
18024
|
+
});
|
|
18025
|
+
}
|
|
18026
|
+
|
|
18027
|
+
return null;
|
|
18028
|
+
}
|
|
18029
|
+
|
|
18030
|
+
return createChainableTypeChecker(validate);
|
|
17555
18031
|
}
|
|
17556
|
-
}
|
|
17557
18032
|
|
|
17558
|
-
|
|
17559
|
-
|
|
18033
|
+
function createAnyTypeChecker() {
|
|
18034
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
18035
|
+
}
|
|
17560
18036
|
|
|
17561
|
-
|
|
17562
|
-
|
|
17563
|
-
|
|
17564
|
-
|
|
17565
|
-
|
|
18037
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
18038
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18039
|
+
if (typeof typeChecker !== 'function') {
|
|
18040
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
18041
|
+
}
|
|
17566
18042
|
|
|
17567
|
-
|
|
17568
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
17569
|
-
var propValue = props[propName];
|
|
17570
|
-
if (getPropType(propValue) !== expectedType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPreciseType(propValue) + "` supplied to `" + componentName + "`, expected `" + expectedType + "`.", {
|
|
17571
|
-
expectedType: expectedType
|
|
17572
|
-
});
|
|
17573
|
-
return null;
|
|
17574
|
-
}
|
|
18043
|
+
var propValue = props[propName];
|
|
17575
18044
|
|
|
17576
|
-
|
|
17577
|
-
|
|
18045
|
+
if (!Array.isArray(propValue)) {
|
|
18046
|
+
var propType = getPropType(propValue);
|
|
18047
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
18048
|
+
}
|
|
18049
|
+
|
|
18050
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
18051
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
18052
|
+
|
|
18053
|
+
if (error instanceof Error) {
|
|
18054
|
+
return error;
|
|
18055
|
+
}
|
|
18056
|
+
}
|
|
18057
|
+
|
|
18058
|
+
return null;
|
|
18059
|
+
}
|
|
18060
|
+
|
|
18061
|
+
return createChainableTypeChecker(validate);
|
|
18062
|
+
}
|
|
18063
|
+
|
|
18064
|
+
function createElementTypeChecker() {
|
|
18065
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18066
|
+
var propValue = props[propName];
|
|
18067
|
+
|
|
18068
|
+
if (!isValidElement(propValue)) {
|
|
18069
|
+
var propType = getPropType(propValue);
|
|
18070
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
18071
|
+
}
|
|
18072
|
+
|
|
18073
|
+
return null;
|
|
18074
|
+
}
|
|
18075
|
+
|
|
18076
|
+
return createChainableTypeChecker(validate);
|
|
18077
|
+
}
|
|
18078
|
+
|
|
18079
|
+
function createElementTypeTypeChecker() {
|
|
18080
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18081
|
+
var propValue = props[propName];
|
|
18082
|
+
|
|
18083
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
18084
|
+
var propType = getPropType(propValue);
|
|
18085
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
18086
|
+
}
|
|
18087
|
+
|
|
18088
|
+
return null;
|
|
18089
|
+
}
|
|
18090
|
+
|
|
18091
|
+
return createChainableTypeChecker(validate);
|
|
18092
|
+
}
|
|
18093
|
+
|
|
18094
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
18095
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18096
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
18097
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
18098
|
+
var actualClassName = getClassName(props[propName]);
|
|
18099
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
18100
|
+
}
|
|
18101
|
+
|
|
18102
|
+
return null;
|
|
18103
|
+
}
|
|
18104
|
+
|
|
18105
|
+
return createChainableTypeChecker(validate);
|
|
18106
|
+
}
|
|
18107
|
+
|
|
18108
|
+
function createEnumTypeChecker(expectedValues) {
|
|
18109
|
+
if (!Array.isArray(expectedValues)) {
|
|
18110
|
+
{
|
|
18111
|
+
if (arguments.length > 1) {
|
|
18112
|
+
printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
|
|
18113
|
+
} else {
|
|
18114
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
18115
|
+
}
|
|
18116
|
+
}
|
|
18117
|
+
|
|
18118
|
+
return emptyFunctionThatReturnsNull;
|
|
18119
|
+
}
|
|
18120
|
+
|
|
18121
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18122
|
+
var propValue = props[propName];
|
|
18123
|
+
|
|
18124
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
18125
|
+
if (is(propValue, expectedValues[i])) {
|
|
18126
|
+
return null;
|
|
18127
|
+
}
|
|
18128
|
+
}
|
|
18129
|
+
|
|
18130
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
18131
|
+
var type = getPreciseType(value);
|
|
18132
|
+
|
|
18133
|
+
if (type === 'symbol') {
|
|
18134
|
+
return String(value);
|
|
18135
|
+
}
|
|
18136
|
+
|
|
18137
|
+
return value;
|
|
18138
|
+
});
|
|
18139
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
18140
|
+
}
|
|
18141
|
+
|
|
18142
|
+
return createChainableTypeChecker(validate);
|
|
18143
|
+
}
|
|
18144
|
+
|
|
18145
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
18146
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18147
|
+
if (typeof typeChecker !== 'function') {
|
|
18148
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
18149
|
+
}
|
|
18150
|
+
|
|
18151
|
+
var propValue = props[propName];
|
|
18152
|
+
var propType = getPropType(propValue);
|
|
18153
|
+
|
|
18154
|
+
if (propType !== 'object') {
|
|
18155
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
18156
|
+
}
|
|
18157
|
+
|
|
18158
|
+
for (var key in propValue) {
|
|
18159
|
+
if (has(propValue, key)) {
|
|
18160
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
18161
|
+
|
|
18162
|
+
if (error instanceof Error) {
|
|
18163
|
+
return error;
|
|
18164
|
+
}
|
|
18165
|
+
}
|
|
18166
|
+
}
|
|
18167
|
+
|
|
18168
|
+
return null;
|
|
18169
|
+
}
|
|
18170
|
+
|
|
18171
|
+
return createChainableTypeChecker(validate);
|
|
18172
|
+
}
|
|
18173
|
+
|
|
18174
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
18175
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
18176
|
+
printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') ;
|
|
18177
|
+
return emptyFunctionThatReturnsNull;
|
|
18178
|
+
}
|
|
18179
|
+
|
|
18180
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
18181
|
+
var checker = arrayOfTypeCheckers[i];
|
|
18182
|
+
|
|
18183
|
+
if (typeof checker !== 'function') {
|
|
18184
|
+
printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
|
|
18185
|
+
return emptyFunctionThatReturnsNull;
|
|
18186
|
+
}
|
|
18187
|
+
}
|
|
18188
|
+
|
|
18189
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18190
|
+
var expectedTypes = [];
|
|
18191
|
+
|
|
18192
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
18193
|
+
var checker = arrayOfTypeCheckers[i];
|
|
18194
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
18195
|
+
|
|
18196
|
+
if (checkerResult == null) {
|
|
18197
|
+
return null;
|
|
18198
|
+
}
|
|
18199
|
+
|
|
18200
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
18201
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
18202
|
+
}
|
|
18203
|
+
}
|
|
18204
|
+
|
|
18205
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
|
|
18206
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
18207
|
+
}
|
|
18208
|
+
|
|
18209
|
+
return createChainableTypeChecker(validate);
|
|
18210
|
+
}
|
|
18211
|
+
|
|
18212
|
+
function createNodeChecker() {
|
|
18213
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18214
|
+
if (!isNode(props[propName])) {
|
|
18215
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
18216
|
+
}
|
|
18217
|
+
|
|
18218
|
+
return null;
|
|
18219
|
+
}
|
|
18220
|
+
|
|
18221
|
+
return createChainableTypeChecker(validate);
|
|
18222
|
+
}
|
|
18223
|
+
|
|
18224
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
18225
|
+
return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
|
|
18226
|
+
}
|
|
18227
|
+
|
|
18228
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
18229
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18230
|
+
var propValue = props[propName];
|
|
18231
|
+
var propType = getPropType(propValue);
|
|
17578
18232
|
|
|
17579
|
-
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
18233
|
+
if (propType !== 'object') {
|
|
18234
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
18235
|
+
}
|
|
18236
|
+
|
|
18237
|
+
for (var key in shapeTypes) {
|
|
18238
|
+
var checker = shapeTypes[key];
|
|
18239
|
+
|
|
18240
|
+
if (typeof checker !== 'function') {
|
|
18241
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
18242
|
+
}
|
|
18243
|
+
|
|
18244
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
18245
|
+
|
|
18246
|
+
if (error) {
|
|
18247
|
+
return error;
|
|
18248
|
+
}
|
|
18249
|
+
}
|
|
18250
|
+
|
|
18251
|
+
return null;
|
|
18252
|
+
}
|
|
18253
|
+
|
|
18254
|
+
return createChainableTypeChecker(validate);
|
|
18255
|
+
}
|
|
18256
|
+
|
|
18257
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
18258
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
18259
|
+
var propValue = props[propName];
|
|
18260
|
+
var propType = getPropType(propValue);
|
|
18261
|
+
|
|
18262
|
+
if (propType !== 'object') {
|
|
18263
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
18264
|
+
} // We need to check all keys in case some are required but missing from props.
|
|
18265
|
+
|
|
18266
|
+
|
|
18267
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
18268
|
+
|
|
18269
|
+
for (var key in allKeys) {
|
|
18270
|
+
var checker = shapeTypes[key];
|
|
18271
|
+
|
|
18272
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
18273
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
18274
|
+
}
|
|
18275
|
+
|
|
18276
|
+
if (!checker) {
|
|
18277
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
|
|
18278
|
+
}
|
|
18279
|
+
|
|
18280
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
18281
|
+
|
|
18282
|
+
if (error) {
|
|
18283
|
+
return error;
|
|
18284
|
+
}
|
|
18285
|
+
}
|
|
18286
|
+
|
|
18287
|
+
return null;
|
|
18288
|
+
}
|
|
18289
|
+
|
|
18290
|
+
return createChainableTypeChecker(validate);
|
|
18291
|
+
}
|
|
18292
|
+
|
|
18293
|
+
function isNode(propValue) {
|
|
18294
|
+
switch (typeof propValue) {
|
|
18295
|
+
case 'number':
|
|
18296
|
+
case 'string':
|
|
18297
|
+
case 'undefined':
|
|
18298
|
+
return true;
|
|
18299
|
+
|
|
18300
|
+
case 'boolean':
|
|
18301
|
+
return !propValue;
|
|
18302
|
+
|
|
18303
|
+
case 'object':
|
|
18304
|
+
if (Array.isArray(propValue)) {
|
|
18305
|
+
return propValue.every(isNode);
|
|
18306
|
+
}
|
|
18307
|
+
|
|
18308
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
18309
|
+
return true;
|
|
18310
|
+
}
|
|
18311
|
+
|
|
18312
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
18313
|
+
|
|
18314
|
+
if (iteratorFn) {
|
|
18315
|
+
var iterator = iteratorFn.call(propValue);
|
|
18316
|
+
var step;
|
|
18317
|
+
|
|
18318
|
+
if (iteratorFn !== propValue.entries) {
|
|
18319
|
+
while (!(step = iterator.next()).done) {
|
|
18320
|
+
if (!isNode(step.value)) {
|
|
18321
|
+
return false;
|
|
18322
|
+
}
|
|
18323
|
+
}
|
|
18324
|
+
} else {
|
|
18325
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
18326
|
+
while (!(step = iterator.next()).done) {
|
|
18327
|
+
var entry = step.value;
|
|
18328
|
+
|
|
18329
|
+
if (entry) {
|
|
18330
|
+
if (!isNode(entry[1])) {
|
|
18331
|
+
return false;
|
|
18332
|
+
}
|
|
18333
|
+
}
|
|
18334
|
+
}
|
|
18335
|
+
}
|
|
18336
|
+
} else {
|
|
18337
|
+
return false;
|
|
18338
|
+
}
|
|
18339
|
+
|
|
18340
|
+
return true;
|
|
18341
|
+
|
|
18342
|
+
default:
|
|
18343
|
+
return false;
|
|
18344
|
+
}
|
|
18345
|
+
}
|
|
18346
|
+
|
|
18347
|
+
function isSymbol(propType, propValue) {
|
|
18348
|
+
// Native Symbol.
|
|
18349
|
+
if (propType === 'symbol') {
|
|
18350
|
+
return true;
|
|
18351
|
+
} // falsy value can't be a Symbol
|
|
18352
|
+
|
|
18353
|
+
|
|
18354
|
+
if (!propValue) {
|
|
18355
|
+
return false;
|
|
18356
|
+
} // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
18357
|
+
|
|
18358
|
+
|
|
18359
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
18360
|
+
return true;
|
|
18361
|
+
} // Fallback for non-spec compliant Symbols which are polyfilled.
|
|
18362
|
+
|
|
18363
|
+
|
|
18364
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
18365
|
+
return true;
|
|
18366
|
+
}
|
|
18367
|
+
|
|
18368
|
+
return false;
|
|
18369
|
+
} // Equivalent of `typeof` but with special handling for array and regexp.
|
|
18370
|
+
|
|
18371
|
+
|
|
18372
|
+
function getPropType(propValue) {
|
|
18373
|
+
var propType = typeof propValue;
|
|
18374
|
+
|
|
18375
|
+
if (Array.isArray(propValue)) {
|
|
18376
|
+
return 'array';
|
|
18377
|
+
}
|
|
18378
|
+
|
|
18379
|
+
if (propValue instanceof RegExp) {
|
|
18380
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
18381
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
18382
|
+
// passes PropTypes.object.
|
|
18383
|
+
return 'object';
|
|
18384
|
+
}
|
|
18385
|
+
|
|
18386
|
+
if (isSymbol(propType, propValue)) {
|
|
18387
|
+
return 'symbol';
|
|
18388
|
+
}
|
|
18389
|
+
|
|
18390
|
+
return propType;
|
|
18391
|
+
} // This handles more types than `getPropType`. Only used for error messages.
|
|
18392
|
+
// See `createPrimitiveTypeChecker`.
|
|
18393
|
+
|
|
18394
|
+
|
|
18395
|
+
function getPreciseType(propValue) {
|
|
18396
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
18397
|
+
return '' + propValue;
|
|
18398
|
+
}
|
|
17583
18399
|
|
|
17584
|
-
|
|
17585
|
-
|
|
18400
|
+
var propType = getPropType(propValue);
|
|
18401
|
+
|
|
18402
|
+
if (propType === 'object') {
|
|
18403
|
+
if (propValue instanceof Date) {
|
|
18404
|
+
return 'date';
|
|
18405
|
+
} else if (propValue instanceof RegExp) {
|
|
18406
|
+
return 'regexp';
|
|
18407
|
+
}
|
|
18408
|
+
}
|
|
18409
|
+
|
|
18410
|
+
return propType;
|
|
18411
|
+
} // Returns a string that is postfixed to a warning about an invalid type.
|
|
18412
|
+
// For example, "undefined" or "of type array"
|
|
18413
|
+
|
|
18414
|
+
|
|
18415
|
+
function getPostfixForTypeWarning(value) {
|
|
18416
|
+
var type = getPreciseType(value);
|
|
18417
|
+
|
|
18418
|
+
switch (type) {
|
|
18419
|
+
case 'array':
|
|
18420
|
+
case 'object':
|
|
18421
|
+
return 'an ' + type;
|
|
18422
|
+
|
|
18423
|
+
case 'boolean':
|
|
18424
|
+
case 'date':
|
|
18425
|
+
case 'regexp':
|
|
18426
|
+
return 'a ' + type;
|
|
18427
|
+
|
|
18428
|
+
default:
|
|
18429
|
+
return type;
|
|
18430
|
+
}
|
|
18431
|
+
} // Returns class name of the object, if any.
|
|
18432
|
+
|
|
18433
|
+
|
|
18434
|
+
function getClassName(propValue) {
|
|
18435
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
18436
|
+
return ANONYMOUS;
|
|
18437
|
+
}
|
|
18438
|
+
|
|
18439
|
+
return propValue.constructor.name;
|
|
18440
|
+
}
|
|
18441
|
+
|
|
18442
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
18443
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
18444
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
18445
|
+
return ReactPropTypes;
|
|
18446
|
+
};
|
|
18447
|
+
/***/
|
|
18448
|
+
|
|
18449
|
+
},
|
|
18450
|
+
|
|
18451
|
+
/***/
|
|
18452
|
+
"./node_modules/prop-types/index.js":
|
|
18453
|
+
/*!******************************************!*\
|
|
18454
|
+
!*** ./node_modules/prop-types/index.js ***!
|
|
18455
|
+
\******************************************/
|
|
18456
|
+
|
|
18457
|
+
/***/
|
|
18458
|
+
(module, __unused_webpack_exports, __webpack_require__) => {
|
|
18459
|
+
/**
|
|
18460
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
18461
|
+
*
|
|
18462
|
+
* This source code is licensed under the MIT license found in the
|
|
18463
|
+
* LICENSE file in the root directory of this source tree.
|
|
18464
|
+
*/
|
|
18465
|
+
{
|
|
18466
|
+
var ReactIs = __webpack_require__(
|
|
18467
|
+
/*! react-is */
|
|
18468
|
+
"./node_modules/react-is/index.js"); // By explicitly using `prop-types` you are opting into new development behavior.
|
|
18469
|
+
// http://fb.me/prop-types-in-prod
|
|
18470
|
+
|
|
18471
|
+
|
|
18472
|
+
var throwOnDirectAccess = true;
|
|
18473
|
+
module.exports = __webpack_require__(
|
|
18474
|
+
/*! ./factoryWithTypeCheckers */
|
|
18475
|
+
"./node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
|
|
17586
18476
|
}
|
|
18477
|
+
/***/
|
|
18478
|
+
|
|
18479
|
+
},
|
|
18480
|
+
|
|
18481
|
+
/***/
|
|
18482
|
+
"./node_modules/prop-types/lib/ReactPropTypesSecret.js":
|
|
18483
|
+
/*!*************************************************************!*\
|
|
18484
|
+
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
|
|
18485
|
+
\*************************************************************/
|
|
18486
|
+
|
|
18487
|
+
/***/
|
|
18488
|
+
module => {
|
|
18489
|
+
/**
|
|
18490
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
18491
|
+
*
|
|
18492
|
+
* This source code is licensed under the MIT license found in the
|
|
18493
|
+
* LICENSE file in the root directory of this source tree.
|
|
18494
|
+
*/
|
|
18495
|
+
|
|
18496
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
18497
|
+
module.exports = ReactPropTypesSecret;
|
|
18498
|
+
/***/
|
|
18499
|
+
},
|
|
18500
|
+
|
|
18501
|
+
/***/
|
|
18502
|
+
"./node_modules/prop-types/lib/has.js":
|
|
18503
|
+
/*!********************************************!*\
|
|
18504
|
+
!*** ./node_modules/prop-types/lib/has.js ***!
|
|
18505
|
+
\********************************************/
|
|
18506
|
+
|
|
18507
|
+
/***/
|
|
18508
|
+
module => {
|
|
18509
|
+
module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
18510
|
+
/***/
|
|
18511
|
+
},
|
|
18512
|
+
|
|
18513
|
+
/***/
|
|
18514
|
+
"./node_modules/react-is/cjs/react-is.development.js":
|
|
18515
|
+
/*!***********************************************************!*\
|
|
18516
|
+
!*** ./node_modules/react-is/cjs/react-is.development.js ***!
|
|
18517
|
+
\***********************************************************/
|
|
18518
|
+
|
|
18519
|
+
/***/
|
|
18520
|
+
(__unused_webpack_module, exports) => {
|
|
18521
|
+
/** @license React v16.13.1
|
|
18522
|
+
* react-is.development.js
|
|
18523
|
+
*
|
|
18524
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18525
|
+
*
|
|
18526
|
+
* This source code is licensed under the MIT license found in the
|
|
18527
|
+
* LICENSE file in the root directory of this source tree.
|
|
18528
|
+
*/
|
|
18529
|
+
|
|
18530
|
+
{
|
|
18531
|
+
(function () {
|
|
18532
|
+
// nor polyfill, then a plain number is used for performance.
|
|
18533
|
+
|
|
18534
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
18535
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
18536
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
18537
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
18538
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
18539
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
18540
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
18541
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
18542
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
18543
|
+
|
|
18544
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
18545
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
18546
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
18547
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
18548
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
18549
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
18550
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
18551
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
18552
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
18553
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
18554
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
18555
|
+
|
|
18556
|
+
function isValidElementType(type) {
|
|
18557
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
18558
|
+
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);
|
|
18559
|
+
}
|
|
18560
|
+
|
|
18561
|
+
function typeOf(object) {
|
|
18562
|
+
if (typeof object === 'object' && object !== null) {
|
|
18563
|
+
var $$typeof = object.$$typeof;
|
|
18564
|
+
|
|
18565
|
+
switch ($$typeof) {
|
|
18566
|
+
case REACT_ELEMENT_TYPE:
|
|
18567
|
+
var type = object.type;
|
|
18568
|
+
|
|
18569
|
+
switch (type) {
|
|
18570
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
18571
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
18572
|
+
case REACT_FRAGMENT_TYPE:
|
|
18573
|
+
case REACT_PROFILER_TYPE:
|
|
18574
|
+
case REACT_STRICT_MODE_TYPE:
|
|
18575
|
+
case REACT_SUSPENSE_TYPE:
|
|
18576
|
+
return type;
|
|
18577
|
+
|
|
18578
|
+
default:
|
|
18579
|
+
var $$typeofType = type && type.$$typeof;
|
|
18580
|
+
|
|
18581
|
+
switch ($$typeofType) {
|
|
18582
|
+
case REACT_CONTEXT_TYPE:
|
|
18583
|
+
case REACT_FORWARD_REF_TYPE:
|
|
18584
|
+
case REACT_LAZY_TYPE:
|
|
18585
|
+
case REACT_MEMO_TYPE:
|
|
18586
|
+
case REACT_PROVIDER_TYPE:
|
|
18587
|
+
return $$typeofType;
|
|
18588
|
+
|
|
18589
|
+
default:
|
|
18590
|
+
return $$typeof;
|
|
18591
|
+
}
|
|
18592
|
+
|
|
18593
|
+
}
|
|
18594
|
+
|
|
18595
|
+
case REACT_PORTAL_TYPE:
|
|
18596
|
+
return $$typeof;
|
|
18597
|
+
}
|
|
18598
|
+
}
|
|
18599
|
+
|
|
18600
|
+
return undefined;
|
|
18601
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
18602
|
+
|
|
18603
|
+
|
|
18604
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
18605
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
18606
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
18607
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
18608
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
18609
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
18610
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
18611
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
18612
|
+
var Memo = REACT_MEMO_TYPE;
|
|
18613
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
18614
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
18615
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
18616
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
18617
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
18618
|
+
|
|
18619
|
+
function isAsyncMode(object) {
|
|
18620
|
+
{
|
|
18621
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
18622
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
18623
|
+
|
|
18624
|
+
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.');
|
|
18625
|
+
}
|
|
18626
|
+
}
|
|
18627
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
18628
|
+
}
|
|
18629
|
+
|
|
18630
|
+
function isConcurrentMode(object) {
|
|
18631
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
18632
|
+
}
|
|
18633
|
+
|
|
18634
|
+
function isContextConsumer(object) {
|
|
18635
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
18636
|
+
}
|
|
18637
|
+
|
|
18638
|
+
function isContextProvider(object) {
|
|
18639
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
18640
|
+
}
|
|
18641
|
+
|
|
18642
|
+
function isElement(object) {
|
|
18643
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
18644
|
+
}
|
|
18645
|
+
|
|
18646
|
+
function isForwardRef(object) {
|
|
18647
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
18648
|
+
}
|
|
18649
|
+
|
|
18650
|
+
function isFragment(object) {
|
|
18651
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
18652
|
+
}
|
|
18653
|
+
|
|
18654
|
+
function isLazy(object) {
|
|
18655
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
18656
|
+
}
|
|
18657
|
+
|
|
18658
|
+
function isMemo(object) {
|
|
18659
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
18660
|
+
}
|
|
18661
|
+
|
|
18662
|
+
function isPortal(object) {
|
|
18663
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
18664
|
+
}
|
|
18665
|
+
|
|
18666
|
+
function isProfiler(object) {
|
|
18667
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
18668
|
+
}
|
|
18669
|
+
|
|
18670
|
+
function isStrictMode(object) {
|
|
18671
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
18672
|
+
}
|
|
17587
18673
|
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
18674
|
+
function isSuspense(object) {
|
|
18675
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
18676
|
+
}
|
|
18677
|
+
|
|
18678
|
+
exports.AsyncMode = AsyncMode;
|
|
18679
|
+
exports.ConcurrentMode = ConcurrentMode;
|
|
18680
|
+
exports.ContextConsumer = ContextConsumer;
|
|
18681
|
+
exports.ContextProvider = ContextProvider;
|
|
18682
|
+
exports.Element = Element;
|
|
18683
|
+
exports.ForwardRef = ForwardRef;
|
|
18684
|
+
exports.Fragment = Fragment;
|
|
18685
|
+
exports.Lazy = Lazy;
|
|
18686
|
+
exports.Memo = Memo;
|
|
18687
|
+
exports.Portal = Portal;
|
|
18688
|
+
exports.Profiler = Profiler;
|
|
18689
|
+
exports.StrictMode = StrictMode;
|
|
18690
|
+
exports.Suspense = Suspense;
|
|
18691
|
+
exports.isAsyncMode = isAsyncMode;
|
|
18692
|
+
exports.isConcurrentMode = isConcurrentMode;
|
|
18693
|
+
exports.isContextConsumer = isContextConsumer;
|
|
18694
|
+
exports.isContextProvider = isContextProvider;
|
|
18695
|
+
exports.isElement = isElement;
|
|
18696
|
+
exports.isForwardRef = isForwardRef;
|
|
18697
|
+
exports.isFragment = isFragment;
|
|
18698
|
+
exports.isLazy = isLazy;
|
|
18699
|
+
exports.isMemo = isMemo;
|
|
18700
|
+
exports.isPortal = isPortal;
|
|
18701
|
+
exports.isProfiler = isProfiler;
|
|
18702
|
+
exports.isStrictMode = isStrictMode;
|
|
18703
|
+
exports.isSuspense = isSuspense;
|
|
18704
|
+
exports.isValidElementType = isValidElementType;
|
|
18705
|
+
exports.typeOf = typeOf;
|
|
18706
|
+
})();
|
|
17591
18707
|
}
|
|
18708
|
+
/***/
|
|
17592
18709
|
|
|
17593
|
-
|
|
17594
|
-
}
|
|
18710
|
+
},
|
|
17595
18711
|
|
|
17596
|
-
|
|
17597
|
-
|
|
18712
|
+
/***/
|
|
18713
|
+
"./node_modules/react-is/index.js":
|
|
18714
|
+
/*!****************************************!*\
|
|
18715
|
+
!*** ./node_modules/react-is/index.js ***!
|
|
18716
|
+
\****************************************/
|
|
18717
|
+
|
|
18718
|
+
/***/
|
|
18719
|
+
(module, __unused_webpack_exports, __webpack_require__) => {
|
|
17598
18720
|
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
|
|
17603
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getClassName(props[propName]) + "` supplied to `" + componentName + "`, expected instance of `" + expectedClassName + "`.");
|
|
18721
|
+
{
|
|
18722
|
+
module.exports = __webpack_require__(
|
|
18723
|
+
/*! ./cjs/react-is.development.js */
|
|
18724
|
+
"./node_modules/react-is/cjs/react-is.development.js");
|
|
17604
18725
|
}
|
|
18726
|
+
/***/
|
|
17605
18727
|
|
|
17606
|
-
|
|
17607
|
-
|
|
18728
|
+
},
|
|
18729
|
+
|
|
18730
|
+
/***/
|
|
18731
|
+
"./node_modules/shallow-equal/dist/index.esm.js":
|
|
18732
|
+
/*!******************************************************!*\
|
|
18733
|
+
!*** ./node_modules/shallow-equal/dist/index.esm.js ***!
|
|
18734
|
+
\******************************************************/
|
|
18735
|
+
|
|
18736
|
+
/***/
|
|
18737
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
18738
|
+
|
|
18739
|
+
__webpack_require__.r(__webpack_exports__);
|
|
18740
|
+
/* harmony export */
|
|
17608
18741
|
|
|
17609
|
-
return createChainableTypeChecker(validate);
|
|
17610
|
-
}
|
|
17611
18742
|
|
|
17612
|
-
|
|
17613
|
-
|
|
17614
|
-
|
|
18743
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
18744
|
+
/* harmony export */
|
|
18745
|
+
"shallowEqualArrays": () =>
|
|
18746
|
+
/* binding */
|
|
18747
|
+
shallowEqualArrays,
|
|
18748
|
+
|
|
18749
|
+
/* harmony export */
|
|
18750
|
+
"shallowEqualObjects": () =>
|
|
18751
|
+
/* binding */
|
|
18752
|
+
shallowEqualObjects
|
|
18753
|
+
/* harmony export */
|
|
17615
18754
|
|
|
17616
|
-
var valuesString = JSON.stringify(expectedValues, function (key, value) {
|
|
17617
|
-
return "symbol" === getPreciseType(value) ? String(value) : value;
|
|
17618
18755
|
});
|
|
17619
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` supplied to `" + componentName + "`, expected one of " + valuesString + ".");
|
|
17620
|
-
}
|
|
17621
18756
|
|
|
17622
|
-
|
|
17623
|
-
|
|
18757
|
+
function shallowEqualObjects(objA, objB) {
|
|
18758
|
+
if (objA === objB) {
|
|
18759
|
+
return true;
|
|
18760
|
+
}
|
|
17624
18761
|
|
|
17625
|
-
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
var propValue = props[propName],
|
|
17629
|
-
propType = getPropType(propValue);
|
|
17630
|
-
if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected an object.");
|
|
18762
|
+
if (!objA || !objB) {
|
|
18763
|
+
return false;
|
|
18764
|
+
}
|
|
17631
18765
|
|
|
17632
|
-
|
|
17633
|
-
var
|
|
17634
|
-
|
|
17635
|
-
}
|
|
18766
|
+
var aKeys = Object.keys(objA);
|
|
18767
|
+
var bKeys = Object.keys(objB);
|
|
18768
|
+
var len = aKeys.length;
|
|
17636
18769
|
|
|
17637
|
-
|
|
17638
|
-
|
|
18770
|
+
if (bKeys.length !== len) {
|
|
18771
|
+
return false;
|
|
18772
|
+
}
|
|
17639
18773
|
|
|
17640
|
-
|
|
17641
|
-
|
|
18774
|
+
for (var i = 0; i < len; i++) {
|
|
18775
|
+
var key = aKeys[i];
|
|
18776
|
+
|
|
18777
|
+
if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
|
|
18778
|
+
return false;
|
|
18779
|
+
}
|
|
18780
|
+
}
|
|
17642
18781
|
|
|
17643
|
-
|
|
17644
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
17645
|
-
for (var expectedTypes = [], i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
17646
|
-
var checker = arrayOfTypeCheckers[i],
|
|
17647
|
-
checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
17648
|
-
if (null == checkerResult) return null;
|
|
17649
|
-
checkerResult.data && has(checkerResult.data, "expectedType") && expectedTypes.push(checkerResult.data.expectedType);
|
|
18782
|
+
return true;
|
|
17650
18783
|
}
|
|
17651
18784
|
|
|
17652
|
-
|
|
17653
|
-
|
|
18785
|
+
function shallowEqualArrays(arrA, arrB) {
|
|
18786
|
+
if (arrA === arrB) {
|
|
18787
|
+
return true;
|
|
18788
|
+
}
|
|
17654
18789
|
|
|
17655
|
-
|
|
18790
|
+
if (!arrA || !arrB) {
|
|
18791
|
+
return false;
|
|
18792
|
+
}
|
|
17656
18793
|
|
|
17657
|
-
|
|
17658
|
-
var checker = arrayOfTypeCheckers[i];
|
|
17659
|
-
if ("function" != typeof checker) return printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."), emptyFunctionThatReturnsNull;
|
|
17660
|
-
}
|
|
18794
|
+
var len = arrA.length;
|
|
17661
18795
|
|
|
17662
|
-
|
|
17663
|
-
|
|
18796
|
+
if (arrB.length !== len) {
|
|
18797
|
+
return false;
|
|
18798
|
+
}
|
|
17664
18799
|
|
|
17665
|
-
|
|
17666
|
-
|
|
17667
|
-
|
|
18800
|
+
for (var i = 0; i < len; i++) {
|
|
18801
|
+
if (arrA[i] !== arrB[i]) {
|
|
18802
|
+
return false;
|
|
18803
|
+
}
|
|
18804
|
+
}
|
|
17668
18805
|
|
|
17669
|
-
|
|
17670
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
17671
|
-
var propValue = props[propName],
|
|
17672
|
-
propType = getPropType(propValue);
|
|
17673
|
-
if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected `object`.");
|
|
17674
|
-
|
|
17675
|
-
for (var key in shapeTypes) {
|
|
17676
|
-
var checker = shapeTypes[key];
|
|
17677
|
-
if ("function" != typeof checker) return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
17678
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
17679
|
-
if (error) return error;
|
|
18806
|
+
return true;
|
|
17680
18807
|
}
|
|
18808
|
+
/***/
|
|
17681
18809
|
|
|
17682
|
-
|
|
17683
|
-
}
|
|
18810
|
+
},
|
|
17684
18811
|
|
|
17685
|
-
|
|
17686
|
-
|
|
18812
|
+
/***/
|
|
18813
|
+
"./src/Component.ts":
|
|
18814
|
+
/*!**************************!*\
|
|
18815
|
+
!*** ./src/Component.ts ***!
|
|
18816
|
+
\**************************/
|
|
17687
18817
|
|
|
17688
|
-
|
|
17689
|
-
function
|
|
17690
|
-
var propValue = props[propName],
|
|
17691
|
-
propType = getPropType(propValue);
|
|
17692
|
-
if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected `object`.");
|
|
17693
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
17694
|
-
|
|
17695
|
-
for (var key in allKeys) {
|
|
17696
|
-
var checker = shapeTypes[key];
|
|
17697
|
-
if (has(shapeTypes, key) && "function" != typeof checker) return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
17698
|
-
if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " "));
|
|
17699
|
-
var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
|
17700
|
-
if (error) return error;
|
|
17701
|
-
}
|
|
18818
|
+
/***/
|
|
18819
|
+
function (__unused_webpack_module, exports, __webpack_require__) {
|
|
17702
18820
|
|
|
17703
|
-
|
|
17704
|
-
|
|
18821
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
18822
|
+
var t = {};
|
|
17705
18823
|
|
|
17706
|
-
|
|
17707
|
-
|
|
18824
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
18825
|
+
|
|
18826
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18827
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
18828
|
+
}
|
|
18829
|
+
return t;
|
|
18830
|
+
};
|
|
18831
|
+
|
|
18832
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
18833
|
+
return mod && mod.__esModule ? mod : {
|
|
18834
|
+
"default": mod
|
|
18835
|
+
};
|
|
18836
|
+
};
|
|
18837
|
+
|
|
18838
|
+
Object.defineProperty(exports, "__esModule", {
|
|
18839
|
+
value: true
|
|
18840
|
+
});
|
|
17708
18841
|
|
|
17709
|
-
|
|
17710
|
-
|
|
17711
|
-
|
|
17712
|
-
case "string":
|
|
17713
|
-
case "undefined":
|
|
17714
|
-
return !0;
|
|
18842
|
+
var useMediaQuery_1 = __importDefault(__webpack_require__(
|
|
18843
|
+
/*! ./useMediaQuery */
|
|
18844
|
+
"./src/useMediaQuery.ts"));
|
|
17715
18845
|
|
|
17716
|
-
|
|
17717
|
-
|
|
18846
|
+
var MediaQuery = function (_a) {
|
|
18847
|
+
var children = _a.children,
|
|
18848
|
+
device = _a.device,
|
|
18849
|
+
onChange = _a.onChange,
|
|
18850
|
+
settings = __rest(_a, ["children", "device", "onChange"]);
|
|
17718
18851
|
|
|
17719
|
-
|
|
17720
|
-
|
|
17721
|
-
if (
|
|
17722
|
-
|
|
17723
|
-
if (!iteratorFn) return !1;
|
|
17724
|
-
var step,
|
|
17725
|
-
iterator = iteratorFn.call(propValue);
|
|
17726
|
-
|
|
17727
|
-
if (iteratorFn !== propValue.entries) {
|
|
17728
|
-
for (; !(step = iterator.next()).done;) if (!isNode(step.value)) return !1;
|
|
17729
|
-
} else for (; !(step = iterator.next()).done;) {
|
|
17730
|
-
var entry = step.value;
|
|
17731
|
-
if (entry && !isNode(entry[1])) return !1;
|
|
18852
|
+
var matches = (0, useMediaQuery_1.default)(settings, device, onChange);
|
|
18853
|
+
|
|
18854
|
+
if (typeof children === 'function') {
|
|
18855
|
+
return children(matches);
|
|
17732
18856
|
}
|
|
17733
18857
|
|
|
17734
|
-
return
|
|
18858
|
+
return matches ? children : null;
|
|
18859
|
+
};
|
|
17735
18860
|
|
|
17736
|
-
default
|
|
17737
|
-
|
|
17738
|
-
}
|
|
17739
|
-
}
|
|
18861
|
+
exports["default"] = MediaQuery;
|
|
18862
|
+
/***/
|
|
18863
|
+
},
|
|
17740
18864
|
|
|
17741
|
-
|
|
17742
|
-
|
|
17743
|
-
|
|
18865
|
+
/***/
|
|
18866
|
+
"./src/Context.ts":
|
|
18867
|
+
/*!************************!*\
|
|
18868
|
+
!*** ./src/Context.ts ***!
|
|
18869
|
+
\************************/
|
|
17744
18870
|
|
|
17745
|
-
|
|
17746
|
-
|
|
17747
|
-
return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType;
|
|
17748
|
-
}
|
|
18871
|
+
/***/
|
|
18872
|
+
(__unused_webpack_module, exports, __webpack_require__) => {
|
|
17749
18873
|
|
|
17750
|
-
|
|
17751
|
-
|
|
17752
|
-
|
|
18874
|
+
Object.defineProperty(exports, "__esModule", {
|
|
18875
|
+
value: true
|
|
18876
|
+
});
|
|
17753
18877
|
|
|
17754
|
-
|
|
17755
|
-
|
|
17756
|
-
|
|
17757
|
-
}
|
|
18878
|
+
var react_1 = __webpack_require__(
|
|
18879
|
+
/*! react */
|
|
18880
|
+
"react");
|
|
17758
18881
|
|
|
17759
|
-
|
|
17760
|
-
|
|
18882
|
+
var Context = (0, react_1.createContext)(undefined);
|
|
18883
|
+
exports["default"] = Context;
|
|
18884
|
+
/***/
|
|
18885
|
+
},
|
|
17761
18886
|
|
|
17762
|
-
|
|
17763
|
-
|
|
18887
|
+
/***/
|
|
18888
|
+
"./src/index.ts":
|
|
18889
|
+
/*!**********************!*\
|
|
18890
|
+
!*** ./src/index.ts ***!
|
|
18891
|
+
\**********************/
|
|
17764
18892
|
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
case "object":
|
|
17768
|
-
return "an " + type;
|
|
18893
|
+
/***/
|
|
18894
|
+
function (__unused_webpack_module, exports, __webpack_require__) {
|
|
17769
18895
|
|
|
17770
|
-
|
|
17771
|
-
|
|
17772
|
-
|
|
17773
|
-
|
|
18896
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
18897
|
+
return mod && mod.__esModule ? mod : {
|
|
18898
|
+
"default": mod
|
|
18899
|
+
};
|
|
18900
|
+
};
|
|
17774
18901
|
|
|
17775
|
-
|
|
17776
|
-
|
|
17777
|
-
|
|
17778
|
-
|
|
18902
|
+
Object.defineProperty(exports, "__esModule", {
|
|
18903
|
+
value: true
|
|
18904
|
+
});
|
|
18905
|
+
exports.Context = exports.toQuery = exports.useMediaQuery = exports["default"] = void 0;
|
|
17779
18906
|
|
|
17780
|
-
|
|
17781
|
-
|
|
17782
|
-
|
|
18907
|
+
var useMediaQuery_1 = __importDefault(__webpack_require__(
|
|
18908
|
+
/*! ./useMediaQuery */
|
|
18909
|
+
"./src/useMediaQuery.ts"));
|
|
18910
|
+
|
|
18911
|
+
exports.useMediaQuery = useMediaQuery_1.default;
|
|
18912
|
+
|
|
18913
|
+
var Component_1 = __importDefault(__webpack_require__(
|
|
18914
|
+
/*! ./Component */
|
|
18915
|
+
"./src/Component.ts"));
|
|
18916
|
+
|
|
18917
|
+
exports["default"] = Component_1.default;
|
|
18918
|
+
|
|
18919
|
+
var toQuery_1 = __importDefault(__webpack_require__(
|
|
18920
|
+
/*! ./toQuery */
|
|
18921
|
+
"./src/toQuery.ts"));
|
|
18922
|
+
|
|
18923
|
+
exports.toQuery = toQuery_1.default;
|
|
18924
|
+
|
|
18925
|
+
var Context_1 = __importDefault(__webpack_require__(
|
|
18926
|
+
/*! ./Context */
|
|
18927
|
+
"./src/Context.ts"));
|
|
18928
|
+
|
|
18929
|
+
exports.Context = Context_1.default;
|
|
18930
|
+
/***/
|
|
18931
|
+
},
|
|
18932
|
+
|
|
18933
|
+
/***/
|
|
18934
|
+
"./src/mediaQuery.ts":
|
|
18935
|
+
/*!***************************!*\
|
|
18936
|
+
!*** ./src/mediaQuery.ts ***!
|
|
18937
|
+
\***************************/
|
|
18938
|
+
|
|
18939
|
+
/***/
|
|
18940
|
+
function (__unused_webpack_module, exports, __webpack_require__) {
|
|
18941
|
+
|
|
18942
|
+
var __assign = this && this.__assign || function () {
|
|
18943
|
+
__assign = Object.assign || function (t) {
|
|
18944
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18945
|
+
s = arguments[i];
|
|
17783
18946
|
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
|
|
17790
|
-
|
|
17791
|
-
|
|
17792
|
-
|
|
17793
|
-
|
|
17794
|
-
|
|
17795
|
-
|
|
17796
|
-
|
|
17797
|
-
|
|
17798
|
-
|
|
17799
|
-
|
|
17800
|
-
element: function () {
|
|
17801
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
17802
|
-
var propValue = props[propName];
|
|
17803
|
-
|
|
17804
|
-
if (!isValidElement(propValue)) {
|
|
17805
|
-
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPropType(propValue) + "` supplied to `" + componentName + "`, expected a single ReactElement.");
|
|
18947
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
18948
|
+
}
|
|
18949
|
+
|
|
18950
|
+
return t;
|
|
18951
|
+
};
|
|
18952
|
+
|
|
18953
|
+
return __assign.apply(this, arguments);
|
|
18954
|
+
};
|
|
18955
|
+
|
|
18956
|
+
var __rest = this && this.__rest || function (s, e) {
|
|
18957
|
+
var t = {};
|
|
18958
|
+
|
|
18959
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
18960
|
+
|
|
18961
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18962
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
17806
18963
|
}
|
|
18964
|
+
return t;
|
|
18965
|
+
};
|
|
17807
18966
|
|
|
17808
|
-
|
|
17809
|
-
|
|
18967
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
18968
|
+
return mod && mod.__esModule ? mod : {
|
|
18969
|
+
"default": mod
|
|
18970
|
+
};
|
|
18971
|
+
};
|
|
18972
|
+
|
|
18973
|
+
Object.defineProperty(exports, "__esModule", {
|
|
18974
|
+
value: true
|
|
18975
|
+
});
|
|
17810
18976
|
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
18977
|
+
var prop_types_1 = __importDefault(__webpack_require__(
|
|
18978
|
+
/*! prop-types */
|
|
18979
|
+
"./node_modules/prop-types/index.js"));
|
|
18980
|
+
|
|
18981
|
+
var stringOrNumber = prop_types_1.default.oneOfType([prop_types_1.default.string, prop_types_1.default.number]); // media types
|
|
18982
|
+
|
|
18983
|
+
var types = {
|
|
18984
|
+
all: prop_types_1.default.bool,
|
|
18985
|
+
grid: prop_types_1.default.bool,
|
|
18986
|
+
aural: prop_types_1.default.bool,
|
|
18987
|
+
braille: prop_types_1.default.bool,
|
|
18988
|
+
handheld: prop_types_1.default.bool,
|
|
18989
|
+
print: prop_types_1.default.bool,
|
|
18990
|
+
projection: prop_types_1.default.bool,
|
|
18991
|
+
screen: prop_types_1.default.bool,
|
|
18992
|
+
tty: prop_types_1.default.bool,
|
|
18993
|
+
tv: prop_types_1.default.bool,
|
|
18994
|
+
embossed: prop_types_1.default.bool
|
|
18995
|
+
}; // properties that match media queries
|
|
18996
|
+
|
|
18997
|
+
var matchers = {
|
|
18998
|
+
orientation: prop_types_1.default.oneOf(['portrait', 'landscape']),
|
|
18999
|
+
scan: prop_types_1.default.oneOf(['progressive', 'interlace']),
|
|
19000
|
+
aspectRatio: prop_types_1.default.string,
|
|
19001
|
+
deviceAspectRatio: prop_types_1.default.string,
|
|
19002
|
+
height: stringOrNumber,
|
|
19003
|
+
deviceHeight: stringOrNumber,
|
|
19004
|
+
width: stringOrNumber,
|
|
19005
|
+
deviceWidth: stringOrNumber,
|
|
19006
|
+
color: prop_types_1.default.bool,
|
|
19007
|
+
colorIndex: prop_types_1.default.bool,
|
|
19008
|
+
monochrome: prop_types_1.default.bool,
|
|
19009
|
+
resolution: stringOrNumber,
|
|
19010
|
+
type: Object.keys(types)
|
|
19011
|
+
}; // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19012
|
+
|
|
19013
|
+
var featureMatchers = __rest(matchers // media features
|
|
19014
|
+
, ["type"]); // media features
|
|
19015
|
+
|
|
19016
|
+
|
|
19017
|
+
var features = __assign({
|
|
19018
|
+
minAspectRatio: prop_types_1.default.string,
|
|
19019
|
+
maxAspectRatio: prop_types_1.default.string,
|
|
19020
|
+
minDeviceAspectRatio: prop_types_1.default.string,
|
|
19021
|
+
maxDeviceAspectRatio: prop_types_1.default.string,
|
|
19022
|
+
minHeight: stringOrNumber,
|
|
19023
|
+
maxHeight: stringOrNumber,
|
|
19024
|
+
minDeviceHeight: stringOrNumber,
|
|
19025
|
+
maxDeviceHeight: stringOrNumber,
|
|
19026
|
+
minWidth: stringOrNumber,
|
|
19027
|
+
maxWidth: stringOrNumber,
|
|
19028
|
+
minDeviceWidth: stringOrNumber,
|
|
19029
|
+
maxDeviceWidth: stringOrNumber,
|
|
19030
|
+
minColor: prop_types_1.default.number,
|
|
19031
|
+
maxColor: prop_types_1.default.number,
|
|
19032
|
+
minColorIndex: prop_types_1.default.number,
|
|
19033
|
+
maxColorIndex: prop_types_1.default.number,
|
|
19034
|
+
minMonochrome: prop_types_1.default.number,
|
|
19035
|
+
maxMonochrome: prop_types_1.default.number,
|
|
19036
|
+
minResolution: stringOrNumber,
|
|
19037
|
+
maxResolution: stringOrNumber
|
|
19038
|
+
}, featureMatchers);
|
|
19039
|
+
|
|
19040
|
+
var all = __assign(__assign({}, types), features);
|
|
19041
|
+
|
|
19042
|
+
exports["default"] = {
|
|
19043
|
+
all: all,
|
|
19044
|
+
types: types,
|
|
19045
|
+
matchers: matchers,
|
|
19046
|
+
features: features
|
|
19047
|
+
};
|
|
19048
|
+
/***/
|
|
19049
|
+
},
|
|
19050
|
+
|
|
19051
|
+
/***/
|
|
19052
|
+
"./src/toQuery.ts":
|
|
19053
|
+
/*!************************!*\
|
|
19054
|
+
!*** ./src/toQuery.ts ***!
|
|
19055
|
+
\************************/
|
|
19056
|
+
|
|
19057
|
+
/***/
|
|
19058
|
+
function (__unused_webpack_module, exports, __webpack_require__) {
|
|
19059
|
+
|
|
19060
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
19061
|
+
return mod && mod.__esModule ? mod : {
|
|
19062
|
+
"default": mod
|
|
19063
|
+
};
|
|
19064
|
+
};
|
|
19065
|
+
|
|
19066
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19067
|
+
value: true
|
|
19068
|
+
});
|
|
19069
|
+
|
|
19070
|
+
var hyphenate_style_name_1 = __importDefault(__webpack_require__(
|
|
19071
|
+
/*! hyphenate-style-name */
|
|
19072
|
+
"./node_modules/hyphenate-style-name/index.js"));
|
|
19073
|
+
|
|
19074
|
+
var mediaQuery_1 = __importDefault(__webpack_require__(
|
|
19075
|
+
/*! ./mediaQuery */
|
|
19076
|
+
"./src/mediaQuery.ts"));
|
|
19077
|
+
|
|
19078
|
+
var negate = function (cond) {
|
|
19079
|
+
return "not ".concat(cond);
|
|
19080
|
+
};
|
|
19081
|
+
|
|
19082
|
+
var keyVal = function (k, v) {
|
|
19083
|
+
var realKey = (0, hyphenate_style_name_1.default)(k); // px shorthand
|
|
17816
19084
|
|
|
17817
|
-
if (
|
|
17818
|
-
|
|
19085
|
+
if (typeof v === 'number') {
|
|
19086
|
+
v = "".concat(v, "px");
|
|
17819
19087
|
}
|
|
17820
19088
|
|
|
17821
|
-
|
|
17822
|
-
|
|
19089
|
+
if (v === true) {
|
|
19090
|
+
return realKey;
|
|
19091
|
+
}
|
|
17823
19092
|
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
|
|
19093
|
+
if (v === false) {
|
|
19094
|
+
return negate(realKey);
|
|
19095
|
+
}
|
|
19096
|
+
|
|
19097
|
+
return "(".concat(realKey, ": ").concat(v, ")");
|
|
19098
|
+
};
|
|
19099
|
+
|
|
19100
|
+
var join = function (conds) {
|
|
19101
|
+
return conds.join(' and ');
|
|
19102
|
+
};
|
|
19103
|
+
|
|
19104
|
+
var toQuery = function (obj) {
|
|
19105
|
+
var rules = [];
|
|
19106
|
+
Object.keys(mediaQuery_1.default.all).forEach(function (k) {
|
|
19107
|
+
var v = obj[k];
|
|
19108
|
+
|
|
19109
|
+
if (v != null) {
|
|
19110
|
+
rules.push(keyVal(k, v));
|
|
19111
|
+
}
|
|
19112
|
+
});
|
|
19113
|
+
return join(rules);
|
|
19114
|
+
};
|
|
19115
|
+
|
|
19116
|
+
exports["default"] = toQuery;
|
|
19117
|
+
/***/
|
|
19118
|
+
},
|
|
19119
|
+
|
|
19120
|
+
/***/
|
|
19121
|
+
"./src/useMediaQuery.ts":
|
|
19122
|
+
/*!******************************!*\
|
|
19123
|
+
!*** ./src/useMediaQuery.ts ***!
|
|
19124
|
+
\******************************/
|
|
19125
|
+
|
|
19126
|
+
/***/
|
|
19127
|
+
function (__unused_webpack_module, exports, __webpack_require__) {
|
|
19128
|
+
|
|
19129
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
19130
|
+
return mod && mod.__esModule ? mod : {
|
|
19131
|
+
"default": mod
|
|
19132
|
+
};
|
|
19133
|
+
};
|
|
19134
|
+
|
|
19135
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19136
|
+
value: true
|
|
19137
|
+
});
|
|
19138
|
+
|
|
19139
|
+
var react_1 = __webpack_require__(
|
|
19140
|
+
/*! react */
|
|
19141
|
+
"react");
|
|
19142
|
+
|
|
19143
|
+
var matchmediaquery_1 = __importDefault(__webpack_require__(
|
|
19144
|
+
/*! matchmediaquery */
|
|
19145
|
+
"./node_modules/matchmediaquery/index.js"));
|
|
19146
|
+
|
|
19147
|
+
var hyphenate_style_name_1 = __importDefault(__webpack_require__(
|
|
19148
|
+
/*! hyphenate-style-name */
|
|
19149
|
+
"./node_modules/hyphenate-style-name/index.js"));
|
|
19150
|
+
|
|
19151
|
+
var shallow_equal_1 = __webpack_require__(
|
|
19152
|
+
/*! shallow-equal */
|
|
19153
|
+
"./node_modules/shallow-equal/dist/index.esm.js");
|
|
19154
|
+
|
|
19155
|
+
var toQuery_1 = __importDefault(__webpack_require__(
|
|
19156
|
+
/*! ./toQuery */
|
|
19157
|
+
"./src/toQuery.ts"));
|
|
19158
|
+
|
|
19159
|
+
var Context_1 = __importDefault(__webpack_require__(
|
|
19160
|
+
/*! ./Context */
|
|
19161
|
+
"./src/Context.ts"));
|
|
19162
|
+
|
|
19163
|
+
var makeQuery = function (settings) {
|
|
19164
|
+
return settings.query || (0, toQuery_1.default)(settings);
|
|
19165
|
+
};
|
|
19166
|
+
|
|
19167
|
+
var hyphenateKeys = function (obj) {
|
|
19168
|
+
if (!obj) return undefined;
|
|
19169
|
+
var keys = Object.keys(obj);
|
|
19170
|
+
return keys.reduce(function (result, key) {
|
|
19171
|
+
result[(0, hyphenate_style_name_1.default)(key)] = obj[key];
|
|
19172
|
+
return result;
|
|
19173
|
+
}, {});
|
|
19174
|
+
};
|
|
19175
|
+
|
|
19176
|
+
var useIsUpdate = function () {
|
|
19177
|
+
var ref = (0, react_1.useRef)(false);
|
|
19178
|
+
(0, react_1.useEffect)(function () {
|
|
19179
|
+
ref.current = true;
|
|
19180
|
+
}, []);
|
|
19181
|
+
return ref.current;
|
|
19182
|
+
};
|
|
19183
|
+
|
|
19184
|
+
var useDevice = function (deviceFromProps) {
|
|
19185
|
+
var deviceFromContext = (0, react_1.useContext)(Context_1.default);
|
|
19186
|
+
|
|
19187
|
+
var getDevice = function () {
|
|
19188
|
+
return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
|
|
19189
|
+
};
|
|
19190
|
+
|
|
19191
|
+
var _a = (0, react_1.useState)(getDevice),
|
|
19192
|
+
device = _a[0],
|
|
19193
|
+
setDevice = _a[1];
|
|
19194
|
+
|
|
19195
|
+
(0, react_1.useEffect)(function () {
|
|
19196
|
+
var newDevice = getDevice();
|
|
19197
|
+
|
|
19198
|
+
if (!(0, shallow_equal_1.shallowEqualObjects)(device, newDevice)) {
|
|
19199
|
+
setDevice(newDevice);
|
|
19200
|
+
}
|
|
19201
|
+
}, [deviceFromProps, deviceFromContext]);
|
|
19202
|
+
return device;
|
|
19203
|
+
};
|
|
19204
|
+
|
|
19205
|
+
var useQuery = function (settings) {
|
|
19206
|
+
var getQuery = function () {
|
|
19207
|
+
return makeQuery(settings);
|
|
19208
|
+
};
|
|
19209
|
+
|
|
19210
|
+
var _a = (0, react_1.useState)(getQuery),
|
|
19211
|
+
query = _a[0],
|
|
19212
|
+
setQuery = _a[1];
|
|
19213
|
+
|
|
19214
|
+
(0, react_1.useEffect)(function () {
|
|
19215
|
+
var newQuery = getQuery();
|
|
19216
|
+
|
|
19217
|
+
if (query !== newQuery) {
|
|
19218
|
+
setQuery(newQuery);
|
|
19219
|
+
}
|
|
19220
|
+
}, [settings]);
|
|
19221
|
+
return query;
|
|
19222
|
+
};
|
|
19223
|
+
|
|
19224
|
+
var useMatchMedia = function (query, device) {
|
|
19225
|
+
var getMatchMedia = function () {
|
|
19226
|
+
return (0, matchmediaquery_1.default)(query, device || {}, !!device);
|
|
19227
|
+
};
|
|
19228
|
+
|
|
19229
|
+
var _a = (0, react_1.useState)(getMatchMedia),
|
|
19230
|
+
mq = _a[0],
|
|
19231
|
+
setMq = _a[1];
|
|
19232
|
+
|
|
19233
|
+
var isUpdate = useIsUpdate();
|
|
19234
|
+
(0, react_1.useEffect)(function () {
|
|
19235
|
+
if (isUpdate) {
|
|
19236
|
+
// skip on mounting, it has already been set
|
|
19237
|
+
var newMq_1 = getMatchMedia();
|
|
19238
|
+
setMq(newMq_1);
|
|
19239
|
+
return function () {
|
|
19240
|
+
if (newMq_1) {
|
|
19241
|
+
newMq_1.dispose();
|
|
19242
|
+
}
|
|
19243
|
+
};
|
|
19244
|
+
}
|
|
19245
|
+
}, [query, device]);
|
|
19246
|
+
return mq;
|
|
19247
|
+
};
|
|
19248
|
+
|
|
19249
|
+
var useMatches = function (mediaQuery) {
|
|
19250
|
+
var _a = (0, react_1.useState)(mediaQuery.matches),
|
|
19251
|
+
matches = _a[0],
|
|
19252
|
+
setMatches = _a[1];
|
|
19253
|
+
|
|
19254
|
+
(0, react_1.useEffect)(function () {
|
|
19255
|
+
var updateMatches = function (ev) {
|
|
19256
|
+
setMatches(ev.matches);
|
|
19257
|
+
};
|
|
19258
|
+
|
|
19259
|
+
mediaQuery.addListener(updateMatches);
|
|
19260
|
+
setMatches(mediaQuery.matches);
|
|
19261
|
+
return function () {
|
|
19262
|
+
mediaQuery.removeListener(updateMatches);
|
|
19263
|
+
};
|
|
19264
|
+
}, [mediaQuery]);
|
|
19265
|
+
return matches;
|
|
19266
|
+
};
|
|
19267
|
+
|
|
19268
|
+
var useMediaQuery = function (settings, device, onChange) {
|
|
19269
|
+
var deviceSettings = useDevice(device);
|
|
19270
|
+
var query = useQuery(settings);
|
|
19271
|
+
if (!query) throw new Error('Invalid or missing MediaQuery!');
|
|
19272
|
+
var mq = useMatchMedia(query, deviceSettings);
|
|
19273
|
+
var matches = useMatches(mq);
|
|
19274
|
+
var isUpdate = useIsUpdate();
|
|
19275
|
+
(0, react_1.useEffect)(function () {
|
|
19276
|
+
if (isUpdate && onChange) {
|
|
19277
|
+
onChange(matches);
|
|
19278
|
+
}
|
|
19279
|
+
}, [matches]);
|
|
19280
|
+
(0, react_1.useEffect)(function () {
|
|
19281
|
+
return function () {
|
|
19282
|
+
if (mq) {
|
|
19283
|
+
mq.dispose();
|
|
19284
|
+
}
|
|
19285
|
+
};
|
|
19286
|
+
}, []);
|
|
19287
|
+
return matches;
|
|
19288
|
+
};
|
|
19289
|
+
|
|
19290
|
+
exports["default"] = useMediaQuery;
|
|
19291
|
+
/***/
|
|
19292
|
+
},
|
|
19293
|
+
|
|
19294
|
+
/***/
|
|
19295
|
+
"react":
|
|
19296
|
+
/*!**************************************************************************************!*\
|
|
19297
|
+
!*** external {"commonjs":"react","commonjs2":"react","amd":"react","root":"React"} ***!
|
|
19298
|
+
\**************************************************************************************/
|
|
19299
|
+
|
|
19300
|
+
/***/
|
|
19301
|
+
module => {
|
|
19302
|
+
|
|
19303
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
19304
|
+
/***/
|
|
19305
|
+
}
|
|
19306
|
+
/******/
|
|
17831
19307
|
|
|
17832
|
-
return createChainableTypeChecker(validate);
|
|
17833
|
-
}(),
|
|
17834
|
-
objectOf: createObjectOfTypeChecker,
|
|
17835
|
-
oneOf: createEnumTypeChecker,
|
|
17836
|
-
oneOfType: createUnionTypeChecker,
|
|
17837
|
-
shape: createShapeTypeChecker,
|
|
17838
|
-
exact: createStrictShapeTypeChecker
|
|
17839
19308
|
};
|
|
17840
|
-
|
|
17841
|
-
};
|
|
17842
|
-
}, function (module, exports, __webpack_require__) {
|
|
19309
|
+
/************************************************************************/
|
|
17843
19310
|
|
|
17844
|
-
|
|
17845
|
-
|
|
17846
|
-
return Object(val);
|
|
17847
|
-
}
|
|
17848
|
-
/*
|
|
17849
|
-
object-assign
|
|
17850
|
-
(c) Sindre Sorhus
|
|
17851
|
-
@license MIT
|
|
17852
|
-
*/
|
|
19311
|
+
/******/
|
|
19312
|
+
// The module cache
|
|
17853
19313
|
|
|
19314
|
+
/******/
|
|
17854
19315
|
|
|
17855
|
-
|
|
17856
|
-
|
|
17857
|
-
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
if (!Object.assign) return !1;
|
|
17861
|
-
var test1 = new String("abc");
|
|
17862
|
-
if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1;
|
|
17863
|
-
|
|
17864
|
-
for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
|
|
17865
|
-
|
|
17866
|
-
if ("0123456789" !== Object.getOwnPropertyNames(test2).map(function (n) {
|
|
17867
|
-
return test2[n];
|
|
17868
|
-
}).join("")) return !1;
|
|
17869
|
-
var test3 = {};
|
|
17870
|
-
return "abcdefghijklmnopqrst".split("").forEach(function (letter) {
|
|
17871
|
-
test3[letter] = letter;
|
|
17872
|
-
}), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join("");
|
|
17873
|
-
} catch (err) {
|
|
17874
|
-
return !1;
|
|
17875
|
-
}
|
|
17876
|
-
}() ? Object.assign : function (target, source) {
|
|
17877
|
-
for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
|
|
17878
|
-
from = Object(arguments[s]);
|
|
19316
|
+
var __webpack_module_cache__ = {};
|
|
19317
|
+
/******/
|
|
19318
|
+
|
|
19319
|
+
/******/
|
|
19320
|
+
// The require function
|
|
17879
19321
|
|
|
17880
|
-
|
|
19322
|
+
/******/
|
|
17881
19323
|
|
|
17882
|
-
|
|
17883
|
-
|
|
19324
|
+
function __webpack_require__(moduleId) {
|
|
19325
|
+
/******/
|
|
19326
|
+
// Check if module is in cache
|
|
17884
19327
|
|
|
17885
|
-
|
|
19328
|
+
/******/
|
|
19329
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
19330
|
+
/******/
|
|
19331
|
+
|
|
19332
|
+
if (cachedModule !== undefined) {
|
|
19333
|
+
/******/
|
|
19334
|
+
return cachedModule.exports;
|
|
19335
|
+
/******/
|
|
17886
19336
|
}
|
|
19337
|
+
/******/
|
|
19338
|
+
// Create a new module (and put it into the cache)
|
|
19339
|
+
|
|
19340
|
+
/******/
|
|
19341
|
+
|
|
19342
|
+
|
|
19343
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
19344
|
+
/******/
|
|
19345
|
+
// no module.id needed
|
|
19346
|
+
|
|
19347
|
+
/******/
|
|
19348
|
+
// no module.loaded needed
|
|
19349
|
+
|
|
19350
|
+
/******/
|
|
19351
|
+
exports: {}
|
|
19352
|
+
/******/
|
|
19353
|
+
|
|
19354
|
+
};
|
|
19355
|
+
/******/
|
|
19356
|
+
|
|
19357
|
+
/******/
|
|
19358
|
+
// Execute the module function
|
|
19359
|
+
|
|
19360
|
+
/******/
|
|
19361
|
+
|
|
19362
|
+
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
19363
|
+
/******/
|
|
19364
|
+
|
|
19365
|
+
/******/
|
|
19366
|
+
// Return the exports of the module
|
|
19367
|
+
|
|
19368
|
+
/******/
|
|
19369
|
+
|
|
19370
|
+
|
|
19371
|
+
return module.exports;
|
|
19372
|
+
/******/
|
|
17887
19373
|
}
|
|
19374
|
+
/******/
|
|
17888
19375
|
|
|
17889
|
-
|
|
17890
|
-
|
|
17891
|
-
|
|
19376
|
+
/************************************************************************/
|
|
19377
|
+
|
|
19378
|
+
/******/
|
|
17892
19379
|
|
|
17893
|
-
|
|
17894
|
-
|
|
17895
|
-
|
|
19380
|
+
/* webpack/runtime/define property getters */
|
|
19381
|
+
|
|
19382
|
+
/******/
|
|
19383
|
+
|
|
19384
|
+
|
|
19385
|
+
(() => {
|
|
19386
|
+
/******/
|
|
19387
|
+
// define getter functions for harmony exports
|
|
19388
|
+
|
|
19389
|
+
/******/
|
|
19390
|
+
__webpack_require__.d = (exports, definition) => {
|
|
19391
|
+
/******/
|
|
19392
|
+
for (var key in definition) {
|
|
19393
|
+
/******/
|
|
19394
|
+
if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
19395
|
+
/******/
|
|
19396
|
+
Object.defineProperty(exports, key, {
|
|
19397
|
+
enumerable: true,
|
|
19398
|
+
get: definition[key]
|
|
19399
|
+
});
|
|
19400
|
+
/******/
|
|
19401
|
+
}
|
|
19402
|
+
/******/
|
|
17896
19403
|
|
|
17897
|
-
try {
|
|
17898
|
-
if ("function" != typeof typeSpecs[typeSpecName]) {
|
|
17899
|
-
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
17900
|
-
throw err.name = "Invariant Violation", err;
|
|
17901
19404
|
}
|
|
19405
|
+
/******/
|
|
17902
19406
|
|
|
17903
|
-
|
|
17904
|
-
|
|
17905
|
-
error = ex;
|
|
17906
|
-
}
|
|
19407
|
+
};
|
|
19408
|
+
/******/
|
|
17907
19409
|
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
var stack = getStack ? getStack() : "";
|
|
17911
|
-
printWarning("Failed " + location + " type: " + error.message + (null != stack ? stack : ""));
|
|
17912
|
-
}
|
|
17913
|
-
}
|
|
17914
|
-
}
|
|
19410
|
+
})();
|
|
19411
|
+
/******/
|
|
17915
19412
|
|
|
17916
|
-
|
|
17917
|
-
ReactPropTypesSecret = __webpack_require__(5),
|
|
17918
|
-
loggedTypeFailures = {},
|
|
17919
|
-
has = __webpack_require__(6);
|
|
19413
|
+
/******/
|
|
17920
19414
|
|
|
17921
|
-
|
|
17922
|
-
var message = "Warning: " + text;
|
|
17923
|
-
"undefined" != typeof console && console.error(message);
|
|
19415
|
+
/* webpack/runtime/hasOwnProperty shorthand */
|
|
17924
19416
|
|
|
17925
|
-
|
|
17926
|
-
throw new Error(message);
|
|
17927
|
-
} catch (x) {}
|
|
17928
|
-
}, checkPropTypes.resetWarningCache = function () {
|
|
17929
|
-
loggedTypeFailures = {};
|
|
17930
|
-
}, module.exports = checkPropTypes;
|
|
17931
|
-
}, function (module, exports, __webpack_require__) {
|
|
19417
|
+
/******/
|
|
17932
19418
|
|
|
17933
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
17934
|
-
var t = {};
|
|
17935
19419
|
|
|
17936
|
-
|
|
19420
|
+
(() => {
|
|
19421
|
+
/******/
|
|
19422
|
+
__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
|
|
19423
|
+
/******/
|
|
17937
19424
|
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
},
|
|
17941
|
-
__importDefault = this && this.__importDefault || function (mod) {
|
|
17942
|
-
return mod && mod.__esModule ? mod : {
|
|
17943
|
-
default: mod
|
|
17944
|
-
};
|
|
17945
|
-
};
|
|
19425
|
+
})();
|
|
19426
|
+
/******/
|
|
17946
19427
|
|
|
17947
|
-
|
|
17948
|
-
value: !0
|
|
17949
|
-
});
|
|
19428
|
+
/******/
|
|
17950
19429
|
|
|
17951
|
-
|
|
17952
|
-
MediaQuery = function (_a) {
|
|
17953
|
-
var children = _a.children,
|
|
17954
|
-
device = _a.device,
|
|
17955
|
-
onChange = _a.onChange,
|
|
17956
|
-
settings = __rest(_a, ["children", "device", "onChange"]),
|
|
17957
|
-
matches = (0, useMediaQuery_1.default)(settings, device, onChange);
|
|
19430
|
+
/* webpack/runtime/make namespace object */
|
|
17958
19431
|
|
|
17959
|
-
|
|
17960
|
-
};
|
|
19432
|
+
/******/
|
|
17961
19433
|
|
|
17962
|
-
|
|
17963
|
-
|
|
19434
|
+
|
|
19435
|
+
(() => {
|
|
19436
|
+
/******/
|
|
19437
|
+
// define __esModule on exports
|
|
19438
|
+
|
|
19439
|
+
/******/
|
|
19440
|
+
__webpack_require__.r = exports => {
|
|
19441
|
+
/******/
|
|
19442
|
+
if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
19443
|
+
/******/
|
|
19444
|
+
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
19445
|
+
value: 'Module'
|
|
19446
|
+
});
|
|
19447
|
+
/******/
|
|
19448
|
+
}
|
|
19449
|
+
/******/
|
|
19450
|
+
|
|
19451
|
+
|
|
19452
|
+
Object.defineProperty(exports, '__esModule', {
|
|
19453
|
+
value: true
|
|
19454
|
+
});
|
|
19455
|
+
/******/
|
|
19456
|
+
};
|
|
19457
|
+
/******/
|
|
19458
|
+
|
|
19459
|
+
})();
|
|
19460
|
+
/******/
|
|
19461
|
+
|
|
19462
|
+
/************************************************************************/
|
|
19463
|
+
|
|
19464
|
+
/******/
|
|
19465
|
+
|
|
19466
|
+
/******/
|
|
19467
|
+
// startup
|
|
19468
|
+
|
|
19469
|
+
/******/
|
|
19470
|
+
// Load entry module and return exports
|
|
19471
|
+
|
|
19472
|
+
/******/
|
|
19473
|
+
// This entry module is referenced by other modules so it can't be inlined
|
|
19474
|
+
|
|
19475
|
+
/******/
|
|
19476
|
+
|
|
19477
|
+
|
|
19478
|
+
var __webpack_exports__ = __webpack_require__("./src/index.ts");
|
|
19479
|
+
/******/
|
|
19480
|
+
|
|
19481
|
+
/******/
|
|
19482
|
+
|
|
19483
|
+
|
|
19484
|
+
return __webpack_exports__;
|
|
19485
|
+
/******/
|
|
19486
|
+
})()
|
|
19487
|
+
);
|
|
17964
19488
|
});
|
|
17965
19489
|
});
|
|
17966
19490
|
var reactResponsive$1 = /*@__PURE__*/unwrapExports(reactResponsive);
|
|
@@ -18622,12 +20146,21 @@
|
|
|
18622
20146
|
}))));
|
|
18623
20147
|
};
|
|
18624
20148
|
|
|
20149
|
+
var COLORS;
|
|
20150
|
+
|
|
20151
|
+
(function (COLORS) {
|
|
20152
|
+
COLORS["ALMA"] = "#FF414D";
|
|
20153
|
+
COLORS["MONOCHROME"] = "#00425D";
|
|
20154
|
+
})(COLORS || (COLORS = {}));
|
|
20155
|
+
|
|
18625
20156
|
function LogoIcon(_ref) {
|
|
18626
|
-
var
|
|
18627
|
-
|
|
18628
|
-
_ref$
|
|
18629
|
-
|
|
18630
|
-
|
|
20157
|
+
var className = _ref.className,
|
|
20158
|
+
_ref$color = _ref.color,
|
|
20159
|
+
color = _ref$color === void 0 ? COLORS.MONOCHROME : _ref$color,
|
|
20160
|
+
_ref$monochrome = _ref.monochrome,
|
|
20161
|
+
monochrome = _ref$monochrome === void 0 ? true : _ref$monochrome,
|
|
20162
|
+
underlineColor = _ref.underlineColor;
|
|
20163
|
+
var defaultUnderlineColor = monochrome ? COLORS.MONOCHROME : COLORS.ALMA;
|
|
18631
20164
|
return /*#__PURE__*/react.createElement("svg", {
|
|
18632
20165
|
className: className,
|
|
18633
20166
|
width: "35",
|
|
@@ -18651,7 +20184,7 @@
|
|
|
18651
20184
|
y: "20",
|
|
18652
20185
|
width: "40",
|
|
18653
20186
|
height: "3",
|
|
18654
|
-
fill: underlineColor
|
|
20187
|
+
fill: underlineColor || defaultUnderlineColor
|
|
18655
20188
|
}));
|
|
18656
20189
|
}
|
|
18657
20190
|
|
|
@@ -18823,11 +20356,12 @@
|
|
|
18823
20356
|
setUpdate = _useState2[1];
|
|
18824
20357
|
|
|
18825
20358
|
react.useEffect(function () {
|
|
20359
|
+
var timeout;
|
|
18826
20360
|
var isMounted = true;
|
|
18827
20361
|
|
|
18828
20362
|
if (iterateValues.length !== 0) {
|
|
18829
20363
|
if (!iterateValues.includes(current) && update) setCurrent(iterateValues[0]);
|
|
18830
|
-
setTimeout(function () {
|
|
20364
|
+
timeout = setTimeout(function () {
|
|
18831
20365
|
if (update && isMounted) {
|
|
18832
20366
|
setCurrent(iterateValues[iterateValues.includes(current) ? (iterateValues.indexOf(current) + 1) % iterateValues.length : 0]);
|
|
18833
20367
|
}
|
|
@@ -18836,6 +20370,7 @@
|
|
|
18836
20370
|
|
|
18837
20371
|
return function () {
|
|
18838
20372
|
isMounted = false;
|
|
20373
|
+
clearTimeout(timeout);
|
|
18839
20374
|
};
|
|
18840
20375
|
}, [iterateValues, current]);
|
|
18841
20376
|
return {
|
|
@@ -18902,7 +20437,7 @@
|
|
|
18902
20437
|
activeOption: prefix$1 + '-active-option'
|
|
18903
20438
|
};
|
|
18904
20439
|
|
|
18905
|
-
var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
20440
|
+
var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","polychrome":"_2icEF","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
|
|
18906
20441
|
|
|
18907
20442
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
18908
20443
|
var DEFAULT_TRANSITION_TIME = 5500;
|
|
@@ -18910,13 +20445,14 @@
|
|
|
18910
20445
|
var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
18911
20446
|
var _cx, _cx3;
|
|
18912
20447
|
|
|
18913
|
-
var
|
|
18914
|
-
apiData = _ref.apiData,
|
|
20448
|
+
var apiData = _ref.apiData,
|
|
18915
20449
|
configPlans = _ref.configPlans,
|
|
18916
|
-
transitionDelay = _ref.transitionDelay,
|
|
18917
20450
|
hideIfNotEligible = _ref.hideIfNotEligible,
|
|
20451
|
+
monochrome = _ref.monochrome,
|
|
20452
|
+
purchaseAmount = _ref.purchaseAmount,
|
|
18918
20453
|
suggestedPaymentPlan = _ref.suggestedPaymentPlan,
|
|
18919
|
-
cards = _ref.cards
|
|
20454
|
+
cards = _ref.cards,
|
|
20455
|
+
transitionDelay = _ref.transitionDelay;
|
|
18920
20456
|
|
|
18921
20457
|
var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
|
|
18922
20458
|
eligibilityPlans = _useFetchEligibility[0],
|
|
@@ -19019,19 +20555,25 @@
|
|
|
19019
20555
|
}, /*#__PURE__*/react.createElement("div", {
|
|
19020
20556
|
className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
19021
20557
|
}, /*#__PURE__*/react.createElement(LogoIcon, {
|
|
19022
|
-
className: s$c.logo
|
|
20558
|
+
className: s$c.logo,
|
|
20559
|
+
monochrome: monochrome
|
|
19023
20560
|
}), /*#__PURE__*/react.createElement("div", {
|
|
19024
20561
|
className: classnames(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
19025
20562
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
19026
20563
|
var _cx2;
|
|
19027
20564
|
|
|
20565
|
+
var isCurrent = key === current;
|
|
19028
20566
|
return /*#__PURE__*/react.createElement("div", {
|
|
19029
20567
|
key: key,
|
|
19030
20568
|
onMouseEnter: function onMouseEnter() {
|
|
19031
20569
|
return onHover(key);
|
|
19032
20570
|
},
|
|
20571
|
+
onTouchStart: function onTouchStart() {
|
|
20572
|
+
return onHover(key);
|
|
20573
|
+
},
|
|
19033
20574
|
onMouseOut: onLeave,
|
|
19034
|
-
|
|
20575
|
+
onTouchEnd: onLeave,
|
|
20576
|
+
className: classnames(s$c.plan, (_cx2 = {}, _cx2[classnames(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$c.polychrome] = !monochrome && isCurrent, _cx2[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
19035
20577
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
19036
20578
|
}))), /*#__PURE__*/react.createElement("div", {
|
|
19037
20579
|
className: classnames(s$c.info, (_cx3 = {}, _cx3[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
|
|
@@ -19066,6 +20608,8 @@
|
|
|
19066
20608
|
plans = options.plans,
|
|
19067
20609
|
transitionDelay = options.transitionDelay,
|
|
19068
20610
|
hideIfNotEligible = options.hideIfNotEligible,
|
|
20611
|
+
_options$monochrome = options.monochrome,
|
|
20612
|
+
monochrome = _options$monochrome === void 0 ? true : _options$monochrome,
|
|
19069
20613
|
suggestedPaymentPlan = options.suggestedPaymentPlan,
|
|
19070
20614
|
_options$locale = options.locale,
|
|
19071
20615
|
locale = _options$locale === void 0 ? Locale.en : _options$locale,
|
|
@@ -19075,13 +20619,14 @@
|
|
|
19075
20619
|
reactDom.render( /*#__PURE__*/react.createElement(Provider$1, {
|
|
19076
20620
|
locale: locale
|
|
19077
20621
|
}, /*#__PURE__*/react.createElement(PaymentPlanWidget, {
|
|
19078
|
-
purchaseAmount: purchaseAmount,
|
|
19079
20622
|
apiData: this.apiData,
|
|
19080
20623
|
configPlans: plans,
|
|
19081
|
-
transitionDelay: transitionDelay,
|
|
19082
20624
|
hideIfNotEligible: hideIfNotEligible,
|
|
20625
|
+
monochrome: monochrome,
|
|
20626
|
+
purchaseAmount: purchaseAmount,
|
|
19083
20627
|
suggestedPaymentPlan: suggestedPaymentPlan,
|
|
19084
|
-
cards: cards
|
|
20628
|
+
cards: cards,
|
|
20629
|
+
transitionDelay: transitionDelay
|
|
19085
20630
|
})), document.querySelector(container));
|
|
19086
20631
|
}
|
|
19087
20632
|
}
|