1 | !function(root, factory) {
|
2 | "object" == typeof exports && "object" == typeof module ? module.exports = factory(require("react")) : "function" == typeof define && define.amd ? define([ "react" ], factory) : "object" == typeof exports ? exports.MediaQuery = factory(require("react")) : root.MediaQuery = factory(root.React);
|
3 | }("undefined" != typeof self ? self : this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
|
4 | return function(modules) {
|
5 | function __webpack_require__(moduleId) {
|
6 | if (installedModules[moduleId]) return installedModules[moduleId].exports;
|
7 | var module = installedModules[moduleId] = {
|
8 | i: moduleId,
|
9 | l: !1,
|
10 | exports: {}
|
11 | };
|
12 | return modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
|
13 | module.l = !0, module.exports;
|
14 | }
|
15 | var installedModules = {};
|
16 | return __webpack_require__.m = modules, __webpack_require__.c = installedModules,
|
17 | __webpack_require__.d = function(exports, name, getter) {
|
18 | __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, {
|
19 | configurable: !1,
|
20 | enumerable: !0,
|
21 | get: getter
|
22 | });
|
23 | }, __webpack_require__.n = function(module) {
|
24 | var getter = module && module.__esModule ? function() {
|
25 | return module.default;
|
26 | } : function() {
|
27 | return module;
|
28 | };
|
29 | return __webpack_require__.d(getter, "a", getter), getter;
|
30 | }, __webpack_require__.o = function(object, property) {
|
31 | return Object.prototype.hasOwnProperty.call(object, property);
|
32 | }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 8);
|
33 | }([ function(module, exports, __webpack_require__) {
|
34 | "use strict";
|
35 | var __importDefault = this && this.__importDefault || function(mod) {
|
36 | return mod && mod.__esModule ? mod : {
|
37 | default: mod
|
38 | };
|
39 | };
|
40 | Object.defineProperty(exports, "__esModule", {
|
41 | value: !0
|
42 | });
|
43 | var react_1 = __importDefault(__webpack_require__(1)), matchmediaquery_1 = __importDefault(__webpack_require__(9)), hyphenate_style_name_1 = __importDefault(__webpack_require__(2)), shallow_equal_1 = __webpack_require__(11), toQuery_1 = __importDefault(__webpack_require__(3)), Context_1 = __importDefault(__webpack_require__(7)), makeQuery = function(settings) {
|
44 | return settings.query || (0, toQuery_1.default)(settings);
|
45 | }, hyphenateKeys = function(obj) {
|
46 | if (obj) {
|
47 | return Object.keys(obj).reduce(function(result, key) {
|
48 | return result[(0, hyphenate_style_name_1.default)(key)] = obj[key], result;
|
49 | }, {});
|
50 | }
|
51 | }, useIsUpdate = function() {
|
52 | var ref = react_1.default.useRef(!1);
|
53 | return react_1.default.useEffect(function() {
|
54 | ref.current = !0;
|
55 | }, []), ref.current;
|
56 | }, useDevice = function(deviceFromProps) {
|
57 | var deviceFromContext = react_1.default.useContext(Context_1.default), getDevice = function() {
|
58 | return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);
|
59 | }, _a = react_1.default.useState(getDevice), device = _a[0], setDevice = _a[1];
|
60 | return react_1.default.useEffect(function() {
|
61 | var newDevice = getDevice();
|
62 | (0, shallow_equal_1.shallowEqualObjects)(device, newDevice) || setDevice(newDevice);
|
63 | }, [ deviceFromProps, deviceFromContext ]), device;
|
64 | }, useQuery = function(settings) {
|
65 | var getQuery = function() {
|
66 | return makeQuery(settings);
|
67 | }, _a = react_1.default.useState(getQuery), query = _a[0], setQuery = _a[1];
|
68 | return react_1.default.useEffect(function() {
|
69 | var newQuery = getQuery();
|
70 | query !== newQuery && setQuery(newQuery);
|
71 | }, [ settings ]), query;
|
72 | }, useMatchMedia = function(query, device) {
|
73 | var getMatchMedia = function() {
|
74 | return (0, matchmediaquery_1.default)(query, device || {}, !!device);
|
75 | }, _a = react_1.default.useState(getMatchMedia), mq = _a[0], setMq = _a[1], isUpdate = useIsUpdate();
|
76 | return react_1.default.useEffect(function() {
|
77 | if (isUpdate) {
|
78 | var newMq_1 = getMatchMedia();
|
79 | return setMq(newMq_1), function() {
|
80 | newMq_1 && newMq_1.dispose();
|
81 | };
|
82 | }
|
83 | }, [ query, device ]), mq;
|
84 | }, useMatches = function(mediaQuery) {
|
85 | var _a = react_1.default.useState(mediaQuery.matches), matches = _a[0], setMatches = _a[1];
|
86 | return react_1.default.useEffect(function() {
|
87 | var updateMatches = function() {
|
88 | setMatches(mediaQuery.matches);
|
89 | };
|
90 | return mediaQuery.addListener(updateMatches), updateMatches(), function() {
|
91 | mediaQuery.removeListener(updateMatches);
|
92 | };
|
93 | }, [ mediaQuery ]), matches;
|
94 | }, useMediaQuery = function(settings, device, onChange) {
|
95 | var deviceSettings = useDevice(device), query = useQuery(settings);
|
96 | if (!query) throw new Error("Invalid or missing MediaQuery!");
|
97 | var mq = useMatchMedia(query, deviceSettings), matches = useMatches(mq), isUpdate = useIsUpdate();
|
98 | return react_1.default.useEffect(function() {
|
99 | isUpdate && onChange && onChange(matches);
|
100 | }, [ matches ]), react_1.default.useEffect(function() {
|
101 | return function() {
|
102 | mq && mq.dispose();
|
103 | };
|
104 | }, []), matches;
|
105 | };
|
106 | exports.default = useMediaQuery;
|
107 | }, function(module, exports) {
|
108 | module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
|
109 | }, function(module, __webpack_exports__, __webpack_require__) {
|
110 | "use strict";
|
111 | function toHyphenLower(match) {
|
112 | return "-" + match.toLowerCase();
|
113 | }
|
114 | function hyphenateStyleName(name) {
|
115 | if (cache.hasOwnProperty(name)) return cache[name];
|
116 | var hName = name.replace(uppercasePattern, toHyphenLower);
|
117 | return cache[name] = msPattern.test(hName) ? "-" + hName : hName;
|
118 | }
|
119 | Object.defineProperty(__webpack_exports__, "__esModule", {
|
120 | value: !0
|
121 | });
|
122 | var uppercasePattern = /[A-Z]/g, msPattern = /^ms-/, cache = {};
|
123 | __webpack_exports__.default = hyphenateStyleName;
|
124 | }, function(module, exports, __webpack_require__) {
|
125 | "use strict";
|
126 | var __importDefault = this && this.__importDefault || function(mod) {
|
127 | return mod && mod.__esModule ? mod : {
|
128 | default: mod
|
129 | };
|
130 | };
|
131 | Object.defineProperty(exports, "__esModule", {
|
132 | value: !0
|
133 | });
|
134 | var hyphenate_style_name_1 = __importDefault(__webpack_require__(2)), mediaQuery_1 = __importDefault(__webpack_require__(12)), negate = function(cond) {
|
135 | return "not ".concat(cond);
|
136 | }, keyVal = function(k, v) {
|
137 | var realKey = (0, hyphenate_style_name_1.default)(k);
|
138 | return "number" == typeof v && (v = "".concat(v, "px")), !0 === v ? realKey : !1 === v ? negate(realKey) : "(".concat(realKey, ": ").concat(v, ")");
|
139 | }, join = function(conds) {
|
140 | return conds.join(" and ");
|
141 | }, toQuery = function(obj) {
|
142 | var rules = [];
|
143 | return Object.keys(mediaQuery_1.default.all).forEach(function(k) {
|
144 | var v = obj[k];
|
145 | null != v && rules.push(keyVal(k, v));
|
146 | }), join(rules);
|
147 | };
|
148 | exports.default = toQuery;
|
149 | }, function(module, exports, __webpack_require__) {
|
150 | "use strict";
|
151 | module.exports = __webpack_require__(14);
|
152 | }, function(module, exports, __webpack_require__) {
|
153 | "use strict";
|
154 | module.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
155 | }, function(module, exports) {
|
156 | module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
|
157 | }, function(module, exports, __webpack_require__) {
|
158 | "use strict";
|
159 | var __importDefault = this && this.__importDefault || function(mod) {
|
160 | return mod && mod.__esModule ? mod : {
|
161 | default: mod
|
162 | };
|
163 | };
|
164 | Object.defineProperty(exports, "__esModule", {
|
165 | value: !0
|
166 | });
|
167 | var react_1 = __importDefault(__webpack_require__(1)), Context = react_1.default.createContext(void 0);
|
168 | exports.default = Context;
|
169 | }, function(module, exports, __webpack_require__) {
|
170 | "use strict";
|
171 | var __importDefault = this && this.__importDefault || function(mod) {
|
172 | return mod && mod.__esModule ? mod : {
|
173 | default: mod
|
174 | };
|
175 | };
|
176 | Object.defineProperty(exports, "__esModule", {
|
177 | value: !0
|
178 | }), exports.Context = exports.toQuery = exports.useMediaQuery = exports.default = void 0;
|
179 | var useMediaQuery_1 = __importDefault(__webpack_require__(0));
|
180 | exports.useMediaQuery = useMediaQuery_1.default;
|
181 | var Component_1 = __importDefault(__webpack_require__(18));
|
182 | exports.default = Component_1.default;
|
183 | var toQuery_1 = __importDefault(__webpack_require__(3));
|
184 | exports.toQuery = toQuery_1.default;
|
185 | var Context_1 = __importDefault(__webpack_require__(7));
|
186 | exports.Context = Context_1.default;
|
187 | }, function(module, exports, __webpack_require__) {
|
188 | "use strict";
|
189 | function Mql(query, values, forceStatic) {
|
190 | function addListener(listener) {
|
191 | mql && mql.addListener(listener);
|
192 | }
|
193 | function removeListener(listener) {
|
194 | mql && mql.removeListener(listener);
|
195 | }
|
196 | function update(evt) {
|
197 | self.matches = evt.matches, self.media = evt.media;
|
198 | }
|
199 | function dispose() {
|
200 | mql && mql.removeListener(update);
|
201 | }
|
202 | var self = this;
|
203 | if (dynamicMatch && !forceStatic) {
|
204 | var mql = dynamicMatch.call(window, query);
|
205 | this.matches = mql.matches, this.media = mql.media, mql.addListener(update);
|
206 | } else this.matches = staticMatch(query, values), this.media = query;
|
207 | this.addListener = addListener, this.removeListener = removeListener, this.dispose = dispose;
|
208 | }
|
209 | function matchMedia(query, values, forceStatic) {
|
210 | return new Mql(query, values, forceStatic);
|
211 | }
|
212 | var staticMatch = __webpack_require__(10).match, dynamicMatch = "undefined" != typeof window ? window.matchMedia : null;
|
213 | module.exports = matchMedia;
|
214 | }, function(module, exports, __webpack_require__) {
|
215 | "use strict";
|
216 | function matchQuery(mediaQuery, values) {
|
217 | return parseQuery(mediaQuery).some(function(query) {
|
218 | var inverse = query.inverse, typeMatch = "all" === query.type || values.type === query.type;
|
219 | if (typeMatch && inverse || !typeMatch && !inverse) return !1;
|
220 | var expressionsMatch = query.expressions.every(function(expression) {
|
221 | var feature = expression.feature, modifier = expression.modifier, expValue = expression.value, value = values[feature];
|
222 | if (!value) return !1;
|
223 | switch (feature) {
|
224 | case "orientation":
|
225 | case "scan":
|
226 | return value.toLowerCase() === expValue.toLowerCase();
|
227 |
|
228 | case "width":
|
229 | case "height":
|
230 | case "device-width":
|
231 | case "device-height":
|
232 | expValue = toPx(expValue), value = toPx(value);
|
233 | break;
|
234 |
|
235 | case "resolution":
|
236 | expValue = toDpi(expValue), value = toDpi(value);
|
237 | break;
|
238 |
|
239 | case "aspect-ratio":
|
240 | case "device-aspect-ratio":
|
241 | case "device-pixel-ratio":
|
242 | expValue = toDecimal(expValue), value = toDecimal(value);
|
243 | break;
|
244 |
|
245 | case "grid":
|
246 | case "color":
|
247 | case "color-index":
|
248 | case "monochrome":
|
249 | expValue = parseInt(expValue, 10) || 1, value = parseInt(value, 10) || 0;
|
250 | }
|
251 | switch (modifier) {
|
252 | case "min":
|
253 | return value >= expValue;
|
254 |
|
255 | case "max":
|
256 | return value <= expValue;
|
257 |
|
258 | default:
|
259 | return value === expValue;
|
260 | }
|
261 | });
|
262 | return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
263 | });
|
264 | }
|
265 | function parseQuery(mediaQuery) {
|
266 | return mediaQuery.split(",").map(function(query) {
|
267 | query = query.trim();
|
268 | var captures = query.match(RE_MEDIA_QUERY), modifier = captures[1], type = captures[2], expressions = captures[3] || "", parsed = {};
|
269 | return parsed.inverse = !!modifier && "not" === modifier.toLowerCase(), parsed.type = type ? type.toLowerCase() : "all",
|
270 | expressions = expressions.match(/\([^\)]+\)/g) || [], parsed.expressions = expressions.map(function(expression) {
|
271 | var captures = expression.match(RE_MQ_EXPRESSION), feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);
|
272 | return {
|
273 | modifier: feature[1],
|
274 | feature: feature[2],
|
275 | value: captures[2]
|
276 | };
|
277 | }), parsed;
|
278 | });
|
279 | }
|
280 | function toDecimal(ratio) {
|
281 | var numbers, decimal = Number(ratio);
|
282 | return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]),
|
283 | decimal;
|
284 | }
|
285 | function toDpi(resolution) {
|
286 | var value = parseFloat(resolution);
|
287 | switch (String(resolution).match(RE_RESOLUTION_UNIT)[1]) {
|
288 | case "dpcm":
|
289 | return value / 2.54;
|
290 |
|
291 | case "dppx":
|
292 | return 96 * value;
|
293 |
|
294 | default:
|
295 | return value;
|
296 | }
|
297 | }
|
298 | function toPx(length) {
|
299 | var value = parseFloat(length);
|
300 | switch (String(length).match(RE_LENGTH_UNIT)[1]) {
|
301 | case "em":
|
302 | case "rem":
|
303 | return 16 * value;
|
304 |
|
305 | case "cm":
|
306 | return 96 * value / 2.54;
|
307 |
|
308 | case "mm":
|
309 | return 96 * value / 2.54 / 10;
|
310 |
|
311 | case "in":
|
312 | return 96 * value;
|
313 |
|
314 | case "pt":
|
315 | return 72 * value;
|
316 |
|
317 | case "pc":
|
318 | return 72 * value / 12;
|
319 |
|
320 | default:
|
321 | return value;
|
322 | }
|
323 | }
|
324 | exports.match = matchQuery, exports.parse = parseQuery;
|
325 | var RE_MEDIA_QUERY = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i, RE_MQ_EXPRESSION = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/, RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/, RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/, RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;
|
326 | }, function(module, __webpack_exports__, __webpack_require__) {
|
327 | "use strict";
|
328 | function shallowEqualObjects(objA, objB) {
|
329 | if (objA === objB) return !0;
|
330 | if (!objA || !objB) return !1;
|
331 | var aKeys = Object.keys(objA), bKeys = Object.keys(objB), len = aKeys.length;
|
332 | if (bKeys.length !== len) return !1;
|
333 | for (var i = 0; i < len; i++) {
|
334 | var key = aKeys[i];
|
335 | if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) return !1;
|
336 | }
|
337 | return !0;
|
338 | }
|
339 | function shallowEqualArrays(arrA, arrB) {
|
340 | if (arrA === arrB) return !0;
|
341 | if (!arrA || !arrB) return !1;
|
342 | var len = arrA.length;
|
343 | if (arrB.length !== len) return !1;
|
344 | for (var i = 0; i < len; i++) if (arrA[i] !== arrB[i]) return !1;
|
345 | return !0;
|
346 | }
|
347 | Object.defineProperty(__webpack_exports__, "__esModule", {
|
348 | value: !0
|
349 | }), __webpack_require__.d(__webpack_exports__, "shallowEqualArrays", function() {
|
350 | return shallowEqualArrays;
|
351 | }), __webpack_require__.d(__webpack_exports__, "shallowEqualObjects", function() {
|
352 | return shallowEqualObjects;
|
353 | });
|
354 | }, function(module, exports, __webpack_require__) {
|
355 | "use strict";
|
356 | var __assign = this && this.__assign || function() {
|
357 | return __assign = Object.assign || function(t) {
|
358 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
359 | s = arguments[i];
|
360 | for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
|
361 | }
|
362 | return t;
|
363 | }, __assign.apply(this, arguments);
|
364 | }, __rest = this && this.__rest || function(s, e) {
|
365 | var t = {};
|
366 | for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
367 | if (null != s && "function" == typeof Object.getOwnPropertySymbols) for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
368 | return t;
|
369 | }, __importDefault = this && this.__importDefault || function(mod) {
|
370 | return mod && mod.__esModule ? mod : {
|
371 | default: mod
|
372 | };
|
373 | };
|
374 | Object.defineProperty(exports, "__esModule", {
|
375 | value: !0
|
376 | });
|
377 | var prop_types_1 = __importDefault(__webpack_require__(13)), stringOrNumber = prop_types_1.default.oneOfType([ prop_types_1.default.string, prop_types_1.default.number ]), types = {
|
378 | all: prop_types_1.default.bool,
|
379 | grid: prop_types_1.default.bool,
|
380 | aural: prop_types_1.default.bool,
|
381 | braille: prop_types_1.default.bool,
|
382 | handheld: prop_types_1.default.bool,
|
383 | print: prop_types_1.default.bool,
|
384 | projection: prop_types_1.default.bool,
|
385 | screen: prop_types_1.default.bool,
|
386 | tty: prop_types_1.default.bool,
|
387 | tv: prop_types_1.default.bool,
|
388 | embossed: prop_types_1.default.bool
|
389 | }, matchers = {
|
390 | orientation: prop_types_1.default.oneOf([ "portrait", "landscape" ]),
|
391 | scan: prop_types_1.default.oneOf([ "progressive", "interlace" ]),
|
392 | aspectRatio: prop_types_1.default.string,
|
393 | deviceAspectRatio: prop_types_1.default.string,
|
394 | height: stringOrNumber,
|
395 | deviceHeight: stringOrNumber,
|
396 | width: stringOrNumber,
|
397 | deviceWidth: stringOrNumber,
|
398 | color: prop_types_1.default.bool,
|
399 | colorIndex: prop_types_1.default.bool,
|
400 | monochrome: prop_types_1.default.bool,
|
401 | resolution: stringOrNumber,
|
402 | type: Object.keys(types)
|
403 | }, featureMatchers = __rest(matchers, [ "type" ]), features = __assign({
|
404 | minAspectRatio: prop_types_1.default.string,
|
405 | maxAspectRatio: prop_types_1.default.string,
|
406 | minDeviceAspectRatio: prop_types_1.default.string,
|
407 | maxDeviceAspectRatio: prop_types_1.default.string,
|
408 | minHeight: stringOrNumber,
|
409 | maxHeight: stringOrNumber,
|
410 | minDeviceHeight: stringOrNumber,
|
411 | maxDeviceHeight: stringOrNumber,
|
412 | minWidth: stringOrNumber,
|
413 | maxWidth: stringOrNumber,
|
414 | minDeviceWidth: stringOrNumber,
|
415 | maxDeviceWidth: stringOrNumber,
|
416 | minColor: prop_types_1.default.number,
|
417 | maxColor: prop_types_1.default.number,
|
418 | minColorIndex: prop_types_1.default.number,
|
419 | maxColorIndex: prop_types_1.default.number,
|
420 | minMonochrome: prop_types_1.default.number,
|
421 | maxMonochrome: prop_types_1.default.number,
|
422 | minResolution: stringOrNumber,
|
423 | maxResolution: stringOrNumber
|
424 | }, featureMatchers), all = __assign(__assign({}, types), features);
|
425 | exports.default = {
|
426 | all: all,
|
427 | types: types,
|
428 | matchers: matchers,
|
429 | features: features
|
430 | };
|
431 | }, function(module, exports, __webpack_require__) {
|
432 | var ReactIs = __webpack_require__(4);
|
433 | module.exports = __webpack_require__(15)(ReactIs.isElement, !0);
|
434 | }, function(module, exports, __webpack_require__) {
|
435 | "use strict";
|
436 | !function() {
|
437 | function isValidElementType(type) {
|
438 | return "string" == typeof type || "function" == typeof type || 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 || "object" == typeof type && null !== type && (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);
|
439 | }
|
440 | function typeOf(object) {
|
441 | if ("object" == typeof object && null !== object) {
|
442 | var $$typeof = object.$$typeof;
|
443 | switch ($$typeof) {
|
444 | case REACT_ELEMENT_TYPE:
|
445 | var type = object.type;
|
446 | switch (type) {
|
447 | case REACT_ASYNC_MODE_TYPE:
|
448 | case REACT_CONCURRENT_MODE_TYPE:
|
449 | case REACT_FRAGMENT_TYPE:
|
450 | case REACT_PROFILER_TYPE:
|
451 | case REACT_STRICT_MODE_TYPE:
|
452 | case REACT_SUSPENSE_TYPE:
|
453 | return type;
|
454 |
|
455 | default:
|
456 | var $$typeofType = type && type.$$typeof;
|
457 | switch ($$typeofType) {
|
458 | case REACT_CONTEXT_TYPE:
|
459 | case REACT_FORWARD_REF_TYPE:
|
460 | case REACT_LAZY_TYPE:
|
461 | case REACT_MEMO_TYPE:
|
462 | case REACT_PROVIDER_TYPE:
|
463 | return $$typeofType;
|
464 |
|
465 | default:
|
466 | return $$typeof;
|
467 | }
|
468 | }
|
469 |
|
470 | case REACT_PORTAL_TYPE:
|
471 | return $$typeof;
|
472 | }
|
473 | }
|
474 | }
|
475 | function isAsyncMode(object) {
|
476 | return hasWarnedAboutDeprecatedIsAsyncMode || (hasWarnedAboutDeprecatedIsAsyncMode = !0,
|
477 | 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.")),
|
478 | isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
479 | }
|
480 | function isConcurrentMode(object) {
|
481 | return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
482 | }
|
483 | function isContextConsumer(object) {
|
484 | return typeOf(object) === REACT_CONTEXT_TYPE;
|
485 | }
|
486 | function isContextProvider(object) {
|
487 | return typeOf(object) === REACT_PROVIDER_TYPE;
|
488 | }
|
489 | function isElement(object) {
|
490 | return "object" == typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
491 | }
|
492 | function isForwardRef(object) {
|
493 | return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
494 | }
|
495 | function isFragment(object) {
|
496 | return typeOf(object) === REACT_FRAGMENT_TYPE;
|
497 | }
|
498 | function isLazy(object) {
|
499 | return typeOf(object) === REACT_LAZY_TYPE;
|
500 | }
|
501 | function isMemo(object) {
|
502 | return typeOf(object) === REACT_MEMO_TYPE;
|
503 | }
|
504 | function isPortal(object) {
|
505 | return typeOf(object) === REACT_PORTAL_TYPE;
|
506 | }
|
507 | function isProfiler(object) {
|
508 | return typeOf(object) === REACT_PROFILER_TYPE;
|
509 | }
|
510 | function isStrictMode(object) {
|
511 | return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
512 | }
|
513 | function isSuspense(object) {
|
514 | return typeOf(object) === REACT_SUSPENSE_TYPE;
|
515 | }
|
516 | var hasSymbol = "function" == typeof Symbol && Symbol.for, REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103, REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106, REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107, REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108, REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114, REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109, REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110, REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111, REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111, REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112, REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113, REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120, REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115, REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116, REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121, REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117, REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118, REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119, AsyncMode = REACT_ASYNC_MODE_TYPE, ConcurrentMode = REACT_CONCURRENT_MODE_TYPE, ContextConsumer = REACT_CONTEXT_TYPE, ContextProvider = REACT_PROVIDER_TYPE, Element = REACT_ELEMENT_TYPE, ForwardRef = REACT_FORWARD_REF_TYPE, Fragment = REACT_FRAGMENT_TYPE, Lazy = REACT_LAZY_TYPE, Memo = REACT_MEMO_TYPE, Portal = REACT_PORTAL_TYPE, Profiler = REACT_PROFILER_TYPE, StrictMode = REACT_STRICT_MODE_TYPE, Suspense = REACT_SUSPENSE_TYPE, hasWarnedAboutDeprecatedIsAsyncMode = !1;
|
517 | exports.AsyncMode = AsyncMode, exports.ConcurrentMode = ConcurrentMode, exports.ContextConsumer = ContextConsumer,
|
518 | exports.ContextProvider = ContextProvider, exports.Element = Element, exports.ForwardRef = ForwardRef,
|
519 | exports.Fragment = Fragment, exports.Lazy = Lazy, exports.Memo = Memo, exports.Portal = Portal,
|
520 | exports.Profiler = Profiler, exports.StrictMode = StrictMode, exports.Suspense = Suspense,
|
521 | exports.isAsyncMode = isAsyncMode, exports.isConcurrentMode = isConcurrentMode,
|
522 | exports.isContextConsumer = isContextConsumer, exports.isContextProvider = isContextProvider,
|
523 | exports.isElement = isElement, exports.isForwardRef = isForwardRef, exports.isFragment = isFragment,
|
524 | exports.isLazy = isLazy, exports.isMemo = isMemo, exports.isPortal = isPortal, exports.isProfiler = isProfiler,
|
525 | exports.isStrictMode = isStrictMode, exports.isSuspense = isSuspense, exports.isValidElementType = isValidElementType,
|
526 | exports.typeOf = typeOf;
|
527 | }();
|
528 | }, function(module, exports, __webpack_require__) {
|
529 | "use strict";
|
530 | function emptyFunctionThatReturnsNull() {
|
531 | return null;
|
532 | }
|
533 | var ReactIs = __webpack_require__(4), assign = __webpack_require__(16), ReactPropTypesSecret = __webpack_require__(5), has = __webpack_require__(6), checkPropTypes = __webpack_require__(17), printWarning = function() {};
|
534 | printWarning = function(text) {
|
535 | var message = "Warning: " + text;
|
536 | "undefined" != typeof console && console.error(message);
|
537 | try {
|
538 | throw new Error(message);
|
539 | } catch (x) {}
|
540 | }, module.exports = function(isValidElement, throwOnDirectAccess) {
|
541 | function getIteratorFn(maybeIterable) {
|
542 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
543 | if ("function" == typeof iteratorFn) return iteratorFn;
|
544 | }
|
545 | function is(x, y) {
|
546 | return x === y ? 0 !== x || 1 / x == 1 / y : x !== x && y !== y;
|
547 | }
|
548 | function PropTypeError(message, data) {
|
549 | this.message = message, this.data = data && "object" == typeof data ? data : {},
|
550 | this.stack = "";
|
551 | }
|
552 | function createChainableTypeChecker(validate) {
|
553 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
554 | if (componentName = componentName || ANONYMOUS, propFullName = propFullName || propName,
|
555 | secret !== ReactPropTypesSecret) {
|
556 | if (throwOnDirectAccess) {
|
557 | 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");
|
558 | throw err.name = "Invariant Violation", err;
|
559 | }
|
560 | if ("undefined" != typeof console) {
|
561 | var cacheKey = componentName + ":" + propName;
|
562 | !manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3 && (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."),
|
563 | manualPropTypeCallCache[cacheKey] = !0, manualPropTypeWarningCount++);
|
564 | }
|
565 | }
|
566 | return null == props[propName] ? isRequired ? new PropTypeError(null === props[propName] ? "The " + location + " `" + propFullName + "` is marked as required in `" + componentName + "`, but its value is `null`." : "The " + location + " `" + propFullName + "` is marked as required in `" + componentName + "`, but its value is `undefined`.") : null : validate(props, propName, componentName, location, propFullName);
|
567 | }
|
568 | var manualPropTypeCallCache = {}, manualPropTypeWarningCount = 0, chainedCheckType = checkType.bind(null, !1);
|
569 | return chainedCheckType.isRequired = checkType.bind(null, !0), chainedCheckType;
|
570 | }
|
571 | function createPrimitiveTypeChecker(expectedType) {
|
572 | function validate(props, propName, componentName, location, propFullName, secret) {
|
573 | var propValue = props[propName];
|
574 | if (getPropType(propValue) !== expectedType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPreciseType(propValue) + "` supplied to `" + componentName + "`, expected `" + expectedType + "`.", {
|
575 | expectedType: expectedType
|
576 | });
|
577 | return null;
|
578 | }
|
579 | return createChainableTypeChecker(validate);
|
580 | }
|
581 | function createArrayOfTypeChecker(typeChecker) {
|
582 | function validate(props, propName, componentName, location, propFullName) {
|
583 | if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
|
584 | var propValue = props[propName];
|
585 | if (!Array.isArray(propValue)) {
|
586 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPropType(propValue) + "` supplied to `" + componentName + "`, expected an array.");
|
587 | }
|
588 | for (var i = 0; i < propValue.length; i++) {
|
589 | var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
|
590 | if (error instanceof Error) return error;
|
591 | }
|
592 | return null;
|
593 | }
|
594 | return createChainableTypeChecker(validate);
|
595 | }
|
596 | function createInstanceTypeChecker(expectedClass) {
|
597 | function validate(props, propName, componentName, location, propFullName) {
|
598 | if (!(props[propName] instanceof expectedClass)) {
|
599 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
600 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getClassName(props[propName]) + "` supplied to `" + componentName + "`, expected instance of `" + expectedClassName + "`.");
|
601 | }
|
602 | return null;
|
603 | }
|
604 | return createChainableTypeChecker(validate);
|
605 | }
|
606 | function createEnumTypeChecker(expectedValues) {
|
607 | function validate(props, propName, componentName, location, propFullName) {
|
608 | for (var propValue = props[propName], i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null;
|
609 | var valuesString = JSON.stringify(expectedValues, function(key, value) {
|
610 | return "symbol" === getPreciseType(value) ? String(value) : value;
|
611 | });
|
612 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` supplied to `" + componentName + "`, expected one of " + valuesString + ".");
|
613 | }
|
614 | return Array.isArray(expectedValues) ? createChainableTypeChecker(validate) : (printWarning(arguments.length > 1 ? "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])." : "Invalid argument supplied to oneOf, expected an array."),
|
615 | emptyFunctionThatReturnsNull);
|
616 | }
|
617 | function createObjectOfTypeChecker(typeChecker) {
|
618 | function validate(props, propName, componentName, location, propFullName) {
|
619 | if ("function" != typeof typeChecker) return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
|
620 | var propValue = props[propName], propType = getPropType(propValue);
|
621 | if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected an object.");
|
622 | for (var key in propValue) if (has(propValue, key)) {
|
623 | var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
624 | if (error instanceof Error) return error;
|
625 | }
|
626 | return null;
|
627 | }
|
628 | return createChainableTypeChecker(validate);
|
629 | }
|
630 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
631 | function validate(props, propName, componentName, location, propFullName) {
|
632 | for (var expectedTypes = [], i = 0; i < arrayOfTypeCheckers.length; i++) {
|
633 | var checker = arrayOfTypeCheckers[i], checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
634 | if (null == checkerResult) return null;
|
635 | checkerResult.data && has(checkerResult.data, "expectedType") && expectedTypes.push(checkerResult.data.expectedType);
|
636 | }
|
637 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to `" + componentName + "`" + (expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "") + ".");
|
638 | }
|
639 | if (!Array.isArray(arrayOfTypeCheckers)) return printWarning("Invalid argument supplied to oneOfType, expected an instance of array."),
|
640 | emptyFunctionThatReturnsNull;
|
641 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
642 | var checker = arrayOfTypeCheckers[i];
|
643 | if ("function" != typeof checker) return printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."),
|
644 | emptyFunctionThatReturnsNull;
|
645 | }
|
646 | return createChainableTypeChecker(validate);
|
647 | }
|
648 | function invalidValidatorError(componentName, location, propFullName, key, type) {
|
649 | 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 + "`.");
|
650 | }
|
651 | function createShapeTypeChecker(shapeTypes) {
|
652 | function validate(props, propName, componentName, location, propFullName) {
|
653 | var propValue = props[propName], propType = getPropType(propValue);
|
654 | if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected `object`.");
|
655 | for (var key in shapeTypes) {
|
656 | var checker = shapeTypes[key];
|
657 | if ("function" != typeof checker) return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
658 | var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
659 | if (error) return error;
|
660 | }
|
661 | return null;
|
662 | }
|
663 | return createChainableTypeChecker(validate);
|
664 | }
|
665 | function createStrictShapeTypeChecker(shapeTypes) {
|
666 | function validate(props, propName, componentName, location, propFullName) {
|
667 | var propValue = props[propName], propType = getPropType(propValue);
|
668 | if ("object" !== propType) return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` supplied to `" + componentName + "`, expected `object`.");
|
669 | var allKeys = assign({}, props[propName], shapeTypes);
|
670 | for (var key in allKeys) {
|
671 | var checker = shapeTypes[key];
|
672 | if (has(shapeTypes, key) && "function" != typeof checker) return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
673 | 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, " "));
|
674 | var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
|
675 | if (error) return error;
|
676 | }
|
677 | return null;
|
678 | }
|
679 | return createChainableTypeChecker(validate);
|
680 | }
|
681 | function isNode(propValue) {
|
682 | switch (typeof propValue) {
|
683 | case "number":
|
684 | case "string":
|
685 | case "undefined":
|
686 | return !0;
|
687 |
|
688 | case "boolean":
|
689 | return !propValue;
|
690 |
|
691 | case "object":
|
692 | if (Array.isArray(propValue)) return propValue.every(isNode);
|
693 | if (null === propValue || isValidElement(propValue)) return !0;
|
694 | var iteratorFn = getIteratorFn(propValue);
|
695 | if (!iteratorFn) return !1;
|
696 | var step, iterator = iteratorFn.call(propValue);
|
697 | if (iteratorFn !== propValue.entries) {
|
698 | for (;!(step = iterator.next()).done; ) if (!isNode(step.value)) return !1;
|
699 | } else for (;!(step = iterator.next()).done; ) {
|
700 | var entry = step.value;
|
701 | if (entry && !isNode(entry[1])) return !1;
|
702 | }
|
703 | return !0;
|
704 |
|
705 | default:
|
706 | return !1;
|
707 | }
|
708 | }
|
709 | function isSymbol(propType, propValue) {
|
710 | return "symbol" === propType || !!propValue && ("Symbol" === propValue["@@toStringTag"] || "function" == typeof Symbol && propValue instanceof Symbol);
|
711 | }
|
712 | function getPropType(propValue) {
|
713 | var propType = typeof propValue;
|
714 | return Array.isArray(propValue) ? "array" : propValue instanceof RegExp ? "object" : isSymbol(propType, propValue) ? "symbol" : propType;
|
715 | }
|
716 | function getPreciseType(propValue) {
|
717 | if (void 0 === propValue || null === propValue) return "" + propValue;
|
718 | var propType = getPropType(propValue);
|
719 | if ("object" === propType) {
|
720 | if (propValue instanceof Date) return "date";
|
721 | if (propValue instanceof RegExp) return "regexp";
|
722 | }
|
723 | return propType;
|
724 | }
|
725 | function getPostfixForTypeWarning(value) {
|
726 | var type = getPreciseType(value);
|
727 | switch (type) {
|
728 | case "array":
|
729 | case "object":
|
730 | return "an " + type;
|
731 |
|
732 | case "boolean":
|
733 | case "date":
|
734 | case "regexp":
|
735 | return "a " + type;
|
736 |
|
737 | default:
|
738 | return type;
|
739 | }
|
740 | }
|
741 | function getClassName(propValue) {
|
742 | return propValue.constructor && propValue.constructor.name ? propValue.constructor.name : ANONYMOUS;
|
743 | }
|
744 | var ITERATOR_SYMBOL = "function" == typeof Symbol && Symbol.iterator, FAUX_ITERATOR_SYMBOL = "@@iterator", ANONYMOUS = "<<anonymous>>", ReactPropTypes = {
|
745 | array: createPrimitiveTypeChecker("array"),
|
746 | bigint: createPrimitiveTypeChecker("bigint"),
|
747 | bool: createPrimitiveTypeChecker("boolean"),
|
748 | func: createPrimitiveTypeChecker("function"),
|
749 | number: createPrimitiveTypeChecker("number"),
|
750 | object: createPrimitiveTypeChecker("object"),
|
751 | string: createPrimitiveTypeChecker("string"),
|
752 | symbol: createPrimitiveTypeChecker("symbol"),
|
753 | any: function() {
|
754 | return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
755 | }(),
|
756 | arrayOf: createArrayOfTypeChecker,
|
757 | element: function() {
|
758 | function validate(props, propName, componentName, location, propFullName) {
|
759 | var propValue = props[propName];
|
760 | if (!isValidElement(propValue)) {
|
761 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPropType(propValue) + "` supplied to `" + componentName + "`, expected a single ReactElement.");
|
762 | }
|
763 | return null;
|
764 | }
|
765 | return createChainableTypeChecker(validate);
|
766 | }(),
|
767 | elementType: function() {
|
768 | function validate(props, propName, componentName, location, propFullName) {
|
769 | var propValue = props[propName];
|
770 | if (!ReactIs.isValidElementType(propValue)) {
|
771 | return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + getPropType(propValue) + "` supplied to `" + componentName + "`, expected a single ReactElement type.");
|
772 | }
|
773 | return null;
|
774 | }
|
775 | return createChainableTypeChecker(validate);
|
776 | }(),
|
777 | instanceOf: createInstanceTypeChecker,
|
778 | node: function() {
|
779 | function validate(props, propName, componentName, location, propFullName) {
|
780 | return isNode(props[propName]) ? null : new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to `" + componentName + "`, expected a ReactNode.");
|
781 | }
|
782 | return createChainableTypeChecker(validate);
|
783 | }(),
|
784 | objectOf: createObjectOfTypeChecker,
|
785 | oneOf: createEnumTypeChecker,
|
786 | oneOfType: createUnionTypeChecker,
|
787 | shape: createShapeTypeChecker,
|
788 | exact: createStrictShapeTypeChecker
|
789 | };
|
790 | return PropTypeError.prototype = Error.prototype, ReactPropTypes.checkPropTypes = checkPropTypes,
|
791 | ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache, ReactPropTypes.PropTypes = ReactPropTypes,
|
792 | ReactPropTypes;
|
793 | };
|
794 | }, function(module, exports, __webpack_require__) {
|
795 | "use strict";
|
796 | function toObject(val) {
|
797 | if (null === val || void 0 === val) throw new TypeError("Object.assign cannot be called with null or undefined");
|
798 | return Object(val);
|
799 | }
|
800 | |
801 |
|
802 |
|
803 |
|
804 |
|
805 | var getOwnPropertySymbols = Object.getOwnPropertySymbols, hasOwnProperty = Object.prototype.hasOwnProperty, propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
806 | module.exports = function() {
|
807 | try {
|
808 | if (!Object.assign) return !1;
|
809 | var test1 = new String("abc");
|
810 | if (test1[5] = "de", "5" === Object.getOwnPropertyNames(test1)[0]) return !1;
|
811 | for (var test2 = {}, i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i;
|
812 | if ("0123456789" !== Object.getOwnPropertyNames(test2).map(function(n) {
|
813 | return test2[n];
|
814 | }).join("")) return !1;
|
815 | var test3 = {};
|
816 | return "abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
817 | test3[letter] = letter;
|
818 | }), "abcdefghijklmnopqrst" === Object.keys(Object.assign({}, test3)).join("");
|
819 | } catch (err) {
|
820 | return !1;
|
821 | }
|
822 | }() ? Object.assign : function(target, source) {
|
823 | for (var from, symbols, to = toObject(target), s = 1; s < arguments.length; s++) {
|
824 | from = Object(arguments[s]);
|
825 | for (var key in from) hasOwnProperty.call(from, key) && (to[key] = from[key]);
|
826 | if (getOwnPropertySymbols) {
|
827 | symbols = getOwnPropertySymbols(from);
|
828 | for (var i = 0; i < symbols.length; i++) propIsEnumerable.call(from, symbols[i]) && (to[symbols[i]] = from[symbols[i]]);
|
829 | }
|
830 | }
|
831 | return to;
|
832 | };
|
833 | }, function(module, exports, __webpack_require__) {
|
834 | "use strict";
|
835 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
836 | for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) {
|
837 | var error;
|
838 | try {
|
839 | if ("function" != typeof typeSpecs[typeSpecName]) {
|
840 | 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`.");
|
841 | throw err.name = "Invariant Violation", err;
|
842 | }
|
843 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
844 | } catch (ex) {
|
845 | error = ex;
|
846 | }
|
847 | if (!error || error instanceof Error || 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)."),
|
848 | error instanceof Error && !(error.message in loggedTypeFailures)) {
|
849 | loggedTypeFailures[error.message] = !0;
|
850 | var stack = getStack ? getStack() : "";
|
851 | printWarning("Failed " + location + " type: " + error.message + (null != stack ? stack : ""));
|
852 | }
|
853 | }
|
854 | }
|
855 | var printWarning = function() {}, ReactPropTypesSecret = __webpack_require__(5), loggedTypeFailures = {}, has = __webpack_require__(6);
|
856 | printWarning = function(text) {
|
857 | var message = "Warning: " + text;
|
858 | "undefined" != typeof console && console.error(message);
|
859 | try {
|
860 | throw new Error(message);
|
861 | } catch (x) {}
|
862 | }, checkPropTypes.resetWarningCache = function() {
|
863 | loggedTypeFailures = {};
|
864 | }, module.exports = checkPropTypes;
|
865 | }, function(module, exports, __webpack_require__) {
|
866 | "use strict";
|
867 | var __rest = this && this.__rest || function(s, e) {
|
868 | var t = {};
|
869 | for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
870 | if (null != s && "function" == typeof Object.getOwnPropertySymbols) for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
871 | return t;
|
872 | }, __importDefault = this && this.__importDefault || function(mod) {
|
873 | return mod && mod.__esModule ? mod : {
|
874 | default: mod
|
875 | };
|
876 | };
|
877 | Object.defineProperty(exports, "__esModule", {
|
878 | value: !0
|
879 | });
|
880 | var useMediaQuery_1 = __importDefault(__webpack_require__(0)), MediaQuery = function(_a) {
|
881 | var children = _a.children, device = _a.device, onChange = _a.onChange, settings = __rest(_a, [ "children", "device", "onChange" ]), matches = (0,
|
882 | useMediaQuery_1.default)(settings, device, onChange);
|
883 | return "function" == typeof children ? children(matches) : matches ? children : null;
|
884 | };
|
885 | exports.default = MediaQuery;
|
886 | } ]);
|
887 | });
|
888 |
|
\ | No newline at end of file |