1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId])
|
11 | return installedModules[moduleId].exports;
|
12 |
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | exports: {},
|
16 | id: moduleId,
|
17 | loaded: false
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.loaded = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.p = "";
|
39 |
|
40 |
|
41 | return __webpack_require__(0);
|
42 | })
|
43 |
|
44 | ([
|
45 |
|
46 | (function(module, exports, __webpack_require__) {
|
47 |
|
48 | module.exports = __webpack_require__(1);
|
49 |
|
50 |
|
51 | }),
|
52 |
|
53 | (function(module, exports, __webpack_require__) {
|
54 |
|
55 | 'use strict';
|
56 |
|
57 | Object.defineProperty(exports, '__esModule', {
|
58 | value: true
|
59 | });
|
60 |
|
61 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
62 |
|
63 | var _Highlighter = __webpack_require__(2);
|
64 |
|
65 | var _Highlighter2 = _interopRequireDefault(_Highlighter);
|
66 |
|
67 | exports['default'] = _Highlighter2['default'];
|
68 | module.exports = exports['default'];
|
69 |
|
70 | }),
|
71 |
|
72 | (function(module, exports, __webpack_require__) {
|
73 |
|
74 | 'use strict';
|
75 |
|
76 | Object.defineProperty(exports, '__esModule', {
|
77 | value: true
|
78 | });
|
79 | exports['default'] = Highlighter;
|
80 |
|
81 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
82 |
|
83 | var _highlightWordsCore = __webpack_require__(3);
|
84 |
|
85 | var _propTypes = __webpack_require__(4);
|
86 |
|
87 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
88 |
|
89 | var _react = __webpack_require__(14);
|
90 |
|
91 | var _memoizeOne = __webpack_require__(15);
|
92 |
|
93 | var _memoizeOne2 = _interopRequireDefault(_memoizeOne);
|
94 |
|
95 | Highlighter.propTypes = {
|
96 | activeClassName: _propTypes2['default'].string,
|
97 | activeIndex: _propTypes2['default'].number,
|
98 | activeStyle: _propTypes2['default'].object,
|
99 | autoEscape: _propTypes2['default'].bool,
|
100 | className: _propTypes2['default'].string,
|
101 | findChunks: _propTypes2['default'].func,
|
102 | highlightClassName: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].string]),
|
103 | highlightStyle: _propTypes2['default'].object,
|
104 | highlightTag: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func, _propTypes2['default'].string]),
|
105 | sanitize: _propTypes2['default'].func,
|
106 | searchWords: _propTypes2['default'].arrayOf(_propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].instanceOf(RegExp)])).isRequired,
|
107 | textToHighlight: _propTypes2['default'].string.isRequired,
|
108 | unhighlightClassName: _propTypes2['default'].string,
|
109 | unhighlightStyle: _propTypes2['default'].object
|
110 | };
|
111 |
|
112 | |
113 |
|
114 |
|
115 |
|
116 |
|
117 | function Highlighter(_ref) {
|
118 | var _ref$activeClassName = _ref.activeClassName;
|
119 | var activeClassName = _ref$activeClassName === undefined ? '' : _ref$activeClassName;
|
120 | var _ref$activeIndex = _ref.activeIndex;
|
121 | var activeIndex = _ref$activeIndex === undefined ? -1 : _ref$activeIndex;
|
122 | var activeStyle = _ref.activeStyle;
|
123 | var autoEscape = _ref.autoEscape;
|
124 | var _ref$caseSensitive = _ref.caseSensitive;
|
125 | var caseSensitive = _ref$caseSensitive === undefined ? false : _ref$caseSensitive;
|
126 | var className = _ref.className;
|
127 | var findChunks = _ref.findChunks;
|
128 | var _ref$highlightClassName = _ref.highlightClassName;
|
129 | var highlightClassName = _ref$highlightClassName === undefined ? '' : _ref$highlightClassName;
|
130 | var _ref$highlightStyle = _ref.highlightStyle;
|
131 | var highlightStyle = _ref$highlightStyle === undefined ? {} : _ref$highlightStyle;
|
132 | var _ref$highlightTag = _ref.highlightTag;
|
133 | var highlightTag = _ref$highlightTag === undefined ? 'mark' : _ref$highlightTag;
|
134 | var sanitize = _ref.sanitize;
|
135 | var searchWords = _ref.searchWords;
|
136 | var textToHighlight = _ref.textToHighlight;
|
137 | var _ref$unhighlightClassName = _ref.unhighlightClassName;
|
138 | var unhighlightClassName = _ref$unhighlightClassName === undefined ? '' : _ref$unhighlightClassName;
|
139 | var unhighlightStyle = _ref.unhighlightStyle;
|
140 |
|
141 | var chunks = (0, _highlightWordsCore.findAll)({
|
142 | autoEscape: autoEscape,
|
143 | caseSensitive: caseSensitive,
|
144 | findChunks: findChunks,
|
145 | sanitize: sanitize,
|
146 | searchWords: searchWords,
|
147 | textToHighlight: textToHighlight
|
148 | });
|
149 | var HighlightTag = highlightTag;
|
150 | var highlightIndex = -1;
|
151 | var highlightClassNames = '';
|
152 | var highlightStyles = undefined;
|
153 |
|
154 | var lowercaseProps = function lowercaseProps(object) {
|
155 | var mapped = {};
|
156 | for (var key in object) {
|
157 | mapped[key.toLowerCase()] = object[key];
|
158 | }
|
159 | return mapped;
|
160 | };
|
161 | var memoizedLowercaseProps = (0, _memoizeOne2['default'])(lowercaseProps);
|
162 |
|
163 | return (0, _react.createElement)('span', {
|
164 | className: className,
|
165 | children: chunks.map(function (chunk, index) {
|
166 | var text = textToHighlight.substr(chunk.start, chunk.end - chunk.start);
|
167 |
|
168 | if (chunk.highlight) {
|
169 | highlightIndex++;
|
170 |
|
171 | var highlightClass = undefined;
|
172 | if (typeof highlightClassName === 'object') {
|
173 | if (!caseSensitive) {
|
174 | highlightClassName = memoizedLowercaseProps(highlightClassName);
|
175 | highlightClass = highlightClassName[text.toLowerCase()];
|
176 | } else {
|
177 | highlightClass = highlightClassName[text];
|
178 | }
|
179 | } else {
|
180 | highlightClass = highlightClassName;
|
181 | }
|
182 |
|
183 | var isActive = highlightIndex === +activeIndex;
|
184 |
|
185 | highlightClassNames = highlightClass + ' ' + (isActive ? activeClassName : '');
|
186 | highlightStyles = isActive === true && activeStyle != null ? Object.assign({}, highlightStyle, activeStyle) : highlightStyle;
|
187 |
|
188 | var props = {
|
189 | children: text,
|
190 | className: highlightClassNames,
|
191 | key: index,
|
192 | style: highlightStyles
|
193 | };
|
194 |
|
195 |
|
196 |
|
197 | if (typeof HighlightTag !== 'string') {
|
198 | props.highlightIndex = highlightIndex;
|
199 | }
|
200 |
|
201 | return (0, _react.createElement)(HighlightTag, props);
|
202 | } else {
|
203 | return (0, _react.createElement)('span', {
|
204 | children: text,
|
205 | className: unhighlightClassName,
|
206 | key: index,
|
207 | style: unhighlightStyle
|
208 | });
|
209 | }
|
210 | })
|
211 | });
|
212 | }
|
213 |
|
214 | module.exports = exports['default'];
|
215 |
|
216 | }),
|
217 |
|
218 | (function(module, exports) {
|
219 |
|
220 | module.exports =
|
221 | (function(modules) {
|
222 |
|
223 | var installedModules = {};
|
224 |
|
225 |
|
226 | function __webpack_require__(moduleId) {
|
227 |
|
228 |
|
229 | if(installedModules[moduleId])
|
230 | return installedModules[moduleId].exports;
|
231 |
|
232 |
|
233 | var module = installedModules[moduleId] = {
|
234 | exports: {},
|
235 | id: moduleId,
|
236 | loaded: false
|
237 | };
|
238 |
|
239 |
|
240 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
241 |
|
242 |
|
243 | module.loaded = true;
|
244 |
|
245 |
|
246 | return module.exports;
|
247 | }
|
248 |
|
249 |
|
250 |
|
251 | __webpack_require__.m = modules;
|
252 |
|
253 |
|
254 | __webpack_require__.c = installedModules;
|
255 |
|
256 |
|
257 | __webpack_require__.p = "";
|
258 |
|
259 |
|
260 | return __webpack_require__(0);
|
261 | })
|
262 |
|
263 | ([
|
264 |
|
265 | (function(module, exports, __webpack_require__) {
|
266 |
|
267 | module.exports = __webpack_require__(1);
|
268 |
|
269 |
|
270 | }),
|
271 |
|
272 | (function(module, exports, __webpack_require__) {
|
273 |
|
274 | 'use strict';
|
275 |
|
276 | Object.defineProperty(exports, "__esModule", {
|
277 | value: true
|
278 | });
|
279 |
|
280 | var _utils = __webpack_require__(2);
|
281 |
|
282 | Object.defineProperty(exports, 'combineChunks', {
|
283 | enumerable: true,
|
284 | get: function get() {
|
285 | return _utils.combineChunks;
|
286 | }
|
287 | });
|
288 | Object.defineProperty(exports, 'fillInChunks', {
|
289 | enumerable: true,
|
290 | get: function get() {
|
291 | return _utils.fillInChunks;
|
292 | }
|
293 | });
|
294 | Object.defineProperty(exports, 'findAll', {
|
295 | enumerable: true,
|
296 | get: function get() {
|
297 | return _utils.findAll;
|
298 | }
|
299 | });
|
300 | Object.defineProperty(exports, 'findChunks', {
|
301 | enumerable: true,
|
302 | get: function get() {
|
303 | return _utils.findChunks;
|
304 | }
|
305 | });
|
306 |
|
307 | }),
|
308 |
|
309 | (function(module, exports) {
|
310 |
|
311 | 'use strict';
|
312 |
|
313 | Object.defineProperty(exports, "__esModule", {
|
314 | value: true
|
315 | });
|
316 | |
317 |
|
318 |
|
319 |
|
320 | var findAll = exports.findAll = function findAll(_ref) {
|
321 | var autoEscape = _ref.autoEscape,
|
322 | _ref$caseSensitive = _ref.caseSensitive,
|
323 | caseSensitive = _ref$caseSensitive === undefined ? false : _ref$caseSensitive,
|
324 | _ref$findChunks = _ref.findChunks,
|
325 | findChunks = _ref$findChunks === undefined ? defaultFindChunks : _ref$findChunks,
|
326 | sanitize = _ref.sanitize,
|
327 | searchWords = _ref.searchWords,
|
328 | textToHighlight = _ref.textToHighlight;
|
329 | return fillInChunks({
|
330 | chunksToHighlight: combineChunks({
|
331 | chunks: findChunks({
|
332 | autoEscape: autoEscape,
|
333 | caseSensitive: caseSensitive,
|
334 | sanitize: sanitize,
|
335 | searchWords: searchWords,
|
336 | textToHighlight: textToHighlight
|
337 | })
|
338 | }),
|
339 | totalLength: textToHighlight ? textToHighlight.length : 0
|
340 | });
|
341 | };
|
342 |
|
343 | |
344 |
|
345 |
|
346 |
|
347 | var combineChunks = exports.combineChunks = function combineChunks(_ref2) {
|
348 | var chunks = _ref2.chunks;
|
349 |
|
350 | chunks = chunks.sort(function (first, second) {
|
351 | return first.start - second.start;
|
352 | }).reduce(function (processedChunks, nextChunk) {
|
353 |
|
354 | if (processedChunks.length === 0) {
|
355 | return [nextChunk];
|
356 | } else {
|
357 |
|
358 | var prevChunk = processedChunks.pop();
|
359 | if (nextChunk.start <= prevChunk.end) {
|
360 |
|
361 |
|
362 | var endIndex = Math.max(prevChunk.end, nextChunk.end);
|
363 | processedChunks.push({ start: prevChunk.start, end: endIndex });
|
364 | } else {
|
365 | processedChunks.push(prevChunk, nextChunk);
|
366 | }
|
367 | return processedChunks;
|
368 | }
|
369 | }, []);
|
370 |
|
371 | return chunks;
|
372 | };
|
373 |
|
374 | |
375 |
|
376 |
|
377 |
|
378 |
|
379 | var defaultFindChunks = function defaultFindChunks(_ref3) {
|
380 | var autoEscape = _ref3.autoEscape,
|
381 | caseSensitive = _ref3.caseSensitive,
|
382 | _ref3$sanitize = _ref3.sanitize,
|
383 | sanitize = _ref3$sanitize === undefined ? identity : _ref3$sanitize,
|
384 | searchWords = _ref3.searchWords,
|
385 | textToHighlight = _ref3.textToHighlight;
|
386 |
|
387 | textToHighlight = sanitize(textToHighlight);
|
388 |
|
389 | return searchWords.filter(function (searchWord) {
|
390 | return searchWord;
|
391 | })
|
392 | .reduce(function (chunks, searchWord) {
|
393 | searchWord = sanitize(searchWord);
|
394 |
|
395 | if (autoEscape) {
|
396 | searchWord = escapeRegExpFn(searchWord);
|
397 | }
|
398 |
|
399 | var regex = new RegExp(searchWord, caseSensitive ? 'g' : 'gi');
|
400 |
|
401 | var match = void 0;
|
402 | while (match = regex.exec(textToHighlight)) {
|
403 | var start = match.index;
|
404 | var end = regex.lastIndex;
|
405 |
|
406 | if (end > start) {
|
407 | chunks.push({ start: start, end: end });
|
408 | }
|
409 |
|
410 |
|
411 |
|
412 | if (match.index == regex.lastIndex) {
|
413 | regex.lastIndex++;
|
414 | }
|
415 | }
|
416 |
|
417 | return chunks;
|
418 | }, []);
|
419 | };
|
420 |
|
421 |
|
422 | exports.findChunks = defaultFindChunks;
|
423 |
|
424 | |
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 | var fillInChunks = exports.fillInChunks = function fillInChunks(_ref4) {
|
433 | var chunksToHighlight = _ref4.chunksToHighlight,
|
434 | totalLength = _ref4.totalLength;
|
435 |
|
436 | var allChunks = [];
|
437 | var append = function append(start, end, highlight) {
|
438 | if (end - start > 0) {
|
439 | allChunks.push({
|
440 | start: start,
|
441 | end: end,
|
442 | highlight: highlight
|
443 | });
|
444 | }
|
445 | };
|
446 |
|
447 | if (chunksToHighlight.length === 0) {
|
448 | append(0, totalLength, false);
|
449 | } else {
|
450 | var lastIndex = 0;
|
451 | chunksToHighlight.forEach(function (chunk) {
|
452 | append(lastIndex, chunk.start, false);
|
453 | append(chunk.start, chunk.end, true);
|
454 | lastIndex = chunk.end;
|
455 | });
|
456 | append(lastIndex, totalLength, false);
|
457 | }
|
458 | return allChunks;
|
459 | };
|
460 |
|
461 | function identity(value) {
|
462 | return value;
|
463 | }
|
464 |
|
465 | function escapeRegExpFn(str) {
|
466 | return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
467 | }
|
468 |
|
469 | })
|
470 | ]);
|
471 |
|
472 |
|
473 | }),
|
474 |
|
475 | (function(module, exports, __webpack_require__) {
|
476 |
|
477 | (function(process) { |
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 | if (process.env.NODE_ENV !== 'production') {
|
485 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
486 | Symbol.for &&
|
487 | Symbol.for('react.element')) ||
|
488 | 0xeac7;
|
489 |
|
490 | var isValidElement = function(object) {
|
491 | return typeof object === 'object' &&
|
492 | object !== null &&
|
493 | object.$$typeof === REACT_ELEMENT_TYPE;
|
494 | };
|
495 |
|
496 |
|
497 |
|
498 | var throwOnDirectAccess = true;
|
499 | module.exports = __webpack_require__(6)(isValidElement, throwOnDirectAccess);
|
500 | } else {
|
501 |
|
502 |
|
503 | module.exports = __webpack_require__(13)();
|
504 | }
|
505 |
|
506 | }.call(exports, __webpack_require__(5)))
|
507 |
|
508 | }),
|
509 |
|
510 | (function(module, exports) {
|
511 |
|
512 |
|
513 | var process = module.exports = {};
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 | var cachedSetTimeout;
|
521 | var cachedClearTimeout;
|
522 |
|
523 | function defaultSetTimout() {
|
524 | throw new Error('setTimeout has not been defined');
|
525 | }
|
526 | function defaultClearTimeout () {
|
527 | throw new Error('clearTimeout has not been defined');
|
528 | }
|
529 | (function () {
|
530 | try {
|
531 | if (typeof setTimeout === 'function') {
|
532 | cachedSetTimeout = setTimeout;
|
533 | } else {
|
534 | cachedSetTimeout = defaultSetTimout;
|
535 | }
|
536 | } catch (e) {
|
537 | cachedSetTimeout = defaultSetTimout;
|
538 | }
|
539 | try {
|
540 | if (typeof clearTimeout === 'function') {
|
541 | cachedClearTimeout = clearTimeout;
|
542 | } else {
|
543 | cachedClearTimeout = defaultClearTimeout;
|
544 | }
|
545 | } catch (e) {
|
546 | cachedClearTimeout = defaultClearTimeout;
|
547 | }
|
548 | } ())
|
549 | function runTimeout(fun) {
|
550 | if (cachedSetTimeout === setTimeout) {
|
551 |
|
552 | return setTimeout(fun, 0);
|
553 | }
|
554 |
|
555 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
556 | cachedSetTimeout = setTimeout;
|
557 | return setTimeout(fun, 0);
|
558 | }
|
559 | try {
|
560 |
|
561 | return cachedSetTimeout(fun, 0);
|
562 | } catch(e){
|
563 | try {
|
564 |
|
565 | return cachedSetTimeout.call(null, fun, 0);
|
566 | } catch(e){
|
567 |
|
568 | return cachedSetTimeout.call(this, fun, 0);
|
569 | }
|
570 | }
|
571 |
|
572 |
|
573 | }
|
574 | function runClearTimeout(marker) {
|
575 | if (cachedClearTimeout === clearTimeout) {
|
576 |
|
577 | return clearTimeout(marker);
|
578 | }
|
579 |
|
580 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
581 | cachedClearTimeout = clearTimeout;
|
582 | return clearTimeout(marker);
|
583 | }
|
584 | try {
|
585 |
|
586 | return cachedClearTimeout(marker);
|
587 | } catch (e){
|
588 | try {
|
589 |
|
590 | return cachedClearTimeout.call(null, marker);
|
591 | } catch (e){
|
592 |
|
593 |
|
594 | return cachedClearTimeout.call(this, marker);
|
595 | }
|
596 | }
|
597 |
|
598 |
|
599 |
|
600 | }
|
601 | var queue = [];
|
602 | var draining = false;
|
603 | var currentQueue;
|
604 | var queueIndex = -1;
|
605 |
|
606 | function cleanUpNextTick() {
|
607 | if (!draining || !currentQueue) {
|
608 | return;
|
609 | }
|
610 | draining = false;
|
611 | if (currentQueue.length) {
|
612 | queue = currentQueue.concat(queue);
|
613 | } else {
|
614 | queueIndex = -1;
|
615 | }
|
616 | if (queue.length) {
|
617 | drainQueue();
|
618 | }
|
619 | }
|
620 |
|
621 | function drainQueue() {
|
622 | if (draining) {
|
623 | return;
|
624 | }
|
625 | var timeout = runTimeout(cleanUpNextTick);
|
626 | draining = true;
|
627 |
|
628 | var len = queue.length;
|
629 | while(len) {
|
630 | currentQueue = queue;
|
631 | queue = [];
|
632 | while (++queueIndex < len) {
|
633 | if (currentQueue) {
|
634 | currentQueue[queueIndex].run();
|
635 | }
|
636 | }
|
637 | queueIndex = -1;
|
638 | len = queue.length;
|
639 | }
|
640 | currentQueue = null;
|
641 | draining = false;
|
642 | runClearTimeout(timeout);
|
643 | }
|
644 |
|
645 | process.nextTick = function (fun) {
|
646 | var args = new Array(arguments.length - 1);
|
647 | if (arguments.length > 1) {
|
648 | for (var i = 1; i < arguments.length; i++) {
|
649 | args[i - 1] = arguments[i];
|
650 | }
|
651 | }
|
652 | queue.push(new Item(fun, args));
|
653 | if (queue.length === 1 && !draining) {
|
654 | runTimeout(drainQueue);
|
655 | }
|
656 | };
|
657 |
|
658 |
|
659 | function Item(fun, array) {
|
660 | this.fun = fun;
|
661 | this.array = array;
|
662 | }
|
663 | Item.prototype.run = function () {
|
664 | this.fun.apply(null, this.array);
|
665 | };
|
666 | process.title = 'browser';
|
667 | process.browser = true;
|
668 | process.env = {};
|
669 | process.argv = [];
|
670 | process.version = '';
|
671 | process.versions = {};
|
672 |
|
673 | function noop() {}
|
674 |
|
675 | process.on = noop;
|
676 | process.addListener = noop;
|
677 | process.once = noop;
|
678 | process.off = noop;
|
679 | process.removeListener = noop;
|
680 | process.removeAllListeners = noop;
|
681 | process.emit = noop;
|
682 | process.prependListener = noop;
|
683 | process.prependOnceListener = noop;
|
684 |
|
685 | process.listeners = function (name) { return [] }
|
686 |
|
687 | process.binding = function (name) {
|
688 | throw new Error('process.binding is not supported');
|
689 | };
|
690 |
|
691 | process.cwd = function () { return '/' };
|
692 | process.chdir = function (dir) {
|
693 | throw new Error('process.chdir is not supported');
|
694 | };
|
695 | process.umask = function() { return 0; };
|
696 |
|
697 |
|
698 | }),
|
699 |
|
700 | (function(module, exports, __webpack_require__) {
|
701 |
|
702 | (function(process) { |
703 |
|
704 |
|
705 |
|
706 |
|
707 |
|
708 |
|
709 | 'use strict';
|
710 |
|
711 | var emptyFunction = __webpack_require__(7);
|
712 | var invariant = __webpack_require__(8);
|
713 | var warning = __webpack_require__(9);
|
714 | var assign = __webpack_require__(10);
|
715 |
|
716 | var ReactPropTypesSecret = __webpack_require__(11);
|
717 | var checkPropTypes = __webpack_require__(12);
|
718 |
|
719 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
720 |
|
721 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
722 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
723 |
|
724 | |
725 |
|
726 |
|
727 |
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 |
|
734 |
|
735 |
|
736 |
|
737 |
|
738 | function getIteratorFn(maybeIterable) {
|
739 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
740 | if (typeof iteratorFn === 'function') {
|
741 | return iteratorFn;
|
742 | }
|
743 | }
|
744 |
|
745 | |
746 |
|
747 |
|
748 |
|
749 |
|
750 |
|
751 |
|
752 |
|
753 |
|
754 |
|
755 |
|
756 |
|
757 |
|
758 |
|
759 |
|
760 |
|
761 |
|
762 |
|
763 |
|
764 |
|
765 |
|
766 |
|
767 |
|
768 |
|
769 |
|
770 |
|
771 |
|
772 |
|
773 |
|
774 |
|
775 |
|
776 |
|
777 |
|
778 |
|
779 |
|
780 |
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 |
|
789 |
|
790 |
|
791 |
|
792 | var ANONYMOUS = '<<anonymous>>';
|
793 |
|
794 |
|
795 |
|
796 | var ReactPropTypes = {
|
797 | array: createPrimitiveTypeChecker('array'),
|
798 | bool: createPrimitiveTypeChecker('boolean'),
|
799 | func: createPrimitiveTypeChecker('function'),
|
800 | number: createPrimitiveTypeChecker('number'),
|
801 | object: createPrimitiveTypeChecker('object'),
|
802 | string: createPrimitiveTypeChecker('string'),
|
803 | symbol: createPrimitiveTypeChecker('symbol'),
|
804 |
|
805 | any: createAnyTypeChecker(),
|
806 | arrayOf: createArrayOfTypeChecker,
|
807 | element: createElementTypeChecker(),
|
808 | instanceOf: createInstanceTypeChecker,
|
809 | node: createNodeChecker(),
|
810 | objectOf: createObjectOfTypeChecker,
|
811 | oneOf: createEnumTypeChecker,
|
812 | oneOfType: createUnionTypeChecker,
|
813 | shape: createShapeTypeChecker,
|
814 | exact: createStrictShapeTypeChecker,
|
815 | };
|
816 |
|
817 | |
818 |
|
819 |
|
820 |
|
821 |
|
822 | function is(x, y) {
|
823 |
|
824 | if (x === y) {
|
825 |
|
826 |
|
827 | return x !== 0 || 1 / x === 1 / y;
|
828 | } else {
|
829 |
|
830 | return x !== x && y !== y;
|
831 | }
|
832 | }
|
833 |
|
834 |
|
835 | |
836 |
|
837 |
|
838 |
|
839 |
|
840 |
|
841 |
|
842 | function PropTypeError(message) {
|
843 | this.message = message;
|
844 | this.stack = '';
|
845 | }
|
846 |
|
847 | PropTypeError.prototype = Error.prototype;
|
848 |
|
849 | function createChainableTypeChecker(validate) {
|
850 | if (process.env.NODE_ENV !== 'production') {
|
851 | var manualPropTypeCallCache = {};
|
852 | var manualPropTypeWarningCount = 0;
|
853 | }
|
854 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
855 | componentName = componentName || ANONYMOUS;
|
856 | propFullName = propFullName || propName;
|
857 |
|
858 | if (secret !== ReactPropTypesSecret) {
|
859 | if (throwOnDirectAccess) {
|
860 |
|
861 | invariant(
|
862 | false,
|
863 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
864 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
865 | 'Read more at http://fb.me/use-check-prop-types'
|
866 | );
|
867 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
868 |
|
869 | var cacheKey = componentName + ':' + propName;
|
870 | if (
|
871 | !manualPropTypeCallCache[cacheKey] &&
|
872 |
|
873 | manualPropTypeWarningCount < 3
|
874 | ) {
|
875 | warning(
|
876 | false,
|
877 | 'You are manually calling a React.PropTypes validation ' +
|
878 | 'function for the `%s` prop on `%s`. This is deprecated ' +
|
879 | 'and will throw in the standalone `prop-types` package. ' +
|
880 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
881 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
882 | propFullName,
|
883 | componentName
|
884 | );
|
885 | manualPropTypeCallCache[cacheKey] = true;
|
886 | manualPropTypeWarningCount++;
|
887 | }
|
888 | }
|
889 | }
|
890 | if (props[propName] == null) {
|
891 | if (isRequired) {
|
892 | if (props[propName] === null) {
|
893 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
894 | }
|
895 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
896 | }
|
897 | return null;
|
898 | } else {
|
899 | return validate(props, propName, componentName, location, propFullName);
|
900 | }
|
901 | }
|
902 |
|
903 | var chainedCheckType = checkType.bind(null, false);
|
904 | chainedCheckType.isRequired = checkType.bind(null, true);
|
905 |
|
906 | return chainedCheckType;
|
907 | }
|
908 |
|
909 | function createPrimitiveTypeChecker(expectedType) {
|
910 | function validate(props, propName, componentName, location, propFullName, secret) {
|
911 | var propValue = props[propName];
|
912 | var propType = getPropType(propValue);
|
913 | if (propType !== expectedType) {
|
914 |
|
915 |
|
916 |
|
917 | var preciseType = getPreciseType(propValue);
|
918 |
|
919 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
920 | }
|
921 | return null;
|
922 | }
|
923 | return createChainableTypeChecker(validate);
|
924 | }
|
925 |
|
926 | function createAnyTypeChecker() {
|
927 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
928 | }
|
929 |
|
930 | function createArrayOfTypeChecker(typeChecker) {
|
931 | function validate(props, propName, componentName, location, propFullName) {
|
932 | if (typeof typeChecker !== 'function') {
|
933 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
934 | }
|
935 | var propValue = props[propName];
|
936 | if (!Array.isArray(propValue)) {
|
937 | var propType = getPropType(propValue);
|
938 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
939 | }
|
940 | for (var i = 0; i < propValue.length; i++) {
|
941 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
942 | if (error instanceof Error) {
|
943 | return error;
|
944 | }
|
945 | }
|
946 | return null;
|
947 | }
|
948 | return createChainableTypeChecker(validate);
|
949 | }
|
950 |
|
951 | function createElementTypeChecker() {
|
952 | function validate(props, propName, componentName, location, propFullName) {
|
953 | var propValue = props[propName];
|
954 | if (!isValidElement(propValue)) {
|
955 | var propType = getPropType(propValue);
|
956 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
957 | }
|
958 | return null;
|
959 | }
|
960 | return createChainableTypeChecker(validate);
|
961 | }
|
962 |
|
963 | function createInstanceTypeChecker(expectedClass) {
|
964 | function validate(props, propName, componentName, location, propFullName) {
|
965 | if (!(props[propName] instanceof expectedClass)) {
|
966 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
967 | var actualClassName = getClassName(props[propName]);
|
968 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
969 | }
|
970 | return null;
|
971 | }
|
972 | return createChainableTypeChecker(validate);
|
973 | }
|
974 |
|
975 | function createEnumTypeChecker(expectedValues) {
|
976 | if (!Array.isArray(expectedValues)) {
|
977 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
978 | return emptyFunction.thatReturnsNull;
|
979 | }
|
980 |
|
981 | function validate(props, propName, componentName, location, propFullName) {
|
982 | var propValue = props[propName];
|
983 | for (var i = 0; i < expectedValues.length; i++) {
|
984 | if (is(propValue, expectedValues[i])) {
|
985 | return null;
|
986 | }
|
987 | }
|
988 |
|
989 | var valuesString = JSON.stringify(expectedValues);
|
990 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
991 | }
|
992 | return createChainableTypeChecker(validate);
|
993 | }
|
994 |
|
995 | function createObjectOfTypeChecker(typeChecker) {
|
996 | function validate(props, propName, componentName, location, propFullName) {
|
997 | if (typeof typeChecker !== 'function') {
|
998 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
999 | }
|
1000 | var propValue = props[propName];
|
1001 | var propType = getPropType(propValue);
|
1002 | if (propType !== 'object') {
|
1003 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
1004 | }
|
1005 | for (var key in propValue) {
|
1006 | if (propValue.hasOwnProperty(key)) {
|
1007 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1008 | if (error instanceof Error) {
|
1009 | return error;
|
1010 | }
|
1011 | }
|
1012 | }
|
1013 | return null;
|
1014 | }
|
1015 | return createChainableTypeChecker(validate);
|
1016 | }
|
1017 |
|
1018 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
1019 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
1020 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
1021 | return emptyFunction.thatReturnsNull;
|
1022 | }
|
1023 |
|
1024 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
1025 | var checker = arrayOfTypeCheckers[i];
|
1026 | if (typeof checker !== 'function') {
|
1027 | warning(
|
1028 | false,
|
1029 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
1030 | 'received %s at index %s.',
|
1031 | getPostfixForTypeWarning(checker),
|
1032 | i
|
1033 | );
|
1034 | return emptyFunction.thatReturnsNull;
|
1035 | }
|
1036 | }
|
1037 |
|
1038 | function validate(props, propName, componentName, location, propFullName) {
|
1039 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
1040 | var checker = arrayOfTypeCheckers[i];
|
1041 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
1042 | return null;
|
1043 | }
|
1044 | }
|
1045 |
|
1046 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
1047 | }
|
1048 | return createChainableTypeChecker(validate);
|
1049 | }
|
1050 |
|
1051 | function createNodeChecker() {
|
1052 | function validate(props, propName, componentName, location, propFullName) {
|
1053 | if (!isNode(props[propName])) {
|
1054 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
1055 | }
|
1056 | return null;
|
1057 | }
|
1058 | return createChainableTypeChecker(validate);
|
1059 | }
|
1060 |
|
1061 | function createShapeTypeChecker(shapeTypes) {
|
1062 | function validate(props, propName, componentName, location, propFullName) {
|
1063 | var propValue = props[propName];
|
1064 | var propType = getPropType(propValue);
|
1065 | if (propType !== 'object') {
|
1066 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1067 | }
|
1068 | for (var key in shapeTypes) {
|
1069 | var checker = shapeTypes[key];
|
1070 | if (!checker) {
|
1071 | continue;
|
1072 | }
|
1073 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1074 | if (error) {
|
1075 | return error;
|
1076 | }
|
1077 | }
|
1078 | return null;
|
1079 | }
|
1080 | return createChainableTypeChecker(validate);
|
1081 | }
|
1082 |
|
1083 | function createStrictShapeTypeChecker(shapeTypes) {
|
1084 | function validate(props, propName, componentName, location, propFullName) {
|
1085 | var propValue = props[propName];
|
1086 | var propType = getPropType(propValue);
|
1087 | if (propType !== 'object') {
|
1088 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1089 | }
|
1090 |
|
1091 |
|
1092 | var allKeys = assign({}, props[propName], shapeTypes);
|
1093 | for (var key in allKeys) {
|
1094 | var checker = shapeTypes[key];
|
1095 | if (!checker) {
|
1096 | return new PropTypeError(
|
1097 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
1098 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
1099 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
1100 | );
|
1101 | }
|
1102 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1103 | if (error) {
|
1104 | return error;
|
1105 | }
|
1106 | }
|
1107 | return null;
|
1108 | }
|
1109 |
|
1110 | return createChainableTypeChecker(validate);
|
1111 | }
|
1112 |
|
1113 | function isNode(propValue) {
|
1114 | switch (typeof propValue) {
|
1115 | case 'number':
|
1116 | case 'string':
|
1117 | case 'undefined':
|
1118 | return true;
|
1119 | case 'boolean':
|
1120 | return !propValue;
|
1121 | case 'object':
|
1122 | if (Array.isArray(propValue)) {
|
1123 | return propValue.every(isNode);
|
1124 | }
|
1125 | if (propValue === null || isValidElement(propValue)) {
|
1126 | return true;
|
1127 | }
|
1128 |
|
1129 | var iteratorFn = getIteratorFn(propValue);
|
1130 | if (iteratorFn) {
|
1131 | var iterator = iteratorFn.call(propValue);
|
1132 | var step;
|
1133 | if (iteratorFn !== propValue.entries) {
|
1134 | while (!(step = iterator.next()).done) {
|
1135 | if (!isNode(step.value)) {
|
1136 | return false;
|
1137 | }
|
1138 | }
|
1139 | } else {
|
1140 |
|
1141 | while (!(step = iterator.next()).done) {
|
1142 | var entry = step.value;
|
1143 | if (entry) {
|
1144 | if (!isNode(entry[1])) {
|
1145 | return false;
|
1146 | }
|
1147 | }
|
1148 | }
|
1149 | }
|
1150 | } else {
|
1151 | return false;
|
1152 | }
|
1153 |
|
1154 | return true;
|
1155 | default:
|
1156 | return false;
|
1157 | }
|
1158 | }
|
1159 |
|
1160 | function isSymbol(propType, propValue) {
|
1161 |
|
1162 | if (propType === 'symbol') {
|
1163 | return true;
|
1164 | }
|
1165 |
|
1166 |
|
1167 | if (propValue['@@toStringTag'] === 'Symbol') {
|
1168 | return true;
|
1169 | }
|
1170 |
|
1171 |
|
1172 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
1173 | return true;
|
1174 | }
|
1175 |
|
1176 | return false;
|
1177 | }
|
1178 |
|
1179 |
|
1180 | function getPropType(propValue) {
|
1181 | var propType = typeof propValue;
|
1182 | if (Array.isArray(propValue)) {
|
1183 | return 'array';
|
1184 | }
|
1185 | if (propValue instanceof RegExp) {
|
1186 |
|
1187 |
|
1188 |
|
1189 | return 'object';
|
1190 | }
|
1191 | if (isSymbol(propType, propValue)) {
|
1192 | return 'symbol';
|
1193 | }
|
1194 | return propType;
|
1195 | }
|
1196 |
|
1197 |
|
1198 |
|
1199 | function getPreciseType(propValue) {
|
1200 | if (typeof propValue === 'undefined' || propValue === null) {
|
1201 | return '' + propValue;
|
1202 | }
|
1203 | var propType = getPropType(propValue);
|
1204 | if (propType === 'object') {
|
1205 | if (propValue instanceof Date) {
|
1206 | return 'date';
|
1207 | } else if (propValue instanceof RegExp) {
|
1208 | return 'regexp';
|
1209 | }
|
1210 | }
|
1211 | return propType;
|
1212 | }
|
1213 |
|
1214 |
|
1215 |
|
1216 | function getPostfixForTypeWarning(value) {
|
1217 | var type = getPreciseType(value);
|
1218 | switch (type) {
|
1219 | case 'array':
|
1220 | case 'object':
|
1221 | return 'an ' + type;
|
1222 | case 'boolean':
|
1223 | case 'date':
|
1224 | case 'regexp':
|
1225 | return 'a ' + type;
|
1226 | default:
|
1227 | return type;
|
1228 | }
|
1229 | }
|
1230 |
|
1231 |
|
1232 | function getClassName(propValue) {
|
1233 | if (!propValue.constructor || !propValue.constructor.name) {
|
1234 | return ANONYMOUS;
|
1235 | }
|
1236 | return propValue.constructor.name;
|
1237 | }
|
1238 |
|
1239 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
1240 | ReactPropTypes.PropTypes = ReactPropTypes;
|
1241 |
|
1242 | return ReactPropTypes;
|
1243 | };
|
1244 |
|
1245 | }.call(exports, __webpack_require__(5)))
|
1246 |
|
1247 | }),
|
1248 |
|
1249 | (function(module, exports) {
|
1250 |
|
1251 | "use strict";
|
1252 |
|
1253 | |
1254 |
|
1255 |
|
1256 |
|
1257 |
|
1258 |
|
1259 |
|
1260 |
|
1261 |
|
1262 | function makeEmptyFunction(arg) {
|
1263 | return function () {
|
1264 | return arg;
|
1265 | };
|
1266 | }
|
1267 |
|
1268 | |
1269 |
|
1270 |
|
1271 |
|
1272 |
|
1273 | var emptyFunction = function emptyFunction() {};
|
1274 |
|
1275 | emptyFunction.thatReturns = makeEmptyFunction;
|
1276 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
1277 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
1278 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
1279 | emptyFunction.thatReturnsThis = function () {
|
1280 | return this;
|
1281 | };
|
1282 | emptyFunction.thatReturnsArgument = function (arg) {
|
1283 | return arg;
|
1284 | };
|
1285 |
|
1286 | module.exports = emptyFunction;
|
1287 |
|
1288 | }),
|
1289 |
|
1290 | (function(module, exports, __webpack_require__) {
|
1291 |
|
1292 | (function(process) { |
1293 |
|
1294 |
|
1295 |
|
1296 |
|
1297 |
|
1298 |
|
1299 |
|
1300 | 'use strict';
|
1301 |
|
1302 | |
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 |
|
1310 |
|
1311 |
|
1312 |
|
1313 | var validateFormat = function validateFormat(format) {};
|
1314 |
|
1315 | if (process.env.NODE_ENV !== 'production') {
|
1316 | validateFormat = function validateFormat(format) {
|
1317 | if (format === undefined) {
|
1318 | throw new Error('invariant requires an error message argument');
|
1319 | }
|
1320 | };
|
1321 | }
|
1322 |
|
1323 | function invariant(condition, format, a, b, c, d, e, f) {
|
1324 | validateFormat(format);
|
1325 |
|
1326 | if (!condition) {
|
1327 | var error;
|
1328 | if (format === undefined) {
|
1329 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
1330 | } else {
|
1331 | var args = [a, b, c, d, e, f];
|
1332 | var argIndex = 0;
|
1333 | error = new Error(format.replace(/%s/g, function () {
|
1334 | return args[argIndex++];
|
1335 | }));
|
1336 | error.name = 'Invariant Violation';
|
1337 | }
|
1338 |
|
1339 | error.framesToPop = 1;
|
1340 | throw error;
|
1341 | }
|
1342 | }
|
1343 |
|
1344 | module.exports = invariant;
|
1345 | }.call(exports, __webpack_require__(5)))
|
1346 |
|
1347 | }),
|
1348 |
|
1349 | (function(module, exports, __webpack_require__) {
|
1350 |
|
1351 | (function(process) { |
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 |
|
1359 | 'use strict';
|
1360 |
|
1361 | var emptyFunction = __webpack_require__(7);
|
1362 |
|
1363 | |
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 |
|
1369 |
|
1370 | var warning = emptyFunction;
|
1371 |
|
1372 | if (process.env.NODE_ENV !== 'production') {
|
1373 | var printWarning = function printWarning(format) {
|
1374 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
1375 | args[_key - 1] = arguments[_key];
|
1376 | }
|
1377 |
|
1378 | var argIndex = 0;
|
1379 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
1380 | return args[argIndex++];
|
1381 | });
|
1382 | if (typeof console !== 'undefined') {
|
1383 | console.error(message);
|
1384 | }
|
1385 | try {
|
1386 |
|
1387 |
|
1388 |
|
1389 | throw new Error(message);
|
1390 | } catch (x) {}
|
1391 | };
|
1392 |
|
1393 | warning = function warning(condition, format) {
|
1394 | if (format === undefined) {
|
1395 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
1396 | }
|
1397 |
|
1398 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
1399 | return;
|
1400 | }
|
1401 |
|
1402 | if (!condition) {
|
1403 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
1404 | args[_key2 - 2] = arguments[_key2];
|
1405 | }
|
1406 |
|
1407 | printWarning.apply(undefined, [format].concat(args));
|
1408 | }
|
1409 | };
|
1410 | }
|
1411 |
|
1412 | module.exports = warning;
|
1413 | }.call(exports, __webpack_require__(5)))
|
1414 |
|
1415 | }),
|
1416 |
|
1417 | (function(module, exports) {
|
1418 |
|
1419 | |
1420 |
|
1421 |
|
1422 |
|
1423 |
|
1424 |
|
1425 | 'use strict';
|
1426 |
|
1427 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
1428 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
1429 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
1430 |
|
1431 | function toObject(val) {
|
1432 | if (val === null || val === undefined) {
|
1433 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
1434 | }
|
1435 |
|
1436 | return Object(val);
|
1437 | }
|
1438 |
|
1439 | function shouldUseNative() {
|
1440 | try {
|
1441 | if (!Object.assign) {
|
1442 | return false;
|
1443 | }
|
1444 |
|
1445 |
|
1446 |
|
1447 |
|
1448 | var test1 = new String('abc');
|
1449 | test1[5] = 'de';
|
1450 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
1451 | return false;
|
1452 | }
|
1453 |
|
1454 |
|
1455 | var test2 = {};
|
1456 | for (var i = 0; i < 10; i++) {
|
1457 | test2['_' + String.fromCharCode(i)] = i;
|
1458 | }
|
1459 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
1460 | return test2[n];
|
1461 | });
|
1462 | if (order2.join('') !== '0123456789') {
|
1463 | return false;
|
1464 | }
|
1465 |
|
1466 |
|
1467 | var test3 = {};
|
1468 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
1469 | test3[letter] = letter;
|
1470 | });
|
1471 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
1472 | 'abcdefghijklmnopqrst') {
|
1473 | return false;
|
1474 | }
|
1475 |
|
1476 | return true;
|
1477 | } catch (err) {
|
1478 |
|
1479 | return false;
|
1480 | }
|
1481 | }
|
1482 |
|
1483 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
1484 | var from;
|
1485 | var to = toObject(target);
|
1486 | var symbols;
|
1487 |
|
1488 | for (var s = 1; s < arguments.length; s++) {
|
1489 | from = Object(arguments[s]);
|
1490 |
|
1491 | for (var key in from) {
|
1492 | if (hasOwnProperty.call(from, key)) {
|
1493 | to[key] = from[key];
|
1494 | }
|
1495 | }
|
1496 |
|
1497 | if (getOwnPropertySymbols) {
|
1498 | symbols = getOwnPropertySymbols(from);
|
1499 | for (var i = 0; i < symbols.length; i++) {
|
1500 | if (propIsEnumerable.call(from, symbols[i])) {
|
1501 | to[symbols[i]] = from[symbols[i]];
|
1502 | }
|
1503 | }
|
1504 | }
|
1505 | }
|
1506 |
|
1507 | return to;
|
1508 | };
|
1509 |
|
1510 |
|
1511 | }),
|
1512 |
|
1513 | (function(module, exports) {
|
1514 |
|
1515 | |
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 | 'use strict';
|
1523 |
|
1524 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
1525 |
|
1526 | module.exports = ReactPropTypesSecret;
|
1527 |
|
1528 |
|
1529 | }),
|
1530 |
|
1531 | (function(module, exports, __webpack_require__) {
|
1532 |
|
1533 | (function(process) { |
1534 |
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 |
|
1540 | 'use strict';
|
1541 |
|
1542 | if (process.env.NODE_ENV !== 'production') {
|
1543 | var invariant = __webpack_require__(8);
|
1544 | var warning = __webpack_require__(9);
|
1545 | var ReactPropTypesSecret = __webpack_require__(11);
|
1546 | var loggedTypeFailures = {};
|
1547 | }
|
1548 |
|
1549 | |
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 |
|
1557 |
|
1558 |
|
1559 |
|
1560 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
1561 | if (process.env.NODE_ENV !== 'production') {
|
1562 | for (var typeSpecName in typeSpecs) {
|
1563 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
1564 | var error;
|
1565 |
|
1566 |
|
1567 |
|
1568 | try {
|
1569 |
|
1570 |
|
1571 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
|
1572 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
1573 | } catch (ex) {
|
1574 | error = ex;
|
1575 | }
|
1576 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
|
1577 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
1578 |
|
1579 |
|
1580 | loggedTypeFailures[error.message] = true;
|
1581 |
|
1582 | var stack = getStack ? getStack() : '';
|
1583 |
|
1584 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
1585 | }
|
1586 | }
|
1587 | }
|
1588 | }
|
1589 | }
|
1590 |
|
1591 | module.exports = checkPropTypes;
|
1592 |
|
1593 | }.call(exports, __webpack_require__(5)))
|
1594 |
|
1595 | }),
|
1596 |
|
1597 | (function(module, exports, __webpack_require__) {
|
1598 |
|
1599 | |
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 | 'use strict';
|
1607 |
|
1608 | var emptyFunction = __webpack_require__(7);
|
1609 | var invariant = __webpack_require__(8);
|
1610 | var ReactPropTypesSecret = __webpack_require__(11);
|
1611 |
|
1612 | module.exports = function() {
|
1613 | function shim(props, propName, componentName, location, propFullName, secret) {
|
1614 | if (secret === ReactPropTypesSecret) {
|
1615 |
|
1616 | return;
|
1617 | }
|
1618 | invariant(
|
1619 | false,
|
1620 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
1621 | 'Use PropTypes.checkPropTypes() to call them. ' +
|
1622 | 'Read more at http://fb.me/use-check-prop-types'
|
1623 | );
|
1624 | };
|
1625 | shim.isRequired = shim;
|
1626 | function getShim() {
|
1627 | return shim;
|
1628 | };
|
1629 |
|
1630 |
|
1631 | var ReactPropTypes = {
|
1632 | array: shim,
|
1633 | bool: shim,
|
1634 | func: shim,
|
1635 | number: shim,
|
1636 | object: shim,
|
1637 | string: shim,
|
1638 | symbol: shim,
|
1639 |
|
1640 | any: shim,
|
1641 | arrayOf: getShim,
|
1642 | element: shim,
|
1643 | instanceOf: getShim,
|
1644 | node: shim,
|
1645 | objectOf: getShim,
|
1646 | oneOf: getShim,
|
1647 | oneOfType: getShim,
|
1648 | shape: getShim,
|
1649 | exact: getShim
|
1650 | };
|
1651 |
|
1652 | ReactPropTypes.checkPropTypes = emptyFunction;
|
1653 | ReactPropTypes.PropTypes = ReactPropTypes;
|
1654 |
|
1655 | return ReactPropTypes;
|
1656 | };
|
1657 |
|
1658 |
|
1659 | }),
|
1660 |
|
1661 | (function(module, exports) {
|
1662 |
|
1663 | module.exports = require("react");
|
1664 |
|
1665 | }),
|
1666 |
|
1667 | (function(module, exports) {
|
1668 |
|
1669 | 'use strict';
|
1670 |
|
1671 | var simpleIsEqual = function simpleIsEqual(a, b) {
|
1672 | return a === b;
|
1673 | };
|
1674 |
|
1675 | function index (resultFn) {
|
1676 | var isEqual = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : simpleIsEqual;
|
1677 |
|
1678 | var lastThis = void 0;
|
1679 | var lastArgs = [];
|
1680 | var lastResult = void 0;
|
1681 | var calledOnce = false;
|
1682 |
|
1683 | var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
|
1684 | return isEqual(newArg, lastArgs[index]);
|
1685 | };
|
1686 |
|
1687 | var result = function result() {
|
1688 | for (var _len = arguments.length, newArgs = Array(_len), _key = 0; _key < _len; _key++) {
|
1689 | newArgs[_key] = arguments[_key];
|
1690 | }
|
1691 |
|
1692 | if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
|
1693 | return lastResult;
|
1694 | }
|
1695 |
|
1696 | calledOnce = true;
|
1697 | lastThis = this;
|
1698 | lastArgs = newArgs;
|
1699 | lastResult = resultFn.apply(this, newArgs);
|
1700 | return lastResult;
|
1701 | };
|
1702 |
|
1703 | return result;
|
1704 | }
|
1705 |
|
1706 | module.exports = index;
|
1707 |
|
1708 |
|
1709 | })
|
1710 | ]);
|
1711 |
|
\ | No newline at end of file |