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