1 | exports["server"] =
|
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 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = 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__.i = function(value) { return value; };
|
39 |
|
40 |
|
41 | __webpack_require__.d = function(exports, name, getter) {
|
42 | if(!__webpack_require__.o(exports, name)) {
|
43 | Object.defineProperty(exports, name, {
|
44 | configurable: false,
|
45 | enumerable: true,
|
46 | get: getter
|
47 | /******/ });
|
48 | /******/ }
|
49 | /******/ };
|
50 | /******/
|
51 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
52 | /******/ __webpack_require__.n = function(module) {
|
53 | var getter = module && module.__esModule ?
|
54 | function getDefault() { return module['default']; } :
|
55 | function getModuleExports() { return module; };
|
56 | __webpack_require__.d(getter, 'a', getter);
|
57 | return getter;
|
58 | };
|
59 |
|
60 |
|
61 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
62 |
|
63 |
|
64 | __webpack_require__.p = "";
|
65 |
|
66 |
|
67 | return __webpack_require__(__webpack_require__.s = 84);
|
68 | })
|
69 |
|
70 | ([
|
71 |
|
72 | (function(module, exports, __webpack_require__) {
|
73 |
|
74 | "use strict";
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 | var validateFormat = function validateFormat(format) {};
|
97 |
|
98 | if (process.env.NODE_ENV !== 'production') {
|
99 | validateFormat = function validateFormat(format) {
|
100 | if (format === undefined) {
|
101 | throw new Error('invariant requires an error message argument');
|
102 | }
|
103 | };
|
104 | }
|
105 |
|
106 | function invariant(condition, format, a, b, c, d, e, f) {
|
107 | validateFormat(format);
|
108 |
|
109 | if (!condition) {
|
110 | var error;
|
111 | if (format === undefined) {
|
112 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
113 | } else {
|
114 | var args = [a, b, c, d, e, f];
|
115 | var argIndex = 0;
|
116 | error = new Error(format.replace(/%s/g, function () {
|
117 | return args[argIndex++];
|
118 | }));
|
119 | error.name = 'Invariant Violation';
|
120 | }
|
121 |
|
122 | error.framesToPop = 1;
|
123 | throw error;
|
124 | }
|
125 | }
|
126 |
|
127 | module.exports = invariant;
|
128 |
|
129 | }),
|
130 |
|
131 | (function(module, exports, __webpack_require__) {
|
132 |
|
133 | "use strict";
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 | var emptyFunction = __webpack_require__(7);
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 | var warning = emptyFunction;
|
154 |
|
155 | if (process.env.NODE_ENV !== 'production') {
|
156 | var printWarning = function printWarning(format) {
|
157 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
158 | args[_key - 1] = arguments[_key];
|
159 | }
|
160 |
|
161 | var argIndex = 0;
|
162 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
163 | return args[argIndex++];
|
164 | });
|
165 | if (typeof console !== 'undefined') {
|
166 | console.error(message);
|
167 | }
|
168 | try {
|
169 |
|
170 |
|
171 |
|
172 | throw new Error(message);
|
173 | } catch (x) {}
|
174 | };
|
175 |
|
176 | warning = function warning(condition, format) {
|
177 | if (format === undefined) {
|
178 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
179 | }
|
180 |
|
181 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
182 | return;
|
183 | }
|
184 |
|
185 | if (!condition) {
|
186 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
187 | args[_key2 - 2] = arguments[_key2];
|
188 | }
|
189 |
|
190 | printWarning.apply(undefined, [format].concat(args));
|
191 | }
|
192 | };
|
193 | }
|
194 |
|
195 | module.exports = warning;
|
196 |
|
197 | }),
|
198 |
|
199 | (function(module, exports, __webpack_require__) {
|
200 |
|
201 | "use strict";
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 | function reactProdInvariant(code) {
|
220 | var argCount = arguments.length - 1;
|
221 |
|
222 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
223 |
|
224 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
225 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
226 | }
|
227 |
|
228 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
229 |
|
230 | var error = new Error(message);
|
231 | error.name = 'Invariant Violation';
|
232 | error.framesToPop = 1;
|
233 |
|
234 | throw error;
|
235 | }
|
236 |
|
237 | module.exports = reactProdInvariant;
|
238 |
|
239 | }),
|
240 |
|
241 | (function(module, exports) {
|
242 |
|
243 | module.exports = require("object-assign");
|
244 |
|
245 | }),
|
246 |
|
247 | (function(module, exports, __webpack_require__) {
|
248 |
|
249 | "use strict";
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 | var _prodInvariant = __webpack_require__(2);
|
261 |
|
262 | var DOMProperty = __webpack_require__(16);
|
263 | var ReactDOMComponentFlags = __webpack_require__(56);
|
264 |
|
265 | var invariant = __webpack_require__(0);
|
266 |
|
267 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
268 | var Flags = ReactDOMComponentFlags;
|
269 |
|
270 | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
|
271 |
|
272 |
|
273 |
|
274 |
|
275 | function shouldPrecacheNode(node, nodeID) {
|
276 | return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
|
277 | }
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 | function getRenderedHostOrTextFromComponent(component) {
|
287 | var rendered;
|
288 | while (rendered = component._renderedComponent) {
|
289 | component = rendered;
|
290 | }
|
291 | return component;
|
292 | }
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | function precacheNode(inst, node) {
|
299 | var hostInst = getRenderedHostOrTextFromComponent(inst);
|
300 | hostInst._hostNode = node;
|
301 | node[internalInstanceKey] = hostInst;
|
302 | }
|
303 |
|
304 | function uncacheNode(inst) {
|
305 | var node = inst._hostNode;
|
306 | if (node) {
|
307 | delete node[internalInstanceKey];
|
308 | inst._hostNode = null;
|
309 | }
|
310 | }
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 |
|
319 |
|
320 |
|
321 |
|
322 |
|
323 |
|
324 |
|
325 |
|
326 | function precacheChildNodes(inst, node) {
|
327 | if (inst._flags & Flags.hasCachedChildNodes) {
|
328 | return;
|
329 | }
|
330 | var children = inst._renderedChildren;
|
331 | var childNode = node.firstChild;
|
332 | outer: for (var name in children) {
|
333 | if (!children.hasOwnProperty(name)) {
|
334 | continue;
|
335 | }
|
336 | var childInst = children[name];
|
337 | var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
338 | if (childID === 0) {
|
339 |
|
340 | continue;
|
341 | }
|
342 |
|
343 | for (; childNode !== null; childNode = childNode.nextSibling) {
|
344 | if (shouldPrecacheNode(childNode, childID)) {
|
345 | precacheNode(childInst, childNode);
|
346 | continue outer;
|
347 | }
|
348 | }
|
349 |
|
350 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
|
351 | }
|
352 | inst._flags |= Flags.hasCachedChildNodes;
|
353 | }
|
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 | function getClosestInstanceFromNode(node) {
|
360 | if (node[internalInstanceKey]) {
|
361 | return node[internalInstanceKey];
|
362 | }
|
363 |
|
364 |
|
365 | var parents = [];
|
366 | while (!node[internalInstanceKey]) {
|
367 | parents.push(node);
|
368 | if (node.parentNode) {
|
369 | node = node.parentNode;
|
370 | } else {
|
371 |
|
372 |
|
373 | return null;
|
374 | }
|
375 | }
|
376 |
|
377 | var closest;
|
378 | var inst;
|
379 | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
|
380 | closest = inst;
|
381 | if (parents.length) {
|
382 | precacheChildNodes(inst, node);
|
383 | }
|
384 | }
|
385 |
|
386 | return closest;
|
387 | }
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 | function getInstanceFromNode(node) {
|
394 | var inst = getClosestInstanceFromNode(node);
|
395 | if (inst != null && inst._hostNode === node) {
|
396 | return inst;
|
397 | } else {
|
398 | return null;
|
399 | }
|
400 | }
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 | function getNodeFromInstance(inst) {
|
407 |
|
408 |
|
409 | !(inst._hostNode !== undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
410 |
|
411 | if (inst._hostNode) {
|
412 | return inst._hostNode;
|
413 | }
|
414 |
|
415 |
|
416 | var parents = [];
|
417 | while (!inst._hostNode) {
|
418 | parents.push(inst);
|
419 | !inst._hostParent ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
|
420 | inst = inst._hostParent;
|
421 | }
|
422 |
|
423 |
|
424 |
|
425 | for (; parents.length; inst = parents.pop()) {
|
426 | precacheChildNodes(inst, inst._hostNode);
|
427 | }
|
428 |
|
429 | return inst._hostNode;
|
430 | }
|
431 |
|
432 | var ReactDOMComponentTree = {
|
433 | getClosestInstanceFromNode: getClosestInstanceFromNode,
|
434 | getInstanceFromNode: getInstanceFromNode,
|
435 | getNodeFromInstance: getNodeFromInstance,
|
436 | precacheChildNodes: precacheChildNodes,
|
437 | precacheNode: precacheNode,
|
438 | uncacheNode: uncacheNode
|
439 | };
|
440 |
|
441 | module.exports = ReactDOMComponentTree;
|
442 |
|
443 | }),
|
444 |
|
445 | (function(module, exports, __webpack_require__) {
|
446 |
|
447 | "use strict";
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 | var ExecutionEnvironment = {
|
467 |
|
468 | canUseDOM: canUseDOM,
|
469 |
|
470 | canUseWorkers: typeof Worker !== 'undefined',
|
471 |
|
472 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
473 |
|
474 | canUseViewport: canUseDOM && !!window.screen,
|
475 |
|
476 | isInWorker: !canUseDOM
|
477 |
|
478 | };
|
479 |
|
480 | module.exports = ExecutionEnvironment;
|
481 |
|
482 | }),
|
483 |
|
484 | (function(module, exports, __webpack_require__) {
|
485 |
|
486 | "use strict";
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 |
|
498 |
|
499 |
|
500 | var debugTool = null;
|
501 |
|
502 | if (process.env.NODE_ENV !== 'production') {
|
503 | var ReactDebugTool = __webpack_require__(145);
|
504 | debugTool = ReactDebugTool;
|
505 | }
|
506 |
|
507 | module.exports = { debugTool: debugTool };
|
508 |
|
509 | }),
|
510 |
|
511 | (function(module, exports, __webpack_require__) {
|
512 |
|
513 | "use strict";
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 |
|
524 |
|
525 | function makeEmptyFunction(arg) {
|
526 | return function () {
|
527 | return arg;
|
528 | };
|
529 | }
|
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 | var emptyFunction = function emptyFunction() {};
|
537 |
|
538 | emptyFunction.thatReturns = makeEmptyFunction;
|
539 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
540 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
541 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
542 | emptyFunction.thatReturnsThis = function () {
|
543 | return this;
|
544 | };
|
545 | emptyFunction.thatReturnsArgument = function (arg) {
|
546 | return arg;
|
547 | };
|
548 |
|
549 | module.exports = emptyFunction;
|
550 |
|
551 | }),
|
552 |
|
553 | (function(module, exports, __webpack_require__) {
|
554 |
|
555 | "use strict";
|
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 |
|
565 |
|
566 |
|
567 | var _prodInvariant = __webpack_require__(14);
|
568 |
|
569 | var ReactCurrentOwner = __webpack_require__(11);
|
570 |
|
571 | var invariant = __webpack_require__(0);
|
572 | var warning = __webpack_require__(1);
|
573 |
|
574 | function isNative(fn) {
|
575 |
|
576 | var funcToString = Function.prototype.toString;
|
577 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
578 | var reIsNative = RegExp('^' + funcToString
|
579 |
|
580 | .call(hasOwnProperty
|
581 |
|
582 | ).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&'
|
583 |
|
584 | ).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
585 | try {
|
586 | var source = funcToString.call(fn);
|
587 | return reIsNative.test(source);
|
588 | } catch (err) {
|
589 | return false;
|
590 | }
|
591 | }
|
592 |
|
593 | var canUseCollections =
|
594 |
|
595 | typeof Array.from === 'function' &&
|
596 |
|
597 | typeof Map === 'function' && isNative(Map) &&
|
598 |
|
599 | Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
|
600 |
|
601 | typeof Set === 'function' && isNative(Set) &&
|
602 |
|
603 | Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
|
604 |
|
605 | var setItem;
|
606 | var getItem;
|
607 | var removeItem;
|
608 | var getItemIDs;
|
609 | var addRoot;
|
610 | var removeRoot;
|
611 | var getRootIDs;
|
612 |
|
613 | if (canUseCollections) {
|
614 | var itemMap = new Map();
|
615 | var rootIDSet = new Set();
|
616 |
|
617 | setItem = function (id, item) {
|
618 | itemMap.set(id, item);
|
619 | };
|
620 | getItem = function (id) {
|
621 | return itemMap.get(id);
|
622 | };
|
623 | removeItem = function (id) {
|
624 | itemMap['delete'](id);
|
625 | };
|
626 | getItemIDs = function () {
|
627 | return Array.from(itemMap.keys());
|
628 | };
|
629 |
|
630 | addRoot = function (id) {
|
631 | rootIDSet.add(id);
|
632 | };
|
633 | removeRoot = function (id) {
|
634 | rootIDSet['delete'](id);
|
635 | };
|
636 | getRootIDs = function () {
|
637 | return Array.from(rootIDSet.keys());
|
638 | };
|
639 | } else {
|
640 | var itemByKey = {};
|
641 | var rootByKey = {};
|
642 |
|
643 |
|
644 |
|
645 | var getKeyFromID = function (id) {
|
646 | return '.' + id;
|
647 | };
|
648 | var getIDFromKey = function (key) {
|
649 | return parseInt(key.substr(1), 10);
|
650 | };
|
651 |
|
652 | setItem = function (id, item) {
|
653 | var key = getKeyFromID(id);
|
654 | itemByKey[key] = item;
|
655 | };
|
656 | getItem = function (id) {
|
657 | var key = getKeyFromID(id);
|
658 | return itemByKey[key];
|
659 | };
|
660 | removeItem = function (id) {
|
661 | var key = getKeyFromID(id);
|
662 | delete itemByKey[key];
|
663 | };
|
664 | getItemIDs = function () {
|
665 | return Object.keys(itemByKey).map(getIDFromKey);
|
666 | };
|
667 |
|
668 | addRoot = function (id) {
|
669 | var key = getKeyFromID(id);
|
670 | rootByKey[key] = true;
|
671 | };
|
672 | removeRoot = function (id) {
|
673 | var key = getKeyFromID(id);
|
674 | delete rootByKey[key];
|
675 | };
|
676 | getRootIDs = function () {
|
677 | return Object.keys(rootByKey).map(getIDFromKey);
|
678 | };
|
679 | }
|
680 |
|
681 | var unmountedIDs = [];
|
682 |
|
683 | function purgeDeep(id) {
|
684 | var item = getItem(id);
|
685 | if (item) {
|
686 | var childIDs = item.childIDs;
|
687 |
|
688 | removeItem(id);
|
689 | childIDs.forEach(purgeDeep);
|
690 | }
|
691 | }
|
692 |
|
693 | function describeComponentFrame(name, source, ownerName) {
|
694 | return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
695 | }
|
696 |
|
697 | function getDisplayName(element) {
|
698 | if (element == null) {
|
699 | return '#empty';
|
700 | } else if (typeof element === 'string' || typeof element === 'number') {
|
701 | return '#text';
|
702 | } else if (typeof element.type === 'string') {
|
703 | return element.type;
|
704 | } else {
|
705 | return element.type.displayName || element.type.name || 'Unknown';
|
706 | }
|
707 | }
|
708 |
|
709 | function describeID(id) {
|
710 | var name = ReactComponentTreeHook.getDisplayName(id);
|
711 | var element = ReactComponentTreeHook.getElement(id);
|
712 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
713 | var ownerName;
|
714 | if (ownerID) {
|
715 | ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
716 | }
|
717 | process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
|
718 | return describeComponentFrame(name, element && element._source, ownerName);
|
719 | }
|
720 |
|
721 | var ReactComponentTreeHook = {
|
722 | onSetChildren: function (id, nextChildIDs) {
|
723 | var item = getItem(id);
|
724 | !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
725 | item.childIDs = nextChildIDs;
|
726 |
|
727 | for (var i = 0; i < nextChildIDs.length; i++) {
|
728 | var nextChildID = nextChildIDs[i];
|
729 | var nextChild = getItem(nextChildID);
|
730 | !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
|
731 | !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
|
732 | !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
|
733 | if (nextChild.parentID == null) {
|
734 | nextChild.parentID = id;
|
735 |
|
736 |
|
737 |
|
738 | }
|
739 | !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0;
|
740 | }
|
741 | },
|
742 | onBeforeMountComponent: function (id, element, parentID) {
|
743 | var item = {
|
744 | element: element,
|
745 | parentID: parentID,
|
746 | text: null,
|
747 | childIDs: [],
|
748 | isMounted: false,
|
749 | updateCount: 0
|
750 | };
|
751 | setItem(id, item);
|
752 | },
|
753 | onBeforeUpdateComponent: function (id, element) {
|
754 | var item = getItem(id);
|
755 | if (!item || !item.isMounted) {
|
756 |
|
757 |
|
758 | return;
|
759 | }
|
760 | item.element = element;
|
761 | },
|
762 | onMountComponent: function (id) {
|
763 | var item = getItem(id);
|
764 | !item ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Item must have been set') : _prodInvariant('144') : void 0;
|
765 | item.isMounted = true;
|
766 | var isRoot = item.parentID === 0;
|
767 | if (isRoot) {
|
768 | addRoot(id);
|
769 | }
|
770 | },
|
771 | onUpdateComponent: function (id) {
|
772 | var item = getItem(id);
|
773 | if (!item || !item.isMounted) {
|
774 |
|
775 |
|
776 | return;
|
777 | }
|
778 | item.updateCount++;
|
779 | },
|
780 | onUnmountComponent: function (id) {
|
781 | var item = getItem(id);
|
782 | if (item) {
|
783 |
|
784 |
|
785 |
|
786 |
|
787 |
|
788 | item.isMounted = false;
|
789 | var isRoot = item.parentID === 0;
|
790 | if (isRoot) {
|
791 | removeRoot(id);
|
792 | }
|
793 | }
|
794 | unmountedIDs.push(id);
|
795 | },
|
796 | purgeUnmountedComponents: function () {
|
797 | if (ReactComponentTreeHook._preventPurging) {
|
798 |
|
799 | return;
|
800 | }
|
801 |
|
802 | for (var i = 0; i < unmountedIDs.length; i++) {
|
803 | var id = unmountedIDs[i];
|
804 | purgeDeep(id);
|
805 | }
|
806 | unmountedIDs.length = 0;
|
807 | },
|
808 | isMounted: function (id) {
|
809 | var item = getItem(id);
|
810 | return item ? item.isMounted : false;
|
811 | },
|
812 | getCurrentStackAddendum: function (topElement) {
|
813 | var info = '';
|
814 | if (topElement) {
|
815 | var name = getDisplayName(topElement);
|
816 | var owner = topElement._owner;
|
817 | info += describeComponentFrame(name, topElement._source, owner && owner.getName());
|
818 | }
|
819 |
|
820 | var currentOwner = ReactCurrentOwner.current;
|
821 | var id = currentOwner && currentOwner._debugID;
|
822 |
|
823 | info += ReactComponentTreeHook.getStackAddendumByID(id);
|
824 | return info;
|
825 | },
|
826 | getStackAddendumByID: function (id) {
|
827 | var info = '';
|
828 | while (id) {
|
829 | info += describeID(id);
|
830 | id = ReactComponentTreeHook.getParentID(id);
|
831 | }
|
832 | return info;
|
833 | },
|
834 | getChildIDs: function (id) {
|
835 | var item = getItem(id);
|
836 | return item ? item.childIDs : [];
|
837 | },
|
838 | getDisplayName: function (id) {
|
839 | var element = ReactComponentTreeHook.getElement(id);
|
840 | if (!element) {
|
841 | return null;
|
842 | }
|
843 | return getDisplayName(element);
|
844 | },
|
845 | getElement: function (id) {
|
846 | var item = getItem(id);
|
847 | return item ? item.element : null;
|
848 | },
|
849 | getOwnerID: function (id) {
|
850 | var element = ReactComponentTreeHook.getElement(id);
|
851 | if (!element || !element._owner) {
|
852 | return null;
|
853 | }
|
854 | return element._owner._debugID;
|
855 | },
|
856 | getParentID: function (id) {
|
857 | var item = getItem(id);
|
858 | return item ? item.parentID : null;
|
859 | },
|
860 | getSource: function (id) {
|
861 | var item = getItem(id);
|
862 | var element = item ? item.element : null;
|
863 | var source = element != null ? element._source : null;
|
864 | return source;
|
865 | },
|
866 | getText: function (id) {
|
867 | var element = ReactComponentTreeHook.getElement(id);
|
868 | if (typeof element === 'string') {
|
869 | return element;
|
870 | } else if (typeof element === 'number') {
|
871 | return '' + element;
|
872 | } else {
|
873 | return null;
|
874 | }
|
875 | },
|
876 | getUpdateCount: function (id) {
|
877 | var item = getItem(id);
|
878 | return item ? item.updateCount : 0;
|
879 | },
|
880 |
|
881 |
|
882 | getRootIDs: getRootIDs,
|
883 | getRegisteredIDs: getItemIDs,
|
884 |
|
885 | pushNonStandardWarningStack: function (isCreatingElement, currentSource) {
|
886 | if (typeof console.reactStack !== 'function') {
|
887 | return;
|
888 | }
|
889 |
|
890 | var stack = [];
|
891 | var currentOwner = ReactCurrentOwner.current;
|
892 | var id = currentOwner && currentOwner._debugID;
|
893 |
|
894 | try {
|
895 | if (isCreatingElement) {
|
896 | stack.push({
|
897 | name: id ? ReactComponentTreeHook.getDisplayName(id) : null,
|
898 | fileName: currentSource ? currentSource.fileName : null,
|
899 | lineNumber: currentSource ? currentSource.lineNumber : null
|
900 | });
|
901 | }
|
902 |
|
903 | while (id) {
|
904 | var element = ReactComponentTreeHook.getElement(id);
|
905 | var parentID = ReactComponentTreeHook.getParentID(id);
|
906 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
907 | var ownerName = ownerID ? ReactComponentTreeHook.getDisplayName(ownerID) : null;
|
908 | var source = element && element._source;
|
909 | stack.push({
|
910 | name: ownerName,
|
911 | fileName: source ? source.fileName : null,
|
912 | lineNumber: source ? source.lineNumber : null
|
913 | });
|
914 | id = parentID;
|
915 | }
|
916 | } catch (err) {
|
917 |
|
918 |
|
919 | }
|
920 |
|
921 | console.reactStack(stack);
|
922 | },
|
923 | popNonStandardWarningStack: function () {
|
924 | if (typeof console.reactStackEnd !== 'function') {
|
925 | return;
|
926 | }
|
927 | console.reactStackEnd();
|
928 | }
|
929 | };
|
930 |
|
931 | module.exports = ReactComponentTreeHook;
|
932 |
|
933 | }),
|
934 |
|
935 | (function(module, exports, __webpack_require__) {
|
936 |
|
937 | "use strict";
|
938 |
|
939 |
|
940 |
|
941 |
|
942 |
|
943 |
|
944 |
|
945 |
|
946 |
|
947 |
|
948 | var _prodInvariant = __webpack_require__(2),
|
949 | _assign = __webpack_require__(3);
|
950 |
|
951 | var CallbackQueue = __webpack_require__(54);
|
952 | var PooledClass = __webpack_require__(12);
|
953 | var ReactFeatureFlags = __webpack_require__(150);
|
954 | var ReactReconciler = __webpack_require__(19);
|
955 | var Transaction = __webpack_require__(24);
|
956 |
|
957 | var invariant = __webpack_require__(0);
|
958 |
|
959 | var dirtyComponents = [];
|
960 | var updateBatchNumber = 0;
|
961 | var asapCallbackQueue = CallbackQueue.getPooled();
|
962 | var asapEnqueued = false;
|
963 |
|
964 | var batchingStrategy = null;
|
965 |
|
966 | function ensureInjected() {
|
967 | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
968 | }
|
969 |
|
970 | var NESTED_UPDATES = {
|
971 | initialize: function () {
|
972 | this.dirtyComponentsLength = dirtyComponents.length;
|
973 | },
|
974 | close: function () {
|
975 | if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
976 |
|
977 |
|
978 |
|
979 |
|
980 |
|
981 | dirtyComponents.splice(0, this.dirtyComponentsLength);
|
982 | flushBatchedUpdates();
|
983 | } else {
|
984 | dirtyComponents.length = 0;
|
985 | }
|
986 | }
|
987 | };
|
988 |
|
989 | var UPDATE_QUEUEING = {
|
990 | initialize: function () {
|
991 | this.callbackQueue.reset();
|
992 | },
|
993 | close: function () {
|
994 | this.callbackQueue.notifyAll();
|
995 | }
|
996 | };
|
997 |
|
998 | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
999 |
|
1000 | function ReactUpdatesFlushTransaction() {
|
1001 | this.reinitializeTransaction();
|
1002 | this.dirtyComponentsLength = null;
|
1003 | this.callbackQueue = CallbackQueue.getPooled();
|
1004 | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
1005 | true);
|
1006 | }
|
1007 |
|
1008 | _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
|
1009 | getTransactionWrappers: function () {
|
1010 | return TRANSACTION_WRAPPERS;
|
1011 | },
|
1012 |
|
1013 | destructor: function () {
|
1014 | this.dirtyComponentsLength = null;
|
1015 | CallbackQueue.release(this.callbackQueue);
|
1016 | this.callbackQueue = null;
|
1017 | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
1018 | this.reconcileTransaction = null;
|
1019 | },
|
1020 |
|
1021 | perform: function (method, scope, a) {
|
1022 |
|
1023 |
|
1024 | return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
1025 | }
|
1026 | });
|
1027 |
|
1028 | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
1029 |
|
1030 | function batchedUpdates(callback, a, b, c, d, e) {
|
1031 | ensureInjected();
|
1032 | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
1033 | }
|
1034 |
|
1035 |
|
1036 |
|
1037 |
|
1038 |
|
1039 |
|
1040 |
|
1041 |
|
1042 | function mountOrderComparator(c1, c2) {
|
1043 | return c1._mountOrder - c2._mountOrder;
|
1044 | }
|
1045 |
|
1046 | function runBatchedUpdates(transaction) {
|
1047 | var len = transaction.dirtyComponentsLength;
|
1048 | !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to match dirty-components array length (%s).', len, dirtyComponents.length) : _prodInvariant('124', len, dirtyComponents.length) : void 0;
|
1049 |
|
1050 |
|
1051 |
|
1052 |
|
1053 | dirtyComponents.sort(mountOrderComparator);
|
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 |
|
1059 |
|
1060 | updateBatchNumber++;
|
1061 |
|
1062 | for (var i = 0; i < len; i++) {
|
1063 |
|
1064 |
|
1065 |
|
1066 | var component = dirtyComponents[i];
|
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 | var callbacks = component._pendingCallbacks;
|
1072 | component._pendingCallbacks = null;
|
1073 |
|
1074 | var markerName;
|
1075 | if (ReactFeatureFlags.logTopLevelRenders) {
|
1076 | var namedComponent = component;
|
1077 |
|
1078 | if (component._currentElement.type.isReactTopLevelWrapper) {
|
1079 | namedComponent = component._renderedComponent;
|
1080 | }
|
1081 | markerName = 'React update: ' + namedComponent.getName();
|
1082 | console.time(markerName);
|
1083 | }
|
1084 |
|
1085 | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
1086 |
|
1087 | if (markerName) {
|
1088 | console.timeEnd(markerName);
|
1089 | }
|
1090 |
|
1091 | if (callbacks) {
|
1092 | for (var j = 0; j < callbacks.length; j++) {
|
1093 | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
1094 | }
|
1095 | }
|
1096 | }
|
1097 | }
|
1098 |
|
1099 | var flushBatchedUpdates = function () {
|
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 | while (dirtyComponents.length || asapEnqueued) {
|
1105 | if (dirtyComponents.length) {
|
1106 | var transaction = ReactUpdatesFlushTransaction.getPooled();
|
1107 | transaction.perform(runBatchedUpdates, null, transaction);
|
1108 | ReactUpdatesFlushTransaction.release(transaction);
|
1109 | }
|
1110 |
|
1111 | if (asapEnqueued) {
|
1112 | asapEnqueued = false;
|
1113 | var queue = asapCallbackQueue;
|
1114 | asapCallbackQueue = CallbackQueue.getPooled();
|
1115 | queue.notifyAll();
|
1116 | CallbackQueue.release(queue);
|
1117 | }
|
1118 | }
|
1119 | };
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 | function enqueueUpdate(component) {
|
1126 | ensureInjected();
|
1127 |
|
1128 |
|
1129 |
|
1130 |
|
1131 |
|
1132 |
|
1133 |
|
1134 | if (!batchingStrategy.isBatchingUpdates) {
|
1135 | batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
1136 | return;
|
1137 | }
|
1138 |
|
1139 | dirtyComponents.push(component);
|
1140 | if (component._updateBatchNumber == null) {
|
1141 | component._updateBatchNumber = updateBatchNumber + 1;
|
1142 | }
|
1143 | }
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 | function asap(callback, context) {
|
1150 | invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
|
1151 | asapCallbackQueue.enqueue(callback, context);
|
1152 | asapEnqueued = true;
|
1153 | }
|
1154 |
|
1155 | var ReactUpdatesInjection = {
|
1156 | injectReconcileTransaction: function (ReconcileTransaction) {
|
1157 | !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
1158 | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
1159 | },
|
1160 |
|
1161 | injectBatchingStrategy: function (_batchingStrategy) {
|
1162 | !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
1163 | !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
1164 | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
1165 | batchingStrategy = _batchingStrategy;
|
1166 | }
|
1167 | };
|
1168 |
|
1169 | var ReactUpdates = {
|
1170 | |
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 | ReactReconcileTransaction: null,
|
1177 |
|
1178 | batchedUpdates: batchedUpdates,
|
1179 | enqueueUpdate: enqueueUpdate,
|
1180 | flushBatchedUpdates: flushBatchedUpdates,
|
1181 | injection: ReactUpdatesInjection,
|
1182 | asap: asap
|
1183 | };
|
1184 |
|
1185 | module.exports = ReactUpdates;
|
1186 |
|
1187 | }),
|
1188 |
|
1189 | (function(module, exports, __webpack_require__) {
|
1190 |
|
1191 | "use strict";
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 | var _assign = __webpack_require__(3);
|
1203 |
|
1204 | var PooledClass = __webpack_require__(12);
|
1205 |
|
1206 | var emptyFunction = __webpack_require__(7);
|
1207 | var warning = __webpack_require__(1);
|
1208 |
|
1209 | var didWarnForAddedNewProperty = false;
|
1210 | var isProxySupported = typeof Proxy === 'function';
|
1211 |
|
1212 | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 | var EventInterface = {
|
1219 | type: null,
|
1220 | target: null,
|
1221 |
|
1222 | currentTarget: emptyFunction.thatReturnsNull,
|
1223 | eventPhase: null,
|
1224 | bubbles: null,
|
1225 | cancelable: null,
|
1226 | timeStamp: function (event) {
|
1227 | return event.timeStamp || Date.now();
|
1228 | },
|
1229 | defaultPrevented: null,
|
1230 | isTrusted: null
|
1231 | };
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
1252 | if (process.env.NODE_ENV !== 'production') {
|
1253 |
|
1254 | delete this.nativeEvent;
|
1255 | delete this.preventDefault;
|
1256 | delete this.stopPropagation;
|
1257 | }
|
1258 |
|
1259 | this.dispatchConfig = dispatchConfig;
|
1260 | this._targetInst = targetInst;
|
1261 | this.nativeEvent = nativeEvent;
|
1262 |
|
1263 | var Interface = this.constructor.Interface;
|
1264 | for (var propName in Interface) {
|
1265 | if (!Interface.hasOwnProperty(propName)) {
|
1266 | continue;
|
1267 | }
|
1268 | if (process.env.NODE_ENV !== 'production') {
|
1269 | delete this[propName];
|
1270 | }
|
1271 | var normalize = Interface[propName];
|
1272 | if (normalize) {
|
1273 | this[propName] = normalize(nativeEvent);
|
1274 | } else {
|
1275 | if (propName === 'target') {
|
1276 | this.target = nativeEventTarget;
|
1277 | } else {
|
1278 | this[propName] = nativeEvent[propName];
|
1279 | }
|
1280 | }
|
1281 | }
|
1282 |
|
1283 | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
1284 | if (defaultPrevented) {
|
1285 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1286 | } else {
|
1287 | this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
1288 | }
|
1289 | this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
1290 | return this;
|
1291 | }
|
1292 |
|
1293 | _assign(SyntheticEvent.prototype, {
|
1294 | preventDefault: function () {
|
1295 | this.defaultPrevented = true;
|
1296 | var event = this.nativeEvent;
|
1297 | if (!event) {
|
1298 | return;
|
1299 | }
|
1300 |
|
1301 | if (event.preventDefault) {
|
1302 | event.preventDefault();
|
1303 |
|
1304 | } else if (typeof event.returnValue !== 'unknown') {
|
1305 | event.returnValue = false;
|
1306 | }
|
1307 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
1308 | },
|
1309 |
|
1310 | stopPropagation: function () {
|
1311 | var event = this.nativeEvent;
|
1312 | if (!event) {
|
1313 | return;
|
1314 | }
|
1315 |
|
1316 | if (event.stopPropagation) {
|
1317 | event.stopPropagation();
|
1318 |
|
1319 | } else if (typeof event.cancelBubble !== 'unknown') {
|
1320 |
|
1321 |
|
1322 |
|
1323 |
|
1324 |
|
1325 | event.cancelBubble = true;
|
1326 | }
|
1327 |
|
1328 | this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
1329 | },
|
1330 |
|
1331 | |
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 | persist: function () {
|
1337 | this.isPersistent = emptyFunction.thatReturnsTrue;
|
1338 | },
|
1339 |
|
1340 | |
1341 |
|
1342 |
|
1343 |
|
1344 |
|
1345 | isPersistent: emptyFunction.thatReturnsFalse,
|
1346 |
|
1347 | |
1348 |
|
1349 |
|
1350 | destructor: function () {
|
1351 | var Interface = this.constructor.Interface;
|
1352 | for (var propName in Interface) {
|
1353 | if (process.env.NODE_ENV !== 'production') {
|
1354 | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
1355 | } else {
|
1356 | this[propName] = null;
|
1357 | }
|
1358 | }
|
1359 | for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
|
1360 | this[shouldBeReleasedProperties[i]] = null;
|
1361 | }
|
1362 | if (process.env.NODE_ENV !== 'production') {
|
1363 | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
1364 | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
1365 | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
1366 | }
|
1367 | }
|
1368 | });
|
1369 |
|
1370 | SyntheticEvent.Interface = EventInterface;
|
1371 |
|
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 |
|
1377 |
|
1378 | SyntheticEvent.augmentClass = function (Class, Interface) {
|
1379 | var Super = this;
|
1380 |
|
1381 | var E = function () {};
|
1382 | E.prototype = Super.prototype;
|
1383 | var prototype = new E();
|
1384 |
|
1385 | _assign(prototype, Class.prototype);
|
1386 | Class.prototype = prototype;
|
1387 | Class.prototype.constructor = Class;
|
1388 |
|
1389 | Class.Interface = _assign({}, Super.Interface, Interface);
|
1390 | Class.augmentClass = Super.augmentClass;
|
1391 |
|
1392 | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
|
1393 | };
|
1394 |
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 | if (process.env.NODE_ENV !== 'production') {
|
1400 | if (isProxySupported) {
|
1401 |
|
1402 | SyntheticEvent = new Proxy(SyntheticEvent, {
|
1403 | construct: function (target, args) {
|
1404 | return this.apply(target, Object.create(target.prototype), args);
|
1405 | },
|
1406 | apply: function (constructor, that, args) {
|
1407 | return new Proxy(constructor.apply(that, args), {
|
1408 | set: function (target, prop, value) {
|
1409 | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
1410 | process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
|
1411 | didWarnForAddedNewProperty = true;
|
1412 | }
|
1413 | target[prop] = value;
|
1414 | return true;
|
1415 | }
|
1416 | });
|
1417 | }
|
1418 | });
|
1419 |
|
1420 | }
|
1421 | }
|
1422 |
|
1423 | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
|
1424 |
|
1425 | module.exports = SyntheticEvent;
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 | function getPooledWarningPropertyDefinition(propName, getVal) {
|
1435 | var isFunction = typeof getVal === 'function';
|
1436 | return {
|
1437 | configurable: true,
|
1438 | set: set,
|
1439 | get: get
|
1440 | };
|
1441 |
|
1442 | function set(val) {
|
1443 | var action = isFunction ? 'setting the method' : 'setting the property';
|
1444 | warn(action, 'This is effectively a no-op');
|
1445 | return val;
|
1446 | }
|
1447 |
|
1448 | function get() {
|
1449 | var action = isFunction ? 'accessing the method' : 'accessing the property';
|
1450 | var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
1451 | warn(action, result);
|
1452 | return getVal;
|
1453 | }
|
1454 |
|
1455 | function warn(action, result) {
|
1456 | var warningCondition = false;
|
1457 | process.env.NODE_ENV !== 'production' ? warning(warningCondition, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
1458 | }
|
1459 | }
|
1460 |
|
1461 | }),
|
1462 |
|
1463 | (function(module, exports, __webpack_require__) {
|
1464 |
|
1465 | "use strict";
|
1466 |
|
1467 |
|
1468 |
|
1469 |
|
1470 |
|
1471 |
|
1472 |
|
1473 |
|
1474 |
|
1475 |
|
1476 |
|
1477 |
|
1478 |
|
1479 |
|
1480 |
|
1481 |
|
1482 |
|
1483 | var ReactCurrentOwner = {
|
1484 | |
1485 |
|
1486 |
|
1487 |
|
1488 | current: null
|
1489 | };
|
1490 |
|
1491 | module.exports = ReactCurrentOwner;
|
1492 |
|
1493 | }),
|
1494 |
|
1495 | (function(module, exports, __webpack_require__) {
|
1496 |
|
1497 | "use strict";
|
1498 |
|
1499 |
|
1500 |
|
1501 |
|
1502 |
|
1503 |
|
1504 |
|
1505 |
|
1506 |
|
1507 |
|
1508 |
|
1509 | var _prodInvariant = __webpack_require__(2);
|
1510 |
|
1511 | var invariant = __webpack_require__(0);
|
1512 |
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 | var oneArgumentPooler = function (copyFieldsFrom) {
|
1521 | var Klass = this;
|
1522 | if (Klass.instancePool.length) {
|
1523 | var instance = Klass.instancePool.pop();
|
1524 | Klass.call(instance, copyFieldsFrom);
|
1525 | return instance;
|
1526 | } else {
|
1527 | return new Klass(copyFieldsFrom);
|
1528 | }
|
1529 | };
|
1530 |
|
1531 | var twoArgumentPooler = function (a1, a2) {
|
1532 | var Klass = this;
|
1533 | if (Klass.instancePool.length) {
|
1534 | var instance = Klass.instancePool.pop();
|
1535 | Klass.call(instance, a1, a2);
|
1536 | return instance;
|
1537 | } else {
|
1538 | return new Klass(a1, a2);
|
1539 | }
|
1540 | };
|
1541 |
|
1542 | var threeArgumentPooler = function (a1, a2, a3) {
|
1543 | var Klass = this;
|
1544 | if (Klass.instancePool.length) {
|
1545 | var instance = Klass.instancePool.pop();
|
1546 | Klass.call(instance, a1, a2, a3);
|
1547 | return instance;
|
1548 | } else {
|
1549 | return new Klass(a1, a2, a3);
|
1550 | }
|
1551 | };
|
1552 |
|
1553 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
1554 | var Klass = this;
|
1555 | if (Klass.instancePool.length) {
|
1556 | var instance = Klass.instancePool.pop();
|
1557 | Klass.call(instance, a1, a2, a3, a4);
|
1558 | return instance;
|
1559 | } else {
|
1560 | return new Klass(a1, a2, a3, a4);
|
1561 | }
|
1562 | };
|
1563 |
|
1564 | var standardReleaser = function (instance) {
|
1565 | var Klass = this;
|
1566 | !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
1567 | instance.destructor();
|
1568 | if (Klass.instancePool.length < Klass.poolSize) {
|
1569 | Klass.instancePool.push(instance);
|
1570 | }
|
1571 | };
|
1572 |
|
1573 | var DEFAULT_POOL_SIZE = 10;
|
1574 | var DEFAULT_POOLER = oneArgumentPooler;
|
1575 |
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 |
|
1583 |
|
1584 |
|
1585 | var addPoolingTo = function (CopyConstructor, pooler) {
|
1586 |
|
1587 |
|
1588 | var NewKlass = CopyConstructor;
|
1589 | NewKlass.instancePool = [];
|
1590 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
1591 | if (!NewKlass.poolSize) {
|
1592 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
1593 | }
|
1594 | NewKlass.release = standardReleaser;
|
1595 | return NewKlass;
|
1596 | };
|
1597 |
|
1598 | var PooledClass = {
|
1599 | addPoolingTo: addPoolingTo,
|
1600 | oneArgumentPooler: oneArgumentPooler,
|
1601 | twoArgumentPooler: twoArgumentPooler,
|
1602 | threeArgumentPooler: threeArgumentPooler,
|
1603 | fourArgumentPooler: fourArgumentPooler
|
1604 | };
|
1605 |
|
1606 | module.exports = PooledClass;
|
1607 |
|
1608 | }),
|
1609 |
|
1610 | (function(module, exports, __webpack_require__) {
|
1611 |
|
1612 | "use strict";
|
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 |
|
1620 |
|
1621 |
|
1622 |
|
1623 | var _assign = __webpack_require__(3);
|
1624 |
|
1625 | var ReactCurrentOwner = __webpack_require__(11);
|
1626 |
|
1627 | var warning = __webpack_require__(1);
|
1628 | var canDefineProperty = __webpack_require__(26);
|
1629 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
1630 |
|
1631 | var REACT_ELEMENT_TYPE = __webpack_require__(76);
|
1632 |
|
1633 | var RESERVED_PROPS = {
|
1634 | key: true,
|
1635 | ref: true,
|
1636 | __self: true,
|
1637 | __source: true
|
1638 | };
|
1639 |
|
1640 | var specialPropKeyWarningShown, specialPropRefWarningShown;
|
1641 |
|
1642 | function hasValidRef(config) {
|
1643 | if (process.env.NODE_ENV !== 'production') {
|
1644 | if (hasOwnProperty.call(config, 'ref')) {
|
1645 | var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
1646 | if (getter && getter.isReactWarning) {
|
1647 | return false;
|
1648 | }
|
1649 | }
|
1650 | }
|
1651 | return config.ref !== undefined;
|
1652 | }
|
1653 |
|
1654 | function hasValidKey(config) {
|
1655 | if (process.env.NODE_ENV !== 'production') {
|
1656 | if (hasOwnProperty.call(config, 'key')) {
|
1657 | var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
1658 | if (getter && getter.isReactWarning) {
|
1659 | return false;
|
1660 | }
|
1661 | }
|
1662 | }
|
1663 | return config.key !== undefined;
|
1664 | }
|
1665 |
|
1666 | function defineKeyPropWarningGetter(props, displayName) {
|
1667 | var warnAboutAccessingKey = function () {
|
1668 | if (!specialPropKeyWarningShown) {
|
1669 | specialPropKeyWarningShown = true;
|
1670 | process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
1671 | }
|
1672 | };
|
1673 | warnAboutAccessingKey.isReactWarning = true;
|
1674 | Object.defineProperty(props, 'key', {
|
1675 | get: warnAboutAccessingKey,
|
1676 | configurable: true
|
1677 | });
|
1678 | }
|
1679 |
|
1680 | function defineRefPropWarningGetter(props, displayName) {
|
1681 | var warnAboutAccessingRef = function () {
|
1682 | if (!specialPropRefWarningShown) {
|
1683 | specialPropRefWarningShown = true;
|
1684 | process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0;
|
1685 | }
|
1686 | };
|
1687 | warnAboutAccessingRef.isReactWarning = true;
|
1688 | Object.defineProperty(props, 'ref', {
|
1689 | get: warnAboutAccessingRef,
|
1690 | configurable: true
|
1691 | });
|
1692 | }
|
1693 |
|
1694 | /**
|
1695 | * Factory method to create a new React element. This no longer adheres to
|
1696 | * the class pattern, so do not use new to call it. Also, no instanceof check
|
1697 | * will work. Instead test $$typeof field against Symbol.for('react.element') to check
|
1698 | * if something is a React Element.
|
1699 | *
|
1700 | * @param {*} type
|
1701 | * @param {*} key
|
1702 | * @param {string|object} ref
|
1703 | * @param {*} self A *temporary* helper to detect places where `this` is
|
1704 | * different from the `owner` when React.createElement is called, so that we
|
1705 | * can warn. We want to get rid of owner and replace string `ref`s with arrow
|
1706 | * functions, and as long as `this` and owner are the same, there will be no
|
1707 | * change in behavior.
|
1708 | * @param {*} source An annotation object (added by a transpiler or otherwise)
|
1709 | * indicating filename, line number, and/or other information.
|
1710 | * @param {*} owner
|
1711 | * @param {*} props
|
1712 | * @internal
|
1713 | */
|
1714 | var ReactElement = function (type, key, ref, self, source, owner, props) {
|
1715 | var element = {
|
1716 |
|
1717 | $$typeof: REACT_ELEMENT_TYPE,
|
1718 |
|
1719 |
|
1720 | type: type,
|
1721 | key: key,
|
1722 | ref: ref,
|
1723 | props: props,
|
1724 |
|
1725 |
|
1726 | _owner: owner
|
1727 | };
|
1728 |
|
1729 | if (process.env.NODE_ENV !== 'production') {
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 | element._store = {};
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 | if (canDefineProperty) {
|
1741 | Object.defineProperty(element._store, 'validated', {
|
1742 | configurable: false,
|
1743 | enumerable: false,
|
1744 | writable: true,
|
1745 | value: false
|
1746 | });
|
1747 |
|
1748 | Object.defineProperty(element, '_self', {
|
1749 | configurable: false,
|
1750 | enumerable: false,
|
1751 | writable: false,
|
1752 | value: self
|
1753 | });
|
1754 |
|
1755 |
|
1756 | Object.defineProperty(element, '_source', {
|
1757 | configurable: false,
|
1758 | enumerable: false,
|
1759 | writable: false,
|
1760 | value: source
|
1761 | });
|
1762 | } else {
|
1763 | element._store.validated = false;
|
1764 | element._self = self;
|
1765 | element._source = source;
|
1766 | }
|
1767 | if (Object.freeze) {
|
1768 | Object.freeze(element.props);
|
1769 | Object.freeze(element);
|
1770 | }
|
1771 | }
|
1772 |
|
1773 | return element;
|
1774 | };
|
1775 |
|
1776 |
|
1777 |
|
1778 |
|
1779 |
|
1780 | ReactElement.createElement = function (type, config, children) {
|
1781 | var propName;
|
1782 |
|
1783 |
|
1784 | var props = {};
|
1785 |
|
1786 | var key = null;
|
1787 | var ref = null;
|
1788 | var self = null;
|
1789 | var source = null;
|
1790 |
|
1791 | if (config != null) {
|
1792 | if (hasValidRef(config)) {
|
1793 | ref = config.ref;
|
1794 | }
|
1795 | if (hasValidKey(config)) {
|
1796 | key = '' + config.key;
|
1797 | }
|
1798 |
|
1799 | self = config.__self === undefined ? null : config.__self;
|
1800 | source = config.__source === undefined ? null : config.__source;
|
1801 |
|
1802 | for (propName in config) {
|
1803 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
1804 | props[propName] = config[propName];
|
1805 | }
|
1806 | }
|
1807 | }
|
1808 |
|
1809 |
|
1810 |
|
1811 | var childrenLength = arguments.length - 2;
|
1812 | if (childrenLength === 1) {
|
1813 | props.children = children;
|
1814 | } else if (childrenLength > 1) {
|
1815 | var childArray = Array(childrenLength);
|
1816 | for (var i = 0; i < childrenLength; i++) {
|
1817 | childArray[i] = arguments[i + 2];
|
1818 | }
|
1819 | if (process.env.NODE_ENV !== 'production') {
|
1820 | if (Object.freeze) {
|
1821 | Object.freeze(childArray);
|
1822 | }
|
1823 | }
|
1824 | props.children = childArray;
|
1825 | }
|
1826 |
|
1827 |
|
1828 | if (type && type.defaultProps) {
|
1829 | var defaultProps = type.defaultProps;
|
1830 | for (propName in defaultProps) {
|
1831 | if (props[propName] === undefined) {
|
1832 | props[propName] = defaultProps[propName];
|
1833 | }
|
1834 | }
|
1835 | }
|
1836 | if (process.env.NODE_ENV !== 'production') {
|
1837 | if (key || ref) {
|
1838 | if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
1839 | var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
1840 | if (key) {
|
1841 | defineKeyPropWarningGetter(props, displayName);
|
1842 | }
|
1843 | if (ref) {
|
1844 | defineRefPropWarningGetter(props, displayName);
|
1845 | }
|
1846 | }
|
1847 | }
|
1848 | }
|
1849 | return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
1850 | };
|
1851 |
|
1852 |
|
1853 |
|
1854 |
|
1855 |
|
1856 | ReactElement.createFactory = function (type) {
|
1857 | var factory = ReactElement.createElement.bind(null, type);
|
1858 |
|
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 | factory.type = type;
|
1864 | return factory;
|
1865 | };
|
1866 |
|
1867 | ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
|
1868 | var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
1869 |
|
1870 | return newElement;
|
1871 | };
|
1872 |
|
1873 |
|
1874 |
|
1875 |
|
1876 |
|
1877 | ReactElement.cloneElement = function (element, config, children) {
|
1878 | var propName;
|
1879 |
|
1880 |
|
1881 | var props = _assign({}, element.props);
|
1882 |
|
1883 |
|
1884 | var key = element.key;
|
1885 | var ref = element.ref;
|
1886 |
|
1887 | var self = element._self;
|
1888 |
|
1889 |
|
1890 |
|
1891 | var source = element._source;
|
1892 |
|
1893 |
|
1894 | var owner = element._owner;
|
1895 |
|
1896 | if (config != null) {
|
1897 | if (hasValidRef(config)) {
|
1898 |
|
1899 | ref = config.ref;
|
1900 | owner = ReactCurrentOwner.current;
|
1901 | }
|
1902 | if (hasValidKey(config)) {
|
1903 | key = '' + config.key;
|
1904 | }
|
1905 |
|
1906 |
|
1907 | var defaultProps;
|
1908 | if (element.type && element.type.defaultProps) {
|
1909 | defaultProps = element.type.defaultProps;
|
1910 | }
|
1911 | for (propName in config) {
|
1912 | if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
1913 | if (config[propName] === undefined && defaultProps !== undefined) {
|
1914 |
|
1915 | props[propName] = defaultProps[propName];
|
1916 | } else {
|
1917 | props[propName] = config[propName];
|
1918 | }
|
1919 | }
|
1920 | }
|
1921 | }
|
1922 |
|
1923 |
|
1924 |
|
1925 | var childrenLength = arguments.length - 2;
|
1926 | if (childrenLength === 1) {
|
1927 | props.children = children;
|
1928 | } else if (childrenLength > 1) {
|
1929 | var childArray = Array(childrenLength);
|
1930 | for (var i = 0; i < childrenLength; i++) {
|
1931 | childArray[i] = arguments[i + 2];
|
1932 | }
|
1933 | props.children = childArray;
|
1934 | }
|
1935 |
|
1936 | return ReactElement(element.type, key, ref, self, source, owner, props);
|
1937 | };
|
1938 |
|
1939 |
|
1940 |
|
1941 |
|
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 | ReactElement.isValidElement = function (object) {
|
1947 | return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
1948 | };
|
1949 |
|
1950 | module.exports = ReactElement;
|
1951 |
|
1952 | }),
|
1953 |
|
1954 | (function(module, exports, __webpack_require__) {
|
1955 |
|
1956 | "use strict";
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 |
|
1973 |
|
1974 | function reactProdInvariant(code) {
|
1975 | var argCount = arguments.length - 1;
|
1976 |
|
1977 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
1978 |
|
1979 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
1980 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
1981 | }
|
1982 |
|
1983 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
1984 |
|
1985 | var error = new Error(message);
|
1986 | error.name = 'Invariant Violation';
|
1987 | error.framesToPop = 1;
|
1988 |
|
1989 | throw error;
|
1990 | }
|
1991 |
|
1992 | module.exports = reactProdInvariant;
|
1993 |
|
1994 | }),
|
1995 |
|
1996 | (function(module, exports, __webpack_require__) {
|
1997 |
|
1998 | "use strict";
|
1999 |
|
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 | var DOMNamespaces = __webpack_require__(29);
|
2010 | var setInnerHTML = __webpack_require__(43);
|
2011 |
|
2012 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
|
2013 | var setTextContent = __webpack_require__(72);
|
2014 |
|
2015 | var ELEMENT_NODE_TYPE = 1;
|
2016 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
2017 |
|
2018 |
|
2019 |
|
2020 |
|
2021 |
|
2022 |
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
|
2030 |
|
2031 | function insertTreeChildren(tree) {
|
2032 | if (!enableLazy) {
|
2033 | return;
|
2034 | }
|
2035 | var node = tree.node;
|
2036 | var children = tree.children;
|
2037 | if (children.length) {
|
2038 | for (var i = 0; i < children.length; i++) {
|
2039 | insertTreeBefore(node, children[i], null);
|
2040 | }
|
2041 | } else if (tree.html != null) {
|
2042 | setInnerHTML(node, tree.html);
|
2043 | } else if (tree.text != null) {
|
2044 | setTextContent(node, tree.text);
|
2045 | }
|
2046 | }
|
2047 |
|
2048 | var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 | if (tree.node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE || tree.node.nodeType === ELEMENT_NODE_TYPE && tree.node.nodeName.toLowerCase() === 'object' && (tree.node.namespaceURI == null || tree.node.namespaceURI === DOMNamespaces.html)) {
|
2056 | insertTreeChildren(tree);
|
2057 | parentNode.insertBefore(tree.node, referenceNode);
|
2058 | } else {
|
2059 | parentNode.insertBefore(tree.node, referenceNode);
|
2060 | insertTreeChildren(tree);
|
2061 | }
|
2062 | });
|
2063 |
|
2064 | function replaceChildWithTree(oldNode, newTree) {
|
2065 | oldNode.parentNode.replaceChild(newTree.node, oldNode);
|
2066 | insertTreeChildren(newTree);
|
2067 | }
|
2068 |
|
2069 | function queueChild(parentTree, childTree) {
|
2070 | if (enableLazy) {
|
2071 | parentTree.children.push(childTree);
|
2072 | } else {
|
2073 | parentTree.node.appendChild(childTree.node);
|
2074 | }
|
2075 | }
|
2076 |
|
2077 | function queueHTML(tree, html) {
|
2078 | if (enableLazy) {
|
2079 | tree.html = html;
|
2080 | } else {
|
2081 | setInnerHTML(tree.node, html);
|
2082 | }
|
2083 | }
|
2084 |
|
2085 | function queueText(tree, text) {
|
2086 | if (enableLazy) {
|
2087 | tree.text = text;
|
2088 | } else {
|
2089 | setTextContent(tree.node, text);
|
2090 | }
|
2091 | }
|
2092 |
|
2093 | function toString() {
|
2094 | return this.node.nodeName;
|
2095 | }
|
2096 |
|
2097 | function DOMLazyTree(node) {
|
2098 | return {
|
2099 | node: node,
|
2100 | children: [],
|
2101 | html: null,
|
2102 | text: null,
|
2103 | toString: toString
|
2104 | };
|
2105 | }
|
2106 |
|
2107 | DOMLazyTree.insertTreeBefore = insertTreeBefore;
|
2108 | DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
|
2109 | DOMLazyTree.queueChild = queueChild;
|
2110 | DOMLazyTree.queueHTML = queueHTML;
|
2111 | DOMLazyTree.queueText = queueText;
|
2112 |
|
2113 | module.exports = DOMLazyTree;
|
2114 |
|
2115 | }),
|
2116 |
|
2117 | (function(module, exports, __webpack_require__) {
|
2118 |
|
2119 | "use strict";
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 |
|
2130 | var _prodInvariant = __webpack_require__(2);
|
2131 |
|
2132 | var invariant = __webpack_require__(0);
|
2133 |
|
2134 | function checkMask(value, bitmask) {
|
2135 | return (value & bitmask) === bitmask;
|
2136 | }
|
2137 |
|
2138 | var DOMPropertyInjection = {
|
2139 | |
2140 |
|
2141 |
|
2142 |
|
2143 | MUST_USE_PROPERTY: 0x1,
|
2144 | HAS_BOOLEAN_VALUE: 0x4,
|
2145 | HAS_NUMERIC_VALUE: 0x8,
|
2146 | HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
|
2147 | HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
|
2148 |
|
2149 | |
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 |
|
2164 |
|
2165 |
|
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 |
|
2176 |
|
2177 | injectDOMPropertyConfig: function (domPropertyConfig) {
|
2178 | var Injection = DOMPropertyInjection;
|
2179 | var Properties = domPropertyConfig.Properties || {};
|
2180 | var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
|
2181 | var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
|
2182 | var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
|
2183 | var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
|
2184 |
|
2185 | if (domPropertyConfig.isCustomAttribute) {
|
2186 | DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
|
2187 | }
|
2188 |
|
2189 | for (var propName in Properties) {
|
2190 | !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.', propName) : _prodInvariant('48', propName) : void 0;
|
2191 |
|
2192 | var lowerCased = propName.toLowerCase();
|
2193 | var propConfig = Properties[propName];
|
2194 |
|
2195 | var propertyInfo = {
|
2196 | attributeName: lowerCased,
|
2197 | attributeNamespace: null,
|
2198 | propertyName: propName,
|
2199 | mutationMethod: null,
|
2200 |
|
2201 | mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
|
2202 | hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
|
2203 | hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
|
2204 | hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
|
2205 | hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
|
2206 | };
|
2207 | !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s', propName) : _prodInvariant('50', propName) : void 0;
|
2208 |
|
2209 | if (process.env.NODE_ENV !== 'production') {
|
2210 | DOMProperty.getPossibleStandardName[lowerCased] = propName;
|
2211 | }
|
2212 |
|
2213 | if (DOMAttributeNames.hasOwnProperty(propName)) {
|
2214 | var attributeName = DOMAttributeNames[propName];
|
2215 | propertyInfo.attributeName = attributeName;
|
2216 | if (process.env.NODE_ENV !== 'production') {
|
2217 | DOMProperty.getPossibleStandardName[attributeName] = propName;
|
2218 | }
|
2219 | }
|
2220 |
|
2221 | if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
|
2222 | propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
|
2223 | }
|
2224 |
|
2225 | if (DOMPropertyNames.hasOwnProperty(propName)) {
|
2226 | propertyInfo.propertyName = DOMPropertyNames[propName];
|
2227 | }
|
2228 |
|
2229 | if (DOMMutationMethods.hasOwnProperty(propName)) {
|
2230 | propertyInfo.mutationMethod = DOMMutationMethods[propName];
|
2231 | }
|
2232 |
|
2233 | DOMProperty.properties[propName] = propertyInfo;
|
2234 | }
|
2235 | }
|
2236 | };
|
2237 |
|
2238 |
|
2239 | var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
2240 |
|
2241 |
|
2242 |
|
2243 |
|
2244 |
|
2245 |
|
2246 |
|
2247 |
|
2248 |
|
2249 |
|
2250 |
|
2251 |
|
2252 |
|
2253 |
|
2254 |
|
2255 | var DOMProperty = {
|
2256 | ID_ATTRIBUTE_NAME: 'data-reactid',
|
2257 | ROOT_ATTRIBUTE_NAME: 'data-reactroot',
|
2258 |
|
2259 | ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
|
2260 | ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
|
2261 |
|
2262 | |
2263 |
|
2264 |
|
2265 |
|
2266 |
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 |
|
2272 |
|
2273 |
|
2274 |
|
2275 |
|
2276 |
|
2277 |
|
2278 |
|
2279 |
|
2280 |
|
2281 |
|
2282 |
|
2283 |
|
2284 |
|
2285 |
|
2286 |
|
2287 |
|
2288 |
|
2289 |
|
2290 | properties: {},
|
2291 |
|
2292 | |
2293 |
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 |
|
2300 |
|
2301 | getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null,
|
2302 |
|
2303 | |
2304 |
|
2305 |
|
2306 | _isCustomAttributeFunctions: [],
|
2307 |
|
2308 | |
2309 |
|
2310 |
|
2311 |
|
2312 | isCustomAttribute: function (attributeName) {
|
2313 | for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
|
2314 | var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
|
2315 | if (isCustomAttributeFn(attributeName)) {
|
2316 | return true;
|
2317 | }
|
2318 | }
|
2319 | return false;
|
2320 | },
|
2321 |
|
2322 | injection: DOMPropertyInjection
|
2323 | };
|
2324 |
|
2325 | module.exports = DOMProperty;
|
2326 |
|
2327 | }),
|
2328 |
|
2329 | (function(module, exports, __webpack_require__) {
|
2330 |
|
2331 | "use strict";
|
2332 |
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 |
|
2340 |
|
2341 |
|
2342 | var _prodInvariant = __webpack_require__(2);
|
2343 |
|
2344 | var EventPluginRegistry = __webpack_require__(30);
|
2345 | var EventPluginUtils = __webpack_require__(31);
|
2346 | var ReactErrorUtils = __webpack_require__(36);
|
2347 |
|
2348 | var accumulateInto = __webpack_require__(66);
|
2349 | var forEachAccumulated = __webpack_require__(67);
|
2350 | var invariant = __webpack_require__(0);
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 | var listenerBank = {};
|
2356 |
|
2357 |
|
2358 |
|
2359 |
|
2360 |
|
2361 | var eventQueue = null;
|
2362 |
|
2363 |
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 |
|
2369 |
|
2370 | var executeDispatchesAndRelease = function (event, simulated) {
|
2371 | if (event) {
|
2372 | EventPluginUtils.executeDispatchesInOrder(event, simulated);
|
2373 |
|
2374 | if (!event.isPersistent()) {
|
2375 | event.constructor.release(event);
|
2376 | }
|
2377 | }
|
2378 | };
|
2379 | var executeDispatchesAndReleaseSimulated = function (e) {
|
2380 | return executeDispatchesAndRelease(e, true);
|
2381 | };
|
2382 | var executeDispatchesAndReleaseTopLevel = function (e) {
|
2383 | return executeDispatchesAndRelease(e, false);
|
2384 | };
|
2385 |
|
2386 | var getDictionaryKey = function (inst) {
|
2387 |
|
2388 |
|
2389 | return '.' + inst._rootNodeID;
|
2390 | };
|
2391 |
|
2392 | function isInteractive(tag) {
|
2393 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
2394 | }
|
2395 |
|
2396 | function shouldPreventMouseEvent(name, type, props) {
|
2397 | switch (name) {
|
2398 | case 'onClick':
|
2399 | case 'onClickCapture':
|
2400 | case 'onDoubleClick':
|
2401 | case 'onDoubleClickCapture':
|
2402 | case 'onMouseDown':
|
2403 | case 'onMouseDownCapture':
|
2404 | case 'onMouseMove':
|
2405 | case 'onMouseMoveCapture':
|
2406 | case 'onMouseUp':
|
2407 | case 'onMouseUpCapture':
|
2408 | return !!(props.disabled && isInteractive(type));
|
2409 | default:
|
2410 | return false;
|
2411 | }
|
2412 | }
|
2413 |
|
2414 |
|
2415 |
|
2416 |
|
2417 |
|
2418 |
|
2419 |
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 |
|
2425 |
|
2426 |
|
2427 |
|
2428 |
|
2429 |
|
2430 |
|
2431 |
|
2432 |
|
2433 |
|
2434 |
|
2435 |
|
2436 | var EventPluginHub = {
|
2437 | |
2438 |
|
2439 |
|
2440 | injection: {
|
2441 | |
2442 |
|
2443 |
|
2444 |
|
2445 | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
|
2446 |
|
2447 | |
2448 |
|
2449 |
|
2450 | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
|
2451 | },
|
2452 |
|
2453 | |
2454 |
|
2455 |
|
2456 |
|
2457 |
|
2458 |
|
2459 |
|
2460 | putListener: function (inst, registrationName, listener) {
|
2461 | !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
|
2462 |
|
2463 | var key = getDictionaryKey(inst);
|
2464 | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
2465 | bankForRegistrationName[key] = listener;
|
2466 |
|
2467 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2468 | if (PluginModule && PluginModule.didPutListener) {
|
2469 | PluginModule.didPutListener(inst, registrationName, listener);
|
2470 | }
|
2471 | },
|
2472 |
|
2473 | |
2474 |
|
2475 |
|
2476 |
|
2477 |
|
2478 | getListener: function (inst, registrationName) {
|
2479 |
|
2480 |
|
2481 | var bankForRegistrationName = listenerBank[registrationName];
|
2482 | if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
|
2483 | return null;
|
2484 | }
|
2485 | var key = getDictionaryKey(inst);
|
2486 | return bankForRegistrationName && bankForRegistrationName[key];
|
2487 | },
|
2488 |
|
2489 | |
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 | deleteListener: function (inst, registrationName) {
|
2496 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2497 | if (PluginModule && PluginModule.willDeleteListener) {
|
2498 | PluginModule.willDeleteListener(inst, registrationName);
|
2499 | }
|
2500 |
|
2501 | var bankForRegistrationName = listenerBank[registrationName];
|
2502 |
|
2503 | if (bankForRegistrationName) {
|
2504 | var key = getDictionaryKey(inst);
|
2505 | delete bankForRegistrationName[key];
|
2506 | }
|
2507 | },
|
2508 |
|
2509 | |
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 | deleteAllListeners: function (inst) {
|
2515 | var key = getDictionaryKey(inst);
|
2516 | for (var registrationName in listenerBank) {
|
2517 | if (!listenerBank.hasOwnProperty(registrationName)) {
|
2518 | continue;
|
2519 | }
|
2520 |
|
2521 | if (!listenerBank[registrationName][key]) {
|
2522 | continue;
|
2523 | }
|
2524 |
|
2525 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2526 | if (PluginModule && PluginModule.willDeleteListener) {
|
2527 | PluginModule.willDeleteListener(inst, registrationName);
|
2528 | }
|
2529 |
|
2530 | delete listenerBank[registrationName][key];
|
2531 | }
|
2532 | },
|
2533 |
|
2534 | |
2535 |
|
2536 |
|
2537 |
|
2538 |
|
2539 |
|
2540 |
|
2541 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
2542 | var events;
|
2543 | var plugins = EventPluginRegistry.plugins;
|
2544 | for (var i = 0; i < plugins.length; i++) {
|
2545 |
|
2546 | var possiblePlugin = plugins[i];
|
2547 | if (possiblePlugin) {
|
2548 | var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
2549 | if (extractedEvents) {
|
2550 | events = accumulateInto(events, extractedEvents);
|
2551 | }
|
2552 | }
|
2553 | }
|
2554 | return events;
|
2555 | },
|
2556 |
|
2557 | |
2558 |
|
2559 |
|
2560 |
|
2561 |
|
2562 |
|
2563 |
|
2564 | enqueueEvents: function (events) {
|
2565 | if (events) {
|
2566 | eventQueue = accumulateInto(eventQueue, events);
|
2567 | }
|
2568 | },
|
2569 |
|
2570 | |
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 | processEventQueue: function (simulated) {
|
2576 |
|
2577 |
|
2578 | var processingEventQueue = eventQueue;
|
2579 | eventQueue = null;
|
2580 | if (simulated) {
|
2581 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
2582 | } else {
|
2583 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
2584 | }
|
2585 | !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : _prodInvariant('95') : void 0;
|
2586 |
|
2587 | ReactErrorUtils.rethrowCaughtError();
|
2588 | },
|
2589 |
|
2590 | |
2591 |
|
2592 |
|
2593 | __purge: function () {
|
2594 | listenerBank = {};
|
2595 | },
|
2596 |
|
2597 | __getListenerBank: function () {
|
2598 | return listenerBank;
|
2599 | }
|
2600 | };
|
2601 |
|
2602 | module.exports = EventPluginHub;
|
2603 |
|
2604 | }),
|
2605 |
|
2606 | (function(module, exports, __webpack_require__) {
|
2607 |
|
2608 | "use strict";
|
2609 |
|
2610 |
|
2611 |
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 | var EventPluginHub = __webpack_require__(17);
|
2620 | var EventPluginUtils = __webpack_require__(31);
|
2621 |
|
2622 | var accumulateInto = __webpack_require__(66);
|
2623 | var forEachAccumulated = __webpack_require__(67);
|
2624 | var warning = __webpack_require__(1);
|
2625 |
|
2626 | var getListener = EventPluginHub.getListener;
|
2627 |
|
2628 |
|
2629 |
|
2630 |
|
2631 |
|
2632 | function listenerAtPhase(inst, event, propagationPhase) {
|
2633 | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
2634 | return getListener(inst, registrationName);
|
2635 | }
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 | function accumulateDirectionalDispatches(inst, phase, event) {
|
2644 | if (process.env.NODE_ENV !== 'production') {
|
2645 | process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
2646 | }
|
2647 | var listener = listenerAtPhase(inst, event, phase);
|
2648 | if (listener) {
|
2649 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
2650 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
2651 | }
|
2652 | }
|
2653 |
|
2654 |
|
2655 |
|
2656 |
|
2657 |
|
2658 |
|
2659 |
|
2660 |
|
2661 | function accumulateTwoPhaseDispatchesSingle(event) {
|
2662 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
2663 | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
2664 | }
|
2665 | }
|
2666 |
|
2667 |
|
2668 |
|
2669 |
|
2670 | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
2671 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
2672 | var targetInst = event._targetInst;
|
2673 | var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
2674 | EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
2675 | }
|
2676 | }
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 |
|
2683 | function accumulateDispatches(inst, ignoredDirection, event) {
|
2684 | if (event && event.dispatchConfig.registrationName) {
|
2685 | var registrationName = event.dispatchConfig.registrationName;
|
2686 | var listener = getListener(inst, registrationName);
|
2687 | if (listener) {
|
2688 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
2689 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
2690 | }
|
2691 | }
|
2692 | }
|
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 | function accumulateDirectDispatchesSingle(event) {
|
2700 | if (event && event.dispatchConfig.registrationName) {
|
2701 | accumulateDispatches(event._targetInst, null, event);
|
2702 | }
|
2703 | }
|
2704 |
|
2705 | function accumulateTwoPhaseDispatches(events) {
|
2706 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
2707 | }
|
2708 |
|
2709 | function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
2710 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
2711 | }
|
2712 |
|
2713 | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
2714 | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
2715 | }
|
2716 |
|
2717 | function accumulateDirectDispatches(events) {
|
2718 | forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
2719 | }
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 |
|
2729 |
|
2730 |
|
2731 |
|
2732 | var EventPropagators = {
|
2733 | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
|
2734 | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
|
2735 | accumulateDirectDispatches: accumulateDirectDispatches,
|
2736 | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
|
2737 | };
|
2738 |
|
2739 | module.exports = EventPropagators;
|
2740 |
|
2741 | }),
|
2742 |
|
2743 | (function(module, exports, __webpack_require__) {
|
2744 |
|
2745 | "use strict";
|
2746 |
|
2747 |
|
2748 |
|
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 |
|
2755 |
|
2756 | var ReactRef = __webpack_require__(160);
|
2757 | var ReactInstrumentation = __webpack_require__(6);
|
2758 |
|
2759 | var warning = __webpack_require__(1);
|
2760 |
|
2761 |
|
2762 |
|
2763 |
|
2764 |
|
2765 | function attachRefs() {
|
2766 | ReactRef.attachRefs(this, this._currentElement);
|
2767 | }
|
2768 |
|
2769 | var ReactReconciler = {
|
2770 | |
2771 |
|
2772 |
|
2773 |
|
2774 |
|
2775 |
|
2776 |
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
|
2782 | {
|
2783 | if (process.env.NODE_ENV !== 'production') {
|
2784 | if (internalInstance._debugID !== 0) {
|
2785 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
|
2786 | }
|
2787 | }
|
2788 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
2789 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
2790 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
2791 | }
|
2792 | if (process.env.NODE_ENV !== 'production') {
|
2793 | if (internalInstance._debugID !== 0) {
|
2794 | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
|
2795 | }
|
2796 | }
|
2797 | return markup;
|
2798 | },
|
2799 |
|
2800 | |
2801 |
|
2802 |
|
2803 |
|
2804 | getHostNode: function (internalInstance) {
|
2805 | return internalInstance.getHostNode();
|
2806 | },
|
2807 |
|
2808 | |
2809 |
|
2810 |
|
2811 |
|
2812 |
|
2813 |
|
2814 | unmountComponent: function (internalInstance, safely) {
|
2815 | if (process.env.NODE_ENV !== 'production') {
|
2816 | if (internalInstance._debugID !== 0) {
|
2817 | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
|
2818 | }
|
2819 | }
|
2820 | ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
|
2821 | internalInstance.unmountComponent(safely);
|
2822 | if (process.env.NODE_ENV !== 'production') {
|
2823 | if (internalInstance._debugID !== 0) {
|
2824 | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
|
2825 | }
|
2826 | }
|
2827 | },
|
2828 |
|
2829 | |
2830 |
|
2831 |
|
2832 |
|
2833 |
|
2834 |
|
2835 |
|
2836 |
|
2837 |
|
2838 | receiveComponent: function (internalInstance, nextElement, transaction, context) {
|
2839 | var prevElement = internalInstance._currentElement;
|
2840 |
|
2841 | if (nextElement === prevElement && context === internalInstance._context) {
|
2842 |
|
2843 |
|
2844 |
|
2845 |
|
2846 |
|
2847 |
|
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 | return;
|
2853 | }
|
2854 |
|
2855 | if (process.env.NODE_ENV !== 'production') {
|
2856 | if (internalInstance._debugID !== 0) {
|
2857 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
|
2858 | }
|
2859 | }
|
2860 |
|
2861 | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
|
2862 |
|
2863 | if (refsChanged) {
|
2864 | ReactRef.detachRefs(internalInstance, prevElement);
|
2865 | }
|
2866 |
|
2867 | internalInstance.receiveComponent(nextElement, transaction, context);
|
2868 |
|
2869 | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
2870 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
2871 | }
|
2872 |
|
2873 | if (process.env.NODE_ENV !== 'production') {
|
2874 | if (internalInstance._debugID !== 0) {
|
2875 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
2876 | }
|
2877 | }
|
2878 | },
|
2879 |
|
2880 | |
2881 |
|
2882 |
|
2883 |
|
2884 |
|
2885 |
|
2886 |
|
2887 | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
|
2888 | if (internalInstance._updateBatchNumber !== updateBatchNumber) {
|
2889 |
|
2890 |
|
2891 | process.env.NODE_ENV !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
|
2892 | return;
|
2893 | }
|
2894 | if (process.env.NODE_ENV !== 'production') {
|
2895 | if (internalInstance._debugID !== 0) {
|
2896 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
|
2897 | }
|
2898 | }
|
2899 | internalInstance.performUpdateIfNecessary(transaction);
|
2900 | if (process.env.NODE_ENV !== 'production') {
|
2901 | if (internalInstance._debugID !== 0) {
|
2902 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
2903 | }
|
2904 | }
|
2905 | }
|
2906 | };
|
2907 |
|
2908 | module.exports = ReactReconciler;
|
2909 |
|
2910 | }),
|
2911 |
|
2912 | (function(module, exports, __webpack_require__) {
|
2913 |
|
2914 | "use strict";
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 |
|
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 | var SyntheticEvent = __webpack_require__(10);
|
2926 |
|
2927 | var getEventTarget = __webpack_require__(41);
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 | var UIEventInterface = {
|
2934 | view: function (event) {
|
2935 | if (event.view) {
|
2936 | return event.view;
|
2937 | }
|
2938 |
|
2939 | var target = getEventTarget(event);
|
2940 | if (target.window === target) {
|
2941 |
|
2942 | return target;
|
2943 | }
|
2944 |
|
2945 | var doc = target.ownerDocument;
|
2946 |
|
2947 | if (doc) {
|
2948 | return doc.defaultView || doc.parentWindow;
|
2949 | } else {
|
2950 | return window;
|
2951 | }
|
2952 | },
|
2953 | detail: function (event) {
|
2954 | return event.detail || 0;
|
2955 | }
|
2956 | };
|
2957 |
|
2958 |
|
2959 |
|
2960 |
|
2961 |
|
2962 |
|
2963 |
|
2964 | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
2965 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
2966 | }
|
2967 |
|
2968 | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
|
2969 |
|
2970 | module.exports = SyntheticUIEvent;
|
2971 |
|
2972 | }),
|
2973 |
|
2974 | (function(module, exports, __webpack_require__) {
|
2975 |
|
2976 | "use strict";
|
2977 |
|
2978 |
|
2979 |
|
2980 |
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 | var _assign = __webpack_require__(3);
|
2988 |
|
2989 | var ReactBaseClasses = __webpack_require__(75);
|
2990 | var ReactChildren = __webpack_require__(190);
|
2991 | var ReactDOMFactories = __webpack_require__(191);
|
2992 | var ReactElement = __webpack_require__(13);
|
2993 | var ReactPropTypes = __webpack_require__(193);
|
2994 | var ReactVersion = __webpack_require__(195);
|
2995 |
|
2996 | var createReactClass = __webpack_require__(197);
|
2997 | var onlyChild = __webpack_require__(199);
|
2998 |
|
2999 | var createElement = ReactElement.createElement;
|
3000 | var createFactory = ReactElement.createFactory;
|
3001 | var cloneElement = ReactElement.cloneElement;
|
3002 |
|
3003 | if (process.env.NODE_ENV !== 'production') {
|
3004 | var lowPriorityWarning = __webpack_require__(45);
|
3005 | var canDefineProperty = __webpack_require__(26);
|
3006 | var ReactElementValidator = __webpack_require__(77);
|
3007 | var didWarnPropTypesDeprecated = false;
|
3008 | createElement = ReactElementValidator.createElement;
|
3009 | createFactory = ReactElementValidator.createFactory;
|
3010 | cloneElement = ReactElementValidator.cloneElement;
|
3011 | }
|
3012 |
|
3013 | var __spread = _assign;
|
3014 | var createMixin = function (mixin) {
|
3015 | return mixin;
|
3016 | };
|
3017 |
|
3018 | if (process.env.NODE_ENV !== 'production') {
|
3019 | var warnedForSpread = false;
|
3020 | var warnedForCreateMixin = false;
|
3021 | __spread = function () {
|
3022 | lowPriorityWarning(warnedForSpread, 'React.__spread is deprecated and should not be used. Use ' + 'Object.assign directly or another helper function with similar ' + 'semantics. You may be seeing this warning due to your compiler. ' + 'See https://fb.me/react-spread-deprecation for more details.');
|
3023 | warnedForSpread = true;
|
3024 | return _assign.apply(null, arguments);
|
3025 | };
|
3026 |
|
3027 | createMixin = function (mixin) {
|
3028 | lowPriorityWarning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. ' + 'In React v16.0, it will be removed. ' + 'You can use this mixin directly instead. ' + 'See https://fb.me/createmixin-was-never-implemented for more info.');
|
3029 | warnedForCreateMixin = true;
|
3030 | return mixin;
|
3031 | };
|
3032 | }
|
3033 |
|
3034 | var React = {
|
3035 |
|
3036 |
|
3037 | Children: {
|
3038 | map: ReactChildren.map,
|
3039 | forEach: ReactChildren.forEach,
|
3040 | count: ReactChildren.count,
|
3041 | toArray: ReactChildren.toArray,
|
3042 | only: onlyChild
|
3043 | },
|
3044 |
|
3045 | Component: ReactBaseClasses.Component,
|
3046 | PureComponent: ReactBaseClasses.PureComponent,
|
3047 |
|
3048 | createElement: createElement,
|
3049 | cloneElement: cloneElement,
|
3050 | isValidElement: ReactElement.isValidElement,
|
3051 |
|
3052 |
|
3053 |
|
3054 | PropTypes: ReactPropTypes,
|
3055 | createClass: createReactClass,
|
3056 | createFactory: createFactory,
|
3057 | createMixin: createMixin,
|
3058 |
|
3059 |
|
3060 |
|
3061 | DOM: ReactDOMFactories,
|
3062 |
|
3063 | version: ReactVersion,
|
3064 |
|
3065 |
|
3066 | __spread: __spread
|
3067 | };
|
3068 |
|
3069 | if (process.env.NODE_ENV !== 'production') {
|
3070 | var warnedForCreateClass = false;
|
3071 | if (canDefineProperty) {
|
3072 | Object.defineProperty(React, 'PropTypes', {
|
3073 | get: function () {
|
3074 | lowPriorityWarning(didWarnPropTypesDeprecated, 'Accessing PropTypes via the main React package is deprecated,' + ' and will be removed in React v16.0.' + ' Use the latest available v15.* prop-types package from npm instead.' + ' For info on usage, compatibility, migration and more, see ' + 'https://fb.me/prop-types-docs');
|
3075 | didWarnPropTypesDeprecated = true;
|
3076 | return ReactPropTypes;
|
3077 | }
|
3078 | });
|
3079 |
|
3080 | Object.defineProperty(React, 'createClass', {
|
3081 | get: function () {
|
3082 | lowPriorityWarning(warnedForCreateClass, 'Accessing createClass via the main React package is deprecated,' + ' and will be removed in React v16.0.' + " Use a plain JavaScript class instead. If you're not yet " + 'ready to migrate, create-react-class v15.* is available ' + 'on npm as a temporary, drop-in replacement. ' + 'For more info see https://fb.me/react-create-class');
|
3083 | warnedForCreateClass = true;
|
3084 | return createReactClass;
|
3085 | }
|
3086 | });
|
3087 | }
|
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 | React.DOM = {};
|
3093 | var warnedForFactories = false;
|
3094 | Object.keys(ReactDOMFactories).forEach(function (factory) {
|
3095 | React.DOM[factory] = function () {
|
3096 | if (!warnedForFactories) {
|
3097 | lowPriorityWarning(false, 'Accessing factories like React.DOM.%s has been deprecated ' + 'and will be removed in v16.0+. Use the ' + 'react-dom-factories package instead. ' + ' Version 1.0 provides a drop-in replacement.' + ' For more info, see https://fb.me/react-dom-factories', factory);
|
3098 | warnedForFactories = true;
|
3099 | }
|
3100 | return ReactDOMFactories[factory].apply(ReactDOMFactories, arguments);
|
3101 | };
|
3102 | });
|
3103 | }
|
3104 |
|
3105 | module.exports = React;
|
3106 |
|
3107 | }),
|
3108 |
|
3109 | (function(module, exports, __webpack_require__) {
|
3110 |
|
3111 | "use strict";
|
3112 |
|
3113 |
|
3114 |
|
3115 |
|
3116 |
|
3117 |
|
3118 |
|
3119 |
|
3120 |
|
3121 |
|
3122 | var emptyObject = {};
|
3123 |
|
3124 | if (process.env.NODE_ENV !== 'production') {
|
3125 | Object.freeze(emptyObject);
|
3126 | }
|
3127 |
|
3128 | module.exports = emptyObject;
|
3129 |
|
3130 | }),
|
3131 |
|
3132 | (function(module, exports, __webpack_require__) {
|
3133 |
|
3134 | "use strict";
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 | var SyntheticUIEvent = __webpack_require__(20);
|
3146 | var ViewportMetrics = __webpack_require__(65);
|
3147 |
|
3148 | var getEventModifierState = __webpack_require__(40);
|
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 | var MouseEventInterface = {
|
3155 | screenX: null,
|
3156 | screenY: null,
|
3157 | clientX: null,
|
3158 | clientY: null,
|
3159 | ctrlKey: null,
|
3160 | shiftKey: null,
|
3161 | altKey: null,
|
3162 | metaKey: null,
|
3163 | getModifierState: getEventModifierState,
|
3164 | button: function (event) {
|
3165 |
|
3166 |
|
3167 |
|
3168 | var button = event.button;
|
3169 | if ('which' in event) {
|
3170 | return button;
|
3171 | }
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 | return button === 2 ? 2 : button === 4 ? 1 : 0;
|
3177 | },
|
3178 | buttons: null,
|
3179 | relatedTarget: function (event) {
|
3180 | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
3181 | },
|
3182 |
|
3183 | pageX: function (event) {
|
3184 | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
|
3185 | },
|
3186 | pageY: function (event) {
|
3187 | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
|
3188 | }
|
3189 | };
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
3198 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
3199 | }
|
3200 |
|
3201 | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
|
3202 |
|
3203 | module.exports = SyntheticMouseEvent;
|
3204 |
|
3205 | }),
|
3206 |
|
3207 | (function(module, exports, __webpack_require__) {
|
3208 |
|
3209 | "use strict";
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 | var _prodInvariant = __webpack_require__(2);
|
3222 |
|
3223 | var invariant = __webpack_require__(0);
|
3224 |
|
3225 | var OBSERVED_ERROR = {};
|
3226 |
|
3227 |
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 |
|
3245 |
|
3246 |
|
3247 |
|
3248 |
|
3249 |
|
3250 |
|
3251 |
|
3252 |
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 |
|
3261 |
|
3262 |
|
3263 |
|
3264 |
|
3265 |
|
3266 |
|
3267 |
|
3268 |
|
3269 |
|
3270 |
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 |
|
3277 |
|
3278 |
|
3279 |
|
3280 |
|
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 |
|
3286 |
|
3287 |
|
3288 | var TransactionImpl = {
|
3289 | |
3290 |
|
3291 |
|
3292 |
|
3293 |
|
3294 |
|
3295 |
|
3296 | reinitializeTransaction: function () {
|
3297 | this.transactionWrappers = this.getTransactionWrappers();
|
3298 | if (this.wrapperInitData) {
|
3299 | this.wrapperInitData.length = 0;
|
3300 | } else {
|
3301 | this.wrapperInitData = [];
|
3302 | }
|
3303 | this._isInTransaction = false;
|
3304 | },
|
3305 |
|
3306 | _isInTransaction: false,
|
3307 |
|
3308 | |
3309 |
|
3310 |
|
3311 |
|
3312 | getTransactionWrappers: null,
|
3313 |
|
3314 | isInTransaction: function () {
|
3315 | return !!this._isInTransaction;
|
3316 | },
|
3317 |
|
3318 |
|
3319 |
|
3320 | |
3321 |
|
3322 |
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 |
|
3334 |
|
3335 |
|
3336 |
|
3337 | perform: function (method, scope, a, b, c, d, e, f) {
|
3338 |
|
3339 | !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
3340 | var errorThrown;
|
3341 | var ret;
|
3342 | try {
|
3343 | this._isInTransaction = true;
|
3344 |
|
3345 |
|
3346 |
|
3347 |
|
3348 | errorThrown = true;
|
3349 | this.initializeAll(0);
|
3350 | ret = method.call(scope, a, b, c, d, e, f);
|
3351 | errorThrown = false;
|
3352 | } finally {
|
3353 | try {
|
3354 | if (errorThrown) {
|
3355 |
|
3356 |
|
3357 | try {
|
3358 | this.closeAll(0);
|
3359 | } catch (err) {}
|
3360 | } else {
|
3361 |
|
3362 |
|
3363 | this.closeAll(0);
|
3364 | }
|
3365 | } finally {
|
3366 | this._isInTransaction = false;
|
3367 | }
|
3368 | }
|
3369 | return ret;
|
3370 | },
|
3371 |
|
3372 | initializeAll: function (startIndex) {
|
3373 | var transactionWrappers = this.transactionWrappers;
|
3374 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
3375 | var wrapper = transactionWrappers[i];
|
3376 | try {
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 | this.wrapperInitData[i] = OBSERVED_ERROR;
|
3382 | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
|
3383 | } finally {
|
3384 | if (this.wrapperInitData[i] === OBSERVED_ERROR) {
|
3385 |
|
3386 |
|
3387 |
|
3388 | try {
|
3389 | this.initializeAll(i + 1);
|
3390 | } catch (err) {}
|
3391 | }
|
3392 | }
|
3393 | }
|
3394 | },
|
3395 |
|
3396 | |
3397 |
|
3398 |
|
3399 |
|
3400 |
|
3401 |
|
3402 | closeAll: function (startIndex) {
|
3403 | !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
|
3404 | var transactionWrappers = this.transactionWrappers;
|
3405 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
3406 | var wrapper = transactionWrappers[i];
|
3407 | var initData = this.wrapperInitData[i];
|
3408 | var errorThrown;
|
3409 | try {
|
3410 |
|
3411 |
|
3412 |
|
3413 |
|
3414 | errorThrown = true;
|
3415 | if (initData !== OBSERVED_ERROR && wrapper.close) {
|
3416 | wrapper.close.call(this, initData);
|
3417 | }
|
3418 | errorThrown = false;
|
3419 | } finally {
|
3420 | if (errorThrown) {
|
3421 |
|
3422 |
|
3423 |
|
3424 | try {
|
3425 | this.closeAll(i + 1);
|
3426 | } catch (e) {}
|
3427 | }
|
3428 | }
|
3429 | }
|
3430 | this.wrapperInitData.length = 0;
|
3431 | }
|
3432 | };
|
3433 |
|
3434 | module.exports = TransactionImpl;
|
3435 |
|
3436 | }),
|
3437 |
|
3438 | (function(module, exports, __webpack_require__) {
|
3439 |
|
3440 | "use strict";
|
3441 |
|
3442 |
|
3443 |
|
3444 |
|
3445 |
|
3446 |
|
3447 |
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 |
|
3453 |
|
3454 |
|
3455 |
|
3456 |
|
3457 |
|
3458 |
|
3459 |
|
3460 |
|
3461 |
|
3462 |
|
3463 |
|
3464 |
|
3465 |
|
3466 |
|
3467 |
|
3468 |
|
3469 |
|
3470 |
|
3471 |
|
3472 |
|
3473 |
|
3474 |
|
3475 |
|
3476 |
|
3477 |
|
3478 |
|
3479 |
|
3480 |
|
3481 |
|
3482 | var matchHtmlRegExp = /["'&<>]/;
|
3483 |
|
3484 |
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 |
|
3490 |
|
3491 |
|
3492 | function escapeHtml(string) {
|
3493 | var str = '' + string;
|
3494 | var match = matchHtmlRegExp.exec(str);
|
3495 |
|
3496 | if (!match) {
|
3497 | return str;
|
3498 | }
|
3499 |
|
3500 | var escape;
|
3501 | var html = '';
|
3502 | var index = 0;
|
3503 | var lastIndex = 0;
|
3504 |
|
3505 | for (index = match.index; index < str.length; index++) {
|
3506 | switch (str.charCodeAt(index)) {
|
3507 | case 34:
|
3508 |
|
3509 | escape = '"';
|
3510 | break;
|
3511 | case 38:
|
3512 |
|
3513 | escape = '&';
|
3514 | break;
|
3515 | case 39:
|
3516 |
|
3517 | escape = ''';
|
3518 | break;
|
3519 | case 60:
|
3520 |
|
3521 | escape = '<';
|
3522 | break;
|
3523 | case 62:
|
3524 |
|
3525 | escape = '>';
|
3526 | break;
|
3527 | default:
|
3528 | continue;
|
3529 | }
|
3530 |
|
3531 | if (lastIndex !== index) {
|
3532 | html += str.substring(lastIndex, index);
|
3533 | }
|
3534 |
|
3535 | lastIndex = index + 1;
|
3536 | html += escape;
|
3537 | }
|
3538 |
|
3539 | return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
3540 | }
|
3541 |
|
3542 |
|
3543 |
|
3544 |
|
3545 |
|
3546 |
|
3547 |
|
3548 |
|
3549 | function escapeTextContentForBrowser(text) {
|
3550 | if (typeof text === 'boolean' || typeof text === 'number') {
|
3551 |
|
3552 |
|
3553 |
|
3554 | return '' + text;
|
3555 | }
|
3556 | return escapeHtml(text);
|
3557 | }
|
3558 |
|
3559 | module.exports = escapeTextContentForBrowser;
|
3560 |
|
3561 | }),
|
3562 |
|
3563 | (function(module, exports, __webpack_require__) {
|
3564 |
|
3565 | "use strict";
|
3566 |
|
3567 |
|
3568 |
|
3569 |
|
3570 |
|
3571 |
|
3572 |
|
3573 |
|
3574 |
|
3575 |
|
3576 |
|
3577 | var canDefineProperty = false;
|
3578 | if (process.env.NODE_ENV !== 'production') {
|
3579 | try {
|
3580 |
|
3581 | Object.defineProperty({}, 'x', { get: function () {} });
|
3582 | canDefineProperty = true;
|
3583 | } catch (x) {
|
3584 |
|
3585 | }
|
3586 | }
|
3587 |
|
3588 | module.exports = canDefineProperty;
|
3589 |
|
3590 | }),
|
3591 |
|
3592 | (function(module, exports, __webpack_require__) {
|
3593 |
|
3594 | "use strict";
|
3595 |
|
3596 |
|
3597 |
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 |
|
3604 |
|
3605 |
|
3606 |
|
3607 |
|
3608 |
|
3609 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
3610 |
|
3611 |
|
3612 |
|
3613 |
|
3614 |
|
3615 | function is(x, y) {
|
3616 |
|
3617 | if (x === y) {
|
3618 |
|
3619 |
|
3620 |
|
3621 | return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
3622 | } else {
|
3623 |
|
3624 | return x !== x && y !== y;
|
3625 | }
|
3626 | }
|
3627 |
|
3628 |
|
3629 |
|
3630 |
|
3631 |
|
3632 |
|
3633 | function shallowEqual(objA, objB) {
|
3634 | if (is(objA, objB)) {
|
3635 | return true;
|
3636 | }
|
3637 |
|
3638 | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
3639 | return false;
|
3640 | }
|
3641 |
|
3642 | var keysA = Object.keys(objA);
|
3643 | var keysB = Object.keys(objB);
|
3644 |
|
3645 | if (keysA.length !== keysB.length) {
|
3646 | return false;
|
3647 | }
|
3648 |
|
3649 |
|
3650 | for (var i = 0; i < keysA.length; i++) {
|
3651 | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
3652 | return false;
|
3653 | }
|
3654 | }
|
3655 |
|
3656 | return true;
|
3657 | }
|
3658 |
|
3659 | module.exports = shallowEqual;
|
3660 |
|
3661 | }),
|
3662 |
|
3663 | (function(module, exports, __webpack_require__) {
|
3664 |
|
3665 | "use strict";
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 |
|
3673 |
|
3674 |
|
3675 |
|
3676 | var DOMLazyTree = __webpack_require__(15);
|
3677 | var Danger = __webpack_require__(126);
|
3678 | var ReactDOMComponentTree = __webpack_require__(4);
|
3679 | var ReactInstrumentation = __webpack_require__(6);
|
3680 |
|
3681 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
|
3682 | var setInnerHTML = __webpack_require__(43);
|
3683 | var setTextContent = __webpack_require__(72);
|
3684 |
|
3685 | function getNodeAfter(parentNode, node) {
|
3686 |
|
3687 |
|
3688 | if (Array.isArray(node)) {
|
3689 | node = node[1];
|
3690 | }
|
3691 | return node ? node.nextSibling : parentNode.firstChild;
|
3692 | }
|
3693 |
|
3694 |
|
3695 |
|
3696 |
|
3697 |
|
3698 |
|
3699 |
|
3700 |
|
3701 |
|
3702 | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
|
3703 |
|
3704 |
|
3705 |
|
3706 | parentNode.insertBefore(childNode, referenceNode);
|
3707 | });
|
3708 |
|
3709 | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
|
3710 | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
|
3711 | }
|
3712 |
|
3713 | function moveChild(parentNode, childNode, referenceNode) {
|
3714 | if (Array.isArray(childNode)) {
|
3715 | moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
|
3716 | } else {
|
3717 | insertChildAt(parentNode, childNode, referenceNode);
|
3718 | }
|
3719 | }
|
3720 |
|
3721 | function removeChild(parentNode, childNode) {
|
3722 | if (Array.isArray(childNode)) {
|
3723 | var closingComment = childNode[1];
|
3724 | childNode = childNode[0];
|
3725 | removeDelimitedText(parentNode, childNode, closingComment);
|
3726 | parentNode.removeChild(closingComment);
|
3727 | }
|
3728 | parentNode.removeChild(childNode);
|
3729 | }
|
3730 |
|
3731 | function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
|
3732 | var node = openingComment;
|
3733 | while (true) {
|
3734 | var nextNode = node.nextSibling;
|
3735 | insertChildAt(parentNode, node, referenceNode);
|
3736 | if (node === closingComment) {
|
3737 | break;
|
3738 | }
|
3739 | node = nextNode;
|
3740 | }
|
3741 | }
|
3742 |
|
3743 | function removeDelimitedText(parentNode, startNode, closingComment) {
|
3744 | while (true) {
|
3745 | var node = startNode.nextSibling;
|
3746 | if (node === closingComment) {
|
3747 |
|
3748 | break;
|
3749 | } else {
|
3750 | parentNode.removeChild(node);
|
3751 | }
|
3752 | }
|
3753 | }
|
3754 |
|
3755 | function replaceDelimitedText(openingComment, closingComment, stringText) {
|
3756 | var parentNode = openingComment.parentNode;
|
3757 | var nodeAfterComment = openingComment.nextSibling;
|
3758 | if (nodeAfterComment === closingComment) {
|
3759 |
|
3760 |
|
3761 | if (stringText) {
|
3762 | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
|
3763 | }
|
3764 | } else {
|
3765 | if (stringText) {
|
3766 |
|
3767 |
|
3768 | setTextContent(nodeAfterComment, stringText);
|
3769 | removeDelimitedText(parentNode, nodeAfterComment, closingComment);
|
3770 | } else {
|
3771 | removeDelimitedText(parentNode, openingComment, closingComment);
|
3772 | }
|
3773 | }
|
3774 |
|
3775 | if (process.env.NODE_ENV !== 'production') {
|
3776 | ReactInstrumentation.debugTool.onHostOperation({
|
3777 | instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
|
3778 | type: 'replace text',
|
3779 | payload: stringText
|
3780 | });
|
3781 | }
|
3782 | }
|
3783 |
|
3784 | var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
|
3785 | if (process.env.NODE_ENV !== 'production') {
|
3786 | dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
|
3787 | Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
|
3788 | if (prevInstance._debugID !== 0) {
|
3789 | ReactInstrumentation.debugTool.onHostOperation({
|
3790 | instanceID: prevInstance._debugID,
|
3791 | type: 'replace with',
|
3792 | payload: markup.toString()
|
3793 | });
|
3794 | } else {
|
3795 | var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
|
3796 | if (nextInstance._debugID !== 0) {
|
3797 | ReactInstrumentation.debugTool.onHostOperation({
|
3798 | instanceID: nextInstance._debugID,
|
3799 | type: 'mount',
|
3800 | payload: markup.toString()
|
3801 | });
|
3802 | }
|
3803 | }
|
3804 | };
|
3805 | }
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 | var DOMChildrenOperations = {
|
3811 | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
|
3812 |
|
3813 | replaceDelimitedText: replaceDelimitedText,
|
3814 |
|
3815 | |
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 |
|
3822 | processUpdates: function (parentNode, updates) {
|
3823 | if (process.env.NODE_ENV !== 'production') {
|
3824 | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
|
3825 | }
|
3826 |
|
3827 | for (var k = 0; k < updates.length; k++) {
|
3828 | var update = updates[k];
|
3829 | switch (update.type) {
|
3830 | case 'INSERT_MARKUP':
|
3831 | insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
|
3832 | if (process.env.NODE_ENV !== 'production') {
|
3833 | ReactInstrumentation.debugTool.onHostOperation({
|
3834 | instanceID: parentNodeDebugID,
|
3835 | type: 'insert child',
|
3836 | payload: {
|
3837 | toIndex: update.toIndex,
|
3838 | content: update.content.toString()
|
3839 | }
|
3840 | });
|
3841 | }
|
3842 | break;
|
3843 | case 'MOVE_EXISTING':
|
3844 | moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
|
3845 | if (process.env.NODE_ENV !== 'production') {
|
3846 | ReactInstrumentation.debugTool.onHostOperation({
|
3847 | instanceID: parentNodeDebugID,
|
3848 | type: 'move child',
|
3849 | payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
|
3850 | });
|
3851 | }
|
3852 | break;
|
3853 | case 'SET_MARKUP':
|
3854 | setInnerHTML(parentNode, update.content);
|
3855 | if (process.env.NODE_ENV !== 'production') {
|
3856 | ReactInstrumentation.debugTool.onHostOperation({
|
3857 | instanceID: parentNodeDebugID,
|
3858 | type: 'replace children',
|
3859 | payload: update.content.toString()
|
3860 | });
|
3861 | }
|
3862 | break;
|
3863 | case 'TEXT_CONTENT':
|
3864 | setTextContent(parentNode, update.content);
|
3865 | if (process.env.NODE_ENV !== 'production') {
|
3866 | ReactInstrumentation.debugTool.onHostOperation({
|
3867 | instanceID: parentNodeDebugID,
|
3868 | type: 'replace text',
|
3869 | payload: update.content.toString()
|
3870 | });
|
3871 | }
|
3872 | break;
|
3873 | case 'REMOVE_NODE':
|
3874 | removeChild(parentNode, update.fromNode);
|
3875 | if (process.env.NODE_ENV !== 'production') {
|
3876 | ReactInstrumentation.debugTool.onHostOperation({
|
3877 | instanceID: parentNodeDebugID,
|
3878 | type: 'remove child',
|
3879 | payload: { fromIndex: update.fromIndex }
|
3880 | });
|
3881 | }
|
3882 | break;
|
3883 | }
|
3884 | }
|
3885 | }
|
3886 | };
|
3887 |
|
3888 | module.exports = DOMChildrenOperations;
|
3889 |
|
3890 | }),
|
3891 |
|
3892 | (function(module, exports, __webpack_require__) {
|
3893 |
|
3894 | "use strict";
|
3895 |
|
3896 |
|
3897 |
|
3898 |
|
3899 |
|
3900 |
|
3901 |
|
3902 |
|
3903 |
|
3904 |
|
3905 | var DOMNamespaces = {
|
3906 | html: 'http://www.w3.org/1999/xhtml',
|
3907 | mathml: 'http://www.w3.org/1998/Math/MathML',
|
3908 | svg: 'http://www.w3.org/2000/svg'
|
3909 | };
|
3910 |
|
3911 | module.exports = DOMNamespaces;
|
3912 |
|
3913 | }),
|
3914 |
|
3915 | (function(module, exports, __webpack_require__) {
|
3916 |
|
3917 | "use strict";
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 | var _prodInvariant = __webpack_require__(2);
|
3930 |
|
3931 | var invariant = __webpack_require__(0);
|
3932 |
|
3933 |
|
3934 |
|
3935 |
|
3936 | var eventPluginOrder = null;
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 | var namesToPlugins = {};
|
3942 |
|
3943 |
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 | function recomputePluginOrdering() {
|
3949 | if (!eventPluginOrder) {
|
3950 |
|
3951 | return;
|
3952 | }
|
3953 | for (var pluginName in namesToPlugins) {
|
3954 | var pluginModule = namesToPlugins[pluginName];
|
3955 | var pluginIndex = eventPluginOrder.indexOf(pluginName);
|
3956 | !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
|
3957 | if (EventPluginRegistry.plugins[pluginIndex]) {
|
3958 | continue;
|
3959 | }
|
3960 | !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
|
3961 | EventPluginRegistry.plugins[pluginIndex] = pluginModule;
|
3962 | var publishedEvents = pluginModule.eventTypes;
|
3963 | for (var eventName in publishedEvents) {
|
3964 | !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
|
3965 | }
|
3966 | }
|
3967 | }
|
3968 |
|
3969 |
|
3970 |
|
3971 |
|
3972 |
|
3973 |
|
3974 |
|
3975 |
|
3976 |
|
3977 | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
|
3978 | !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
|
3979 | EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
|
3980 |
|
3981 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
3982 | if (phasedRegistrationNames) {
|
3983 | for (var phaseName in phasedRegistrationNames) {
|
3984 | if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
|
3985 | var phasedRegistrationName = phasedRegistrationNames[phaseName];
|
3986 | publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
|
3987 | }
|
3988 | }
|
3989 | return true;
|
3990 | } else if (dispatchConfig.registrationName) {
|
3991 | publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
|
3992 | return true;
|
3993 | }
|
3994 | return false;
|
3995 | }
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 | function publishRegistrationName(registrationName, pluginModule, eventName) {
|
4006 | !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
|
4007 | EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
|
4008 | EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
|
4009 |
|
4010 | if (process.env.NODE_ENV !== 'production') {
|
4011 | var lowerCasedName = registrationName.toLowerCase();
|
4012 | EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
|
4013 |
|
4014 | if (registrationName === 'onDoubleClick') {
|
4015 | EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
|
4016 | }
|
4017 | }
|
4018 | }
|
4019 |
|
4020 |
|
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 | var EventPluginRegistry = {
|
4026 | |
4027 |
|
4028 |
|
4029 | plugins: [],
|
4030 |
|
4031 | |
4032 |
|
4033 |
|
4034 | eventNameDispatchConfigs: {},
|
4035 |
|
4036 | |
4037 |
|
4038 |
|
4039 | registrationNameModules: {},
|
4040 |
|
4041 | |
4042 |
|
4043 |
|
4044 | registrationNameDependencies: {},
|
4045 |
|
4046 | |
4047 |
|
4048 |
|
4049 |
|
4050 |
|
4051 |
|
4052 | possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null,
|
4053 |
|
4054 |
|
4055 | |
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 |
|
4064 | injectEventPluginOrder: function (injectedEventPluginOrder) {
|
4065 | !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0;
|
4066 |
|
4067 | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
|
4068 | recomputePluginOrdering();
|
4069 | },
|
4070 |
|
4071 | |
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 |
|
4080 |
|
4081 | injectEventPluginsByName: function (injectedNamesToPlugins) {
|
4082 | var isOrderingDirty = false;
|
4083 | for (var pluginName in injectedNamesToPlugins) {
|
4084 | if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
|
4085 | continue;
|
4086 | }
|
4087 | var pluginModule = injectedNamesToPlugins[pluginName];
|
4088 | if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
|
4089 | !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
|
4090 | namesToPlugins[pluginName] = pluginModule;
|
4091 | isOrderingDirty = true;
|
4092 | }
|
4093 | }
|
4094 | if (isOrderingDirty) {
|
4095 | recomputePluginOrdering();
|
4096 | }
|
4097 | },
|
4098 |
|
4099 | |
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 |
|
4106 | getPluginModuleForEvent: function (event) {
|
4107 | var dispatchConfig = event.dispatchConfig;
|
4108 | if (dispatchConfig.registrationName) {
|
4109 | return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
|
4110 | }
|
4111 | if (dispatchConfig.phasedRegistrationNames !== undefined) {
|
4112 |
|
4113 |
|
4114 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
4115 |
|
4116 | for (var phase in phasedRegistrationNames) {
|
4117 | if (!phasedRegistrationNames.hasOwnProperty(phase)) {
|
4118 | continue;
|
4119 | }
|
4120 | var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
|
4121 | if (pluginModule) {
|
4122 | return pluginModule;
|
4123 | }
|
4124 | }
|
4125 | }
|
4126 | return null;
|
4127 | },
|
4128 |
|
4129 | |
4130 |
|
4131 |
|
4132 |
|
4133 | _resetEventPlugins: function () {
|
4134 | eventPluginOrder = null;
|
4135 | for (var pluginName in namesToPlugins) {
|
4136 | if (namesToPlugins.hasOwnProperty(pluginName)) {
|
4137 | delete namesToPlugins[pluginName];
|
4138 | }
|
4139 | }
|
4140 | EventPluginRegistry.plugins.length = 0;
|
4141 |
|
4142 | var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
|
4143 | for (var eventName in eventNameDispatchConfigs) {
|
4144 | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
|
4145 | delete eventNameDispatchConfigs[eventName];
|
4146 | }
|
4147 | }
|
4148 |
|
4149 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
4150 | for (var registrationName in registrationNameModules) {
|
4151 | if (registrationNameModules.hasOwnProperty(registrationName)) {
|
4152 | delete registrationNameModules[registrationName];
|
4153 | }
|
4154 | }
|
4155 |
|
4156 | if (process.env.NODE_ENV !== 'production') {
|
4157 | var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
|
4158 | for (var lowerCasedName in possibleRegistrationNames) {
|
4159 | if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
|
4160 | delete possibleRegistrationNames[lowerCasedName];
|
4161 | }
|
4162 | }
|
4163 | }
|
4164 | }
|
4165 | };
|
4166 |
|
4167 | module.exports = EventPluginRegistry;
|
4168 |
|
4169 | }),
|
4170 |
|
4171 | (function(module, exports, __webpack_require__) {
|
4172 |
|
4173 | "use strict";
|
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 |
|
4179 |
|
4180 |
|
4181 |
|
4182 |
|
4183 |
|
4184 | var _prodInvariant = __webpack_require__(2);
|
4185 |
|
4186 | var ReactErrorUtils = __webpack_require__(36);
|
4187 |
|
4188 | var invariant = __webpack_require__(0);
|
4189 | var warning = __webpack_require__(1);
|
4190 |
|
4191 |
|
4192 |
|
4193 |
|
4194 |
|
4195 |
|
4196 |
|
4197 |
|
4198 |
|
4199 | var ComponentTree;
|
4200 | var TreeTraversal;
|
4201 | var injection = {
|
4202 | injectComponentTree: function (Injected) {
|
4203 | ComponentTree = Injected;
|
4204 | if (process.env.NODE_ENV !== 'production') {
|
4205 | process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
4206 | }
|
4207 | },
|
4208 | injectTreeTraversal: function (Injected) {
|
4209 | TreeTraversal = Injected;
|
4210 | if (process.env.NODE_ENV !== 'production') {
|
4211 | process.env.NODE_ENV !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
|
4212 | }
|
4213 | }
|
4214 | };
|
4215 |
|
4216 | function isEndish(topLevelType) {
|
4217 | return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
|
4218 | }
|
4219 |
|
4220 | function isMoveish(topLevelType) {
|
4221 | return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
|
4222 | }
|
4223 | function isStartish(topLevelType) {
|
4224 | return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
|
4225 | }
|
4226 |
|
4227 | var validateEventDispatches;
|
4228 | if (process.env.NODE_ENV !== 'production') {
|
4229 | validateEventDispatches = function (event) {
|
4230 | var dispatchListeners = event._dispatchListeners;
|
4231 | var dispatchInstances = event._dispatchInstances;
|
4232 |
|
4233 | var listenersIsArr = Array.isArray(dispatchListeners);
|
4234 | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
4235 |
|
4236 | var instancesIsArr = Array.isArray(dispatchInstances);
|
4237 | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
4238 |
|
4239 | process.env.NODE_ENV !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
4240 | };
|
4241 | }
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 | function executeDispatch(event, simulated, listener, inst) {
|
4251 | var type = event.type || 'unknown-event';
|
4252 | event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
|
4253 | if (simulated) {
|
4254 | ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
|
4255 | } else {
|
4256 | ReactErrorUtils.invokeGuardedCallback(type, listener, event);
|
4257 | }
|
4258 | event.currentTarget = null;
|
4259 | }
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 | function executeDispatchesInOrder(event, simulated) {
|
4265 | var dispatchListeners = event._dispatchListeners;
|
4266 | var dispatchInstances = event._dispatchInstances;
|
4267 | if (process.env.NODE_ENV !== 'production') {
|
4268 | validateEventDispatches(event);
|
4269 | }
|
4270 | if (Array.isArray(dispatchListeners)) {
|
4271 | for (var i = 0; i < dispatchListeners.length; i++) {
|
4272 | if (event.isPropagationStopped()) {
|
4273 | break;
|
4274 | }
|
4275 |
|
4276 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
|
4277 | }
|
4278 | } else if (dispatchListeners) {
|
4279 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
|
4280 | }
|
4281 | event._dispatchListeners = null;
|
4282 | event._dispatchInstances = null;
|
4283 | }
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 | function executeDispatchesInOrderStopAtTrueImpl(event) {
|
4293 | var dispatchListeners = event._dispatchListeners;
|
4294 | var dispatchInstances = event._dispatchInstances;
|
4295 | if (process.env.NODE_ENV !== 'production') {
|
4296 | validateEventDispatches(event);
|
4297 | }
|
4298 | if (Array.isArray(dispatchListeners)) {
|
4299 | for (var i = 0; i < dispatchListeners.length; i++) {
|
4300 | if (event.isPropagationStopped()) {
|
4301 | break;
|
4302 | }
|
4303 |
|
4304 | if (dispatchListeners[i](event, dispatchInstances[i])) {
|
4305 | return dispatchInstances[i];
|
4306 | }
|
4307 | }
|
4308 | } else if (dispatchListeners) {
|
4309 | if (dispatchListeners(event, dispatchInstances)) {
|
4310 | return dispatchInstances;
|
4311 | }
|
4312 | }
|
4313 | return null;
|
4314 | }
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 | function executeDispatchesInOrderStopAtTrue(event) {
|
4320 | var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
4321 | event._dispatchInstances = null;
|
4322 | event._dispatchListeners = null;
|
4323 | return ret;
|
4324 | }
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 |
|
4333 |
|
4334 |
|
4335 | function executeDirectDispatch(event) {
|
4336 | if (process.env.NODE_ENV !== 'production') {
|
4337 | validateEventDispatches(event);
|
4338 | }
|
4339 | var dispatchListener = event._dispatchListeners;
|
4340 | var dispatchInstance = event._dispatchInstances;
|
4341 | !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
|
4342 | event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
|
4343 | var res = dispatchListener ? dispatchListener(event) : null;
|
4344 | event.currentTarget = null;
|
4345 | event._dispatchListeners = null;
|
4346 | event._dispatchInstances = null;
|
4347 | return res;
|
4348 | }
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 | function hasDispatches(event) {
|
4355 | return !!event._dispatchListeners;
|
4356 | }
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 | var EventPluginUtils = {
|
4362 | isEndish: isEndish,
|
4363 | isMoveish: isMoveish,
|
4364 | isStartish: isStartish,
|
4365 |
|
4366 | executeDirectDispatch: executeDirectDispatch,
|
4367 | executeDispatchesInOrder: executeDispatchesInOrder,
|
4368 | executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
|
4369 | hasDispatches: hasDispatches,
|
4370 |
|
4371 | getInstanceFromNode: function (node) {
|
4372 | return ComponentTree.getInstanceFromNode(node);
|
4373 | },
|
4374 | getNodeFromInstance: function (node) {
|
4375 | return ComponentTree.getNodeFromInstance(node);
|
4376 | },
|
4377 | isAncestor: function (a, b) {
|
4378 | return TreeTraversal.isAncestor(a, b);
|
4379 | },
|
4380 | getLowestCommonAncestor: function (a, b) {
|
4381 | return TreeTraversal.getLowestCommonAncestor(a, b);
|
4382 | },
|
4383 | getParentInstance: function (inst) {
|
4384 | return TreeTraversal.getParentInstance(inst);
|
4385 | },
|
4386 | traverseTwoPhase: function (target, fn, arg) {
|
4387 | return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
4388 | },
|
4389 | traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
4390 | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
4391 | },
|
4392 |
|
4393 | injection: injection
|
4394 | };
|
4395 |
|
4396 | module.exports = EventPluginUtils;
|
4397 |
|
4398 | }),
|
4399 |
|
4400 | (function(module, exports, __webpack_require__) {
|
4401 |
|
4402 | "use strict";
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 |
|
4419 |
|
4420 |
|
4421 | function escape(key) {
|
4422 | var escapeRegex = /[=:]/g;
|
4423 | var escaperLookup = {
|
4424 | '=': '=0',
|
4425 | ':': '=2'
|
4426 | };
|
4427 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
4428 | return escaperLookup[match];
|
4429 | });
|
4430 |
|
4431 | return '$' + escapedString;
|
4432 | }
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 | function unescape(key) {
|
4441 | var unescapeRegex = /(=0|=2)/g;
|
4442 | var unescaperLookup = {
|
4443 | '=0': '=',
|
4444 | '=2': ':'
|
4445 | };
|
4446 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
4447 |
|
4448 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
4449 | return unescaperLookup[match];
|
4450 | });
|
4451 | }
|
4452 |
|
4453 | var KeyEscapeUtils = {
|
4454 | escape: escape,
|
4455 | unescape: unescape
|
4456 | };
|
4457 |
|
4458 | module.exports = KeyEscapeUtils;
|
4459 |
|
4460 | }),
|
4461 |
|
4462 | (function(module, exports, __webpack_require__) {
|
4463 |
|
4464 | "use strict";
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 |
|
4471 |
|
4472 |
|
4473 |
|
4474 |
|
4475 | var _prodInvariant = __webpack_require__(2);
|
4476 |
|
4477 | var ReactPropTypesSecret = __webpack_require__(62);
|
4478 | var propTypesFactory = __webpack_require__(51);
|
4479 |
|
4480 | var React = __webpack_require__(21);
|
4481 | var PropTypes = propTypesFactory(React.isValidElement);
|
4482 |
|
4483 | var invariant = __webpack_require__(0);
|
4484 | var warning = __webpack_require__(1);
|
4485 |
|
4486 | var hasReadOnlyValue = {
|
4487 | button: true,
|
4488 | checkbox: true,
|
4489 | image: true,
|
4490 | hidden: true,
|
4491 | radio: true,
|
4492 | reset: true,
|
4493 | submit: true
|
4494 | };
|
4495 |
|
4496 | function _assertSingleLink(inputProps) {
|
4497 | !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don\'t want to use valueLink and vice versa.') : _prodInvariant('87') : void 0;
|
4498 | }
|
4499 | function _assertValueLink(inputProps) {
|
4500 | _assertSingleLink(inputProps);
|
4501 | !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don\'t want to use valueLink.') : _prodInvariant('88') : void 0;
|
4502 | }
|
4503 |
|
4504 | function _assertCheckedLink(inputProps) {
|
4505 | _assertSingleLink(inputProps);
|
4506 | !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don\'t want to use checkedLink') : _prodInvariant('89') : void 0;
|
4507 | }
|
4508 |
|
4509 | var propTypes = {
|
4510 | value: function (props, propName, componentName) {
|
4511 | if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
|
4512 | return null;
|
4513 | }
|
4514 | return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
4515 | },
|
4516 | checked: function (props, propName, componentName) {
|
4517 | if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
|
4518 | return null;
|
4519 | }
|
4520 | return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
4521 | },
|
4522 | onChange: PropTypes.func
|
4523 | };
|
4524 |
|
4525 | var loggedTypeFailures = {};
|
4526 | function getDeclarationErrorAddendum(owner) {
|
4527 | if (owner) {
|
4528 | var name = owner.getName();
|
4529 | if (name) {
|
4530 | return ' Check the render method of `' + name + '`.';
|
4531 | }
|
4532 | }
|
4533 | return '';
|
4534 | }
|
4535 |
|
4536 |
|
4537 |
|
4538 |
|
4539 |
|
4540 | var LinkedValueUtils = {
|
4541 | checkPropTypes: function (tagName, props, owner) {
|
4542 | for (var propName in propTypes) {
|
4543 | if (propTypes.hasOwnProperty(propName)) {
|
4544 | var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
|
4545 | }
|
4546 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
4547 |
|
4548 |
|
4549 | loggedTypeFailures[error.message] = true;
|
4550 |
|
4551 | var addendum = getDeclarationErrorAddendum(owner);
|
4552 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
4553 | }
|
4554 | }
|
4555 | },
|
4556 |
|
4557 | |
4558 |
|
4559 |
|
4560 |
|
4561 | getValue: function (inputProps) {
|
4562 | if (inputProps.valueLink) {
|
4563 | _assertValueLink(inputProps);
|
4564 | return inputProps.valueLink.value;
|
4565 | }
|
4566 | return inputProps.value;
|
4567 | },
|
4568 |
|
4569 | |
4570 |
|
4571 |
|
4572 |
|
4573 |
|
4574 | getChecked: function (inputProps) {
|
4575 | if (inputProps.checkedLink) {
|
4576 | _assertCheckedLink(inputProps);
|
4577 | return inputProps.checkedLink.value;
|
4578 | }
|
4579 | return inputProps.checked;
|
4580 | },
|
4581 |
|
4582 | |
4583 |
|
4584 |
|
4585 |
|
4586 | executeOnChange: function (inputProps, event) {
|
4587 | if (inputProps.valueLink) {
|
4588 | _assertValueLink(inputProps);
|
4589 | return inputProps.valueLink.requestChange(event.target.value);
|
4590 | } else if (inputProps.checkedLink) {
|
4591 | _assertCheckedLink(inputProps);
|
4592 | return inputProps.checkedLink.requestChange(event.target.checked);
|
4593 | } else if (inputProps.onChange) {
|
4594 | return inputProps.onChange.call(undefined, event);
|
4595 | }
|
4596 | }
|
4597 | };
|
4598 |
|
4599 | module.exports = LinkedValueUtils;
|
4600 |
|
4601 | }),
|
4602 |
|
4603 | (function(module, exports, __webpack_require__) {
|
4604 |
|
4605 | "use strict";
|
4606 |
|
4607 |
|
4608 |
|
4609 |
|
4610 |
|
4611 |
|
4612 |
|
4613 |
|
4614 |
|
4615 |
|
4616 | var _assign = __webpack_require__(3);
|
4617 |
|
4618 | var EventPluginRegistry = __webpack_require__(30);
|
4619 | var ReactEventEmitterMixin = __webpack_require__(148);
|
4620 | var ViewportMetrics = __webpack_require__(65);
|
4621 |
|
4622 | var getVendorPrefixedEventName = __webpack_require__(185);
|
4623 | var isEventSupported = __webpack_require__(42);
|
4624 |
|
4625 |
|
4626 |
|
4627 |
|
4628 |
|
4629 |
|
4630 |
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 |
|
4636 |
|
4637 |
|
4638 |
|
4639 |
|
4640 |
|
4641 |
|
4642 |
|
4643 |
|
4644 |
|
4645 |
|
4646 |
|
4647 |
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 |
|
4653 |
|
4654 |
|
4655 |
|
4656 |
|
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 |
|
4662 |
|
4663 |
|
4664 |
|
4665 |
|
4666 |
|
4667 |
|
4668 |
|
4669 |
|
4670 |
|
4671 |
|
4672 |
|
4673 |
|
4674 |
|
4675 |
|
4676 |
|
4677 |
|
4678 |
|
4679 |
|
4680 | var hasEventPageXY;
|
4681 | var alreadyListeningTo = {};
|
4682 | var isMonitoringScrollValue = false;
|
4683 | var reactTopListenersCounter = 0;
|
4684 |
|
4685 |
|
4686 |
|
4687 |
|
4688 | var topEventMapping = {
|
4689 | topAbort: 'abort',
|
4690 | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
4691 | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
|
4692 | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
|
4693 | topBlur: 'blur',
|
4694 | topCanPlay: 'canplay',
|
4695 | topCanPlayThrough: 'canplaythrough',
|
4696 | topChange: 'change',
|
4697 | topClick: 'click',
|
4698 | topCompositionEnd: 'compositionend',
|
4699 | topCompositionStart: 'compositionstart',
|
4700 | topCompositionUpdate: 'compositionupdate',
|
4701 | topContextMenu: 'contextmenu',
|
4702 | topCopy: 'copy',
|
4703 | topCut: 'cut',
|
4704 | topDoubleClick: 'dblclick',
|
4705 | topDrag: 'drag',
|
4706 | topDragEnd: 'dragend',
|
4707 | topDragEnter: 'dragenter',
|
4708 | topDragExit: 'dragexit',
|
4709 | topDragLeave: 'dragleave',
|
4710 | topDragOver: 'dragover',
|
4711 | topDragStart: 'dragstart',
|
4712 | topDrop: 'drop',
|
4713 | topDurationChange: 'durationchange',
|
4714 | topEmptied: 'emptied',
|
4715 | topEncrypted: 'encrypted',
|
4716 | topEnded: 'ended',
|
4717 | topError: 'error',
|
4718 | topFocus: 'focus',
|
4719 | topInput: 'input',
|
4720 | topKeyDown: 'keydown',
|
4721 | topKeyPress: 'keypress',
|
4722 | topKeyUp: 'keyup',
|
4723 | topLoadedData: 'loadeddata',
|
4724 | topLoadedMetadata: 'loadedmetadata',
|
4725 | topLoadStart: 'loadstart',
|
4726 | topMouseDown: 'mousedown',
|
4727 | topMouseMove: 'mousemove',
|
4728 | topMouseOut: 'mouseout',
|
4729 | topMouseOver: 'mouseover',
|
4730 | topMouseUp: 'mouseup',
|
4731 | topPaste: 'paste',
|
4732 | topPause: 'pause',
|
4733 | topPlay: 'play',
|
4734 | topPlaying: 'playing',
|
4735 | topProgress: 'progress',
|
4736 | topRateChange: 'ratechange',
|
4737 | topScroll: 'scroll',
|
4738 | topSeeked: 'seeked',
|
4739 | topSeeking: 'seeking',
|
4740 | topSelectionChange: 'selectionchange',
|
4741 | topStalled: 'stalled',
|
4742 | topSuspend: 'suspend',
|
4743 | topTextInput: 'textInput',
|
4744 | topTimeUpdate: 'timeupdate',
|
4745 | topTouchCancel: 'touchcancel',
|
4746 | topTouchEnd: 'touchend',
|
4747 | topTouchMove: 'touchmove',
|
4748 | topTouchStart: 'touchstart',
|
4749 | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
|
4750 | topVolumeChange: 'volumechange',
|
4751 | topWaiting: 'waiting',
|
4752 | topWheel: 'wheel'
|
4753 | };
|
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
|
4759 |
|
4760 | function getListeningForDocument(mountAt) {
|
4761 |
|
4762 |
|
4763 | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
4764 | mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
4765 | alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
4766 | }
|
4767 | return alreadyListeningTo[mountAt[topListenersIDKey]];
|
4768 | }
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 |
|
4777 |
|
4778 |
|
4779 |
|
4780 | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
|
4781 | |
4782 |
|
4783 |
|
4784 | ReactEventListener: null,
|
4785 |
|
4786 | injection: {
|
4787 | |
4788 |
|
4789 |
|
4790 | injectReactEventListener: function (ReactEventListener) {
|
4791 | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
|
4792 | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
|
4793 | }
|
4794 | },
|
4795 |
|
4796 | |
4797 |
|
4798 |
|
4799 |
|
4800 |
|
4801 | setEnabled: function (enabled) {
|
4802 | if (ReactBrowserEventEmitter.ReactEventListener) {
|
4803 | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
|
4804 | }
|
4805 | },
|
4806 |
|
4807 | |
4808 |
|
4809 |
|
4810 | isEnabled: function () {
|
4811 | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
|
4812 | },
|
4813 |
|
4814 | |
4815 |
|
4816 |
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 |
|
4822 |
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 |
|
4832 |
|
4833 |
|
4834 |
|
4835 | listenTo: function (registrationName, contentDocumentHandle) {
|
4836 | var mountAt = contentDocumentHandle;
|
4837 | var isListening = getListeningForDocument(mountAt);
|
4838 | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
|
4839 |
|
4840 | for (var i = 0; i < dependencies.length; i++) {
|
4841 | var dependency = dependencies[i];
|
4842 | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
4843 | if (dependency === 'topWheel') {
|
4844 | if (isEventSupported('wheel')) {
|
4845 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
|
4846 | } else if (isEventSupported('mousewheel')) {
|
4847 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
4848 | } else {
|
4849 |
|
4850 |
|
4851 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
4852 | }
|
4853 | } else if (dependency === 'topScroll') {
|
4854 | if (isEventSupported('scroll', true)) {
|
4855 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
|
4856 | } else {
|
4857 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
|
4858 | }
|
4859 | } else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
4860 | if (isEventSupported('focus', true)) {
|
4861 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
|
4862 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
|
4863 | } else if (isEventSupported('focusin')) {
|
4864 |
|
4865 |
|
4866 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
|
4867 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
|
4868 | }
|
4869 |
|
4870 |
|
4871 | isListening.topBlur = true;
|
4872 | isListening.topFocus = true;
|
4873 | } else if (topEventMapping.hasOwnProperty(dependency)) {
|
4874 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
|
4875 | }
|
4876 |
|
4877 | isListening[dependency] = true;
|
4878 | }
|
4879 | }
|
4880 | },
|
4881 |
|
4882 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
4883 | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
|
4884 | },
|
4885 |
|
4886 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
4887 | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
|
4888 | },
|
4889 |
|
4890 | |
4891 |
|
4892 |
|
4893 |
|
4894 |
|
4895 | supportsEventPageXY: function () {
|
4896 | if (!document.createEvent) {
|
4897 | return false;
|
4898 | }
|
4899 | var ev = document.createEvent('MouseEvent');
|
4900 | return ev != null && 'pageX' in ev;
|
4901 | },
|
4902 |
|
4903 | |
4904 |
|
4905 |
|
4906 |
|
4907 |
|
4908 |
|
4909 |
|
4910 |
|
4911 |
|
4912 |
|
4913 |
|
4914 | ensureScrollValueMonitoring: function () {
|
4915 | if (hasEventPageXY === undefined) {
|
4916 | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
|
4917 | }
|
4918 | if (!hasEventPageXY && !isMonitoringScrollValue) {
|
4919 | var refresh = ViewportMetrics.refreshScrollValues;
|
4920 | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
|
4921 | isMonitoringScrollValue = true;
|
4922 | }
|
4923 | }
|
4924 | });
|
4925 |
|
4926 | module.exports = ReactBrowserEventEmitter;
|
4927 |
|
4928 | }),
|
4929 |
|
4930 | (function(module, exports, __webpack_require__) {
|
4931 |
|
4932 | "use strict";
|
4933 |
|
4934 |
|
4935 |
|
4936 |
|
4937 |
|
4938 |
|
4939 |
|
4940 |
|
4941 |
|
4942 |
|
4943 |
|
4944 | var _prodInvariant = __webpack_require__(2);
|
4945 |
|
4946 | var invariant = __webpack_require__(0);
|
4947 |
|
4948 | var injected = false;
|
4949 |
|
4950 | var ReactComponentEnvironment = {
|
4951 | |
4952 |
|
4953 |
|
4954 |
|
4955 | replaceNodeWithMarkup: null,
|
4956 |
|
4957 | |
4958 |
|
4959 |
|
4960 |
|
4961 | processChildrenUpdates: null,
|
4962 |
|
4963 | injection: {
|
4964 | injectEnvironment: function (environment) {
|
4965 | !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
|
4966 | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
|
4967 | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
|
4968 | injected = true;
|
4969 | }
|
4970 | }
|
4971 | };
|
4972 |
|
4973 | module.exports = ReactComponentEnvironment;
|
4974 |
|
4975 | }),
|
4976 |
|
4977 | (function(module, exports, __webpack_require__) {
|
4978 |
|
4979 | "use strict";
|
4980 |
|
4981 |
|
4982 |
|
4983 |
|
4984 |
|
4985 |
|
4986 |
|
4987 |
|
4988 |
|
4989 |
|
4990 |
|
4991 | var caughtError = null;
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 | function invokeGuardedCallback(name, func, a) {
|
5002 | try {
|
5003 | func(a);
|
5004 | } catch (x) {
|
5005 | if (caughtError === null) {
|
5006 | caughtError = x;
|
5007 | }
|
5008 | }
|
5009 | }
|
5010 |
|
5011 | var ReactErrorUtils = {
|
5012 | invokeGuardedCallback: invokeGuardedCallback,
|
5013 |
|
5014 | |
5015 |
|
5016 |
|
5017 |
|
5018 | invokeGuardedCallbackWithCatch: invokeGuardedCallback,
|
5019 |
|
5020 | |
5021 |
|
5022 |
|
5023 |
|
5024 | rethrowCaughtError: function () {
|
5025 | if (caughtError) {
|
5026 | var error = caughtError;
|
5027 | caughtError = null;
|
5028 | throw error;
|
5029 | }
|
5030 | }
|
5031 | };
|
5032 |
|
5033 | if (process.env.NODE_ENV !== 'production') {
|
5034 | |
5035 |
|
5036 |
|
5037 |
|
5038 | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
5039 | var fakeNode = document.createElement('react');
|
5040 | ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
|
5041 | var boundFunc = function () {
|
5042 | func(a);
|
5043 | };
|
5044 | var evtType = 'react-' + name;
|
5045 | fakeNode.addEventListener(evtType, boundFunc, false);
|
5046 | var evt = document.createEvent('Event');
|
5047 | evt.initEvent(evtType, false, false);
|
5048 | fakeNode.dispatchEvent(evt);
|
5049 | fakeNode.removeEventListener(evtType, boundFunc, false);
|
5050 | };
|
5051 | }
|
5052 | }
|
5053 |
|
5054 | module.exports = ReactErrorUtils;
|
5055 |
|
5056 | }),
|
5057 |
|
5058 | (function(module, exports, __webpack_require__) {
|
5059 |
|
5060 | "use strict";
|
5061 |
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 |
|
5073 |
|
5074 |
|
5075 |
|
5076 |
|
5077 |
|
5078 |
|
5079 |
|
5080 | var ReactInstanceMap = {
|
5081 | |
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 | remove: function (key) {
|
5087 | key._reactInternalInstance = undefined;
|
5088 | },
|
5089 |
|
5090 | get: function (key) {
|
5091 | return key._reactInternalInstance;
|
5092 | },
|
5093 |
|
5094 | has: function (key) {
|
5095 | return key._reactInternalInstance !== undefined;
|
5096 | },
|
5097 |
|
5098 | set: function (key, value) {
|
5099 | key._reactInternalInstance = value;
|
5100 | }
|
5101 | };
|
5102 |
|
5103 | module.exports = ReactInstanceMap;
|
5104 |
|
5105 | }),
|
5106 |
|
5107 | (function(module, exports, __webpack_require__) {
|
5108 |
|
5109 | "use strict";
|
5110 |
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 |
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 |
|
5125 |
|
5126 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
5127 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
5128 | return function (arg0, arg1, arg2, arg3) {
|
5129 | MSApp.execUnsafeLocalFunction(function () {
|
5130 | return func(arg0, arg1, arg2, arg3);
|
5131 | });
|
5132 | };
|
5133 | } else {
|
5134 | return func;
|
5135 | }
|
5136 | };
|
5137 |
|
5138 | module.exports = createMicrosoftUnsafeLocalFunction;
|
5139 |
|
5140 | }),
|
5141 |
|
5142 | (function(module, exports, __webpack_require__) {
|
5143 |
|
5144 | "use strict";
|
5145 |
|
5146 |
|
5147 |
|
5148 |
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 |
|
5157 |
|
5158 |
|
5159 |
|
5160 |
|
5161 |
|
5162 |
|
5163 |
|
5164 |
|
5165 |
|
5166 | function getEventCharCode(nativeEvent) {
|
5167 | var charCode;
|
5168 | var keyCode = nativeEvent.keyCode;
|
5169 |
|
5170 | if ('charCode' in nativeEvent) {
|
5171 | charCode = nativeEvent.charCode;
|
5172 |
|
5173 |
|
5174 | if (charCode === 0 && keyCode === 13) {
|
5175 | charCode = 13;
|
5176 | }
|
5177 | } else {
|
5178 |
|
5179 | charCode = keyCode;
|
5180 | }
|
5181 |
|
5182 |
|
5183 |
|
5184 | if (charCode >= 32 || charCode === 13) {
|
5185 | return charCode;
|
5186 | }
|
5187 |
|
5188 | return 0;
|
5189 | }
|
5190 |
|
5191 | module.exports = getEventCharCode;
|
5192 |
|
5193 | }),
|
5194 |
|
5195 | (function(module, exports, __webpack_require__) {
|
5196 |
|
5197 | "use strict";
|
5198 |
|
5199 |
|
5200 |
|
5201 |
|
5202 |
|
5203 |
|
5204 |
|
5205 |
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 | var modifierKeyToProp = {
|
5214 | Alt: 'altKey',
|
5215 | Control: 'ctrlKey',
|
5216 | Meta: 'metaKey',
|
5217 | Shift: 'shiftKey'
|
5218 | };
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 | function modifierStateGetter(keyArg) {
|
5224 | var syntheticEvent = this;
|
5225 | var nativeEvent = syntheticEvent.nativeEvent;
|
5226 | if (nativeEvent.getModifierState) {
|
5227 | return nativeEvent.getModifierState(keyArg);
|
5228 | }
|
5229 | var keyProp = modifierKeyToProp[keyArg];
|
5230 | return keyProp ? !!nativeEvent[keyProp] : false;
|
5231 | }
|
5232 |
|
5233 | function getEventModifierState(nativeEvent) {
|
5234 | return modifierStateGetter;
|
5235 | }
|
5236 |
|
5237 | module.exports = getEventModifierState;
|
5238 |
|
5239 | }),
|
5240 |
|
5241 | (function(module, exports, __webpack_require__) {
|
5242 |
|
5243 | "use strict";
|
5244 |
|
5245 |
|
5246 |
|
5247 |
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 |
|
5254 |
|
5255 |
|
5256 |
|
5257 |
|
5258 |
|
5259 |
|
5260 |
|
5261 |
|
5262 | function getEventTarget(nativeEvent) {
|
5263 | var target = nativeEvent.target || nativeEvent.srcElement || window;
|
5264 |
|
5265 |
|
5266 | if (target.correspondingUseElement) {
|
5267 | target = target.correspondingUseElement;
|
5268 | }
|
5269 |
|
5270 |
|
5271 |
|
5272 | return target.nodeType === 3 ? target.parentNode : target;
|
5273 | }
|
5274 |
|
5275 | module.exports = getEventTarget;
|
5276 |
|
5277 | }),
|
5278 |
|
5279 | (function(module, exports, __webpack_require__) {
|
5280 |
|
5281 | "use strict";
|
5282 |
|
5283 |
|
5284 |
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 |
|
5292 | var ExecutionEnvironment = __webpack_require__(5);
|
5293 |
|
5294 | var useHasFeature;
|
5295 | if (ExecutionEnvironment.canUseDOM) {
|
5296 | useHasFeature = document.implementation && document.implementation.hasFeature &&
|
5297 |
|
5298 |
|
5299 | document.implementation.hasFeature('', '') !== true;
|
5300 | }
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 | function isEventSupported(eventNameSuffix, capture) {
|
5317 | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
|
5318 | return false;
|
5319 | }
|
5320 |
|
5321 | var eventName = 'on' + eventNameSuffix;
|
5322 | var isSupported = eventName in document;
|
5323 |
|
5324 | if (!isSupported) {
|
5325 | var element = document.createElement('div');
|
5326 | element.setAttribute(eventName, 'return;');
|
5327 | isSupported = typeof element[eventName] === 'function';
|
5328 | }
|
5329 |
|
5330 | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
5331 |
|
5332 | isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
5333 | }
|
5334 |
|
5335 | return isSupported;
|
5336 | }
|
5337 |
|
5338 | module.exports = isEventSupported;
|
5339 |
|
5340 | }),
|
5341 |
|
5342 | (function(module, exports, __webpack_require__) {
|
5343 |
|
5344 | "use strict";
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 |
|
5353 |
|
5354 |
|
5355 | var ExecutionEnvironment = __webpack_require__(5);
|
5356 | var DOMNamespaces = __webpack_require__(29);
|
5357 |
|
5358 | var WHITESPACE_TEST = /^[ \r\n\t\f]/;
|
5359 | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
|
5360 |
|
5361 | var createMicrosoftUnsafeLocalFunction = __webpack_require__(38);
|
5362 |
|
5363 |
|
5364 | var reusableSVGContainer;
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
5375 |
|
5376 |
|
5377 |
|
5378 | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
|
5379 | reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
5380 | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
5381 | var svgNode = reusableSVGContainer.firstChild;
|
5382 | while (svgNode.firstChild) {
|
5383 | node.appendChild(svgNode.firstChild);
|
5384 | }
|
5385 | } else {
|
5386 | node.innerHTML = html;
|
5387 | }
|
5388 | });
|
5389 |
|
5390 | if (ExecutionEnvironment.canUseDOM) {
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 |
|
5396 |
|
5397 | var testElement = document.createElement('div');
|
5398 | testElement.innerHTML = ' ';
|
5399 | if (testElement.innerHTML === '') {
|
5400 | setInnerHTML = function (node, html) {
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 | if (node.parentNode) {
|
5407 | node.parentNode.replaceChild(node, node);
|
5408 | }
|
5409 |
|
5410 |
|
5411 |
|
5412 |
|
5413 |
|
5414 | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
|
5415 |
|
5416 |
|
5417 |
|
5418 |
|
5419 |
|
5420 |
|
5421 | node.innerHTML = String.fromCharCode(0xfeff) + html;
|
5422 |
|
5423 |
|
5424 |
|
5425 | var textNode = node.firstChild;
|
5426 | if (textNode.data.length === 1) {
|
5427 | node.removeChild(textNode);
|
5428 | } else {
|
5429 | textNode.deleteData(0, 1);
|
5430 | }
|
5431 | } else {
|
5432 | node.innerHTML = html;
|
5433 | }
|
5434 | };
|
5435 | }
|
5436 | testElement = null;
|
5437 | }
|
5438 |
|
5439 | module.exports = setInnerHTML;
|
5440 |
|
5441 | }),
|
5442 |
|
5443 | (function(module, exports, __webpack_require__) {
|
5444 |
|
5445 | "use strict";
|
5446 |
|
5447 |
|
5448 |
|
5449 |
|
5450 |
|
5451 |
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 | var _assign = __webpack_require__(3);
|
5457 |
|
5458 | var emptyFunction = __webpack_require__(7);
|
5459 | var warning = __webpack_require__(1);
|
5460 |
|
5461 | var validateDOMNesting = emptyFunction;
|
5462 |
|
5463 | if (process.env.NODE_ENV !== 'production') {
|
5464 |
|
5465 |
|
5466 |
|
5467 |
|
5468 |
|
5469 |
|
5470 |
|
5471 |
|
5472 |
|
5473 |
|
5474 |
|
5475 |
|
5476 | var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp'];
|
5477 |
|
5478 |
|
5479 | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
5480 |
|
5481 |
|
5482 |
|
5483 |
|
5484 | 'foreignObject', 'desc', 'title'];
|
5485 |
|
5486 |
|
5487 | var buttonScopeTags = inScopeTags.concat(['button']);
|
5488 |
|
5489 |
|
5490 | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
5491 |
|
5492 | var emptyAncestorInfo = {
|
5493 | current: null,
|
5494 |
|
5495 | formTag: null,
|
5496 | aTagInScope: null,
|
5497 | buttonTagInScope: null,
|
5498 | nobrTagInScope: null,
|
5499 | pTagInButtonScope: null,
|
5500 |
|
5501 | listItemTagAutoclosing: null,
|
5502 | dlItemTagAutoclosing: null
|
5503 | };
|
5504 |
|
5505 | var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
5506 | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
5507 | var info = { tag: tag, instance: instance };
|
5508 |
|
5509 | if (inScopeTags.indexOf(tag) !== -1) {
|
5510 | ancestorInfo.aTagInScope = null;
|
5511 | ancestorInfo.buttonTagInScope = null;
|
5512 | ancestorInfo.nobrTagInScope = null;
|
5513 | }
|
5514 | if (buttonScopeTags.indexOf(tag) !== -1) {
|
5515 | ancestorInfo.pTagInButtonScope = null;
|
5516 | }
|
5517 |
|
5518 |
|
5519 |
|
5520 | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
5521 | ancestorInfo.listItemTagAutoclosing = null;
|
5522 | ancestorInfo.dlItemTagAutoclosing = null;
|
5523 | }
|
5524 |
|
5525 | ancestorInfo.current = info;
|
5526 |
|
5527 | if (tag === 'form') {
|
5528 | ancestorInfo.formTag = info;
|
5529 | }
|
5530 | if (tag === 'a') {
|
5531 | ancestorInfo.aTagInScope = info;
|
5532 | }
|
5533 | if (tag === 'button') {
|
5534 | ancestorInfo.buttonTagInScope = info;
|
5535 | }
|
5536 | if (tag === 'nobr') {
|
5537 | ancestorInfo.nobrTagInScope = info;
|
5538 | }
|
5539 | if (tag === 'p') {
|
5540 | ancestorInfo.pTagInButtonScope = info;
|
5541 | }
|
5542 | if (tag === 'li') {
|
5543 | ancestorInfo.listItemTagAutoclosing = info;
|
5544 | }
|
5545 | if (tag === 'dd' || tag === 'dt') {
|
5546 | ancestorInfo.dlItemTagAutoclosing = info;
|
5547 | }
|
5548 |
|
5549 | return ancestorInfo;
|
5550 | };
|
5551 |
|
5552 | |
5553 |
|
5554 |
|
5555 | var isTagValidWithParent = function (tag, parentTag) {
|
5556 |
|
5557 | switch (parentTag) {
|
5558 |
|
5559 | case 'select':
|
5560 | return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
5561 | case 'optgroup':
|
5562 | return tag === 'option' || tag === '#text';
|
5563 |
|
5564 |
|
5565 | case 'option':
|
5566 | return tag === '#text';
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 | case 'tr':
|
5574 | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
5575 |
|
5576 | case 'tbody':
|
5577 | case 'thead':
|
5578 | case 'tfoot':
|
5579 | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
5580 |
|
5581 | case 'colgroup':
|
5582 | return tag === 'col' || tag === 'template';
|
5583 |
|
5584 | case 'table':
|
5585 | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
5586 |
|
5587 | case 'head':
|
5588 | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
5589 |
|
5590 | case 'html':
|
5591 | return tag === 'head' || tag === 'body';
|
5592 | case '#document':
|
5593 | return tag === 'html';
|
5594 | }
|
5595 |
|
5596 |
|
5597 |
|
5598 |
|
5599 | switch (tag) {
|
5600 | case 'h1':
|
5601 | case 'h2':
|
5602 | case 'h3':
|
5603 | case 'h4':
|
5604 | case 'h5':
|
5605 | case 'h6':
|
5606 | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
5607 |
|
5608 | case 'rp':
|
5609 | case 'rt':
|
5610 | return impliedEndTags.indexOf(parentTag) === -1;
|
5611 |
|
5612 | case 'body':
|
5613 | case 'caption':
|
5614 | case 'col':
|
5615 | case 'colgroup':
|
5616 | case 'frame':
|
5617 | case 'head':
|
5618 | case 'html':
|
5619 | case 'tbody':
|
5620 | case 'td':
|
5621 | case 'tfoot':
|
5622 | case 'th':
|
5623 | case 'thead':
|
5624 | case 'tr':
|
5625 |
|
5626 |
|
5627 |
|
5628 |
|
5629 | return parentTag == null;
|
5630 | }
|
5631 |
|
5632 | return true;
|
5633 | };
|
5634 |
|
5635 | |
5636 |
|
5637 |
|
5638 | var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
5639 | switch (tag) {
|
5640 | case 'address':
|
5641 | case 'article':
|
5642 | case 'aside':
|
5643 | case 'blockquote':
|
5644 | case 'center':
|
5645 | case 'details':
|
5646 | case 'dialog':
|
5647 | case 'dir':
|
5648 | case 'div':
|
5649 | case 'dl':
|
5650 | case 'fieldset':
|
5651 | case 'figcaption':
|
5652 | case 'figure':
|
5653 | case 'footer':
|
5654 | case 'header':
|
5655 | case 'hgroup':
|
5656 | case 'main':
|
5657 | case 'menu':
|
5658 | case 'nav':
|
5659 | case 'ol':
|
5660 | case 'p':
|
5661 | case 'section':
|
5662 | case 'summary':
|
5663 | case 'ul':
|
5664 | case 'pre':
|
5665 | case 'listing':
|
5666 | case 'table':
|
5667 | case 'hr':
|
5668 | case 'xmp':
|
5669 | case 'h1':
|
5670 | case 'h2':
|
5671 | case 'h3':
|
5672 | case 'h4':
|
5673 | case 'h5':
|
5674 | case 'h6':
|
5675 | return ancestorInfo.pTagInButtonScope;
|
5676 |
|
5677 | case 'form':
|
5678 | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
5679 |
|
5680 | case 'li':
|
5681 | return ancestorInfo.listItemTagAutoclosing;
|
5682 |
|
5683 | case 'dd':
|
5684 | case 'dt':
|
5685 | return ancestorInfo.dlItemTagAutoclosing;
|
5686 |
|
5687 | case 'button':
|
5688 | return ancestorInfo.buttonTagInScope;
|
5689 |
|
5690 | case 'a':
|
5691 |
|
5692 |
|
5693 | return ancestorInfo.aTagInScope;
|
5694 |
|
5695 | case 'nobr':
|
5696 | return ancestorInfo.nobrTagInScope;
|
5697 | }
|
5698 |
|
5699 | return null;
|
5700 | };
|
5701 |
|
5702 | |
5703 |
|
5704 |
|
5705 |
|
5706 | var findOwnerStack = function (instance) {
|
5707 | if (!instance) {
|
5708 | return [];
|
5709 | }
|
5710 |
|
5711 | var stack = [];
|
5712 | do {
|
5713 | stack.push(instance);
|
5714 | } while (instance = instance._currentElement._owner);
|
5715 | stack.reverse();
|
5716 | return stack;
|
5717 | };
|
5718 |
|
5719 | var didWarn = {};
|
5720 |
|
5721 | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
|
5722 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
5723 | var parentInfo = ancestorInfo.current;
|
5724 | var parentTag = parentInfo && parentInfo.tag;
|
5725 |
|
5726 | if (childText != null) {
|
5727 | process.env.NODE_ENV !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
5728 | childTag = '#text';
|
5729 | }
|
5730 |
|
5731 | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
5732 | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
5733 | var problematic = invalidParent || invalidAncestor;
|
5734 |
|
5735 | if (problematic) {
|
5736 | var ancestorTag = problematic.tag;
|
5737 | var ancestorInstance = problematic.instance;
|
5738 |
|
5739 | var childOwner = childInstance && childInstance._currentElement._owner;
|
5740 | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
|
5741 |
|
5742 | var childOwners = findOwnerStack(childOwner);
|
5743 | var ancestorOwners = findOwnerStack(ancestorOwner);
|
5744 |
|
5745 | var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
|
5746 | var i;
|
5747 |
|
5748 | var deepestCommon = -1;
|
5749 | for (i = 0; i < minStackLen; i++) {
|
5750 | if (childOwners[i] === ancestorOwners[i]) {
|
5751 | deepestCommon = i;
|
5752 | } else {
|
5753 | break;
|
5754 | }
|
5755 | }
|
5756 |
|
5757 | var UNKNOWN = '(unknown)';
|
5758 | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
|
5759 | return inst.getName() || UNKNOWN;
|
5760 | });
|
5761 | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
|
5762 | return inst.getName() || UNKNOWN;
|
5763 | });
|
5764 | var ownerInfo = [].concat(
|
5765 |
|
5766 |
|
5767 | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
|
5768 |
|
5769 | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
|
5770 |
|
5771 | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
|
5772 | if (didWarn[warnKey]) {
|
5773 | return;
|
5774 | }
|
5775 | didWarn[warnKey] = true;
|
5776 |
|
5777 | var tagDisplayName = childTag;
|
5778 | var whitespaceInfo = '';
|
5779 | if (childTag === '#text') {
|
5780 | if (/\S/.test(childText)) {
|
5781 | tagDisplayName = 'Text nodes';
|
5782 | } else {
|
5783 | tagDisplayName = 'Whitespace text nodes';
|
5784 | whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
|
5785 | }
|
5786 | } else {
|
5787 | tagDisplayName = '<' + childTag + '>';
|
5788 | }
|
5789 |
|
5790 | if (invalidParent) {
|
5791 | var info = '';
|
5792 | if (ancestorTag === 'table' && childTag === 'tr') {
|
5793 | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
5794 | }
|
5795 | process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
|
5796 | } else {
|
5797 | process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
5798 | }
|
5799 | }
|
5800 | };
|
5801 |
|
5802 | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
|
5803 |
|
5804 |
|
5805 | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
|
5806 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
5807 | var parentInfo = ancestorInfo.current;
|
5808 | var parentTag = parentInfo && parentInfo.tag;
|
5809 | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
|
5810 | };
|
5811 | }
|
5812 |
|
5813 | module.exports = validateDOMNesting;
|
5814 |
|
5815 | }),
|
5816 |
|
5817 | (function(module, exports, __webpack_require__) {
|
5818 |
|
5819 | "use strict";
|
5820 |
|
5821 |
|
5822 |
|
5823 |
|
5824 |
|
5825 |
|
5826 |
|
5827 |
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 |
|
5839 |
|
5840 |
|
5841 |
|
5842 |
|
5843 |
|
5844 | var lowPriorityWarning = function () {};
|
5845 |
|
5846 | if (process.env.NODE_ENV !== 'production') {
|
5847 | var printWarning = function (format) {
|
5848 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
5849 | args[_key - 1] = arguments[_key];
|
5850 | }
|
5851 |
|
5852 | var argIndex = 0;
|
5853 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
5854 | return args[argIndex++];
|
5855 | });
|
5856 | if (typeof console !== 'undefined') {
|
5857 | console.warn(message);
|
5858 | }
|
5859 | try {
|
5860 |
|
5861 |
|
5862 |
|
5863 | throw new Error(message);
|
5864 | } catch (x) {}
|
5865 | };
|
5866 |
|
5867 | lowPriorityWarning = function (condition, format) {
|
5868 | if (format === undefined) {
|
5869 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
5870 | }
|
5871 | if (!condition) {
|
5872 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
5873 | args[_key2 - 2] = arguments[_key2];
|
5874 | }
|
5875 |
|
5876 | printWarning.apply(undefined, [format].concat(args));
|
5877 | }
|
5878 | };
|
5879 | }
|
5880 |
|
5881 | module.exports = lowPriorityWarning;
|
5882 |
|
5883 | }),
|
5884 |
|
5885 | (function(module, exports) {
|
5886 |
|
5887 | module.exports = require("react");
|
5888 |
|
5889 | }),
|
5890 |
|
5891 | (function(module, exports, __webpack_require__) {
|
5892 |
|
5893 | "use strict";
|
5894 |
|
5895 |
|
5896 | var _undefined = __webpack_require__(97)();
|
5897 |
|
5898 | module.exports = function (val) {
|
5899 | return (val !== _undefined) && (val !== null);
|
5900 | };
|
5901 |
|
5902 |
|
5903 | }),
|
5904 |
|
5905 | (function(module, exports, __webpack_require__) {
|
5906 |
|
5907 | "use strict";
|
5908 |
|
5909 |
|
5910 |
|
5911 |
|
5912 |
|
5913 |
|
5914 |
|
5915 |
|
5916 |
|
5917 |
|
5918 |
|
5919 | var emptyFunction = __webpack_require__(7);
|
5920 |
|
5921 |
|
5922 |
|
5923 |
|
5924 |
|
5925 | var EventListener = {
|
5926 | |
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 | listen: function listen(target, eventType, callback) {
|
5935 | if (target.addEventListener) {
|
5936 | target.addEventListener(eventType, callback, false);
|
5937 | return {
|
5938 | remove: function remove() {
|
5939 | target.removeEventListener(eventType, callback, false);
|
5940 | }
|
5941 | };
|
5942 | } else if (target.attachEvent) {
|
5943 | target.attachEvent('on' + eventType, callback);
|
5944 | return {
|
5945 | remove: function remove() {
|
5946 | target.detachEvent('on' + eventType, callback);
|
5947 | }
|
5948 | };
|
5949 | }
|
5950 | },
|
5951 |
|
5952 | |
5953 |
|
5954 |
|
5955 |
|
5956 |
|
5957 |
|
5958 |
|
5959 |
|
5960 | capture: function capture(target, eventType, callback) {
|
5961 | if (target.addEventListener) {
|
5962 | target.addEventListener(eventType, callback, true);
|
5963 | return {
|
5964 | remove: function remove() {
|
5965 | target.removeEventListener(eventType, callback, true);
|
5966 | }
|
5967 | };
|
5968 | } else {
|
5969 | if (process.env.NODE_ENV !== 'production') {
|
5970 | console.error('Attempted to listen to events during the capture phase on a ' + 'browser that does not support the capture phase. Your application ' + 'will not receive some events.');
|
5971 | }
|
5972 | return {
|
5973 | remove: emptyFunction
|
5974 | };
|
5975 | }
|
5976 | },
|
5977 |
|
5978 | registerDefault: function registerDefault() {}
|
5979 | };
|
5980 |
|
5981 | module.exports = EventListener;
|
5982 |
|
5983 | }),
|
5984 |
|
5985 | (function(module, exports, __webpack_require__) {
|
5986 |
|
5987 | "use strict";
|
5988 |
|
5989 |
|
5990 |
|
5991 |
|
5992 |
|
5993 |
|
5994 |
|
5995 |
|
5996 |
|
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 | function focusNode(node) {
|
6003 |
|
6004 |
|
6005 |
|
6006 | try {
|
6007 | node.focus();
|
6008 | } catch (e) {}
|
6009 | }
|
6010 |
|
6011 | module.exports = focusNode;
|
6012 |
|
6013 | }),
|
6014 |
|
6015 | (function(module, exports, __webpack_require__) {
|
6016 |
|
6017 | "use strict";
|
6018 |
|
6019 |
|
6020 |
|
6021 |
|
6022 |
|
6023 |
|
6024 |
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 | function getActiveElement(doc) /*?DOMElement*/{
|
6042 | doc = doc || (typeof document !== 'undefined' ? document : undefined);
|
6043 | if (typeof doc === 'undefined') {
|
6044 | return null;
|
6045 | }
|
6046 | try {
|
6047 | return doc.activeElement || doc.body;
|
6048 | } catch (e) {
|
6049 | return doc.body;
|
6050 | }
|
6051 | }
|
6052 |
|
6053 | module.exports = getActiveElement;
|
6054 |
|
6055 | }),
|
6056 |
|
6057 | (function(module, exports, __webpack_require__) {
|
6058 |
|
6059 | "use strict";
|
6060 |
|
6061 |
|
6062 |
|
6063 |
|
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 |
|
6069 |
|
6070 |
|
6071 |
|
6072 |
|
6073 | var factory = __webpack_require__(120);
|
6074 | module.exports = function(isValidElement) {
|
6075 |
|
6076 | var throwOnDirectAccess = false;
|
6077 | return factory(isValidElement, throwOnDirectAccess);
|
6078 | };
|
6079 |
|
6080 |
|
6081 | }),
|
6082 |
|
6083 | (function(module, exports, __webpack_require__) {
|
6084 |
|
6085 | "use strict";
|
6086 |
|
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 |
|
6093 |
|
6094 |
|
6095 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
6096 |
|
6097 | module.exports = ReactPropTypesSecret;
|
6098 |
|
6099 |
|
6100 | }),
|
6101 |
|
6102 | (function(module, exports, __webpack_require__) {
|
6103 |
|
6104 | "use strict";
|
6105 |
|
6106 |
|
6107 |
|
6108 |
|
6109 |
|
6110 |
|
6111 |
|
6112 |
|
6113 |
|
6114 |
|
6115 |
|
6116 |
|
6117 |
|
6118 |
|
6119 | var isUnitlessNumber = {
|
6120 | animationIterationCount: true,
|
6121 | borderImageOutset: true,
|
6122 | borderImageSlice: true,
|
6123 | borderImageWidth: true,
|
6124 | boxFlex: true,
|
6125 | boxFlexGroup: true,
|
6126 | boxOrdinalGroup: true,
|
6127 | columnCount: true,
|
6128 | columns: true,
|
6129 | flex: true,
|
6130 | flexGrow: true,
|
6131 | flexPositive: true,
|
6132 | flexShrink: true,
|
6133 | flexNegative: true,
|
6134 | flexOrder: true,
|
6135 | gridRow: true,
|
6136 | gridRowEnd: true,
|
6137 | gridRowSpan: true,
|
6138 | gridRowStart: true,
|
6139 | gridColumn: true,
|
6140 | gridColumnEnd: true,
|
6141 | gridColumnSpan: true,
|
6142 | gridColumnStart: true,
|
6143 | fontWeight: true,
|
6144 | lineClamp: true,
|
6145 | lineHeight: true,
|
6146 | opacity: true,
|
6147 | order: true,
|
6148 | orphans: true,
|
6149 | tabSize: true,
|
6150 | widows: true,
|
6151 | zIndex: true,
|
6152 | zoom: true,
|
6153 |
|
6154 |
|
6155 | fillOpacity: true,
|
6156 | floodOpacity: true,
|
6157 | stopOpacity: true,
|
6158 | strokeDasharray: true,
|
6159 | strokeDashoffset: true,
|
6160 | strokeMiterlimit: true,
|
6161 | strokeOpacity: true,
|
6162 | strokeWidth: true
|
6163 | };
|
6164 |
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 | function prefixKey(prefix, key) {
|
6172 | return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
6173 | }
|
6174 |
|
6175 |
|
6176 |
|
6177 |
|
6178 |
|
6179 | var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
6180 |
|
6181 |
|
6182 |
|
6183 | Object.keys(isUnitlessNumber).forEach(function (prop) {
|
6184 | prefixes.forEach(function (prefix) {
|
6185 | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
6186 | });
|
6187 | });
|
6188 |
|
6189 |
|
6190 |
|
6191 |
|
6192 |
|
6193 |
|
6194 |
|
6195 |
|
6196 |
|
6197 |
|
6198 | var shorthandPropertyExpansions = {
|
6199 | background: {
|
6200 | backgroundAttachment: true,
|
6201 | backgroundColor: true,
|
6202 | backgroundImage: true,
|
6203 | backgroundPositionX: true,
|
6204 | backgroundPositionY: true,
|
6205 | backgroundRepeat: true
|
6206 | },
|
6207 | backgroundPosition: {
|
6208 | backgroundPositionX: true,
|
6209 | backgroundPositionY: true
|
6210 | },
|
6211 | border: {
|
6212 | borderWidth: true,
|
6213 | borderStyle: true,
|
6214 | borderColor: true
|
6215 | },
|
6216 | borderBottom: {
|
6217 | borderBottomWidth: true,
|
6218 | borderBottomStyle: true,
|
6219 | borderBottomColor: true
|
6220 | },
|
6221 | borderLeft: {
|
6222 | borderLeftWidth: true,
|
6223 | borderLeftStyle: true,
|
6224 | borderLeftColor: true
|
6225 | },
|
6226 | borderRight: {
|
6227 | borderRightWidth: true,
|
6228 | borderRightStyle: true,
|
6229 | borderRightColor: true
|
6230 | },
|
6231 | borderTop: {
|
6232 | borderTopWidth: true,
|
6233 | borderTopStyle: true,
|
6234 | borderTopColor: true
|
6235 | },
|
6236 | font: {
|
6237 | fontStyle: true,
|
6238 | fontVariant: true,
|
6239 | fontWeight: true,
|
6240 | fontSize: true,
|
6241 | lineHeight: true,
|
6242 | fontFamily: true
|
6243 | },
|
6244 | outline: {
|
6245 | outlineWidth: true,
|
6246 | outlineStyle: true,
|
6247 | outlineColor: true
|
6248 | }
|
6249 | };
|
6250 |
|
6251 | var CSSProperty = {
|
6252 | isUnitlessNumber: isUnitlessNumber,
|
6253 | shorthandPropertyExpansions: shorthandPropertyExpansions
|
6254 | };
|
6255 |
|
6256 | module.exports = CSSProperty;
|
6257 |
|
6258 | }),
|
6259 |
|
6260 | (function(module, exports, __webpack_require__) {
|
6261 |
|
6262 | "use strict";
|
6263 |
|
6264 |
|
6265 |
|
6266 |
|
6267 |
|
6268 |
|
6269 |
|
6270 |
|
6271 |
|
6272 |
|
6273 |
|
6274 | var _prodInvariant = __webpack_require__(2);
|
6275 |
|
6276 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
6277 |
|
6278 | var PooledClass = __webpack_require__(12);
|
6279 |
|
6280 | var invariant = __webpack_require__(0);
|
6281 |
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 |
|
6292 |
|
6293 |
|
6294 | var CallbackQueue = function () {
|
6295 | function CallbackQueue(arg) {
|
6296 | _classCallCheck(this, CallbackQueue);
|
6297 |
|
6298 | this._callbacks = null;
|
6299 | this._contexts = null;
|
6300 | this._arg = arg;
|
6301 | }
|
6302 |
|
6303 | |
6304 |
|
6305 |
|
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 |
|
6311 |
|
6312 | CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
|
6313 | this._callbacks = this._callbacks || [];
|
6314 | this._callbacks.push(callback);
|
6315 | this._contexts = this._contexts || [];
|
6316 | this._contexts.push(context);
|
6317 | };
|
6318 |
|
6319 | |
6320 |
|
6321 |
|
6322 |
|
6323 |
|
6324 |
|
6325 |
|
6326 |
|
6327 | CallbackQueue.prototype.notifyAll = function notifyAll() {
|
6328 | var callbacks = this._callbacks;
|
6329 | var contexts = this._contexts;
|
6330 | var arg = this._arg;
|
6331 | if (callbacks && contexts) {
|
6332 | !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
|
6333 | this._callbacks = null;
|
6334 | this._contexts = null;
|
6335 | for (var i = 0; i < callbacks.length; i++) {
|
6336 | callbacks[i].call(contexts[i], arg);
|
6337 | }
|
6338 | callbacks.length = 0;
|
6339 | contexts.length = 0;
|
6340 | }
|
6341 | };
|
6342 |
|
6343 | CallbackQueue.prototype.checkpoint = function checkpoint() {
|
6344 | return this._callbacks ? this._callbacks.length : 0;
|
6345 | };
|
6346 |
|
6347 | CallbackQueue.prototype.rollback = function rollback(len) {
|
6348 | if (this._callbacks && this._contexts) {
|
6349 | this._callbacks.length = len;
|
6350 | this._contexts.length = len;
|
6351 | }
|
6352 | };
|
6353 |
|
6354 | |
6355 |
|
6356 |
|
6357 |
|
6358 |
|
6359 |
|
6360 |
|
6361 | CallbackQueue.prototype.reset = function reset() {
|
6362 | this._callbacks = null;
|
6363 | this._contexts = null;
|
6364 | };
|
6365 |
|
6366 | |
6367 |
|
6368 |
|
6369 |
|
6370 |
|
6371 | CallbackQueue.prototype.destructor = function destructor() {
|
6372 | this.reset();
|
6373 | };
|
6374 |
|
6375 | return CallbackQueue;
|
6376 | }();
|
6377 |
|
6378 | module.exports = PooledClass.addPoolingTo(CallbackQueue);
|
6379 |
|
6380 | }),
|
6381 |
|
6382 | (function(module, exports, __webpack_require__) {
|
6383 |
|
6384 | "use strict";
|
6385 |
|
6386 |
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 |
|
6395 | var DOMProperty = __webpack_require__(16);
|
6396 | var ReactDOMComponentTree = __webpack_require__(4);
|
6397 | var ReactInstrumentation = __webpack_require__(6);
|
6398 |
|
6399 | var quoteAttributeValueForBrowser = __webpack_require__(186);
|
6400 | var warning = __webpack_require__(1);
|
6401 |
|
6402 | var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
6403 | var illegalAttributeNameCache = {};
|
6404 | var validatedAttributeNameCache = {};
|
6405 |
|
6406 | function isAttributeNameSafe(attributeName) {
|
6407 | if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
|
6408 | return true;
|
6409 | }
|
6410 | if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
|
6411 | return false;
|
6412 | }
|
6413 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
6414 | validatedAttributeNameCache[attributeName] = true;
|
6415 | return true;
|
6416 | }
|
6417 | illegalAttributeNameCache[attributeName] = true;
|
6418 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
|
6419 | return false;
|
6420 | }
|
6421 |
|
6422 | function shouldIgnoreValue(propertyInfo, value) {
|
6423 | return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
|
6424 | }
|
6425 |
|
6426 |
|
6427 |
|
6428 |
|
6429 | var DOMPropertyOperations = {
|
6430 | |
6431 |
|
6432 |
|
6433 |
|
6434 |
|
6435 |
|
6436 | createMarkupForID: function (id) {
|
6437 | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
|
6438 | },
|
6439 |
|
6440 | setAttributeForID: function (node, id) {
|
6441 | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
|
6442 | },
|
6443 |
|
6444 | createMarkupForRoot: function () {
|
6445 | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
|
6446 | },
|
6447 |
|
6448 | setAttributeForRoot: function (node) {
|
6449 | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
|
6450 | },
|
6451 |
|
6452 | |
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 | createMarkupForProperty: function (name, value) {
|
6460 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
6461 | if (propertyInfo) {
|
6462 | if (shouldIgnoreValue(propertyInfo, value)) {
|
6463 | return '';
|
6464 | }
|
6465 | var attributeName = propertyInfo.attributeName;
|
6466 | if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
6467 | return attributeName + '=""';
|
6468 | }
|
6469 | return attributeName + '=' + quoteAttributeValueForBrowser(value);
|
6470 | } else if (DOMProperty.isCustomAttribute(name)) {
|
6471 | if (value == null) {
|
6472 | return '';
|
6473 | }
|
6474 | return name + '=' + quoteAttributeValueForBrowser(value);
|
6475 | }
|
6476 | return null;
|
6477 | },
|
6478 |
|
6479 | |
6480 |
|
6481 |
|
6482 |
|
6483 |
|
6484 |
|
6485 |
|
6486 | createMarkupForCustomAttribute: function (name, value) {
|
6487 | if (!isAttributeNameSafe(name) || value == null) {
|
6488 | return '';
|
6489 | }
|
6490 | return name + '=' + quoteAttributeValueForBrowser(value);
|
6491 | },
|
6492 |
|
6493 | |
6494 |
|
6495 |
|
6496 |
|
6497 |
|
6498 |
|
6499 |
|
6500 | setValueForProperty: function (node, name, value) {
|
6501 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
6502 | if (propertyInfo) {
|
6503 | var mutationMethod = propertyInfo.mutationMethod;
|
6504 | if (mutationMethod) {
|
6505 | mutationMethod(node, value);
|
6506 | } else if (shouldIgnoreValue(propertyInfo, value)) {
|
6507 | this.deleteValueForProperty(node, name);
|
6508 | return;
|
6509 | } else if (propertyInfo.mustUseProperty) {
|
6510 |
|
6511 |
|
6512 | node[propertyInfo.propertyName] = value;
|
6513 | } else {
|
6514 | var attributeName = propertyInfo.attributeName;
|
6515 | var namespace = propertyInfo.attributeNamespace;
|
6516 |
|
6517 |
|
6518 | if (namespace) {
|
6519 | node.setAttributeNS(namespace, attributeName, '' + value);
|
6520 | } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
6521 | node.setAttribute(attributeName, '');
|
6522 | } else {
|
6523 | node.setAttribute(attributeName, '' + value);
|
6524 | }
|
6525 | }
|
6526 | } else if (DOMProperty.isCustomAttribute(name)) {
|
6527 | DOMPropertyOperations.setValueForAttribute(node, name, value);
|
6528 | return;
|
6529 | }
|
6530 |
|
6531 | if (process.env.NODE_ENV !== 'production') {
|
6532 | var payload = {};
|
6533 | payload[name] = value;
|
6534 | ReactInstrumentation.debugTool.onHostOperation({
|
6535 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
6536 | type: 'update attribute',
|
6537 | payload: payload
|
6538 | });
|
6539 | }
|
6540 | },
|
6541 |
|
6542 | setValueForAttribute: function (node, name, value) {
|
6543 | if (!isAttributeNameSafe(name)) {
|
6544 | return;
|
6545 | }
|
6546 | if (value == null) {
|
6547 | node.removeAttribute(name);
|
6548 | } else {
|
6549 | node.setAttribute(name, '' + value);
|
6550 | }
|
6551 |
|
6552 | if (process.env.NODE_ENV !== 'production') {
|
6553 | var payload = {};
|
6554 | payload[name] = value;
|
6555 | ReactInstrumentation.debugTool.onHostOperation({
|
6556 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
6557 | type: 'update attribute',
|
6558 | payload: payload
|
6559 | });
|
6560 | }
|
6561 | },
|
6562 |
|
6563 | |
6564 |
|
6565 |
|
6566 |
|
6567 |
|
6568 |
|
6569 | deleteValueForAttribute: function (node, name) {
|
6570 | node.removeAttribute(name);
|
6571 | if (process.env.NODE_ENV !== 'production') {
|
6572 | ReactInstrumentation.debugTool.onHostOperation({
|
6573 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
6574 | type: 'remove attribute',
|
6575 | payload: name
|
6576 | });
|
6577 | }
|
6578 | },
|
6579 |
|
6580 | |
6581 |
|
6582 |
|
6583 |
|
6584 |
|
6585 |
|
6586 | deleteValueForProperty: function (node, name) {
|
6587 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
6588 | if (propertyInfo) {
|
6589 | var mutationMethod = propertyInfo.mutationMethod;
|
6590 | if (mutationMethod) {
|
6591 | mutationMethod(node, undefined);
|
6592 | } else if (propertyInfo.mustUseProperty) {
|
6593 | var propName = propertyInfo.propertyName;
|
6594 | if (propertyInfo.hasBooleanValue) {
|
6595 | node[propName] = false;
|
6596 | } else {
|
6597 | node[propName] = '';
|
6598 | }
|
6599 | } else {
|
6600 | node.removeAttribute(propertyInfo.attributeName);
|
6601 | }
|
6602 | } else if (DOMProperty.isCustomAttribute(name)) {
|
6603 | node.removeAttribute(name);
|
6604 | }
|
6605 |
|
6606 | if (process.env.NODE_ENV !== 'production') {
|
6607 | ReactInstrumentation.debugTool.onHostOperation({
|
6608 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
6609 | type: 'remove attribute',
|
6610 | payload: name
|
6611 | });
|
6612 | }
|
6613 | }
|
6614 | };
|
6615 |
|
6616 | module.exports = DOMPropertyOperations;
|
6617 |
|
6618 | }),
|
6619 |
|
6620 | (function(module, exports, __webpack_require__) {
|
6621 |
|
6622 | "use strict";
|
6623 |
|
6624 |
|
6625 |
|
6626 |
|
6627 |
|
6628 |
|
6629 |
|
6630 |
|
6631 |
|
6632 |
|
6633 | var ReactDOMComponentFlags = {
|
6634 | hasCachedChildNodes: 1 << 0
|
6635 | };
|
6636 |
|
6637 | module.exports = ReactDOMComponentFlags;
|
6638 |
|
6639 | }),
|
6640 |
|
6641 | (function(module, exports, __webpack_require__) {
|
6642 |
|
6643 | "use strict";
|
6644 |
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 | var _assign = __webpack_require__(3);
|
6655 |
|
6656 | var LinkedValueUtils = __webpack_require__(33);
|
6657 | var ReactDOMComponentTree = __webpack_require__(4);
|
6658 | var ReactUpdates = __webpack_require__(9);
|
6659 |
|
6660 | var warning = __webpack_require__(1);
|
6661 |
|
6662 | var didWarnValueLink = false;
|
6663 | var didWarnValueDefaultValue = false;
|
6664 |
|
6665 | function updateOptionsIfPendingUpdateAndMounted() {
|
6666 | if (this._rootNodeID && this._wrapperState.pendingUpdate) {
|
6667 | this._wrapperState.pendingUpdate = false;
|
6668 |
|
6669 | var props = this._currentElement.props;
|
6670 | var value = LinkedValueUtils.getValue(props);
|
6671 |
|
6672 | if (value != null) {
|
6673 | updateOptions(this, Boolean(props.multiple), value);
|
6674 | }
|
6675 | }
|
6676 | }
|
6677 |
|
6678 | function getDeclarationErrorAddendum(owner) {
|
6679 | if (owner) {
|
6680 | var name = owner.getName();
|
6681 | if (name) {
|
6682 | return ' Check the render method of `' + name + '`.';
|
6683 | }
|
6684 | }
|
6685 | return '';
|
6686 | }
|
6687 |
|
6688 | var valuePropNames = ['value', 'defaultValue'];
|
6689 |
|
6690 |
|
6691 |
|
6692 |
|
6693 |
|
6694 | function checkSelectPropTypes(inst, props) {
|
6695 | var owner = inst._currentElement._owner;
|
6696 | LinkedValueUtils.checkPropTypes('select', props, owner);
|
6697 |
|
6698 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
6699 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
|
6700 | didWarnValueLink = true;
|
6701 | }
|
6702 |
|
6703 | for (var i = 0; i < valuePropNames.length; i++) {
|
6704 | var propName = valuePropNames[i];
|
6705 | if (props[propName] == null) {
|
6706 | continue;
|
6707 | }
|
6708 | var isArray = Array.isArray(props[propName]);
|
6709 | if (props.multiple && !isArray) {
|
6710 | process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
6711 | } else if (!props.multiple && isArray) {
|
6712 | process.env.NODE_ENV !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
6713 | }
|
6714 | }
|
6715 | }
|
6716 |
|
6717 |
|
6718 |
|
6719 |
|
6720 |
|
6721 |
|
6722 |
|
6723 | function updateOptions(inst, multiple, propValue) {
|
6724 | var selectedValue, i;
|
6725 | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
|
6726 |
|
6727 | if (multiple) {
|
6728 | selectedValue = {};
|
6729 | for (i = 0; i < propValue.length; i++) {
|
6730 | selectedValue['' + propValue[i]] = true;
|
6731 | }
|
6732 | for (i = 0; i < options.length; i++) {
|
6733 | var selected = selectedValue.hasOwnProperty(options[i].value);
|
6734 | if (options[i].selected !== selected) {
|
6735 | options[i].selected = selected;
|
6736 | }
|
6737 | }
|
6738 | } else {
|
6739 |
|
6740 |
|
6741 | selectedValue = '' + propValue;
|
6742 | for (i = 0; i < options.length; i++) {
|
6743 | if (options[i].value === selectedValue) {
|
6744 | options[i].selected = true;
|
6745 | return;
|
6746 | }
|
6747 | }
|
6748 | if (options.length) {
|
6749 | options[0].selected = true;
|
6750 | }
|
6751 | }
|
6752 | }
|
6753 |
|
6754 |
|
6755 |
|
6756 |
|
6757 |
|
6758 |
|
6759 |
|
6760 |
|
6761 |
|
6762 |
|
6763 |
|
6764 |
|
6765 |
|
6766 |
|
6767 |
|
6768 |
|
6769 | var ReactDOMSelect = {
|
6770 | getHostProps: function (inst, props) {
|
6771 | return _assign({}, props, {
|
6772 | onChange: inst._wrapperState.onChange,
|
6773 | value: undefined
|
6774 | });
|
6775 | },
|
6776 |
|
6777 | mountWrapper: function (inst, props) {
|
6778 | if (process.env.NODE_ENV !== 'production') {
|
6779 | checkSelectPropTypes(inst, props);
|
6780 | }
|
6781 |
|
6782 | var value = LinkedValueUtils.getValue(props);
|
6783 | inst._wrapperState = {
|
6784 | pendingUpdate: false,
|
6785 | initialValue: value != null ? value : props.defaultValue,
|
6786 | listeners: null,
|
6787 | onChange: _handleChange.bind(inst),
|
6788 | wasMultiple: Boolean(props.multiple)
|
6789 | };
|
6790 |
|
6791 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
6792 | process.env.NODE_ENV !== 'production' ? warning(false, 'Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
6793 | didWarnValueDefaultValue = true;
|
6794 | }
|
6795 | },
|
6796 |
|
6797 | getSelectValueContext: function (inst) {
|
6798 |
|
6799 |
|
6800 | return inst._wrapperState.initialValue;
|
6801 | },
|
6802 |
|
6803 | postUpdateWrapper: function (inst) {
|
6804 | var props = inst._currentElement.props;
|
6805 |
|
6806 |
|
6807 |
|
6808 | inst._wrapperState.initialValue = undefined;
|
6809 |
|
6810 | var wasMultiple = inst._wrapperState.wasMultiple;
|
6811 | inst._wrapperState.wasMultiple = Boolean(props.multiple);
|
6812 |
|
6813 | var value = LinkedValueUtils.getValue(props);
|
6814 | if (value != null) {
|
6815 | inst._wrapperState.pendingUpdate = false;
|
6816 | updateOptions(inst, Boolean(props.multiple), value);
|
6817 | } else if (wasMultiple !== Boolean(props.multiple)) {
|
6818 |
|
6819 | if (props.defaultValue != null) {
|
6820 | updateOptions(inst, Boolean(props.multiple), props.defaultValue);
|
6821 | } else {
|
6822 |
|
6823 | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
|
6824 | }
|
6825 | }
|
6826 | }
|
6827 | };
|
6828 |
|
6829 | function _handleChange(event) {
|
6830 | var props = this._currentElement.props;
|
6831 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
6832 |
|
6833 | if (this._rootNodeID) {
|
6834 | this._wrapperState.pendingUpdate = true;
|
6835 | }
|
6836 | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
|
6837 | return returnValue;
|
6838 | }
|
6839 |
|
6840 | module.exports = ReactDOMSelect;
|
6841 |
|
6842 | }),
|
6843 |
|
6844 | (function(module, exports, __webpack_require__) {
|
6845 |
|
6846 | "use strict";
|
6847 |
|
6848 |
|
6849 |
|
6850 |
|
6851 |
|
6852 |
|
6853 |
|
6854 |
|
6855 |
|
6856 |
|
6857 | var _assign = __webpack_require__(3);
|
6858 |
|
6859 | var ReactUpdates = __webpack_require__(9);
|
6860 | var Transaction = __webpack_require__(24);
|
6861 |
|
6862 | var emptyFunction = __webpack_require__(7);
|
6863 |
|
6864 | var RESET_BATCHED_UPDATES = {
|
6865 | initialize: emptyFunction,
|
6866 | close: function () {
|
6867 | ReactDefaultBatchingStrategy.isBatchingUpdates = false;
|
6868 | }
|
6869 | };
|
6870 |
|
6871 | var FLUSH_BATCHED_UPDATES = {
|
6872 | initialize: emptyFunction,
|
6873 | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
|
6874 | };
|
6875 |
|
6876 | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
|
6877 |
|
6878 | function ReactDefaultBatchingStrategyTransaction() {
|
6879 | this.reinitializeTransaction();
|
6880 | }
|
6881 |
|
6882 | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
|
6883 | getTransactionWrappers: function () {
|
6884 | return TRANSACTION_WRAPPERS;
|
6885 | }
|
6886 | });
|
6887 |
|
6888 | var transaction = new ReactDefaultBatchingStrategyTransaction();
|
6889 |
|
6890 | var ReactDefaultBatchingStrategy = {
|
6891 | isBatchingUpdates: false,
|
6892 |
|
6893 | |
6894 |
|
6895 |
|
6896 |
|
6897 | batchedUpdates: function (callback, a, b, c, d, e) {
|
6898 | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
|
6899 |
|
6900 | ReactDefaultBatchingStrategy.isBatchingUpdates = true;
|
6901 |
|
6902 |
|
6903 | if (alreadyBatchingUpdates) {
|
6904 | return callback(a, b, c, d, e);
|
6905 | } else {
|
6906 | return transaction.perform(callback, null, a, b, c, d, e);
|
6907 | }
|
6908 | }
|
6909 | };
|
6910 |
|
6911 | module.exports = ReactDefaultBatchingStrategy;
|
6912 |
|
6913 | }),
|
6914 |
|
6915 | (function(module, exports, __webpack_require__) {
|
6916 |
|
6917 | "use strict";
|
6918 |
|
6919 |
|
6920 |
|
6921 |
|
6922 |
|
6923 |
|
6924 |
|
6925 |
|
6926 |
|
6927 |
|
6928 | var emptyComponentFactory;
|
6929 |
|
6930 | var ReactEmptyComponentInjection = {
|
6931 | injectEmptyComponentFactory: function (factory) {
|
6932 | emptyComponentFactory = factory;
|
6933 | }
|
6934 | };
|
6935 |
|
6936 | var ReactEmptyComponent = {
|
6937 | create: function (instantiate) {
|
6938 | return emptyComponentFactory(instantiate);
|
6939 | }
|
6940 | };
|
6941 |
|
6942 | ReactEmptyComponent.injection = ReactEmptyComponentInjection;
|
6943 |
|
6944 | module.exports = ReactEmptyComponent;
|
6945 |
|
6946 | }),
|
6947 |
|
6948 | (function(module, exports, __webpack_require__) {
|
6949 |
|
6950 | "use strict";
|
6951 |
|
6952 |
|
6953 |
|
6954 |
|
6955 |
|
6956 |
|
6957 |
|
6958 |
|
6959 |
|
6960 |
|
6961 | var _prodInvariant = __webpack_require__(2);
|
6962 |
|
6963 | var invariant = __webpack_require__(0);
|
6964 |
|
6965 | var genericComponentClass = null;
|
6966 | var textComponentClass = null;
|
6967 |
|
6968 | var ReactHostComponentInjection = {
|
6969 |
|
6970 |
|
6971 | injectGenericComponentClass: function (componentClass) {
|
6972 | genericComponentClass = componentClass;
|
6973 | },
|
6974 |
|
6975 |
|
6976 | injectTextComponentClass: function (componentClass) {
|
6977 | textComponentClass = componentClass;
|
6978 | }
|
6979 | };
|
6980 |
|
6981 |
|
6982 |
|
6983 |
|
6984 |
|
6985 |
|
6986 |
|
6987 | function createInternalComponent(element) {
|
6988 | !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
|
6989 | return new genericComponentClass(element);
|
6990 | }
|
6991 |
|
6992 |
|
6993 |
|
6994 |
|
6995 |
|
6996 | function createInstanceForText(text) {
|
6997 | return new textComponentClass(text);
|
6998 | }
|
6999 |
|
7000 |
|
7001 |
|
7002 |
|
7003 |
|
7004 | function isTextComponent(component) {
|
7005 | return component instanceof textComponentClass;
|
7006 | }
|
7007 |
|
7008 | var ReactHostComponent = {
|
7009 | createInternalComponent: createInternalComponent,
|
7010 | createInstanceForText: createInstanceForText,
|
7011 | isTextComponent: isTextComponent,
|
7012 | injection: ReactHostComponentInjection
|
7013 | };
|
7014 |
|
7015 | module.exports = ReactHostComponent;
|
7016 |
|
7017 | }),
|
7018 |
|
7019 | (function(module, exports, __webpack_require__) {
|
7020 |
|
7021 | "use strict";
|
7022 |
|
7023 |
|
7024 |
|
7025 |
|
7026 |
|
7027 |
|
7028 |
|
7029 |
|
7030 |
|
7031 |
|
7032 | var ReactDOMSelection = __webpack_require__(140);
|
7033 |
|
7034 | var containsNode = __webpack_require__(107);
|
7035 | var focusNode = __webpack_require__(49);
|
7036 | var getActiveElement = __webpack_require__(50);
|
7037 |
|
7038 | function isInDocument(node) {
|
7039 | return containsNode(document.documentElement, node);
|
7040 | }
|
7041 |
|
7042 |
|
7043 |
|
7044 |
|
7045 |
|
7046 |
|
7047 |
|
7048 | var ReactInputSelection = {
|
7049 | hasSelectionCapabilities: function (elem) {
|
7050 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
7051 | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
|
7052 | },
|
7053 |
|
7054 | getSelectionInformation: function () {
|
7055 | var focusedElem = getActiveElement();
|
7056 | return {
|
7057 | focusedElem: focusedElem,
|
7058 | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
|
7059 | };
|
7060 | },
|
7061 |
|
7062 | |
7063 |
|
7064 |
|
7065 |
|
7066 |
|
7067 | restoreSelection: function (priorSelectionInformation) {
|
7068 | var curFocusedElem = getActiveElement();
|
7069 | var priorFocusedElem = priorSelectionInformation.focusedElem;
|
7070 | var priorSelectionRange = priorSelectionInformation.selectionRange;
|
7071 | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
7072 | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
|
7073 | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
|
7074 | }
|
7075 | focusNode(priorFocusedElem);
|
7076 | }
|
7077 | },
|
7078 |
|
7079 | |
7080 |
|
7081 |
|
7082 |
|
7083 |
|
7084 |
|
7085 | getSelection: function (input) {
|
7086 | var selection;
|
7087 |
|
7088 | if ('selectionStart' in input) {
|
7089 |
|
7090 | selection = {
|
7091 | start: input.selectionStart,
|
7092 | end: input.selectionEnd
|
7093 | };
|
7094 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
7095 |
|
7096 | var range = document.selection.createRange();
|
7097 |
|
7098 |
|
7099 | if (range.parentElement() === input) {
|
7100 | selection = {
|
7101 | start: -range.moveStart('character', -input.value.length),
|
7102 | end: -range.moveEnd('character', -input.value.length)
|
7103 | };
|
7104 | }
|
7105 | } else {
|
7106 |
|
7107 | selection = ReactDOMSelection.getOffsets(input);
|
7108 | }
|
7109 |
|
7110 | return selection || { start: 0, end: 0 };
|
7111 | },
|
7112 |
|
7113 | |
7114 |
|
7115 |
|
7116 |
|
7117 |
|
7118 |
|
7119 | setSelection: function (input, offsets) {
|
7120 | var start = offsets.start;
|
7121 | var end = offsets.end;
|
7122 | if (end === undefined) {
|
7123 | end = start;
|
7124 | }
|
7125 |
|
7126 | if ('selectionStart' in input) {
|
7127 | input.selectionStart = start;
|
7128 | input.selectionEnd = Math.min(end, input.value.length);
|
7129 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
7130 | var range = input.createTextRange();
|
7131 | range.collapse(true);
|
7132 | range.moveStart('character', start);
|
7133 | range.moveEnd('character', end - start);
|
7134 | range.select();
|
7135 | } else {
|
7136 | ReactDOMSelection.setOffsets(input, offsets);
|
7137 | }
|
7138 | }
|
7139 | };
|
7140 |
|
7141 | module.exports = ReactInputSelection;
|
7142 |
|
7143 | }),
|
7144 |
|
7145 | (function(module, exports, __webpack_require__) {
|
7146 |
|
7147 | "use strict";
|
7148 |
|
7149 |
|
7150 |
|
7151 |
|
7152 |
|
7153 |
|
7154 |
|
7155 |
|
7156 |
|
7157 |
|
7158 |
|
7159 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
7160 |
|
7161 | module.exports = ReactPropTypesSecret;
|
7162 |
|
7163 | }),
|
7164 |
|
7165 | (function(module, exports, __webpack_require__) {
|
7166 |
|
7167 | "use strict";
|
7168 |
|
7169 |
|
7170 |
|
7171 |
|
7172 |
|
7173 |
|
7174 |
|
7175 |
|
7176 |
|
7177 |
|
7178 | var _assign = __webpack_require__(3);
|
7179 |
|
7180 | var PooledClass = __webpack_require__(12);
|
7181 | var Transaction = __webpack_require__(24);
|
7182 | var ReactInstrumentation = __webpack_require__(6);
|
7183 | var ReactServerUpdateQueue = __webpack_require__(163);
|
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 | var TRANSACTION_WRAPPERS = [];
|
7191 |
|
7192 | if (process.env.NODE_ENV !== 'production') {
|
7193 | TRANSACTION_WRAPPERS.push({
|
7194 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
7195 | close: ReactInstrumentation.debugTool.onEndFlush
|
7196 | });
|
7197 | }
|
7198 |
|
7199 | var noopCallbackQueue = {
|
7200 | enqueue: function () {}
|
7201 | };
|
7202 |
|
7203 |
|
7204 |
|
7205 |
|
7206 |
|
7207 | function ReactServerRenderingTransaction(renderToStaticMarkup) {
|
7208 | this.reinitializeTransaction();
|
7209 | this.renderToStaticMarkup = renderToStaticMarkup;
|
7210 | this.useCreateElement = false;
|
7211 | this.updateQueue = new ReactServerUpdateQueue(this);
|
7212 | }
|
7213 |
|
7214 | var Mixin = {
|
7215 | |
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 |
|
7221 | getTransactionWrappers: function () {
|
7222 | return TRANSACTION_WRAPPERS;
|
7223 | },
|
7224 |
|
7225 | |
7226 |
|
7227 |
|
7228 | getReactMountReady: function () {
|
7229 | return noopCallbackQueue;
|
7230 | },
|
7231 |
|
7232 | |
7233 |
|
7234 |
|
7235 | getUpdateQueue: function () {
|
7236 | return this.updateQueue;
|
7237 | },
|
7238 |
|
7239 | |
7240 |
|
7241 |
|
7242 |
|
7243 | destructor: function () {},
|
7244 |
|
7245 | checkpoint: function () {},
|
7246 |
|
7247 | rollback: function () {}
|
7248 | };
|
7249 |
|
7250 | _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
|
7251 |
|
7252 | PooledClass.addPoolingTo(ReactServerRenderingTransaction);
|
7253 |
|
7254 | module.exports = ReactServerRenderingTransaction;
|
7255 |
|
7256 | }),
|
7257 |
|
7258 | (function(module, exports, __webpack_require__) {
|
7259 |
|
7260 | "use strict";
|
7261 |
|
7262 |
|
7263 |
|
7264 |
|
7265 |
|
7266 |
|
7267 |
|
7268 |
|
7269 |
|
7270 |
|
7271 | var _prodInvariant = __webpack_require__(2);
|
7272 |
|
7273 | var ReactCurrentOwner = __webpack_require__(11);
|
7274 | var ReactInstanceMap = __webpack_require__(37);
|
7275 | var ReactInstrumentation = __webpack_require__(6);
|
7276 | var ReactUpdates = __webpack_require__(9);
|
7277 |
|
7278 | var invariant = __webpack_require__(0);
|
7279 | var warning = __webpack_require__(1);
|
7280 |
|
7281 | function enqueueUpdate(internalInstance) {
|
7282 | ReactUpdates.enqueueUpdate(internalInstance);
|
7283 | }
|
7284 |
|
7285 | function formatUnexpectedArgument(arg) {
|
7286 | var type = typeof arg;
|
7287 | if (type !== 'object') {
|
7288 | return type;
|
7289 | }
|
7290 | var displayName = arg.constructor && arg.constructor.name || type;
|
7291 | var keys = Object.keys(arg);
|
7292 | if (keys.length > 0 && keys.length < 20) {
|
7293 | return displayName + ' (keys: ' + keys.join(', ') + ')';
|
7294 | }
|
7295 | return displayName;
|
7296 | }
|
7297 |
|
7298 | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
|
7299 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
7300 | if (!internalInstance) {
|
7301 | if (process.env.NODE_ENV !== 'production') {
|
7302 | var ctor = publicInstance.constructor;
|
7303 |
|
7304 |
|
7305 |
|
7306 | process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, ctor && (ctor.displayName || ctor.name) || 'ReactClass') : void 0;
|
7307 | }
|
7308 | return null;
|
7309 | }
|
7310 |
|
7311 | if (process.env.NODE_ENV !== 'production') {
|
7312 | process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + "within `render` or another component's constructor). Render methods " + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
|
7313 | }
|
7314 |
|
7315 | return internalInstance;
|
7316 | }
|
7317 |
|
7318 |
|
7319 |
|
7320 |
|
7321 |
|
7322 | var ReactUpdateQueue = {
|
7323 | |
7324 |
|
7325 |
|
7326 |
|
7327 |
|
7328 |
|
7329 |
|
7330 | isMounted: function (publicInstance) {
|
7331 | if (process.env.NODE_ENV !== 'production') {
|
7332 | var owner = ReactCurrentOwner.current;
|
7333 | if (owner !== null) {
|
7334 | process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
|
7335 | owner._warnedAboutRefsInRender = true;
|
7336 | }
|
7337 | }
|
7338 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
7339 | if (internalInstance) {
|
7340 |
|
7341 |
|
7342 |
|
7343 | return !!internalInstance._renderedComponent;
|
7344 | } else {
|
7345 | return false;
|
7346 | }
|
7347 | },
|
7348 |
|
7349 | |
7350 |
|
7351 |
|
7352 |
|
7353 |
|
7354 |
|
7355 |
|
7356 |
|
7357 |
|
7358 | enqueueCallback: function (publicInstance, callback, callerName) {
|
7359 | ReactUpdateQueue.validateCallback(callback, callerName);
|
7360 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
|
7361 |
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 |
|
7367 | if (!internalInstance) {
|
7368 | return null;
|
7369 | }
|
7370 |
|
7371 | if (internalInstance._pendingCallbacks) {
|
7372 | internalInstance._pendingCallbacks.push(callback);
|
7373 | } else {
|
7374 | internalInstance._pendingCallbacks = [callback];
|
7375 | }
|
7376 |
|
7377 |
|
7378 |
|
7379 |
|
7380 | enqueueUpdate(internalInstance);
|
7381 | },
|
7382 |
|
7383 | enqueueCallbackInternal: function (internalInstance, callback) {
|
7384 | if (internalInstance._pendingCallbacks) {
|
7385 | internalInstance._pendingCallbacks.push(callback);
|
7386 | } else {
|
7387 | internalInstance._pendingCallbacks = [callback];
|
7388 | }
|
7389 | enqueueUpdate(internalInstance);
|
7390 | },
|
7391 |
|
7392 | |
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 | enqueueForceUpdate: function (publicInstance) {
|
7406 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
|
7407 |
|
7408 | if (!internalInstance) {
|
7409 | return;
|
7410 | }
|
7411 |
|
7412 | internalInstance._pendingForceUpdate = true;
|
7413 |
|
7414 | enqueueUpdate(internalInstance);
|
7415 | },
|
7416 |
|
7417 | |
7418 |
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 | enqueueReplaceState: function (publicInstance, completeState, callback) {
|
7429 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
|
7430 |
|
7431 | if (!internalInstance) {
|
7432 | return;
|
7433 | }
|
7434 |
|
7435 | internalInstance._pendingStateQueue = [completeState];
|
7436 | internalInstance._pendingReplaceState = true;
|
7437 |
|
7438 |
|
7439 | if (callback !== undefined && callback !== null) {
|
7440 | ReactUpdateQueue.validateCallback(callback, 'replaceState');
|
7441 | if (internalInstance._pendingCallbacks) {
|
7442 | internalInstance._pendingCallbacks.push(callback);
|
7443 | } else {
|
7444 | internalInstance._pendingCallbacks = [callback];
|
7445 | }
|
7446 | }
|
7447 |
|
7448 | enqueueUpdate(internalInstance);
|
7449 | },
|
7450 |
|
7451 | |
7452 |
|
7453 |
|
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 |
|
7459 |
|
7460 |
|
7461 | enqueueSetState: function (publicInstance, partialState) {
|
7462 | if (process.env.NODE_ENV !== 'production') {
|
7463 | ReactInstrumentation.debugTool.onSetState();
|
7464 | process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
|
7465 | }
|
7466 |
|
7467 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
|
7468 |
|
7469 | if (!internalInstance) {
|
7470 | return;
|
7471 | }
|
7472 |
|
7473 | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
|
7474 | queue.push(partialState);
|
7475 |
|
7476 | enqueueUpdate(internalInstance);
|
7477 | },
|
7478 |
|
7479 | enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
|
7480 | internalInstance._pendingElement = nextElement;
|
7481 |
|
7482 | internalInstance._context = nextContext;
|
7483 | enqueueUpdate(internalInstance);
|
7484 | },
|
7485 |
|
7486 | validateCallback: function (callback, callerName) {
|
7487 | !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : _prodInvariant('122', callerName, formatUnexpectedArgument(callback)) : void 0;
|
7488 | }
|
7489 | };
|
7490 |
|
7491 | module.exports = ReactUpdateQueue;
|
7492 |
|
7493 | }),
|
7494 |
|
7495 | (function(module, exports, __webpack_require__) {
|
7496 |
|
7497 | "use strict";
|
7498 |
|
7499 |
|
7500 |
|
7501 |
|
7502 |
|
7503 |
|
7504 |
|
7505 |
|
7506 |
|
7507 |
|
7508 | var ViewportMetrics = {
|
7509 | currentScrollLeft: 0,
|
7510 |
|
7511 | currentScrollTop: 0,
|
7512 |
|
7513 | refreshScrollValues: function (scrollPosition) {
|
7514 | ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
7515 | ViewportMetrics.currentScrollTop = scrollPosition.y;
|
7516 | }
|
7517 | };
|
7518 |
|
7519 | module.exports = ViewportMetrics;
|
7520 |
|
7521 | }),
|
7522 |
|
7523 | (function(module, exports, __webpack_require__) {
|
7524 |
|
7525 | "use strict";
|
7526 |
|
7527 |
|
7528 |
|
7529 |
|
7530 |
|
7531 |
|
7532 |
|
7533 |
|
7534 |
|
7535 |
|
7536 |
|
7537 | var _prodInvariant = __webpack_require__(2);
|
7538 |
|
7539 | var invariant = __webpack_require__(0);
|
7540 |
|
7541 |
|
7542 |
|
7543 |
|
7544 |
|
7545 |
|
7546 |
|
7547 |
|
7548 |
|
7549 |
|
7550 |
|
7551 |
|
7552 |
|
7553 |
|
7554 | function accumulateInto(current, next) {
|
7555 | !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
|
7556 |
|
7557 | if (current == null) {
|
7558 | return next;
|
7559 | }
|
7560 |
|
7561 |
|
7562 |
|
7563 | if (Array.isArray(current)) {
|
7564 | if (Array.isArray(next)) {
|
7565 | current.push.apply(current, next);
|
7566 | return current;
|
7567 | }
|
7568 | current.push(next);
|
7569 | return current;
|
7570 | }
|
7571 |
|
7572 | if (Array.isArray(next)) {
|
7573 |
|
7574 | return [current].concat(next);
|
7575 | }
|
7576 |
|
7577 | return [current, next];
|
7578 | }
|
7579 |
|
7580 | module.exports = accumulateInto;
|
7581 |
|
7582 | }),
|
7583 |
|
7584 | (function(module, exports, __webpack_require__) {
|
7585 |
|
7586 | "use strict";
|
7587 |
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 |
|
7593 |
|
7594 |
|
7595 |
|
7596 |
|
7597 |
|
7598 |
|
7599 |
|
7600 |
|
7601 |
|
7602 |
|
7603 |
|
7604 |
|
7605 |
|
7606 | function forEachAccumulated(arr, cb, scope) {
|
7607 | if (Array.isArray(arr)) {
|
7608 | arr.forEach(cb, scope);
|
7609 | } else if (arr) {
|
7610 | cb.call(scope, arr);
|
7611 | }
|
7612 | }
|
7613 |
|
7614 | module.exports = forEachAccumulated;
|
7615 |
|
7616 | }),
|
7617 |
|
7618 | (function(module, exports, __webpack_require__) {
|
7619 |
|
7620 | "use strict";
|
7621 |
|
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 |
|
7631 | var ExecutionEnvironment = __webpack_require__(5);
|
7632 |
|
7633 | var contentKey = null;
|
7634 |
|
7635 |
|
7636 |
|
7637 |
|
7638 |
|
7639 |
|
7640 |
|
7641 | function getTextContentAccessor() {
|
7642 | if (!contentKey && ExecutionEnvironment.canUseDOM) {
|
7643 |
|
7644 |
|
7645 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
|
7646 | }
|
7647 | return contentKey;
|
7648 | }
|
7649 |
|
7650 | module.exports = getTextContentAccessor;
|
7651 |
|
7652 | }),
|
7653 |
|
7654 | (function(module, exports, __webpack_require__) {
|
7655 |
|
7656 | "use strict";
|
7657 |
|
7658 |
|
7659 |
|
7660 |
|
7661 |
|
7662 |
|
7663 |
|
7664 |
|
7665 |
|
7666 |
|
7667 | var ReactDOMComponentTree = __webpack_require__(4);
|
7668 |
|
7669 | function isCheckable(elem) {
|
7670 | var type = elem.type;
|
7671 | var nodeName = elem.nodeName;
|
7672 | return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
|
7673 | }
|
7674 |
|
7675 | function getTracker(inst) {
|
7676 | return inst._wrapperState.valueTracker;
|
7677 | }
|
7678 |
|
7679 | function attachTracker(inst, tracker) {
|
7680 | inst._wrapperState.valueTracker = tracker;
|
7681 | }
|
7682 |
|
7683 | function detachTracker(inst) {
|
7684 | inst._wrapperState.valueTracker = null;
|
7685 | }
|
7686 |
|
7687 | function getValueFromNode(node) {
|
7688 | var value;
|
7689 | if (node) {
|
7690 | value = isCheckable(node) ? '' + node.checked : node.value;
|
7691 | }
|
7692 | return value;
|
7693 | }
|
7694 |
|
7695 | var inputValueTracking = {
|
7696 |
|
7697 | _getTrackerFromNode: function (node) {
|
7698 | return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
|
7699 | },
|
7700 |
|
7701 |
|
7702 | track: function (inst) {
|
7703 | if (getTracker(inst)) {
|
7704 | return;
|
7705 | }
|
7706 |
|
7707 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
7708 | var valueField = isCheckable(node) ? 'checked' : 'value';
|
7709 | var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
|
7710 |
|
7711 | var currentValue = '' + node[valueField];
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 | if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
|
7718 | return;
|
7719 | }
|
7720 |
|
7721 | Object.defineProperty(node, valueField, {
|
7722 | enumerable: descriptor.enumerable,
|
7723 | configurable: true,
|
7724 | get: function () {
|
7725 | return descriptor.get.call(this);
|
7726 | },
|
7727 | set: function (value) {
|
7728 | currentValue = '' + value;
|
7729 | descriptor.set.call(this, value);
|
7730 | }
|
7731 | });
|
7732 |
|
7733 | attachTracker(inst, {
|
7734 | getValue: function () {
|
7735 | return currentValue;
|
7736 | },
|
7737 | setValue: function (value) {
|
7738 | currentValue = '' + value;
|
7739 | },
|
7740 | stopTracking: function () {
|
7741 | detachTracker(inst);
|
7742 | delete node[valueField];
|
7743 | }
|
7744 | });
|
7745 | },
|
7746 |
|
7747 | updateValueIfChanged: function (inst) {
|
7748 | if (!inst) {
|
7749 | return false;
|
7750 | }
|
7751 | var tracker = getTracker(inst);
|
7752 |
|
7753 | if (!tracker) {
|
7754 | inputValueTracking.track(inst);
|
7755 | return true;
|
7756 | }
|
7757 |
|
7758 | var lastValue = tracker.getValue();
|
7759 | var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
|
7760 |
|
7761 | if (nextValue !== lastValue) {
|
7762 | tracker.setValue(nextValue);
|
7763 | return true;
|
7764 | }
|
7765 |
|
7766 | return false;
|
7767 | },
|
7768 | stopTracking: function (inst) {
|
7769 | var tracker = getTracker(inst);
|
7770 | if (tracker) {
|
7771 | tracker.stopTracking();
|
7772 | }
|
7773 | }
|
7774 | };
|
7775 |
|
7776 | module.exports = inputValueTracking;
|
7777 |
|
7778 | }),
|
7779 |
|
7780 | (function(module, exports, __webpack_require__) {
|
7781 |
|
7782 | "use strict";
|
7783 |
|
7784 |
|
7785 |
|
7786 |
|
7787 |
|
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 |
|
7793 | var _prodInvariant = __webpack_require__(2),
|
7794 | _assign = __webpack_require__(3);
|
7795 |
|
7796 | var ReactCompositeComponent = __webpack_require__(133);
|
7797 | var ReactEmptyComponent = __webpack_require__(59);
|
7798 | var ReactHostComponent = __webpack_require__(60);
|
7799 |
|
7800 | var getNextDebugID = __webpack_require__(198);
|
7801 | var invariant = __webpack_require__(0);
|
7802 | var warning = __webpack_require__(1);
|
7803 |
|
7804 |
|
7805 | var ReactCompositeComponentWrapper = function (element) {
|
7806 | this.construct(element);
|
7807 | };
|
7808 |
|
7809 | function getDeclarationErrorAddendum(owner) {
|
7810 | if (owner) {
|
7811 | var name = owner.getName();
|
7812 | if (name) {
|
7813 | return ' Check the render method of `' + name + '`.';
|
7814 | }
|
7815 | }
|
7816 | return '';
|
7817 | }
|
7818 |
|
7819 |
|
7820 |
|
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 | function isInternalComponentType(type) {
|
7827 | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
|
7828 | }
|
7829 |
|
7830 |
|
7831 |
|
7832 |
|
7833 |
|
7834 |
|
7835 |
|
7836 |
|
7837 |
|
7838 | function instantiateReactComponent(node, shouldHaveDebugID) {
|
7839 | var instance;
|
7840 |
|
7841 | if (node === null || node === false) {
|
7842 | instance = ReactEmptyComponent.create(instantiateReactComponent);
|
7843 | } else if (typeof node === 'object') {
|
7844 | var element = node;
|
7845 | var type = element.type;
|
7846 | if (typeof type !== 'function' && typeof type !== 'string') {
|
7847 | var info = '';
|
7848 | if (process.env.NODE_ENV !== 'production') {
|
7849 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
7850 | info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
7851 | }
|
7852 | }
|
7853 | info += getDeclarationErrorAddendum(element._owner);
|
7854 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
|
7855 | }
|
7856 |
|
7857 |
|
7858 | if (typeof element.type === 'string') {
|
7859 | instance = ReactHostComponent.createInternalComponent(element);
|
7860 | } else if (isInternalComponentType(element.type)) {
|
7861 |
|
7862 |
|
7863 |
|
7864 | instance = new element.type(element);
|
7865 |
|
7866 |
|
7867 | if (!instance.getHostNode) {
|
7868 | instance.getHostNode = instance.getNativeNode;
|
7869 | }
|
7870 | } else {
|
7871 | instance = new ReactCompositeComponentWrapper(element);
|
7872 | }
|
7873 | } else if (typeof node === 'string' || typeof node === 'number') {
|
7874 | instance = ReactHostComponent.createInstanceForText(node);
|
7875 | } else {
|
7876 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
|
7877 | }
|
7878 |
|
7879 | if (process.env.NODE_ENV !== 'production') {
|
7880 | process.env.NODE_ENV !== 'production' ? warning(typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.getHostNode === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : void 0;
|
7881 | }
|
7882 |
|
7883 |
|
7884 |
|
7885 |
|
7886 | instance._mountIndex = 0;
|
7887 | instance._mountImage = null;
|
7888 |
|
7889 | if (process.env.NODE_ENV !== 'production') {
|
7890 | instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
|
7891 | }
|
7892 |
|
7893 |
|
7894 |
|
7895 | if (process.env.NODE_ENV !== 'production') {
|
7896 | if (Object.preventExtensions) {
|
7897 | Object.preventExtensions(instance);
|
7898 | }
|
7899 | }
|
7900 |
|
7901 | return instance;
|
7902 | }
|
7903 |
|
7904 | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
|
7905 | _instantiateReactComponent: instantiateReactComponent
|
7906 | });
|
7907 |
|
7908 | module.exports = instantiateReactComponent;
|
7909 |
|
7910 | }),
|
7911 |
|
7912 | (function(module, exports, __webpack_require__) {
|
7913 |
|
7914 | "use strict";
|
7915 |
|
7916 |
|
7917 |
|
7918 |
|
7919 |
|
7920 |
|
7921 |
|
7922 |
|
7923 |
|
7924 |
|
7925 |
|
7926 |
|
7927 |
|
7928 |
|
7929 |
|
7930 | var supportedInputTypes = {
|
7931 | color: true,
|
7932 | date: true,
|
7933 | datetime: true,
|
7934 | 'datetime-local': true,
|
7935 | email: true,
|
7936 | month: true,
|
7937 | number: true,
|
7938 | password: true,
|
7939 | range: true,
|
7940 | search: true,
|
7941 | tel: true,
|
7942 | text: true,
|
7943 | time: true,
|
7944 | url: true,
|
7945 | week: true
|
7946 | };
|
7947 |
|
7948 | function isTextInputElement(elem) {
|
7949 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
7950 |
|
7951 | if (nodeName === 'input') {
|
7952 | return !!supportedInputTypes[elem.type];
|
7953 | }
|
7954 |
|
7955 | if (nodeName === 'textarea') {
|
7956 | return true;
|
7957 | }
|
7958 |
|
7959 | return false;
|
7960 | }
|
7961 |
|
7962 | module.exports = isTextInputElement;
|
7963 |
|
7964 | }),
|
7965 |
|
7966 | (function(module, exports, __webpack_require__) {
|
7967 |
|
7968 | "use strict";
|
7969 |
|
7970 |
|
7971 |
|
7972 |
|
7973 |
|
7974 |
|
7975 |
|
7976 |
|
7977 |
|
7978 |
|
7979 | var ExecutionEnvironment = __webpack_require__(5);
|
7980 | var escapeTextContentForBrowser = __webpack_require__(25);
|
7981 | var setInnerHTML = __webpack_require__(43);
|
7982 |
|
7983 |
|
7984 |
|
7985 |
|
7986 |
|
7987 |
|
7988 |
|
7989 |
|
7990 |
|
7991 |
|
7992 |
|
7993 | var setTextContent = function (node, text) {
|
7994 | if (text) {
|
7995 | var firstChild = node.firstChild;
|
7996 |
|
7997 | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
|
7998 | firstChild.nodeValue = text;
|
7999 | return;
|
8000 | }
|
8001 | }
|
8002 | node.textContent = text;
|
8003 | };
|
8004 |
|
8005 | if (ExecutionEnvironment.canUseDOM) {
|
8006 | if (!('textContent' in document.documentElement)) {
|
8007 | setTextContent = function (node, text) {
|
8008 | if (node.nodeType === 3) {
|
8009 | node.nodeValue = text;
|
8010 | return;
|
8011 | }
|
8012 | setInnerHTML(node, escapeTextContentForBrowser(text));
|
8013 | };
|
8014 | }
|
8015 | }
|
8016 |
|
8017 | module.exports = setTextContent;
|
8018 |
|
8019 | }),
|
8020 |
|
8021 | (function(module, exports, __webpack_require__) {
|
8022 |
|
8023 | "use strict";
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 |
|
8030 |
|
8031 |
|
8032 |
|
8033 |
|
8034 |
|
8035 |
|
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 |
|
8041 |
|
8042 |
|
8043 |
|
8044 |
|
8045 |
|
8046 | function shouldUpdateReactComponent(prevElement, nextElement) {
|
8047 | var prevEmpty = prevElement === null || prevElement === false;
|
8048 | var nextEmpty = nextElement === null || nextElement === false;
|
8049 | if (prevEmpty || nextEmpty) {
|
8050 | return prevEmpty === nextEmpty;
|
8051 | }
|
8052 |
|
8053 | var prevType = typeof prevElement;
|
8054 | var nextType = typeof nextElement;
|
8055 | if (prevType === 'string' || prevType === 'number') {
|
8056 | return nextType === 'string' || nextType === 'number';
|
8057 | } else {
|
8058 | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
|
8059 | }
|
8060 | }
|
8061 |
|
8062 | module.exports = shouldUpdateReactComponent;
|
8063 |
|
8064 | }),
|
8065 |
|
8066 | (function(module, exports, __webpack_require__) {
|
8067 |
|
8068 | "use strict";
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 |
|
8079 | var _prodInvariant = __webpack_require__(2);
|
8080 |
|
8081 | var ReactCurrentOwner = __webpack_require__(11);
|
8082 | var REACT_ELEMENT_TYPE = __webpack_require__(147);
|
8083 |
|
8084 | var getIteratorFn = __webpack_require__(183);
|
8085 | var invariant = __webpack_require__(0);
|
8086 | var KeyEscapeUtils = __webpack_require__(32);
|
8087 | var warning = __webpack_require__(1);
|
8088 |
|
8089 | var SEPARATOR = '.';
|
8090 | var SUBSEPARATOR = ':';
|
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 |
|
8097 |
|
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 | var didWarnAboutMaps = false;
|
8104 |
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 | function getComponentKey(component, index) {
|
8113 |
|
8114 |
|
8115 | if (component && typeof component === 'object' && component.key != null) {
|
8116 |
|
8117 | return KeyEscapeUtils.escape(component.key);
|
8118 | }
|
8119 |
|
8120 | return index.toString(36);
|
8121 | }
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
8132 | var type = typeof children;
|
8133 |
|
8134 | if (type === 'undefined' || type === 'boolean') {
|
8135 |
|
8136 | children = null;
|
8137 | }
|
8138 |
|
8139 | if (children === null || type === 'string' || type === 'number' ||
|
8140 |
|
8141 |
|
8142 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
8143 | callback(traverseContext, children,
|
8144 |
|
8145 |
|
8146 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
8147 | return 1;
|
8148 | }
|
8149 |
|
8150 | var child;
|
8151 | var nextName;
|
8152 | var subtreeCount = 0;
|
8153 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
8154 |
|
8155 | if (Array.isArray(children)) {
|
8156 | for (var i = 0; i < children.length; i++) {
|
8157 | child = children[i];
|
8158 | nextName = nextNamePrefix + getComponentKey(child, i);
|
8159 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
8160 | }
|
8161 | } else {
|
8162 | var iteratorFn = getIteratorFn(children);
|
8163 | if (iteratorFn) {
|
8164 | var iterator = iteratorFn.call(children);
|
8165 | var step;
|
8166 | if (iteratorFn !== children.entries) {
|
8167 | var ii = 0;
|
8168 | while (!(step = iterator.next()).done) {
|
8169 | child = step.value;
|
8170 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
8171 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
8172 | }
|
8173 | } else {
|
8174 | if (process.env.NODE_ENV !== 'production') {
|
8175 | var mapsAsChildrenAddendum = '';
|
8176 | if (ReactCurrentOwner.current) {
|
8177 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
8178 | if (mapsAsChildrenOwnerName) {
|
8179 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
8180 | }
|
8181 | }
|
8182 | process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
8183 | didWarnAboutMaps = true;
|
8184 | }
|
8185 |
|
8186 | while (!(step = iterator.next()).done) {
|
8187 | var entry = step.value;
|
8188 | if (entry) {
|
8189 | child = entry[1];
|
8190 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
8191 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
8192 | }
|
8193 | }
|
8194 | }
|
8195 | } else if (type === 'object') {
|
8196 | var addendum = '';
|
8197 | if (process.env.NODE_ENV !== 'production') {
|
8198 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
8199 | if (children._isReactElement) {
|
8200 | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
8201 | }
|
8202 | if (ReactCurrentOwner.current) {
|
8203 | var name = ReactCurrentOwner.current.getName();
|
8204 | if (name) {
|
8205 | addendum += ' Check the render method of `' + name + '`.';
|
8206 | }
|
8207 | }
|
8208 | }
|
8209 | var childrenString = String(children);
|
8210 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
8211 | }
|
8212 | }
|
8213 |
|
8214 | return subtreeCount;
|
8215 | }
|
8216 |
|
8217 |
|
8218 |
|
8219 |
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 | function traverseAllChildren(children, callback, traverseContext) {
|
8234 | if (children == null) {
|
8235 | return 0;
|
8236 | }
|
8237 |
|
8238 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
8239 | }
|
8240 |
|
8241 | module.exports = traverseAllChildren;
|
8242 |
|
8243 | }),
|
8244 |
|
8245 | (function(module, exports, __webpack_require__) {
|
8246 |
|
8247 | "use strict";
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 | var _prodInvariant = __webpack_require__(14),
|
8259 | _assign = __webpack_require__(3);
|
8260 |
|
8261 | var ReactNoopUpdateQueue = __webpack_require__(78);
|
8262 |
|
8263 | var canDefineProperty = __webpack_require__(26);
|
8264 | var emptyObject = __webpack_require__(22);
|
8265 | var invariant = __webpack_require__(0);
|
8266 | var lowPriorityWarning = __webpack_require__(45);
|
8267 |
|
8268 |
|
8269 |
|
8270 |
|
8271 | function ReactComponent(props, context, updater) {
|
8272 | this.props = props;
|
8273 | this.context = context;
|
8274 | this.refs = emptyObject;
|
8275 |
|
8276 |
|
8277 | this.updater = updater || ReactNoopUpdateQueue;
|
8278 | }
|
8279 |
|
8280 | ReactComponent.prototype.isReactComponent = {};
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 |
|
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 |
|
8302 |
|
8303 |
|
8304 |
|
8305 |
|
8306 |
|
8307 | ReactComponent.prototype.setState = function (partialState, callback) {
|
8308 | !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : _prodInvariant('85') : void 0;
|
8309 | this.updater.enqueueSetState(this, partialState);
|
8310 | if (callback) {
|
8311 | this.updater.enqueueCallback(this, callback, 'setState');
|
8312 | }
|
8313 | };
|
8314 |
|
8315 |
|
8316 |
|
8317 |
|
8318 |
|
8319 |
|
8320 |
|
8321 |
|
8322 |
|
8323 |
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 | ReactComponent.prototype.forceUpdate = function (callback) {
|
8330 | this.updater.enqueueForceUpdate(this);
|
8331 | if (callback) {
|
8332 | this.updater.enqueueCallback(this, callback, 'forceUpdate');
|
8333 | }
|
8334 | };
|
8335 |
|
8336 |
|
8337 |
|
8338 |
|
8339 |
|
8340 |
|
8341 | if (process.env.NODE_ENV !== 'production') {
|
8342 | var deprecatedAPIs = {
|
8343 | isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
8344 | replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
8345 | };
|
8346 | var defineDeprecationWarning = function (methodName, info) {
|
8347 | if (canDefineProperty) {
|
8348 | Object.defineProperty(ReactComponent.prototype, methodName, {
|
8349 | get: function () {
|
8350 | lowPriorityWarning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
8351 | return undefined;
|
8352 | }
|
8353 | });
|
8354 | }
|
8355 | };
|
8356 | for (var fnName in deprecatedAPIs) {
|
8357 | if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
8358 | defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
8359 | }
|
8360 | }
|
8361 | }
|
8362 |
|
8363 |
|
8364 |
|
8365 |
|
8366 | function ReactPureComponent(props, context, updater) {
|
8367 |
|
8368 | this.props = props;
|
8369 | this.context = context;
|
8370 | this.refs = emptyObject;
|
8371 |
|
8372 |
|
8373 | this.updater = updater || ReactNoopUpdateQueue;
|
8374 | }
|
8375 |
|
8376 | function ComponentDummy() {}
|
8377 | ComponentDummy.prototype = ReactComponent.prototype;
|
8378 | ReactPureComponent.prototype = new ComponentDummy();
|
8379 | ReactPureComponent.prototype.constructor = ReactPureComponent;
|
8380 |
|
8381 | _assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
8382 | ReactPureComponent.prototype.isPureReactComponent = true;
|
8383 |
|
8384 | module.exports = {
|
8385 | Component: ReactComponent,
|
8386 | PureComponent: ReactPureComponent
|
8387 | };
|
8388 |
|
8389 | }),
|
8390 |
|
8391 | (function(module, exports, __webpack_require__) {
|
8392 |
|
8393 | "use strict";
|
8394 |
|
8395 |
|
8396 |
|
8397 |
|
8398 |
|
8399 |
|
8400 |
|
8401 |
|
8402 |
|
8403 |
|
8404 |
|
8405 |
|
8406 |
|
8407 |
|
8408 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
8409 |
|
8410 | module.exports = REACT_ELEMENT_TYPE;
|
8411 |
|
8412 | }),
|
8413 |
|
8414 | (function(module, exports, __webpack_require__) {
|
8415 |
|
8416 | "use strict";
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 |
|
8432 |
|
8433 |
|
8434 | var ReactCurrentOwner = __webpack_require__(11);
|
8435 | var ReactComponentTreeHook = __webpack_require__(8);
|
8436 | var ReactElement = __webpack_require__(13);
|
8437 |
|
8438 | var checkReactTypeSpec = __webpack_require__(196);
|
8439 |
|
8440 | var canDefineProperty = __webpack_require__(26);
|
8441 | var getIteratorFn = __webpack_require__(79);
|
8442 | var warning = __webpack_require__(1);
|
8443 | var lowPriorityWarning = __webpack_require__(45);
|
8444 |
|
8445 | function getDeclarationErrorAddendum() {
|
8446 | if (ReactCurrentOwner.current) {
|
8447 | var name = ReactCurrentOwner.current.getName();
|
8448 | if (name) {
|
8449 | return ' Check the render method of `' + name + '`.';
|
8450 | }
|
8451 | }
|
8452 | return '';
|
8453 | }
|
8454 |
|
8455 | function getSourceInfoErrorAddendum(elementProps) {
|
8456 | if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
|
8457 | var source = elementProps.__source;
|
8458 | var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
8459 | var lineNumber = source.lineNumber;
|
8460 | return ' Check your code at ' + fileName + ':' + lineNumber + '.';
|
8461 | }
|
8462 | return '';
|
8463 | }
|
8464 |
|
8465 |
|
8466 |
|
8467 |
|
8468 |
|
8469 |
|
8470 | var ownerHasKeyUseWarning = {};
|
8471 |
|
8472 | function getCurrentComponentErrorInfo(parentType) {
|
8473 | var info = getDeclarationErrorAddendum();
|
8474 |
|
8475 | if (!info) {
|
8476 | var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
8477 | if (parentName) {
|
8478 | info = ' Check the top-level render call using <' + parentName + '>.';
|
8479 | }
|
8480 | }
|
8481 | return info;
|
8482 | }
|
8483 |
|
8484 |
|
8485 |
|
8486 |
|
8487 |
|
8488 |
|
8489 |
|
8490 |
|
8491 |
|
8492 |
|
8493 |
|
8494 |
|
8495 | function validateExplicitKey(element, parentType) {
|
8496 | if (!element._store || element._store.validated || element.key != null) {
|
8497 | return;
|
8498 | }
|
8499 | element._store.validated = true;
|
8500 |
|
8501 | var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
|
8502 |
|
8503 | var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
8504 | if (memoizer[currentComponentErrorInfo]) {
|
8505 | return;
|
8506 | }
|
8507 | memoizer[currentComponentErrorInfo] = true;
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 | var childOwner = '';
|
8513 | if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
8514 |
|
8515 | childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
|
8516 | }
|
8517 |
|
8518 | process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0;
|
8519 | }
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 |
|
8529 |
|
8530 | function validateChildKeys(node, parentType) {
|
8531 | if (typeof node !== 'object') {
|
8532 | return;
|
8533 | }
|
8534 | if (Array.isArray(node)) {
|
8535 | for (var i = 0; i < node.length; i++) {
|
8536 | var child = node[i];
|
8537 | if (ReactElement.isValidElement(child)) {
|
8538 | validateExplicitKey(child, parentType);
|
8539 | }
|
8540 | }
|
8541 | } else if (ReactElement.isValidElement(node)) {
|
8542 |
|
8543 | if (node._store) {
|
8544 | node._store.validated = true;
|
8545 | }
|
8546 | } else if (node) {
|
8547 | var iteratorFn = getIteratorFn(node);
|
8548 |
|
8549 | if (iteratorFn) {
|
8550 | if (iteratorFn !== node.entries) {
|
8551 | var iterator = iteratorFn.call(node);
|
8552 | var step;
|
8553 | while (!(step = iterator.next()).done) {
|
8554 | if (ReactElement.isValidElement(step.value)) {
|
8555 | validateExplicitKey(step.value, parentType);
|
8556 | }
|
8557 | }
|
8558 | }
|
8559 | }
|
8560 | }
|
8561 | }
|
8562 |
|
8563 |
|
8564 |
|
8565 |
|
8566 |
|
8567 |
|
8568 |
|
8569 | function validatePropTypes(element) {
|
8570 | var componentClass = element.type;
|
8571 | if (typeof componentClass !== 'function') {
|
8572 | return;
|
8573 | }
|
8574 | var name = componentClass.displayName || componentClass.name;
|
8575 | if (componentClass.propTypes) {
|
8576 | checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name, element, null);
|
8577 | }
|
8578 | if (typeof componentClass.getDefaultProps === 'function') {
|
8579 | process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
8580 | }
|
8581 | }
|
8582 |
|
8583 | var ReactElementValidator = {
|
8584 | createElement: function (type, props, children) {
|
8585 | var validType = typeof type === 'string' || typeof type === 'function';
|
8586 |
|
8587 |
|
8588 | if (!validType) {
|
8589 | if (typeof type !== 'function' && typeof type !== 'string') {
|
8590 | var info = '';
|
8591 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
8592 | info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
8593 | }
|
8594 |
|
8595 | var sourceInfo = getSourceInfoErrorAddendum(props);
|
8596 | if (sourceInfo) {
|
8597 | info += sourceInfo;
|
8598 | } else {
|
8599 | info += getDeclarationErrorAddendum();
|
8600 | }
|
8601 |
|
8602 | info += ReactComponentTreeHook.getCurrentStackAddendum();
|
8603 |
|
8604 | var currentSource = props !== null && props !== undefined && props.__source !== undefined ? props.__source : null;
|
8605 | ReactComponentTreeHook.pushNonStandardWarningStack(true, currentSource);
|
8606 | process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
|
8607 | ReactComponentTreeHook.popNonStandardWarningStack();
|
8608 | }
|
8609 | }
|
8610 |
|
8611 | var element = ReactElement.createElement.apply(this, arguments);
|
8612 |
|
8613 |
|
8614 |
|
8615 | if (element == null) {
|
8616 | return element;
|
8617 | }
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 | if (validType) {
|
8625 | for (var i = 2; i < arguments.length; i++) {
|
8626 | validateChildKeys(arguments[i], type);
|
8627 | }
|
8628 | }
|
8629 |
|
8630 | validatePropTypes(element);
|
8631 |
|
8632 | return element;
|
8633 | },
|
8634 |
|
8635 | createFactory: function (type) {
|
8636 | var validatedFactory = ReactElementValidator.createElement.bind(null, type);
|
8637 |
|
8638 | validatedFactory.type = type;
|
8639 |
|
8640 | if (process.env.NODE_ENV !== 'production') {
|
8641 | if (canDefineProperty) {
|
8642 | Object.defineProperty(validatedFactory, 'type', {
|
8643 | enumerable: false,
|
8644 | get: function () {
|
8645 | lowPriorityWarning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
8646 | Object.defineProperty(this, 'type', {
|
8647 | value: type
|
8648 | });
|
8649 | return type;
|
8650 | }
|
8651 | });
|
8652 | }
|
8653 | }
|
8654 |
|
8655 | return validatedFactory;
|
8656 | },
|
8657 |
|
8658 | cloneElement: function (element, props, children) {
|
8659 | var newElement = ReactElement.cloneElement.apply(this, arguments);
|
8660 | for (var i = 2; i < arguments.length; i++) {
|
8661 | validateChildKeys(arguments[i], newElement.type);
|
8662 | }
|
8663 | validatePropTypes(newElement);
|
8664 | return newElement;
|
8665 | }
|
8666 | };
|
8667 |
|
8668 | module.exports = ReactElementValidator;
|
8669 |
|
8670 | }),
|
8671 |
|
8672 | (function(module, exports, __webpack_require__) {
|
8673 |
|
8674 | "use strict";
|
8675 |
|
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 | var warning = __webpack_require__(1);
|
8686 |
|
8687 | function warnNoop(publicInstance, callerName) {
|
8688 | if (process.env.NODE_ENV !== 'production') {
|
8689 | var constructor = publicInstance.constructor;
|
8690 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
8691 | }
|
8692 | }
|
8693 |
|
8694 | /**
|
8695 | * This is the abstract API for an update queue.
|
8696 | */
|
8697 | var ReactNoopUpdateQueue = {
|
8698 | |
8699 |
|
8700 |
|
8701 |
|
8702 |
|
8703 |
|
8704 |
|
8705 | isMounted: function (publicInstance) {
|
8706 | return false;
|
8707 | },
|
8708 |
|
8709 | |
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 | enqueueCallback: function (publicInstance, callback) {},
|
8718 |
|
8719 | |
8720 |
|
8721 |
|
8722 |
|
8723 |
|
8724 |
|
8725 |
|
8726 |
|
8727 |
|
8728 |
|
8729 |
|
8730 |
|
8731 |
|
8732 | enqueueForceUpdate: function (publicInstance) {
|
8733 | warnNoop(publicInstance, 'forceUpdate');
|
8734 | },
|
8735 |
|
8736 | |
8737 |
|
8738 |
|
8739 |
|
8740 |
|
8741 |
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 |
|
8747 | enqueueReplaceState: function (publicInstance, completeState) {
|
8748 | warnNoop(publicInstance, 'replaceState');
|
8749 | },
|
8750 |
|
8751 | |
8752 |
|
8753 |
|
8754 |
|
8755 |
|
8756 |
|
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 | enqueueSetState: function (publicInstance, partialState) {
|
8762 | warnNoop(publicInstance, 'setState');
|
8763 | }
|
8764 | };
|
8765 |
|
8766 | module.exports = ReactNoopUpdateQueue;
|
8767 |
|
8768 | }),
|
8769 |
|
8770 | (function(module, exports, __webpack_require__) {
|
8771 |
|
8772 | "use strict";
|
8773 |
|
8774 |
|
8775 |
|
8776 |
|
8777 |
|
8778 |
|
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
8787 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 |
|
8800 |
|
8801 |
|
8802 |
|
8803 | function getIteratorFn(maybeIterable) {
|
8804 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
8805 | if (typeof iteratorFn === 'function') {
|
8806 | return iteratorFn;
|
8807 | }
|
8808 | }
|
8809 |
|
8810 | module.exports = getIteratorFn;
|
8811 |
|
8812 | }),
|
8813 |
|
8814 | (function(module, exports) {
|
8815 |
|
8816 | module.exports = require("async");
|
8817 |
|
8818 | }),
|
8819 |
|
8820 | (function(module, exports) {
|
8821 |
|
8822 | module.exports = require("fs");
|
8823 |
|
8824 | }),
|
8825 |
|
8826 | (function(module, exports) {
|
8827 |
|
8828 | module.exports = require("path");
|
8829 |
|
8830 | }),
|
8831 |
|
8832 | (function(module, exports, __webpack_require__) {
|
8833 |
|
8834 | "use strict";
|
8835 |
|
8836 |
|
8837 | Object.defineProperty(exports, "__esModule", {
|
8838 | value: true
|
8839 | });
|
8840 |
|
8841 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
8842 |
|
8843 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
8844 |
|
8845 | __webpack_require__(91);
|
8846 |
|
8847 | var _async = __webpack_require__(80);
|
8848 |
|
8849 | var _async2 = _interopRequireDefault(_async);
|
8850 |
|
8851 | var _cookie = __webpack_require__(202);
|
8852 |
|
8853 | var _cookie2 = _interopRequireDefault(_cookie);
|
8854 |
|
8855 | var _bodyParser = __webpack_require__(201);
|
8856 |
|
8857 | var _bodyParser2 = _interopRequireDefault(_bodyParser);
|
8858 |
|
8859 | var _cookieParser = __webpack_require__(203);
|
8860 |
|
8861 | var _cookieParser2 = _interopRequireDefault(_cookieParser);
|
8862 |
|
8863 | var _express = __webpack_require__(205);
|
8864 |
|
8865 | var _express2 = _interopRequireDefault(_express);
|
8866 |
|
8867 | var _InternationalizationHandler = __webpack_require__(95);
|
8868 |
|
8869 | var _InternationalizationHandler2 = _interopRequireDefault(_InternationalizationHandler);
|
8870 |
|
8871 | var _UniversalPageHandler = __webpack_require__(94);
|
8872 |
|
8873 | var _UniversalPageHandler2 = _interopRequireDefault(_UniversalPageHandler);
|
8874 |
|
8875 | var _path = __webpack_require__(82);
|
8876 |
|
8877 | var _path2 = _interopRequireDefault(_path);
|
8878 |
|
8879 | var _preconditions = __webpack_require__(211);
|
8880 |
|
8881 | var _preconditions2 = _interopRequireDefault(_preconditions);
|
8882 |
|
8883 | var _querystring = __webpack_require__(212);
|
8884 |
|
8885 | var _querystring2 = _interopRequireDefault(_querystring);
|
8886 |
|
8887 | var _react = __webpack_require__(46);
|
8888 |
|
8889 | var _react2 = _interopRequireDefault(_react);
|
8890 |
|
8891 | var _server = __webpack_require__(187);
|
8892 |
|
8893 | var _reactRedux = __webpack_require__(213);
|
8894 |
|
8895 | var _reactRouter = __webpack_require__(214);
|
8896 |
|
8897 | var _redux = __webpack_require__(215);
|
8898 |
|
8899 | var _reduxThunk = __webpack_require__(216);
|
8900 |
|
8901 | var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
|
8902 |
|
8903 | var _SimpleHtmlRenderer = __webpack_require__(93);
|
8904 |
|
8905 | var _SimpleHtmlRenderer2 = _interopRequireDefault(_SimpleHtmlRenderer);
|
8906 |
|
8907 | var _core = __webpack_require__(88);
|
8908 |
|
8909 | var _resolveToString = __webpack_require__(102);
|
8910 |
|
8911 | var _resolveToString2 = _interopRequireDefault(_resolveToString);
|
8912 |
|
8913 | var _forcedomain = __webpack_require__(207);
|
8914 |
|
8915 | var _forcedomain2 = _interopRequireDefault(_forcedomain);
|
8916 |
|
8917 | var _url = __webpack_require__(218);
|
8918 |
|
8919 | var _url2 = _interopRequireDefault(_url);
|
8920 |
|
8921 | var _rotatingFileStream = __webpack_require__(217);
|
8922 |
|
8923 | var _rotatingFileStream2 = _interopRequireDefault(_rotatingFileStream);
|
8924 |
|
8925 | var _morgan = __webpack_require__(209);
|
8926 |
|
8927 | var _morgan2 = _interopRequireDefault(_morgan);
|
8928 |
|
8929 | var _fs = __webpack_require__(81);
|
8930 |
|
8931 | var _fs2 = _interopRequireDefault(_fs);
|
8932 |
|
8933 | var _parseurl = __webpack_require__(210);
|
8934 |
|
8935 | var _parseurl2 = _interopRequireDefault(_parseurl);
|
8936 |
|
8937 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8938 |
|
8939 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
8940 |
|
8941 | var project = __PROJECT__;
|
8942 | var logger = global.Logger.getLogger('ExpressUniversalApplicationServer');
|
8943 |
|
8944 | var LOCALE_REGEX = /^\/([a-z]{2})-([a-z]{2})(.*)$/;
|
8945 | var LOCALE_DEFAULT = 'id-id';
|
8946 |
|
8947 | var QS_REGEX = /^\?(.*)$/;
|
8948 |
|
8949 | var createStoreWithMiddleware = (0, _redux.applyMiddleware)(_reduxThunk2.default)(_redux.createStore);
|
8950 |
|
8951 |
|
8952 | process.on('uncaughtException', function (err) {
|
8953 | console.log("[CRASH] [ERROR] error log: ", err);
|
8954 | });
|
8955 |
|
8956 | var ExpressUniversalApplicationServer = function () {
|
8957 | function ExpressUniversalApplicationServer(options) {
|
8958 | _classCallCheck(this, ExpressUniversalApplicationServer);
|
8959 |
|
8960 | var pc = _preconditions2.default.instance(options);
|
8961 | pc.shouldBeDefined('port', 'port must be defined.');
|
8962 | pc.shouldBeDefined('rootApplicationPath', 'rootApplicationPath must be defined.');
|
8963 | pc.shouldBeDefined('rootDeploymentApplicationPath', 'rootDeploymentApplicationPath must be defined.');
|
8964 | this._options = options;
|
8965 | this._app = (0, _express2.default)();
|
8966 | this._routes = this.getRoutes();
|
8967 | this._reducers = this.getReducers();
|
8968 | this._initialize();
|
8969 | }
|
8970 |
|
8971 | _createClass(ExpressUniversalApplicationServer, [{
|
8972 | key: '_initialize',
|
8973 | value: function _initialize() {
|
8974 |
|
8975 | this._setupForceDomain();
|
8976 | this._setupAssetsServing();
|
8977 | this._setupCookieParser();
|
8978 | this._setupBodyParser();
|
8979 | this._setupHtmlRenderer();
|
8980 | this._setupInternationalizedRoutes();
|
8981 | this._setupI18nHandler();
|
8982 | this._setupXSSPrevention();
|
8983 | }
|
8984 | }, {
|
8985 | key: '_setupRequestLogMiddleware',
|
8986 | value: function _setupRequestLogMiddleware() {
|
8987 | var logDirectory = '/logs/' + project.applicationName;
|
8988 | _fs2.default.existsSync(logDirectory) || _fs2.default.mkdirSync(logDirectory);
|
8989 |
|
8990 | function pad(num) {
|
8991 | return (num > 9 ? '' : '0') + num;
|
8992 | }
|
8993 |
|
8994 | function generator(time, index) {
|
8995 | logger.info('[GENERATOR] Request log rotation ' + time + '-' + index);
|
8996 | if (!time) {
|
8997 |
|
8998 | }
|
8999 |
|
9000 | var yearMonth = time.getFullYear() + '-' + pad(time.getMonth() + 1);
|
9001 | var day = pad(time.getDate());
|
9002 | var hour = pad(time.getHours());
|
9003 | var minute = pad(time.getMinutes());
|
9004 | var seconds = pad(time.getSeconds());
|
9005 |
|
9006 | logger.info('[GENERATOR] ' + logDirectory + '/request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + '.log.gz');
|
9007 |
|
9008 | return 'request-' + yearMonth + '-' + day + '-' + hour + '-' + minute + '-' + seconds + 'log.gz';
|
9009 | }
|
9010 |
|
9011 | this._accessLogStream = (0, _rotatingFileStream2.default)(generator, {
|
9012 | path: logDirectory,
|
9013 | compress: true,
|
9014 | interval: '10s',
|
9015 | rotate: 7
|
9016 | });
|
9017 |
|
9018 | logger.info('Setting up morgan (Request Log Middleware)');
|
9019 | this._app.use((0, _morgan2.default)('combined', { stream: this._accessLogStream }));
|
9020 | }
|
9021 | }, {
|
9022 | key: '_setupAssetsServing',
|
9023 | value: function _setupAssetsServing() {
|
9024 | console.log(_path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client'));
|
9025 |
|
9026 | var artifactPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client', __BUILD_ID__);
|
9027 | logger.info('Using ' + artifactPath + ', with ' + project.applicationAssetHost + ' as artifacts serving routes');
|
9028 | this._app.use(project.artifactPath, _express2.default.static(artifactPath));
|
9029 |
|
9030 | var assetPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'client');
|
9031 | logger.info('Using ' + assetPath + ', with ' + project.applicationAssetHost + ' as assets serving routes');
|
9032 | this._app.use(project.assetPath, _express2.default.static(assetPath));
|
9033 |
|
9034 | var serverDebuggingPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'build', this._options.environment, 'server', 'debugging');
|
9035 | logger.info('Using ' + serverDebuggingPath + ', with /__dev/assets/server/debugging as server-debugging serving routes');
|
9036 | this._app.use('/__dev/assets/server/debugging', _express2.default.static(serverDebuggingPath));
|
9037 |
|
9038 |
|
9039 | var staticPath = _path2.default.join(this._options.rootDeploymentApplicationPath, 'assets');
|
9040 | logger.info('Using ' + staticPath + ', with /assets/static as static non-compileable assets serving routes');
|
9041 | this._app.use('/assets/static', _express2.default.static(staticPath));
|
9042 | }
|
9043 | }, {
|
9044 | key: '_setupCookieParser',
|
9045 | value: function _setupCookieParser() {
|
9046 | this._app.use((0, _cookieParser2.default)());
|
9047 | }
|
9048 | }, {
|
9049 | key: '_setupBodyParser',
|
9050 | value: function _setupBodyParser() {
|
9051 | this._app.use(_bodyParser2.default.urlencoded({ extended: true }));
|
9052 | this._app.use(_bodyParser2.default.json());
|
9053 | }
|
9054 | }, {
|
9055 | key: '_setupHtmlRenderer',
|
9056 | value: function _setupHtmlRenderer() {
|
9057 | var htmlRendererOptions = {
|
9058 | path: _path2.default.join(this._options.rootDeploymentApplicationPath, 'html'),
|
9059 | cache: !(this._options.environment === 'development')
|
9060 | };
|
9061 | this._renderer = new _SimpleHtmlRenderer2.default(htmlRendererOptions);
|
9062 | }
|
9063 | }, {
|
9064 | key: '_setupInternationalizedRoutes',
|
9065 | value: function _setupInternationalizedRoutes() {
|
9066 | var finalRoutes = null;
|
9067 | var originalRoutes = this.getRoutes();
|
9068 | var generatedRoutes = [];
|
9069 | this._options.locales.forEach(function (locale) {
|
9070 | var internationalRoute = _react2.default.createElement(
|
9071 | _reactRouter.Route,
|
9072 | { key: locale, path: locale, component: _InternationalizationHandler2.default },
|
9073 | originalRoutes
|
9074 | );
|
9075 | generatedRoutes.push(internationalRoute);
|
9076 | });
|
9077 |
|
9078 | generatedRoutes.push(originalRoutes);
|
9079 |
|
9080 | finalRoutes = _react2.default.createElement(
|
9081 | _reactRouter.Route,
|
9082 | { path: '/', component: _UniversalPageHandler2.default },
|
9083 | generatedRoutes.map(function (route) {
|
9084 | return route;
|
9085 | })
|
9086 | );
|
9087 |
|
9088 | this._routes = finalRoutes;
|
9089 | }
|
9090 | }, {
|
9091 | key: '_setupI18nHandler',
|
9092 | value: function _setupI18nHandler() {
|
9093 | var _this = this;
|
9094 |
|
9095 | this._app.use(function (req, res, next) {
|
9096 | var match = LOCALE_REGEX.exec(req.url);
|
9097 | var url = null;
|
9098 | if (match != null) {
|
9099 | var lang = match[1];
|
9100 | var country = match[2];
|
9101 | url = match[3];
|
9102 | req.locale = lang + '-' + country;
|
9103 | } else {
|
9104 | req.locale = LOCALE_DEFAULT;
|
9105 | }
|
9106 | if (_this._options.locales.indexOf(req.locale) >= 0) {
|
9107 | next();
|
9108 | } else {
|
9109 | if (_this._options.locales.length === 0) {
|
9110 | next();
|
9111 | } else {
|
9112 | if (url == null || typeof url === 'undefined' || url.length === 0) {
|
9113 | res.redirect('/');
|
9114 | } else {
|
9115 | res.redirect(url);
|
9116 | }
|
9117 | }
|
9118 | }
|
9119 | });
|
9120 | }
|
9121 | }, {
|
9122 | key: '_setupXSSPrevention',
|
9123 | value: function _setupXSSPrevention() {
|
9124 | this._app.use(function (req, res, next) {
|
9125 | var completeUrl = req.url.toUpperCase();
|
9126 | if (completeUrl.indexOf('SCRIPT') != -1 || completeUrl.indexOf('%3C') != -1 || completeUrl.indexOf('%3E') != -1) {
|
9127 | return res.redirect('/');
|
9128 | } else next();
|
9129 | });
|
9130 | }
|
9131 | }, {
|
9132 | key: '_isIP',
|
9133 | value: function _isIP(host) {
|
9134 | var ipRegex = /^(?!0)(?!.*\.$)((1?\d?\d|25[0-5]|2[0-4]\d)(\.|$)){4}$/;
|
9135 | return ipRegex.test(host);
|
9136 | }
|
9137 | }, {
|
9138 | key: '_setupForceDomain',
|
9139 | value: function _setupForceDomain() {
|
9140 | var protocol = 'http';
|
9141 | if (this._options.forceHttps === true) {
|
9142 | protocol = 'https';
|
9143 | }
|
9144 | var hostName = this._stripProtocol(this._options.applicationHost);
|
9145 | if (!this._isIP(hostName)) {
|
9146 | var parsedApplicationHost = _url2.default.parse(this._options.applicationHost);
|
9147 | if (parsedApplicationHost.port == null) {
|
9148 | this._app.use((0, _forcedomain2.default)({
|
9149 | hostname: parsedApplicationHost.host,
|
9150 | protocol: protocol
|
9151 | }));
|
9152 | }
|
9153 | }
|
9154 | }
|
9155 | }, {
|
9156 | key: '_stripProtocol',
|
9157 | value: function _stripProtocol(url) {
|
9158 | if (url != null && typeof url !== 'undefined') {
|
9159 | var result = url.replace(/.*?:\/\//g, '');
|
9160 | return result;
|
9161 | }
|
9162 | return null;
|
9163 | }
|
9164 | }, {
|
9165 | key: '_handleError500',
|
9166 | value: function _handleError500(message, err, res) {
|
9167 | logger.error(message, err);
|
9168 | if (this._options.environment === 'production') {
|
9169 | res.redirect(this.getErrorHandler());
|
9170 | } else {
|
9171 | var error = '<br />';
|
9172 | if (this._options.environment === 'development') {
|
9173 | if (err != null && typeof err !== 'undefined') {
|
9174 | error += err.stack;
|
9175 | }
|
9176 | }
|
9177 | error = error.replace('\n', '<br />');
|
9178 | this._renderer.render('500.html', function (err, rendered) {
|
9179 | if (err) {
|
9180 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
|
9181 | return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
|
9182 | } else {
|
9183 | return res.status(500).end((0, _resolveToString2.default)(rendered, { ERROR: error }));
|
9184 | }
|
9185 | });
|
9186 | }
|
9187 | }
|
9188 | }, {
|
9189 | key: '_handleNotFound404',
|
9190 | value: function _handleNotFound404(res) {
|
9191 | this._renderer.render('404.html', function (err, rendered) {
|
9192 | if (err) {
|
9193 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
|
9194 | return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
|
9195 | } else {
|
9196 | return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
|
9197 | }
|
9198 | });
|
9199 | }
|
9200 | }, {
|
9201 | key: '_runFilterPreFetchStage',
|
9202 | value: function _runFilterPreFetchStage(filterQueue, renderProps, renderedServerComponents, req, res, context) {
|
9203 | var _this2 = this;
|
9204 |
|
9205 | if (filterQueue.length > 0) {
|
9206 | var filterFnQueue = [];
|
9207 | filterQueue.reverse().forEach(function (filterFn) {
|
9208 | filterFnQueue.push(function (callback) {
|
9209 | var filterCallContext = {
|
9210 | get: function get() {
|
9211 | return context;
|
9212 | },
|
9213 | next: function next(booleanResult) {
|
9214 | if (typeof booleanResult === 'undefined' || booleanResult == null) {
|
9215 | booleanResult = true;
|
9216 | }
|
9217 | callback(null, booleanResult);
|
9218 | },
|
9219 | redirect: function redirect(_redirect, statusCode) {
|
9220 | callback({ type: 'REDIRECTION', redirect: _redirect, statusCode: statusCode }, false);
|
9221 | },
|
9222 | notFound: function notFound() {
|
9223 | callback({ type: 'NOT_FOUND' }, false);
|
9224 | },
|
9225 | abortWithError: function abortWithError() {
|
9226 | callback({ type: 'SERVER_ERROR' }, false);
|
9227 | }
|
9228 | };
|
9229 | filterFn(filterCallContext);
|
9230 | });
|
9231 | });
|
9232 | _async2.default.series(filterFnQueue, function (err, results) {
|
9233 | if (err) {
|
9234 | if (err.type === 'REDIRECTION') {
|
9235 | var statusCode = err.statusCode ? err.statusCode : 302;
|
9236 | return res.redirect(statusCode, err.redirect);
|
9237 | } else if (err.type === 'NOT_FOUND') {
|
9238 | _this2._renderer.render('404.html', function (err, rendered) {
|
9239 | if (err) {
|
9240 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
|
9241 | return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
|
9242 | } else {
|
9243 | return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
|
9244 | }
|
9245 | });
|
9246 | } else if (err.type === 'SERVER_ERROR') {
|
9247 | _this2._renderer.render('500.html', function (err, rendered) {
|
9248 | if (err) {
|
9249 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
|
9250 | return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
|
9251 | } else {
|
9252 | return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
|
9253 | }
|
9254 | });
|
9255 | } else {
|
9256 | _this2._renderer.render('500.html', function (err, rendered) {
|
9257 | if (err) {
|
9258 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 500.', err);
|
9259 | return res.status(500).end('An unknown error occurred when trying to render error 500\n' + err.stack);
|
9260 | } else {
|
9261 | return res.status(500).end((0, _resolveToString2.default)(rendered, {}));
|
9262 | }
|
9263 | });
|
9264 | }
|
9265 | } else {
|
9266 | _this2._runFetchStage(renderProps, renderedServerComponents, req, res, context);
|
9267 | }
|
9268 | });
|
9269 | } else {
|
9270 | this._runFetchStage(renderProps, renderedServerComponents, req, res, context);
|
9271 | }
|
9272 | }
|
9273 | }, {
|
9274 | key: '_runFetchStage',
|
9275 | value: function _runFetchStage(renderProps, renderedServerComponents, req, res, context) {
|
9276 | var _this3 = this;
|
9277 |
|
9278 | var fetchDataQueue = [];
|
9279 | var dataContextObject = {};
|
9280 |
|
9281 | renderedServerComponents.forEach(function (rsc) {
|
9282 | if (rsc.__fetchData != null && typeof rsc.__fetchData !== 'undefined') {
|
9283 | var fnFetchCall = function fnFetchCall(callback) {
|
9284 | setTimeout(function () {
|
9285 | rsc.__fetchData(dataContextObject, context, callback);
|
9286 | }, 1);
|
9287 | };
|
9288 | fetchDataQueue.push(fnFetchCall);
|
9289 | }
|
9290 | });
|
9291 |
|
9292 | var reducers = this._reducers;
|
9293 |
|
9294 | _async2.default.series(fetchDataQueue, function (err, results) {
|
9295 | if (err) {
|
9296 | return _this3._handleError500('[FETCH_DATA_ERROR] An unknown error occurred when trying to fetch data.', err, res);
|
9297 | } else {
|
9298 | var fetchedDataContext = {};
|
9299 | results.forEach(function (result) {
|
9300 | fetchedDataContext = _extends({}, fetchedDataContext, result);
|
9301 | });
|
9302 |
|
9303 | var allReducers = _extends({}, reducers, {
|
9304 | view: _core.serverFetchReducer
|
9305 | });
|
9306 | var store = createStoreWithMiddleware((0, _redux.combineReducers)(allReducers));
|
9307 |
|
9308 | store.dispatch({
|
9309 | type: '__SET_VIEW_STATE__',
|
9310 | data: fetchedDataContext
|
9311 | });
|
9312 |
|
9313 | var InitialComponent = _react2.default.createElement(
|
9314 | _reactRedux.Provider,
|
9315 | { store: store },
|
9316 | _react2.default.createElement(_reactRouter.RouterContext, renderProps)
|
9317 | );
|
9318 |
|
9319 | var postFetchFilterQueue = [];
|
9320 |
|
9321 | renderedServerComponents.forEach(function (rsc) {
|
9322 | if (rsc.__postFetchFilter != null && typeof rsc.__postFetchFilter !== 'undefined') {
|
9323 | postFetchFilterQueue = postFetchFilterQueue.concat(rsc.__postFetchFilter);
|
9324 | }
|
9325 | });
|
9326 | _this3._runFilterPostFetchStage(postFetchFilterQueue, store, InitialComponent, renderedServerComponents, req, res, context);
|
9327 | }
|
9328 | });
|
9329 | }
|
9330 | }, {
|
9331 | key: '_runFilterPostFetchStage',
|
9332 | value: function _runFilterPostFetchStage(filterQueue, _store, InitialComponent, renderedServerComponents, req, res, context) {
|
9333 | var _this4 = this;
|
9334 |
|
9335 | if (filterQueue.length > 0) {
|
9336 | var filterFnQueue = [];
|
9337 | filterQueue.reverse().forEach(function (filterFn) {
|
9338 | filterFnQueue.push(function (callback) {
|
9339 | var filterCallContext = {
|
9340 | store: function store() {
|
9341 | return _store.getState().view;
|
9342 | },
|
9343 | get: function get() {
|
9344 | return context;
|
9345 | },
|
9346 | next: function next(booleanResult) {
|
9347 | if (typeof booleanResult === 'undefined' || booleanResult == null) {
|
9348 | booleanResult = true;
|
9349 | }
|
9350 | callback(null, booleanResult);
|
9351 | },
|
9352 | redirect: function redirect(_redirect2, statusCode) {
|
9353 | callback({ type: 'REDIRECTION', redirect: _redirect2, statusCode: statusCode }, false);
|
9354 | },
|
9355 | notFound: function notFound() {
|
9356 | callback({ type: 'NOT_FOUND' }, false);
|
9357 | }
|
9358 | };
|
9359 | filterFn(filterCallContext);
|
9360 | });
|
9361 | });
|
9362 | _async2.default.series(filterFnQueue, function (err, results) {
|
9363 | if (err) {
|
9364 | if (err.type === 'REDIRECTION') {
|
9365 | var statusCode = err.statusCode ? err.statusCode : 302;
|
9366 | return res.redirect(statusCode, err.redirect);
|
9367 | } else if (err.type === 'NOT_FOUND') {
|
9368 | _this4._renderer.render('404.html', function (err, rendered) {
|
9369 | if (err) {
|
9370 | logger.error('[ERROR_RENDER_FATAL] An unknown error occurred when trying to render error 404.', err);
|
9371 | return res.status(500).end('An unknown error occurred when trying to render error 404\n' + err.stack);
|
9372 | } else {
|
9373 | return res.status(404).end((0, _resolveToString2.default)(rendered, {}));
|
9374 | }
|
9375 | });
|
9376 | } else {
|
9377 |
|
9378 | }
|
9379 | } else {
|
9380 | _this4._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
|
9381 | }
|
9382 | });
|
9383 | } else {
|
9384 | this._runRenderStage(_store, InitialComponent, renderedServerComponents, req, res, context);
|
9385 | }
|
9386 | }
|
9387 | }, {
|
9388 | key: '_createCookieSerializationOption',
|
9389 | value: function _createCookieSerializationOption(header) {
|
9390 | var option = {
|
9391 | path: header.path,
|
9392 | domain: header.domain,
|
9393 | version: header.version
|
9394 | };
|
9395 |
|
9396 | if (header.maxAge > 0) {
|
9397 | option.maxAge = header.maxAge;
|
9398 | }
|
9399 |
|
9400 | return option;
|
9401 | }
|
9402 | }, {
|
9403 | key: '_runSendResponseStage',
|
9404 | value: function _runSendResponseStage(res, PAGE_HTML, context) {
|
9405 | var _this5 = this;
|
9406 |
|
9407 | var responseCookies = context.response.cookies;
|
9408 | var responseHeaders = context.response.headers.cookies;
|
9409 |
|
9410 | Object.keys(responseCookies).forEach(function (krc) {
|
9411 | var __cookie = responseCookies[krc];
|
9412 | var __cookieHeader = {};
|
9413 | if (responseHeaders != null && typeof responseHeaders !== 'undefined') {
|
9414 | __cookieHeader = responseHeaders[krc];
|
9415 | }
|
9416 | if (__cookie != null && typeof __cookie !== 'undefined') {
|
9417 | var serializedCookie = _cookie2.default.serialize(krc, __cookie, _this5._createCookieSerializationOption(__cookieHeader));
|
9418 | res.append('Set-Cookie', serializedCookie);
|
9419 | }
|
9420 | });
|
9421 | res.set('Content-Type', 'text/html');
|
9422 | res.end(PAGE_HTML);
|
9423 | }
|
9424 | }, {
|
9425 | key: '_runRenderStage',
|
9426 | value: function _runRenderStage(store, InitialComponent, renderedServerComponents, req, res, context) {
|
9427 | var _this6 = this;
|
9428 |
|
9429 | var finalRenderPage = 'main.html';
|
9430 | renderedServerComponents.forEach(function (rsc) {
|
9431 | if (rsc.__renderPage != null && typeof rsc.__renderPage !== 'undefined') {
|
9432 | finalRenderPage = rsc.__renderPage;
|
9433 | }
|
9434 | });
|
9435 | var renderBindFnQueue = [];
|
9436 | renderedServerComponents.forEach(function (rsc) {
|
9437 | if (rsc.__renderBindFn != null && typeof rsc.__renderBindFn !== 'undefined') {
|
9438 | var bindFnCall = function bindFnCall(callback) {
|
9439 | setTimeout(function () {
|
9440 | rsc.__renderBindFn(store.getState(), context, callback);
|
9441 | }, 1);
|
9442 | };
|
9443 | renderBindFnQueue.push(bindFnCall);
|
9444 | }
|
9445 | });
|
9446 |
|
9447 | if (renderBindFnQueue.length > 0) {
|
9448 | _async2.default.series(renderBindFnQueue, function (err, results) {
|
9449 | if (err) {
|
9450 | return _this6._handleError500('[RENDER_BIND_PHASE] FATAL_ERROR in render data binding phase.', err, res);
|
9451 | } else {
|
9452 | _this6._renderer.render(finalRenderPage, function (err, rendered) {
|
9453 | if (err) {
|
9454 | return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
|
9455 | } else {
|
9456 | var bindData = {};
|
9457 | if (results != null && typeof results !== 'undefined') {
|
9458 | results.forEach(function (r) {
|
9459 | bindData = _extends({}, bindData, r);
|
9460 | });
|
9461 | }
|
9462 | try {
|
9463 | var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
|
9464 | var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
|
9465 | HTML: HTML,
|
9466 | DATA: store.getState()
|
9467 | }), { partial: true });
|
9468 | return _this6._runSendResponseStage(res, PAGE_HTML, context);
|
9469 | } catch (err) {
|
9470 | return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
|
9471 | }
|
9472 | }
|
9473 | });
|
9474 | }
|
9475 | });
|
9476 | } else {
|
9477 | this._renderer.render(finalRenderPage, function (err, rendered) {
|
9478 | if (err) {
|
9479 | return _this6._handleError500('[RENDER_VIEW_PHASE] FATAL_ERROR in render view template phase.', err, res);
|
9480 | } else {
|
9481 | var bindData = {};
|
9482 | try {
|
9483 | var HTML = (0, _server.renderToStaticMarkup)(InitialComponent);
|
9484 | var PAGE_HTML = (0, _resolveToString2.default)(rendered, _extends({}, bindData, {
|
9485 | HTML: HTML,
|
9486 | DATA: store.getState()
|
9487 | }), { partial: true });
|
9488 | return _this6._runSendResponseStage(res, PAGE_HTML, context);
|
9489 | } catch (err) {
|
9490 | return _this6._handleError500('[RENDER_STATIC_MARKUP_PHASE] FATAL_ERROR in render staticMarkup phase.', err, res);
|
9491 | }
|
9492 | }
|
9493 | });
|
9494 | }
|
9495 | }
|
9496 | }, {
|
9497 | key: '_importRequestCookie',
|
9498 | value: function _importRequestCookie(context, req) {
|
9499 | var cookies = req.cookies;
|
9500 | Object.keys(cookies).forEach(function (ck) {
|
9501 | context.request.cookies[ck] = req.cookies[ck];
|
9502 | });
|
9503 | }
|
9504 | }, {
|
9505 | key: '_handleHealthCheck',
|
9506 | value: function _handleHealthCheck(res) {
|
9507 | return res.status(200).send('ok');
|
9508 | }
|
9509 | }, {
|
9510 | key: '_setupRoutingHandler',
|
9511 | value: function _setupRoutingHandler() {
|
9512 | var _this7 = this;
|
9513 |
|
9514 | var routes = this._routes;
|
9515 | this._app.use(function (req, res) {
|
9516 | var location = req.url;
|
9517 | var pathname = (0, _parseurl2.default)(req).pathname;
|
9518 | var locale = req.locale;
|
9519 |
|
9520 | if (req.url == '/healthz') {
|
9521 | return _this7._handleHealthCheck(res);
|
9522 | }
|
9523 |
|
9524 | logger.info('[HANDLING_ROUTE] path: ' + req.url + ', locale: ' + locale);
|
9525 | (0, _reactRouter.match)({ routes: routes, location: location }, function (err, redirectLocation, renderProps) {
|
9526 | if (err) {
|
9527 | return _this7._handleError500('[MATCH_ROUTE_FATAL_ERROR] An unknown error occurred when trying to match routes.', err, res);
|
9528 | }
|
9529 |
|
9530 | if (!renderProps) {
|
9531 | logger.info('[ROUTE_NOT_FOUND] path: ' + req.url + ', locale: ' + locale);
|
9532 | return _this7._handleNotFound404(res);
|
9533 | }
|
9534 |
|
9535 | var query = {};
|
9536 | var queryStringMatch = QS_REGEX.exec(renderProps.location.search);
|
9537 | var queryString = '';
|
9538 | if (queryStringMatch != null && typeof queryStringMatch !== 'undefined') {
|
9539 | queryString = queryStringMatch[1];
|
9540 | }
|
9541 | if (queryString != null && typeof queryString !== 'undefined') {
|
9542 | query = _querystring2.default.parse(queryString);
|
9543 | }
|
9544 |
|
9545 | var simplifiedRoutes = {
|
9546 | name: renderProps.routes[renderProps.routes.length - 1].name,
|
9547 | path: renderProps.routes[renderProps.routes.length - 1].path
|
9548 | };
|
9549 |
|
9550 | var context = {
|
9551 | host: _this7._options.applicationHost,
|
9552 | url: req.url,
|
9553 | path: pathname,
|
9554 | locale: locale,
|
9555 | params: renderProps.params,
|
9556 | query: query,
|
9557 | routes: simplifiedRoutes,
|
9558 | environment: _this7._options.environment,
|
9559 | server: true,
|
9560 | client: false,
|
9561 | useragent: req.useragent,
|
9562 | request: {
|
9563 | cookies: {},
|
9564 | headers: {}
|
9565 | },
|
9566 | response: {
|
9567 | cookies: {},
|
9568 | headers: {}
|
9569 | }
|
9570 | };
|
9571 |
|
9572 | _this7._importRequestCookie(context, req);
|
9573 |
|
9574 | var renderedServerComponents = renderProps.components;
|
9575 | var preFetchFilterQueue = [];
|
9576 |
|
9577 | renderedServerComponents.forEach(function (rsc) {
|
9578 | if (rsc.__preFetchFilter != null && typeof rsc.__preFetchFilter !== 'undefined') {
|
9579 | preFetchFilterQueue = preFetchFilterQueue.concat(rsc.__preFetchFilter);
|
9580 | }
|
9581 | });
|
9582 |
|
9583 | _this7._runFilterPreFetchStage(preFetchFilterQueue, renderProps, renderedServerComponents, req, res, context);
|
9584 | });
|
9585 | });
|
9586 | }
|
9587 | }, {
|
9588 | key: 'app',
|
9589 | value: function app() {
|
9590 | return this._app;
|
9591 | }
|
9592 | }, {
|
9593 | key: 'getErrorHandler',
|
9594 | value: function getErrorHandler() {
|
9595 | return '/';
|
9596 | }
|
9597 | }, {
|
9598 | key: 'run',
|
9599 | value: function run() {
|
9600 | var _this8 = this;
|
9601 |
|
9602 | this._setupRoutingHandler();
|
9603 | this._app.listen(this._options.port, function (err) {
|
9604 | if (err) logger.error(err);else {
|
9605 | logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Server listening on port : ' + _this8._options.port);
|
9606 | }
|
9607 | });
|
9608 |
|
9609 | var pingApp = (0, _express2.default)();
|
9610 | pingApp.use('/ping', function (req, res) {
|
9611 | res.end('pong');
|
9612 | });
|
9613 | pingApp.listen(this._options.pingPort, function (err) {
|
9614 | if (err) logger.error(err);else {
|
9615 | logger.info('[EXPRESS_UNIVERSAL_APPLICATION_SERVER] Ping server listening on port : ' + _this8._options.pingPort);
|
9616 | }
|
9617 | });
|
9618 | }
|
9619 | }]);
|
9620 |
|
9621 | return ExpressUniversalApplicationServer;
|
9622 | }();
|
9623 |
|
9624 | exports.default = ExpressUniversalApplicationServer;
|
9625 | module.exports = exports['default'];
|
9626 |
|
9627 | }),
|
9628 |
|
9629 | (function(module, exports, __webpack_require__) {
|
9630 |
|
9631 | "use strict";
|
9632 |
|
9633 |
|
9634 | Object.defineProperty(exports, "__esModule", {
|
9635 | value: true
|
9636 | });
|
9637 |
|
9638 | var _ExpressUniversalApplicationServer = __webpack_require__(83);
|
9639 |
|
9640 | var _ExpressUniversalApplicationServer2 = _interopRequireDefault(_ExpressUniversalApplicationServer);
|
9641 |
|
9642 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9643 |
|
9644 | exports.default = {
|
9645 | CatelaApplicationServer: _ExpressUniversalApplicationServer2.default
|
9646 | };
|
9647 | module.exports = exports['default'];
|
9648 |
|
9649 | }),
|
9650 |
|
9651 | (function(module, exports, __webpack_require__) {
|
9652 |
|
9653 | "use strict";
|
9654 |
|
9655 |
|
9656 | Object.defineProperty(exports, "__esModule", {
|
9657 | value: true
|
9658 | });
|
9659 |
|
9660 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9661 |
|
9662 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9663 |
|
9664 | var DataFetch = function () {
|
9665 | function DataFetch() {
|
9666 | _classCallCheck(this, DataFetch);
|
9667 | }
|
9668 |
|
9669 | _createClass(DataFetch, [{
|
9670 | key: "fetch",
|
9671 | value: function fetch(store, context, callback) {}
|
9672 | }]);
|
9673 |
|
9674 | return DataFetch;
|
9675 | }();
|
9676 |
|
9677 | exports.default = DataFetch;
|
9678 | module.exports = exports["default"];
|
9679 |
|
9680 | }),
|
9681 |
|
9682 | (function(module, exports, __webpack_require__) {
|
9683 |
|
9684 | "use strict";
|
9685 |
|
9686 |
|
9687 | Object.defineProperty(exports, "__esModule", {
|
9688 | value: true
|
9689 | });
|
9690 |
|
9691 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9692 |
|
9693 | var _DataFetch2 = __webpack_require__(85);
|
9694 |
|
9695 | var _DataFetch3 = _interopRequireDefault(_DataFetch2);
|
9696 |
|
9697 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9698 |
|
9699 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9700 |
|
9701 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
9702 |
|
9703 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
9704 |
|
9705 | var FetchableInstance = function (_DataFetch) {
|
9706 | _inherits(FetchableInstance, _DataFetch);
|
9707 |
|
9708 | function FetchableInstance(FetchClass) {
|
9709 | _classCallCheck(this, FetchableInstance);
|
9710 |
|
9711 | var _this = _possibleConstructorReturn(this, (FetchableInstance.__proto__ || Object.getPrototypeOf(FetchableInstance)).call(this));
|
9712 |
|
9713 | _this._innerFetchInstance = new FetchClass();
|
9714 | _this._innerFetchInstance.disableClient = FetchClass.disableClient;
|
9715 | return _this;
|
9716 | }
|
9717 |
|
9718 | _createClass(FetchableInstance, [{
|
9719 | key: 'fetch',
|
9720 | value: function fetch(store, context, callback) {
|
9721 | this._innerFetchInstance.fetch(store, context, function (err, results) {
|
9722 | callback(err, results);
|
9723 | });
|
9724 | }
|
9725 | }, {
|
9726 | key: 'disableClient',
|
9727 | value: function disableClient() {
|
9728 | return this._innerFetchInstance.disableClient;
|
9729 | }
|
9730 | }]);
|
9731 |
|
9732 | return FetchableInstance;
|
9733 | }(_DataFetch3.default);
|
9734 |
|
9735 | exports.default = FetchableInstance;
|
9736 | module.exports = exports['default'];
|
9737 |
|
9738 | }),
|
9739 |
|
9740 | (function(module, exports, __webpack_require__) {
|
9741 |
|
9742 | "use strict";
|
9743 |
|
9744 |
|
9745 | Object.defineProperty(exports, "__esModule", {
|
9746 | value: true
|
9747 | });
|
9748 |
|
9749 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9750 |
|
9751 | var _FetchableInstance = __webpack_require__(86);
|
9752 |
|
9753 | var _FetchableInstance2 = _interopRequireDefault(_FetchableInstance);
|
9754 |
|
9755 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9756 |
|
9757 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9758 |
|
9759 | var FetchableInstanceFactory = function () {
|
9760 | function FetchableInstanceFactory() {
|
9761 | _classCallCheck(this, FetchableInstanceFactory);
|
9762 |
|
9763 | this._dataFetchInstanceCache = new Map();
|
9764 | }
|
9765 |
|
9766 | _createClass(FetchableInstanceFactory, [{
|
9767 | key: 'getFetchableInstance',
|
9768 | value: function getFetchableInstance(FetchClass) {
|
9769 | var construct = true;
|
9770 | if (FetchClass.KeyProperty != null && typeof FetchClass.KeyProperty !== 'undefined') {
|
9771 | if (FetchClass.EnableCache === true) {
|
9772 | if (this._dataFetchInstanceCache.get(FetchClass.Key) != null && typeof FetchClass.Key !== 'undefined') {
|
9773 | construct = false;
|
9774 | }
|
9775 | }
|
9776 | }
|
9777 | if (construct) {
|
9778 | var fetchableInstance = new _FetchableInstance2.default(FetchClass);
|
9779 | this._dataFetchInstanceCache.set(FetchClass.KeyProperty, fetchableInstance);
|
9780 | return fetchableInstance;
|
9781 | } else {
|
9782 | return this._dataFetchInstanceCache.get(FetchClass.Key);
|
9783 | }
|
9784 | }
|
9785 | }]);
|
9786 |
|
9787 | return FetchableInstanceFactory;
|
9788 | }();
|
9789 |
|
9790 | exports.default = FetchableInstanceFactory;
|
9791 | module.exports = exports['default'];
|
9792 |
|
9793 | }),
|
9794 |
|
9795 | (function(module, exports, __webpack_require__) {
|
9796 |
|
9797 | "use strict";
|
9798 |
|
9799 |
|
9800 | Object.defineProperty(exports, "__esModule", {
|
9801 | value: true
|
9802 | });
|
9803 |
|
9804 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9805 |
|
9806 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9807 |
|
9808 | var _async = __webpack_require__(80);
|
9809 |
|
9810 | var _async2 = _interopRequireDefault(_async);
|
9811 |
|
9812 | var _FetchableInstanceFactory = __webpack_require__(87);
|
9813 |
|
9814 | var _FetchableInstanceFactory2 = _interopRequireDefault(_FetchableInstanceFactory);
|
9815 |
|
9816 | var _hoistNonReactStatics = __webpack_require__(208);
|
9817 |
|
9818 | var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
|
9819 |
|
9820 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9821 |
|
9822 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9823 |
|
9824 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
9825 |
|
9826 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
9827 |
|
9828 | var fetchableInstanceFactory = new _FetchableInstanceFactory2.default();
|
9829 |
|
9830 | function getDisplayName(WrappedComponent) {
|
9831 | return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
9832 | }
|
9833 |
|
9834 | function fetch(fetchClasses) {
|
9835 | return function wrapWithFetch(WrappedComponent) {
|
9836 | var fetchableDisplayName = 'Fetchable(' + getDisplayName(WrappedComponent) + ')';
|
9837 |
|
9838 | var FetchableWrappedComponent = function (_WrappedComponent) {
|
9839 | _inherits(FetchableWrappedComponent, _WrappedComponent);
|
9840 |
|
9841 | function FetchableWrappedComponent(props, context) {
|
9842 | _classCallCheck(this, FetchableWrappedComponent);
|
9843 |
|
9844 | var _this = _possibleConstructorReturn(this, (FetchableWrappedComponent.__proto__ || Object.getPrototypeOf(FetchableWrappedComponent)).call(this, props, context));
|
9845 |
|
9846 | _this.fetch = {};
|
9847 | _this.model = _this.context.model;
|
9848 | return _this;
|
9849 | }
|
9850 |
|
9851 | _createClass(FetchableWrappedComponent, [{
|
9852 | key: 'render',
|
9853 | value: function render() {
|
9854 | return this.__innerRender();
|
9855 | }
|
9856 | }]);
|
9857 |
|
9858 | return FetchableWrappedComponent;
|
9859 | }(WrappedComponent);
|
9860 |
|
9861 | FetchableWrappedComponent.displayName = fetchableDisplayName;
|
9862 | FetchableWrappedComponent.prototype.__innerRender = WrappedComponent.prototype.render;
|
9863 | FetchableWrappedComponent.__fetchData = function (store, context, callback) {
|
9864 | if (typeof fetchClasses !== 'undefined' && fetchClasses != null) {
|
9865 | var asyncCalls = {};
|
9866 | Object.keys(fetchClasses).forEach(function (kc) {
|
9867 | asyncCalls[kc] = function (callback) {
|
9868 | var fetchDataInstance = fetchableInstanceFactory.getFetchableInstance(fetchClasses[kc]);
|
9869 | if (fetchDataInstance.disableClient() && !context.server) {
|
9870 | callback(null, []);
|
9871 | } else {
|
9872 | fetchDataInstance.fetch(store, context, function (err, results) {
|
9873 | if (err) {
|
9874 | console.log('[' + kc + '] Unknown error occurred when trying to fetch data. ', err);
|
9875 | callback(err, null);
|
9876 | } else {
|
9877 | store[kc] = results;
|
9878 | callback(null, results);
|
9879 | }
|
9880 | });
|
9881 | }
|
9882 | };
|
9883 | });
|
9884 | _async2.default.series(asyncCalls, function (err, results) {
|
9885 | if (err) {
|
9886 | callback(err, null);
|
9887 | } else {
|
9888 | callback(null, results);
|
9889 | }
|
9890 | });
|
9891 | } else {
|
9892 | callback(null, store);
|
9893 | }
|
9894 | };
|
9895 | return (0, _hoistNonReactStatics2.default)(FetchableWrappedComponent, WrappedComponent);
|
9896 | };
|
9897 | }
|
9898 |
|
9899 | function simpleReducer() {
|
9900 | var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9901 | var action = arguments[1];
|
9902 |
|
9903 | switch (action.type) {
|
9904 | case '__SET_VIEW_STATE__':
|
9905 | var newState = _extends({}, state, action.data);
|
9906 | return newState;
|
9907 | default:
|
9908 | return state;
|
9909 | }
|
9910 | return state;
|
9911 | }
|
9912 |
|
9913 | exports.default = {
|
9914 | fetch: fetch,
|
9915 | serverFetchReducer: simpleReducer
|
9916 | };
|
9917 | module.exports = exports['default'];
|
9918 |
|
9919 | }),
|
9920 |
|
9921 | (function(module, exports, __webpack_require__) {
|
9922 |
|
9923 | "use strict";
|
9924 |
|
9925 |
|
9926 | Object.defineProperty(exports, "__esModule", {
|
9927 | value: true
|
9928 | });
|
9929 |
|
9930 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
9931 |
|
9932 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9933 |
|
9934 | var _fluentLogger = __webpack_require__(206);
|
9935 |
|
9936 | var _fluentLogger2 = _interopRequireDefault(_fluentLogger);
|
9937 |
|
9938 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9939 |
|
9940 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9941 |
|
9942 | var FluentdLogger = function () {
|
9943 | function FluentdLogger(context) {
|
9944 | _classCallCheck(this, FluentdLogger);
|
9945 |
|
9946 | this._context = context;
|
9947 | this._prefix = context;
|
9948 | this.init(context);
|
9949 | }
|
9950 |
|
9951 | _createClass(FluentdLogger, [{
|
9952 | key: 'init',
|
9953 | value: function init() {
|
9954 | var application_name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
9955 | var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
9956 |
|
9957 | this._logger = _fluentLogger2.default.createFluentSender(application_name, _extends({
|
9958 | host: options.host || 'localhost',
|
9959 | application_name: options.application_name || application_name,
|
9960 | port: options.port || 24224,
|
9961 | timeout: options.timeout || 3,
|
9962 | reconnectInterval: options.reconnectInterval || 60000
|
9963 | }, options));
|
9964 | }
|
9965 | }, {
|
9966 | key: 'log',
|
9967 | value: function log(level, _log, data) {
|
9968 | this._logger.emit(level, _extends({}, this._generateDetails(), {
|
9969 | message: _log,
|
9970 | data: data,
|
9971 | tag: [this._context]
|
9972 | }));
|
9973 | }
|
9974 | }, {
|
9975 | key: 'getLogger',
|
9976 | value: function getLogger() {
|
9977 | return this;
|
9978 | }
|
9979 | }, {
|
9980 | key: '_generateDetails',
|
9981 | value: function _generateDetails() {
|
9982 | return {
|
9983 | application_name: this._context,
|
9984 | prefix: this._prefix
|
9985 | };
|
9986 | }
|
9987 | }, {
|
9988 | key: '_extractRequestObject',
|
9989 | value: function _extractRequestObject(req) {
|
9990 | if (!req) return {};
|
9991 | return {
|
9992 | domain: req.domain,
|
9993 | headers: JSON.stringify(req.headers),
|
9994 | url: req.url,
|
9995 | method: req.method,
|
9996 | user_agent: req.get['User-Agent']
|
9997 | };
|
9998 | }
|
9999 | }]);
|
10000 |
|
10001 | return FluentdLogger;
|
10002 | }();
|
10003 |
|
10004 | exports.default = FluentdLogger;
|
10005 | module.exports = exports['default'];
|
10006 |
|
10007 | }),
|
10008 |
|
10009 | (function(module, exports, __webpack_require__) {
|
10010 |
|
10011 | "use strict";
|
10012 |
|
10013 |
|
10014 | Object.defineProperty(exports, "__esModule", {
|
10015 | value: true
|
10016 | });
|
10017 |
|
10018 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
10019 |
|
10020 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10021 |
|
10022 | var _winston = __webpack_require__(219);
|
10023 |
|
10024 | var _winston2 = _interopRequireDefault(_winston);
|
10025 |
|
10026 | var _winstonDailyRotateFile = __webpack_require__(220);
|
10027 |
|
10028 | var _winstonDailyRotateFile2 = _interopRequireDefault(_winstonDailyRotateFile);
|
10029 |
|
10030 | var _FluentdLogger = __webpack_require__(89);
|
10031 |
|
10032 | var _FluentdLogger2 = _interopRequireDefault(_FluentdLogger);
|
10033 |
|
10034 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10035 |
|
10036 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10037 |
|
10038 | _winston2.default.transports.DailyRotateFile = _winstonDailyRotateFile2.default;
|
10039 |
|
10040 | var LoggerComponent = function () {
|
10041 | function LoggerComponent(context) {
|
10042 | _classCallCheck(this, LoggerComponent);
|
10043 |
|
10044 | this._context = context;
|
10045 | this.__logPath = '/logs/' + context;
|
10046 | }
|
10047 |
|
10048 | _createClass(LoggerComponent, [{
|
10049 | key: 'initFluentd',
|
10050 | value: function initFluentd() {
|
10051 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10052 |
|
10053 | return new _FluentdLogger2.default(this._context, options);
|
10054 | }
|
10055 | }, {
|
10056 | key: 'initWinston',
|
10057 | value: function initWinston() {
|
10058 | var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10059 |
|
10060 | return new _winston2.default.Logger(_extends({}, options, {
|
10061 | transports: [new _winston2.default.transports.Console({
|
10062 | colorize: true,
|
10063 | prettyPrint: true
|
10064 | }), new _winston2.default.transports.DailyRotateFile({
|
10065 | tailable: true,
|
10066 | filename: this.__logPath + '/' + this._context,
|
10067 | datePattern: '.yyyy-MM-dd.log',
|
10068 | timestamp: true,
|
10069 | maxFiles: 10,
|
10070 | colorize: true,
|
10071 | prettyPrint: true
|
10072 | })]
|
10073 | }));
|
10074 | }
|
10075 | }, {
|
10076 | key: 'initFluentdWinston',
|
10077 | value: function initFluentdWinston() {
|
10078 | var fluentdOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10079 | var winstonOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
10080 |
|
10081 | var winston = this.initWinston(winstonOptions);
|
10082 | var fluentd = this.initFluentd(fluentdOptions);
|
10083 |
|
10084 | var log = function log(level, _log, data) {
|
10085 | winston.log(level, _log, data);
|
10086 | fluentd.log(level, _log, data);
|
10087 | };
|
10088 |
|
10089 | return _extends({}, winston, fluentd, {
|
10090 | log: log
|
10091 | });
|
10092 | }
|
10093 | }, {
|
10094 | key: 'getLogger',
|
10095 | value: function getLogger() {
|
10096 | return this._logger;
|
10097 | }
|
10098 | }], [{
|
10099 | key: 'setupLogger',
|
10100 | value: function setupLogger(_ref) {
|
10101 | var context = _ref.context,
|
10102 | loggerOptions = _ref.loggerOptions;
|
10103 |
|
10104 | var log = loggerOptions || {};
|
10105 | var type = log ? log.type : 'winston';
|
10106 |
|
10107 | var lg = new LoggerComponent(context);
|
10108 | if (type === 'fluentd') lg._logger = lg.initFluentd(log.fluentd);else if (type === 'fdw') lg._logger = lg.initFluentdWinston(log.fluentd, log.winston);else lg._logger = lg.initWinston(log.winston);
|
10109 |
|
10110 | return lg;
|
10111 | }
|
10112 | }]);
|
10113 |
|
10114 | return LoggerComponent;
|
10115 | }();
|
10116 |
|
10117 | var DecoratedContextLogger = function () {
|
10118 | function DecoratedContextLogger(logger, logContextName) {
|
10119 | _classCallCheck(this, DecoratedContextLogger);
|
10120 |
|
10121 | this._context = logContextName;
|
10122 | this._logger = logger;
|
10123 | }
|
10124 |
|
10125 | _createClass(DecoratedContextLogger, [{
|
10126 | key: 'log',
|
10127 | value: function log(level, _log2, data) {
|
10128 | this._logger.log(level, '[' + this._context + '] ' + _log2, data);
|
10129 | }
|
10130 | }, {
|
10131 | key: 'view',
|
10132 | value: function view(data) {
|
10133 | var dataObj = {};
|
10134 | if (typeof data !== 'undefined' && data !== null) {
|
10135 | dataObj.data = data;
|
10136 | }
|
10137 | this._logger.log('info', '[' + this._context + '] ', dataObj);
|
10138 | }
|
10139 | }, {
|
10140 | key: 'info',
|
10141 | value: function info(log, data) {
|
10142 | var dataObj = {};
|
10143 | if (typeof data !== 'undefined' && data !== null) {
|
10144 | dataObj.data = data;
|
10145 | }
|
10146 | this._logger.log('info', '[' + this._context + '] ' + log, dataObj);
|
10147 | }
|
10148 | }, {
|
10149 | key: 'warn',
|
10150 | value: function warn(log, data) {
|
10151 | var dataObj = {};
|
10152 | if (typeof data !== 'undefined' && data != null) {
|
10153 | dataObj.data = data;
|
10154 | }
|
10155 | this._logger.log('warn', '[' + this._context + '] ' + log, dataObj);
|
10156 | }
|
10157 | }, {
|
10158 | key: 'error',
|
10159 | value: function error(log, exception, data) {
|
10160 | var dataObj = {};
|
10161 | if (typeof data !== 'undefined' && data != null) {
|
10162 | dataObj.data = data;
|
10163 | }
|
10164 | if (typeof exception !== 'undefined' && exception != null) {
|
10165 | dataObj.ex = exception;
|
10166 | }
|
10167 | this._logger.log('error', '[' + this._context + '] ' + log, {
|
10168 | stackTrace: exception.stack,
|
10169 | data: dataObj.data
|
10170 | });
|
10171 | }
|
10172 | }, {
|
10173 | key: 'debug',
|
10174 | value: function debug(log, data) {
|
10175 | var dataObj = {};
|
10176 | if (typeof data !== 'undefined' && data != null) {
|
10177 | dataObj.data = data;
|
10178 | }
|
10179 | this._logger.log('debug', '[' + this._context + '] ' + log, dataObj);
|
10180 | }
|
10181 | }]);
|
10182 |
|
10183 | return DecoratedContextLogger;
|
10184 | }();
|
10185 |
|
10186 | var LogManager = function () {
|
10187 | function LogManager(loggerComponent) {
|
10188 | _classCallCheck(this, LogManager);
|
10189 |
|
10190 | this._loggerComponent = loggerComponent;
|
10191 | }
|
10192 |
|
10193 | _createClass(LogManager, [{
|
10194 | key: 'getLogger',
|
10195 | value: function getLogger(logContextName) {
|
10196 | var decoratedLogger = new DecoratedContextLogger(this._loggerComponent.getLogger(), logContextName);
|
10197 | return decoratedLogger;
|
10198 | }
|
10199 | }]);
|
10200 |
|
10201 | return LogManager;
|
10202 | }();
|
10203 |
|
10204 | exports.default = {
|
10205 | |
10206 |
|
10207 |
|
10208 |
|
10209 |
|
10210 |
|
10211 | configure: function configure(_ref2) {
|
10212 | var context = _ref2.context,
|
10213 | loggerOptions = _ref2.loggerOptions;
|
10214 |
|
10215 | var contextLoggerComponent = LoggerComponent.setupLogger({
|
10216 | context: context,
|
10217 | loggerOptions: loggerOptions
|
10218 | });
|
10219 |
|
10220 | return new LogManager(contextLoggerComponent);
|
10221 | }
|
10222 | };
|
10223 | module.exports = exports['default'];
|
10224 |
|
10225 | }),
|
10226 |
|
10227 | (function(module, exports, __webpack_require__) {
|
10228 |
|
10229 | "use strict";
|
10230 |
|
10231 |
|
10232 | var _LoggerComponent = __webpack_require__(90);
|
10233 |
|
10234 | var _LoggerComponent2 = _interopRequireDefault(_LoggerComponent);
|
10235 |
|
10236 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10237 |
|
10238 | var project = __PROJECT__;
|
10239 |
|
10240 | (function installServerLogger() {
|
10241 | if (global.Logger === null || typeof global.Logger === 'undefined') {
|
10242 | global.Logger = _LoggerComponent2.default.configure({
|
10243 | context: project.applicationName,
|
10244 | loggerOptions: project.loggerOptions
|
10245 | });
|
10246 | }
|
10247 | })();
|
10248 |
|
10249 | }),
|
10250 |
|
10251 | (function(module, exports, __webpack_require__) {
|
10252 |
|
10253 | "use strict";
|
10254 |
|
10255 |
|
10256 | Object.defineProperty(exports, "__esModule", {
|
10257 | value: true
|
10258 | });
|
10259 |
|
10260 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10261 |
|
10262 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10263 |
|
10264 | var ServerRenderer = function () {
|
10265 | function ServerRenderer() {
|
10266 | _classCallCheck(this, ServerRenderer);
|
10267 | }
|
10268 |
|
10269 | _createClass(ServerRenderer, [{
|
10270 | key: "render",
|
10271 | value: function render(path, callback) {}
|
10272 | }]);
|
10273 |
|
10274 | return ServerRenderer;
|
10275 | }();
|
10276 |
|
10277 | exports.default = ServerRenderer;
|
10278 | module.exports = exports["default"];
|
10279 |
|
10280 | }),
|
10281 |
|
10282 | (function(module, exports, __webpack_require__) {
|
10283 |
|
10284 | "use strict";
|
10285 |
|
10286 |
|
10287 | Object.defineProperty(exports, "__esModule", {
|
10288 | value: true
|
10289 | });
|
10290 |
|
10291 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10292 |
|
10293 | var _compile = __webpack_require__(100);
|
10294 |
|
10295 | var _compile2 = _interopRequireDefault(_compile);
|
10296 |
|
10297 | var _fs = __webpack_require__(81);
|
10298 |
|
10299 | var _fs2 = _interopRequireDefault(_fs);
|
10300 |
|
10301 | var _path = __webpack_require__(82);
|
10302 |
|
10303 | var _path2 = _interopRequireDefault(_path);
|
10304 |
|
10305 | var _ServerRenderer2 = __webpack_require__(92);
|
10306 |
|
10307 | var _ServerRenderer3 = _interopRequireDefault(_ServerRenderer2);
|
10308 |
|
10309 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10310 |
|
10311 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10312 |
|
10313 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
10314 |
|
10315 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
10316 |
|
10317 | var logger = global.Logger.getLogger('SimpleHtmlRenderer');
|
10318 |
|
10319 | var SimpleHtmlRenderer = function (_ServerRenderer) {
|
10320 | _inherits(SimpleHtmlRenderer, _ServerRenderer);
|
10321 |
|
10322 | function SimpleHtmlRenderer(options) {
|
10323 | _classCallCheck(this, SimpleHtmlRenderer);
|
10324 |
|
10325 | var _this = _possibleConstructorReturn(this, (SimpleHtmlRenderer.__proto__ || Object.getPrototypeOf(SimpleHtmlRenderer)).call(this));
|
10326 |
|
10327 | _this._options = options;
|
10328 | _this._pageCache = {};
|
10329 | return _this;
|
10330 | }
|
10331 |
|
10332 | _createClass(SimpleHtmlRenderer, [{
|
10333 | key: '_loadHtml',
|
10334 | value: function _loadHtml(htmlPath, callback) {
|
10335 | var _this2 = this;
|
10336 |
|
10337 | logger.info('[RENDERING]', htmlPath);
|
10338 | _fs2.default.readFile(htmlPath, function (err, data) {
|
10339 | if (err) {
|
10340 | callback(err, null);
|
10341 | } else {
|
10342 | var start = new Date().getTime();
|
10343 | var htmlTemplate = (0, _compile2.default)(data.toString());
|
10344 | var end = new Date().getTime();
|
10345 | var elapsed = end - start;
|
10346 | logger.info('[TEMPLATE_COMPILATION] Finish compiling ' + htmlPath + ', elapsed: ' + elapsed + 'ms');
|
10347 | if (_this2._options.cache) {
|
10348 | logger.info('[TEMPLATE_CACHING] Caching ' + htmlPath);
|
10349 | _this2._pageCache[htmlPath] = htmlTemplate;
|
10350 | }
|
10351 | end = new Date().getTime();
|
10352 | elapsed = end - start;
|
10353 | logger.info('[FINISH_RENDERING] ' + htmlPath + ' in: ' + elapsed + 'ms');
|
10354 | callback(null, htmlTemplate);
|
10355 | }
|
10356 | });
|
10357 | }
|
10358 | }, {
|
10359 | key: 'render',
|
10360 | value: function render(file, callback) {
|
10361 | var basePath = this._options.path;
|
10362 | var finalPath = _path2.default.join(basePath, file);
|
10363 | if (this._pageCache[finalPath] == null || typeof this._pageCache[finalPath] === 'undefined') {
|
10364 | this._loadHtml(finalPath, callback);
|
10365 | } else {
|
10366 | callback(null, this._pageCache[finalPath]);
|
10367 | }
|
10368 | }
|
10369 | }]);
|
10370 |
|
10371 | return SimpleHtmlRenderer;
|
10372 | }(_ServerRenderer3.default);
|
10373 |
|
10374 | exports.default = SimpleHtmlRenderer;
|
10375 | module.exports = exports['default'];
|
10376 |
|
10377 | }),
|
10378 |
|
10379 | (function(module, exports, __webpack_require__) {
|
10380 |
|
10381 | "use strict";
|
10382 |
|
10383 |
|
10384 | Object.defineProperty(exports, "__esModule", {
|
10385 | value: true
|
10386 | });
|
10387 |
|
10388 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10389 |
|
10390 | var _react = __webpack_require__(46);
|
10391 |
|
10392 | var _react2 = _interopRequireDefault(_react);
|
10393 |
|
10394 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10395 |
|
10396 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10397 |
|
10398 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
10399 |
|
10400 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
10401 |
|
10402 | var UniversalPageHandler = function (_React$Component) {
|
10403 | _inherits(UniversalPageHandler, _React$Component);
|
10404 |
|
10405 | function UniversalPageHandler() {
|
10406 | _classCallCheck(this, UniversalPageHandler);
|
10407 |
|
10408 | return _possibleConstructorReturn(this, (UniversalPageHandler.__proto__ || Object.getPrototypeOf(UniversalPageHandler)).apply(this, arguments));
|
10409 | }
|
10410 |
|
10411 | _createClass(UniversalPageHandler, [{
|
10412 | key: 'render',
|
10413 | value: function render() {
|
10414 | return _react2.default.createElement(
|
10415 | 'div',
|
10416 | null,
|
10417 | this.props.children
|
10418 | );
|
10419 | }
|
10420 | }]);
|
10421 |
|
10422 | return UniversalPageHandler;
|
10423 | }(_react2.default.Component);
|
10424 |
|
10425 | UniversalPageHandler.propTypes = {
|
10426 | children: _react2.default.PropTypes.any
|
10427 | };
|
10428 |
|
10429 | exports.default = UniversalPageHandler;
|
10430 | module.exports = exports['default'];
|
10431 |
|
10432 | }),
|
10433 |
|
10434 | (function(module, exports, __webpack_require__) {
|
10435 |
|
10436 | "use strict";
|
10437 |
|
10438 |
|
10439 | Object.defineProperty(exports, "__esModule", {
|
10440 | value: true
|
10441 | });
|
10442 |
|
10443 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10444 |
|
10445 | var _react = __webpack_require__(46);
|
10446 |
|
10447 | var _react2 = _interopRequireDefault(_react);
|
10448 |
|
10449 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10450 |
|
10451 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10452 |
|
10453 | function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
10454 |
|
10455 | function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
10456 |
|
10457 | var InternationalizationHandler = function (_React$Component) {
|
10458 | _inherits(InternationalizationHandler, _React$Component);
|
10459 |
|
10460 | function InternationalizationHandler() {
|
10461 | _classCallCheck(this, InternationalizationHandler);
|
10462 |
|
10463 | return _possibleConstructorReturn(this, (InternationalizationHandler.__proto__ || Object.getPrototypeOf(InternationalizationHandler)).call(this));
|
10464 | }
|
10465 |
|
10466 | _createClass(InternationalizationHandler, [{
|
10467 | key: 'render',
|
10468 | value: function render() {
|
10469 | return _react2.default.createElement(
|
10470 | 'div',
|
10471 | null,
|
10472 | this.props.children
|
10473 | );
|
10474 | }
|
10475 | }]);
|
10476 |
|
10477 | return InternationalizationHandler;
|
10478 | }(_react2.default.Component);
|
10479 |
|
10480 | InternationalizationHandler.propTypes = {
|
10481 | children: _react2.default.PropTypes.any
|
10482 | };
|
10483 |
|
10484 | InternationalizationHandler.contextTypes = {
|
10485 | intl: _react2.default.PropTypes.object
|
10486 | };
|
10487 |
|
10488 | exports.default = InternationalizationHandler;
|
10489 | module.exports = exports['default'];
|
10490 |
|
10491 | }),
|
10492 |
|
10493 | (function(module, exports, __webpack_require__) {
|
10494 |
|
10495 | "use strict";
|
10496 |
|
10497 |
|
10498 |
|
10499 |
|
10500 |
|
10501 |
|
10502 |
|
10503 |
|
10504 |
|
10505 |
|
10506 | var _assign = __webpack_require__(3);
|
10507 |
|
10508 | var emptyObject = __webpack_require__(22);
|
10509 | var _invariant = __webpack_require__(0);
|
10510 |
|
10511 | if (process.env.NODE_ENV !== 'production') {
|
10512 | var warning = __webpack_require__(1);
|
10513 | }
|
10514 |
|
10515 | var MIXINS_KEY = 'mixins';
|
10516 |
|
10517 |
|
10518 |
|
10519 | function identity(fn) {
|
10520 | return fn;
|
10521 | }
|
10522 |
|
10523 | var ReactPropTypeLocationNames;
|
10524 | if (process.env.NODE_ENV !== 'production') {
|
10525 | ReactPropTypeLocationNames = {
|
10526 | prop: 'prop',
|
10527 | context: 'context',
|
10528 | childContext: 'child context'
|
10529 | };
|
10530 | } else {
|
10531 | ReactPropTypeLocationNames = {};
|
10532 | }
|
10533 |
|
10534 | function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
|
10535 | |
10536 |
|
10537 |
|
10538 |
|
10539 | var injectedMixins = [];
|
10540 |
|
10541 | |
10542 |
|
10543 |
|
10544 |
|
10545 |
|
10546 |
|
10547 |
|
10548 |
|
10549 |
|
10550 |
|
10551 |
|
10552 |
|
10553 |
|
10554 |
|
10555 |
|
10556 |
|
10557 |
|
10558 |
|
10559 |
|
10560 |
|
10561 |
|
10562 |
|
10563 | var ReactClassInterface = {
|
10564 | |
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 |
|
10570 | mixins: 'DEFINE_MANY',
|
10571 |
|
10572 | |
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 | statics: 'DEFINE_MANY',
|
10580 |
|
10581 | |
10582 |
|
10583 |
|
10584 |
|
10585 |
|
10586 |
|
10587 | propTypes: 'DEFINE_MANY',
|
10588 |
|
10589 | |
10590 |
|
10591 |
|
10592 |
|
10593 |
|
10594 |
|
10595 | contextTypes: 'DEFINE_MANY',
|
10596 |
|
10597 | |
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 | childContextTypes: 'DEFINE_MANY',
|
10604 |
|
10605 |
|
10606 |
|
10607 | |
10608 |
|
10609 |
|
10610 |
|
10611 |
|
10612 |
|
10613 |
|
10614 |
|
10615 |
|
10616 |
|
10617 | getDefaultProps: 'DEFINE_MANY_MERGED',
|
10618 |
|
10619 | |
10620 |
|
10621 |
|
10622 |
|
10623 |
|
10624 |
|
10625 |
|
10626 |
|
10627 |
|
10628 |
|
10629 |
|
10630 |
|
10631 |
|
10632 |
|
10633 | getInitialState: 'DEFINE_MANY_MERGED',
|
10634 |
|
10635 | |
10636 |
|
10637 |
|
10638 |
|
10639 | getChildContext: 'DEFINE_MANY_MERGED',
|
10640 |
|
10641 | |
10642 |
|
10643 |
|
10644 |
|
10645 |
|
10646 |
|
10647 |
|
10648 |
|
10649 |
|
10650 |
|
10651 |
|
10652 |
|
10653 |
|
10654 |
|
10655 |
|
10656 | render: 'DEFINE_ONCE',
|
10657 |
|
10658 |
|
10659 |
|
10660 | |
10661 |
|
10662 |
|
10663 |
|
10664 |
|
10665 |
|
10666 |
|
10667 | componentWillMount: 'DEFINE_MANY',
|
10668 |
|
10669 | |
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 |
|
10677 |
|
10678 |
|
10679 | componentDidMount: 'DEFINE_MANY',
|
10680 |
|
10681 | |
10682 |
|
10683 |
|
10684 |
|
10685 |
|
10686 |
|
10687 |
|
10688 |
|
10689 |
|
10690 |
|
10691 |
|
10692 |
|
10693 |
|
10694 |
|
10695 |
|
10696 |
|
10697 |
|
10698 |
|
10699 |
|
10700 | componentWillReceiveProps: 'DEFINE_MANY',
|
10701 |
|
10702 | |
10703 |
|
10704 |
|
10705 |
|
10706 |
|
10707 |
|
10708 |
|
10709 |
|
10710 |
|
10711 |
|
10712 |
|
10713 |
|
10714 |
|
10715 |
|
10716 |
|
10717 |
|
10718 |
|
10719 |
|
10720 |
|
10721 |
|
10722 | shouldComponentUpdate: 'DEFINE_ONCE',
|
10723 |
|
10724 | |
10725 |
|
10726 |
|
10727 |
|
10728 |
|
10729 |
|
10730 |
|
10731 |
|
10732 |
|
10733 |
|
10734 |
|
10735 |
|
10736 |
|
10737 |
|
10738 |
|
10739 | componentWillUpdate: 'DEFINE_MANY',
|
10740 |
|
10741 | |
10742 |
|
10743 |
|
10744 |
|
10745 |
|
10746 |
|
10747 |
|
10748 |
|
10749 |
|
10750 |
|
10751 |
|
10752 |
|
10753 | componentDidUpdate: 'DEFINE_MANY',
|
10754 |
|
10755 | |
10756 |
|
10757 |
|
10758 |
|
10759 |
|
10760 |
|
10761 |
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 | componentWillUnmount: 'DEFINE_MANY',
|
10767 |
|
10768 | |
10769 |
|
10770 |
|
10771 |
|
10772 |
|
10773 | UNSAFE_componentWillMount: 'DEFINE_MANY',
|
10774 |
|
10775 | |
10776 |
|
10777 |
|
10778 |
|
10779 |
|
10780 | UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
|
10781 |
|
10782 | |
10783 |
|
10784 |
|
10785 |
|
10786 |
|
10787 | UNSAFE_componentWillUpdate: 'DEFINE_MANY',
|
10788 |
|
10789 |
|
10790 |
|
10791 | |
10792 |
|
10793 |
|
10794 |
|
10795 |
|
10796 |
|
10797 |
|
10798 |
|
10799 |
|
10800 |
|
10801 | updateComponent: 'OVERRIDE_BASE'
|
10802 | };
|
10803 |
|
10804 | |
10805 |
|
10806 |
|
10807 | var ReactClassStaticInterface = {
|
10808 | |
10809 |
|
10810 |
|
10811 |
|
10812 |
|
10813 |
|
10814 |
|
10815 |
|
10816 |
|
10817 |
|
10818 | getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
|
10819 | };
|
10820 |
|
10821 | |
10822 |
|
10823 |
|
10824 |
|
10825 |
|
10826 |
|
10827 |
|
10828 |
|
10829 |
|
10830 | var RESERVED_SPEC_KEYS = {
|
10831 | displayName: function(Constructor, displayName) {
|
10832 | Constructor.displayName = displayName;
|
10833 | },
|
10834 | mixins: function(Constructor, mixins) {
|
10835 | if (mixins) {
|
10836 | for (var i = 0; i < mixins.length; i++) {
|
10837 | mixSpecIntoComponent(Constructor, mixins[i]);
|
10838 | }
|
10839 | }
|
10840 | },
|
10841 | childContextTypes: function(Constructor, childContextTypes) {
|
10842 | if (process.env.NODE_ENV !== 'production') {
|
10843 | validateTypeDef(Constructor, childContextTypes, 'childContext');
|
10844 | }
|
10845 | Constructor.childContextTypes = _assign(
|
10846 | {},
|
10847 | Constructor.childContextTypes,
|
10848 | childContextTypes
|
10849 | );
|
10850 | },
|
10851 | contextTypes: function(Constructor, contextTypes) {
|
10852 | if (process.env.NODE_ENV !== 'production') {
|
10853 | validateTypeDef(Constructor, contextTypes, 'context');
|
10854 | }
|
10855 | Constructor.contextTypes = _assign(
|
10856 | {},
|
10857 | Constructor.contextTypes,
|
10858 | contextTypes
|
10859 | );
|
10860 | },
|
10861 | |
10862 |
|
10863 |
|
10864 |
|
10865 | getDefaultProps: function(Constructor, getDefaultProps) {
|
10866 | if (Constructor.getDefaultProps) {
|
10867 | Constructor.getDefaultProps = createMergedResultFunction(
|
10868 | Constructor.getDefaultProps,
|
10869 | getDefaultProps
|
10870 | );
|
10871 | } else {
|
10872 | Constructor.getDefaultProps = getDefaultProps;
|
10873 | }
|
10874 | },
|
10875 | propTypes: function(Constructor, propTypes) {
|
10876 | if (process.env.NODE_ENV !== 'production') {
|
10877 | validateTypeDef(Constructor, propTypes, 'prop');
|
10878 | }
|
10879 | Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
|
10880 | },
|
10881 | statics: function(Constructor, statics) {
|
10882 | mixStaticSpecIntoComponent(Constructor, statics);
|
10883 | },
|
10884 | autobind: function() {}
|
10885 | };
|
10886 |
|
10887 | function validateTypeDef(Constructor, typeDef, location) {
|
10888 | for (var propName in typeDef) {
|
10889 | if (typeDef.hasOwnProperty(propName)) {
|
10890 |
|
10891 |
|
10892 | if (process.env.NODE_ENV !== 'production') {
|
10893 | warning(
|
10894 | typeof typeDef[propName] === 'function',
|
10895 | '%s: %s type `%s` is invalid; it must be a function, usually from ' +
|
10896 | 'React.PropTypes.',
|
10897 | Constructor.displayName || 'ReactClass',
|
10898 | ReactPropTypeLocationNames[location],
|
10899 | propName
|
10900 | );
|
10901 | }
|
10902 | }
|
10903 | }
|
10904 | }
|
10905 |
|
10906 | function validateMethodOverride(isAlreadyDefined, name) {
|
10907 | var specPolicy = ReactClassInterface.hasOwnProperty(name)
|
10908 | ? ReactClassInterface[name]
|
10909 | : null;
|
10910 |
|
10911 |
|
10912 | if (ReactClassMixin.hasOwnProperty(name)) {
|
10913 | _invariant(
|
10914 | specPolicy === 'OVERRIDE_BASE',
|
10915 | 'ReactClassInterface: You are attempting to override ' +
|
10916 | '`%s` from your class specification. Ensure that your method names ' +
|
10917 | 'do not overlap with React methods.',
|
10918 | name
|
10919 | );
|
10920 | }
|
10921 |
|
10922 |
|
10923 | if (isAlreadyDefined) {
|
10924 | _invariant(
|
10925 | specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',
|
10926 | 'ReactClassInterface: You are attempting to define ' +
|
10927 | '`%s` on your component more than once. This conflict may be due ' +
|
10928 | 'to a mixin.',
|
10929 | name
|
10930 | );
|
10931 | }
|
10932 | }
|
10933 |
|
10934 | |
10935 |
|
10936 |
|
10937 |
|
10938 | function mixSpecIntoComponent(Constructor, spec) {
|
10939 | if (!spec) {
|
10940 | if (process.env.NODE_ENV !== 'production') {
|
10941 | var typeofSpec = typeof spec;
|
10942 | var isMixinValid = typeofSpec === 'object' && spec !== null;
|
10943 |
|
10944 | if (process.env.NODE_ENV !== 'production') {
|
10945 | warning(
|
10946 | isMixinValid,
|
10947 | "%s: You're attempting to include a mixin that is either null " +
|
10948 | 'or not an object. Check the mixins included by the component, ' +
|
10949 | 'as well as any mixins they include themselves. ' +
|
10950 | 'Expected object but got %s.',
|
10951 | Constructor.displayName || 'ReactClass',
|
10952 | spec === null ? null : typeofSpec
|
10953 | );
|
10954 | }
|
10955 | }
|
10956 |
|
10957 | return;
|
10958 | }
|
10959 |
|
10960 | _invariant(
|
10961 | typeof spec !== 'function',
|
10962 | "ReactClass: You're attempting to " +
|
10963 | 'use a component class or function as a mixin. Instead, just use a ' +
|
10964 | 'regular object.'
|
10965 | );
|
10966 | _invariant(
|
10967 | !isValidElement(spec),
|
10968 | "ReactClass: You're attempting to " +
|
10969 | 'use a component as a mixin. Instead, just use a regular object.'
|
10970 | );
|
10971 |
|
10972 | var proto = Constructor.prototype;
|
10973 | var autoBindPairs = proto.__reactAutoBindPairs;
|
10974 |
|
10975 |
|
10976 |
|
10977 |
|
10978 | if (spec.hasOwnProperty(MIXINS_KEY)) {
|
10979 | RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
|
10980 | }
|
10981 |
|
10982 | for (var name in spec) {
|
10983 | if (!spec.hasOwnProperty(name)) {
|
10984 | continue;
|
10985 | }
|
10986 |
|
10987 | if (name === MIXINS_KEY) {
|
10988 |
|
10989 | continue;
|
10990 | }
|
10991 |
|
10992 | var property = spec[name];
|
10993 | var isAlreadyDefined = proto.hasOwnProperty(name);
|
10994 | validateMethodOverride(isAlreadyDefined, name);
|
10995 |
|
10996 | if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
|
10997 | RESERVED_SPEC_KEYS[name](Constructor, property);
|
10998 | } else {
|
10999 |
|
11000 |
|
11001 |
|
11002 |
|
11003 | var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
|
11004 | var isFunction = typeof property === 'function';
|
11005 | var shouldAutoBind =
|
11006 | isFunction &&
|
11007 | !isReactClassMethod &&
|
11008 | !isAlreadyDefined &&
|
11009 | spec.autobind !== false;
|
11010 |
|
11011 | if (shouldAutoBind) {
|
11012 | autoBindPairs.push(name, property);
|
11013 | proto[name] = property;
|
11014 | } else {
|
11015 | if (isAlreadyDefined) {
|
11016 | var specPolicy = ReactClassInterface[name];
|
11017 |
|
11018 |
|
11019 | _invariant(
|
11020 | isReactClassMethod &&
|
11021 | (specPolicy === 'DEFINE_MANY_MERGED' ||
|
11022 | specPolicy === 'DEFINE_MANY'),
|
11023 | 'ReactClass: Unexpected spec policy %s for key %s ' +
|
11024 | 'when mixing in component specs.',
|
11025 | specPolicy,
|
11026 | name
|
11027 | );
|
11028 |
|
11029 |
|
11030 |
|
11031 | if (specPolicy === 'DEFINE_MANY_MERGED') {
|
11032 | proto[name] = createMergedResultFunction(proto[name], property);
|
11033 | } else if (specPolicy === 'DEFINE_MANY') {
|
11034 | proto[name] = createChainedFunction(proto[name], property);
|
11035 | }
|
11036 | } else {
|
11037 | proto[name] = property;
|
11038 | if (process.env.NODE_ENV !== 'production') {
|
11039 |
|
11040 |
|
11041 | if (typeof property === 'function' && spec.displayName) {
|
11042 | proto[name].displayName = spec.displayName + '_' + name;
|
11043 | }
|
11044 | }
|
11045 | }
|
11046 | }
|
11047 | }
|
11048 | }
|
11049 | }
|
11050 |
|
11051 | function mixStaticSpecIntoComponent(Constructor, statics) {
|
11052 | if (!statics) {
|
11053 | return;
|
11054 | }
|
11055 |
|
11056 | for (var name in statics) {
|
11057 | var property = statics[name];
|
11058 | if (!statics.hasOwnProperty(name)) {
|
11059 | continue;
|
11060 | }
|
11061 |
|
11062 | var isReserved = name in RESERVED_SPEC_KEYS;
|
11063 | _invariant(
|
11064 | !isReserved,
|
11065 | 'ReactClass: You are attempting to define a reserved ' +
|
11066 | 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' +
|
11067 | 'as an instance property instead; it will still be accessible on the ' +
|
11068 | 'constructor.',
|
11069 | name
|
11070 | );
|
11071 |
|
11072 | var isAlreadyDefined = name in Constructor;
|
11073 | if (isAlreadyDefined) {
|
11074 | var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
|
11075 | ? ReactClassStaticInterface[name]
|
11076 | : null;
|
11077 |
|
11078 | _invariant(
|
11079 | specPolicy === 'DEFINE_MANY_MERGED',
|
11080 | 'ReactClass: You are attempting to define ' +
|
11081 | '`%s` on your component more than once. This conflict may be ' +
|
11082 | 'due to a mixin.',
|
11083 | name
|
11084 | );
|
11085 |
|
11086 | Constructor[name] = createMergedResultFunction(Constructor[name], property);
|
11087 |
|
11088 | return;
|
11089 | }
|
11090 |
|
11091 | Constructor[name] = property;
|
11092 | }
|
11093 | }
|
11094 |
|
11095 | |
11096 |
|
11097 |
|
11098 |
|
11099 |
|
11100 |
|
11101 |
|
11102 | function mergeIntoWithNoDuplicateKeys(one, two) {
|
11103 | _invariant(
|
11104 | one && two && typeof one === 'object' && typeof two === 'object',
|
11105 | 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'
|
11106 | );
|
11107 |
|
11108 | for (var key in two) {
|
11109 | if (two.hasOwnProperty(key)) {
|
11110 | _invariant(
|
11111 | one[key] === undefined,
|
11112 | 'mergeIntoWithNoDuplicateKeys(): ' +
|
11113 | 'Tried to merge two objects with the same key: `%s`. This conflict ' +
|
11114 | 'may be due to a mixin; in particular, this may be caused by two ' +
|
11115 | 'getInitialState() or getDefaultProps() methods returning objects ' +
|
11116 | 'with clashing keys.',
|
11117 | key
|
11118 | );
|
11119 | one[key] = two[key];
|
11120 | }
|
11121 | }
|
11122 | return one;
|
11123 | }
|
11124 |
|
11125 | |
11126 |
|
11127 |
|
11128 |
|
11129 |
|
11130 |
|
11131 |
|
11132 |
|
11133 | function createMergedResultFunction(one, two) {
|
11134 | return function mergedResult() {
|
11135 | var a = one.apply(this, arguments);
|
11136 | var b = two.apply(this, arguments);
|
11137 | if (a == null) {
|
11138 | return b;
|
11139 | } else if (b == null) {
|
11140 | return a;
|
11141 | }
|
11142 | var c = {};
|
11143 | mergeIntoWithNoDuplicateKeys(c, a);
|
11144 | mergeIntoWithNoDuplicateKeys(c, b);
|
11145 | return c;
|
11146 | };
|
11147 | }
|
11148 |
|
11149 | |
11150 |
|
11151 |
|
11152 |
|
11153 |
|
11154 |
|
11155 |
|
11156 |
|
11157 | function createChainedFunction(one, two) {
|
11158 | return function chainedFunction() {
|
11159 | one.apply(this, arguments);
|
11160 | two.apply(this, arguments);
|
11161 | };
|
11162 | }
|
11163 |
|
11164 | |
11165 |
|
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 |
|
11171 | function bindAutoBindMethod(component, method) {
|
11172 | var boundMethod = method.bind(component);
|
11173 | if (process.env.NODE_ENV !== 'production') {
|
11174 | boundMethod.__reactBoundContext = component;
|
11175 | boundMethod.__reactBoundMethod = method;
|
11176 | boundMethod.__reactBoundArguments = null;
|
11177 | var componentName = component.constructor.displayName;
|
11178 | var _bind = boundMethod.bind;
|
11179 | boundMethod.bind = function(newThis) {
|
11180 | for (
|
11181 | var _len = arguments.length,
|
11182 | args = Array(_len > 1 ? _len - 1 : 0),
|
11183 | _key = 1;
|
11184 | _key < _len;
|
11185 | _key++
|
11186 | ) {
|
11187 | args[_key - 1] = arguments[_key];
|
11188 | }
|
11189 |
|
11190 |
|
11191 |
|
11192 |
|
11193 | if (newThis !== component && newThis !== null) {
|
11194 | if (process.env.NODE_ENV !== 'production') {
|
11195 | warning(
|
11196 | false,
|
11197 | 'bind(): React component methods may only be bound to the ' +
|
11198 | 'component instance. See %s',
|
11199 | componentName
|
11200 | );
|
11201 | }
|
11202 | } else if (!args.length) {
|
11203 | if (process.env.NODE_ENV !== 'production') {
|
11204 | warning(
|
11205 | false,
|
11206 | 'bind(): You are binding a component method to the component. ' +
|
11207 | 'React does this for you automatically in a high-performance ' +
|
11208 | 'way, so you can safely remove this call. See %s',
|
11209 | componentName
|
11210 | );
|
11211 | }
|
11212 | return boundMethod;
|
11213 | }
|
11214 | var reboundMethod = _bind.apply(boundMethod, arguments);
|
11215 | reboundMethod.__reactBoundContext = component;
|
11216 | reboundMethod.__reactBoundMethod = method;
|
11217 | reboundMethod.__reactBoundArguments = args;
|
11218 | return reboundMethod;
|
11219 | };
|
11220 | }
|
11221 | return boundMethod;
|
11222 | }
|
11223 |
|
11224 | |
11225 |
|
11226 |
|
11227 |
|
11228 |
|
11229 | function bindAutoBindMethods(component) {
|
11230 | var pairs = component.__reactAutoBindPairs;
|
11231 | for (var i = 0; i < pairs.length; i += 2) {
|
11232 | var autoBindKey = pairs[i];
|
11233 | var method = pairs[i + 1];
|
11234 | component[autoBindKey] = bindAutoBindMethod(component, method);
|
11235 | }
|
11236 | }
|
11237 |
|
11238 | var IsMountedPreMixin = {
|
11239 | componentDidMount: function() {
|
11240 | this.__isMounted = true;
|
11241 | }
|
11242 | };
|
11243 |
|
11244 | var IsMountedPostMixin = {
|
11245 | componentWillUnmount: function() {
|
11246 | this.__isMounted = false;
|
11247 | }
|
11248 | };
|
11249 |
|
11250 | |
11251 |
|
11252 |
|
11253 |
|
11254 | var ReactClassMixin = {
|
11255 | |
11256 |
|
11257 |
|
11258 |
|
11259 | replaceState: function(newState, callback) {
|
11260 | this.updater.enqueueReplaceState(this, newState, callback);
|
11261 | },
|
11262 |
|
11263 | |
11264 |
|
11265 |
|
11266 |
|
11267 |
|
11268 |
|
11269 | isMounted: function() {
|
11270 | if (process.env.NODE_ENV !== 'production') {
|
11271 | warning(
|
11272 | this.__didWarnIsMounted,
|
11273 | '%s: isMounted is deprecated. Instead, make sure to clean up ' +
|
11274 | 'subscriptions and pending requests in componentWillUnmount to ' +
|
11275 | 'prevent memory leaks.',
|
11276 | (this.constructor && this.constructor.displayName) ||
|
11277 | this.name ||
|
11278 | 'Component'
|
11279 | );
|
11280 | this.__didWarnIsMounted = true;
|
11281 | }
|
11282 | return !!this.__isMounted;
|
11283 | }
|
11284 | };
|
11285 |
|
11286 | var ReactClassComponent = function() {};
|
11287 | _assign(
|
11288 | ReactClassComponent.prototype,
|
11289 | ReactComponent.prototype,
|
11290 | ReactClassMixin
|
11291 | );
|
11292 |
|
11293 | |
11294 |
|
11295 |
|
11296 |
|
11297 |
|
11298 |
|
11299 |
|
11300 |
|
11301 | function createClass(spec) {
|
11302 |
|
11303 |
|
11304 |
|
11305 | var Constructor = identity(function(props, context, updater) {
|
11306 |
|
11307 |
|
11308 |
|
11309 | if (process.env.NODE_ENV !== 'production') {
|
11310 | warning(
|
11311 | this instanceof Constructor,
|
11312 | 'Something is calling a React component directly. Use a factory or ' +
|
11313 | 'JSX instead. See: https://fb.me/react-legacyfactory'
|
11314 | );
|
11315 | }
|
11316 |
|
11317 |
|
11318 | if (this.__reactAutoBindPairs.length) {
|
11319 | bindAutoBindMethods(this);
|
11320 | }
|
11321 |
|
11322 | this.props = props;
|
11323 | this.context = context;
|
11324 | this.refs = emptyObject;
|
11325 | this.updater = updater || ReactNoopUpdateQueue;
|
11326 |
|
11327 | this.state = null;
|
11328 |
|
11329 |
|
11330 |
|
11331 |
|
11332 | var initialState = this.getInitialState ? this.getInitialState() : null;
|
11333 | if (process.env.NODE_ENV !== 'production') {
|
11334 |
|
11335 | if (
|
11336 | initialState === undefined &&
|
11337 | this.getInitialState._isMockFunction
|
11338 | ) {
|
11339 |
|
11340 |
|
11341 | initialState = null;
|
11342 | }
|
11343 | }
|
11344 | _invariant(
|
11345 | typeof initialState === 'object' && !Array.isArray(initialState),
|
11346 | '%s.getInitialState(): must return an object or null',
|
11347 | Constructor.displayName || 'ReactCompositeComponent'
|
11348 | );
|
11349 |
|
11350 | this.state = initialState;
|
11351 | });
|
11352 | Constructor.prototype = new ReactClassComponent();
|
11353 | Constructor.prototype.constructor = Constructor;
|
11354 | Constructor.prototype.__reactAutoBindPairs = [];
|
11355 |
|
11356 | injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
|
11357 |
|
11358 | mixSpecIntoComponent(Constructor, IsMountedPreMixin);
|
11359 | mixSpecIntoComponent(Constructor, spec);
|
11360 | mixSpecIntoComponent(Constructor, IsMountedPostMixin);
|
11361 |
|
11362 |
|
11363 | if (Constructor.getDefaultProps) {
|
11364 | Constructor.defaultProps = Constructor.getDefaultProps();
|
11365 | }
|
11366 |
|
11367 | if (process.env.NODE_ENV !== 'production') {
|
11368 |
|
11369 |
|
11370 |
|
11371 |
|
11372 | if (Constructor.getDefaultProps) {
|
11373 | Constructor.getDefaultProps.isReactClassApproved = {};
|
11374 | }
|
11375 | if (Constructor.prototype.getInitialState) {
|
11376 | Constructor.prototype.getInitialState.isReactClassApproved = {};
|
11377 | }
|
11378 | }
|
11379 |
|
11380 | _invariant(
|
11381 | Constructor.prototype.render,
|
11382 | 'createClass(...): Class specification must implement a `render` method.'
|
11383 | );
|
11384 |
|
11385 | if (process.env.NODE_ENV !== 'production') {
|
11386 | warning(
|
11387 | !Constructor.prototype.componentShouldUpdate,
|
11388 | '%s has a method called ' +
|
11389 | 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +
|
11390 | 'The name is phrased as a question because the function is ' +
|
11391 | 'expected to return a value.',
|
11392 | spec.displayName || 'A component'
|
11393 | );
|
11394 | warning(
|
11395 | !Constructor.prototype.componentWillRecieveProps,
|
11396 | '%s has a method called ' +
|
11397 | 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
|
11398 | spec.displayName || 'A component'
|
11399 | );
|
11400 | warning(
|
11401 | !Constructor.prototype.UNSAFE_componentWillRecieveProps,
|
11402 | '%s has a method called UNSAFE_componentWillRecieveProps(). ' +
|
11403 | 'Did you mean UNSAFE_componentWillReceiveProps()?',
|
11404 | spec.displayName || 'A component'
|
11405 | );
|
11406 | }
|
11407 |
|
11408 |
|
11409 | for (var methodName in ReactClassInterface) {
|
11410 | if (!Constructor.prototype[methodName]) {
|
11411 | Constructor.prototype[methodName] = null;
|
11412 | }
|
11413 | }
|
11414 |
|
11415 | return Constructor;
|
11416 | }
|
11417 |
|
11418 | return createClass;
|
11419 | }
|
11420 |
|
11421 | module.exports = factory;
|
11422 |
|
11423 |
|
11424 | }),
|
11425 |
|
11426 | (function(module, exports, __webpack_require__) {
|
11427 |
|
11428 | "use strict";
|
11429 |
|
11430 |
|
11431 |
|
11432 | module.exports = function () {};
|
11433 |
|
11434 |
|
11435 | }),
|
11436 |
|
11437 | (function(module, exports, __webpack_require__) {
|
11438 |
|
11439 | "use strict";
|
11440 |
|
11441 |
|
11442 | var isValue = __webpack_require__(47);
|
11443 |
|
11444 | var forEach = Array.prototype.forEach, create = Object.create;
|
11445 |
|
11446 | var process = function (src, obj) {
|
11447 | var key;
|
11448 | for (key in src) obj[key] = src[key];
|
11449 | };
|
11450 |
|
11451 |
|
11452 | module.exports = function (opts1 /*, …options*/) {
|
11453 | var result = create(null);
|
11454 | forEach.call(arguments, function (options) {
|
11455 | if (!isValue(options)) return;
|
11456 | process(Object(options), result);
|
11457 | });
|
11458 | return result;
|
11459 | };
|
11460 |
|
11461 |
|
11462 | }),
|
11463 |
|
11464 | (function(module, exports, __webpack_require__) {
|
11465 |
|
11466 | "use strict";
|
11467 |
|
11468 |
|
11469 | var isValue = __webpack_require__(47);
|
11470 |
|
11471 | module.exports = function (value) {
|
11472 | if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
|
11473 | return value;
|
11474 | };
|
11475 |
|
11476 |
|
11477 | }),
|
11478 |
|
11479 | (function(module, exports, __webpack_require__) {
|
11480 |
|
11481 | "use strict";
|
11482 |
|
11483 |
|
11484 | var esniff = __webpack_require__(204)
|
11485 |
|
11486 | , i, current, literals, substitutions, sOut, sEscape, sAhead, sIn, sInEscape, template;
|
11487 |
|
11488 | sOut = function (char) {
|
11489 | if (char === '\\') return sEscape;
|
11490 | if (char === '$') return sAhead;
|
11491 | current += char;
|
11492 | return sOut;
|
11493 | };
|
11494 | sEscape = function (char) {
|
11495 | if ((char !== '\\') && (char !== '$')) current += '\\';
|
11496 | current += char;
|
11497 | return sOut;
|
11498 | };
|
11499 | sAhead = function (char) {
|
11500 | if (char === '{') {
|
11501 | literals.push(current);
|
11502 | current = '';
|
11503 | return sIn;
|
11504 | }
|
11505 | if (char === '$') {
|
11506 | current += '$';
|
11507 | return sAhead;
|
11508 | }
|
11509 | current += '$' + char;
|
11510 | return sOut;
|
11511 | };
|
11512 | sIn = function (char) {
|
11513 | var code = template.slice(i), end;
|
11514 | esniff(code, '}', function (j) {
|
11515 | if (esniff.nest >= 0) return esniff.next();
|
11516 | end = j;
|
11517 | });
|
11518 | if (end != null) {
|
11519 | substitutions.push(template.slice(i, i + end));
|
11520 | i += end;
|
11521 | current = '';
|
11522 | return sOut;
|
11523 | }
|
11524 | end = code.length;
|
11525 | i += end;
|
11526 | current += code;
|
11527 | return sIn;
|
11528 | };
|
11529 | sInEscape = function (char) {
|
11530 | if ((char !== '\\') && (char !== '}')) current += '\\';
|
11531 | current += char;
|
11532 | return sIn;
|
11533 | };
|
11534 |
|
11535 | module.exports = function (str) {
|
11536 | var length, state, result;
|
11537 | current = '';
|
11538 | literals = [];
|
11539 | substitutions = [];
|
11540 |
|
11541 | template = String(str);
|
11542 | length = template.length;
|
11543 |
|
11544 | state = sOut;
|
11545 | for (i = 0; i < length; ++i) state = state(template[i]);
|
11546 | if (state === sOut) {
|
11547 | literals.push(current);
|
11548 | } else if (state === sEscape) {
|
11549 | literals.push(current + '\\');
|
11550 | } else if (state === sAhead) {
|
11551 | literals.push(current + '$');
|
11552 | } else if (state === sIn) {
|
11553 | literals[literals.length - 1] += '${' + current;
|
11554 | } else if (state === sInEscape) {
|
11555 | literals[literals.length - 1] += '${' + current + '\\';
|
11556 | }
|
11557 | result = { literals: literals, substitutions: substitutions };
|
11558 | literals = substitutions = null;
|
11559 | return result;
|
11560 | };
|
11561 |
|
11562 |
|
11563 | }),
|
11564 |
|
11565 | (function(module, exports, __webpack_require__) {
|
11566 |
|
11567 | "use strict";
|
11568 |
|
11569 |
|
11570 | var reduce = Array.prototype.reduce;
|
11571 |
|
11572 | module.exports = function (literals/*, …substitutions*/) {
|
11573 | var args = arguments;
|
11574 | return reduce.call(literals, function (a, b, i) {
|
11575 | return a + ((args[i] === undefined) ? '' : String(args[i])) + b;
|
11576 | });
|
11577 | };
|
11578 |
|
11579 |
|
11580 | }),
|
11581 |
|
11582 | (function(module, exports, __webpack_require__) {
|
11583 |
|
11584 | "use strict";
|
11585 |
|
11586 |
|
11587 | var resolve = __webpack_require__(103)
|
11588 | , passthru = __webpack_require__(101);
|
11589 |
|
11590 | module.exports = function (data, context/*, options*/) {
|
11591 | return passthru.apply(null, resolve(data, context, arguments[2]));
|
11592 | };
|
11593 |
|
11594 |
|
11595 | }),
|
11596 |
|
11597 | (function(module, exports, __webpack_require__) {
|
11598 |
|
11599 | "use strict";
|
11600 |
|
11601 |
|
11602 | var value = __webpack_require__(99)
|
11603 | , normalize = __webpack_require__(98)
|
11604 | , isVarNameValid = __webpack_require__(104)
|
11605 |
|
11606 | , map = Array.prototype.map, keys = Object.keys
|
11607 | , stringify = JSON.stringify;
|
11608 |
|
11609 | module.exports = function (data, context/*, options*/) {
|
11610 | var names, argNames, argValues, options = Object(arguments[2]);
|
11611 |
|
11612 | (value(data) && value(data.literals) && value(data.substitutions));
|
11613 | context = normalize(context);
|
11614 | names = keys(context).filter(isVarNameValid);
|
11615 | argNames = names.join(', ');
|
11616 | argValues = names.map(function (name) { return context[name]; });
|
11617 | return [data.literals].concat(map.call(data.substitutions, function (expr) {
|
11618 | var resolver;
|
11619 | if (!expr) return undefined;
|
11620 | try {
|
11621 | resolver = new Function(argNames, 'return (' + expr + ')');
|
11622 | } catch (e) {
|
11623 | throw new TypeError("Unable to compile expression:\n\targs: " + stringify(argNames) +
|
11624 | "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
|
11625 | }
|
11626 | try {
|
11627 | return resolver.apply(null, argValues);
|
11628 | } catch (e) {
|
11629 | if (options.partial) return '${' + expr + '}';
|
11630 | throw new TypeError("Unable to resolve expression:\n\targs: " + stringify(argNames) +
|
11631 | "\n\tbody: " + stringify(expr) + "\n\terror: " + e.stack);
|
11632 | }
|
11633 | }));
|
11634 | };
|
11635 |
|
11636 |
|
11637 | }),
|
11638 |
|
11639 | (function(module, exports, __webpack_require__) {
|
11640 |
|
11641 | "use strict";
|
11642 |
|
11643 |
|
11644 |
|
11645 |
|
11646 | module.exports = RegExp.prototype.test.bind(/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|null|this|true|void|with|await|break|catch|class|const|false|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])*$/);
|
11647 |
|
11648 |
|
11649 | }),
|
11650 |
|
11651 | (function(module, exports, __webpack_require__) {
|
11652 |
|
11653 | "use strict";
|
11654 |
|
11655 |
|
11656 |
|
11657 |
|
11658 |
|
11659 |
|
11660 |
|
11661 |
|
11662 |
|
11663 |
|
11664 |
|
11665 | var _hyphenPattern = /-(.)/g;
|
11666 |
|
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 |
|
11674 |
|
11675 |
|
11676 | function camelize(string) {
|
11677 | return string.replace(_hyphenPattern, function (_, character) {
|
11678 | return character.toUpperCase();
|
11679 | });
|
11680 | }
|
11681 |
|
11682 | module.exports = camelize;
|
11683 |
|
11684 | }),
|
11685 |
|
11686 | (function(module, exports, __webpack_require__) {
|
11687 |
|
11688 | "use strict";
|
11689 |
|
11690 |
|
11691 |
|
11692 |
|
11693 |
|
11694 |
|
11695 |
|
11696 |
|
11697 |
|
11698 |
|
11699 |
|
11700 | var camelize = __webpack_require__(105);
|
11701 |
|
11702 | var msPattern = /^-ms-/;
|
11703 |
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 |
|
11711 |
|
11712 |
|
11713 |
|
11714 |
|
11715 |
|
11716 |
|
11717 |
|
11718 |
|
11719 |
|
11720 |
|
11721 | function camelizeStyleName(string) {
|
11722 | return camelize(string.replace(msPattern, 'ms-'));
|
11723 | }
|
11724 |
|
11725 | module.exports = camelizeStyleName;
|
11726 |
|
11727 | }),
|
11728 |
|
11729 | (function(module, exports, __webpack_require__) {
|
11730 |
|
11731 | "use strict";
|
11732 |
|
11733 |
|
11734 |
|
11735 |
|
11736 |
|
11737 |
|
11738 |
|
11739 |
|
11740 |
|
11741 |
|
11742 |
|
11743 | var isTextNode = __webpack_require__(115);
|
11744 |
|
11745 |
|
11746 |
|
11747 |
|
11748 |
|
11749 |
|
11750 | function containsNode(outerNode, innerNode) {
|
11751 | if (!outerNode || !innerNode) {
|
11752 | return false;
|
11753 | } else if (outerNode === innerNode) {
|
11754 | return true;
|
11755 | } else if (isTextNode(outerNode)) {
|
11756 | return false;
|
11757 | } else if (isTextNode(innerNode)) {
|
11758 | return containsNode(outerNode, innerNode.parentNode);
|
11759 | } else if ('contains' in outerNode) {
|
11760 | return outerNode.contains(innerNode);
|
11761 | } else if (outerNode.compareDocumentPosition) {
|
11762 | return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
11763 | } else {
|
11764 | return false;
|
11765 | }
|
11766 | }
|
11767 |
|
11768 | module.exports = containsNode;
|
11769 |
|
11770 | }),
|
11771 |
|
11772 | (function(module, exports, __webpack_require__) {
|
11773 |
|
11774 | "use strict";
|
11775 |
|
11776 |
|
11777 |
|
11778 |
|
11779 |
|
11780 |
|
11781 |
|
11782 |
|
11783 |
|
11784 |
|
11785 |
|
11786 | var invariant = __webpack_require__(0);
|
11787 |
|
11788 |
|
11789 |
|
11790 |
|
11791 |
|
11792 |
|
11793 |
|
11794 |
|
11795 |
|
11796 |
|
11797 | function toArray(obj) {
|
11798 | var length = obj.length;
|
11799 |
|
11800 |
|
11801 |
|
11802 | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
|
11803 |
|
11804 | !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
|
11805 |
|
11806 | !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
|
11807 |
|
11808 | !(typeof obj.callee !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
|
11809 |
|
11810 |
|
11811 |
|
11812 |
|
11813 | if (obj.hasOwnProperty) {
|
11814 | try {
|
11815 | return Array.prototype.slice.call(obj);
|
11816 | } catch (e) {
|
11817 |
|
11818 | }
|
11819 | }
|
11820 |
|
11821 |
|
11822 |
|
11823 | var ret = Array(length);
|
11824 | for (var ii = 0; ii < length; ii++) {
|
11825 | ret[ii] = obj[ii];
|
11826 | }
|
11827 | return ret;
|
11828 | }
|
11829 |
|
11830 |
|
11831 |
|
11832 |
|
11833 |
|
11834 |
|
11835 |
|
11836 |
|
11837 |
|
11838 |
|
11839 |
|
11840 |
|
11841 |
|
11842 |
|
11843 |
|
11844 |
|
11845 | function hasArrayNature(obj) {
|
11846 | return (
|
11847 |
|
11848 | !!obj && (
|
11849 |
|
11850 | typeof obj == 'object' || typeof obj == 'function') &&
|
11851 |
|
11852 | 'length' in obj &&
|
11853 |
|
11854 | !('setInterval' in obj) &&
|
11855 |
|
11856 |
|
11857 | typeof obj.nodeType != 'number' && (
|
11858 |
|
11859 | Array.isArray(obj) ||
|
11860 |
|
11861 | 'callee' in obj ||
|
11862 |
|
11863 | 'item' in obj)
|
11864 | );
|
11865 | }
|
11866 |
|
11867 |
|
11868 |
|
11869 |
|
11870 |
|
11871 |
|
11872 |
|
11873 |
|
11874 |
|
11875 |
|
11876 |
|
11877 |
|
11878 |
|
11879 |
|
11880 |
|
11881 |
|
11882 |
|
11883 |
|
11884 |
|
11885 |
|
11886 |
|
11887 |
|
11888 | function createArrayFromMixed(obj) {
|
11889 | if (!hasArrayNature(obj)) {
|
11890 | return [obj];
|
11891 | } else if (Array.isArray(obj)) {
|
11892 | return obj.slice();
|
11893 | } else {
|
11894 | return toArray(obj);
|
11895 | }
|
11896 | }
|
11897 |
|
11898 | module.exports = createArrayFromMixed;
|
11899 |
|
11900 | }),
|
11901 |
|
11902 | (function(module, exports, __webpack_require__) {
|
11903 |
|
11904 | "use strict";
|
11905 |
|
11906 |
|
11907 |
|
11908 |
|
11909 |
|
11910 |
|
11911 |
|
11912 |
|
11913 |
|
11914 |
|
11915 |
|
11916 |
|
11917 |
|
11918 | var ExecutionEnvironment = __webpack_require__(5);
|
11919 |
|
11920 | var createArrayFromMixed = __webpack_require__(108);
|
11921 | var getMarkupWrap = __webpack_require__(110);
|
11922 | var invariant = __webpack_require__(0);
|
11923 |
|
11924 |
|
11925 |
|
11926 |
|
11927 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
11928 |
|
11929 |
|
11930 |
|
11931 |
|
11932 | var nodeNamePattern = /^\s*<(\w+)/;
|
11933 |
|
11934 |
|
11935 |
|
11936 |
|
11937 |
|
11938 |
|
11939 |
|
11940 | function getNodeName(markup) {
|
11941 | var nodeNameMatch = markup.match(nodeNamePattern);
|
11942 | return nodeNameMatch && nodeNameMatch[1].toLowerCase();
|
11943 | }
|
11944 |
|
11945 |
|
11946 |
|
11947 |
|
11948 |
|
11949 |
|
11950 |
|
11951 |
|
11952 |
|
11953 |
|
11954 |
|
11955 | function createNodesFromMarkup(markup, handleScript) {
|
11956 | var node = dummyNode;
|
11957 | !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
|
11958 | var nodeName = getNodeName(markup);
|
11959 |
|
11960 | var wrap = nodeName && getMarkupWrap(nodeName);
|
11961 | if (wrap) {
|
11962 | node.innerHTML = wrap[1] + markup + wrap[2];
|
11963 |
|
11964 | var wrapDepth = wrap[0];
|
11965 | while (wrapDepth--) {
|
11966 | node = node.lastChild;
|
11967 | }
|
11968 | } else {
|
11969 | node.innerHTML = markup;
|
11970 | }
|
11971 |
|
11972 | var scripts = node.getElementsByTagName('script');
|
11973 | if (scripts.length) {
|
11974 | !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
|
11975 | createArrayFromMixed(scripts).forEach(handleScript);
|
11976 | }
|
11977 |
|
11978 | var nodes = Array.from(node.childNodes);
|
11979 | while (node.lastChild) {
|
11980 | node.removeChild(node.lastChild);
|
11981 | }
|
11982 | return nodes;
|
11983 | }
|
11984 |
|
11985 | module.exports = createNodesFromMarkup;
|
11986 |
|
11987 | }),
|
11988 |
|
11989 | (function(module, exports, __webpack_require__) {
|
11990 |
|
11991 | "use strict";
|
11992 |
|
11993 |
|
11994 |
|
11995 |
|
11996 |
|
11997 |
|
11998 |
|
11999 |
|
12000 |
|
12001 |
|
12002 |
|
12003 |
|
12004 | var ExecutionEnvironment = __webpack_require__(5);
|
12005 |
|
12006 | var invariant = __webpack_require__(0);
|
12007 |
|
12008 |
|
12009 |
|
12010 |
|
12011 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
12012 |
|
12013 |
|
12014 |
|
12015 |
|
12016 |
|
12017 |
|
12018 |
|
12019 |
|
12020 | var shouldWrap = {};
|
12021 |
|
12022 | var selectWrap = [1, '<select multiple="true">', '</select>'];
|
12023 | var tableWrap = [1, '<table>', '</table>'];
|
12024 | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
12025 |
|
12026 | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
|
12027 |
|
12028 | var markupWrap = {
|
12029 | '*': [1, '?<div>', '</div>'],
|
12030 |
|
12031 | 'area': [1, '<map>', '</map>'],
|
12032 | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
12033 | 'legend': [1, '<fieldset>', '</fieldset>'],
|
12034 | 'param': [1, '<object>', '</object>'],
|
12035 | 'tr': [2, '<table><tbody>', '</tbody></table>'],
|
12036 |
|
12037 | 'optgroup': selectWrap,
|
12038 | 'option': selectWrap,
|
12039 |
|
12040 | 'caption': tableWrap,
|
12041 | 'colgroup': tableWrap,
|
12042 | 'tbody': tableWrap,
|
12043 | 'tfoot': tableWrap,
|
12044 | 'thead': tableWrap,
|
12045 |
|
12046 | 'td': trWrap,
|
12047 | 'th': trWrap
|
12048 | };
|
12049 |
|
12050 |
|
12051 |
|
12052 |
|
12053 | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
|
12054 | svgElements.forEach(function (nodeName) {
|
12055 | markupWrap[nodeName] = svgWrap;
|
12056 | shouldWrap[nodeName] = true;
|
12057 | });
|
12058 |
|
12059 |
|
12060 |
|
12061 |
|
12062 |
|
12063 |
|
12064 |
|
12065 |
|
12066 |
|
12067 | function getMarkupWrap(nodeName) {
|
12068 | !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
|
12069 | if (!markupWrap.hasOwnProperty(nodeName)) {
|
12070 | nodeName = '*';
|
12071 | }
|
12072 | if (!shouldWrap.hasOwnProperty(nodeName)) {
|
12073 | if (nodeName === '*') {
|
12074 | dummyNode.innerHTML = '<link />';
|
12075 | } else {
|
12076 | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
|
12077 | }
|
12078 | shouldWrap[nodeName] = !dummyNode.firstChild;
|
12079 | }
|
12080 | return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
|
12081 | }
|
12082 |
|
12083 | module.exports = getMarkupWrap;
|
12084 |
|
12085 | }),
|
12086 |
|
12087 | (function(module, exports, __webpack_require__) {
|
12088 |
|
12089 | "use strict";
|
12090 |
|
12091 |
|
12092 |
|
12093 |
|
12094 |
|
12095 |
|
12096 |
|
12097 |
|
12098 |
|
12099 |
|
12100 |
|
12101 |
|
12102 |
|
12103 |
|
12104 |
|
12105 |
|
12106 |
|
12107 |
|
12108 |
|
12109 |
|
12110 |
|
12111 |
|
12112 | function getUnboundedScrollPosition(scrollable) {
|
12113 | if (scrollable.Window && scrollable instanceof scrollable.Window) {
|
12114 | return {
|
12115 | x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
|
12116 | y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
|
12117 | };
|
12118 | }
|
12119 | return {
|
12120 | x: scrollable.scrollLeft,
|
12121 | y: scrollable.scrollTop
|
12122 | };
|
12123 | }
|
12124 |
|
12125 | module.exports = getUnboundedScrollPosition;
|
12126 |
|
12127 | }),
|
12128 |
|
12129 | (function(module, exports, __webpack_require__) {
|
12130 |
|
12131 | "use strict";
|
12132 |
|
12133 |
|
12134 |
|
12135 |
|
12136 |
|
12137 |
|
12138 |
|
12139 |
|
12140 |
|
12141 |
|
12142 |
|
12143 | var _uppercasePattern = /([A-Z])/g;
|
12144 |
|
12145 |
|
12146 |
|
12147 |
|
12148 |
|
12149 |
|
12150 |
|
12151 |
|
12152 |
|
12153 |
|
12154 |
|
12155 |
|
12156 |
|
12157 | function hyphenate(string) {
|
12158 | return string.replace(_uppercasePattern, '-$1').toLowerCase();
|
12159 | }
|
12160 |
|
12161 | module.exports = hyphenate;
|
12162 |
|
12163 | }),
|
12164 |
|
12165 | (function(module, exports, __webpack_require__) {
|
12166 |
|
12167 | "use strict";
|
12168 |
|
12169 |
|
12170 |
|
12171 |
|
12172 |
|
12173 |
|
12174 |
|
12175 |
|
12176 |
|
12177 |
|
12178 |
|
12179 | var hyphenate = __webpack_require__(112);
|
12180 |
|
12181 | var msPattern = /^ms-/;
|
12182 |
|
12183 |
|
12184 |
|
12185 |
|
12186 |
|
12187 |
|
12188 |
|
12189 |
|
12190 |
|
12191 |
|
12192 |
|
12193 |
|
12194 |
|
12195 |
|
12196 |
|
12197 |
|
12198 |
|
12199 | function hyphenateStyleName(string) {
|
12200 | return hyphenate(string).replace(msPattern, '-ms-');
|
12201 | }
|
12202 |
|
12203 | module.exports = hyphenateStyleName;
|
12204 |
|
12205 | }),
|
12206 |
|
12207 | (function(module, exports, __webpack_require__) {
|
12208 |
|
12209 | "use strict";
|
12210 |
|
12211 |
|
12212 |
|
12213 |
|
12214 |
|
12215 |
|
12216 |
|
12217 |
|
12218 |
|
12219 |
|
12220 |
|
12221 |
|
12222 |
|
12223 |
|
12224 |
|
12225 | function isNode(object) {
|
12226 | var doc = object ? object.ownerDocument || object : document;
|
12227 | var defaultView = doc.defaultView || window;
|
12228 | return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
|
12229 | }
|
12230 |
|
12231 | module.exports = isNode;
|
12232 |
|
12233 | }),
|
12234 |
|
12235 | (function(module, exports, __webpack_require__) {
|
12236 |
|
12237 | "use strict";
|
12238 |
|
12239 |
|
12240 |
|
12241 |
|
12242 |
|
12243 |
|
12244 |
|
12245 |
|
12246 |
|
12247 |
|
12248 |
|
12249 | var isNode = __webpack_require__(114);
|
12250 |
|
12251 |
|
12252 |
|
12253 |
|
12254 |
|
12255 | function isTextNode(object) {
|
12256 | return isNode(object) && object.nodeType == 3;
|
12257 | }
|
12258 |
|
12259 | module.exports = isTextNode;
|
12260 |
|
12261 | }),
|
12262 |
|
12263 | (function(module, exports, __webpack_require__) {
|
12264 |
|
12265 | "use strict";
|
12266 |
|
12267 |
|
12268 |
|
12269 |
|
12270 |
|
12271 |
|
12272 |
|
12273 |
|
12274 |
|
12275 |
|
12276 |
|
12277 |
|
12278 |
|
12279 |
|
12280 |
|
12281 |
|
12282 | function memoizeStringOnly(callback) {
|
12283 | var cache = {};
|
12284 | return function (string) {
|
12285 | if (!cache.hasOwnProperty(string)) {
|
12286 | cache[string] = callback.call(this, string);
|
12287 | }
|
12288 | return cache[string];
|
12289 | };
|
12290 | }
|
12291 |
|
12292 | module.exports = memoizeStringOnly;
|
12293 |
|
12294 | }),
|
12295 |
|
12296 | (function(module, exports, __webpack_require__) {
|
12297 |
|
12298 | "use strict";
|
12299 |
|
12300 |
|
12301 |
|
12302 |
|
12303 |
|
12304 |
|
12305 |
|
12306 |
|
12307 |
|
12308 |
|
12309 |
|
12310 | var ExecutionEnvironment = __webpack_require__(5);
|
12311 |
|
12312 | var performance;
|
12313 |
|
12314 | if (ExecutionEnvironment.canUseDOM) {
|
12315 | performance = window.performance || window.msPerformance || window.webkitPerformance;
|
12316 | }
|
12317 |
|
12318 | module.exports = performance || {};
|
12319 |
|
12320 | }),
|
12321 |
|
12322 | (function(module, exports, __webpack_require__) {
|
12323 |
|
12324 | "use strict";
|
12325 |
|
12326 |
|
12327 |
|
12328 |
|
12329 |
|
12330 |
|
12331 |
|
12332 |
|
12333 |
|
12334 |
|
12335 |
|
12336 | var performance = __webpack_require__(117);
|
12337 |
|
12338 | var performanceNow;
|
12339 |
|
12340 |
|
12341 |
|
12342 |
|
12343 |
|
12344 |
|
12345 | if (performance.now) {
|
12346 | performanceNow = function performanceNow() {
|
12347 | return performance.now();
|
12348 | };
|
12349 | } else {
|
12350 | performanceNow = function performanceNow() {
|
12351 | return Date.now();
|
12352 | };
|
12353 | }
|
12354 |
|
12355 | module.exports = performanceNow;
|
12356 |
|
12357 | }),
|
12358 |
|
12359 | (function(module, exports, __webpack_require__) {
|
12360 |
|
12361 | "use strict";
|
12362 |
|
12363 |
|
12364 |
|
12365 |
|
12366 |
|
12367 |
|
12368 |
|
12369 |
|
12370 |
|
12371 | var printWarning = function() {};
|
12372 |
|
12373 | if (process.env.NODE_ENV !== 'production') {
|
12374 | var ReactPropTypesSecret = __webpack_require__(52);
|
12375 | var loggedTypeFailures = {};
|
12376 |
|
12377 | printWarning = function(text) {
|
12378 | var message = 'Warning: ' + text;
|
12379 | if (typeof console !== 'undefined') {
|
12380 | console.error(message);
|
12381 | }
|
12382 | try {
|
12383 |
|
12384 |
|
12385 |
|
12386 | throw new Error(message);
|
12387 | } catch (x) {}
|
12388 | };
|
12389 | }
|
12390 |
|
12391 |
|
12392 |
|
12393 |
|
12394 |
|
12395 |
|
12396 |
|
12397 |
|
12398 |
|
12399 |
|
12400 |
|
12401 |
|
12402 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
12403 | if (process.env.NODE_ENV !== 'production') {
|
12404 | for (var typeSpecName in typeSpecs) {
|
12405 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
12406 | var error;
|
12407 |
|
12408 |
|
12409 |
|
12410 | try {
|
12411 |
|
12412 |
|
12413 | if (typeof typeSpecs[typeSpecName] !== 'function') {
|
12414 | var err = Error(
|
12415 | (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
12416 | 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
12417 | );
|
12418 | err.name = 'Invariant Violation';
|
12419 | throw err;
|
12420 | }
|
12421 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
12422 | } catch (ex) {
|
12423 | error = ex;
|
12424 | }
|
12425 | if (error && !(error instanceof Error)) {
|
12426 | printWarning(
|
12427 | (componentName || 'React class') + ': type specification of ' +
|
12428 | location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
12429 | 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
12430 | 'You may have forgotten to pass an argument to the type checker ' +
|
12431 | 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
12432 | 'shape all require an argument).'
|
12433 | )
|
12434 |
|
12435 | }
|
12436 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
12437 |
|
12438 |
|
12439 | loggedTypeFailures[error.message] = true;
|
12440 |
|
12441 | var stack = getStack ? getStack() : '';
|
12442 |
|
12443 | printWarning(
|
12444 | 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
12445 | );
|
12446 | }
|
12447 | }
|
12448 | }
|
12449 | }
|
12450 | }
|
12451 |
|
12452 | module.exports = checkPropTypes;
|
12453 |
|
12454 |
|
12455 | }),
|
12456 |
|
12457 | (function(module, exports, __webpack_require__) {
|
12458 |
|
12459 | "use strict";
|
12460 |
|
12461 |
|
12462 |
|
12463 |
|
12464 |
|
12465 |
|
12466 |
|
12467 |
|
12468 |
|
12469 | var assign = __webpack_require__(3);
|
12470 |
|
12471 | var ReactPropTypesSecret = __webpack_require__(52);
|
12472 | var checkPropTypes = __webpack_require__(119);
|
12473 |
|
12474 | var printWarning = function() {};
|
12475 |
|
12476 | if (process.env.NODE_ENV !== 'production') {
|
12477 | printWarning = function(text) {
|
12478 | var message = 'Warning: ' + text;
|
12479 | if (typeof console !== 'undefined') {
|
12480 | console.error(message);
|
12481 | }
|
12482 | try {
|
12483 |
|
12484 |
|
12485 |
|
12486 | throw new Error(message);
|
12487 | } catch (x) {}
|
12488 | };
|
12489 | }
|
12490 |
|
12491 | function emptyFunctionThatReturnsNull() {
|
12492 | return null;
|
12493 | }
|
12494 |
|
12495 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
12496 |
|
12497 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
12498 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
12499 |
|
12500 | |
12501 |
|
12502 |
|
12503 |
|
12504 |
|
12505 |
|
12506 |
|
12507 |
|
12508 |
|
12509 |
|
12510 |
|
12511 |
|
12512 |
|
12513 |
|
12514 | function getIteratorFn(maybeIterable) {
|
12515 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
12516 | if (typeof iteratorFn === 'function') {
|
12517 | return iteratorFn;
|
12518 | }
|
12519 | }
|
12520 |
|
12521 | |
12522 |
|
12523 |
|
12524 |
|
12525 |
|
12526 |
|
12527 |
|
12528 |
|
12529 |
|
12530 |
|
12531 |
|
12532 |
|
12533 |
|
12534 |
|
12535 |
|
12536 |
|
12537 |
|
12538 |
|
12539 |
|
12540 |
|
12541 |
|
12542 |
|
12543 |
|
12544 |
|
12545 |
|
12546 |
|
12547 |
|
12548 |
|
12549 |
|
12550 |
|
12551 |
|
12552 |
|
12553 |
|
12554 |
|
12555 |
|
12556 |
|
12557 |
|
12558 |
|
12559 |
|
12560 |
|
12561 |
|
12562 |
|
12563 |
|
12564 |
|
12565 |
|
12566 |
|
12567 |
|
12568 | var ANONYMOUS = '<<anonymous>>';
|
12569 |
|
12570 |
|
12571 |
|
12572 | var ReactPropTypes = {
|
12573 | array: createPrimitiveTypeChecker('array'),
|
12574 | bool: createPrimitiveTypeChecker('boolean'),
|
12575 | func: createPrimitiveTypeChecker('function'),
|
12576 | number: createPrimitiveTypeChecker('number'),
|
12577 | object: createPrimitiveTypeChecker('object'),
|
12578 | string: createPrimitiveTypeChecker('string'),
|
12579 | symbol: createPrimitiveTypeChecker('symbol'),
|
12580 |
|
12581 | any: createAnyTypeChecker(),
|
12582 | arrayOf: createArrayOfTypeChecker,
|
12583 | element: createElementTypeChecker(),
|
12584 | instanceOf: createInstanceTypeChecker,
|
12585 | node: createNodeChecker(),
|
12586 | objectOf: createObjectOfTypeChecker,
|
12587 | oneOf: createEnumTypeChecker,
|
12588 | oneOfType: createUnionTypeChecker,
|
12589 | shape: createShapeTypeChecker,
|
12590 | exact: createStrictShapeTypeChecker,
|
12591 | };
|
12592 |
|
12593 | |
12594 |
|
12595 |
|
12596 |
|
12597 |
|
12598 | function is(x, y) {
|
12599 |
|
12600 | if (x === y) {
|
12601 |
|
12602 |
|
12603 | return x !== 0 || 1 / x === 1 / y;
|
12604 | } else {
|
12605 |
|
12606 | return x !== x && y !== y;
|
12607 | }
|
12608 | }
|
12609 |
|
12610 |
|
12611 | |
12612 |
|
12613 |
|
12614 |
|
12615 |
|
12616 |
|
12617 |
|
12618 | function PropTypeError(message) {
|
12619 | this.message = message;
|
12620 | this.stack = '';
|
12621 | }
|
12622 |
|
12623 | PropTypeError.prototype = Error.prototype;
|
12624 |
|
12625 | function createChainableTypeChecker(validate) {
|
12626 | if (process.env.NODE_ENV !== 'production') {
|
12627 | var manualPropTypeCallCache = {};
|
12628 | var manualPropTypeWarningCount = 0;
|
12629 | }
|
12630 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
12631 | componentName = componentName || ANONYMOUS;
|
12632 | propFullName = propFullName || propName;
|
12633 |
|
12634 | if (secret !== ReactPropTypesSecret) {
|
12635 | if (throwOnDirectAccess) {
|
12636 |
|
12637 | var err = new Error(
|
12638 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
12639 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
12640 | 'Read more at http://fb.me/use-check-prop-types'
|
12641 | );
|
12642 | err.name = 'Invariant Violation';
|
12643 | throw err;
|
12644 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
12645 |
|
12646 | var cacheKey = componentName + ':' + propName;
|
12647 | if (
|
12648 | !manualPropTypeCallCache[cacheKey] &&
|
12649 |
|
12650 | manualPropTypeWarningCount < 3
|
12651 | ) {
|
12652 | printWarning(
|
12653 | 'You are manually calling a React.PropTypes validation ' +
|
12654 | 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
12655 | 'and will throw in the standalone `prop-types` package. ' +
|
12656 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
12657 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
12658 | );
|
12659 | manualPropTypeCallCache[cacheKey] = true;
|
12660 | manualPropTypeWarningCount++;
|
12661 | }
|
12662 | }
|
12663 | }
|
12664 | if (props[propName] == null) {
|
12665 | if (isRequired) {
|
12666 | if (props[propName] === null) {
|
12667 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
12668 | }
|
12669 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
12670 | }
|
12671 | return null;
|
12672 | } else {
|
12673 | return validate(props, propName, componentName, location, propFullName);
|
12674 | }
|
12675 | }
|
12676 |
|
12677 | var chainedCheckType = checkType.bind(null, false);
|
12678 | chainedCheckType.isRequired = checkType.bind(null, true);
|
12679 |
|
12680 | return chainedCheckType;
|
12681 | }
|
12682 |
|
12683 | function createPrimitiveTypeChecker(expectedType) {
|
12684 | function validate(props, propName, componentName, location, propFullName, secret) {
|
12685 | var propValue = props[propName];
|
12686 | var propType = getPropType(propValue);
|
12687 | if (propType !== expectedType) {
|
12688 |
|
12689 |
|
12690 |
|
12691 | var preciseType = getPreciseType(propValue);
|
12692 |
|
12693 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
12694 | }
|
12695 | return null;
|
12696 | }
|
12697 | return createChainableTypeChecker(validate);
|
12698 | }
|
12699 |
|
12700 | function createAnyTypeChecker() {
|
12701 | return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
12702 | }
|
12703 |
|
12704 | function createArrayOfTypeChecker(typeChecker) {
|
12705 | function validate(props, propName, componentName, location, propFullName) {
|
12706 | if (typeof typeChecker !== 'function') {
|
12707 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
12708 | }
|
12709 | var propValue = props[propName];
|
12710 | if (!Array.isArray(propValue)) {
|
12711 | var propType = getPropType(propValue);
|
12712 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
12713 | }
|
12714 | for (var i = 0; i < propValue.length; i++) {
|
12715 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
12716 | if (error instanceof Error) {
|
12717 | return error;
|
12718 | }
|
12719 | }
|
12720 | return null;
|
12721 | }
|
12722 | return createChainableTypeChecker(validate);
|
12723 | }
|
12724 |
|
12725 | function createElementTypeChecker() {
|
12726 | function validate(props, propName, componentName, location, propFullName) {
|
12727 | var propValue = props[propName];
|
12728 | if (!isValidElement(propValue)) {
|
12729 | var propType = getPropType(propValue);
|
12730 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
12731 | }
|
12732 | return null;
|
12733 | }
|
12734 | return createChainableTypeChecker(validate);
|
12735 | }
|
12736 |
|
12737 | function createInstanceTypeChecker(expectedClass) {
|
12738 | function validate(props, propName, componentName, location, propFullName) {
|
12739 | if (!(props[propName] instanceof expectedClass)) {
|
12740 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
12741 | var actualClassName = getClassName(props[propName]);
|
12742 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
12743 | }
|
12744 | return null;
|
12745 | }
|
12746 | return createChainableTypeChecker(validate);
|
12747 | }
|
12748 |
|
12749 | function createEnumTypeChecker(expectedValues) {
|
12750 | if (!Array.isArray(expectedValues)) {
|
12751 | process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
12752 | return emptyFunctionThatReturnsNull;
|
12753 | }
|
12754 |
|
12755 | function validate(props, propName, componentName, location, propFullName) {
|
12756 | var propValue = props[propName];
|
12757 | for (var i = 0; i < expectedValues.length; i++) {
|
12758 | if (is(propValue, expectedValues[i])) {
|
12759 | return null;
|
12760 | }
|
12761 | }
|
12762 |
|
12763 | var valuesString = JSON.stringify(expectedValues);
|
12764 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
12765 | }
|
12766 | return createChainableTypeChecker(validate);
|
12767 | }
|
12768 |
|
12769 | function createObjectOfTypeChecker(typeChecker) {
|
12770 | function validate(props, propName, componentName, location, propFullName) {
|
12771 | if (typeof typeChecker !== 'function') {
|
12772 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
12773 | }
|
12774 | var propValue = props[propName];
|
12775 | var propType = getPropType(propValue);
|
12776 | if (propType !== 'object') {
|
12777 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
12778 | }
|
12779 | for (var key in propValue) {
|
12780 | if (propValue.hasOwnProperty(key)) {
|
12781 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
12782 | if (error instanceof Error) {
|
12783 | return error;
|
12784 | }
|
12785 | }
|
12786 | }
|
12787 | return null;
|
12788 | }
|
12789 | return createChainableTypeChecker(validate);
|
12790 | }
|
12791 |
|
12792 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
12793 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
12794 | process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
12795 | return emptyFunctionThatReturnsNull;
|
12796 | }
|
12797 |
|
12798 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
12799 | var checker = arrayOfTypeCheckers[i];
|
12800 | if (typeof checker !== 'function') {
|
12801 | printWarning(
|
12802 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
12803 | 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
12804 | );
|
12805 | return emptyFunctionThatReturnsNull;
|
12806 | }
|
12807 | }
|
12808 |
|
12809 | function validate(props, propName, componentName, location, propFullName) {
|
12810 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
12811 | var checker = arrayOfTypeCheckers[i];
|
12812 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
12813 | return null;
|
12814 | }
|
12815 | }
|
12816 |
|
12817 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
12818 | }
|
12819 | return createChainableTypeChecker(validate);
|
12820 | }
|
12821 |
|
12822 | function createNodeChecker() {
|
12823 | function validate(props, propName, componentName, location, propFullName) {
|
12824 | if (!isNode(props[propName])) {
|
12825 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
12826 | }
|
12827 | return null;
|
12828 | }
|
12829 | return createChainableTypeChecker(validate);
|
12830 | }
|
12831 |
|
12832 | function createShapeTypeChecker(shapeTypes) {
|
12833 | function validate(props, propName, componentName, location, propFullName) {
|
12834 | var propValue = props[propName];
|
12835 | var propType = getPropType(propValue);
|
12836 | if (propType !== 'object') {
|
12837 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
12838 | }
|
12839 | for (var key in shapeTypes) {
|
12840 | var checker = shapeTypes[key];
|
12841 | if (!checker) {
|
12842 | continue;
|
12843 | }
|
12844 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
12845 | if (error) {
|
12846 | return error;
|
12847 | }
|
12848 | }
|
12849 | return null;
|
12850 | }
|
12851 | return createChainableTypeChecker(validate);
|
12852 | }
|
12853 |
|
12854 | function createStrictShapeTypeChecker(shapeTypes) {
|
12855 | function validate(props, propName, componentName, location, propFullName) {
|
12856 | var propValue = props[propName];
|
12857 | var propType = getPropType(propValue);
|
12858 | if (propType !== 'object') {
|
12859 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
12860 | }
|
12861 |
|
12862 |
|
12863 | var allKeys = assign({}, props[propName], shapeTypes);
|
12864 | for (var key in allKeys) {
|
12865 | var checker = shapeTypes[key];
|
12866 | if (!checker) {
|
12867 | return new PropTypeError(
|
12868 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
12869 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
12870 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
12871 | );
|
12872 | }
|
12873 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
12874 | if (error) {
|
12875 | return error;
|
12876 | }
|
12877 | }
|
12878 | return null;
|
12879 | }
|
12880 |
|
12881 | return createChainableTypeChecker(validate);
|
12882 | }
|
12883 |
|
12884 | function isNode(propValue) {
|
12885 | switch (typeof propValue) {
|
12886 | case 'number':
|
12887 | case 'string':
|
12888 | case 'undefined':
|
12889 | return true;
|
12890 | case 'boolean':
|
12891 | return !propValue;
|
12892 | case 'object':
|
12893 | if (Array.isArray(propValue)) {
|
12894 | return propValue.every(isNode);
|
12895 | }
|
12896 | if (propValue === null || isValidElement(propValue)) {
|
12897 | return true;
|
12898 | }
|
12899 |
|
12900 | var iteratorFn = getIteratorFn(propValue);
|
12901 | if (iteratorFn) {
|
12902 | var iterator = iteratorFn.call(propValue);
|
12903 | var step;
|
12904 | if (iteratorFn !== propValue.entries) {
|
12905 | while (!(step = iterator.next()).done) {
|
12906 | if (!isNode(step.value)) {
|
12907 | return false;
|
12908 | }
|
12909 | }
|
12910 | } else {
|
12911 |
|
12912 | while (!(step = iterator.next()).done) {
|
12913 | var entry = step.value;
|
12914 | if (entry) {
|
12915 | if (!isNode(entry[1])) {
|
12916 | return false;
|
12917 | }
|
12918 | }
|
12919 | }
|
12920 | }
|
12921 | } else {
|
12922 | return false;
|
12923 | }
|
12924 |
|
12925 | return true;
|
12926 | default:
|
12927 | return false;
|
12928 | }
|
12929 | }
|
12930 |
|
12931 | function isSymbol(propType, propValue) {
|
12932 |
|
12933 | if (propType === 'symbol') {
|
12934 | return true;
|
12935 | }
|
12936 |
|
12937 |
|
12938 | if (propValue['@@toStringTag'] === 'Symbol') {
|
12939 | return true;
|
12940 | }
|
12941 |
|
12942 |
|
12943 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
12944 | return true;
|
12945 | }
|
12946 |
|
12947 | return false;
|
12948 | }
|
12949 |
|
12950 |
|
12951 | function getPropType(propValue) {
|
12952 | var propType = typeof propValue;
|
12953 | if (Array.isArray(propValue)) {
|
12954 | return 'array';
|
12955 | }
|
12956 | if (propValue instanceof RegExp) {
|
12957 |
|
12958 |
|
12959 |
|
12960 | return 'object';
|
12961 | }
|
12962 | if (isSymbol(propType, propValue)) {
|
12963 | return 'symbol';
|
12964 | }
|
12965 | return propType;
|
12966 | }
|
12967 |
|
12968 |
|
12969 |
|
12970 | function getPreciseType(propValue) {
|
12971 | if (typeof propValue === 'undefined' || propValue === null) {
|
12972 | return '' + propValue;
|
12973 | }
|
12974 | var propType = getPropType(propValue);
|
12975 | if (propType === 'object') {
|
12976 | if (propValue instanceof Date) {
|
12977 | return 'date';
|
12978 | } else if (propValue instanceof RegExp) {
|
12979 | return 'regexp';
|
12980 | }
|
12981 | }
|
12982 | return propType;
|
12983 | }
|
12984 |
|
12985 |
|
12986 |
|
12987 | function getPostfixForTypeWarning(value) {
|
12988 | var type = getPreciseType(value);
|
12989 | switch (type) {
|
12990 | case 'array':
|
12991 | case 'object':
|
12992 | return 'an ' + type;
|
12993 | case 'boolean':
|
12994 | case 'date':
|
12995 | case 'regexp':
|
12996 | return 'a ' + type;
|
12997 | default:
|
12998 | return type;
|
12999 | }
|
13000 | }
|
13001 |
|
13002 |
|
13003 | function getClassName(propValue) {
|
13004 | if (!propValue.constructor || !propValue.constructor.name) {
|
13005 | return ANONYMOUS;
|
13006 | }
|
13007 | return propValue.constructor.name;
|
13008 | }
|
13009 |
|
13010 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
13011 | ReactPropTypes.PropTypes = ReactPropTypes;
|
13012 |
|
13013 | return ReactPropTypes;
|
13014 | };
|
13015 |
|
13016 |
|
13017 | }),
|
13018 |
|
13019 | (function(module, exports, __webpack_require__) {
|
13020 |
|
13021 | "use strict";
|
13022 |
|
13023 |
|
13024 |
|
13025 |
|
13026 |
|
13027 |
|
13028 |
|
13029 |
|
13030 |
|
13031 |
|
13032 | var ARIADOMPropertyConfig = {
|
13033 | Properties: {
|
13034 |
|
13035 | 'aria-current': 0,
|
13036 | 'aria-details': 0,
|
13037 | 'aria-disabled': 0,
|
13038 | 'aria-hidden': 0,
|
13039 | 'aria-invalid': 0,
|
13040 | 'aria-keyshortcuts': 0,
|
13041 | 'aria-label': 0,
|
13042 | 'aria-roledescription': 0,
|
13043 |
|
13044 | 'aria-autocomplete': 0,
|
13045 | 'aria-checked': 0,
|
13046 | 'aria-expanded': 0,
|
13047 | 'aria-haspopup': 0,
|
13048 | 'aria-level': 0,
|
13049 | 'aria-modal': 0,
|
13050 | 'aria-multiline': 0,
|
13051 | 'aria-multiselectable': 0,
|
13052 | 'aria-orientation': 0,
|
13053 | 'aria-placeholder': 0,
|
13054 | 'aria-pressed': 0,
|
13055 | 'aria-readonly': 0,
|
13056 | 'aria-required': 0,
|
13057 | 'aria-selected': 0,
|
13058 | 'aria-sort': 0,
|
13059 | 'aria-valuemax': 0,
|
13060 | 'aria-valuemin': 0,
|
13061 | 'aria-valuenow': 0,
|
13062 | 'aria-valuetext': 0,
|
13063 |
|
13064 | 'aria-atomic': 0,
|
13065 | 'aria-busy': 0,
|
13066 | 'aria-live': 0,
|
13067 | 'aria-relevant': 0,
|
13068 |
|
13069 | 'aria-dropeffect': 0,
|
13070 | 'aria-grabbed': 0,
|
13071 |
|
13072 | 'aria-activedescendant': 0,
|
13073 | 'aria-colcount': 0,
|
13074 | 'aria-colindex': 0,
|
13075 | 'aria-colspan': 0,
|
13076 | 'aria-controls': 0,
|
13077 | 'aria-describedby': 0,
|
13078 | 'aria-errormessage': 0,
|
13079 | 'aria-flowto': 0,
|
13080 | 'aria-labelledby': 0,
|
13081 | 'aria-owns': 0,
|
13082 | 'aria-posinset': 0,
|
13083 | 'aria-rowcount': 0,
|
13084 | 'aria-rowindex': 0,
|
13085 | 'aria-rowspan': 0,
|
13086 | 'aria-setsize': 0
|
13087 | },
|
13088 | DOMAttributeNames: {},
|
13089 | DOMPropertyNames: {}
|
13090 | };
|
13091 |
|
13092 | module.exports = ARIADOMPropertyConfig;
|
13093 |
|
13094 | }),
|
13095 |
|
13096 | (function(module, exports, __webpack_require__) {
|
13097 |
|
13098 | "use strict";
|
13099 |
|
13100 |
|
13101 |
|
13102 |
|
13103 |
|
13104 |
|
13105 |
|
13106 |
|
13107 |
|
13108 |
|
13109 | var ReactDOMComponentTree = __webpack_require__(4);
|
13110 |
|
13111 | var focusNode = __webpack_require__(49);
|
13112 |
|
13113 | var AutoFocusUtils = {
|
13114 | focusDOMComponent: function () {
|
13115 | focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
|
13116 | }
|
13117 | };
|
13118 |
|
13119 | module.exports = AutoFocusUtils;
|
13120 |
|
13121 | }),
|
13122 |
|
13123 | (function(module, exports, __webpack_require__) {
|
13124 |
|
13125 | "use strict";
|
13126 |
|
13127 |
|
13128 |
|
13129 |
|
13130 |
|
13131 |
|
13132 |
|
13133 |
|
13134 |
|
13135 |
|
13136 | var EventPropagators = __webpack_require__(18);
|
13137 | var ExecutionEnvironment = __webpack_require__(5);
|
13138 | var FallbackCompositionState = __webpack_require__(129);
|
13139 | var SyntheticCompositionEvent = __webpack_require__(170);
|
13140 | var SyntheticInputEvent = __webpack_require__(173);
|
13141 |
|
13142 | var END_KEYCODES = [9, 13, 27, 32];
|
13143 | var START_KEYCODE = 229;
|
13144 |
|
13145 | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
|
13146 |
|
13147 | var documentMode = null;
|
13148 | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
|
13149 | documentMode = document.documentMode;
|
13150 | }
|
13151 |
|
13152 |
|
13153 |
|
13154 |
|
13155 | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
|
13156 |
|
13157 |
|
13158 |
|
13159 |
|
13160 | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
13161 |
|
13162 |
|
13163 |
|
13164 |
|
13165 |
|
13166 | function isPresto() {
|
13167 | var opera = window.opera;
|
13168 | return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
|
13169 | }
|
13170 |
|
13171 | var SPACEBAR_CODE = 32;
|
13172 | var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
13173 |
|
13174 |
|
13175 | var eventTypes = {
|
13176 | beforeInput: {
|
13177 | phasedRegistrationNames: {
|
13178 | bubbled: 'onBeforeInput',
|
13179 | captured: 'onBeforeInputCapture'
|
13180 | },
|
13181 | dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
|
13182 | },
|
13183 | compositionEnd: {
|
13184 | phasedRegistrationNames: {
|
13185 | bubbled: 'onCompositionEnd',
|
13186 | captured: 'onCompositionEndCapture'
|
13187 | },
|
13188 | dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
13189 | },
|
13190 | compositionStart: {
|
13191 | phasedRegistrationNames: {
|
13192 | bubbled: 'onCompositionStart',
|
13193 | captured: 'onCompositionStartCapture'
|
13194 | },
|
13195 | dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
13196 | },
|
13197 | compositionUpdate: {
|
13198 | phasedRegistrationNames: {
|
13199 | bubbled: 'onCompositionUpdate',
|
13200 | captured: 'onCompositionUpdateCapture'
|
13201 | },
|
13202 | dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
13203 | }
|
13204 | };
|
13205 |
|
13206 |
|
13207 | var hasSpaceKeypress = false;
|
13208 |
|
13209 |
|
13210 |
|
13211 |
|
13212 |
|
13213 |
|
13214 | function isKeypressCommand(nativeEvent) {
|
13215 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
13216 |
|
13217 | !(nativeEvent.ctrlKey && nativeEvent.altKey);
|
13218 | }
|
13219 |
|
13220 |
|
13221 |
|
13222 |
|
13223 |
|
13224 |
|
13225 |
|
13226 | function getCompositionEventType(topLevelType) {
|
13227 | switch (topLevelType) {
|
13228 | case 'topCompositionStart':
|
13229 | return eventTypes.compositionStart;
|
13230 | case 'topCompositionEnd':
|
13231 | return eventTypes.compositionEnd;
|
13232 | case 'topCompositionUpdate':
|
13233 | return eventTypes.compositionUpdate;
|
13234 | }
|
13235 | }
|
13236 |
|
13237 |
|
13238 |
|
13239 |
|
13240 |
|
13241 |
|
13242 |
|
13243 |
|
13244 |
|
13245 | function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
13246 | return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
|
13247 | }
|
13248 |
|
13249 |
|
13250 |
|
13251 |
|
13252 |
|
13253 |
|
13254 |
|
13255 |
|
13256 | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
13257 | switch (topLevelType) {
|
13258 | case 'topKeyUp':
|
13259 |
|
13260 | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
13261 | case 'topKeyDown':
|
13262 |
|
13263 |
|
13264 | return nativeEvent.keyCode !== START_KEYCODE;
|
13265 | case 'topKeyPress':
|
13266 | case 'topMouseDown':
|
13267 | case 'topBlur':
|
13268 |
|
13269 | return true;
|
13270 | default:
|
13271 | return false;
|
13272 | }
|
13273 | }
|
13274 |
|
13275 |
|
13276 |
|
13277 |
|
13278 |
|
13279 |
|
13280 |
|
13281 |
|
13282 |
|
13283 |
|
13284 | function getDataFromCustomEvent(nativeEvent) {
|
13285 | var detail = nativeEvent.detail;
|
13286 | if (typeof detail === 'object' && 'data' in detail) {
|
13287 | return detail.data;
|
13288 | }
|
13289 | return null;
|
13290 | }
|
13291 |
|
13292 |
|
13293 | var currentComposition = null;
|
13294 |
|
13295 |
|
13296 |
|
13297 |
|
13298 | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
13299 | var eventType;
|
13300 | var fallbackData;
|
13301 |
|
13302 | if (canUseCompositionEvent) {
|
13303 | eventType = getCompositionEventType(topLevelType);
|
13304 | } else if (!currentComposition) {
|
13305 | if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
|
13306 | eventType = eventTypes.compositionStart;
|
13307 | }
|
13308 | } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
13309 | eventType = eventTypes.compositionEnd;
|
13310 | }
|
13311 |
|
13312 | if (!eventType) {
|
13313 | return null;
|
13314 | }
|
13315 |
|
13316 | if (useFallbackCompositionData) {
|
13317 |
|
13318 |
|
13319 | if (!currentComposition && eventType === eventTypes.compositionStart) {
|
13320 | currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
|
13321 | } else if (eventType === eventTypes.compositionEnd) {
|
13322 | if (currentComposition) {
|
13323 | fallbackData = currentComposition.getData();
|
13324 | }
|
13325 | }
|
13326 | }
|
13327 |
|
13328 | var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
|
13329 |
|
13330 | if (fallbackData) {
|
13331 |
|
13332 |
|
13333 | event.data = fallbackData;
|
13334 | } else {
|
13335 | var customData = getDataFromCustomEvent(nativeEvent);
|
13336 | if (customData !== null) {
|
13337 | event.data = customData;
|
13338 | }
|
13339 | }
|
13340 |
|
13341 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
13342 | return event;
|
13343 | }
|
13344 |
|
13345 |
|
13346 |
|
13347 |
|
13348 |
|
13349 |
|
13350 | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
13351 | switch (topLevelType) {
|
13352 | case 'topCompositionEnd':
|
13353 | return getDataFromCustomEvent(nativeEvent);
|
13354 | case 'topKeyPress':
|
13355 | |
13356 |
|
13357 |
|
13358 |
|
13359 |
|
13360 |
|
13361 |
|
13362 |
|
13363 |
|
13364 |
|
13365 |
|
13366 |
|
13367 |
|
13368 |
|
13369 | var which = nativeEvent.which;
|
13370 | if (which !== SPACEBAR_CODE) {
|
13371 | return null;
|
13372 | }
|
13373 |
|
13374 | hasSpaceKeypress = true;
|
13375 | return SPACEBAR_CHAR;
|
13376 |
|
13377 | case 'topTextInput':
|
13378 |
|
13379 | var chars = nativeEvent.data;
|
13380 |
|
13381 |
|
13382 |
|
13383 |
|
13384 | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
13385 | return null;
|
13386 | }
|
13387 |
|
13388 | return chars;
|
13389 |
|
13390 | default:
|
13391 |
|
13392 | return null;
|
13393 | }
|
13394 | }
|
13395 |
|
13396 |
|
13397 |
|
13398 |
|
13399 |
|
13400 |
|
13401 |
|
13402 |
|
13403 |
|
13404 | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
13405 |
|
13406 |
|
13407 |
|
13408 |
|
13409 | if (currentComposition) {
|
13410 | if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
13411 | var chars = currentComposition.getData();
|
13412 | FallbackCompositionState.release(currentComposition);
|
13413 | currentComposition = null;
|
13414 | return chars;
|
13415 | }
|
13416 | return null;
|
13417 | }
|
13418 |
|
13419 | switch (topLevelType) {
|
13420 | case 'topPaste':
|
13421 |
|
13422 |
|
13423 | return null;
|
13424 | case 'topKeyPress':
|
13425 | |
13426 |
|
13427 |
|
13428 |
|
13429 |
|
13430 |
|
13431 |
|
13432 |
|
13433 |
|
13434 |
|
13435 |
|
13436 |
|
13437 |
|
13438 |
|
13439 |
|
13440 |
|
13441 | if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
|
13442 | return String.fromCharCode(nativeEvent.which);
|
13443 | }
|
13444 | return null;
|
13445 | case 'topCompositionEnd':
|
13446 | return useFallbackCompositionData ? null : nativeEvent.data;
|
13447 | default:
|
13448 | return null;
|
13449 | }
|
13450 | }
|
13451 |
|
13452 |
|
13453 |
|
13454 |
|
13455 |
|
13456 |
|
13457 |
|
13458 | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
13459 | var chars;
|
13460 |
|
13461 | if (canUseTextInputEvent) {
|
13462 | chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
13463 | } else {
|
13464 | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
13465 | }
|
13466 |
|
13467 |
|
13468 |
|
13469 | if (!chars) {
|
13470 | return null;
|
13471 | }
|
13472 |
|
13473 | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
13474 |
|
13475 | event.data = chars;
|
13476 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
13477 | return event;
|
13478 | }
|
13479 |
|
13480 |
|
13481 |
|
13482 |
|
13483 |
|
13484 |
|
13485 |
|
13486 |
|
13487 |
|
13488 |
|
13489 |
|
13490 |
|
13491 |
|
13492 |
|
13493 |
|
13494 |
|
13495 |
|
13496 |
|
13497 |
|
13498 | var BeforeInputEventPlugin = {
|
13499 | eventTypes: eventTypes,
|
13500 |
|
13501 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
13502 | return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
|
13503 | }
|
13504 | };
|
13505 |
|
13506 | module.exports = BeforeInputEventPlugin;
|
13507 |
|
13508 | }),
|
13509 |
|
13510 | (function(module, exports, __webpack_require__) {
|
13511 |
|
13512 | "use strict";
|
13513 |
|
13514 |
|
13515 |
|
13516 |
|
13517 |
|
13518 |
|
13519 |
|
13520 |
|
13521 |
|
13522 |
|
13523 | var CSSProperty = __webpack_require__(53);
|
13524 | var ExecutionEnvironment = __webpack_require__(5);
|
13525 | var ReactInstrumentation = __webpack_require__(6);
|
13526 |
|
13527 | var camelizeStyleName = __webpack_require__(106);
|
13528 | var dangerousStyleValue = __webpack_require__(180);
|
13529 | var hyphenateStyleName = __webpack_require__(113);
|
13530 | var memoizeStringOnly = __webpack_require__(116);
|
13531 | var warning = __webpack_require__(1);
|
13532 |
|
13533 | var processStyleName = memoizeStringOnly(function (styleName) {
|
13534 | return hyphenateStyleName(styleName);
|
13535 | });
|
13536 |
|
13537 | var hasShorthandPropertyBug = false;
|
13538 | var styleFloatAccessor = 'cssFloat';
|
13539 | if (ExecutionEnvironment.canUseDOM) {
|
13540 | var tempStyle = document.createElement('div').style;
|
13541 | try {
|
13542 |
|
13543 | tempStyle.font = '';
|
13544 | } catch (e) {
|
13545 | hasShorthandPropertyBug = true;
|
13546 | }
|
13547 |
|
13548 | if (document.documentElement.style.cssFloat === undefined) {
|
13549 | styleFloatAccessor = 'styleFloat';
|
13550 | }
|
13551 | }
|
13552 |
|
13553 | if (process.env.NODE_ENV !== 'production') {
|
13554 |
|
13555 | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
13556 |
|
13557 |
|
13558 | var badStyleValueWithSemicolonPattern = /;\s*$/;
|
13559 |
|
13560 | var warnedStyleNames = {};
|
13561 | var warnedStyleValues = {};
|
13562 | var warnedForNaNValue = false;
|
13563 |
|
13564 | var warnHyphenatedStyleName = function (name, owner) {
|
13565 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
13566 | return;
|
13567 | }
|
13568 |
|
13569 | warnedStyleNames[name] = true;
|
13570 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
|
13571 | };
|
13572 |
|
13573 | var warnBadVendoredStyleName = function (name, owner) {
|
13574 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
13575 | return;
|
13576 | }
|
13577 |
|
13578 | warnedStyleNames[name] = true;
|
13579 | process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
|
13580 | };
|
13581 |
|
13582 | var warnStyleValueWithSemicolon = function (name, value, owner) {
|
13583 | if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
13584 | return;
|
13585 | }
|
13586 |
|
13587 | warnedStyleValues[value] = true;
|
13588 | process.env.NODE_ENV !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
|
13589 | };
|
13590 |
|
13591 | var warnStyleValueIsNaN = function (name, value, owner) {
|
13592 | if (warnedForNaNValue) {
|
13593 | return;
|
13594 | }
|
13595 |
|
13596 | warnedForNaNValue = true;
|
13597 | process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
|
13598 | };
|
13599 |
|
13600 | var checkRenderMessage = function (owner) {
|
13601 | if (owner) {
|
13602 | var name = owner.getName();
|
13603 | if (name) {
|
13604 | return ' Check the render method of `' + name + '`.';
|
13605 | }
|
13606 | }
|
13607 | return '';
|
13608 | };
|
13609 |
|
13610 | |
13611 |
|
13612 |
|
13613 |
|
13614 |
|
13615 | var warnValidStyle = function (name, value, component) {
|
13616 | var owner;
|
13617 | if (component) {
|
13618 | owner = component._currentElement._owner;
|
13619 | }
|
13620 | if (name.indexOf('-') > -1) {
|
13621 | warnHyphenatedStyleName(name, owner);
|
13622 | } else if (badVendoredStyleNamePattern.test(name)) {
|
13623 | warnBadVendoredStyleName(name, owner);
|
13624 | } else if (badStyleValueWithSemicolonPattern.test(value)) {
|
13625 | warnStyleValueWithSemicolon(name, value, owner);
|
13626 | }
|
13627 |
|
13628 | if (typeof value === 'number' && isNaN(value)) {
|
13629 | warnStyleValueIsNaN(name, value, owner);
|
13630 | }
|
13631 | };
|
13632 | }
|
13633 |
|
13634 |
|
13635 |
|
13636 |
|
13637 | var CSSPropertyOperations = {
|
13638 | |
13639 |
|
13640 |
|
13641 |
|
13642 |
|
13643 |
|
13644 |
|
13645 |
|
13646 |
|
13647 |
|
13648 |
|
13649 |
|
13650 |
|
13651 | createMarkupForStyles: function (styles, component) {
|
13652 | var serialized = '';
|
13653 | for (var styleName in styles) {
|
13654 | if (!styles.hasOwnProperty(styleName)) {
|
13655 | continue;
|
13656 | }
|
13657 | var isCustomProperty = styleName.indexOf('--') === 0;
|
13658 | var styleValue = styles[styleName];
|
13659 | if (process.env.NODE_ENV !== 'production') {
|
13660 | if (!isCustomProperty) {
|
13661 | warnValidStyle(styleName, styleValue, component);
|
13662 | }
|
13663 | }
|
13664 | if (styleValue != null) {
|
13665 | serialized += processStyleName(styleName) + ':';
|
13666 | serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
|
13667 | }
|
13668 | }
|
13669 | return serialized || null;
|
13670 | },
|
13671 |
|
13672 | |
13673 |
|
13674 |
|
13675 |
|
13676 |
|
13677 |
|
13678 |
|
13679 |
|
13680 | setValueForStyles: function (node, styles, component) {
|
13681 | if (process.env.NODE_ENV !== 'production') {
|
13682 | ReactInstrumentation.debugTool.onHostOperation({
|
13683 | instanceID: component._debugID,
|
13684 | type: 'update styles',
|
13685 | payload: styles
|
13686 | });
|
13687 | }
|
13688 |
|
13689 | var style = node.style;
|
13690 | for (var styleName in styles) {
|
13691 | if (!styles.hasOwnProperty(styleName)) {
|
13692 | continue;
|
13693 | }
|
13694 | var isCustomProperty = styleName.indexOf('--') === 0;
|
13695 | if (process.env.NODE_ENV !== 'production') {
|
13696 | if (!isCustomProperty) {
|
13697 | warnValidStyle(styleName, styles[styleName], component);
|
13698 | }
|
13699 | }
|
13700 | var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
|
13701 | if (styleName === 'float' || styleName === 'cssFloat') {
|
13702 | styleName = styleFloatAccessor;
|
13703 | }
|
13704 | if (isCustomProperty) {
|
13705 | style.setProperty(styleName, styleValue);
|
13706 | } else if (styleValue) {
|
13707 | style[styleName] = styleValue;
|
13708 | } else {
|
13709 | var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
|
13710 | if (expansion) {
|
13711 |
|
13712 |
|
13713 | for (var individualStyleName in expansion) {
|
13714 | style[individualStyleName] = '';
|
13715 | }
|
13716 | } else {
|
13717 | style[styleName] = '';
|
13718 | }
|
13719 | }
|
13720 | }
|
13721 | }
|
13722 | };
|
13723 |
|
13724 | module.exports = CSSPropertyOperations;
|
13725 |
|
13726 | }),
|
13727 |
|
13728 | (function(module, exports, __webpack_require__) {
|
13729 |
|
13730 | "use strict";
|
13731 |
|
13732 |
|
13733 |
|
13734 |
|
13735 |
|
13736 |
|
13737 |
|
13738 |
|
13739 |
|
13740 |
|
13741 | var EventPluginHub = __webpack_require__(17);
|
13742 | var EventPropagators = __webpack_require__(18);
|
13743 | var ExecutionEnvironment = __webpack_require__(5);
|
13744 | var ReactDOMComponentTree = __webpack_require__(4);
|
13745 | var ReactUpdates = __webpack_require__(9);
|
13746 | var SyntheticEvent = __webpack_require__(10);
|
13747 |
|
13748 | var inputValueTracking = __webpack_require__(69);
|
13749 | var getEventTarget = __webpack_require__(41);
|
13750 | var isEventSupported = __webpack_require__(42);
|
13751 | var isTextInputElement = __webpack_require__(71);
|
13752 |
|
13753 | var eventTypes = {
|
13754 | change: {
|
13755 | phasedRegistrationNames: {
|
13756 | bubbled: 'onChange',
|
13757 | captured: 'onChangeCapture'
|
13758 | },
|
13759 | dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
|
13760 | }
|
13761 | };
|
13762 |
|
13763 | function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
|
13764 | var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
|
13765 | event.type = 'change';
|
13766 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
13767 | return event;
|
13768 | }
|
13769 |
|
13770 |
|
13771 |
|
13772 | var activeElement = null;
|
13773 | var activeElementInst = null;
|
13774 |
|
13775 |
|
13776 |
|
13777 |
|
13778 | function shouldUseChangeEvent(elem) {
|
13779 | var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
|
13780 | return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
|
13781 | }
|
13782 |
|
13783 | var doesChangeEventBubble = false;
|
13784 | if (ExecutionEnvironment.canUseDOM) {
|
13785 |
|
13786 | doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
|
13787 | }
|
13788 |
|
13789 | function manualDispatchChangeEvent(nativeEvent) {
|
13790 | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
|
13791 |
|
13792 |
|
13793 |
|
13794 |
|
13795 |
|
13796 |
|
13797 |
|
13798 |
|
13799 |
|
13800 |
|
13801 |
|
13802 |
|
13803 | ReactUpdates.batchedUpdates(runEventInBatch, event);
|
13804 | }
|
13805 |
|
13806 | function runEventInBatch(event) {
|
13807 | EventPluginHub.enqueueEvents(event);
|
13808 | EventPluginHub.processEventQueue(false);
|
13809 | }
|
13810 |
|
13811 | function startWatchingForChangeEventIE8(target, targetInst) {
|
13812 | activeElement = target;
|
13813 | activeElementInst = targetInst;
|
13814 | activeElement.attachEvent('onchange', manualDispatchChangeEvent);
|
13815 | }
|
13816 |
|
13817 | function stopWatchingForChangeEventIE8() {
|
13818 | if (!activeElement) {
|
13819 | return;
|
13820 | }
|
13821 | activeElement.detachEvent('onchange', manualDispatchChangeEvent);
|
13822 | activeElement = null;
|
13823 | activeElementInst = null;
|
13824 | }
|
13825 |
|
13826 | function getInstIfValueChanged(targetInst, nativeEvent) {
|
13827 | var updated = inputValueTracking.updateValueIfChanged(targetInst);
|
13828 | var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
|
13829 |
|
13830 | if (updated || simulated) {
|
13831 | return targetInst;
|
13832 | }
|
13833 | }
|
13834 |
|
13835 | function getTargetInstForChangeEvent(topLevelType, targetInst) {
|
13836 | if (topLevelType === 'topChange') {
|
13837 | return targetInst;
|
13838 | }
|
13839 | }
|
13840 |
|
13841 | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
|
13842 | if (topLevelType === 'topFocus') {
|
13843 |
|
13844 |
|
13845 | stopWatchingForChangeEventIE8();
|
13846 | startWatchingForChangeEventIE8(target, targetInst);
|
13847 | } else if (topLevelType === 'topBlur') {
|
13848 | stopWatchingForChangeEventIE8();
|
13849 | }
|
13850 | }
|
13851 |
|
13852 |
|
13853 |
|
13854 |
|
13855 | var isInputEventSupported = false;
|
13856 | if (ExecutionEnvironment.canUseDOM) {
|
13857 |
|
13858 |
|
13859 |
|
13860 | isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
|
13861 | }
|
13862 |
|
13863 |
|
13864 |
|
13865 |
|
13866 |
|
13867 |
|
13868 | function startWatchingForValueChange(target, targetInst) {
|
13869 | activeElement = target;
|
13870 | activeElementInst = targetInst;
|
13871 | activeElement.attachEvent('onpropertychange', handlePropertyChange);
|
13872 | }
|
13873 |
|
13874 |
|
13875 |
|
13876 |
|
13877 |
|
13878 | function stopWatchingForValueChange() {
|
13879 | if (!activeElement) {
|
13880 | return;
|
13881 | }
|
13882 | activeElement.detachEvent('onpropertychange', handlePropertyChange);
|
13883 |
|
13884 | activeElement = null;
|
13885 | activeElementInst = null;
|
13886 | }
|
13887 |
|
13888 |
|
13889 |
|
13890 |
|
13891 |
|
13892 | function handlePropertyChange(nativeEvent) {
|
13893 | if (nativeEvent.propertyName !== 'value') {
|
13894 | return;
|
13895 | }
|
13896 | if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
|
13897 | manualDispatchChangeEvent(nativeEvent);
|
13898 | }
|
13899 | }
|
13900 |
|
13901 | function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
|
13902 | if (topLevelType === 'topFocus') {
|
13903 |
|
13904 |
|
13905 |
|
13906 |
|
13907 |
|
13908 |
|
13909 |
|
13910 |
|
13911 |
|
13912 |
|
13913 |
|
13914 |
|
13915 |
|
13916 | stopWatchingForValueChange();
|
13917 | startWatchingForValueChange(target, targetInst);
|
13918 | } else if (topLevelType === 'topBlur') {
|
13919 | stopWatchingForValueChange();
|
13920 | }
|
13921 | }
|
13922 |
|
13923 |
|
13924 | function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
|
13925 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
|
13926 |
|
13927 |
|
13928 |
|
13929 |
|
13930 |
|
13931 |
|
13932 |
|
13933 |
|
13934 |
|
13935 |
|
13936 | return getInstIfValueChanged(activeElementInst, nativeEvent);
|
13937 | }
|
13938 | }
|
13939 |
|
13940 |
|
13941 |
|
13942 |
|
13943 | function shouldUseClickEvent(elem) {
|
13944 |
|
13945 |
|
13946 |
|
13947 | var nodeName = elem.nodeName;
|
13948 | return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
|
13949 | }
|
13950 |
|
13951 | function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
|
13952 | if (topLevelType === 'topClick') {
|
13953 | return getInstIfValueChanged(targetInst, nativeEvent);
|
13954 | }
|
13955 | }
|
13956 |
|
13957 | function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
|
13958 | if (topLevelType === 'topInput' || topLevelType === 'topChange') {
|
13959 | return getInstIfValueChanged(targetInst, nativeEvent);
|
13960 | }
|
13961 | }
|
13962 |
|
13963 | function handleControlledInputBlur(inst, node) {
|
13964 |
|
13965 | if (inst == null) {
|
13966 | return;
|
13967 | }
|
13968 |
|
13969 |
|
13970 | var state = inst._wrapperState || node._wrapperState;
|
13971 |
|
13972 | if (!state || !state.controlled || node.type !== 'number') {
|
13973 | return;
|
13974 | }
|
13975 |
|
13976 |
|
13977 | var value = '' + node.value;
|
13978 | if (node.getAttribute('value') !== value) {
|
13979 | node.setAttribute('value', value);
|
13980 | }
|
13981 | }
|
13982 |
|
13983 |
|
13984 |
|
13985 |
|
13986 |
|
13987 |
|
13988 |
|
13989 |
|
13990 |
|
13991 |
|
13992 |
|
13993 | var ChangeEventPlugin = {
|
13994 | eventTypes: eventTypes,
|
13995 |
|
13996 | _allowSimulatedPassThrough: true,
|
13997 | _isInputEventSupported: isInputEventSupported,
|
13998 |
|
13999 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
14000 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
14001 |
|
14002 | var getTargetInstFunc, handleEventFunc;
|
14003 | if (shouldUseChangeEvent(targetNode)) {
|
14004 | if (doesChangeEventBubble) {
|
14005 | getTargetInstFunc = getTargetInstForChangeEvent;
|
14006 | } else {
|
14007 | handleEventFunc = handleEventsForChangeEventIE8;
|
14008 | }
|
14009 | } else if (isTextInputElement(targetNode)) {
|
14010 | if (isInputEventSupported) {
|
14011 | getTargetInstFunc = getTargetInstForInputOrChangeEvent;
|
14012 | } else {
|
14013 | getTargetInstFunc = getTargetInstForInputEventPolyfill;
|
14014 | handleEventFunc = handleEventsForInputEventPolyfill;
|
14015 | }
|
14016 | } else if (shouldUseClickEvent(targetNode)) {
|
14017 | getTargetInstFunc = getTargetInstForClickEvent;
|
14018 | }
|
14019 |
|
14020 | if (getTargetInstFunc) {
|
14021 | var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
|
14022 | if (inst) {
|
14023 | var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
|
14024 | return event;
|
14025 | }
|
14026 | }
|
14027 |
|
14028 | if (handleEventFunc) {
|
14029 | handleEventFunc(topLevelType, targetNode, targetInst);
|
14030 | }
|
14031 |
|
14032 |
|
14033 | if (topLevelType === 'topBlur') {
|
14034 | handleControlledInputBlur(targetInst, targetNode);
|
14035 | }
|
14036 | }
|
14037 | };
|
14038 |
|
14039 | module.exports = ChangeEventPlugin;
|
14040 |
|
14041 | }),
|
14042 |
|
14043 | (function(module, exports, __webpack_require__) {
|
14044 |
|
14045 | "use strict";
|
14046 |
|
14047 |
|
14048 |
|
14049 |
|
14050 |
|
14051 |
|
14052 |
|
14053 |
|
14054 |
|
14055 |
|
14056 | var _prodInvariant = __webpack_require__(2);
|
14057 |
|
14058 | var DOMLazyTree = __webpack_require__(15);
|
14059 | var ExecutionEnvironment = __webpack_require__(5);
|
14060 |
|
14061 | var createNodesFromMarkup = __webpack_require__(109);
|
14062 | var emptyFunction = __webpack_require__(7);
|
14063 | var invariant = __webpack_require__(0);
|
14064 |
|
14065 | var Danger = {
|
14066 | |
14067 |
|
14068 |
|
14069 |
|
14070 |
|
14071 |
|
14072 |
|
14073 |
|
14074 | dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
|
14075 | !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use ReactDOMServer.renderToString() for server rendering.') : _prodInvariant('56') : void 0;
|
14076 | !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
|
14077 | !(oldChild.nodeName !== 'HTML') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().') : _prodInvariant('58') : void 0;
|
14078 |
|
14079 | if (typeof markup === 'string') {
|
14080 | var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
|
14081 | oldChild.parentNode.replaceChild(newChild, oldChild);
|
14082 | } else {
|
14083 | DOMLazyTree.replaceChildWithTree(oldChild, markup);
|
14084 | }
|
14085 | }
|
14086 | };
|
14087 |
|
14088 | module.exports = Danger;
|
14089 |
|
14090 | }),
|
14091 |
|
14092 | (function(module, exports, __webpack_require__) {
|
14093 |
|
14094 | "use strict";
|
14095 |
|
14096 |
|
14097 |
|
14098 |
|
14099 |
|
14100 |
|
14101 |
|
14102 |
|
14103 |
|
14104 |
|
14105 |
|
14106 |
|
14107 |
|
14108 |
|
14109 |
|
14110 |
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 | var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
|
14116 |
|
14117 | module.exports = DefaultEventPluginOrder;
|
14118 |
|
14119 | }),
|
14120 |
|
14121 | (function(module, exports, __webpack_require__) {
|
14122 |
|
14123 | "use strict";
|
14124 |
|
14125 |
|
14126 |
|
14127 |
|
14128 |
|
14129 |
|
14130 |
|
14131 |
|
14132 |
|
14133 |
|
14134 | var EventPropagators = __webpack_require__(18);
|
14135 | var ReactDOMComponentTree = __webpack_require__(4);
|
14136 | var SyntheticMouseEvent = __webpack_require__(23);
|
14137 |
|
14138 | var eventTypes = {
|
14139 | mouseEnter: {
|
14140 | registrationName: 'onMouseEnter',
|
14141 | dependencies: ['topMouseOut', 'topMouseOver']
|
14142 | },
|
14143 | mouseLeave: {
|
14144 | registrationName: 'onMouseLeave',
|
14145 | dependencies: ['topMouseOut', 'topMouseOver']
|
14146 | }
|
14147 | };
|
14148 |
|
14149 | var EnterLeaveEventPlugin = {
|
14150 | eventTypes: eventTypes,
|
14151 |
|
14152 | |
14153 |
|
14154 |
|
14155 |
|
14156 |
|
14157 |
|
14158 |
|
14159 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
14160 | if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
|
14161 | return null;
|
14162 | }
|
14163 | if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
|
14164 |
|
14165 | return null;
|
14166 | }
|
14167 |
|
14168 | var win;
|
14169 | if (nativeEventTarget.window === nativeEventTarget) {
|
14170 |
|
14171 | win = nativeEventTarget;
|
14172 | } else {
|
14173 |
|
14174 | var doc = nativeEventTarget.ownerDocument;
|
14175 | if (doc) {
|
14176 | win = doc.defaultView || doc.parentWindow;
|
14177 | } else {
|
14178 | win = window;
|
14179 | }
|
14180 | }
|
14181 |
|
14182 | var from;
|
14183 | var to;
|
14184 | if (topLevelType === 'topMouseOut') {
|
14185 | from = targetInst;
|
14186 | var related = nativeEvent.relatedTarget || nativeEvent.toElement;
|
14187 | to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
|
14188 | } else {
|
14189 |
|
14190 | from = null;
|
14191 | to = targetInst;
|
14192 | }
|
14193 |
|
14194 | if (from === to) {
|
14195 |
|
14196 | return null;
|
14197 | }
|
14198 |
|
14199 | var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
|
14200 | var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
|
14201 |
|
14202 | var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
|
14203 | leave.type = 'mouseleave';
|
14204 | leave.target = fromNode;
|
14205 | leave.relatedTarget = toNode;
|
14206 |
|
14207 | var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
|
14208 | enter.type = 'mouseenter';
|
14209 | enter.target = toNode;
|
14210 | enter.relatedTarget = fromNode;
|
14211 |
|
14212 | EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
|
14213 |
|
14214 | return [leave, enter];
|
14215 | }
|
14216 | };
|
14217 |
|
14218 | module.exports = EnterLeaveEventPlugin;
|
14219 |
|
14220 | }),
|
14221 |
|
14222 | (function(module, exports, __webpack_require__) {
|
14223 |
|
14224 | "use strict";
|
14225 |
|
14226 |
|
14227 |
|
14228 |
|
14229 |
|
14230 |
|
14231 |
|
14232 |
|
14233 |
|
14234 |
|
14235 | var _assign = __webpack_require__(3);
|
14236 |
|
14237 | var PooledClass = __webpack_require__(12);
|
14238 |
|
14239 | var getTextContentAccessor = __webpack_require__(68);
|
14240 |
|
14241 |
|
14242 |
|
14243 |
|
14244 |
|
14245 |
|
14246 |
|
14247 |
|
14248 |
|
14249 |
|
14250 |
|
14251 |
|
14252 | function FallbackCompositionState(root) {
|
14253 | this._root = root;
|
14254 | this._startText = this.getText();
|
14255 | this._fallbackText = null;
|
14256 | }
|
14257 |
|
14258 | _assign(FallbackCompositionState.prototype, {
|
14259 | destructor: function () {
|
14260 | this._root = null;
|
14261 | this._startText = null;
|
14262 | this._fallbackText = null;
|
14263 | },
|
14264 |
|
14265 | |
14266 |
|
14267 |
|
14268 |
|
14269 |
|
14270 | getText: function () {
|
14271 | if ('value' in this._root) {
|
14272 | return this._root.value;
|
14273 | }
|
14274 | return this._root[getTextContentAccessor()];
|
14275 | },
|
14276 |
|
14277 | |
14278 |
|
14279 |
|
14280 |
|
14281 |
|
14282 |
|
14283 | getData: function () {
|
14284 | if (this._fallbackText) {
|
14285 | return this._fallbackText;
|
14286 | }
|
14287 |
|
14288 | var start;
|
14289 | var startValue = this._startText;
|
14290 | var startLength = startValue.length;
|
14291 | var end;
|
14292 | var endValue = this.getText();
|
14293 | var endLength = endValue.length;
|
14294 |
|
14295 | for (start = 0; start < startLength; start++) {
|
14296 | if (startValue[start] !== endValue[start]) {
|
14297 | break;
|
14298 | }
|
14299 | }
|
14300 |
|
14301 | var minEnd = startLength - start;
|
14302 | for (end = 1; end <= minEnd; end++) {
|
14303 | if (startValue[startLength - end] !== endValue[endLength - end]) {
|
14304 | break;
|
14305 | }
|
14306 | }
|
14307 |
|
14308 | var sliceTail = end > 1 ? 1 - end : undefined;
|
14309 | this._fallbackText = endValue.slice(start, sliceTail);
|
14310 | return this._fallbackText;
|
14311 | }
|
14312 | });
|
14313 |
|
14314 | PooledClass.addPoolingTo(FallbackCompositionState);
|
14315 |
|
14316 | module.exports = FallbackCompositionState;
|
14317 |
|
14318 | }),
|
14319 |
|
14320 | (function(module, exports, __webpack_require__) {
|
14321 |
|
14322 | "use strict";
|
14323 |
|
14324 |
|
14325 |
|
14326 |
|
14327 |
|
14328 |
|
14329 |
|
14330 |
|
14331 |
|
14332 |
|
14333 | var DOMProperty = __webpack_require__(16);
|
14334 |
|
14335 | var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
14336 | var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
14337 | var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
14338 | var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
14339 | var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
14340 |
|
14341 | var HTMLDOMPropertyConfig = {
|
14342 | isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
14343 | Properties: {
|
14344 | |
14345 |
|
14346 |
|
14347 | accept: 0,
|
14348 | acceptCharset: 0,
|
14349 | accessKey: 0,
|
14350 | action: 0,
|
14351 | allowFullScreen: HAS_BOOLEAN_VALUE,
|
14352 | allowTransparency: 0,
|
14353 | alt: 0,
|
14354 |
|
14355 | as: 0,
|
14356 | async: HAS_BOOLEAN_VALUE,
|
14357 | autoComplete: 0,
|
14358 |
|
14359 |
|
14360 | autoPlay: HAS_BOOLEAN_VALUE,
|
14361 | capture: HAS_BOOLEAN_VALUE,
|
14362 | cellPadding: 0,
|
14363 | cellSpacing: 0,
|
14364 | charSet: 0,
|
14365 | challenge: 0,
|
14366 | checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
14367 | cite: 0,
|
14368 | classID: 0,
|
14369 | className: 0,
|
14370 | cols: HAS_POSITIVE_NUMERIC_VALUE,
|
14371 | colSpan: 0,
|
14372 | content: 0,
|
14373 | contentEditable: 0,
|
14374 | contextMenu: 0,
|
14375 | controls: HAS_BOOLEAN_VALUE,
|
14376 | controlsList: 0,
|
14377 | coords: 0,
|
14378 | crossOrigin: 0,
|
14379 | data: 0,
|
14380 | dateTime: 0,
|
14381 | 'default': HAS_BOOLEAN_VALUE,
|
14382 | defer: HAS_BOOLEAN_VALUE,
|
14383 | dir: 0,
|
14384 | disabled: HAS_BOOLEAN_VALUE,
|
14385 | download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
14386 | draggable: 0,
|
14387 | encType: 0,
|
14388 | form: 0,
|
14389 | formAction: 0,
|
14390 | formEncType: 0,
|
14391 | formMethod: 0,
|
14392 | formNoValidate: HAS_BOOLEAN_VALUE,
|
14393 | formTarget: 0,
|
14394 | frameBorder: 0,
|
14395 | headers: 0,
|
14396 | height: 0,
|
14397 | hidden: HAS_BOOLEAN_VALUE,
|
14398 | high: 0,
|
14399 | href: 0,
|
14400 | hrefLang: 0,
|
14401 | htmlFor: 0,
|
14402 | httpEquiv: 0,
|
14403 | icon: 0,
|
14404 | id: 0,
|
14405 | inputMode: 0,
|
14406 | integrity: 0,
|
14407 | is: 0,
|
14408 | keyParams: 0,
|
14409 | keyType: 0,
|
14410 | kind: 0,
|
14411 | label: 0,
|
14412 | lang: 0,
|
14413 | list: 0,
|
14414 | loop: HAS_BOOLEAN_VALUE,
|
14415 | low: 0,
|
14416 | manifest: 0,
|
14417 | marginHeight: 0,
|
14418 | marginWidth: 0,
|
14419 | max: 0,
|
14420 | maxLength: 0,
|
14421 | media: 0,
|
14422 | mediaGroup: 0,
|
14423 | method: 0,
|
14424 | min: 0,
|
14425 | minLength: 0,
|
14426 |
|
14427 |
|
14428 | multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
14429 | muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
14430 | name: 0,
|
14431 | nonce: 0,
|
14432 | noValidate: HAS_BOOLEAN_VALUE,
|
14433 | open: HAS_BOOLEAN_VALUE,
|
14434 | optimum: 0,
|
14435 | pattern: 0,
|
14436 | placeholder: 0,
|
14437 | playsInline: HAS_BOOLEAN_VALUE,
|
14438 | poster: 0,
|
14439 | preload: 0,
|
14440 | profile: 0,
|
14441 | radioGroup: 0,
|
14442 | readOnly: HAS_BOOLEAN_VALUE,
|
14443 | referrerPolicy: 0,
|
14444 | rel: 0,
|
14445 | required: HAS_BOOLEAN_VALUE,
|
14446 | reversed: HAS_BOOLEAN_VALUE,
|
14447 | role: 0,
|
14448 | rows: HAS_POSITIVE_NUMERIC_VALUE,
|
14449 | rowSpan: HAS_NUMERIC_VALUE,
|
14450 | sandbox: 0,
|
14451 | scope: 0,
|
14452 | scoped: HAS_BOOLEAN_VALUE,
|
14453 | scrolling: 0,
|
14454 | seamless: HAS_BOOLEAN_VALUE,
|
14455 | selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
14456 | shape: 0,
|
14457 | size: HAS_POSITIVE_NUMERIC_VALUE,
|
14458 | sizes: 0,
|
14459 | span: HAS_POSITIVE_NUMERIC_VALUE,
|
14460 | spellCheck: 0,
|
14461 | src: 0,
|
14462 | srcDoc: 0,
|
14463 | srcLang: 0,
|
14464 | srcSet: 0,
|
14465 | start: HAS_NUMERIC_VALUE,
|
14466 | step: 0,
|
14467 | style: 0,
|
14468 | summary: 0,
|
14469 | tabIndex: 0,
|
14470 | target: 0,
|
14471 | title: 0,
|
14472 |
|
14473 | type: 0,
|
14474 | useMap: 0,
|
14475 | value: 0,
|
14476 | width: 0,
|
14477 | wmode: 0,
|
14478 | wrap: 0,
|
14479 |
|
14480 | |
14481 |
|
14482 |
|
14483 | about: 0,
|
14484 | datatype: 0,
|
14485 | inlist: 0,
|
14486 | prefix: 0,
|
14487 |
|
14488 | property: 0,
|
14489 | resource: 0,
|
14490 | 'typeof': 0,
|
14491 | vocab: 0,
|
14492 |
|
14493 | |
14494 |
|
14495 |
|
14496 |
|
14497 |
|
14498 | autoCapitalize: 0,
|
14499 | autoCorrect: 0,
|
14500 |
|
14501 | autoSave: 0,
|
14502 |
|
14503 | color: 0,
|
14504 |
|
14505 |
|
14506 | itemProp: 0,
|
14507 | itemScope: HAS_BOOLEAN_VALUE,
|
14508 | itemType: 0,
|
14509 |
|
14510 |
|
14511 |
|
14512 | itemID: 0,
|
14513 | itemRef: 0,
|
14514 |
|
14515 |
|
14516 | results: 0,
|
14517 |
|
14518 |
|
14519 | security: 0,
|
14520 |
|
14521 | unselectable: 0
|
14522 | },
|
14523 | DOMAttributeNames: {
|
14524 | acceptCharset: 'accept-charset',
|
14525 | className: 'class',
|
14526 | htmlFor: 'for',
|
14527 | httpEquiv: 'http-equiv'
|
14528 | },
|
14529 | DOMPropertyNames: {},
|
14530 | DOMMutationMethods: {
|
14531 | value: function (node, value) {
|
14532 | if (value == null) {
|
14533 | return node.removeAttribute('value');
|
14534 | }
|
14535 |
|
14536 |
|
14537 |
|
14538 |
|
14539 | if (node.type !== 'number' || node.hasAttribute('value') === false) {
|
14540 | node.setAttribute('value', '' + value);
|
14541 | } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
|
14542 |
|
14543 |
|
14544 |
|
14545 |
|
14546 |
|
14547 |
|
14548 |
|
14549 |
|
14550 | node.setAttribute('value', '' + value);
|
14551 | }
|
14552 | }
|
14553 | }
|
14554 | };
|
14555 |
|
14556 | module.exports = HTMLDOMPropertyConfig;
|
14557 |
|
14558 | }),
|
14559 |
|
14560 | (function(module, exports, __webpack_require__) {
|
14561 |
|
14562 | "use strict";
|
14563 |
|
14564 |
|
14565 |
|
14566 |
|
14567 |
|
14568 |
|
14569 |
|
14570 |
|
14571 |
|
14572 |
|
14573 | var ReactReconciler = __webpack_require__(19);
|
14574 |
|
14575 | var instantiateReactComponent = __webpack_require__(70);
|
14576 | var KeyEscapeUtils = __webpack_require__(32);
|
14577 | var shouldUpdateReactComponent = __webpack_require__(73);
|
14578 | var traverseAllChildren = __webpack_require__(74);
|
14579 | var warning = __webpack_require__(1);
|
14580 |
|
14581 | var ReactComponentTreeHook;
|
14582 |
|
14583 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
14584 |
|
14585 |
|
14586 |
|
14587 |
|
14588 |
|
14589 | ReactComponentTreeHook = __webpack_require__(8);
|
14590 | }
|
14591 |
|
14592 | function instantiateChild(childInstances, child, name, selfDebugID) {
|
14593 |
|
14594 | var keyUnique = childInstances[name] === undefined;
|
14595 | if (process.env.NODE_ENV !== 'production') {
|
14596 | if (!ReactComponentTreeHook) {
|
14597 | ReactComponentTreeHook = __webpack_require__(8);
|
14598 | }
|
14599 | if (!keyUnique) {
|
14600 | process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
14601 | }
|
14602 | }
|
14603 | if (child != null && keyUnique) {
|
14604 | childInstances[name] = instantiateReactComponent(child, true);
|
14605 | }
|
14606 | }
|
14607 |
|
14608 |
|
14609 |
|
14610 |
|
14611 |
|
14612 |
|
14613 | var ReactChildReconciler = {
|
14614 | |
14615 |
|
14616 |
|
14617 |
|
14618 |
|
14619 |
|
14620 |
|
14621 |
|
14622 | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
|
14623 | {
|
14624 | if (nestedChildNodes == null) {
|
14625 | return null;
|
14626 | }
|
14627 | var childInstances = {};
|
14628 |
|
14629 | if (process.env.NODE_ENV !== 'production') {
|
14630 | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
|
14631 | return instantiateChild(childInsts, child, name, selfDebugID);
|
14632 | }, childInstances);
|
14633 | } else {
|
14634 | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
|
14635 | }
|
14636 | return childInstances;
|
14637 | },
|
14638 |
|
14639 | |
14640 |
|
14641 |
|
14642 |
|
14643 |
|
14644 |
|
14645 |
|
14646 |
|
14647 |
|
14648 |
|
14649 | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
|
14650 | {
|
14651 |
|
14652 |
|
14653 |
|
14654 |
|
14655 |
|
14656 | if (!nextChildren && !prevChildren) {
|
14657 | return;
|
14658 | }
|
14659 | var name;
|
14660 | var prevChild;
|
14661 | for (name in nextChildren) {
|
14662 | if (!nextChildren.hasOwnProperty(name)) {
|
14663 | continue;
|
14664 | }
|
14665 | prevChild = prevChildren && prevChildren[name];
|
14666 | var prevElement = prevChild && prevChild._currentElement;
|
14667 | var nextElement = nextChildren[name];
|
14668 | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
|
14669 | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
|
14670 | nextChildren[name] = prevChild;
|
14671 | } else {
|
14672 | if (prevChild) {
|
14673 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
14674 | ReactReconciler.unmountComponent(prevChild, false);
|
14675 | }
|
14676 |
|
14677 | var nextChildInstance = instantiateReactComponent(nextElement, true);
|
14678 | nextChildren[name] = nextChildInstance;
|
14679 |
|
14680 |
|
14681 | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
|
14682 | mountImages.push(nextChildMountImage);
|
14683 | }
|
14684 | }
|
14685 |
|
14686 | for (name in prevChildren) {
|
14687 | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
|
14688 | prevChild = prevChildren[name];
|
14689 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
14690 | ReactReconciler.unmountComponent(prevChild, false);
|
14691 | }
|
14692 | }
|
14693 | },
|
14694 |
|
14695 | |
14696 |
|
14697 |
|
14698 |
|
14699 |
|
14700 |
|
14701 |
|
14702 | unmountChildren: function (renderedChildren, safely) {
|
14703 | for (var name in renderedChildren) {
|
14704 | if (renderedChildren.hasOwnProperty(name)) {
|
14705 | var renderedChild = renderedChildren[name];
|
14706 | ReactReconciler.unmountComponent(renderedChild, safely);
|
14707 | }
|
14708 | }
|
14709 | }
|
14710 | };
|
14711 |
|
14712 | module.exports = ReactChildReconciler;
|
14713 |
|
14714 | }),
|
14715 |
|
14716 | (function(module, exports, __webpack_require__) {
|
14717 |
|
14718 | "use strict";
|
14719 |
|
14720 |
|
14721 |
|
14722 |
|
14723 |
|
14724 |
|
14725 |
|
14726 |
|
14727 |
|
14728 |
|
14729 | var DOMChildrenOperations = __webpack_require__(28);
|
14730 | var ReactDOMIDOperations = __webpack_require__(137);
|
14731 |
|
14732 |
|
14733 |
|
14734 |
|
14735 |
|
14736 |
|
14737 | var ReactComponentBrowserEnvironment = {
|
14738 | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
|
14739 |
|
14740 | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
|
14741 | };
|
14742 |
|
14743 | module.exports = ReactComponentBrowserEnvironment;
|
14744 |
|
14745 | }),
|
14746 |
|
14747 | (function(module, exports, __webpack_require__) {
|
14748 |
|
14749 | "use strict";
|
14750 |
|
14751 |
|
14752 |
|
14753 |
|
14754 |
|
14755 |
|
14756 |
|
14757 |
|
14758 |
|
14759 |
|
14760 | var _prodInvariant = __webpack_require__(2),
|
14761 | _assign = __webpack_require__(3);
|
14762 |
|
14763 | var React = __webpack_require__(21);
|
14764 | var ReactComponentEnvironment = __webpack_require__(35);
|
14765 | var ReactCurrentOwner = __webpack_require__(11);
|
14766 | var ReactErrorUtils = __webpack_require__(36);
|
14767 | var ReactInstanceMap = __webpack_require__(37);
|
14768 | var ReactInstrumentation = __webpack_require__(6);
|
14769 | var ReactNodeTypes = __webpack_require__(156);
|
14770 | var ReactReconciler = __webpack_require__(19);
|
14771 |
|
14772 | if (process.env.NODE_ENV !== 'production') {
|
14773 | var checkReactTypeSpec = __webpack_require__(179);
|
14774 | }
|
14775 |
|
14776 | var emptyObject = __webpack_require__(22);
|
14777 | var invariant = __webpack_require__(0);
|
14778 | var shallowEqual = __webpack_require__(27);
|
14779 | var shouldUpdateReactComponent = __webpack_require__(73);
|
14780 | var warning = __webpack_require__(1);
|
14781 |
|
14782 | var CompositeTypes = {
|
14783 | ImpureClass: 0,
|
14784 | PureClass: 1,
|
14785 | StatelessFunctional: 2
|
14786 | };
|
14787 |
|
14788 | function StatelessComponent(Component) {}
|
14789 | StatelessComponent.prototype.render = function () {
|
14790 | var Component = ReactInstanceMap.get(this)._currentElement.type;
|
14791 | var element = Component(this.props, this.context, this.updater);
|
14792 | warnIfInvalidElement(Component, element);
|
14793 | return element;
|
14794 | };
|
14795 |
|
14796 | function warnIfInvalidElement(Component, element) {
|
14797 | if (process.env.NODE_ENV !== 'production') {
|
14798 | process.env.NODE_ENV !== 'production' ? warning(element === null || element === false || React.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
|
14799 | process.env.NODE_ENV !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
|
14800 | }
|
14801 | }
|
14802 |
|
14803 | function shouldConstruct(Component) {
|
14804 | return !!(Component.prototype && Component.prototype.isReactComponent);
|
14805 | }
|
14806 |
|
14807 | function isPureComponent(Component) {
|
14808 | return !!(Component.prototype && Component.prototype.isPureReactComponent);
|
14809 | }
|
14810 |
|
14811 |
|
14812 | function measureLifeCyclePerf(fn, debugID, timerType) {
|
14813 | if (debugID === 0) {
|
14814 |
|
14815 |
|
14816 |
|
14817 | return fn();
|
14818 | }
|
14819 |
|
14820 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
|
14821 | try {
|
14822 | return fn();
|
14823 | } finally {
|
14824 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
|
14825 | }
|
14826 | }
|
14827 |
|
14828 |
|
14829 |
|
14830 |
|
14831 |
|
14832 |
|
14833 |
|
14834 |
|
14835 |
|
14836 |
|
14837 |
|
14838 |
|
14839 |
|
14840 |
|
14841 |
|
14842 |
|
14843 |
|
14844 |
|
14845 |
|
14846 |
|
14847 |
|
14848 |
|
14849 |
|
14850 |
|
14851 |
|
14852 |
|
14853 |
|
14854 |
|
14855 |
|
14856 |
|
14857 |
|
14858 |
|
14859 |
|
14860 |
|
14861 | var nextMountID = 1;
|
14862 |
|
14863 |
|
14864 |
|
14865 |
|
14866 | var ReactCompositeComponent = {
|
14867 | |
14868 |
|
14869 |
|
14870 |
|
14871 |
|
14872 |
|
14873 |
|
14874 | construct: function (element) {
|
14875 | this._currentElement = element;
|
14876 | this._rootNodeID = 0;
|
14877 | this._compositeType = null;
|
14878 | this._instance = null;
|
14879 | this._hostParent = null;
|
14880 | this._hostContainerInfo = null;
|
14881 |
|
14882 |
|
14883 | this._updateBatchNumber = null;
|
14884 | this._pendingElement = null;
|
14885 | this._pendingStateQueue = null;
|
14886 | this._pendingReplaceState = false;
|
14887 | this._pendingForceUpdate = false;
|
14888 |
|
14889 | this._renderedNodeType = null;
|
14890 | this._renderedComponent = null;
|
14891 | this._context = null;
|
14892 | this._mountOrder = 0;
|
14893 | this._topLevelWrapper = null;
|
14894 |
|
14895 |
|
14896 | this._pendingCallbacks = null;
|
14897 |
|
14898 |
|
14899 | this._calledComponentWillUnmount = false;
|
14900 |
|
14901 | if (process.env.NODE_ENV !== 'production') {
|
14902 | this._warnedAboutRefsInRender = false;
|
14903 | }
|
14904 | },
|
14905 |
|
14906 | |
14907 |
|
14908 |
|
14909 |
|
14910 |
|
14911 |
|
14912 |
|
14913 |
|
14914 |
|
14915 |
|
14916 |
|
14917 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
14918 | var _this = this;
|
14919 |
|
14920 | this._context = context;
|
14921 | this._mountOrder = nextMountID++;
|
14922 | this._hostParent = hostParent;
|
14923 | this._hostContainerInfo = hostContainerInfo;
|
14924 |
|
14925 | var publicProps = this._currentElement.props;
|
14926 | var publicContext = this._processContext(context);
|
14927 |
|
14928 | var Component = this._currentElement.type;
|
14929 |
|
14930 | var updateQueue = transaction.getUpdateQueue();
|
14931 |
|
14932 |
|
14933 | var doConstruct = shouldConstruct(Component);
|
14934 | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
|
14935 | var renderedElement;
|
14936 |
|
14937 |
|
14938 | if (!doConstruct && (inst == null || inst.render == null)) {
|
14939 | renderedElement = inst;
|
14940 | warnIfInvalidElement(Component, renderedElement);
|
14941 | !(inst === null || inst === false || React.isValidElement(inst)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : _prodInvariant('105', Component.displayName || Component.name || 'Component') : void 0;
|
14942 | inst = new StatelessComponent(Component);
|
14943 | this._compositeType = CompositeTypes.StatelessFunctional;
|
14944 | } else {
|
14945 | if (isPureComponent(Component)) {
|
14946 | this._compositeType = CompositeTypes.PureClass;
|
14947 | } else {
|
14948 | this._compositeType = CompositeTypes.ImpureClass;
|
14949 | }
|
14950 | }
|
14951 |
|
14952 | if (process.env.NODE_ENV !== 'production') {
|
14953 |
|
14954 |
|
14955 | if (inst.render == null) {
|
14956 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
|
14957 | }
|
14958 |
|
14959 | var propsMutated = inst.props !== publicProps;
|
14960 | var componentName = Component.displayName || Component.name || 'Component';
|
14961 |
|
14962 | process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
|
14963 | }
|
14964 |
|
14965 |
|
14966 |
|
14967 | inst.props = publicProps;
|
14968 | inst.context = publicContext;
|
14969 | inst.refs = emptyObject;
|
14970 | inst.updater = updateQueue;
|
14971 |
|
14972 | this._instance = inst;
|
14973 |
|
14974 |
|
14975 | ReactInstanceMap.set(inst, this);
|
14976 |
|
14977 | if (process.env.NODE_ENV !== 'production') {
|
14978 |
|
14979 |
|
14980 |
|
14981 | process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
|
14982 | process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
|
14983 | process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
|
14984 | process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
|
14985 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
|
14986 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
|
14987 | process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
|
14988 | }
|
14989 |
|
14990 | var initialState = inst.state;
|
14991 | if (initialState === undefined) {
|
14992 | inst.state = initialState = null;
|
14993 | }
|
14994 | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
|
14995 |
|
14996 | this._pendingStateQueue = null;
|
14997 | this._pendingReplaceState = false;
|
14998 | this._pendingForceUpdate = false;
|
14999 |
|
15000 | var markup;
|
15001 | if (inst.unstable_handleError) {
|
15002 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
15003 | } else {
|
15004 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
15005 | }
|
15006 |
|
15007 | if (inst.componentDidMount) {
|
15008 | if (process.env.NODE_ENV !== 'production') {
|
15009 | transaction.getReactMountReady().enqueue(function () {
|
15010 | measureLifeCyclePerf(function () {
|
15011 | return inst.componentDidMount();
|
15012 | }, _this._debugID, 'componentDidMount');
|
15013 | });
|
15014 | } else {
|
15015 | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
|
15016 | }
|
15017 | }
|
15018 |
|
15019 | return markup;
|
15020 | },
|
15021 |
|
15022 | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
|
15023 | if (process.env.NODE_ENV !== 'production' && !doConstruct) {
|
15024 | ReactCurrentOwner.current = this;
|
15025 | try {
|
15026 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
15027 | } finally {
|
15028 | ReactCurrentOwner.current = null;
|
15029 | }
|
15030 | } else {
|
15031 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
15032 | }
|
15033 | },
|
15034 |
|
15035 | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
|
15036 | var Component = this._currentElement.type;
|
15037 |
|
15038 | if (doConstruct) {
|
15039 | if (process.env.NODE_ENV !== 'production') {
|
15040 | return measureLifeCyclePerf(function () {
|
15041 | return new Component(publicProps, publicContext, updateQueue);
|
15042 | }, this._debugID, 'ctor');
|
15043 | } else {
|
15044 | return new Component(publicProps, publicContext, updateQueue);
|
15045 | }
|
15046 | }
|
15047 |
|
15048 |
|
15049 |
|
15050 | if (process.env.NODE_ENV !== 'production') {
|
15051 | return measureLifeCyclePerf(function () {
|
15052 | return Component(publicProps, publicContext, updateQueue);
|
15053 | }, this._debugID, 'render');
|
15054 | } else {
|
15055 | return Component(publicProps, publicContext, updateQueue);
|
15056 | }
|
15057 | },
|
15058 |
|
15059 | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
15060 | var markup;
|
15061 | var checkpoint = transaction.checkpoint();
|
15062 | try {
|
15063 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
15064 | } catch (e) {
|
15065 |
|
15066 | transaction.rollback(checkpoint);
|
15067 | this._instance.unstable_handleError(e);
|
15068 | if (this._pendingStateQueue) {
|
15069 | this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
|
15070 | }
|
15071 | checkpoint = transaction.checkpoint();
|
15072 |
|
15073 | this._renderedComponent.unmountComponent(true);
|
15074 | transaction.rollback(checkpoint);
|
15075 |
|
15076 |
|
15077 |
|
15078 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
15079 | }
|
15080 | return markup;
|
15081 | },
|
15082 |
|
15083 | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
15084 | var inst = this._instance;
|
15085 |
|
15086 | var debugID = 0;
|
15087 | if (process.env.NODE_ENV !== 'production') {
|
15088 | debugID = this._debugID;
|
15089 | }
|
15090 |
|
15091 | if (inst.componentWillMount) {
|
15092 | if (process.env.NODE_ENV !== 'production') {
|
15093 | measureLifeCyclePerf(function () {
|
15094 | return inst.componentWillMount();
|
15095 | }, debugID, 'componentWillMount');
|
15096 | } else {
|
15097 | inst.componentWillMount();
|
15098 | }
|
15099 |
|
15100 |
|
15101 | if (this._pendingStateQueue) {
|
15102 | inst.state = this._processPendingState(inst.props, inst.context);
|
15103 | }
|
15104 | }
|
15105 |
|
15106 |
|
15107 | if (renderedElement === undefined) {
|
15108 | renderedElement = this._renderValidatedComponent();
|
15109 | }
|
15110 |
|
15111 | var nodeType = ReactNodeTypes.getType(renderedElement);
|
15112 | this._renderedNodeType = nodeType;
|
15113 | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY
|
15114 | );
|
15115 | this._renderedComponent = child;
|
15116 |
|
15117 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
|
15118 |
|
15119 | if (process.env.NODE_ENV !== 'production') {
|
15120 | if (debugID !== 0) {
|
15121 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
15122 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
15123 | }
|
15124 | }
|
15125 |
|
15126 | return markup;
|
15127 | },
|
15128 |
|
15129 | getHostNode: function () {
|
15130 | return ReactReconciler.getHostNode(this._renderedComponent);
|
15131 | },
|
15132 |
|
15133 | |
15134 |
|
15135 |
|
15136 |
|
15137 |
|
15138 |
|
15139 | unmountComponent: function (safely) {
|
15140 | if (!this._renderedComponent) {
|
15141 | return;
|
15142 | }
|
15143 |
|
15144 | var inst = this._instance;
|
15145 |
|
15146 | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
|
15147 | inst._calledComponentWillUnmount = true;
|
15148 |
|
15149 | if (safely) {
|
15150 | var name = this.getName() + '.componentWillUnmount()';
|
15151 | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
|
15152 | } else {
|
15153 | if (process.env.NODE_ENV !== 'production') {
|
15154 | measureLifeCyclePerf(function () {
|
15155 | return inst.componentWillUnmount();
|
15156 | }, this._debugID, 'componentWillUnmount');
|
15157 | } else {
|
15158 | inst.componentWillUnmount();
|
15159 | }
|
15160 | }
|
15161 | }
|
15162 |
|
15163 | if (this._renderedComponent) {
|
15164 | ReactReconciler.unmountComponent(this._renderedComponent, safely);
|
15165 | this._renderedNodeType = null;
|
15166 | this._renderedComponent = null;
|
15167 | this._instance = null;
|
15168 | }
|
15169 |
|
15170 |
|
15171 |
|
15172 |
|
15173 | this._pendingStateQueue = null;
|
15174 | this._pendingReplaceState = false;
|
15175 | this._pendingForceUpdate = false;
|
15176 | this._pendingCallbacks = null;
|
15177 | this._pendingElement = null;
|
15178 |
|
15179 |
|
15180 |
|
15181 | this._context = null;
|
15182 | this._rootNodeID = 0;
|
15183 | this._topLevelWrapper = null;
|
15184 |
|
15185 |
|
15186 |
|
15187 |
|
15188 | ReactInstanceMap.remove(inst);
|
15189 |
|
15190 |
|
15191 |
|
15192 |
|
15193 |
|
15194 |
|
15195 | },
|
15196 |
|
15197 | |
15198 |
|
15199 |
|
15200 |
|
15201 |
|
15202 |
|
15203 |
|
15204 |
|
15205 | _maskContext: function (context) {
|
15206 | var Component = this._currentElement.type;
|
15207 | var contextTypes = Component.contextTypes;
|
15208 | if (!contextTypes) {
|
15209 | return emptyObject;
|
15210 | }
|
15211 | var maskedContext = {};
|
15212 | for (var contextName in contextTypes) {
|
15213 | maskedContext[contextName] = context[contextName];
|
15214 | }
|
15215 | return maskedContext;
|
15216 | },
|
15217 |
|
15218 | |
15219 |
|
15220 |
|
15221 |
|
15222 |
|
15223 |
|
15224 |
|
15225 |
|
15226 | _processContext: function (context) {
|
15227 | var maskedContext = this._maskContext(context);
|
15228 | if (process.env.NODE_ENV !== 'production') {
|
15229 | var Component = this._currentElement.type;
|
15230 | if (Component.contextTypes) {
|
15231 | this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
|
15232 | }
|
15233 | }
|
15234 | return maskedContext;
|
15235 | },
|
15236 |
|
15237 | |
15238 |
|
15239 |
|
15240 |
|
15241 |
|
15242 | _processChildContext: function (currentContext) {
|
15243 | var Component = this._currentElement.type;
|
15244 | var inst = this._instance;
|
15245 | var childContext;
|
15246 |
|
15247 | if (inst.getChildContext) {
|
15248 | if (process.env.NODE_ENV !== 'production') {
|
15249 | ReactInstrumentation.debugTool.onBeginProcessingChildContext();
|
15250 | try {
|
15251 | childContext = inst.getChildContext();
|
15252 | } finally {
|
15253 | ReactInstrumentation.debugTool.onEndProcessingChildContext();
|
15254 | }
|
15255 | } else {
|
15256 | childContext = inst.getChildContext();
|
15257 | }
|
15258 | }
|
15259 |
|
15260 | if (childContext) {
|
15261 | !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
|
15262 | if (process.env.NODE_ENV !== 'production') {
|
15263 | this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
|
15264 | }
|
15265 | for (var name in childContext) {
|
15266 | !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
|
15267 | }
|
15268 | return _assign({}, currentContext, childContext);
|
15269 | }
|
15270 | return currentContext;
|
15271 | },
|
15272 |
|
15273 | |
15274 |
|
15275 |
|
15276 |
|
15277 |
|
15278 |
|
15279 |
|
15280 |
|
15281 | _checkContextTypes: function (typeSpecs, values, location) {
|
15282 | if (process.env.NODE_ENV !== 'production') {
|
15283 | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
|
15284 | }
|
15285 | },
|
15286 |
|
15287 | receiveComponent: function (nextElement, transaction, nextContext) {
|
15288 | var prevElement = this._currentElement;
|
15289 | var prevContext = this._context;
|
15290 |
|
15291 | this._pendingElement = null;
|
15292 |
|
15293 | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
|
15294 | },
|
15295 |
|
15296 | |
15297 |
|
15298 |
|
15299 |
|
15300 |
|
15301 |
|
15302 |
|
15303 | performUpdateIfNecessary: function (transaction) {
|
15304 | if (this._pendingElement != null) {
|
15305 | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
|
15306 | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
|
15307 | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
|
15308 | } else {
|
15309 | this._updateBatchNumber = null;
|
15310 | }
|
15311 | },
|
15312 |
|
15313 | |
15314 |
|
15315 |
|
15316 |
|
15317 |
|
15318 |
|
15319 |
|
15320 |
|
15321 |
|
15322 |
|
15323 |
|
15324 |
|
15325 |
|
15326 |
|
15327 |
|
15328 | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
|
15329 | var inst = this._instance;
|
15330 | !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Attempted to update component `%s` that has already been unmounted (or failed to mount).', this.getName() || 'ReactCompositeComponent') : _prodInvariant('136', this.getName() || 'ReactCompositeComponent') : void 0;
|
15331 |
|
15332 | var willReceive = false;
|
15333 | var nextContext;
|
15334 |
|
15335 |
|
15336 | if (this._context === nextUnmaskedContext) {
|
15337 | nextContext = inst.context;
|
15338 | } else {
|
15339 | nextContext = this._processContext(nextUnmaskedContext);
|
15340 | willReceive = true;
|
15341 | }
|
15342 |
|
15343 | var prevProps = prevParentElement.props;
|
15344 | var nextProps = nextParentElement.props;
|
15345 |
|
15346 |
|
15347 | if (prevParentElement !== nextParentElement) {
|
15348 | willReceive = true;
|
15349 | }
|
15350 |
|
15351 |
|
15352 |
|
15353 |
|
15354 | if (willReceive && inst.componentWillReceiveProps) {
|
15355 | if (process.env.NODE_ENV !== 'production') {
|
15356 | measureLifeCyclePerf(function () {
|
15357 | return inst.componentWillReceiveProps(nextProps, nextContext);
|
15358 | }, this._debugID, 'componentWillReceiveProps');
|
15359 | } else {
|
15360 | inst.componentWillReceiveProps(nextProps, nextContext);
|
15361 | }
|
15362 | }
|
15363 |
|
15364 | var nextState = this._processPendingState(nextProps, nextContext);
|
15365 | var shouldUpdate = true;
|
15366 |
|
15367 | if (!this._pendingForceUpdate) {
|
15368 | if (inst.shouldComponentUpdate) {
|
15369 | if (process.env.NODE_ENV !== 'production') {
|
15370 | shouldUpdate = measureLifeCyclePerf(function () {
|
15371 | return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
15372 | }, this._debugID, 'shouldComponentUpdate');
|
15373 | } else {
|
15374 | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
15375 | }
|
15376 | } else {
|
15377 | if (this._compositeType === CompositeTypes.PureClass) {
|
15378 | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
|
15379 | }
|
15380 | }
|
15381 | }
|
15382 |
|
15383 | if (process.env.NODE_ENV !== 'production') {
|
15384 | process.env.NODE_ENV !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
|
15385 | }
|
15386 |
|
15387 | this._updateBatchNumber = null;
|
15388 | if (shouldUpdate) {
|
15389 | this._pendingForceUpdate = false;
|
15390 |
|
15391 | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
|
15392 | } else {
|
15393 |
|
15394 |
|
15395 | this._currentElement = nextParentElement;
|
15396 | this._context = nextUnmaskedContext;
|
15397 | inst.props = nextProps;
|
15398 | inst.state = nextState;
|
15399 | inst.context = nextContext;
|
15400 | }
|
15401 | },
|
15402 |
|
15403 | _processPendingState: function (props, context) {
|
15404 | var inst = this._instance;
|
15405 | var queue = this._pendingStateQueue;
|
15406 | var replace = this._pendingReplaceState;
|
15407 | this._pendingReplaceState = false;
|
15408 | this._pendingStateQueue = null;
|
15409 |
|
15410 | if (!queue) {
|
15411 | return inst.state;
|
15412 | }
|
15413 |
|
15414 | if (replace && queue.length === 1) {
|
15415 | return queue[0];
|
15416 | }
|
15417 |
|
15418 | var nextState = _assign({}, replace ? queue[0] : inst.state);
|
15419 | for (var i = replace ? 1 : 0; i < queue.length; i++) {
|
15420 | var partial = queue[i];
|
15421 | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
|
15422 | }
|
15423 |
|
15424 | return nextState;
|
15425 | },
|
15426 |
|
15427 | |
15428 |
|
15429 |
|
15430 |
|
15431 |
|
15432 |
|
15433 |
|
15434 |
|
15435 |
|
15436 |
|
15437 |
|
15438 |
|
15439 | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
15440 | var _this2 = this;
|
15441 |
|
15442 | var inst = this._instance;
|
15443 |
|
15444 | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
15445 | var prevProps;
|
15446 | var prevState;
|
15447 | var prevContext;
|
15448 | if (hasComponentDidUpdate) {
|
15449 | prevProps = inst.props;
|
15450 | prevState = inst.state;
|
15451 | prevContext = inst.context;
|
15452 | }
|
15453 |
|
15454 | if (inst.componentWillUpdate) {
|
15455 | if (process.env.NODE_ENV !== 'production') {
|
15456 | measureLifeCyclePerf(function () {
|
15457 | return inst.componentWillUpdate(nextProps, nextState, nextContext);
|
15458 | }, this._debugID, 'componentWillUpdate');
|
15459 | } else {
|
15460 | inst.componentWillUpdate(nextProps, nextState, nextContext);
|
15461 | }
|
15462 | }
|
15463 |
|
15464 | this._currentElement = nextElement;
|
15465 | this._context = unmaskedContext;
|
15466 | inst.props = nextProps;
|
15467 | inst.state = nextState;
|
15468 | inst.context = nextContext;
|
15469 |
|
15470 | this._updateRenderedComponent(transaction, unmaskedContext);
|
15471 |
|
15472 | if (hasComponentDidUpdate) {
|
15473 | if (process.env.NODE_ENV !== 'production') {
|
15474 | transaction.getReactMountReady().enqueue(function () {
|
15475 | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
|
15476 | });
|
15477 | } else {
|
15478 | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
15479 | }
|
15480 | }
|
15481 | },
|
15482 |
|
15483 | |
15484 |
|
15485 |
|
15486 |
|
15487 |
|
15488 |
|
15489 | _updateRenderedComponent: function (transaction, context) {
|
15490 | var prevComponentInstance = this._renderedComponent;
|
15491 | var prevRenderedElement = prevComponentInstance._currentElement;
|
15492 | var nextRenderedElement = this._renderValidatedComponent();
|
15493 |
|
15494 | var debugID = 0;
|
15495 | if (process.env.NODE_ENV !== 'production') {
|
15496 | debugID = this._debugID;
|
15497 | }
|
15498 |
|
15499 | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
|
15500 | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
|
15501 | } else {
|
15502 | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
|
15503 | ReactReconciler.unmountComponent(prevComponentInstance, false);
|
15504 |
|
15505 | var nodeType = ReactNodeTypes.getType(nextRenderedElement);
|
15506 | this._renderedNodeType = nodeType;
|
15507 | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY
|
15508 | );
|
15509 | this._renderedComponent = child;
|
15510 |
|
15511 | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
|
15512 |
|
15513 | if (process.env.NODE_ENV !== 'production') {
|
15514 | if (debugID !== 0) {
|
15515 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
15516 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
15517 | }
|
15518 | }
|
15519 |
|
15520 | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
|
15521 | }
|
15522 | },
|
15523 |
|
15524 | |
15525 |
|
15526 |
|
15527 |
|
15528 |
|
15529 | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
|
15530 | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
|
15531 | },
|
15532 |
|
15533 | |
15534 |
|
15535 |
|
15536 | _renderValidatedComponentWithoutOwnerOrContext: function () {
|
15537 | var inst = this._instance;
|
15538 | var renderedElement;
|
15539 |
|
15540 | if (process.env.NODE_ENV !== 'production') {
|
15541 | renderedElement = measureLifeCyclePerf(function () {
|
15542 | return inst.render();
|
15543 | }, this._debugID, 'render');
|
15544 | } else {
|
15545 | renderedElement = inst.render();
|
15546 | }
|
15547 |
|
15548 | if (process.env.NODE_ENV !== 'production') {
|
15549 |
|
15550 | if (renderedElement === undefined && inst.render._isMockFunction) {
|
15551 |
|
15552 |
|
15553 | renderedElement = null;
|
15554 | }
|
15555 | }
|
15556 |
|
15557 | return renderedElement;
|
15558 | },
|
15559 |
|
15560 | |
15561 |
|
15562 |
|
15563 | _renderValidatedComponent: function () {
|
15564 | var renderedElement;
|
15565 | if (process.env.NODE_ENV !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
|
15566 | ReactCurrentOwner.current = this;
|
15567 | try {
|
15568 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
15569 | } finally {
|
15570 | ReactCurrentOwner.current = null;
|
15571 | }
|
15572 | } else {
|
15573 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
15574 | }
|
15575 | !(
|
15576 |
|
15577 | renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : _prodInvariant('109', this.getName() || 'ReactCompositeComponent') : void 0;
|
15578 |
|
15579 | return renderedElement;
|
15580 | },
|
15581 |
|
15582 | |
15583 |
|
15584 |
|
15585 |
|
15586 |
|
15587 |
|
15588 |
|
15589 |
|
15590 | attachRef: function (ref, component) {
|
15591 | var inst = this.getPublicInstance();
|
15592 | !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
|
15593 | var publicComponentInstance = component.getPublicInstance();
|
15594 | if (process.env.NODE_ENV !== 'production') {
|
15595 | var componentName = component && component.getName ? component.getName() : 'a component';
|
15596 | process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null || component._compositeType !== CompositeTypes.StatelessFunctional, 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.', ref, componentName, this.getName()) : void 0;
|
15597 | }
|
15598 | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
|
15599 | refs[ref] = publicComponentInstance;
|
15600 | },
|
15601 |
|
15602 | |
15603 |
|
15604 |
|
15605 |
|
15606 |
|
15607 |
|
15608 |
|
15609 | detachRef: function (ref) {
|
15610 | var refs = this.getPublicInstance().refs;
|
15611 | delete refs[ref];
|
15612 | },
|
15613 |
|
15614 | |
15615 |
|
15616 |
|
15617 |
|
15618 |
|
15619 |
|
15620 | getName: function () {
|
15621 | var type = this._currentElement.type;
|
15622 | var constructor = this._instance && this._instance.constructor;
|
15623 | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
|
15624 | },
|
15625 |
|
15626 | /**
|
15627 | * Get the publicly accessible representation of this component - i.e. what
|
15628 | * is exposed by refs and returned by render. Can be null for stateless
|
15629 | * components.
|
15630 | *
|
15631 | * @return {ReactComponent} the public component instance.
|
15632 | * @internal
|
15633 | */
|
15634 | getPublicInstance: function () {
|
15635 | var inst = this._instance;
|
15636 | if (this._compositeType === CompositeTypes.StatelessFunctional) {
|
15637 | return null;
|
15638 | }
|
15639 | return inst;
|
15640 | },
|
15641 |
|
15642 |
|
15643 | _instantiateReactComponent: null
|
15644 | };
|
15645 |
|
15646 | module.exports = ReactCompositeComponent;
|
15647 |
|
15648 | }),
|
15649 |
|
15650 | (function(module, exports, __webpack_require__) {
|
15651 |
|
15652 | "use strict";
|
15653 |
|
15654 |
|
15655 |
|
15656 |
|
15657 |
|
15658 |
|
15659 |
|
15660 |
|
15661 |
|
15662 |
|
15663 |
|
15664 |
|
15665 | var _prodInvariant = __webpack_require__(2),
|
15666 | _assign = __webpack_require__(3);
|
15667 |
|
15668 | var AutoFocusUtils = __webpack_require__(122);
|
15669 | var CSSPropertyOperations = __webpack_require__(124);
|
15670 | var DOMLazyTree = __webpack_require__(15);
|
15671 | var DOMNamespaces = __webpack_require__(29);
|
15672 | var DOMProperty = __webpack_require__(16);
|
15673 | var DOMPropertyOperations = __webpack_require__(55);
|
15674 | var EventPluginHub = __webpack_require__(17);
|
15675 | var EventPluginRegistry = __webpack_require__(30);
|
15676 | var ReactBrowserEventEmitter = __webpack_require__(34);
|
15677 | var ReactDOMComponentFlags = __webpack_require__(56);
|
15678 | var ReactDOMComponentTree = __webpack_require__(4);
|
15679 | var ReactDOMInput = __webpack_require__(138);
|
15680 | var ReactDOMOption = __webpack_require__(139);
|
15681 | var ReactDOMSelect = __webpack_require__(57);
|
15682 | var ReactDOMTextarea = __webpack_require__(143);
|
15683 | var ReactInstrumentation = __webpack_require__(6);
|
15684 | var ReactMultiChild = __webpack_require__(155);
|
15685 | var ReactServerRenderingTransaction = __webpack_require__(63);
|
15686 |
|
15687 | var emptyFunction = __webpack_require__(7);
|
15688 | var escapeTextContentForBrowser = __webpack_require__(25);
|
15689 | var invariant = __webpack_require__(0);
|
15690 | var isEventSupported = __webpack_require__(42);
|
15691 | var shallowEqual = __webpack_require__(27);
|
15692 | var inputValueTracking = __webpack_require__(69);
|
15693 | var validateDOMNesting = __webpack_require__(44);
|
15694 | var warning = __webpack_require__(1);
|
15695 |
|
15696 | var Flags = ReactDOMComponentFlags;
|
15697 | var deleteListener = EventPluginHub.deleteListener;
|
15698 | var getNode = ReactDOMComponentTree.getNodeFromInstance;
|
15699 | var listenTo = ReactBrowserEventEmitter.listenTo;
|
15700 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
15701 |
|
15702 |
|
15703 | var CONTENT_TYPES = { string: true, number: true };
|
15704 |
|
15705 | var STYLE = 'style';
|
15706 | var HTML = '__html';
|
15707 | var RESERVED_PROPS = {
|
15708 | children: null,
|
15709 | dangerouslySetInnerHTML: null,
|
15710 | suppressContentEditableWarning: null
|
15711 | };
|
15712 |
|
15713 |
|
15714 | var DOC_FRAGMENT_TYPE = 11;
|
15715 |
|
15716 | function getDeclarationErrorAddendum(internalInstance) {
|
15717 | if (internalInstance) {
|
15718 | var owner = internalInstance._currentElement._owner || null;
|
15719 | if (owner) {
|
15720 | var name = owner.getName();
|
15721 | if (name) {
|
15722 | return ' This DOM node was rendered by `' + name + '`.';
|
15723 | }
|
15724 | }
|
15725 | }
|
15726 | return '';
|
15727 | }
|
15728 |
|
15729 | function friendlyStringify(obj) {
|
15730 | if (typeof obj === 'object') {
|
15731 | if (Array.isArray(obj)) {
|
15732 | return '[' + obj.map(friendlyStringify).join(', ') + ']';
|
15733 | } else {
|
15734 | var pairs = [];
|
15735 | for (var key in obj) {
|
15736 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
15737 | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
|
15738 | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
|
15739 | }
|
15740 | }
|
15741 | return '{' + pairs.join(', ') + '}';
|
15742 | }
|
15743 | } else if (typeof obj === 'string') {
|
15744 | return JSON.stringify(obj);
|
15745 | } else if (typeof obj === 'function') {
|
15746 | return '[function object]';
|
15747 | }
|
15748 |
|
15749 |
|
15750 | return String(obj);
|
15751 | }
|
15752 |
|
15753 | var styleMutationWarning = {};
|
15754 |
|
15755 | function checkAndWarnForMutatedStyle(style1, style2, component) {
|
15756 | if (style1 == null || style2 == null) {
|
15757 | return;
|
15758 | }
|
15759 | if (shallowEqual(style1, style2)) {
|
15760 | return;
|
15761 | }
|
15762 |
|
15763 | var componentName = component._tag;
|
15764 | var owner = component._currentElement._owner;
|
15765 | var ownerName;
|
15766 | if (owner) {
|
15767 | ownerName = owner.getName();
|
15768 | }
|
15769 |
|
15770 | var hash = ownerName + '|' + componentName;
|
15771 |
|
15772 | if (styleMutationWarning.hasOwnProperty(hash)) {
|
15773 | return;
|
15774 | }
|
15775 |
|
15776 | styleMutationWarning[hash] = true;
|
15777 |
|
15778 | process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
|
15779 | }
|
15780 |
|
15781 |
|
15782 |
|
15783 |
|
15784 |
|
15785 | function assertValidProps(component, props) {
|
15786 | if (!props) {
|
15787 | return;
|
15788 | }
|
15789 |
|
15790 | if (voidElementTags[component._tag]) {
|
15791 | !(props.children == null && props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : _prodInvariant('137', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : void 0;
|
15792 | }
|
15793 | if (props.dangerouslySetInnerHTML != null) {
|
15794 | !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
|
15795 | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : _prodInvariant('61') : void 0;
|
15796 | }
|
15797 | if (process.env.NODE_ENV !== 'production') {
|
15798 | process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
|
15799 | process.env.NODE_ENV !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
|
15800 | process.env.NODE_ENV !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
|
15801 | }
|
15802 | !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', getDeclarationErrorAddendum(component)) : _prodInvariant('62', getDeclarationErrorAddendum(component)) : void 0;
|
15803 | }
|
15804 |
|
15805 | function enqueuePutListener(inst, registrationName, listener, transaction) {
|
15806 | if (transaction instanceof ReactServerRenderingTransaction) {
|
15807 | return;
|
15808 | }
|
15809 | if (process.env.NODE_ENV !== 'production') {
|
15810 |
|
15811 |
|
15812 | process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
|
15813 | }
|
15814 | var containerInfo = inst._hostContainerInfo;
|
15815 | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
|
15816 | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
|
15817 | listenTo(registrationName, doc);
|
15818 | transaction.getReactMountReady().enqueue(putListener, {
|
15819 | inst: inst,
|
15820 | registrationName: registrationName,
|
15821 | listener: listener
|
15822 | });
|
15823 | }
|
15824 |
|
15825 | function putListener() {
|
15826 | var listenerToPut = this;
|
15827 | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
|
15828 | }
|
15829 |
|
15830 | function inputPostMount() {
|
15831 | var inst = this;
|
15832 | ReactDOMInput.postMountWrapper(inst);
|
15833 | }
|
15834 |
|
15835 | function textareaPostMount() {
|
15836 | var inst = this;
|
15837 | ReactDOMTextarea.postMountWrapper(inst);
|
15838 | }
|
15839 |
|
15840 | function optionPostMount() {
|
15841 | var inst = this;
|
15842 | ReactDOMOption.postMountWrapper(inst);
|
15843 | }
|
15844 |
|
15845 | var setAndValidateContentChildDev = emptyFunction;
|
15846 | if (process.env.NODE_ENV !== 'production') {
|
15847 | setAndValidateContentChildDev = function (content) {
|
15848 | var hasExistingContent = this._contentDebugID != null;
|
15849 | var debugID = this._debugID;
|
15850 |
|
15851 | var contentDebugID = -debugID;
|
15852 |
|
15853 | if (content == null) {
|
15854 | if (hasExistingContent) {
|
15855 | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
|
15856 | }
|
15857 | this._contentDebugID = null;
|
15858 | return;
|
15859 | }
|
15860 |
|
15861 | validateDOMNesting(null, String(content), this, this._ancestorInfo);
|
15862 | this._contentDebugID = contentDebugID;
|
15863 | if (hasExistingContent) {
|
15864 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
15865 | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
15866 | } else {
|
15867 | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
15868 | ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
15869 | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
15870 | }
|
15871 | };
|
15872 | }
|
15873 |
|
15874 |
|
15875 |
|
15876 | var mediaEvents = {
|
15877 | topAbort: 'abort',
|
15878 | topCanPlay: 'canplay',
|
15879 | topCanPlayThrough: 'canplaythrough',
|
15880 | topDurationChange: 'durationchange',
|
15881 | topEmptied: 'emptied',
|
15882 | topEncrypted: 'encrypted',
|
15883 | topEnded: 'ended',
|
15884 | topError: 'error',
|
15885 | topLoadedData: 'loadeddata',
|
15886 | topLoadedMetadata: 'loadedmetadata',
|
15887 | topLoadStart: 'loadstart',
|
15888 | topPause: 'pause',
|
15889 | topPlay: 'play',
|
15890 | topPlaying: 'playing',
|
15891 | topProgress: 'progress',
|
15892 | topRateChange: 'ratechange',
|
15893 | topSeeked: 'seeked',
|
15894 | topSeeking: 'seeking',
|
15895 | topStalled: 'stalled',
|
15896 | topSuspend: 'suspend',
|
15897 | topTimeUpdate: 'timeupdate',
|
15898 | topVolumeChange: 'volumechange',
|
15899 | topWaiting: 'waiting'
|
15900 | };
|
15901 |
|
15902 | function trackInputValue() {
|
15903 | inputValueTracking.track(this);
|
15904 | }
|
15905 |
|
15906 | function trapBubbledEventsLocal() {
|
15907 | var inst = this;
|
15908 |
|
15909 |
|
15910 | !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
|
15911 | var node = getNode(inst);
|
15912 | !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
|
15913 |
|
15914 | switch (inst._tag) {
|
15915 | case 'iframe':
|
15916 | case 'object':
|
15917 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
15918 | break;
|
15919 | case 'video':
|
15920 | case 'audio':
|
15921 | inst._wrapperState.listeners = [];
|
15922 |
|
15923 | for (var event in mediaEvents) {
|
15924 | if (mediaEvents.hasOwnProperty(event)) {
|
15925 | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
|
15926 | }
|
15927 | }
|
15928 | break;
|
15929 | case 'source':
|
15930 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
|
15931 | break;
|
15932 | case 'img':
|
15933 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
15934 | break;
|
15935 | case 'form':
|
15936 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
|
15937 | break;
|
15938 | case 'input':
|
15939 | case 'select':
|
15940 | case 'textarea':
|
15941 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
|
15942 | break;
|
15943 | }
|
15944 | }
|
15945 |
|
15946 | function postUpdateSelectWrapper() {
|
15947 | ReactDOMSelect.postUpdateWrapper(this);
|
15948 | }
|
15949 |
|
15950 |
|
15951 |
|
15952 |
|
15953 | var omittedCloseTags = {
|
15954 | area: true,
|
15955 | base: true,
|
15956 | br: true,
|
15957 | col: true,
|
15958 | embed: true,
|
15959 | hr: true,
|
15960 | img: true,
|
15961 | input: true,
|
15962 | keygen: true,
|
15963 | link: true,
|
15964 | meta: true,
|
15965 | param: true,
|
15966 | source: true,
|
15967 | track: true,
|
15968 | wbr: true
|
15969 |
|
15970 | };
|
15971 |
|
15972 | var newlineEatingTags = {
|
15973 | listing: true,
|
15974 | pre: true,
|
15975 | textarea: true
|
15976 | };
|
15977 |
|
15978 |
|
15979 |
|
15980 |
|
15981 | var voidElementTags = _assign({
|
15982 | menuitem: true
|
15983 | }, omittedCloseTags);
|
15984 |
|
15985 |
|
15986 |
|
15987 |
|
15988 |
|
15989 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
15990 | var validatedTagCache = {};
|
15991 | var hasOwnProperty = {}.hasOwnProperty;
|
15992 |
|
15993 | function validateDangerousTag(tag) {
|
15994 | if (!hasOwnProperty.call(validatedTagCache, tag)) {
|
15995 | !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
|
15996 | validatedTagCache[tag] = true;
|
15997 | }
|
15998 | }
|
15999 |
|
16000 | function isCustomComponent(tagName, props) {
|
16001 | return tagName.indexOf('-') >= 0 || props.is != null;
|
16002 | }
|
16003 |
|
16004 | var globalIdCounter = 1;
|
16005 |
|
16006 |
|
16007 |
|
16008 |
|
16009 |
|
16010 |
|
16011 |
|
16012 |
|
16013 |
|
16014 |
|
16015 |
|
16016 |
|
16017 |
|
16018 |
|
16019 |
|
16020 | function ReactDOMComponent(element) {
|
16021 | var tag = element.type;
|
16022 | validateDangerousTag(tag);
|
16023 | this._currentElement = element;
|
16024 | this._tag = tag.toLowerCase();
|
16025 | this._namespaceURI = null;
|
16026 | this._renderedChildren = null;
|
16027 | this._previousStyle = null;
|
16028 | this._previousStyleCopy = null;
|
16029 | this._hostNode = null;
|
16030 | this._hostParent = null;
|
16031 | this._rootNodeID = 0;
|
16032 | this._domID = 0;
|
16033 | this._hostContainerInfo = null;
|
16034 | this._wrapperState = null;
|
16035 | this._topLevelWrapper = null;
|
16036 | this._flags = 0;
|
16037 | if (process.env.NODE_ENV !== 'production') {
|
16038 | this._ancestorInfo = null;
|
16039 | setAndValidateContentChildDev.call(this, null);
|
16040 | }
|
16041 | }
|
16042 |
|
16043 | ReactDOMComponent.displayName = 'ReactDOMComponent';
|
16044 |
|
16045 | ReactDOMComponent.Mixin = {
|
16046 | |
16047 |
|
16048 |
|
16049 |
|
16050 |
|
16051 |
|
16052 |
|
16053 |
|
16054 |
|
16055 |
|
16056 |
|
16057 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
16058 | this._rootNodeID = globalIdCounter++;
|
16059 | this._domID = hostContainerInfo._idCounter++;
|
16060 | this._hostParent = hostParent;
|
16061 | this._hostContainerInfo = hostContainerInfo;
|
16062 |
|
16063 | var props = this._currentElement.props;
|
16064 |
|
16065 | switch (this._tag) {
|
16066 | case 'audio':
|
16067 | case 'form':
|
16068 | case 'iframe':
|
16069 | case 'img':
|
16070 | case 'link':
|
16071 | case 'object':
|
16072 | case 'source':
|
16073 | case 'video':
|
16074 | this._wrapperState = {
|
16075 | listeners: null
|
16076 | };
|
16077 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
16078 | break;
|
16079 | case 'input':
|
16080 | ReactDOMInput.mountWrapper(this, props, hostParent);
|
16081 | props = ReactDOMInput.getHostProps(this, props);
|
16082 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
16083 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
16084 | break;
|
16085 | case 'option':
|
16086 | ReactDOMOption.mountWrapper(this, props, hostParent);
|
16087 | props = ReactDOMOption.getHostProps(this, props);
|
16088 | break;
|
16089 | case 'select':
|
16090 | ReactDOMSelect.mountWrapper(this, props, hostParent);
|
16091 | props = ReactDOMSelect.getHostProps(this, props);
|
16092 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
16093 | break;
|
16094 | case 'textarea':
|
16095 | ReactDOMTextarea.mountWrapper(this, props, hostParent);
|
16096 | props = ReactDOMTextarea.getHostProps(this, props);
|
16097 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
16098 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
16099 | break;
|
16100 | }
|
16101 |
|
16102 | assertValidProps(this, props);
|
16103 |
|
16104 |
|
16105 |
|
16106 | var namespaceURI;
|
16107 | var parentTag;
|
16108 | if (hostParent != null) {
|
16109 | namespaceURI = hostParent._namespaceURI;
|
16110 | parentTag = hostParent._tag;
|
16111 | } else if (hostContainerInfo._tag) {
|
16112 | namespaceURI = hostContainerInfo._namespaceURI;
|
16113 | parentTag = hostContainerInfo._tag;
|
16114 | }
|
16115 | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
|
16116 | namespaceURI = DOMNamespaces.html;
|
16117 | }
|
16118 | if (namespaceURI === DOMNamespaces.html) {
|
16119 | if (this._tag === 'svg') {
|
16120 | namespaceURI = DOMNamespaces.svg;
|
16121 | } else if (this._tag === 'math') {
|
16122 | namespaceURI = DOMNamespaces.mathml;
|
16123 | }
|
16124 | }
|
16125 | this._namespaceURI = namespaceURI;
|
16126 |
|
16127 | if (process.env.NODE_ENV !== 'production') {
|
16128 | var parentInfo;
|
16129 | if (hostParent != null) {
|
16130 | parentInfo = hostParent._ancestorInfo;
|
16131 | } else if (hostContainerInfo._tag) {
|
16132 | parentInfo = hostContainerInfo._ancestorInfo;
|
16133 | }
|
16134 | if (parentInfo) {
|
16135 |
|
16136 |
|
16137 | validateDOMNesting(this._tag, null, this, parentInfo);
|
16138 | }
|
16139 | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
|
16140 | }
|
16141 |
|
16142 | var mountImage;
|
16143 | if (transaction.useCreateElement) {
|
16144 | var ownerDocument = hostContainerInfo._ownerDocument;
|
16145 | var el;
|
16146 | if (namespaceURI === DOMNamespaces.html) {
|
16147 | if (this._tag === 'script') {
|
16148 |
|
16149 |
|
16150 | var div = ownerDocument.createElement('div');
|
16151 | var type = this._currentElement.type;
|
16152 | div.innerHTML = '<' + type + '></' + type + '>';
|
16153 | el = div.removeChild(div.firstChild);
|
16154 | } else if (props.is) {
|
16155 | el = ownerDocument.createElement(this._currentElement.type, props.is);
|
16156 | } else {
|
16157 |
|
16158 |
|
16159 |
|
16160 | el = ownerDocument.createElement(this._currentElement.type);
|
16161 | }
|
16162 | } else {
|
16163 | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
|
16164 | }
|
16165 | ReactDOMComponentTree.precacheNode(this, el);
|
16166 | this._flags |= Flags.hasCachedChildNodes;
|
16167 | if (!this._hostParent) {
|
16168 | DOMPropertyOperations.setAttributeForRoot(el);
|
16169 | }
|
16170 | this._updateDOMProperties(null, props, transaction);
|
16171 | var lazyTree = DOMLazyTree(el);
|
16172 | this._createInitialChildren(transaction, props, context, lazyTree);
|
16173 | mountImage = lazyTree;
|
16174 | } else {
|
16175 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
|
16176 | var tagContent = this._createContentMarkup(transaction, props, context);
|
16177 | if (!tagContent && omittedCloseTags[this._tag]) {
|
16178 | mountImage = tagOpen + '/>';
|
16179 | } else {
|
16180 | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
|
16181 | }
|
16182 | }
|
16183 |
|
16184 | switch (this._tag) {
|
16185 | case 'input':
|
16186 | transaction.getReactMountReady().enqueue(inputPostMount, this);
|
16187 | if (props.autoFocus) {
|
16188 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
16189 | }
|
16190 | break;
|
16191 | case 'textarea':
|
16192 | transaction.getReactMountReady().enqueue(textareaPostMount, this);
|
16193 | if (props.autoFocus) {
|
16194 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
16195 | }
|
16196 | break;
|
16197 | case 'select':
|
16198 | if (props.autoFocus) {
|
16199 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
16200 | }
|
16201 | break;
|
16202 | case 'button':
|
16203 | if (props.autoFocus) {
|
16204 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
16205 | }
|
16206 | break;
|
16207 | case 'option':
|
16208 | transaction.getReactMountReady().enqueue(optionPostMount, this);
|
16209 | break;
|
16210 | }
|
16211 |
|
16212 | return mountImage;
|
16213 | },
|
16214 |
|
16215 | |
16216 |
|
16217 |
|
16218 |
|
16219 |
|
16220 |
|
16221 |
|
16222 |
|
16223 |
|
16224 |
|
16225 |
|
16226 |
|
16227 |
|
16228 | _createOpenTagMarkupAndPutListeners: function (transaction, props) {
|
16229 | var ret = '<' + this._currentElement.type;
|
16230 |
|
16231 | for (var propKey in props) {
|
16232 | if (!props.hasOwnProperty(propKey)) {
|
16233 | continue;
|
16234 | }
|
16235 | var propValue = props[propKey];
|
16236 | if (propValue == null) {
|
16237 | continue;
|
16238 | }
|
16239 | if (registrationNameModules.hasOwnProperty(propKey)) {
|
16240 | if (propValue) {
|
16241 | enqueuePutListener(this, propKey, propValue, transaction);
|
16242 | }
|
16243 | } else {
|
16244 | if (propKey === STYLE) {
|
16245 | if (propValue) {
|
16246 | if (process.env.NODE_ENV !== 'production') {
|
16247 |
|
16248 | this._previousStyle = propValue;
|
16249 | }
|
16250 | propValue = this._previousStyleCopy = _assign({}, props.style);
|
16251 | }
|
16252 | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
|
16253 | }
|
16254 | var markup = null;
|
16255 | if (this._tag != null && isCustomComponent(this._tag, props)) {
|
16256 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
16257 | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
|
16258 | }
|
16259 | } else {
|
16260 | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
|
16261 | }
|
16262 | if (markup) {
|
16263 | ret += ' ' + markup;
|
16264 | }
|
16265 | }
|
16266 | }
|
16267 |
|
16268 |
|
16269 |
|
16270 | if (transaction.renderToStaticMarkup) {
|
16271 | return ret;
|
16272 | }
|
16273 |
|
16274 | if (!this._hostParent) {
|
16275 | ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
|
16276 | }
|
16277 | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
|
16278 | return ret;
|
16279 | },
|
16280 |
|
16281 | |
16282 |
|
16283 |
|
16284 |
|
16285 |
|
16286 |
|
16287 |
|
16288 |
|
16289 |
|
16290 | _createContentMarkup: function (transaction, props, context) {
|
16291 | var ret = '';
|
16292 |
|
16293 |
|
16294 | var innerHTML = props.dangerouslySetInnerHTML;
|
16295 | if (innerHTML != null) {
|
16296 | if (innerHTML.__html != null) {
|
16297 | ret = innerHTML.__html;
|
16298 | }
|
16299 | } else {
|
16300 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
16301 | var childrenToUse = contentToUse != null ? null : props.children;
|
16302 | if (contentToUse != null) {
|
16303 |
|
16304 | ret = escapeTextContentForBrowser(contentToUse);
|
16305 | if (process.env.NODE_ENV !== 'production') {
|
16306 | setAndValidateContentChildDev.call(this, contentToUse);
|
16307 | }
|
16308 | } else if (childrenToUse != null) {
|
16309 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
16310 | ret = mountImages.join('');
|
16311 | }
|
16312 | }
|
16313 | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
|
16314 |
|
16315 |
|
16316 |
|
16317 |
|
16318 |
|
16319 |
|
16320 |
|
16321 |
|
16322 |
|
16323 |
|
16324 | return '\n' + ret;
|
16325 | } else {
|
16326 | return ret;
|
16327 | }
|
16328 | },
|
16329 |
|
16330 | _createInitialChildren: function (transaction, props, context, lazyTree) {
|
16331 |
|
16332 | var innerHTML = props.dangerouslySetInnerHTML;
|
16333 | if (innerHTML != null) {
|
16334 | if (innerHTML.__html != null) {
|
16335 | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
|
16336 | }
|
16337 | } else {
|
16338 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
16339 | var childrenToUse = contentToUse != null ? null : props.children;
|
16340 |
|
16341 | if (contentToUse != null) {
|
16342 |
|
16343 |
|
16344 |
|
16345 |
|
16346 | if (contentToUse !== '') {
|
16347 | if (process.env.NODE_ENV !== 'production') {
|
16348 | setAndValidateContentChildDev.call(this, contentToUse);
|
16349 | }
|
16350 | DOMLazyTree.queueText(lazyTree, contentToUse);
|
16351 | }
|
16352 | } else if (childrenToUse != null) {
|
16353 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
16354 | for (var i = 0; i < mountImages.length; i++) {
|
16355 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
|
16356 | }
|
16357 | }
|
16358 | }
|
16359 | },
|
16360 |
|
16361 | |
16362 |
|
16363 |
|
16364 |
|
16365 |
|
16366 |
|
16367 |
|
16368 |
|
16369 | receiveComponent: function (nextElement, transaction, context) {
|
16370 | var prevElement = this._currentElement;
|
16371 | this._currentElement = nextElement;
|
16372 | this.updateComponent(transaction, prevElement, nextElement, context);
|
16373 | },
|
16374 |
|
16375 | |
16376 |
|
16377 |
|
16378 |
|
16379 |
|
16380 |
|
16381 |
|
16382 |
|
16383 |
|
16384 |
|
16385 | updateComponent: function (transaction, prevElement, nextElement, context) {
|
16386 | var lastProps = prevElement.props;
|
16387 | var nextProps = this._currentElement.props;
|
16388 |
|
16389 | switch (this._tag) {
|
16390 | case 'input':
|
16391 | lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
16392 | nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
16393 | break;
|
16394 | case 'option':
|
16395 | lastProps = ReactDOMOption.getHostProps(this, lastProps);
|
16396 | nextProps = ReactDOMOption.getHostProps(this, nextProps);
|
16397 | break;
|
16398 | case 'select':
|
16399 | lastProps = ReactDOMSelect.getHostProps(this, lastProps);
|
16400 | nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
16401 | break;
|
16402 | case 'textarea':
|
16403 | lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
16404 | nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
16405 | break;
|
16406 | }
|
16407 |
|
16408 | assertValidProps(this, nextProps);
|
16409 | this._updateDOMProperties(lastProps, nextProps, transaction);
|
16410 | this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
16411 |
|
16412 | switch (this._tag) {
|
16413 | case 'input':
|
16414 |
|
16415 |
|
16416 |
|
16417 | ReactDOMInput.updateWrapper(this);
|
16418 |
|
16419 |
|
16420 |
|
16421 | inputValueTracking.updateValueIfChanged(this);
|
16422 | break;
|
16423 | case 'textarea':
|
16424 | ReactDOMTextarea.updateWrapper(this);
|
16425 | break;
|
16426 | case 'select':
|
16427 |
|
16428 |
|
16429 | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
16430 | break;
|
16431 | }
|
16432 | },
|
16433 |
|
16434 | |
16435 |
|
16436 |
|
16437 |
|
16438 |
|
16439 |
|
16440 |
|
16441 |
|
16442 |
|
16443 |
|
16444 |
|
16445 |
|
16446 |
|
16447 |
|
16448 |
|
16449 |
|
16450 | _updateDOMProperties: function (lastProps, nextProps, transaction) {
|
16451 | var propKey;
|
16452 | var styleName;
|
16453 | var styleUpdates;
|
16454 | for (propKey in lastProps) {
|
16455 | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
16456 | continue;
|
16457 | }
|
16458 | if (propKey === STYLE) {
|
16459 | var lastStyle = this._previousStyleCopy;
|
16460 | for (styleName in lastStyle) {
|
16461 | if (lastStyle.hasOwnProperty(styleName)) {
|
16462 | styleUpdates = styleUpdates || {};
|
16463 | styleUpdates[styleName] = '';
|
16464 | }
|
16465 | }
|
16466 | this._previousStyleCopy = null;
|
16467 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
16468 | if (lastProps[propKey]) {
|
16469 |
|
16470 |
|
16471 |
|
16472 | deleteListener(this, propKey);
|
16473 | }
|
16474 | } else if (isCustomComponent(this._tag, lastProps)) {
|
16475 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
16476 | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
|
16477 | }
|
16478 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
16479 | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
|
16480 | }
|
16481 | }
|
16482 | for (propKey in nextProps) {
|
16483 | var nextProp = nextProps[propKey];
|
16484 | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
|
16485 | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
16486 | continue;
|
16487 | }
|
16488 | if (propKey === STYLE) {
|
16489 | if (nextProp) {
|
16490 | if (process.env.NODE_ENV !== 'production') {
|
16491 | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
|
16492 | this._previousStyle = nextProp;
|
16493 | }
|
16494 | nextProp = this._previousStyleCopy = _assign({}, nextProp);
|
16495 | } else {
|
16496 | this._previousStyleCopy = null;
|
16497 | }
|
16498 | if (lastProp) {
|
16499 |
|
16500 | for (styleName in lastProp) {
|
16501 | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
16502 | styleUpdates = styleUpdates || {};
|
16503 | styleUpdates[styleName] = '';
|
16504 | }
|
16505 | }
|
16506 |
|
16507 | for (styleName in nextProp) {
|
16508 | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
16509 | styleUpdates = styleUpdates || {};
|
16510 | styleUpdates[styleName] = nextProp[styleName];
|
16511 | }
|
16512 | }
|
16513 | } else {
|
16514 |
|
16515 | styleUpdates = nextProp;
|
16516 | }
|
16517 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
16518 | if (nextProp) {
|
16519 | enqueuePutListener(this, propKey, nextProp, transaction);
|
16520 | } else if (lastProp) {
|
16521 | deleteListener(this, propKey);
|
16522 | }
|
16523 | } else if (isCustomComponent(this._tag, nextProps)) {
|
16524 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
16525 | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
|
16526 | }
|
16527 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
16528 | var node = getNode(this);
|
16529 |
|
16530 |
|
16531 |
|
16532 | if (nextProp != null) {
|
16533 | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
|
16534 | } else {
|
16535 | DOMPropertyOperations.deleteValueForProperty(node, propKey);
|
16536 | }
|
16537 | }
|
16538 | }
|
16539 | if (styleUpdates) {
|
16540 | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
|
16541 | }
|
16542 | },
|
16543 |
|
16544 | |
16545 |
|
16546 |
|
16547 |
|
16548 |
|
16549 |
|
16550 |
|
16551 |
|
16552 |
|
16553 | _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
|
16554 | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
|
16555 | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
|
16556 |
|
16557 | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
|
16558 | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
|
16559 |
|
16560 |
|
16561 | var lastChildren = lastContent != null ? null : lastProps.children;
|
16562 | var nextChildren = nextContent != null ? null : nextProps.children;
|
16563 |
|
16564 |
|
16565 |
|
16566 | var lastHasContentOrHtml = lastContent != null || lastHtml != null;
|
16567 | var nextHasContentOrHtml = nextContent != null || nextHtml != null;
|
16568 | if (lastChildren != null && nextChildren == null) {
|
16569 | this.updateChildren(null, transaction, context);
|
16570 | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
|
16571 | this.updateTextContent('');
|
16572 | if (process.env.NODE_ENV !== 'production') {
|
16573 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
16574 | }
|
16575 | }
|
16576 |
|
16577 | if (nextContent != null) {
|
16578 | if (lastContent !== nextContent) {
|
16579 | this.updateTextContent('' + nextContent);
|
16580 | if (process.env.NODE_ENV !== 'production') {
|
16581 | setAndValidateContentChildDev.call(this, nextContent);
|
16582 | }
|
16583 | }
|
16584 | } else if (nextHtml != null) {
|
16585 | if (lastHtml !== nextHtml) {
|
16586 | this.updateMarkup('' + nextHtml);
|
16587 | }
|
16588 | if (process.env.NODE_ENV !== 'production') {
|
16589 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
16590 | }
|
16591 | } else if (nextChildren != null) {
|
16592 | if (process.env.NODE_ENV !== 'production') {
|
16593 | setAndValidateContentChildDev.call(this, null);
|
16594 | }
|
16595 |
|
16596 | this.updateChildren(nextChildren, transaction, context);
|
16597 | }
|
16598 | },
|
16599 |
|
16600 | getHostNode: function () {
|
16601 | return getNode(this);
|
16602 | },
|
16603 |
|
16604 | |
16605 |
|
16606 |
|
16607 |
|
16608 |
|
16609 |
|
16610 | unmountComponent: function (safely) {
|
16611 | switch (this._tag) {
|
16612 | case 'audio':
|
16613 | case 'form':
|
16614 | case 'iframe':
|
16615 | case 'img':
|
16616 | case 'link':
|
16617 | case 'object':
|
16618 | case 'source':
|
16619 | case 'video':
|
16620 | var listeners = this._wrapperState.listeners;
|
16621 | if (listeners) {
|
16622 | for (var i = 0; i < listeners.length; i++) {
|
16623 | listeners[i].remove();
|
16624 | }
|
16625 | }
|
16626 | break;
|
16627 | case 'input':
|
16628 | case 'textarea':
|
16629 | inputValueTracking.stopTracking(this);
|
16630 | break;
|
16631 | case 'html':
|
16632 | case 'head':
|
16633 | case 'body':
|
16634 | |
16635 |
|
16636 |
|
16637 |
|
16638 |
|
16639 |
|
16640 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.', this._tag) : _prodInvariant('66', this._tag) : void 0;
|
16641 | break;
|
16642 | }
|
16643 |
|
16644 | this.unmountChildren(safely);
|
16645 | ReactDOMComponentTree.uncacheNode(this);
|
16646 | EventPluginHub.deleteAllListeners(this);
|
16647 | this._rootNodeID = 0;
|
16648 | this._domID = 0;
|
16649 | this._wrapperState = null;
|
16650 |
|
16651 | if (process.env.NODE_ENV !== 'production') {
|
16652 | setAndValidateContentChildDev.call(this, null);
|
16653 | }
|
16654 | },
|
16655 |
|
16656 | getPublicInstance: function () {
|
16657 | return getNode(this);
|
16658 | }
|
16659 | };
|
16660 |
|
16661 | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
|
16662 |
|
16663 | module.exports = ReactDOMComponent;
|
16664 |
|
16665 | }),
|
16666 |
|
16667 | (function(module, exports, __webpack_require__) {
|
16668 |
|
16669 | "use strict";
|
16670 |
|
16671 |
|
16672 |
|
16673 |
|
16674 |
|
16675 |
|
16676 |
|
16677 |
|
16678 |
|
16679 |
|
16680 | var validateDOMNesting = __webpack_require__(44);
|
16681 |
|
16682 | var DOC_NODE_TYPE = 9;
|
16683 |
|
16684 | function ReactDOMContainerInfo(topLevelWrapper, node) {
|
16685 | var info = {
|
16686 | _topLevelWrapper: topLevelWrapper,
|
16687 | _idCounter: 1,
|
16688 | _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
|
16689 | _node: node,
|
16690 | _tag: node ? node.nodeName.toLowerCase() : null,
|
16691 | _namespaceURI: node ? node.namespaceURI : null
|
16692 | };
|
16693 | if (process.env.NODE_ENV !== 'production') {
|
16694 | info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
|
16695 | }
|
16696 | return info;
|
16697 | }
|
16698 |
|
16699 | module.exports = ReactDOMContainerInfo;
|
16700 |
|
16701 | }),
|
16702 |
|
16703 | (function(module, exports, __webpack_require__) {
|
16704 |
|
16705 | "use strict";
|
16706 |
|
16707 |
|
16708 |
|
16709 |
|
16710 |
|
16711 |
|
16712 |
|
16713 |
|
16714 |
|
16715 |
|
16716 | var _assign = __webpack_require__(3);
|
16717 |
|
16718 | var DOMLazyTree = __webpack_require__(15);
|
16719 | var ReactDOMComponentTree = __webpack_require__(4);
|
16720 |
|
16721 | var ReactDOMEmptyComponent = function (instantiate) {
|
16722 |
|
16723 | this._currentElement = null;
|
16724 |
|
16725 | this._hostNode = null;
|
16726 | this._hostParent = null;
|
16727 | this._hostContainerInfo = null;
|
16728 | this._domID = 0;
|
16729 | };
|
16730 | _assign(ReactDOMEmptyComponent.prototype, {
|
16731 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
16732 | var domID = hostContainerInfo._idCounter++;
|
16733 | this._domID = domID;
|
16734 | this._hostParent = hostParent;
|
16735 | this._hostContainerInfo = hostContainerInfo;
|
16736 |
|
16737 | var nodeValue = ' react-empty: ' + this._domID + ' ';
|
16738 | if (transaction.useCreateElement) {
|
16739 | var ownerDocument = hostContainerInfo._ownerDocument;
|
16740 | var node = ownerDocument.createComment(nodeValue);
|
16741 | ReactDOMComponentTree.precacheNode(this, node);
|
16742 | return DOMLazyTree(node);
|
16743 | } else {
|
16744 | if (transaction.renderToStaticMarkup) {
|
16745 |
|
16746 |
|
16747 |
|
16748 | return '';
|
16749 | }
|
16750 | return '<!--' + nodeValue + '-->';
|
16751 | }
|
16752 | },
|
16753 | receiveComponent: function () {},
|
16754 | getHostNode: function () {
|
16755 | return ReactDOMComponentTree.getNodeFromInstance(this);
|
16756 | },
|
16757 | unmountComponent: function () {
|
16758 | ReactDOMComponentTree.uncacheNode(this);
|
16759 | }
|
16760 | });
|
16761 |
|
16762 | module.exports = ReactDOMEmptyComponent;
|
16763 |
|
16764 | }),
|
16765 |
|
16766 | (function(module, exports, __webpack_require__) {
|
16767 |
|
16768 | "use strict";
|
16769 |
|
16770 |
|
16771 |
|
16772 |
|
16773 |
|
16774 |
|
16775 |
|
16776 |
|
16777 |
|
16778 |
|
16779 | var DOMChildrenOperations = __webpack_require__(28);
|
16780 | var ReactDOMComponentTree = __webpack_require__(4);
|
16781 |
|
16782 |
|
16783 |
|
16784 |
|
16785 | var ReactDOMIDOperations = {
|
16786 | |
16787 |
|
16788 |
|
16789 |
|
16790 |
|
16791 |
|
16792 | dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
|
16793 | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
|
16794 | DOMChildrenOperations.processUpdates(node, updates);
|
16795 | }
|
16796 | };
|
16797 |
|
16798 | module.exports = ReactDOMIDOperations;
|
16799 |
|
16800 | }),
|
16801 |
|
16802 | (function(module, exports, __webpack_require__) {
|
16803 |
|
16804 | "use strict";
|
16805 |
|
16806 |
|
16807 |
|
16808 |
|
16809 |
|
16810 |
|
16811 |
|
16812 |
|
16813 |
|
16814 |
|
16815 | var _prodInvariant = __webpack_require__(2),
|
16816 | _assign = __webpack_require__(3);
|
16817 |
|
16818 | var DOMPropertyOperations = __webpack_require__(55);
|
16819 | var LinkedValueUtils = __webpack_require__(33);
|
16820 | var ReactDOMComponentTree = __webpack_require__(4);
|
16821 | var ReactUpdates = __webpack_require__(9);
|
16822 |
|
16823 | var invariant = __webpack_require__(0);
|
16824 | var warning = __webpack_require__(1);
|
16825 |
|
16826 | var didWarnValueLink = false;
|
16827 | var didWarnCheckedLink = false;
|
16828 | var didWarnValueDefaultValue = false;
|
16829 | var didWarnCheckedDefaultChecked = false;
|
16830 | var didWarnControlledToUncontrolled = false;
|
16831 | var didWarnUncontrolledToControlled = false;
|
16832 |
|
16833 | function forceUpdateIfMounted() {
|
16834 | if (this._rootNodeID) {
|
16835 |
|
16836 | ReactDOMInput.updateWrapper(this);
|
16837 | }
|
16838 | }
|
16839 |
|
16840 | function isControlled(props) {
|
16841 | var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
16842 | return usesChecked ? props.checked != null : props.value != null;
|
16843 | }
|
16844 |
|
16845 |
|
16846 |
|
16847 |
|
16848 |
|
16849 |
|
16850 |
|
16851 |
|
16852 |
|
16853 |
|
16854 |
|
16855 |
|
16856 |
|
16857 |
|
16858 |
|
16859 |
|
16860 |
|
16861 | var ReactDOMInput = {
|
16862 | getHostProps: function (inst, props) {
|
16863 | var value = LinkedValueUtils.getValue(props);
|
16864 | var checked = LinkedValueUtils.getChecked(props);
|
16865 |
|
16866 | var hostProps = _assign({
|
16867 |
|
16868 |
|
16869 | type: undefined,
|
16870 |
|
16871 |
|
16872 | step: undefined,
|
16873 |
|
16874 |
|
16875 | min: undefined,
|
16876 | max: undefined
|
16877 | }, props, {
|
16878 | defaultChecked: undefined,
|
16879 | defaultValue: undefined,
|
16880 | value: value != null ? value : inst._wrapperState.initialValue,
|
16881 | checked: checked != null ? checked : inst._wrapperState.initialChecked,
|
16882 | onChange: inst._wrapperState.onChange
|
16883 | });
|
16884 |
|
16885 | return hostProps;
|
16886 | },
|
16887 |
|
16888 | mountWrapper: function (inst, props) {
|
16889 | if (process.env.NODE_ENV !== 'production') {
|
16890 | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
|
16891 |
|
16892 | var owner = inst._currentElement._owner;
|
16893 |
|
16894 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
16895 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
16896 | didWarnValueLink = true;
|
16897 | }
|
16898 | if (props.checkedLink !== undefined && !didWarnCheckedLink) {
|
16899 | process.env.NODE_ENV !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
16900 | didWarnCheckedLink = true;
|
16901 | }
|
16902 | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
16903 | process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
16904 | didWarnCheckedDefaultChecked = true;
|
16905 | }
|
16906 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
16907 | process.env.NODE_ENV !== 'production' ? warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
16908 | didWarnValueDefaultValue = true;
|
16909 | }
|
16910 | }
|
16911 |
|
16912 | var defaultValue = props.defaultValue;
|
16913 | inst._wrapperState = {
|
16914 | initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
16915 | initialValue: props.value != null ? props.value : defaultValue,
|
16916 | listeners: null,
|
16917 | onChange: _handleChange.bind(inst),
|
16918 | controlled: isControlled(props)
|
16919 | };
|
16920 | },
|
16921 |
|
16922 | updateWrapper: function (inst) {
|
16923 | var props = inst._currentElement.props;
|
16924 |
|
16925 | if (process.env.NODE_ENV !== 'production') {
|
16926 | var controlled = isControlled(props);
|
16927 | var owner = inst._currentElement._owner;
|
16928 |
|
16929 | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
|
16930 | process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
16931 | didWarnUncontrolledToControlled = true;
|
16932 | }
|
16933 | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
|
16934 | process.env.NODE_ENV !== 'production' ? warning(false, '%s is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', owner && owner.getName() || 'A component', props.type) : void 0;
|
16935 | didWarnControlledToUncontrolled = true;
|
16936 | }
|
16937 | }
|
16938 |
|
16939 |
|
16940 | var checked = props.checked;
|
16941 | if (checked != null) {
|
16942 | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
|
16943 | }
|
16944 |
|
16945 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
16946 | var value = LinkedValueUtils.getValue(props);
|
16947 | if (value != null) {
|
16948 | if (value === 0 && node.value === '') {
|
16949 | node.value = '0';
|
16950 |
|
16951 | } else if (props.type === 'number') {
|
16952 |
|
16953 | var valueAsNumber = parseFloat(node.value, 10) || 0;
|
16954 |
|
16955 | if (
|
16956 |
|
16957 | value != valueAsNumber ||
|
16958 |
|
16959 | value == valueAsNumber && node.value != value) {
|
16960 |
|
16961 |
|
16962 | node.value = '' + value;
|
16963 | }
|
16964 | } else if (node.value !== '' + value) {
|
16965 |
|
16966 |
|
16967 | node.value = '' + value;
|
16968 | }
|
16969 | } else {
|
16970 | if (props.value == null && props.defaultValue != null) {
|
16971 |
|
16972 |
|
16973 |
|
16974 |
|
16975 |
|
16976 |
|
16977 |
|
16978 |
|
16979 | if (node.defaultValue !== '' + props.defaultValue) {
|
16980 | node.defaultValue = '' + props.defaultValue;
|
16981 | }
|
16982 | }
|
16983 | if (props.checked == null && props.defaultChecked != null) {
|
16984 | node.defaultChecked = !!props.defaultChecked;
|
16985 | }
|
16986 | }
|
16987 | },
|
16988 |
|
16989 | postMountWrapper: function (inst) {
|
16990 | var props = inst._currentElement.props;
|
16991 |
|
16992 |
|
16993 |
|
16994 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
16995 |
|
16996 |
|
16997 |
|
16998 |
|
16999 |
|
17000 |
|
17001 |
|
17002 | switch (props.type) {
|
17003 | case 'submit':
|
17004 | case 'reset':
|
17005 | break;
|
17006 | case 'color':
|
17007 | case 'date':
|
17008 | case 'datetime':
|
17009 | case 'datetime-local':
|
17010 | case 'month':
|
17011 | case 'time':
|
17012 | case 'week':
|
17013 |
|
17014 |
|
17015 | node.value = '';
|
17016 | node.value = node.defaultValue;
|
17017 | break;
|
17018 | default:
|
17019 | node.value = node.value;
|
17020 | break;
|
17021 | }
|
17022 |
|
17023 |
|
17024 |
|
17025 |
|
17026 |
|
17027 |
|
17028 | var name = node.name;
|
17029 | if (name !== '') {
|
17030 | node.name = '';
|
17031 | }
|
17032 | node.defaultChecked = !node.defaultChecked;
|
17033 | node.defaultChecked = !node.defaultChecked;
|
17034 | if (name !== '') {
|
17035 | node.name = name;
|
17036 | }
|
17037 | }
|
17038 | };
|
17039 |
|
17040 | function _handleChange(event) {
|
17041 | var props = this._currentElement.props;
|
17042 |
|
17043 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
17044 |
|
17045 |
|
17046 |
|
17047 |
|
17048 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
17049 |
|
17050 | var name = props.name;
|
17051 | if (props.type === 'radio' && name != null) {
|
17052 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
|
17053 | var queryRoot = rootNode;
|
17054 |
|
17055 | while (queryRoot.parentNode) {
|
17056 | queryRoot = queryRoot.parentNode;
|
17057 | }
|
17058 |
|
17059 |
|
17060 |
|
17061 |
|
17062 |
|
17063 |
|
17064 |
|
17065 | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
17066 |
|
17067 | for (var i = 0; i < group.length; i++) {
|
17068 | var otherNode = group[i];
|
17069 | if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
17070 | continue;
|
17071 | }
|
17072 |
|
17073 |
|
17074 |
|
17075 |
|
17076 | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
|
17077 | !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
|
17078 |
|
17079 |
|
17080 |
|
17081 | ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
|
17082 | }
|
17083 | }
|
17084 |
|
17085 | return returnValue;
|
17086 | }
|
17087 |
|
17088 | module.exports = ReactDOMInput;
|
17089 |
|
17090 | }),
|
17091 |
|
17092 | (function(module, exports, __webpack_require__) {
|
17093 |
|
17094 | "use strict";
|
17095 |
|
17096 |
|
17097 |
|
17098 |
|
17099 |
|
17100 |
|
17101 |
|
17102 |
|
17103 |
|
17104 |
|
17105 | var _assign = __webpack_require__(3);
|
17106 |
|
17107 | var React = __webpack_require__(21);
|
17108 | var ReactDOMComponentTree = __webpack_require__(4);
|
17109 | var ReactDOMSelect = __webpack_require__(57);
|
17110 |
|
17111 | var warning = __webpack_require__(1);
|
17112 | var didWarnInvalidOptionChildren = false;
|
17113 |
|
17114 | function flattenChildren(children) {
|
17115 | var content = '';
|
17116 |
|
17117 |
|
17118 |
|
17119 | React.Children.forEach(children, function (child) {
|
17120 | if (child == null) {
|
17121 | return;
|
17122 | }
|
17123 | if (typeof child === 'string' || typeof child === 'number') {
|
17124 | content += child;
|
17125 | } else if (!didWarnInvalidOptionChildren) {
|
17126 | didWarnInvalidOptionChildren = true;
|
17127 | process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
|
17128 | }
|
17129 | });
|
17130 |
|
17131 | return content;
|
17132 | }
|
17133 |
|
17134 |
|
17135 |
|
17136 |
|
17137 | var ReactDOMOption = {
|
17138 | mountWrapper: function (inst, props, hostParent) {
|
17139 |
|
17140 | if (process.env.NODE_ENV !== 'production') {
|
17141 | process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
|
17142 | }
|
17143 |
|
17144 |
|
17145 | var selectValue = null;
|
17146 | if (hostParent != null) {
|
17147 | var selectParent = hostParent;
|
17148 |
|
17149 | if (selectParent._tag === 'optgroup') {
|
17150 | selectParent = selectParent._hostParent;
|
17151 | }
|
17152 |
|
17153 | if (selectParent != null && selectParent._tag === 'select') {
|
17154 | selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
|
17155 | }
|
17156 | }
|
17157 |
|
17158 |
|
17159 |
|
17160 | var selected = null;
|
17161 | if (selectValue != null) {
|
17162 | var value;
|
17163 | if (props.value != null) {
|
17164 | value = props.value + '';
|
17165 | } else {
|
17166 | value = flattenChildren(props.children);
|
17167 | }
|
17168 | selected = false;
|
17169 | if (Array.isArray(selectValue)) {
|
17170 |
|
17171 | for (var i = 0; i < selectValue.length; i++) {
|
17172 | if ('' + selectValue[i] === value) {
|
17173 | selected = true;
|
17174 | break;
|
17175 | }
|
17176 | }
|
17177 | } else {
|
17178 | selected = '' + selectValue === value;
|
17179 | }
|
17180 | }
|
17181 |
|
17182 | inst._wrapperState = { selected: selected };
|
17183 | },
|
17184 |
|
17185 | postMountWrapper: function (inst) {
|
17186 |
|
17187 | var props = inst._currentElement.props;
|
17188 | if (props.value != null) {
|
17189 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
17190 | node.setAttribute('value', props.value);
|
17191 | }
|
17192 | },
|
17193 |
|
17194 | getHostProps: function (inst, props) {
|
17195 | var hostProps = _assign({ selected: undefined, children: undefined }, props);
|
17196 |
|
17197 |
|
17198 |
|
17199 | if (inst._wrapperState.selected != null) {
|
17200 | hostProps.selected = inst._wrapperState.selected;
|
17201 | }
|
17202 |
|
17203 | var content = flattenChildren(props.children);
|
17204 |
|
17205 | if (content) {
|
17206 | hostProps.children = content;
|
17207 | }
|
17208 |
|
17209 | return hostProps;
|
17210 | }
|
17211 | };
|
17212 |
|
17213 | module.exports = ReactDOMOption;
|
17214 |
|
17215 | }),
|
17216 |
|
17217 | (function(module, exports, __webpack_require__) {
|
17218 |
|
17219 | "use strict";
|
17220 |
|
17221 |
|
17222 |
|
17223 |
|
17224 |
|
17225 |
|
17226 |
|
17227 |
|
17228 |
|
17229 |
|
17230 | var ExecutionEnvironment = __webpack_require__(5);
|
17231 |
|
17232 | var getNodeForCharacterOffset = __webpack_require__(184);
|
17233 | var getTextContentAccessor = __webpack_require__(68);
|
17234 |
|
17235 |
|
17236 |
|
17237 |
|
17238 |
|
17239 |
|
17240 | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
|
17241 | return anchorNode === focusNode && anchorOffset === focusOffset;
|
17242 | }
|
17243 |
|
17244 |
|
17245 |
|
17246 |
|
17247 |
|
17248 |
|
17249 |
|
17250 |
|
17251 |
|
17252 |
|
17253 |
|
17254 |
|
17255 |
|
17256 |
|
17257 |
|
17258 | function getIEOffsets(node) {
|
17259 | var selection = document.selection;
|
17260 | var selectedRange = selection.createRange();
|
17261 | var selectedLength = selectedRange.text.length;
|
17262 |
|
17263 |
|
17264 | var fromStart = selectedRange.duplicate();
|
17265 | fromStart.moveToElementText(node);
|
17266 | fromStart.setEndPoint('EndToStart', selectedRange);
|
17267 |
|
17268 | var startOffset = fromStart.text.length;
|
17269 | var endOffset = startOffset + selectedLength;
|
17270 |
|
17271 | return {
|
17272 | start: startOffset,
|
17273 | end: endOffset
|
17274 | };
|
17275 | }
|
17276 |
|
17277 |
|
17278 |
|
17279 |
|
17280 |
|
17281 | function getModernOffsets(node) {
|
17282 | var selection = window.getSelection && window.getSelection();
|
17283 |
|
17284 | if (!selection || selection.rangeCount === 0) {
|
17285 | return null;
|
17286 | }
|
17287 |
|
17288 | var anchorNode = selection.anchorNode;
|
17289 | var anchorOffset = selection.anchorOffset;
|
17290 | var focusNode = selection.focusNode;
|
17291 | var focusOffset = selection.focusOffset;
|
17292 |
|
17293 | var currentRange = selection.getRangeAt(0);
|
17294 |
|
17295 |
|
17296 |
|
17297 |
|
17298 |
|
17299 |
|
17300 |
|
17301 |
|
17302 | try {
|
17303 |
|
17304 | currentRange.startContainer.nodeType;
|
17305 | currentRange.endContainer.nodeType;
|
17306 |
|
17307 | } catch (e) {
|
17308 | return null;
|
17309 | }
|
17310 |
|
17311 |
|
17312 |
|
17313 |
|
17314 | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
17315 |
|
17316 | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
|
17317 |
|
17318 | var tempRange = currentRange.cloneRange();
|
17319 | tempRange.selectNodeContents(node);
|
17320 | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
|
17321 |
|
17322 | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
|
17323 |
|
17324 | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
|
17325 | var end = start + rangeLength;
|
17326 |
|
17327 |
|
17328 | var detectionRange = document.createRange();
|
17329 | detectionRange.setStart(anchorNode, anchorOffset);
|
17330 | detectionRange.setEnd(focusNode, focusOffset);
|
17331 | var isBackward = detectionRange.collapsed;
|
17332 |
|
17333 | return {
|
17334 | start: isBackward ? end : start,
|
17335 | end: isBackward ? start : end
|
17336 | };
|
17337 | }
|
17338 |
|
17339 |
|
17340 |
|
17341 |
|
17342 |
|
17343 | function setIEOffsets(node, offsets) {
|
17344 | var range = document.selection.createRange().duplicate();
|
17345 | var start, end;
|
17346 |
|
17347 | if (offsets.end === undefined) {
|
17348 | start = offsets.start;
|
17349 | end = start;
|
17350 | } else if (offsets.start > offsets.end) {
|
17351 | start = offsets.end;
|
17352 | end = offsets.start;
|
17353 | } else {
|
17354 | start = offsets.start;
|
17355 | end = offsets.end;
|
17356 | }
|
17357 |
|
17358 | range.moveToElementText(node);
|
17359 | range.moveStart('character', start);
|
17360 | range.setEndPoint('EndToStart', range);
|
17361 | range.moveEnd('character', end - start);
|
17362 | range.select();
|
17363 | }
|
17364 |
|
17365 |
|
17366 |
|
17367 |
|
17368 |
|
17369 |
|
17370 |
|
17371 |
|
17372 |
|
17373 |
|
17374 |
|
17375 |
|
17376 |
|
17377 | function setModernOffsets(node, offsets) {
|
17378 | if (!window.getSelection) {
|
17379 | return;
|
17380 | }
|
17381 |
|
17382 | var selection = window.getSelection();
|
17383 | var length = node[getTextContentAccessor()].length;
|
17384 | var start = Math.min(offsets.start, length);
|
17385 | var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
17386 |
|
17387 |
|
17388 |
|
17389 | if (!selection.extend && start > end) {
|
17390 | var temp = end;
|
17391 | end = start;
|
17392 | start = temp;
|
17393 | }
|
17394 |
|
17395 | var startMarker = getNodeForCharacterOffset(node, start);
|
17396 | var endMarker = getNodeForCharacterOffset(node, end);
|
17397 |
|
17398 | if (startMarker && endMarker) {
|
17399 | var range = document.createRange();
|
17400 | range.setStart(startMarker.node, startMarker.offset);
|
17401 | selection.removeAllRanges();
|
17402 |
|
17403 | if (start > end) {
|
17404 | selection.addRange(range);
|
17405 | selection.extend(endMarker.node, endMarker.offset);
|
17406 | } else {
|
17407 | range.setEnd(endMarker.node, endMarker.offset);
|
17408 | selection.addRange(range);
|
17409 | }
|
17410 | }
|
17411 | }
|
17412 |
|
17413 | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
|
17414 |
|
17415 | var ReactDOMSelection = {
|
17416 | |
17417 |
|
17418 |
|
17419 | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
|
17420 |
|
17421 | |
17422 |
|
17423 |
|
17424 |
|
17425 | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
|
17426 | };
|
17427 |
|
17428 | module.exports = ReactDOMSelection;
|
17429 |
|
17430 | }),
|
17431 |
|
17432 | (function(module, exports, __webpack_require__) {
|
17433 |
|
17434 | "use strict";
|
17435 |
|
17436 |
|
17437 |
|
17438 |
|
17439 |
|
17440 |
|
17441 |
|
17442 |
|
17443 |
|
17444 |
|
17445 | var ReactDefaultInjection = __webpack_require__(146);
|
17446 | var ReactServerRendering = __webpack_require__(162);
|
17447 | var ReactVersion = __webpack_require__(164);
|
17448 |
|
17449 | ReactDefaultInjection.inject();
|
17450 |
|
17451 | var ReactDOMServer = {
|
17452 | renderToString: ReactServerRendering.renderToString,
|
17453 | renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
|
17454 | version: ReactVersion
|
17455 | };
|
17456 |
|
17457 | module.exports = ReactDOMServer;
|
17458 |
|
17459 | }),
|
17460 |
|
17461 | (function(module, exports, __webpack_require__) {
|
17462 |
|
17463 | "use strict";
|
17464 |
|
17465 |
|
17466 |
|
17467 |
|
17468 |
|
17469 |
|
17470 |
|
17471 |
|
17472 |
|
17473 |
|
17474 | var _prodInvariant = __webpack_require__(2),
|
17475 | _assign = __webpack_require__(3);
|
17476 |
|
17477 | var DOMChildrenOperations = __webpack_require__(28);
|
17478 | var DOMLazyTree = __webpack_require__(15);
|
17479 | var ReactDOMComponentTree = __webpack_require__(4);
|
17480 |
|
17481 | var escapeTextContentForBrowser = __webpack_require__(25);
|
17482 | var invariant = __webpack_require__(0);
|
17483 | var validateDOMNesting = __webpack_require__(44);
|
17484 |
|
17485 |
|
17486 |
|
17487 |
|
17488 |
|
17489 |
|
17490 |
|
17491 |
|
17492 |
|
17493 |
|
17494 |
|
17495 |
|
17496 |
|
17497 |
|
17498 |
|
17499 |
|
17500 | var ReactDOMTextComponent = function (text) {
|
17501 |
|
17502 | this._currentElement = text;
|
17503 | this._stringText = '' + text;
|
17504 |
|
17505 | this._hostNode = null;
|
17506 | this._hostParent = null;
|
17507 |
|
17508 |
|
17509 | this._domID = 0;
|
17510 | this._mountIndex = 0;
|
17511 | this._closingComment = null;
|
17512 | this._commentNodes = null;
|
17513 | };
|
17514 |
|
17515 | _assign(ReactDOMTextComponent.prototype, {
|
17516 | |
17517 |
|
17518 |
|
17519 |
|
17520 |
|
17521 |
|
17522 |
|
17523 |
|
17524 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
17525 | if (process.env.NODE_ENV !== 'production') {
|
17526 | var parentInfo;
|
17527 | if (hostParent != null) {
|
17528 | parentInfo = hostParent._ancestorInfo;
|
17529 | } else if (hostContainerInfo != null) {
|
17530 | parentInfo = hostContainerInfo._ancestorInfo;
|
17531 | }
|
17532 | if (parentInfo) {
|
17533 |
|
17534 |
|
17535 | validateDOMNesting(null, this._stringText, this, parentInfo);
|
17536 | }
|
17537 | }
|
17538 |
|
17539 | var domID = hostContainerInfo._idCounter++;
|
17540 | var openingValue = ' react-text: ' + domID + ' ';
|
17541 | var closingValue = ' /react-text ';
|
17542 | this._domID = domID;
|
17543 | this._hostParent = hostParent;
|
17544 | if (transaction.useCreateElement) {
|
17545 | var ownerDocument = hostContainerInfo._ownerDocument;
|
17546 | var openingComment = ownerDocument.createComment(openingValue);
|
17547 | var closingComment = ownerDocument.createComment(closingValue);
|
17548 | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
|
17549 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
|
17550 | if (this._stringText) {
|
17551 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
|
17552 | }
|
17553 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
|
17554 | ReactDOMComponentTree.precacheNode(this, openingComment);
|
17555 | this._closingComment = closingComment;
|
17556 | return lazyTree;
|
17557 | } else {
|
17558 | var escapedText = escapeTextContentForBrowser(this._stringText);
|
17559 |
|
17560 | if (transaction.renderToStaticMarkup) {
|
17561 |
|
17562 |
|
17563 |
|
17564 | return escapedText;
|
17565 | }
|
17566 |
|
17567 | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
|
17568 | }
|
17569 | },
|
17570 |
|
17571 | |
17572 |
|
17573 |
|
17574 |
|
17575 |
|
17576 |
|
17577 |
|
17578 | receiveComponent: function (nextText, transaction) {
|
17579 | if (nextText !== this._currentElement) {
|
17580 | this._currentElement = nextText;
|
17581 | var nextStringText = '' + nextText;
|
17582 | if (nextStringText !== this._stringText) {
|
17583 |
|
17584 |
|
17585 |
|
17586 | this._stringText = nextStringText;
|
17587 | var commentNodes = this.getHostNode();
|
17588 | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
|
17589 | }
|
17590 | }
|
17591 | },
|
17592 |
|
17593 | getHostNode: function () {
|
17594 | var hostNode = this._commentNodes;
|
17595 | if (hostNode) {
|
17596 | return hostNode;
|
17597 | }
|
17598 | if (!this._closingComment) {
|
17599 | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
|
17600 | var node = openingComment.nextSibling;
|
17601 | while (true) {
|
17602 | !(node != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
|
17603 | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
|
17604 | this._closingComment = node;
|
17605 | break;
|
17606 | }
|
17607 | node = node.nextSibling;
|
17608 | }
|
17609 | }
|
17610 | hostNode = [this._hostNode, this._closingComment];
|
17611 | this._commentNodes = hostNode;
|
17612 | return hostNode;
|
17613 | },
|
17614 |
|
17615 | unmountComponent: function () {
|
17616 | this._closingComment = null;
|
17617 | this._commentNodes = null;
|
17618 | ReactDOMComponentTree.uncacheNode(this);
|
17619 | }
|
17620 | });
|
17621 |
|
17622 | module.exports = ReactDOMTextComponent;
|
17623 |
|
17624 | }),
|
17625 |
|
17626 | (function(module, exports, __webpack_require__) {
|
17627 |
|
17628 | "use strict";
|
17629 |
|
17630 |
|
17631 |
|
17632 |
|
17633 |
|
17634 |
|
17635 |
|
17636 |
|
17637 |
|
17638 |
|
17639 | var _prodInvariant = __webpack_require__(2),
|
17640 | _assign = __webpack_require__(3);
|
17641 |
|
17642 | var LinkedValueUtils = __webpack_require__(33);
|
17643 | var ReactDOMComponentTree = __webpack_require__(4);
|
17644 | var ReactUpdates = __webpack_require__(9);
|
17645 |
|
17646 | var invariant = __webpack_require__(0);
|
17647 | var warning = __webpack_require__(1);
|
17648 |
|
17649 | var didWarnValueLink = false;
|
17650 | var didWarnValDefaultVal = false;
|
17651 |
|
17652 | function forceUpdateIfMounted() {
|
17653 | if (this._rootNodeID) {
|
17654 |
|
17655 | ReactDOMTextarea.updateWrapper(this);
|
17656 | }
|
17657 | }
|
17658 |
|
17659 |
|
17660 |
|
17661 |
|
17662 |
|
17663 |
|
17664 |
|
17665 |
|
17666 |
|
17667 |
|
17668 |
|
17669 |
|
17670 |
|
17671 |
|
17672 |
|
17673 |
|
17674 | var ReactDOMTextarea = {
|
17675 | getHostProps: function (inst, props) {
|
17676 | !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
|
17677 |
|
17678 |
|
17679 |
|
17680 |
|
17681 |
|
17682 |
|
17683 | var hostProps = _assign({}, props, {
|
17684 | value: undefined,
|
17685 | defaultValue: undefined,
|
17686 | children: '' + inst._wrapperState.initialValue,
|
17687 | onChange: inst._wrapperState.onChange
|
17688 | });
|
17689 |
|
17690 | return hostProps;
|
17691 | },
|
17692 |
|
17693 | mountWrapper: function (inst, props) {
|
17694 | if (process.env.NODE_ENV !== 'production') {
|
17695 | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
|
17696 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
17697 | process.env.NODE_ENV !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
|
17698 | didWarnValueLink = true;
|
17699 | }
|
17700 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
17701 | process.env.NODE_ENV !== 'production' ? warning(false, 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components') : void 0;
|
17702 | didWarnValDefaultVal = true;
|
17703 | }
|
17704 | }
|
17705 |
|
17706 | var value = LinkedValueUtils.getValue(props);
|
17707 | var initialValue = value;
|
17708 |
|
17709 |
|
17710 | if (value == null) {
|
17711 | var defaultValue = props.defaultValue;
|
17712 |
|
17713 | var children = props.children;
|
17714 | if (children != null) {
|
17715 | if (process.env.NODE_ENV !== 'production') {
|
17716 | process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
|
17717 | }
|
17718 | !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
|
17719 | if (Array.isArray(children)) {
|
17720 | !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
|
17721 | children = children[0];
|
17722 | }
|
17723 |
|
17724 | defaultValue = '' + children;
|
17725 | }
|
17726 | if (defaultValue == null) {
|
17727 | defaultValue = '';
|
17728 | }
|
17729 | initialValue = defaultValue;
|
17730 | }
|
17731 |
|
17732 | inst._wrapperState = {
|
17733 | initialValue: '' + initialValue,
|
17734 | listeners: null,
|
17735 | onChange: _handleChange.bind(inst)
|
17736 | };
|
17737 | },
|
17738 |
|
17739 | updateWrapper: function (inst) {
|
17740 | var props = inst._currentElement.props;
|
17741 |
|
17742 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
17743 | var value = LinkedValueUtils.getValue(props);
|
17744 | if (value != null) {
|
17745 |
|
17746 |
|
17747 | var newValue = '' + value;
|
17748 |
|
17749 |
|
17750 | if (newValue !== node.value) {
|
17751 | node.value = newValue;
|
17752 | }
|
17753 | if (props.defaultValue == null) {
|
17754 | node.defaultValue = newValue;
|
17755 | }
|
17756 | }
|
17757 | if (props.defaultValue != null) {
|
17758 | node.defaultValue = props.defaultValue;
|
17759 | }
|
17760 | },
|
17761 |
|
17762 | postMountWrapper: function (inst) {
|
17763 |
|
17764 |
|
17765 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
17766 | var textContent = node.textContent;
|
17767 |
|
17768 |
|
17769 |
|
17770 |
|
17771 |
|
17772 | if (textContent === inst._wrapperState.initialValue) {
|
17773 | node.value = textContent;
|
17774 | }
|
17775 | }
|
17776 | };
|
17777 |
|
17778 | function _handleChange(event) {
|
17779 | var props = this._currentElement.props;
|
17780 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
17781 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
17782 | return returnValue;
|
17783 | }
|
17784 |
|
17785 | module.exports = ReactDOMTextarea;
|
17786 |
|
17787 | }),
|
17788 |
|
17789 | (function(module, exports, __webpack_require__) {
|
17790 |
|
17791 | "use strict";
|
17792 |
|
17793 |
|
17794 |
|
17795 |
|
17796 |
|
17797 |
|
17798 |
|
17799 |
|
17800 |
|
17801 |
|
17802 | var _prodInvariant = __webpack_require__(2);
|
17803 |
|
17804 | var invariant = __webpack_require__(0);
|
17805 |
|
17806 |
|
17807 |
|
17808 |
|
17809 |
|
17810 | function getLowestCommonAncestor(instA, instB) {
|
17811 | !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
17812 | !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
17813 |
|
17814 | var depthA = 0;
|
17815 | for (var tempA = instA; tempA; tempA = tempA._hostParent) {
|
17816 | depthA++;
|
17817 | }
|
17818 | var depthB = 0;
|
17819 | for (var tempB = instB; tempB; tempB = tempB._hostParent) {
|
17820 | depthB++;
|
17821 | }
|
17822 |
|
17823 |
|
17824 | while (depthA - depthB > 0) {
|
17825 | instA = instA._hostParent;
|
17826 | depthA--;
|
17827 | }
|
17828 |
|
17829 |
|
17830 | while (depthB - depthA > 0) {
|
17831 | instB = instB._hostParent;
|
17832 | depthB--;
|
17833 | }
|
17834 |
|
17835 |
|
17836 | var depth = depthA;
|
17837 | while (depth--) {
|
17838 | if (instA === instB) {
|
17839 | return instA;
|
17840 | }
|
17841 | instA = instA._hostParent;
|
17842 | instB = instB._hostParent;
|
17843 | }
|
17844 | return null;
|
17845 | }
|
17846 |
|
17847 |
|
17848 |
|
17849 |
|
17850 | function isAncestor(instA, instB) {
|
17851 | !('_hostNode' in instA) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
17852 | !('_hostNode' in instB) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
17853 |
|
17854 | while (instB) {
|
17855 | if (instB === instA) {
|
17856 | return true;
|
17857 | }
|
17858 | instB = instB._hostParent;
|
17859 | }
|
17860 | return false;
|
17861 | }
|
17862 |
|
17863 |
|
17864 |
|
17865 |
|
17866 | function getParentInstance(inst) {
|
17867 | !('_hostNode' in inst) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
|
17868 |
|
17869 | return inst._hostParent;
|
17870 | }
|
17871 |
|
17872 |
|
17873 |
|
17874 |
|
17875 | function traverseTwoPhase(inst, fn, arg) {
|
17876 | var path = [];
|
17877 | while (inst) {
|
17878 | path.push(inst);
|
17879 | inst = inst._hostParent;
|
17880 | }
|
17881 | var i;
|
17882 | for (i = path.length; i-- > 0;) {
|
17883 | fn(path[i], 'captured', arg);
|
17884 | }
|
17885 | for (i = 0; i < path.length; i++) {
|
17886 | fn(path[i], 'bubbled', arg);
|
17887 | }
|
17888 | }
|
17889 |
|
17890 |
|
17891 |
|
17892 |
|
17893 |
|
17894 |
|
17895 |
|
17896 |
|
17897 | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
17898 | var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
17899 | var pathFrom = [];
|
17900 | while (from && from !== common) {
|
17901 | pathFrom.push(from);
|
17902 | from = from._hostParent;
|
17903 | }
|
17904 | var pathTo = [];
|
17905 | while (to && to !== common) {
|
17906 | pathTo.push(to);
|
17907 | to = to._hostParent;
|
17908 | }
|
17909 | var i;
|
17910 | for (i = 0; i < pathFrom.length; i++) {
|
17911 | fn(pathFrom[i], 'bubbled', argFrom);
|
17912 | }
|
17913 | for (i = pathTo.length; i-- > 0;) {
|
17914 | fn(pathTo[i], 'captured', argTo);
|
17915 | }
|
17916 | }
|
17917 |
|
17918 | module.exports = {
|
17919 | isAncestor: isAncestor,
|
17920 | getLowestCommonAncestor: getLowestCommonAncestor,
|
17921 | getParentInstance: getParentInstance,
|
17922 | traverseTwoPhase: traverseTwoPhase,
|
17923 | traverseEnterLeave: traverseEnterLeave
|
17924 | };
|
17925 |
|
17926 | }),
|
17927 |
|
17928 | (function(module, exports, __webpack_require__) {
|
17929 |
|
17930 | "use strict";
|
17931 |
|
17932 |
|
17933 |
|
17934 |
|
17935 |
|
17936 |
|
17937 |
|
17938 |
|
17939 |
|
17940 |
|
17941 |
|
17942 | var ReactInvalidSetStateWarningHook = __webpack_require__(153);
|
17943 | var ReactHostOperationHistoryHook = __webpack_require__(151);
|
17944 | var ReactComponentTreeHook = __webpack_require__(8);
|
17945 | var ExecutionEnvironment = __webpack_require__(5);
|
17946 |
|
17947 | var performanceNow = __webpack_require__(118);
|
17948 | var warning = __webpack_require__(1);
|
17949 |
|
17950 | var hooks = [];
|
17951 | var didHookThrowForEvent = {};
|
17952 |
|
17953 | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
17954 | try {
|
17955 | fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
17956 | } catch (e) {
|
17957 | process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
|
17958 | didHookThrowForEvent[event] = true;
|
17959 | }
|
17960 | }
|
17961 |
|
17962 | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
|
17963 | for (var i = 0; i < hooks.length; i++) {
|
17964 | var hook = hooks[i];
|
17965 | var fn = hook[event];
|
17966 | if (fn) {
|
17967 | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
17968 | }
|
17969 | }
|
17970 | }
|
17971 |
|
17972 | var isProfiling = false;
|
17973 | var flushHistory = [];
|
17974 | var lifeCycleTimerStack = [];
|
17975 | var currentFlushNesting = 0;
|
17976 | var currentFlushMeasurements = [];
|
17977 | var currentFlushStartTime = 0;
|
17978 | var currentTimerDebugID = null;
|
17979 | var currentTimerStartTime = 0;
|
17980 | var currentTimerNestedFlushDuration = 0;
|
17981 | var currentTimerType = null;
|
17982 |
|
17983 | var lifeCycleTimerHasWarned = false;
|
17984 |
|
17985 | function clearHistory() {
|
17986 | ReactComponentTreeHook.purgeUnmountedComponents();
|
17987 | ReactHostOperationHistoryHook.clearHistory();
|
17988 | }
|
17989 |
|
17990 | function getTreeSnapshot(registeredIDs) {
|
17991 | return registeredIDs.reduce(function (tree, id) {
|
17992 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
17993 | var parentID = ReactComponentTreeHook.getParentID(id);
|
17994 | tree[id] = {
|
17995 | displayName: ReactComponentTreeHook.getDisplayName(id),
|
17996 | text: ReactComponentTreeHook.getText(id),
|
17997 | updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
17998 | childIDs: ReactComponentTreeHook.getChildIDs(id),
|
17999 |
|
18000 | ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
|
18001 | parentID: parentID
|
18002 | };
|
18003 | return tree;
|
18004 | }, {});
|
18005 | }
|
18006 |
|
18007 | function resetMeasurements() {
|
18008 | var previousStartTime = currentFlushStartTime;
|
18009 | var previousMeasurements = currentFlushMeasurements;
|
18010 | var previousOperations = ReactHostOperationHistoryHook.getHistory();
|
18011 |
|
18012 | if (currentFlushNesting === 0) {
|
18013 | currentFlushStartTime = 0;
|
18014 | currentFlushMeasurements = [];
|
18015 | clearHistory();
|
18016 | return;
|
18017 | }
|
18018 |
|
18019 | if (previousMeasurements.length || previousOperations.length) {
|
18020 | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
18021 | flushHistory.push({
|
18022 | duration: performanceNow() - previousStartTime,
|
18023 | measurements: previousMeasurements || [],
|
18024 | operations: previousOperations || [],
|
18025 | treeSnapshot: getTreeSnapshot(registeredIDs)
|
18026 | });
|
18027 | }
|
18028 |
|
18029 | clearHistory();
|
18030 | currentFlushStartTime = performanceNow();
|
18031 | currentFlushMeasurements = [];
|
18032 | }
|
18033 |
|
18034 | function checkDebugID(debugID) {
|
18035 | var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
18036 |
|
18037 | if (allowRoot && debugID === 0) {
|
18038 | return;
|
18039 | }
|
18040 | if (!debugID) {
|
18041 | process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
|
18042 | }
|
18043 | }
|
18044 |
|
18045 | function beginLifeCycleTimer(debugID, timerType) {
|
18046 | if (currentFlushNesting === 0) {
|
18047 | return;
|
18048 | }
|
18049 | if (currentTimerType && !lifeCycleTimerHasWarned) {
|
18050 | process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'Did not expect %s timer to start while %s timer is still in ' + 'progress for %s instance.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
18051 | lifeCycleTimerHasWarned = true;
|
18052 | }
|
18053 | currentTimerStartTime = performanceNow();
|
18054 | currentTimerNestedFlushDuration = 0;
|
18055 | currentTimerDebugID = debugID;
|
18056 | currentTimerType = timerType;
|
18057 | }
|
18058 |
|
18059 | function endLifeCycleTimer(debugID, timerType) {
|
18060 | if (currentFlushNesting === 0) {
|
18061 | return;
|
18062 | }
|
18063 | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
|
18064 | process.env.NODE_ENV !== 'production' ? warning(false, 'There is an internal error in the React performance measurement code. ' + 'We did not expect %s timer to stop while %s timer is still in ' + 'progress for %s instance. Please report this as a bug in React.', timerType, currentTimerType || 'no', debugID === currentTimerDebugID ? 'the same' : 'another') : void 0;
|
18065 | lifeCycleTimerHasWarned = true;
|
18066 | }
|
18067 | if (isProfiling) {
|
18068 | currentFlushMeasurements.push({
|
18069 | timerType: timerType,
|
18070 | instanceID: debugID,
|
18071 | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
18072 | });
|
18073 | }
|
18074 | currentTimerStartTime = 0;
|
18075 | currentTimerNestedFlushDuration = 0;
|
18076 | currentTimerDebugID = null;
|
18077 | currentTimerType = null;
|
18078 | }
|
18079 |
|
18080 | function pauseCurrentLifeCycleTimer() {
|
18081 | var currentTimer = {
|
18082 | startTime: currentTimerStartTime,
|
18083 | nestedFlushStartTime: performanceNow(),
|
18084 | debugID: currentTimerDebugID,
|
18085 | timerType: currentTimerType
|
18086 | };
|
18087 | lifeCycleTimerStack.push(currentTimer);
|
18088 | currentTimerStartTime = 0;
|
18089 | currentTimerNestedFlushDuration = 0;
|
18090 | currentTimerDebugID = null;
|
18091 | currentTimerType = null;
|
18092 | }
|
18093 |
|
18094 | function resumeCurrentLifeCycleTimer() {
|
18095 | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
|
18096 | startTime = _lifeCycleTimerStack$.startTime,
|
18097 | nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
|
18098 | debugID = _lifeCycleTimerStack$.debugID,
|
18099 | timerType = _lifeCycleTimerStack$.timerType;
|
18100 |
|
18101 | var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
18102 | currentTimerStartTime = startTime;
|
18103 | currentTimerNestedFlushDuration += nestedFlushDuration;
|
18104 | currentTimerDebugID = debugID;
|
18105 | currentTimerType = timerType;
|
18106 | }
|
18107 |
|
18108 | var lastMarkTimeStamp = 0;
|
18109 | var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
|
18110 |
|
18111 | function shouldMark(debugID) {
|
18112 | if (!isProfiling || !canUsePerformanceMeasure) {
|
18113 | return false;
|
18114 | }
|
18115 | var element = ReactComponentTreeHook.getElement(debugID);
|
18116 | if (element == null || typeof element !== 'object') {
|
18117 | return false;
|
18118 | }
|
18119 | var isHostElement = typeof element.type === 'string';
|
18120 | if (isHostElement) {
|
18121 | return false;
|
18122 | }
|
18123 | return true;
|
18124 | }
|
18125 |
|
18126 | function markBegin(debugID, markType) {
|
18127 | if (!shouldMark(debugID)) {
|
18128 | return;
|
18129 | }
|
18130 |
|
18131 | var markName = debugID + '::' + markType;
|
18132 | lastMarkTimeStamp = performanceNow();
|
18133 | performance.mark(markName);
|
18134 | }
|
18135 |
|
18136 | function markEnd(debugID, markType) {
|
18137 | if (!shouldMark(debugID)) {
|
18138 | return;
|
18139 | }
|
18140 |
|
18141 | var markName = debugID + '::' + markType;
|
18142 | var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
|
18143 |
|
18144 |
|
18145 |
|
18146 |
|
18147 |
|
18148 |
|
18149 |
|
18150 | var timeStamp = performanceNow();
|
18151 | if (timeStamp - lastMarkTimeStamp > 0.1) {
|
18152 | var measurementName = displayName + ' [' + markType + ']';
|
18153 | performance.measure(measurementName, markName);
|
18154 | }
|
18155 |
|
18156 | performance.clearMarks(markName);
|
18157 | if (measurementName) {
|
18158 | performance.clearMeasures(measurementName);
|
18159 | }
|
18160 | }
|
18161 |
|
18162 | var ReactDebugTool = {
|
18163 | addHook: function (hook) {
|
18164 | hooks.push(hook);
|
18165 | },
|
18166 | removeHook: function (hook) {
|
18167 | for (var i = 0; i < hooks.length; i++) {
|
18168 | if (hooks[i] === hook) {
|
18169 | hooks.splice(i, 1);
|
18170 | i--;
|
18171 | }
|
18172 | }
|
18173 | },
|
18174 | isProfiling: function () {
|
18175 | return isProfiling;
|
18176 | },
|
18177 | beginProfiling: function () {
|
18178 | if (isProfiling) {
|
18179 | return;
|
18180 | }
|
18181 |
|
18182 | isProfiling = true;
|
18183 | flushHistory.length = 0;
|
18184 | resetMeasurements();
|
18185 | ReactDebugTool.addHook(ReactHostOperationHistoryHook);
|
18186 | },
|
18187 | endProfiling: function () {
|
18188 | if (!isProfiling) {
|
18189 | return;
|
18190 | }
|
18191 |
|
18192 | isProfiling = false;
|
18193 | resetMeasurements();
|
18194 | ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
|
18195 | },
|
18196 | getFlushHistory: function () {
|
18197 | return flushHistory;
|
18198 | },
|
18199 | onBeginFlush: function () {
|
18200 | currentFlushNesting++;
|
18201 | resetMeasurements();
|
18202 | pauseCurrentLifeCycleTimer();
|
18203 | emitEvent('onBeginFlush');
|
18204 | },
|
18205 | onEndFlush: function () {
|
18206 | resetMeasurements();
|
18207 | currentFlushNesting--;
|
18208 | resumeCurrentLifeCycleTimer();
|
18209 | emitEvent('onEndFlush');
|
18210 | },
|
18211 | onBeginLifeCycleTimer: function (debugID, timerType) {
|
18212 | checkDebugID(debugID);
|
18213 | emitEvent('onBeginLifeCycleTimer', debugID, timerType);
|
18214 | markBegin(debugID, timerType);
|
18215 | beginLifeCycleTimer(debugID, timerType);
|
18216 | },
|
18217 | onEndLifeCycleTimer: function (debugID, timerType) {
|
18218 | checkDebugID(debugID);
|
18219 | endLifeCycleTimer(debugID, timerType);
|
18220 | markEnd(debugID, timerType);
|
18221 | emitEvent('onEndLifeCycleTimer', debugID, timerType);
|
18222 | },
|
18223 | onBeginProcessingChildContext: function () {
|
18224 | emitEvent('onBeginProcessingChildContext');
|
18225 | },
|
18226 | onEndProcessingChildContext: function () {
|
18227 | emitEvent('onEndProcessingChildContext');
|
18228 | },
|
18229 | onHostOperation: function (operation) {
|
18230 | checkDebugID(operation.instanceID);
|
18231 | emitEvent('onHostOperation', operation);
|
18232 | },
|
18233 | onSetState: function () {
|
18234 | emitEvent('onSetState');
|
18235 | },
|
18236 | onSetChildren: function (debugID, childDebugIDs) {
|
18237 | checkDebugID(debugID);
|
18238 | childDebugIDs.forEach(checkDebugID);
|
18239 | emitEvent('onSetChildren', debugID, childDebugIDs);
|
18240 | },
|
18241 | onBeforeMountComponent: function (debugID, element, parentDebugID) {
|
18242 | checkDebugID(debugID);
|
18243 | checkDebugID(parentDebugID, true);
|
18244 | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
|
18245 | markBegin(debugID, 'mount');
|
18246 | },
|
18247 | onMountComponent: function (debugID) {
|
18248 | checkDebugID(debugID);
|
18249 | markEnd(debugID, 'mount');
|
18250 | emitEvent('onMountComponent', debugID);
|
18251 | },
|
18252 | onBeforeUpdateComponent: function (debugID, element) {
|
18253 | checkDebugID(debugID);
|
18254 | emitEvent('onBeforeUpdateComponent', debugID, element);
|
18255 | markBegin(debugID, 'update');
|
18256 | },
|
18257 | onUpdateComponent: function (debugID) {
|
18258 | checkDebugID(debugID);
|
18259 | markEnd(debugID, 'update');
|
18260 | emitEvent('onUpdateComponent', debugID);
|
18261 | },
|
18262 | onBeforeUnmountComponent: function (debugID) {
|
18263 | checkDebugID(debugID);
|
18264 | emitEvent('onBeforeUnmountComponent', debugID);
|
18265 | markBegin(debugID, 'unmount');
|
18266 | },
|
18267 | onUnmountComponent: function (debugID) {
|
18268 | checkDebugID(debugID);
|
18269 | markEnd(debugID, 'unmount');
|
18270 | emitEvent('onUnmountComponent', debugID);
|
18271 | },
|
18272 | onTestEvent: function () {
|
18273 | emitEvent('onTestEvent');
|
18274 | }
|
18275 | };
|
18276 |
|
18277 |
|
18278 | ReactDebugTool.addDevtool = ReactDebugTool.addHook;
|
18279 | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
|
18280 |
|
18281 | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
|
18282 | ReactDebugTool.addHook(ReactComponentTreeHook);
|
18283 | var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
|
18284 | if (/[?&]react_perf\b/.test(url)) {
|
18285 | ReactDebugTool.beginProfiling();
|
18286 | }
|
18287 |
|
18288 | module.exports = ReactDebugTool;
|
18289 |
|
18290 | }),
|
18291 |
|
18292 | (function(module, exports, __webpack_require__) {
|
18293 |
|
18294 | "use strict";
|
18295 |
|
18296 |
|
18297 |
|
18298 |
|
18299 |
|
18300 |
|
18301 |
|
18302 |
|
18303 |
|
18304 |
|
18305 | var ARIADOMPropertyConfig = __webpack_require__(121);
|
18306 | var BeforeInputEventPlugin = __webpack_require__(123);
|
18307 | var ChangeEventPlugin = __webpack_require__(125);
|
18308 | var DefaultEventPluginOrder = __webpack_require__(127);
|
18309 | var EnterLeaveEventPlugin = __webpack_require__(128);
|
18310 | var HTMLDOMPropertyConfig = __webpack_require__(130);
|
18311 | var ReactComponentBrowserEnvironment = __webpack_require__(132);
|
18312 | var ReactDOMComponent = __webpack_require__(134);
|
18313 | var ReactDOMComponentTree = __webpack_require__(4);
|
18314 | var ReactDOMEmptyComponent = __webpack_require__(136);
|
18315 | var ReactDOMTreeTraversal = __webpack_require__(144);
|
18316 | var ReactDOMTextComponent = __webpack_require__(142);
|
18317 | var ReactDefaultBatchingStrategy = __webpack_require__(58);
|
18318 | var ReactEventListener = __webpack_require__(149);
|
18319 | var ReactInjection = __webpack_require__(152);
|
18320 | var ReactReconcileTransaction = __webpack_require__(159);
|
18321 | var SVGDOMPropertyConfig = __webpack_require__(165);
|
18322 | var SelectEventPlugin = __webpack_require__(166);
|
18323 | var SimpleEventPlugin = __webpack_require__(167);
|
18324 |
|
18325 | var alreadyInjected = false;
|
18326 |
|
18327 | function inject() {
|
18328 | if (alreadyInjected) {
|
18329 |
|
18330 |
|
18331 |
|
18332 | return;
|
18333 | }
|
18334 | alreadyInjected = true;
|
18335 |
|
18336 | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
|
18337 |
|
18338 | |
18339 |
|
18340 |
|
18341 | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
|
18342 | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
|
18343 | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
|
18344 |
|
18345 | |
18346 |
|
18347 |
|
18348 |
|
18349 | ReactInjection.EventPluginHub.injectEventPluginsByName({
|
18350 | SimpleEventPlugin: SimpleEventPlugin,
|
18351 | EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
18352 | ChangeEventPlugin: ChangeEventPlugin,
|
18353 | SelectEventPlugin: SelectEventPlugin,
|
18354 | BeforeInputEventPlugin: BeforeInputEventPlugin
|
18355 | });
|
18356 |
|
18357 | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
|
18358 |
|
18359 | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
|
18360 |
|
18361 | ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
|
18362 | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
|
18363 | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
|
18364 |
|
18365 | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
|
18366 | return new ReactDOMEmptyComponent(instantiate);
|
18367 | });
|
18368 |
|
18369 | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
|
18370 | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
18371 |
|
18372 | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
|
18373 | }
|
18374 |
|
18375 | module.exports = {
|
18376 | inject: inject
|
18377 | };
|
18378 |
|
18379 | }),
|
18380 |
|
18381 | (function(module, exports, __webpack_require__) {
|
18382 |
|
18383 | "use strict";
|
18384 |
|
18385 |
|
18386 |
|
18387 |
|
18388 |
|
18389 |
|
18390 |
|
18391 |
|
18392 |
|
18393 |
|
18394 |
|
18395 |
|
18396 |
|
18397 |
|
18398 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
18399 |
|
18400 | module.exports = REACT_ELEMENT_TYPE;
|
18401 |
|
18402 | }),
|
18403 |
|
18404 | (function(module, exports, __webpack_require__) {
|
18405 |
|
18406 | "use strict";
|
18407 |
|
18408 |
|
18409 |
|
18410 |
|
18411 |
|
18412 |
|
18413 |
|
18414 |
|
18415 |
|
18416 |
|
18417 | var EventPluginHub = __webpack_require__(17);
|
18418 |
|
18419 | function runEventQueueInBatch(events) {
|
18420 | EventPluginHub.enqueueEvents(events);
|
18421 | EventPluginHub.processEventQueue(false);
|
18422 | }
|
18423 |
|
18424 | var ReactEventEmitterMixin = {
|
18425 | |
18426 |
|
18427 |
|
18428 |
|
18429 | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
18430 | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
18431 | runEventQueueInBatch(events);
|
18432 | }
|
18433 | };
|
18434 |
|
18435 | module.exports = ReactEventEmitterMixin;
|
18436 |
|
18437 | }),
|
18438 |
|
18439 | (function(module, exports, __webpack_require__) {
|
18440 |
|
18441 | "use strict";
|
18442 |
|
18443 |
|
18444 |
|
18445 |
|
18446 |
|
18447 |
|
18448 |
|
18449 |
|
18450 |
|
18451 |
|
18452 | var _assign = __webpack_require__(3);
|
18453 |
|
18454 | var EventListener = __webpack_require__(48);
|
18455 | var ExecutionEnvironment = __webpack_require__(5);
|
18456 | var PooledClass = __webpack_require__(12);
|
18457 | var ReactDOMComponentTree = __webpack_require__(4);
|
18458 | var ReactUpdates = __webpack_require__(9);
|
18459 |
|
18460 | var getEventTarget = __webpack_require__(41);
|
18461 | var getUnboundedScrollPosition = __webpack_require__(111);
|
18462 |
|
18463 |
|
18464 |
|
18465 |
|
18466 |
|
18467 |
|
18468 | function findParent(inst) {
|
18469 |
|
18470 |
|
18471 |
|
18472 | while (inst._hostParent) {
|
18473 | inst = inst._hostParent;
|
18474 | }
|
18475 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
|
18476 | var container = rootNode.parentNode;
|
18477 | return ReactDOMComponentTree.getClosestInstanceFromNode(container);
|
18478 | }
|
18479 |
|
18480 |
|
18481 | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
|
18482 | this.topLevelType = topLevelType;
|
18483 | this.nativeEvent = nativeEvent;
|
18484 | this.ancestors = [];
|
18485 | }
|
18486 | _assign(TopLevelCallbackBookKeeping.prototype, {
|
18487 | destructor: function () {
|
18488 | this.topLevelType = null;
|
18489 | this.nativeEvent = null;
|
18490 | this.ancestors.length = 0;
|
18491 | }
|
18492 | });
|
18493 | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
|
18494 |
|
18495 | function handleTopLevelImpl(bookKeeping) {
|
18496 | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
|
18497 | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
|
18498 |
|
18499 |
|
18500 |
|
18501 |
|
18502 |
|
18503 | var ancestor = targetInst;
|
18504 | do {
|
18505 | bookKeeping.ancestors.push(ancestor);
|
18506 | ancestor = ancestor && findParent(ancestor);
|
18507 | } while (ancestor);
|
18508 |
|
18509 | for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
18510 | targetInst = bookKeeping.ancestors[i];
|
18511 | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
18512 | }
|
18513 | }
|
18514 |
|
18515 | function scrollValueMonitor(cb) {
|
18516 | var scrollPosition = getUnboundedScrollPosition(window);
|
18517 | cb(scrollPosition);
|
18518 | }
|
18519 |
|
18520 | var ReactEventListener = {
|
18521 | _enabled: true,
|
18522 | _handleTopLevel: null,
|
18523 |
|
18524 | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
|
18525 |
|
18526 | setHandleTopLevel: function (handleTopLevel) {
|
18527 | ReactEventListener._handleTopLevel = handleTopLevel;
|
18528 | },
|
18529 |
|
18530 | setEnabled: function (enabled) {
|
18531 | ReactEventListener._enabled = !!enabled;
|
18532 | },
|
18533 |
|
18534 | isEnabled: function () {
|
18535 | return ReactEventListener._enabled;
|
18536 | },
|
18537 |
|
18538 | |
18539 |
|
18540 |
|
18541 |
|
18542 |
|
18543 |
|
18544 |
|
18545 |
|
18546 |
|
18547 |
|
18548 | trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
|
18549 | if (!element) {
|
18550 | return null;
|
18551 | }
|
18552 | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
18553 | },
|
18554 |
|
18555 | |
18556 |
|
18557 |
|
18558 |
|
18559 |
|
18560 |
|
18561 |
|
18562 |
|
18563 |
|
18564 |
|
18565 | trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
|
18566 | if (!element) {
|
18567 | return null;
|
18568 | }
|
18569 | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
18570 | },
|
18571 |
|
18572 | monitorScrollValue: function (refresh) {
|
18573 | var callback = scrollValueMonitor.bind(null, refresh);
|
18574 | EventListener.listen(window, 'scroll', callback);
|
18575 | },
|
18576 |
|
18577 | dispatchEvent: function (topLevelType, nativeEvent) {
|
18578 | if (!ReactEventListener._enabled) {
|
18579 | return;
|
18580 | }
|
18581 |
|
18582 | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
|
18583 | try {
|
18584 |
|
18585 |
|
18586 | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
|
18587 | } finally {
|
18588 | TopLevelCallbackBookKeeping.release(bookKeeping);
|
18589 | }
|
18590 | }
|
18591 | };
|
18592 |
|
18593 | module.exports = ReactEventListener;
|
18594 |
|
18595 | }),
|
18596 |
|
18597 | (function(module, exports, __webpack_require__) {
|
18598 |
|
18599 | "use strict";
|
18600 |
|
18601 |
|
18602 |
|
18603 |
|
18604 |
|
18605 |
|
18606 |
|
18607 |
|
18608 |
|
18609 |
|
18610 |
|
18611 | var ReactFeatureFlags = {
|
18612 |
|
18613 |
|
18614 |
|
18615 | logTopLevelRenders: false
|
18616 | };
|
18617 |
|
18618 | module.exports = ReactFeatureFlags;
|
18619 |
|
18620 | }),
|
18621 |
|
18622 | (function(module, exports, __webpack_require__) {
|
18623 |
|
18624 | "use strict";
|
18625 |
|
18626 |
|
18627 |
|
18628 |
|
18629 |
|
18630 |
|
18631 |
|
18632 |
|
18633 |
|
18634 |
|
18635 |
|
18636 | var history = [];
|
18637 |
|
18638 | var ReactHostOperationHistoryHook = {
|
18639 | onHostOperation: function (operation) {
|
18640 | history.push(operation);
|
18641 | },
|
18642 | clearHistory: function () {
|
18643 | if (ReactHostOperationHistoryHook._preventClearing) {
|
18644 |
|
18645 | return;
|
18646 | }
|
18647 |
|
18648 | history = [];
|
18649 | },
|
18650 | getHistory: function () {
|
18651 | return history;
|
18652 | }
|
18653 | };
|
18654 |
|
18655 | module.exports = ReactHostOperationHistoryHook;
|
18656 |
|
18657 | }),
|
18658 |
|
18659 | (function(module, exports, __webpack_require__) {
|
18660 |
|
18661 | "use strict";
|
18662 |
|
18663 |
|
18664 |
|
18665 |
|
18666 |
|
18667 |
|
18668 |
|
18669 |
|
18670 |
|
18671 |
|
18672 | var DOMProperty = __webpack_require__(16);
|
18673 | var EventPluginHub = __webpack_require__(17);
|
18674 | var EventPluginUtils = __webpack_require__(31);
|
18675 | var ReactComponentEnvironment = __webpack_require__(35);
|
18676 | var ReactEmptyComponent = __webpack_require__(59);
|
18677 | var ReactBrowserEventEmitter = __webpack_require__(34);
|
18678 | var ReactHostComponent = __webpack_require__(60);
|
18679 | var ReactUpdates = __webpack_require__(9);
|
18680 |
|
18681 | var ReactInjection = {
|
18682 | Component: ReactComponentEnvironment.injection,
|
18683 | DOMProperty: DOMProperty.injection,
|
18684 | EmptyComponent: ReactEmptyComponent.injection,
|
18685 | EventPluginHub: EventPluginHub.injection,
|
18686 | EventPluginUtils: EventPluginUtils.injection,
|
18687 | EventEmitter: ReactBrowserEventEmitter.injection,
|
18688 | HostComponent: ReactHostComponent.injection,
|
18689 | Updates: ReactUpdates.injection
|
18690 | };
|
18691 |
|
18692 | module.exports = ReactInjection;
|
18693 |
|
18694 | }),
|
18695 |
|
18696 | (function(module, exports, __webpack_require__) {
|
18697 |
|
18698 | "use strict";
|
18699 |
|
18700 |
|
18701 |
|
18702 |
|
18703 |
|
18704 |
|
18705 |
|
18706 |
|
18707 |
|
18708 |
|
18709 |
|
18710 | var warning = __webpack_require__(1);
|
18711 |
|
18712 | if (process.env.NODE_ENV !== 'production') {
|
18713 | var processingChildContext = false;
|
18714 |
|
18715 | var warnInvalidSetState = function () {
|
18716 | process.env.NODE_ENV !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
|
18717 | };
|
18718 | }
|
18719 |
|
18720 | var ReactInvalidSetStateWarningHook = {
|
18721 | onBeginProcessingChildContext: function () {
|
18722 | processingChildContext = true;
|
18723 | },
|
18724 | onEndProcessingChildContext: function () {
|
18725 | processingChildContext = false;
|
18726 | },
|
18727 | onSetState: function () {
|
18728 | warnInvalidSetState();
|
18729 | }
|
18730 | };
|
18731 |
|
18732 | module.exports = ReactInvalidSetStateWarningHook;
|
18733 |
|
18734 | }),
|
18735 |
|
18736 | (function(module, exports, __webpack_require__) {
|
18737 |
|
18738 | "use strict";
|
18739 |
|
18740 |
|
18741 |
|
18742 |
|
18743 |
|
18744 |
|
18745 |
|
18746 |
|
18747 |
|
18748 |
|
18749 | var adler32 = __webpack_require__(178);
|
18750 |
|
18751 | var TAG_END = /\/?>/;
|
18752 | var COMMENT_START = /^<\!\-\-/;
|
18753 |
|
18754 | var ReactMarkupChecksum = {
|
18755 | CHECKSUM_ATTR_NAME: 'data-react-checksum',
|
18756 |
|
18757 | |
18758 |
|
18759 |
|
18760 |
|
18761 | addChecksumToMarkup: function (markup) {
|
18762 | var checksum = adler32(markup);
|
18763 |
|
18764 |
|
18765 | if (COMMENT_START.test(markup)) {
|
18766 | return markup;
|
18767 | } else {
|
18768 | return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
|
18769 | }
|
18770 | },
|
18771 |
|
18772 | |
18773 |
|
18774 |
|
18775 |
|
18776 |
|
18777 | canReuseMarkup: function (markup, element) {
|
18778 | var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
18779 | existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
|
18780 | var markupChecksum = adler32(markup);
|
18781 | return markupChecksum === existingChecksum;
|
18782 | }
|
18783 | };
|
18784 |
|
18785 | module.exports = ReactMarkupChecksum;
|
18786 |
|
18787 | }),
|
18788 |
|
18789 | (function(module, exports, __webpack_require__) {
|
18790 |
|
18791 | "use strict";
|
18792 |
|
18793 |
|
18794 |
|
18795 |
|
18796 |
|
18797 |
|
18798 |
|
18799 |
|
18800 |
|
18801 |
|
18802 | var _prodInvariant = __webpack_require__(2);
|
18803 |
|
18804 | var ReactComponentEnvironment = __webpack_require__(35);
|
18805 | var ReactInstanceMap = __webpack_require__(37);
|
18806 | var ReactInstrumentation = __webpack_require__(6);
|
18807 |
|
18808 | var ReactCurrentOwner = __webpack_require__(11);
|
18809 | var ReactReconciler = __webpack_require__(19);
|
18810 | var ReactChildReconciler = __webpack_require__(131);
|
18811 |
|
18812 | var emptyFunction = __webpack_require__(7);
|
18813 | var flattenChildren = __webpack_require__(181);
|
18814 | var invariant = __webpack_require__(0);
|
18815 |
|
18816 |
|
18817 |
|
18818 |
|
18819 |
|
18820 |
|
18821 |
|
18822 |
|
18823 | function makeInsertMarkup(markup, afterNode, toIndex) {
|
18824 |
|
18825 | return {
|
18826 | type: 'INSERT_MARKUP',
|
18827 | content: markup,
|
18828 | fromIndex: null,
|
18829 | fromNode: null,
|
18830 | toIndex: toIndex,
|
18831 | afterNode: afterNode
|
18832 | };
|
18833 | }
|
18834 |
|
18835 |
|
18836 |
|
18837 |
|
18838 |
|
18839 |
|
18840 |
|
18841 |
|
18842 | function makeMove(child, afterNode, toIndex) {
|
18843 |
|
18844 | return {
|
18845 | type: 'MOVE_EXISTING',
|
18846 | content: null,
|
18847 | fromIndex: child._mountIndex,
|
18848 | fromNode: ReactReconciler.getHostNode(child),
|
18849 | toIndex: toIndex,
|
18850 | afterNode: afterNode
|
18851 | };
|
18852 | }
|
18853 |
|
18854 |
|
18855 |
|
18856 |
|
18857 |
|
18858 |
|
18859 |
|
18860 | function makeRemove(child, node) {
|
18861 |
|
18862 | return {
|
18863 | type: 'REMOVE_NODE',
|
18864 | content: null,
|
18865 | fromIndex: child._mountIndex,
|
18866 | fromNode: node,
|
18867 | toIndex: null,
|
18868 | afterNode: null
|
18869 | };
|
18870 | }
|
18871 |
|
18872 |
|
18873 |
|
18874 |
|
18875 |
|
18876 |
|
18877 |
|
18878 | function makeSetMarkup(markup) {
|
18879 |
|
18880 | return {
|
18881 | type: 'SET_MARKUP',
|
18882 | content: markup,
|
18883 | fromIndex: null,
|
18884 | fromNode: null,
|
18885 | toIndex: null,
|
18886 | afterNode: null
|
18887 | };
|
18888 | }
|
18889 |
|
18890 |
|
18891 |
|
18892 |
|
18893 |
|
18894 |
|
18895 |
|
18896 | function makeTextContent(textContent) {
|
18897 |
|
18898 | return {
|
18899 | type: 'TEXT_CONTENT',
|
18900 | content: textContent,
|
18901 | fromIndex: null,
|
18902 | fromNode: null,
|
18903 | toIndex: null,
|
18904 | afterNode: null
|
18905 | };
|
18906 | }
|
18907 |
|
18908 |
|
18909 |
|
18910 |
|
18911 |
|
18912 | function enqueue(queue, update) {
|
18913 | if (update) {
|
18914 | queue = queue || [];
|
18915 | queue.push(update);
|
18916 | }
|
18917 | return queue;
|
18918 | }
|
18919 |
|
18920 |
|
18921 |
|
18922 |
|
18923 |
|
18924 |
|
18925 | function processQueue(inst, updateQueue) {
|
18926 | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
|
18927 | }
|
18928 |
|
18929 | var setChildrenForInstrumentation = emptyFunction;
|
18930 | if (process.env.NODE_ENV !== 'production') {
|
18931 | var getDebugID = function (inst) {
|
18932 | if (!inst._debugID) {
|
18933 |
|
18934 | var internal;
|
18935 | if (internal = ReactInstanceMap.get(inst)) {
|
18936 | inst = internal;
|
18937 | }
|
18938 | }
|
18939 | return inst._debugID;
|
18940 | };
|
18941 | setChildrenForInstrumentation = function (children) {
|
18942 | var debugID = getDebugID(this);
|
18943 |
|
18944 |
|
18945 | if (debugID !== 0) {
|
18946 | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
|
18947 | return children[key]._debugID;
|
18948 | }) : []);
|
18949 | }
|
18950 | };
|
18951 | }
|
18952 |
|
18953 |
|
18954 |
|
18955 |
|
18956 |
|
18957 |
|
18958 |
|
18959 | var ReactMultiChild = {
|
18960 | |
18961 |
|
18962 |
|
18963 |
|
18964 |
|
18965 |
|
18966 |
|
18967 | Mixin: {
|
18968 | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
|
18969 | if (process.env.NODE_ENV !== 'production') {
|
18970 | var selfDebugID = getDebugID(this);
|
18971 | if (this._currentElement) {
|
18972 | try {
|
18973 | ReactCurrentOwner.current = this._currentElement._owner;
|
18974 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
|
18975 | } finally {
|
18976 | ReactCurrentOwner.current = null;
|
18977 | }
|
18978 | }
|
18979 | }
|
18980 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
|
18981 | },
|
18982 |
|
18983 | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
|
18984 | var nextChildren;
|
18985 | var selfDebugID = 0;
|
18986 | if (process.env.NODE_ENV !== 'production') {
|
18987 | selfDebugID = getDebugID(this);
|
18988 | if (this._currentElement) {
|
18989 | try {
|
18990 | ReactCurrentOwner.current = this._currentElement._owner;
|
18991 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
18992 | } finally {
|
18993 | ReactCurrentOwner.current = null;
|
18994 | }
|
18995 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
18996 | return nextChildren;
|
18997 | }
|
18998 | }
|
18999 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
19000 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
19001 | return nextChildren;
|
19002 | },
|
19003 |
|
19004 | |
19005 |
|
19006 |
|
19007 |
|
19008 |
|
19009 |
|
19010 |
|
19011 |
|
19012 | mountChildren: function (nestedChildren, transaction, context) {
|
19013 | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
|
19014 | this._renderedChildren = children;
|
19015 |
|
19016 | var mountImages = [];
|
19017 | var index = 0;
|
19018 | for (var name in children) {
|
19019 | if (children.hasOwnProperty(name)) {
|
19020 | var child = children[name];
|
19021 | var selfDebugID = 0;
|
19022 | if (process.env.NODE_ENV !== 'production') {
|
19023 | selfDebugID = getDebugID(this);
|
19024 | }
|
19025 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
19026 | child._mountIndex = index++;
|
19027 | mountImages.push(mountImage);
|
19028 | }
|
19029 | }
|
19030 |
|
19031 | if (process.env.NODE_ENV !== 'production') {
|
19032 | setChildrenForInstrumentation.call(this, children);
|
19033 | }
|
19034 |
|
19035 | return mountImages;
|
19036 | },
|
19037 |
|
19038 | |
19039 |
|
19040 |
|
19041 |
|
19042 |
|
19043 |
|
19044 | updateTextContent: function (nextContent) {
|
19045 | var prevChildren = this._renderedChildren;
|
19046 |
|
19047 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
19048 | for (var name in prevChildren) {
|
19049 | if (prevChildren.hasOwnProperty(name)) {
|
19050 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
19051 | }
|
19052 | }
|
19053 |
|
19054 | var updates = [makeTextContent(nextContent)];
|
19055 | processQueue(this, updates);
|
19056 | },
|
19057 |
|
19058 | |
19059 |
|
19060 |
|
19061 |
|
19062 |
|
19063 |
|
19064 | updateMarkup: function (nextMarkup) {
|
19065 | var prevChildren = this._renderedChildren;
|
19066 |
|
19067 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
19068 | for (var name in prevChildren) {
|
19069 | if (prevChildren.hasOwnProperty(name)) {
|
19070 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
19071 | }
|
19072 | }
|
19073 | var updates = [makeSetMarkup(nextMarkup)];
|
19074 | processQueue(this, updates);
|
19075 | },
|
19076 |
|
19077 | |
19078 |
|
19079 |
|
19080 |
|
19081 |
|
19082 |
|
19083 |
|
19084 | updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
19085 |
|
19086 | this._updateChildren(nextNestedChildrenElements, transaction, context);
|
19087 | },
|
19088 |
|
19089 | |
19090 |
|
19091 |
|
19092 |
|
19093 |
|
19094 |
|
19095 | _updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
19096 | var prevChildren = this._renderedChildren;
|
19097 | var removedNodes = {};
|
19098 | var mountImages = [];
|
19099 | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
|
19100 | if (!nextChildren && !prevChildren) {
|
19101 | return;
|
19102 | }
|
19103 | var updates = null;
|
19104 | var name;
|
19105 |
|
19106 |
|
19107 | var nextIndex = 0;
|
19108 | var lastIndex = 0;
|
19109 |
|
19110 | var nextMountIndex = 0;
|
19111 | var lastPlacedNode = null;
|
19112 | for (name in nextChildren) {
|
19113 | if (!nextChildren.hasOwnProperty(name)) {
|
19114 | continue;
|
19115 | }
|
19116 | var prevChild = prevChildren && prevChildren[name];
|
19117 | var nextChild = nextChildren[name];
|
19118 | if (prevChild === nextChild) {
|
19119 | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
|
19120 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
19121 | prevChild._mountIndex = nextIndex;
|
19122 | } else {
|
19123 | if (prevChild) {
|
19124 |
|
19125 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
19126 |
|
19127 | }
|
19128 |
|
19129 | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
|
19130 | nextMountIndex++;
|
19131 | }
|
19132 | nextIndex++;
|
19133 | lastPlacedNode = ReactReconciler.getHostNode(nextChild);
|
19134 | }
|
19135 |
|
19136 | for (name in removedNodes) {
|
19137 | if (removedNodes.hasOwnProperty(name)) {
|
19138 | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
|
19139 | }
|
19140 | }
|
19141 | if (updates) {
|
19142 | processQueue(this, updates);
|
19143 | }
|
19144 | this._renderedChildren = nextChildren;
|
19145 |
|
19146 | if (process.env.NODE_ENV !== 'production') {
|
19147 | setChildrenForInstrumentation.call(this, nextChildren);
|
19148 | }
|
19149 | },
|
19150 |
|
19151 | |
19152 |
|
19153 |
|
19154 |
|
19155 |
|
19156 |
|
19157 |
|
19158 | unmountChildren: function (safely) {
|
19159 | var renderedChildren = this._renderedChildren;
|
19160 | ReactChildReconciler.unmountChildren(renderedChildren, safely);
|
19161 | this._renderedChildren = null;
|
19162 | },
|
19163 |
|
19164 | |
19165 |
|
19166 |
|
19167 |
|
19168 |
|
19169 |
|
19170 |
|
19171 |
|
19172 | moveChild: function (child, afterNode, toIndex, lastIndex) {
|
19173 |
|
19174 |
|
19175 |
|
19176 | if (child._mountIndex < lastIndex) {
|
19177 | return makeMove(child, afterNode, toIndex);
|
19178 | }
|
19179 | },
|
19180 |
|
19181 | |
19182 |
|
19183 |
|
19184 |
|
19185 |
|
19186 |
|
19187 |
|
19188 | createChild: function (child, afterNode, mountImage) {
|
19189 | return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
|
19190 | },
|
19191 |
|
19192 | |
19193 |
|
19194 |
|
19195 |
|
19196 |
|
19197 |
|
19198 | removeChild: function (child, node) {
|
19199 | return makeRemove(child, node);
|
19200 | },
|
19201 |
|
19202 | |
19203 |
|
19204 |
|
19205 |
|
19206 |
|
19207 |
|
19208 |
|
19209 |
|
19210 |
|
19211 |
|
19212 |
|
19213 | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
|
19214 | child._mountIndex = index;
|
19215 | return this.createChild(child, afterNode, mountImage);
|
19216 | },
|
19217 |
|
19218 | |
19219 |
|
19220 |
|
19221 |
|
19222 |
|
19223 |
|
19224 |
|
19225 |
|
19226 | _unmountChild: function (child, node) {
|
19227 | var update = this.removeChild(child, node);
|
19228 | child._mountIndex = null;
|
19229 | return update;
|
19230 | }
|
19231 | }
|
19232 | };
|
19233 |
|
19234 | module.exports = ReactMultiChild;
|
19235 |
|
19236 | }),
|
19237 |
|
19238 | (function(module, exports, __webpack_require__) {
|
19239 |
|
19240 | "use strict";
|
19241 |
|
19242 |
|
19243 |
|
19244 |
|
19245 |
|
19246 |
|
19247 |
|
19248 |
|
19249 |
|
19250 |
|
19251 |
|
19252 | var _prodInvariant = __webpack_require__(2);
|
19253 |
|
19254 | var React = __webpack_require__(21);
|
19255 |
|
19256 | var invariant = __webpack_require__(0);
|
19257 |
|
19258 | var ReactNodeTypes = {
|
19259 | HOST: 0,
|
19260 | COMPOSITE: 1,
|
19261 | EMPTY: 2,
|
19262 |
|
19263 | getType: function (node) {
|
19264 | if (node === null || node === false) {
|
19265 | return ReactNodeTypes.EMPTY;
|
19266 | } else if (React.isValidElement(node)) {
|
19267 | if (typeof node.type === 'function') {
|
19268 | return ReactNodeTypes.COMPOSITE;
|
19269 | } else {
|
19270 | return ReactNodeTypes.HOST;
|
19271 | }
|
19272 | }
|
19273 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
|
19274 | }
|
19275 | };
|
19276 |
|
19277 | module.exports = ReactNodeTypes;
|
19278 |
|
19279 | }),
|
19280 |
|
19281 | (function(module, exports, __webpack_require__) {
|
19282 |
|
19283 | "use strict";
|
19284 |
|
19285 |
|
19286 |
|
19287 |
|
19288 |
|
19289 |
|
19290 |
|
19291 |
|
19292 |
|
19293 |
|
19294 |
|
19295 | var _prodInvariant = __webpack_require__(2);
|
19296 |
|
19297 | var invariant = __webpack_require__(0);
|
19298 |
|
19299 |
|
19300 |
|
19301 |
|
19302 |
|
19303 |
|
19304 | function isValidOwner(object) {
|
19305 | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
|
19306 | }
|
19307 |
|
19308 |
|
19309 |
|
19310 |
|
19311 |
|
19312 |
|
19313 |
|
19314 |
|
19315 |
|
19316 |
|
19317 |
|
19318 |
|
19319 |
|
19320 |
|
19321 |
|
19322 |
|
19323 |
|
19324 |
|
19325 |
|
19326 |
|
19327 |
|
19328 |
|
19329 |
|
19330 |
|
19331 |
|
19332 |
|
19333 |
|
19334 |
|
19335 |
|
19336 |
|
19337 |
|
19338 | var ReactOwner = {
|
19339 | |
19340 |
|
19341 |
|
19342 |
|
19343 |
|
19344 |
|
19345 |
|
19346 |
|
19347 |
|
19348 | addComponentAsRefTo: function (component, ref, owner) {
|
19349 | !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0;
|
19350 | owner.attachRef(ref, component);
|
19351 | },
|
19352 |
|
19353 | |
19354 |
|
19355 |
|
19356 |
|
19357 |
|
19358 |
|
19359 |
|
19360 |
|
19361 |
|
19362 | removeComponentAsRefFrom: function (component, ref, owner) {
|
19363 | !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0;
|
19364 | var ownerPublicInstance = owner.getPublicInstance();
|
19365 |
|
19366 |
|
19367 | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
|
19368 | owner.detachRef(ref);
|
19369 | }
|
19370 | }
|
19371 | };
|
19372 |
|
19373 | module.exports = ReactOwner;
|
19374 |
|
19375 | }),
|
19376 |
|
19377 | (function(module, exports, __webpack_require__) {
|
19378 |
|
19379 | "use strict";
|
19380 |
|
19381 |
|
19382 |
|
19383 |
|
19384 |
|
19385 |
|
19386 |
|
19387 |
|
19388 |
|
19389 |
|
19390 |
|
19391 | var ReactPropTypeLocationNames = {};
|
19392 |
|
19393 | if (process.env.NODE_ENV !== 'production') {
|
19394 | ReactPropTypeLocationNames = {
|
19395 | prop: 'prop',
|
19396 | context: 'context',
|
19397 | childContext: 'child context'
|
19398 | };
|
19399 | }
|
19400 |
|
19401 | module.exports = ReactPropTypeLocationNames;
|
19402 |
|
19403 | }),
|
19404 |
|
19405 | (function(module, exports, __webpack_require__) {
|
19406 |
|
19407 | "use strict";
|
19408 |
|
19409 |
|
19410 |
|
19411 |
|
19412 |
|
19413 |
|
19414 |
|
19415 |
|
19416 |
|
19417 |
|
19418 | var _assign = __webpack_require__(3);
|
19419 |
|
19420 | var CallbackQueue = __webpack_require__(54);
|
19421 | var PooledClass = __webpack_require__(12);
|
19422 | var ReactBrowserEventEmitter = __webpack_require__(34);
|
19423 | var ReactInputSelection = __webpack_require__(61);
|
19424 | var ReactInstrumentation = __webpack_require__(6);
|
19425 | var Transaction = __webpack_require__(24);
|
19426 | var ReactUpdateQueue = __webpack_require__(64);
|
19427 |
|
19428 |
|
19429 |
|
19430 |
|
19431 |
|
19432 | var SELECTION_RESTORATION = {
|
19433 | |
19434 |
|
19435 |
|
19436 | initialize: ReactInputSelection.getSelectionInformation,
|
19437 | |
19438 |
|
19439 |
|
19440 | close: ReactInputSelection.restoreSelection
|
19441 | };
|
19442 |
|
19443 |
|
19444 |
|
19445 |
|
19446 |
|
19447 |
|
19448 | var EVENT_SUPPRESSION = {
|
19449 | |
19450 |
|
19451 |
|
19452 |
|
19453 | initialize: function () {
|
19454 | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
|
19455 | ReactBrowserEventEmitter.setEnabled(false);
|
19456 | return currentlyEnabled;
|
19457 | },
|
19458 |
|
19459 | |
19460 |
|
19461 |
|
19462 |
|
19463 |
|
19464 | close: function (previouslyEnabled) {
|
19465 | ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
|
19466 | }
|
19467 | };
|
19468 |
|
19469 |
|
19470 |
|
19471 |
|
19472 |
|
19473 | var ON_DOM_READY_QUEUEING = {
|
19474 | |
19475 |
|
19476 |
|
19477 | initialize: function () {
|
19478 | this.reactMountReady.reset();
|
19479 | },
|
19480 |
|
19481 | |
19482 |
|
19483 |
|
19484 | close: function () {
|
19485 | this.reactMountReady.notifyAll();
|
19486 | }
|
19487 | };
|
19488 |
|
19489 |
|
19490 |
|
19491 |
|
19492 |
|
19493 |
|
19494 | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
|
19495 |
|
19496 | if (process.env.NODE_ENV !== 'production') {
|
19497 | TRANSACTION_WRAPPERS.push({
|
19498 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
19499 | close: ReactInstrumentation.debugTool.onEndFlush
|
19500 | });
|
19501 | }
|
19502 |
|
19503 |
|
19504 |
|
19505 |
|
19506 |
|
19507 |
|
19508 |
|
19509 |
|
19510 |
|
19511 |
|
19512 |
|
19513 |
|
19514 |
|
19515 |
|
19516 |
|
19517 | function ReactReconcileTransaction(useCreateElement) {
|
19518 | this.reinitializeTransaction();
|
19519 |
|
19520 |
|
19521 |
|
19522 |
|
19523 |
|
19524 | this.renderToStaticMarkup = false;
|
19525 | this.reactMountReady = CallbackQueue.getPooled(null);
|
19526 | this.useCreateElement = useCreateElement;
|
19527 | }
|
19528 |
|
19529 | var Mixin = {
|
19530 | |
19531 |
|
19532 |
|
19533 |
|
19534 |
|
19535 |
|
19536 |
|
19537 | getTransactionWrappers: function () {
|
19538 | return TRANSACTION_WRAPPERS;
|
19539 | },
|
19540 |
|
19541 | |
19542 |
|
19543 |
|
19544 | getReactMountReady: function () {
|
19545 | return this.reactMountReady;
|
19546 | },
|
19547 |
|
19548 | |
19549 |
|
19550 |
|
19551 | getUpdateQueue: function () {
|
19552 | return ReactUpdateQueue;
|
19553 | },
|
19554 |
|
19555 | |
19556 |
|
19557 |
|
19558 |
|
19559 | checkpoint: function () {
|
19560 |
|
19561 | return this.reactMountReady.checkpoint();
|
19562 | },
|
19563 |
|
19564 | rollback: function (checkpoint) {
|
19565 | this.reactMountReady.rollback(checkpoint);
|
19566 | },
|
19567 |
|
19568 | |
19569 |
|
19570 |
|
19571 |
|
19572 | destructor: function () {
|
19573 | CallbackQueue.release(this.reactMountReady);
|
19574 | this.reactMountReady = null;
|
19575 | }
|
19576 | };
|
19577 |
|
19578 | _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
|
19579 |
|
19580 | PooledClass.addPoolingTo(ReactReconcileTransaction);
|
19581 |
|
19582 | module.exports = ReactReconcileTransaction;
|
19583 |
|
19584 | }),
|
19585 |
|
19586 | (function(module, exports, __webpack_require__) {
|
19587 |
|
19588 | "use strict";
|
19589 |
|
19590 |
|
19591 |
|
19592 |
|
19593 |
|
19594 |
|
19595 |
|
19596 |
|
19597 |
|
19598 |
|
19599 |
|
19600 | var ReactOwner = __webpack_require__(157);
|
19601 |
|
19602 | var ReactRef = {};
|
19603 |
|
19604 | function attachRef(ref, component, owner) {
|
19605 | if (typeof ref === 'function') {
|
19606 | ref(component.getPublicInstance());
|
19607 | } else {
|
19608 |
|
19609 | ReactOwner.addComponentAsRefTo(component, ref, owner);
|
19610 | }
|
19611 | }
|
19612 |
|
19613 | function detachRef(ref, component, owner) {
|
19614 | if (typeof ref === 'function') {
|
19615 | ref(null);
|
19616 | } else {
|
19617 |
|
19618 | ReactOwner.removeComponentAsRefFrom(component, ref, owner);
|
19619 | }
|
19620 | }
|
19621 |
|
19622 | ReactRef.attachRefs = function (instance, element) {
|
19623 | if (element === null || typeof element !== 'object') {
|
19624 | return;
|
19625 | }
|
19626 | var ref = element.ref;
|
19627 | if (ref != null) {
|
19628 | attachRef(ref, instance, element._owner);
|
19629 | }
|
19630 | };
|
19631 |
|
19632 | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
|
19633 |
|
19634 |
|
19635 |
|
19636 |
|
19637 |
|
19638 |
|
19639 |
|
19640 |
|
19641 |
|
19642 |
|
19643 |
|
19644 |
|
19645 | var prevRef = null;
|
19646 | var prevOwner = null;
|
19647 | if (prevElement !== null && typeof prevElement === 'object') {
|
19648 | prevRef = prevElement.ref;
|
19649 | prevOwner = prevElement._owner;
|
19650 | }
|
19651 |
|
19652 | var nextRef = null;
|
19653 | var nextOwner = null;
|
19654 | if (nextElement !== null && typeof nextElement === 'object') {
|
19655 | nextRef = nextElement.ref;
|
19656 | nextOwner = nextElement._owner;
|
19657 | }
|
19658 |
|
19659 | return prevRef !== nextRef ||
|
19660 |
|
19661 | typeof nextRef === 'string' && nextOwner !== prevOwner;
|
19662 | };
|
19663 |
|
19664 | ReactRef.detachRefs = function (instance, element) {
|
19665 | if (element === null || typeof element !== 'object') {
|
19666 | return;
|
19667 | }
|
19668 | var ref = element.ref;
|
19669 | if (ref != null) {
|
19670 | detachRef(ref, instance, element._owner);
|
19671 | }
|
19672 | };
|
19673 |
|
19674 | module.exports = ReactRef;
|
19675 |
|
19676 | }),
|
19677 |
|
19678 | (function(module, exports, __webpack_require__) {
|
19679 |
|
19680 | "use strict";
|
19681 |
|
19682 |
|
19683 |
|
19684 |
|
19685 |
|
19686 |
|
19687 |
|
19688 |
|
19689 |
|
19690 |
|
19691 | var ReactServerBatchingStrategy = {
|
19692 | isBatchingUpdates: false,
|
19693 | batchedUpdates: function (callback) {
|
19694 |
|
19695 |
|
19696 | }
|
19697 | };
|
19698 |
|
19699 | module.exports = ReactServerBatchingStrategy;
|
19700 |
|
19701 | }),
|
19702 |
|
19703 | (function(module, exports, __webpack_require__) {
|
19704 |
|
19705 | "use strict";
|
19706 |
|
19707 |
|
19708 |
|
19709 |
|
19710 |
|
19711 |
|
19712 |
|
19713 |
|
19714 |
|
19715 | var _prodInvariant = __webpack_require__(2);
|
19716 |
|
19717 | var React = __webpack_require__(21);
|
19718 | var ReactDOMContainerInfo = __webpack_require__(135);
|
19719 | var ReactDefaultBatchingStrategy = __webpack_require__(58);
|
19720 | var ReactInstrumentation = __webpack_require__(6);
|
19721 | var ReactMarkupChecksum = __webpack_require__(154);
|
19722 | var ReactReconciler = __webpack_require__(19);
|
19723 | var ReactServerBatchingStrategy = __webpack_require__(161);
|
19724 | var ReactServerRenderingTransaction = __webpack_require__(63);
|
19725 | var ReactUpdates = __webpack_require__(9);
|
19726 |
|
19727 | var emptyObject = __webpack_require__(22);
|
19728 | var instantiateReactComponent = __webpack_require__(70);
|
19729 | var invariant = __webpack_require__(0);
|
19730 |
|
19731 | var pendingTransactions = 0;
|
19732 |
|
19733 |
|
19734 |
|
19735 |
|
19736 |
|
19737 | function renderToStringImpl(element, makeStaticMarkup) {
|
19738 | var transaction;
|
19739 | try {
|
19740 | ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
|
19741 |
|
19742 | transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);
|
19743 |
|
19744 | pendingTransactions++;
|
19745 |
|
19746 | return transaction.perform(function () {
|
19747 | var componentInstance = instantiateReactComponent(element, true);
|
19748 | var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0
|
19749 | );
|
19750 | if (process.env.NODE_ENV !== 'production') {
|
19751 | ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);
|
19752 | }
|
19753 | if (!makeStaticMarkup) {
|
19754 | markup = ReactMarkupChecksum.addChecksumToMarkup(markup);
|
19755 | }
|
19756 | return markup;
|
19757 | }, null);
|
19758 | } finally {
|
19759 | pendingTransactions--;
|
19760 | ReactServerRenderingTransaction.release(transaction);
|
19761 |
|
19762 |
|
19763 | if (!pendingTransactions) {
|
19764 | ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
19765 | }
|
19766 | }
|
19767 | }
|
19768 |
|
19769 |
|
19770 |
|
19771 |
|
19772 |
|
19773 |
|
19774 | function renderToString(element) {
|
19775 | !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;
|
19776 | return renderToStringImpl(element, false);
|
19777 | }
|
19778 |
|
19779 |
|
19780 |
|
19781 |
|
19782 |
|
19783 |
|
19784 | function renderToStaticMarkup(element) {
|
19785 | !React.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;
|
19786 | return renderToStringImpl(element, true);
|
19787 | }
|
19788 |
|
19789 | module.exports = {
|
19790 | renderToString: renderToString,
|
19791 | renderToStaticMarkup: renderToStaticMarkup
|
19792 | };
|
19793 |
|
19794 | }),
|
19795 |
|
19796 | (function(module, exports, __webpack_require__) {
|
19797 |
|
19798 | "use strict";
|
19799 |
|
19800 |
|
19801 |
|
19802 |
|
19803 |
|
19804 |
|
19805 |
|
19806 |
|
19807 |
|
19808 |
|
19809 |
|
19810 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
19811 |
|
19812 | var ReactUpdateQueue = __webpack_require__(64);
|
19813 |
|
19814 | var warning = __webpack_require__(1);
|
19815 |
|
19816 | function warnNoop(publicInstance, callerName) {
|
19817 | if (process.env.NODE_ENV !== 'production') {
|
19818 | var constructor = publicInstance.constructor;
|
19819 | process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass') : void 0;
|
19820 | }
|
19821 | }
|
19822 |
|
19823 | /**
|
19824 | * This is the update queue used for server rendering.
|
19825 | * It delegates to ReactUpdateQueue while server rendering is in progress and
|
19826 | * switches to ReactNoopUpdateQueue after the transaction has completed.
|
19827 | * @class ReactServerUpdateQueue
|
19828 | * @param {Transaction} transaction
|
19829 | */
|
19830 |
|
19831 | var ReactServerUpdateQueue = function () {
|
19832 | function ReactServerUpdateQueue(transaction) {
|
19833 | _classCallCheck(this, ReactServerUpdateQueue);
|
19834 |
|
19835 | this.transaction = transaction;
|
19836 | }
|
19837 |
|
19838 | |
19839 |
|
19840 |
|
19841 |
|
19842 |
|
19843 |
|
19844 |
|
19845 |
|
19846 |
|
19847 | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
|
19848 | return false;
|
19849 | };
|
19850 |
|
19851 | |
19852 |
|
19853 |
|
19854 |
|
19855 |
|
19856 |
|
19857 |
|
19858 |
|
19859 |
|
19860 |
|
19861 | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
|
19862 | if (this.transaction.isInTransaction()) {
|
19863 | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
|
19864 | }
|
19865 | };
|
19866 |
|
19867 | |
19868 |
|
19869 |
|
19870 |
|
19871 |
|
19872 |
|
19873 |
|
19874 |
|
19875 |
|
19876 |
|
19877 |
|
19878 |
|
19879 |
|
19880 |
|
19881 |
|
19882 | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
|
19883 | if (this.transaction.isInTransaction()) {
|
19884 | ReactUpdateQueue.enqueueForceUpdate(publicInstance);
|
19885 | } else {
|
19886 | warnNoop(publicInstance, 'forceUpdate');
|
19887 | }
|
19888 | };
|
19889 |
|
19890 | |
19891 |
|
19892 |
|
19893 |
|
19894 |
|
19895 |
|
19896 |
|
19897 |
|
19898 |
|
19899 |
|
19900 |
|
19901 |
|
19902 |
|
19903 | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
|
19904 | if (this.transaction.isInTransaction()) {
|
19905 | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
|
19906 | } else {
|
19907 | warnNoop(publicInstance, 'replaceState');
|
19908 | }
|
19909 | };
|
19910 |
|
19911 | |
19912 |
|
19913 |
|
19914 |
|
19915 |
|
19916 |
|
19917 |
|
19918 |
|
19919 |
|
19920 |
|
19921 |
|
19922 |
|
19923 | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
|
19924 | if (this.transaction.isInTransaction()) {
|
19925 | ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
|
19926 | } else {
|
19927 | warnNoop(publicInstance, 'setState');
|
19928 | }
|
19929 | };
|
19930 |
|
19931 | return ReactServerUpdateQueue;
|
19932 | }();
|
19933 |
|
19934 | module.exports = ReactServerUpdateQueue;
|
19935 |
|
19936 | }),
|
19937 |
|
19938 | (function(module, exports, __webpack_require__) {
|
19939 |
|
19940 | "use strict";
|
19941 |
|
19942 |
|
19943 |
|
19944 |
|
19945 |
|
19946 |
|
19947 |
|
19948 |
|
19949 |
|
19950 |
|
19951 | module.exports = '15.6.2';
|
19952 |
|
19953 | }),
|
19954 |
|
19955 | (function(module, exports, __webpack_require__) {
|
19956 |
|
19957 | "use strict";
|
19958 |
|
19959 |
|
19960 |
|
19961 |
|
19962 |
|
19963 |
|
19964 |
|
19965 |
|
19966 |
|
19967 |
|
19968 | var NS = {
|
19969 | xlink: 'http://www.w3.org/1999/xlink',
|
19970 | xml: 'http://www.w3.org/XML/1998/namespace'
|
19971 | };
|
19972 |
|
19973 |
|
19974 |
|
19975 |
|
19976 |
|
19977 |
|
19978 |
|
19979 |
|
19980 |
|
19981 |
|
19982 |
|
19983 |
|
19984 |
|
19985 |
|
19986 |
|
19987 |
|
19988 |
|
19989 |
|
19990 | var ATTRS = {
|
19991 | accentHeight: 'accent-height',
|
19992 | accumulate: 0,
|
19993 | additive: 0,
|
19994 | alignmentBaseline: 'alignment-baseline',
|
19995 | allowReorder: 'allowReorder',
|
19996 | alphabetic: 0,
|
19997 | amplitude: 0,
|
19998 | arabicForm: 'arabic-form',
|
19999 | ascent: 0,
|
20000 | attributeName: 'attributeName',
|
20001 | attributeType: 'attributeType',
|
20002 | autoReverse: 'autoReverse',
|
20003 | azimuth: 0,
|
20004 | baseFrequency: 'baseFrequency',
|
20005 | baseProfile: 'baseProfile',
|
20006 | baselineShift: 'baseline-shift',
|
20007 | bbox: 0,
|
20008 | begin: 0,
|
20009 | bias: 0,
|
20010 | by: 0,
|
20011 | calcMode: 'calcMode',
|
20012 | capHeight: 'cap-height',
|
20013 | clip: 0,
|
20014 | clipPath: 'clip-path',
|
20015 | clipRule: 'clip-rule',
|
20016 | clipPathUnits: 'clipPathUnits',
|
20017 | colorInterpolation: 'color-interpolation',
|
20018 | colorInterpolationFilters: 'color-interpolation-filters',
|
20019 | colorProfile: 'color-profile',
|
20020 | colorRendering: 'color-rendering',
|
20021 | contentScriptType: 'contentScriptType',
|
20022 | contentStyleType: 'contentStyleType',
|
20023 | cursor: 0,
|
20024 | cx: 0,
|
20025 | cy: 0,
|
20026 | d: 0,
|
20027 | decelerate: 0,
|
20028 | descent: 0,
|
20029 | diffuseConstant: 'diffuseConstant',
|
20030 | direction: 0,
|
20031 | display: 0,
|
20032 | divisor: 0,
|
20033 | dominantBaseline: 'dominant-baseline',
|
20034 | dur: 0,
|
20035 | dx: 0,
|
20036 | dy: 0,
|
20037 | edgeMode: 'edgeMode',
|
20038 | elevation: 0,
|
20039 | enableBackground: 'enable-background',
|
20040 | end: 0,
|
20041 | exponent: 0,
|
20042 | externalResourcesRequired: 'externalResourcesRequired',
|
20043 | fill: 0,
|
20044 | fillOpacity: 'fill-opacity',
|
20045 | fillRule: 'fill-rule',
|
20046 | filter: 0,
|
20047 | filterRes: 'filterRes',
|
20048 | filterUnits: 'filterUnits',
|
20049 | floodColor: 'flood-color',
|
20050 | floodOpacity: 'flood-opacity',
|
20051 | focusable: 0,
|
20052 | fontFamily: 'font-family',
|
20053 | fontSize: 'font-size',
|
20054 | fontSizeAdjust: 'font-size-adjust',
|
20055 | fontStretch: 'font-stretch',
|
20056 | fontStyle: 'font-style',
|
20057 | fontVariant: 'font-variant',
|
20058 | fontWeight: 'font-weight',
|
20059 | format: 0,
|
20060 | from: 0,
|
20061 | fx: 0,
|
20062 | fy: 0,
|
20063 | g1: 0,
|
20064 | g2: 0,
|
20065 | glyphName: 'glyph-name',
|
20066 | glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
20067 | glyphOrientationVertical: 'glyph-orientation-vertical',
|
20068 | glyphRef: 'glyphRef',
|
20069 | gradientTransform: 'gradientTransform',
|
20070 | gradientUnits: 'gradientUnits',
|
20071 | hanging: 0,
|
20072 | horizAdvX: 'horiz-adv-x',
|
20073 | horizOriginX: 'horiz-origin-x',
|
20074 | ideographic: 0,
|
20075 | imageRendering: 'image-rendering',
|
20076 | 'in': 0,
|
20077 | in2: 0,
|
20078 | intercept: 0,
|
20079 | k: 0,
|
20080 | k1: 0,
|
20081 | k2: 0,
|
20082 | k3: 0,
|
20083 | k4: 0,
|
20084 | kernelMatrix: 'kernelMatrix',
|
20085 | kernelUnitLength: 'kernelUnitLength',
|
20086 | kerning: 0,
|
20087 | keyPoints: 'keyPoints',
|
20088 | keySplines: 'keySplines',
|
20089 | keyTimes: 'keyTimes',
|
20090 | lengthAdjust: 'lengthAdjust',
|
20091 | letterSpacing: 'letter-spacing',
|
20092 | lightingColor: 'lighting-color',
|
20093 | limitingConeAngle: 'limitingConeAngle',
|
20094 | local: 0,
|
20095 | markerEnd: 'marker-end',
|
20096 | markerMid: 'marker-mid',
|
20097 | markerStart: 'marker-start',
|
20098 | markerHeight: 'markerHeight',
|
20099 | markerUnits: 'markerUnits',
|
20100 | markerWidth: 'markerWidth',
|
20101 | mask: 0,
|
20102 | maskContentUnits: 'maskContentUnits',
|
20103 | maskUnits: 'maskUnits',
|
20104 | mathematical: 0,
|
20105 | mode: 0,
|
20106 | numOctaves: 'numOctaves',
|
20107 | offset: 0,
|
20108 | opacity: 0,
|
20109 | operator: 0,
|
20110 | order: 0,
|
20111 | orient: 0,
|
20112 | orientation: 0,
|
20113 | origin: 0,
|
20114 | overflow: 0,
|
20115 | overlinePosition: 'overline-position',
|
20116 | overlineThickness: 'overline-thickness',
|
20117 | paintOrder: 'paint-order',
|
20118 | panose1: 'panose-1',
|
20119 | pathLength: 'pathLength',
|
20120 | patternContentUnits: 'patternContentUnits',
|
20121 | patternTransform: 'patternTransform',
|
20122 | patternUnits: 'patternUnits',
|
20123 | pointerEvents: 'pointer-events',
|
20124 | points: 0,
|
20125 | pointsAtX: 'pointsAtX',
|
20126 | pointsAtY: 'pointsAtY',
|
20127 | pointsAtZ: 'pointsAtZ',
|
20128 | preserveAlpha: 'preserveAlpha',
|
20129 | preserveAspectRatio: 'preserveAspectRatio',
|
20130 | primitiveUnits: 'primitiveUnits',
|
20131 | r: 0,
|
20132 | radius: 0,
|
20133 | refX: 'refX',
|
20134 | refY: 'refY',
|
20135 | renderingIntent: 'rendering-intent',
|
20136 | repeatCount: 'repeatCount',
|
20137 | repeatDur: 'repeatDur',
|
20138 | requiredExtensions: 'requiredExtensions',
|
20139 | requiredFeatures: 'requiredFeatures',
|
20140 | restart: 0,
|
20141 | result: 0,
|
20142 | rotate: 0,
|
20143 | rx: 0,
|
20144 | ry: 0,
|
20145 | scale: 0,
|
20146 | seed: 0,
|
20147 | shapeRendering: 'shape-rendering',
|
20148 | slope: 0,
|
20149 | spacing: 0,
|
20150 | specularConstant: 'specularConstant',
|
20151 | specularExponent: 'specularExponent',
|
20152 | speed: 0,
|
20153 | spreadMethod: 'spreadMethod',
|
20154 | startOffset: 'startOffset',
|
20155 | stdDeviation: 'stdDeviation',
|
20156 | stemh: 0,
|
20157 | stemv: 0,
|
20158 | stitchTiles: 'stitchTiles',
|
20159 | stopColor: 'stop-color',
|
20160 | stopOpacity: 'stop-opacity',
|
20161 | strikethroughPosition: 'strikethrough-position',
|
20162 | strikethroughThickness: 'strikethrough-thickness',
|
20163 | string: 0,
|
20164 | stroke: 0,
|
20165 | strokeDasharray: 'stroke-dasharray',
|
20166 | strokeDashoffset: 'stroke-dashoffset',
|
20167 | strokeLinecap: 'stroke-linecap',
|
20168 | strokeLinejoin: 'stroke-linejoin',
|
20169 | strokeMiterlimit: 'stroke-miterlimit',
|
20170 | strokeOpacity: 'stroke-opacity',
|
20171 | strokeWidth: 'stroke-width',
|
20172 | surfaceScale: 'surfaceScale',
|
20173 | systemLanguage: 'systemLanguage',
|
20174 | tableValues: 'tableValues',
|
20175 | targetX: 'targetX',
|
20176 | targetY: 'targetY',
|
20177 | textAnchor: 'text-anchor',
|
20178 | textDecoration: 'text-decoration',
|
20179 | textRendering: 'text-rendering',
|
20180 | textLength: 'textLength',
|
20181 | to: 0,
|
20182 | transform: 0,
|
20183 | u1: 0,
|
20184 | u2: 0,
|
20185 | underlinePosition: 'underline-position',
|
20186 | underlineThickness: 'underline-thickness',
|
20187 | unicode: 0,
|
20188 | unicodeBidi: 'unicode-bidi',
|
20189 | unicodeRange: 'unicode-range',
|
20190 | unitsPerEm: 'units-per-em',
|
20191 | vAlphabetic: 'v-alphabetic',
|
20192 | vHanging: 'v-hanging',
|
20193 | vIdeographic: 'v-ideographic',
|
20194 | vMathematical: 'v-mathematical',
|
20195 | values: 0,
|
20196 | vectorEffect: 'vector-effect',
|
20197 | version: 0,
|
20198 | vertAdvY: 'vert-adv-y',
|
20199 | vertOriginX: 'vert-origin-x',
|
20200 | vertOriginY: 'vert-origin-y',
|
20201 | viewBox: 'viewBox',
|
20202 | viewTarget: 'viewTarget',
|
20203 | visibility: 0,
|
20204 | widths: 0,
|
20205 | wordSpacing: 'word-spacing',
|
20206 | writingMode: 'writing-mode',
|
20207 | x: 0,
|
20208 | xHeight: 'x-height',
|
20209 | x1: 0,
|
20210 | x2: 0,
|
20211 | xChannelSelector: 'xChannelSelector',
|
20212 | xlinkActuate: 'xlink:actuate',
|
20213 | xlinkArcrole: 'xlink:arcrole',
|
20214 | xlinkHref: 'xlink:href',
|
20215 | xlinkRole: 'xlink:role',
|
20216 | xlinkShow: 'xlink:show',
|
20217 | xlinkTitle: 'xlink:title',
|
20218 | xlinkType: 'xlink:type',
|
20219 | xmlBase: 'xml:base',
|
20220 | xmlns: 0,
|
20221 | xmlnsXlink: 'xmlns:xlink',
|
20222 | xmlLang: 'xml:lang',
|
20223 | xmlSpace: 'xml:space',
|
20224 | y: 0,
|
20225 | y1: 0,
|
20226 | y2: 0,
|
20227 | yChannelSelector: 'yChannelSelector',
|
20228 | z: 0,
|
20229 | zoomAndPan: 'zoomAndPan'
|
20230 | };
|
20231 |
|
20232 | var SVGDOMPropertyConfig = {
|
20233 | Properties: {},
|
20234 | DOMAttributeNamespaces: {
|
20235 | xlinkActuate: NS.xlink,
|
20236 | xlinkArcrole: NS.xlink,
|
20237 | xlinkHref: NS.xlink,
|
20238 | xlinkRole: NS.xlink,
|
20239 | xlinkShow: NS.xlink,
|
20240 | xlinkTitle: NS.xlink,
|
20241 | xlinkType: NS.xlink,
|
20242 | xmlBase: NS.xml,
|
20243 | xmlLang: NS.xml,
|
20244 | xmlSpace: NS.xml
|
20245 | },
|
20246 | DOMAttributeNames: {}
|
20247 | };
|
20248 |
|
20249 | Object.keys(ATTRS).forEach(function (key) {
|
20250 | SVGDOMPropertyConfig.Properties[key] = 0;
|
20251 | if (ATTRS[key]) {
|
20252 | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
20253 | }
|
20254 | });
|
20255 |
|
20256 | module.exports = SVGDOMPropertyConfig;
|
20257 |
|
20258 | }),
|
20259 |
|
20260 | (function(module, exports, __webpack_require__) {
|
20261 |
|
20262 | "use strict";
|
20263 |
|
20264 |
|
20265 |
|
20266 |
|
20267 |
|
20268 |
|
20269 |
|
20270 |
|
20271 |
|
20272 |
|
20273 | var EventPropagators = __webpack_require__(18);
|
20274 | var ExecutionEnvironment = __webpack_require__(5);
|
20275 | var ReactDOMComponentTree = __webpack_require__(4);
|
20276 | var ReactInputSelection = __webpack_require__(61);
|
20277 | var SyntheticEvent = __webpack_require__(10);
|
20278 |
|
20279 | var getActiveElement = __webpack_require__(50);
|
20280 | var isTextInputElement = __webpack_require__(71);
|
20281 | var shallowEqual = __webpack_require__(27);
|
20282 |
|
20283 | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
20284 |
|
20285 | var eventTypes = {
|
20286 | select: {
|
20287 | phasedRegistrationNames: {
|
20288 | bubbled: 'onSelect',
|
20289 | captured: 'onSelectCapture'
|
20290 | },
|
20291 | dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
|
20292 | }
|
20293 | };
|
20294 |
|
20295 | var activeElement = null;
|
20296 | var activeElementInst = null;
|
20297 | var lastSelection = null;
|
20298 | var mouseDown = false;
|
20299 |
|
20300 |
|
20301 |
|
20302 | var hasListener = false;
|
20303 |
|
20304 |
|
20305 |
|
20306 |
|
20307 |
|
20308 |
|
20309 |
|
20310 |
|
20311 |
|
20312 |
|
20313 | function getSelection(node) {
|
20314 | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
|
20315 | return {
|
20316 | start: node.selectionStart,
|
20317 | end: node.selectionEnd
|
20318 | };
|
20319 | } else if (window.getSelection) {
|
20320 | var selection = window.getSelection();
|
20321 | return {
|
20322 | anchorNode: selection.anchorNode,
|
20323 | anchorOffset: selection.anchorOffset,
|
20324 | focusNode: selection.focusNode,
|
20325 | focusOffset: selection.focusOffset
|
20326 | };
|
20327 | } else if (document.selection) {
|
20328 | var range = document.selection.createRange();
|
20329 | return {
|
20330 | parentElement: range.parentElement(),
|
20331 | text: range.text,
|
20332 | top: range.boundingTop,
|
20333 | left: range.boundingLeft
|
20334 | };
|
20335 | }
|
20336 | }
|
20337 |
|
20338 |
|
20339 |
|
20340 |
|
20341 |
|
20342 |
|
20343 |
|
20344 | function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
20345 |
|
20346 |
|
20347 |
|
20348 |
|
20349 | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
|
20350 | return null;
|
20351 | }
|
20352 |
|
20353 |
|
20354 | var currentSelection = getSelection(activeElement);
|
20355 | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
20356 | lastSelection = currentSelection;
|
20357 |
|
20358 | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
|
20359 |
|
20360 | syntheticEvent.type = 'select';
|
20361 | syntheticEvent.target = activeElement;
|
20362 |
|
20363 | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
|
20364 |
|
20365 | return syntheticEvent;
|
20366 | }
|
20367 |
|
20368 | return null;
|
20369 | }
|
20370 |
|
20371 |
|
20372 |
|
20373 |
|
20374 |
|
20375 |
|
20376 |
|
20377 |
|
20378 |
|
20379 |
|
20380 |
|
20381 |
|
20382 |
|
20383 |
|
20384 |
|
20385 | var SelectEventPlugin = {
|
20386 | eventTypes: eventTypes,
|
20387 |
|
20388 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
20389 | if (!hasListener) {
|
20390 | return null;
|
20391 | }
|
20392 |
|
20393 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
20394 |
|
20395 | switch (topLevelType) {
|
20396 |
|
20397 | case 'topFocus':
|
20398 | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
20399 | activeElement = targetNode;
|
20400 | activeElementInst = targetInst;
|
20401 | lastSelection = null;
|
20402 | }
|
20403 | break;
|
20404 | case 'topBlur':
|
20405 | activeElement = null;
|
20406 | activeElementInst = null;
|
20407 | lastSelection = null;
|
20408 | break;
|
20409 |
|
20410 |
|
20411 | case 'topMouseDown':
|
20412 | mouseDown = true;
|
20413 | break;
|
20414 | case 'topContextMenu':
|
20415 | case 'topMouseUp':
|
20416 | mouseDown = false;
|
20417 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
20418 |
|
20419 |
|
20420 |
|
20421 |
|
20422 |
|
20423 |
|
20424 |
|
20425 |
|
20426 |
|
20427 | case 'topSelectionChange':
|
20428 | if (skipSelectionChangeEvent) {
|
20429 | break;
|
20430 | }
|
20431 |
|
20432 | case 'topKeyDown':
|
20433 | case 'topKeyUp':
|
20434 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
20435 | }
|
20436 |
|
20437 | return null;
|
20438 | },
|
20439 |
|
20440 | didPutListener: function (inst, registrationName, listener) {
|
20441 | if (registrationName === 'onSelect') {
|
20442 | hasListener = true;
|
20443 | }
|
20444 | }
|
20445 | };
|
20446 |
|
20447 | module.exports = SelectEventPlugin;
|
20448 |
|
20449 | }),
|
20450 |
|
20451 | (function(module, exports, __webpack_require__) {
|
20452 |
|
20453 | "use strict";
|
20454 |
|
20455 |
|
20456 |
|
20457 |
|
20458 |
|
20459 |
|
20460 |
|
20461 |
|
20462 |
|
20463 |
|
20464 |
|
20465 | var _prodInvariant = __webpack_require__(2);
|
20466 |
|
20467 | var EventListener = __webpack_require__(48);
|
20468 | var EventPropagators = __webpack_require__(18);
|
20469 | var ReactDOMComponentTree = __webpack_require__(4);
|
20470 | var SyntheticAnimationEvent = __webpack_require__(168);
|
20471 | var SyntheticClipboardEvent = __webpack_require__(169);
|
20472 | var SyntheticEvent = __webpack_require__(10);
|
20473 | var SyntheticFocusEvent = __webpack_require__(172);
|
20474 | var SyntheticKeyboardEvent = __webpack_require__(174);
|
20475 | var SyntheticMouseEvent = __webpack_require__(23);
|
20476 | var SyntheticDragEvent = __webpack_require__(171);
|
20477 | var SyntheticTouchEvent = __webpack_require__(175);
|
20478 | var SyntheticTransitionEvent = __webpack_require__(176);
|
20479 | var SyntheticUIEvent = __webpack_require__(20);
|
20480 | var SyntheticWheelEvent = __webpack_require__(177);
|
20481 |
|
20482 | var emptyFunction = __webpack_require__(7);
|
20483 | var getEventCharCode = __webpack_require__(39);
|
20484 | var invariant = __webpack_require__(0);
|
20485 |
|
20486 |
|
20487 |
|
20488 |
|
20489 |
|
20490 |
|
20491 |
|
20492 |
|
20493 |
|
20494 |
|
20495 |
|
20496 |
|
20497 |
|
20498 |
|
20499 |
|
20500 |
|
20501 |
|
20502 |
|
20503 |
|
20504 | var eventTypes = {};
|
20505 | var topLevelEventsToDispatchConfig = {};
|
20506 | ['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'canPlay', 'canPlayThrough', 'click', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {
|
20507 | var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
|
20508 | var onEvent = 'on' + capitalizedEvent;
|
20509 | var topEvent = 'top' + capitalizedEvent;
|
20510 |
|
20511 | var type = {
|
20512 | phasedRegistrationNames: {
|
20513 | bubbled: onEvent,
|
20514 | captured: onEvent + 'Capture'
|
20515 | },
|
20516 | dependencies: [topEvent]
|
20517 | };
|
20518 | eventTypes[event] = type;
|
20519 | topLevelEventsToDispatchConfig[topEvent] = type;
|
20520 | });
|
20521 |
|
20522 | var onClickListeners = {};
|
20523 |
|
20524 | function getDictionaryKey(inst) {
|
20525 |
|
20526 |
|
20527 | return '.' + inst._rootNodeID;
|
20528 | }
|
20529 |
|
20530 | function isInteractive(tag) {
|
20531 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
20532 | }
|
20533 |
|
20534 | var SimpleEventPlugin = {
|
20535 | eventTypes: eventTypes,
|
20536 |
|
20537 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
20538 | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
20539 | if (!dispatchConfig) {
|
20540 | return null;
|
20541 | }
|
20542 | var EventConstructor;
|
20543 | switch (topLevelType) {
|
20544 | case 'topAbort':
|
20545 | case 'topCanPlay':
|
20546 | case 'topCanPlayThrough':
|
20547 | case 'topDurationChange':
|
20548 | case 'topEmptied':
|
20549 | case 'topEncrypted':
|
20550 | case 'topEnded':
|
20551 | case 'topError':
|
20552 | case 'topInput':
|
20553 | case 'topInvalid':
|
20554 | case 'topLoad':
|
20555 | case 'topLoadedData':
|
20556 | case 'topLoadedMetadata':
|
20557 | case 'topLoadStart':
|
20558 | case 'topPause':
|
20559 | case 'topPlay':
|
20560 | case 'topPlaying':
|
20561 | case 'topProgress':
|
20562 | case 'topRateChange':
|
20563 | case 'topReset':
|
20564 | case 'topSeeked':
|
20565 | case 'topSeeking':
|
20566 | case 'topStalled':
|
20567 | case 'topSubmit':
|
20568 | case 'topSuspend':
|
20569 | case 'topTimeUpdate':
|
20570 | case 'topVolumeChange':
|
20571 | case 'topWaiting':
|
20572 |
|
20573 |
|
20574 | EventConstructor = SyntheticEvent;
|
20575 | break;
|
20576 | case 'topKeyPress':
|
20577 |
|
20578 |
|
20579 |
|
20580 | if (getEventCharCode(nativeEvent) === 0) {
|
20581 | return null;
|
20582 | }
|
20583 |
|
20584 | case 'topKeyDown':
|
20585 | case 'topKeyUp':
|
20586 | EventConstructor = SyntheticKeyboardEvent;
|
20587 | break;
|
20588 | case 'topBlur':
|
20589 | case 'topFocus':
|
20590 | EventConstructor = SyntheticFocusEvent;
|
20591 | break;
|
20592 | case 'topClick':
|
20593 |
|
20594 |
|
20595 | if (nativeEvent.button === 2) {
|
20596 | return null;
|
20597 | }
|
20598 |
|
20599 | case 'topDoubleClick':
|
20600 | case 'topMouseDown':
|
20601 | case 'topMouseMove':
|
20602 | case 'topMouseUp':
|
20603 |
|
20604 |
|
20605 | case 'topMouseOut':
|
20606 | case 'topMouseOver':
|
20607 | case 'topContextMenu':
|
20608 | EventConstructor = SyntheticMouseEvent;
|
20609 | break;
|
20610 | case 'topDrag':
|
20611 | case 'topDragEnd':
|
20612 | case 'topDragEnter':
|
20613 | case 'topDragExit':
|
20614 | case 'topDragLeave':
|
20615 | case 'topDragOver':
|
20616 | case 'topDragStart':
|
20617 | case 'topDrop':
|
20618 | EventConstructor = SyntheticDragEvent;
|
20619 | break;
|
20620 | case 'topTouchCancel':
|
20621 | case 'topTouchEnd':
|
20622 | case 'topTouchMove':
|
20623 | case 'topTouchStart':
|
20624 | EventConstructor = SyntheticTouchEvent;
|
20625 | break;
|
20626 | case 'topAnimationEnd':
|
20627 | case 'topAnimationIteration':
|
20628 | case 'topAnimationStart':
|
20629 | EventConstructor = SyntheticAnimationEvent;
|
20630 | break;
|
20631 | case 'topTransitionEnd':
|
20632 | EventConstructor = SyntheticTransitionEvent;
|
20633 | break;
|
20634 | case 'topScroll':
|
20635 | EventConstructor = SyntheticUIEvent;
|
20636 | break;
|
20637 | case 'topWheel':
|
20638 | EventConstructor = SyntheticWheelEvent;
|
20639 | break;
|
20640 | case 'topCopy':
|
20641 | case 'topCut':
|
20642 | case 'topPaste':
|
20643 | EventConstructor = SyntheticClipboardEvent;
|
20644 | break;
|
20645 | }
|
20646 | !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
|
20647 | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
20648 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
20649 | return event;
|
20650 | },
|
20651 |
|
20652 | didPutListener: function (inst, registrationName, listener) {
|
20653 |
|
20654 |
|
20655 |
|
20656 |
|
20657 |
|
20658 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
20659 | var key = getDictionaryKey(inst);
|
20660 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
20661 | if (!onClickListeners[key]) {
|
20662 | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
|
20663 | }
|
20664 | }
|
20665 | },
|
20666 |
|
20667 | willDeleteListener: function (inst, registrationName) {
|
20668 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
20669 | var key = getDictionaryKey(inst);
|
20670 | onClickListeners[key].remove();
|
20671 | delete onClickListeners[key];
|
20672 | }
|
20673 | }
|
20674 | };
|
20675 |
|
20676 | module.exports = SimpleEventPlugin;
|
20677 |
|
20678 | }),
|
20679 |
|
20680 | (function(module, exports, __webpack_require__) {
|
20681 |
|
20682 | "use strict";
|
20683 |
|
20684 |
|
20685 |
|
20686 |
|
20687 |
|
20688 |
|
20689 |
|
20690 |
|
20691 |
|
20692 |
|
20693 | var SyntheticEvent = __webpack_require__(10);
|
20694 |
|
20695 |
|
20696 |
|
20697 |
|
20698 |
|
20699 |
|
20700 | var AnimationEventInterface = {
|
20701 | animationName: null,
|
20702 | elapsedTime: null,
|
20703 | pseudoElement: null
|
20704 | };
|
20705 |
|
20706 |
|
20707 |
|
20708 |
|
20709 |
|
20710 |
|
20711 |
|
20712 | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20713 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20714 | }
|
20715 |
|
20716 | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
|
20717 |
|
20718 | module.exports = SyntheticAnimationEvent;
|
20719 |
|
20720 | }),
|
20721 |
|
20722 | (function(module, exports, __webpack_require__) {
|
20723 |
|
20724 | "use strict";
|
20725 |
|
20726 |
|
20727 |
|
20728 |
|
20729 |
|
20730 |
|
20731 |
|
20732 |
|
20733 |
|
20734 |
|
20735 | var SyntheticEvent = __webpack_require__(10);
|
20736 |
|
20737 |
|
20738 |
|
20739 |
|
20740 |
|
20741 | var ClipboardEventInterface = {
|
20742 | clipboardData: function (event) {
|
20743 | return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
20744 | }
|
20745 | };
|
20746 |
|
20747 |
|
20748 |
|
20749 |
|
20750 |
|
20751 |
|
20752 |
|
20753 | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20754 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20755 | }
|
20756 |
|
20757 | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
|
20758 |
|
20759 | module.exports = SyntheticClipboardEvent;
|
20760 |
|
20761 | }),
|
20762 |
|
20763 | (function(module, exports, __webpack_require__) {
|
20764 |
|
20765 | "use strict";
|
20766 |
|
20767 |
|
20768 |
|
20769 |
|
20770 |
|
20771 |
|
20772 |
|
20773 |
|
20774 |
|
20775 |
|
20776 | var SyntheticEvent = __webpack_require__(10);
|
20777 |
|
20778 |
|
20779 |
|
20780 |
|
20781 |
|
20782 | var CompositionEventInterface = {
|
20783 | data: null
|
20784 | };
|
20785 |
|
20786 |
|
20787 |
|
20788 |
|
20789 |
|
20790 |
|
20791 |
|
20792 | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20793 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20794 | }
|
20795 |
|
20796 | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
|
20797 |
|
20798 | module.exports = SyntheticCompositionEvent;
|
20799 |
|
20800 | }),
|
20801 |
|
20802 | (function(module, exports, __webpack_require__) {
|
20803 |
|
20804 | "use strict";
|
20805 |
|
20806 |
|
20807 |
|
20808 |
|
20809 |
|
20810 |
|
20811 |
|
20812 |
|
20813 |
|
20814 |
|
20815 | var SyntheticMouseEvent = __webpack_require__(23);
|
20816 |
|
20817 |
|
20818 |
|
20819 |
|
20820 |
|
20821 | var DragEventInterface = {
|
20822 | dataTransfer: null
|
20823 | };
|
20824 |
|
20825 |
|
20826 |
|
20827 |
|
20828 |
|
20829 |
|
20830 |
|
20831 | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20832 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20833 | }
|
20834 |
|
20835 | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
|
20836 |
|
20837 | module.exports = SyntheticDragEvent;
|
20838 |
|
20839 | }),
|
20840 |
|
20841 | (function(module, exports, __webpack_require__) {
|
20842 |
|
20843 | "use strict";
|
20844 |
|
20845 |
|
20846 |
|
20847 |
|
20848 |
|
20849 |
|
20850 |
|
20851 |
|
20852 |
|
20853 |
|
20854 | var SyntheticUIEvent = __webpack_require__(20);
|
20855 |
|
20856 |
|
20857 |
|
20858 |
|
20859 |
|
20860 | var FocusEventInterface = {
|
20861 | relatedTarget: null
|
20862 | };
|
20863 |
|
20864 |
|
20865 |
|
20866 |
|
20867 |
|
20868 |
|
20869 |
|
20870 | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20871 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20872 | }
|
20873 |
|
20874 | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
|
20875 |
|
20876 | module.exports = SyntheticFocusEvent;
|
20877 |
|
20878 | }),
|
20879 |
|
20880 | (function(module, exports, __webpack_require__) {
|
20881 |
|
20882 | "use strict";
|
20883 |
|
20884 |
|
20885 |
|
20886 |
|
20887 |
|
20888 |
|
20889 |
|
20890 |
|
20891 |
|
20892 |
|
20893 | var SyntheticEvent = __webpack_require__(10);
|
20894 |
|
20895 |
|
20896 |
|
20897 |
|
20898 |
|
20899 |
|
20900 | var InputEventInterface = {
|
20901 | data: null
|
20902 | };
|
20903 |
|
20904 |
|
20905 |
|
20906 |
|
20907 |
|
20908 |
|
20909 |
|
20910 | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20911 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20912 | }
|
20913 |
|
20914 | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
|
20915 |
|
20916 | module.exports = SyntheticInputEvent;
|
20917 |
|
20918 | }),
|
20919 |
|
20920 | (function(module, exports, __webpack_require__) {
|
20921 |
|
20922 | "use strict";
|
20923 |
|
20924 |
|
20925 |
|
20926 |
|
20927 |
|
20928 |
|
20929 |
|
20930 |
|
20931 |
|
20932 |
|
20933 | var SyntheticUIEvent = __webpack_require__(20);
|
20934 |
|
20935 | var getEventCharCode = __webpack_require__(39);
|
20936 | var getEventKey = __webpack_require__(182);
|
20937 | var getEventModifierState = __webpack_require__(40);
|
20938 |
|
20939 |
|
20940 |
|
20941 |
|
20942 |
|
20943 | var KeyboardEventInterface = {
|
20944 | key: getEventKey,
|
20945 | location: null,
|
20946 | ctrlKey: null,
|
20947 | shiftKey: null,
|
20948 | altKey: null,
|
20949 | metaKey: null,
|
20950 | repeat: null,
|
20951 | locale: null,
|
20952 | getModifierState: getEventModifierState,
|
20953 |
|
20954 | charCode: function (event) {
|
20955 |
|
20956 |
|
20957 |
|
20958 |
|
20959 |
|
20960 | if (event.type === 'keypress') {
|
20961 | return getEventCharCode(event);
|
20962 | }
|
20963 | return 0;
|
20964 | },
|
20965 | keyCode: function (event) {
|
20966 |
|
20967 |
|
20968 |
|
20969 |
|
20970 |
|
20971 |
|
20972 |
|
20973 | if (event.type === 'keydown' || event.type === 'keyup') {
|
20974 | return event.keyCode;
|
20975 | }
|
20976 | return 0;
|
20977 | },
|
20978 | which: function (event) {
|
20979 |
|
20980 |
|
20981 | if (event.type === 'keypress') {
|
20982 | return getEventCharCode(event);
|
20983 | }
|
20984 | if (event.type === 'keydown' || event.type === 'keyup') {
|
20985 | return event.keyCode;
|
20986 | }
|
20987 | return 0;
|
20988 | }
|
20989 | };
|
20990 |
|
20991 |
|
20992 |
|
20993 |
|
20994 |
|
20995 |
|
20996 |
|
20997 | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
20998 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
20999 | }
|
21000 |
|
21001 | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
|
21002 |
|
21003 | module.exports = SyntheticKeyboardEvent;
|
21004 |
|
21005 | }),
|
21006 |
|
21007 | (function(module, exports, __webpack_require__) {
|
21008 |
|
21009 | "use strict";
|
21010 |
|
21011 |
|
21012 |
|
21013 |
|
21014 |
|
21015 |
|
21016 |
|
21017 |
|
21018 |
|
21019 |
|
21020 | var SyntheticUIEvent = __webpack_require__(20);
|
21021 |
|
21022 | var getEventModifierState = __webpack_require__(40);
|
21023 |
|
21024 |
|
21025 |
|
21026 |
|
21027 |
|
21028 | var TouchEventInterface = {
|
21029 | touches: null,
|
21030 | targetTouches: null,
|
21031 | changedTouches: null,
|
21032 | altKey: null,
|
21033 | metaKey: null,
|
21034 | ctrlKey: null,
|
21035 | shiftKey: null,
|
21036 | getModifierState: getEventModifierState
|
21037 | };
|
21038 |
|
21039 |
|
21040 |
|
21041 |
|
21042 |
|
21043 |
|
21044 |
|
21045 | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
21046 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
21047 | }
|
21048 |
|
21049 | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
|
21050 |
|
21051 | module.exports = SyntheticTouchEvent;
|
21052 |
|
21053 | }),
|
21054 |
|
21055 | (function(module, exports, __webpack_require__) {
|
21056 |
|
21057 | "use strict";
|
21058 |
|
21059 |
|
21060 |
|
21061 |
|
21062 |
|
21063 |
|
21064 |
|
21065 |
|
21066 |
|
21067 |
|
21068 | var SyntheticEvent = __webpack_require__(10);
|
21069 |
|
21070 |
|
21071 |
|
21072 |
|
21073 |
|
21074 |
|
21075 | var TransitionEventInterface = {
|
21076 | propertyName: null,
|
21077 | elapsedTime: null,
|
21078 | pseudoElement: null
|
21079 | };
|
21080 |
|
21081 |
|
21082 |
|
21083 |
|
21084 |
|
21085 |
|
21086 |
|
21087 | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
21088 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
21089 | }
|
21090 |
|
21091 | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
|
21092 |
|
21093 | module.exports = SyntheticTransitionEvent;
|
21094 |
|
21095 | }),
|
21096 |
|
21097 | (function(module, exports, __webpack_require__) {
|
21098 |
|
21099 | "use strict";
|
21100 |
|
21101 |
|
21102 |
|
21103 |
|
21104 |
|
21105 |
|
21106 |
|
21107 |
|
21108 |
|
21109 |
|
21110 | var SyntheticMouseEvent = __webpack_require__(23);
|
21111 |
|
21112 |
|
21113 |
|
21114 |
|
21115 |
|
21116 | var WheelEventInterface = {
|
21117 | deltaX: function (event) {
|
21118 | return 'deltaX' in event ? event.deltaX :
|
21119 | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
21120 | },
|
21121 | deltaY: function (event) {
|
21122 | return 'deltaY' in event ? event.deltaY :
|
21123 | 'wheelDeltaY' in event ? -event.wheelDeltaY :
|
21124 | 'wheelDelta' in event ? -event.wheelDelta : 0;
|
21125 | },
|
21126 | deltaZ: null,
|
21127 |
|
21128 |
|
21129 |
|
21130 |
|
21131 |
|
21132 | deltaMode: null
|
21133 | };
|
21134 |
|
21135 |
|
21136 |
|
21137 |
|
21138 |
|
21139 |
|
21140 |
|
21141 | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
21142 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
21143 | }
|
21144 |
|
21145 | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
|
21146 |
|
21147 | module.exports = SyntheticWheelEvent;
|
21148 |
|
21149 | }),
|
21150 |
|
21151 | (function(module, exports, __webpack_require__) {
|
21152 |
|
21153 | "use strict";
|
21154 |
|
21155 |
|
21156 |
|
21157 |
|
21158 |
|
21159 |
|
21160 |
|
21161 |
|
21162 |
|
21163 |
|
21164 |
|
21165 | var MOD = 65521;
|
21166 |
|
21167 |
|
21168 |
|
21169 |
|
21170 |
|
21171 |
|
21172 | function adler32(data) {
|
21173 | var a = 1;
|
21174 | var b = 0;
|
21175 | var i = 0;
|
21176 | var l = data.length;
|
21177 | var m = l & ~0x3;
|
21178 | while (i < m) {
|
21179 | var n = Math.min(i + 4096, m);
|
21180 | for (; i < n; i += 4) {
|
21181 | b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
|
21182 | }
|
21183 | a %= MOD;
|
21184 | b %= MOD;
|
21185 | }
|
21186 | for (; i < l; i++) {
|
21187 | b += a += data.charCodeAt(i);
|
21188 | }
|
21189 | a %= MOD;
|
21190 | b %= MOD;
|
21191 | return a | b << 16;
|
21192 | }
|
21193 |
|
21194 | module.exports = adler32;
|
21195 |
|
21196 | }),
|
21197 |
|
21198 | (function(module, exports, __webpack_require__) {
|
21199 |
|
21200 | "use strict";
|
21201 |
|
21202 |
|
21203 |
|
21204 |
|
21205 |
|
21206 |
|
21207 |
|
21208 |
|
21209 |
|
21210 |
|
21211 | var _prodInvariant = __webpack_require__(2);
|
21212 |
|
21213 | var ReactPropTypeLocationNames = __webpack_require__(158);
|
21214 | var ReactPropTypesSecret = __webpack_require__(62);
|
21215 |
|
21216 | var invariant = __webpack_require__(0);
|
21217 | var warning = __webpack_require__(1);
|
21218 |
|
21219 | var ReactComponentTreeHook;
|
21220 |
|
21221 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
21222 |
|
21223 |
|
21224 |
|
21225 |
|
21226 |
|
21227 | ReactComponentTreeHook = __webpack_require__(8);
|
21228 | }
|
21229 |
|
21230 | var loggedTypeFailures = {};
|
21231 |
|
21232 |
|
21233 |
|
21234 |
|
21235 |
|
21236 |
|
21237 |
|
21238 |
|
21239 |
|
21240 |
|
21241 |
|
21242 |
|
21243 |
|
21244 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
21245 | for (var typeSpecName in typeSpecs) {
|
21246 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
21247 | var error;
|
21248 |
|
21249 |
|
21250 |
|
21251 | try {
|
21252 |
|
21253 |
|
21254 | !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
21255 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
21256 | } catch (ex) {
|
21257 | error = ex;
|
21258 | }
|
21259 | process.env.NODE_ENV !== 'production' ? 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', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
21260 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
21261 |
|
21262 |
|
21263 | loggedTypeFailures[error.message] = true;
|
21264 |
|
21265 | var componentStackInfo = '';
|
21266 |
|
21267 | if (process.env.NODE_ENV !== 'production') {
|
21268 | if (!ReactComponentTreeHook) {
|
21269 | ReactComponentTreeHook = __webpack_require__(8);
|
21270 | }
|
21271 | if (debugID !== null) {
|
21272 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
21273 | } else if (element !== null) {
|
21274 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
21275 | }
|
21276 | }
|
21277 |
|
21278 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
21279 | }
|
21280 | }
|
21281 | }
|
21282 | }
|
21283 |
|
21284 | module.exports = checkReactTypeSpec;
|
21285 |
|
21286 | }),
|
21287 |
|
21288 | (function(module, exports, __webpack_require__) {
|
21289 |
|
21290 | "use strict";
|
21291 |
|
21292 |
|
21293 |
|
21294 |
|
21295 |
|
21296 |
|
21297 |
|
21298 |
|
21299 |
|
21300 |
|
21301 | var CSSProperty = __webpack_require__(53);
|
21302 | var warning = __webpack_require__(1);
|
21303 |
|
21304 | var isUnitlessNumber = CSSProperty.isUnitlessNumber;
|
21305 | var styleWarnings = {};
|
21306 |
|
21307 |
|
21308 |
|
21309 |
|
21310 |
|
21311 |
|
21312 |
|
21313 |
|
21314 |
|
21315 |
|
21316 |
|
21317 | function dangerousStyleValue(name, value, component, isCustomProperty) {
|
21318 |
|
21319 |
|
21320 |
|
21321 |
|
21322 |
|
21323 |
|
21324 |
|
21325 |
|
21326 |
|
21327 |
|
21328 | var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
21329 | if (isEmpty) {
|
21330 | return '';
|
21331 | }
|
21332 |
|
21333 | var isNonNumeric = isNaN(value);
|
21334 | if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
21335 | return '' + value;
|
21336 | }
|
21337 |
|
21338 | if (typeof value === 'string') {
|
21339 | if (process.env.NODE_ENV !== 'production') {
|
21340 |
|
21341 |
|
21342 | if (component && value !== '0') {
|
21343 | var owner = component._currentElement._owner;
|
21344 | var ownerName = owner ? owner.getName() : null;
|
21345 | if (ownerName && !styleWarnings[ownerName]) {
|
21346 | styleWarnings[ownerName] = {};
|
21347 | }
|
21348 | var warned = false;
|
21349 | if (ownerName) {
|
21350 | var warnings = styleWarnings[ownerName];
|
21351 | warned = warnings[name];
|
21352 | if (!warned) {
|
21353 | warnings[name] = true;
|
21354 | }
|
21355 | }
|
21356 | if (!warned) {
|
21357 | process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
|
21358 | }
|
21359 | }
|
21360 | }
|
21361 | value = value.trim();
|
21362 | }
|
21363 | return value + 'px';
|
21364 | }
|
21365 |
|
21366 | module.exports = dangerousStyleValue;
|
21367 |
|
21368 | }),
|
21369 |
|
21370 | (function(module, exports, __webpack_require__) {
|
21371 |
|
21372 | "use strict";
|
21373 |
|
21374 |
|
21375 |
|
21376 |
|
21377 |
|
21378 |
|
21379 |
|
21380 |
|
21381 |
|
21382 |
|
21383 |
|
21384 | var KeyEscapeUtils = __webpack_require__(32);
|
21385 | var traverseAllChildren = __webpack_require__(74);
|
21386 | var warning = __webpack_require__(1);
|
21387 |
|
21388 | var ReactComponentTreeHook;
|
21389 |
|
21390 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
21391 |
|
21392 |
|
21393 |
|
21394 |
|
21395 |
|
21396 | ReactComponentTreeHook = __webpack_require__(8);
|
21397 | }
|
21398 |
|
21399 |
|
21400 |
|
21401 |
|
21402 |
|
21403 |
|
21404 |
|
21405 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
21406 |
|
21407 | if (traverseContext && typeof traverseContext === 'object') {
|
21408 | var result = traverseContext;
|
21409 | var keyUnique = result[name] === undefined;
|
21410 | if (process.env.NODE_ENV !== 'production') {
|
21411 | if (!ReactComponentTreeHook) {
|
21412 | ReactComponentTreeHook = __webpack_require__(8);
|
21413 | }
|
21414 | if (!keyUnique) {
|
21415 | process.env.NODE_ENV !== 'production' ? warning(false, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.%s', KeyEscapeUtils.unescape(name), ReactComponentTreeHook.getStackAddendumByID(selfDebugID)) : void 0;
|
21416 | }
|
21417 | }
|
21418 | if (keyUnique && child != null) {
|
21419 | result[name] = child;
|
21420 | }
|
21421 | }
|
21422 | }
|
21423 |
|
21424 |
|
21425 |
|
21426 |
|
21427 |
|
21428 |
|
21429 | function flattenChildren(children, selfDebugID) {
|
21430 | if (children == null) {
|
21431 | return children;
|
21432 | }
|
21433 | var result = {};
|
21434 |
|
21435 | if (process.env.NODE_ENV !== 'production') {
|
21436 | traverseAllChildren(children, function (traverseContext, child, name) {
|
21437 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
21438 | }, result);
|
21439 | } else {
|
21440 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
21441 | }
|
21442 | return result;
|
21443 | }
|
21444 |
|
21445 | module.exports = flattenChildren;
|
21446 |
|
21447 | }),
|
21448 |
|
21449 | (function(module, exports, __webpack_require__) {
|
21450 |
|
21451 | "use strict";
|
21452 |
|
21453 |
|
21454 |
|
21455 |
|
21456 |
|
21457 |
|
21458 |
|
21459 |
|
21460 |
|
21461 |
|
21462 | var getEventCharCode = __webpack_require__(39);
|
21463 |
|
21464 |
|
21465 |
|
21466 |
|
21467 |
|
21468 | var normalizeKey = {
|
21469 | Esc: 'Escape',
|
21470 | Spacebar: ' ',
|
21471 | Left: 'ArrowLeft',
|
21472 | Up: 'ArrowUp',
|
21473 | Right: 'ArrowRight',
|
21474 | Down: 'ArrowDown',
|
21475 | Del: 'Delete',
|
21476 | Win: 'OS',
|
21477 | Menu: 'ContextMenu',
|
21478 | Apps: 'ContextMenu',
|
21479 | Scroll: 'ScrollLock',
|
21480 | MozPrintableKey: 'Unidentified'
|
21481 | };
|
21482 |
|
21483 |
|
21484 |
|
21485 |
|
21486 |
|
21487 |
|
21488 | var translateToKey = {
|
21489 | 8: 'Backspace',
|
21490 | 9: 'Tab',
|
21491 | 12: 'Clear',
|
21492 | 13: 'Enter',
|
21493 | 16: 'Shift',
|
21494 | 17: 'Control',
|
21495 | 18: 'Alt',
|
21496 | 19: 'Pause',
|
21497 | 20: 'CapsLock',
|
21498 | 27: 'Escape',
|
21499 | 32: ' ',
|
21500 | 33: 'PageUp',
|
21501 | 34: 'PageDown',
|
21502 | 35: 'End',
|
21503 | 36: 'Home',
|
21504 | 37: 'ArrowLeft',
|
21505 | 38: 'ArrowUp',
|
21506 | 39: 'ArrowRight',
|
21507 | 40: 'ArrowDown',
|
21508 | 45: 'Insert',
|
21509 | 46: 'Delete',
|
21510 | 112: 'F1',
|
21511 | 113: 'F2',
|
21512 | 114: 'F3',
|
21513 | 115: 'F4',
|
21514 | 116: 'F5',
|
21515 | 117: 'F6',
|
21516 | 118: 'F7',
|
21517 | 119: 'F8',
|
21518 | 120: 'F9',
|
21519 | 121: 'F10',
|
21520 | 122: 'F11',
|
21521 | 123: 'F12',
|
21522 | 144: 'NumLock',
|
21523 | 145: 'ScrollLock',
|
21524 | 224: 'Meta'
|
21525 | };
|
21526 |
|
21527 |
|
21528 |
|
21529 |
|
21530 |
|
21531 | function getEventKey(nativeEvent) {
|
21532 | if (nativeEvent.key) {
|
21533 |
|
21534 |
|
21535 |
|
21536 |
|
21537 |
|
21538 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
21539 | if (key !== 'Unidentified') {
|
21540 | return key;
|
21541 | }
|
21542 | }
|
21543 |
|
21544 |
|
21545 | if (nativeEvent.type === 'keypress') {
|
21546 | var charCode = getEventCharCode(nativeEvent);
|
21547 |
|
21548 |
|
21549 |
|
21550 | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
21551 | }
|
21552 | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
21553 |
|
21554 |
|
21555 | return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
21556 | }
|
21557 | return '';
|
21558 | }
|
21559 |
|
21560 | module.exports = getEventKey;
|
21561 |
|
21562 | }),
|
21563 |
|
21564 | (function(module, exports, __webpack_require__) {
|
21565 |
|
21566 | "use strict";
|
21567 |
|
21568 |
|
21569 |
|
21570 |
|
21571 |
|
21572 |
|
21573 |
|
21574 |
|
21575 |
|
21576 |
|
21577 |
|
21578 |
|
21579 |
|
21580 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
21581 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
21582 |
|
21583 |
|
21584 |
|
21585 |
|
21586 |
|
21587 |
|
21588 |
|
21589 |
|
21590 |
|
21591 |
|
21592 |
|
21593 |
|
21594 |
|
21595 |
|
21596 |
|
21597 | function getIteratorFn(maybeIterable) {
|
21598 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
21599 | if (typeof iteratorFn === 'function') {
|
21600 | return iteratorFn;
|
21601 | }
|
21602 | }
|
21603 |
|
21604 | module.exports = getIteratorFn;
|
21605 |
|
21606 | }),
|
21607 |
|
21608 | (function(module, exports, __webpack_require__) {
|
21609 |
|
21610 | "use strict";
|
21611 |
|
21612 |
|
21613 |
|
21614 |
|
21615 |
|
21616 |
|
21617 |
|
21618 |
|
21619 |
|
21620 |
|
21621 |
|
21622 |
|
21623 |
|
21624 |
|
21625 |
|
21626 |
|
21627 |
|
21628 | function getLeafNode(node) {
|
21629 | while (node && node.firstChild) {
|
21630 | node = node.firstChild;
|
21631 | }
|
21632 | return node;
|
21633 | }
|
21634 |
|
21635 |
|
21636 |
|
21637 |
|
21638 |
|
21639 |
|
21640 |
|
21641 |
|
21642 | function getSiblingNode(node) {
|
21643 | while (node) {
|
21644 | if (node.nextSibling) {
|
21645 | return node.nextSibling;
|
21646 | }
|
21647 | node = node.parentNode;
|
21648 | }
|
21649 | }
|
21650 |
|
21651 |
|
21652 |
|
21653 |
|
21654 |
|
21655 |
|
21656 |
|
21657 |
|
21658 | function getNodeForCharacterOffset(root, offset) {
|
21659 | var node = getLeafNode(root);
|
21660 | var nodeStart = 0;
|
21661 | var nodeEnd = 0;
|
21662 |
|
21663 | while (node) {
|
21664 | if (node.nodeType === 3) {
|
21665 | nodeEnd = nodeStart + node.textContent.length;
|
21666 |
|
21667 | if (nodeStart <= offset && nodeEnd >= offset) {
|
21668 | return {
|
21669 | node: node,
|
21670 | offset: offset - nodeStart
|
21671 | };
|
21672 | }
|
21673 |
|
21674 | nodeStart = nodeEnd;
|
21675 | }
|
21676 |
|
21677 | node = getLeafNode(getSiblingNode(node));
|
21678 | }
|
21679 | }
|
21680 |
|
21681 | module.exports = getNodeForCharacterOffset;
|
21682 |
|
21683 | }),
|
21684 |
|
21685 | (function(module, exports, __webpack_require__) {
|
21686 |
|
21687 | "use strict";
|
21688 |
|
21689 |
|
21690 |
|
21691 |
|
21692 |
|
21693 |
|
21694 |
|
21695 |
|
21696 |
|
21697 |
|
21698 | var ExecutionEnvironment = __webpack_require__(5);
|
21699 |
|
21700 |
|
21701 |
|
21702 |
|
21703 |
|
21704 |
|
21705 |
|
21706 |
|
21707 | function makePrefixMap(styleProp, eventName) {
|
21708 | var prefixes = {};
|
21709 |
|
21710 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
21711 | prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
21712 | prefixes['Moz' + styleProp] = 'moz' + eventName;
|
21713 | prefixes['ms' + styleProp] = 'MS' + eventName;
|
21714 | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
|
21715 |
|
21716 | return prefixes;
|
21717 | }
|
21718 |
|
21719 |
|
21720 |
|
21721 |
|
21722 | var vendorPrefixes = {
|
21723 | animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
21724 | animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
21725 | animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
21726 | transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
21727 | };
|
21728 |
|
21729 |
|
21730 |
|
21731 |
|
21732 | var prefixedEventNames = {};
|
21733 |
|
21734 |
|
21735 |
|
21736 |
|
21737 | var style = {};
|
21738 |
|
21739 |
|
21740 |
|
21741 |
|
21742 | if (ExecutionEnvironment.canUseDOM) {
|
21743 | style = document.createElement('div').style;
|
21744 |
|
21745 |
|
21746 |
|
21747 |
|
21748 |
|
21749 | if (!('AnimationEvent' in window)) {
|
21750 | delete vendorPrefixes.animationend.animation;
|
21751 | delete vendorPrefixes.animationiteration.animation;
|
21752 | delete vendorPrefixes.animationstart.animation;
|
21753 | }
|
21754 |
|
21755 |
|
21756 | if (!('TransitionEvent' in window)) {
|
21757 | delete vendorPrefixes.transitionend.transition;
|
21758 | }
|
21759 | }
|
21760 |
|
21761 |
|
21762 |
|
21763 |
|
21764 |
|
21765 |
|
21766 |
|
21767 | function getVendorPrefixedEventName(eventName) {
|
21768 | if (prefixedEventNames[eventName]) {
|
21769 | return prefixedEventNames[eventName];
|
21770 | } else if (!vendorPrefixes[eventName]) {
|
21771 | return eventName;
|
21772 | }
|
21773 |
|
21774 | var prefixMap = vendorPrefixes[eventName];
|
21775 |
|
21776 | for (var styleProp in prefixMap) {
|
21777 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
21778 | return prefixedEventNames[eventName] = prefixMap[styleProp];
|
21779 | }
|
21780 | }
|
21781 |
|
21782 | return '';
|
21783 | }
|
21784 |
|
21785 | module.exports = getVendorPrefixedEventName;
|
21786 |
|
21787 | }),
|
21788 |
|
21789 | (function(module, exports, __webpack_require__) {
|
21790 |
|
21791 | "use strict";
|
21792 |
|
21793 |
|
21794 |
|
21795 |
|
21796 |
|
21797 |
|
21798 |
|
21799 |
|
21800 |
|
21801 |
|
21802 | var escapeTextContentForBrowser = __webpack_require__(25);
|
21803 |
|
21804 |
|
21805 |
|
21806 |
|
21807 |
|
21808 |
|
21809 |
|
21810 | function quoteAttributeValueForBrowser(value) {
|
21811 | return '"' + escapeTextContentForBrowser(value) + '"';
|
21812 | }
|
21813 |
|
21814 | module.exports = quoteAttributeValueForBrowser;
|
21815 |
|
21816 | }),
|
21817 |
|
21818 | (function(module, exports, __webpack_require__) {
|
21819 |
|
21820 | "use strict";
|
21821 |
|
21822 |
|
21823 | module.exports = __webpack_require__(141);
|
21824 |
|
21825 |
|
21826 | }),
|
21827 |
|
21828 | (function(module, exports, __webpack_require__) {
|
21829 |
|
21830 | "use strict";
|
21831 |
|
21832 |
|
21833 |
|
21834 |
|
21835 |
|
21836 |
|
21837 |
|
21838 |
|
21839 |
|
21840 |
|
21841 |
|
21842 |
|
21843 |
|
21844 |
|
21845 |
|
21846 |
|
21847 |
|
21848 |
|
21849 | function escape(key) {
|
21850 | var escapeRegex = /[=:]/g;
|
21851 | var escaperLookup = {
|
21852 | '=': '=0',
|
21853 | ':': '=2'
|
21854 | };
|
21855 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
21856 | return escaperLookup[match];
|
21857 | });
|
21858 |
|
21859 | return '$' + escapedString;
|
21860 | }
|
21861 |
|
21862 |
|
21863 |
|
21864 |
|
21865 |
|
21866 |
|
21867 |
|
21868 | function unescape(key) {
|
21869 | var unescapeRegex = /(=0|=2)/g;
|
21870 | var unescaperLookup = {
|
21871 | '=0': '=',
|
21872 | '=2': ':'
|
21873 | };
|
21874 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
21875 |
|
21876 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
21877 | return unescaperLookup[match];
|
21878 | });
|
21879 | }
|
21880 |
|
21881 | var KeyEscapeUtils = {
|
21882 | escape: escape,
|
21883 | unescape: unescape
|
21884 | };
|
21885 |
|
21886 | module.exports = KeyEscapeUtils;
|
21887 |
|
21888 | }),
|
21889 |
|
21890 | (function(module, exports, __webpack_require__) {
|
21891 |
|
21892 | "use strict";
|
21893 |
|
21894 |
|
21895 |
|
21896 |
|
21897 |
|
21898 |
|
21899 |
|
21900 |
|
21901 |
|
21902 |
|
21903 |
|
21904 | var _prodInvariant = __webpack_require__(14);
|
21905 |
|
21906 | var invariant = __webpack_require__(0);
|
21907 |
|
21908 |
|
21909 |
|
21910 |
|
21911 |
|
21912 |
|
21913 |
|
21914 |
|
21915 | var oneArgumentPooler = function (copyFieldsFrom) {
|
21916 | var Klass = this;
|
21917 | if (Klass.instancePool.length) {
|
21918 | var instance = Klass.instancePool.pop();
|
21919 | Klass.call(instance, copyFieldsFrom);
|
21920 | return instance;
|
21921 | } else {
|
21922 | return new Klass(copyFieldsFrom);
|
21923 | }
|
21924 | };
|
21925 |
|
21926 | var twoArgumentPooler = function (a1, a2) {
|
21927 | var Klass = this;
|
21928 | if (Klass.instancePool.length) {
|
21929 | var instance = Klass.instancePool.pop();
|
21930 | Klass.call(instance, a1, a2);
|
21931 | return instance;
|
21932 | } else {
|
21933 | return new Klass(a1, a2);
|
21934 | }
|
21935 | };
|
21936 |
|
21937 | var threeArgumentPooler = function (a1, a2, a3) {
|
21938 | var Klass = this;
|
21939 | if (Klass.instancePool.length) {
|
21940 | var instance = Klass.instancePool.pop();
|
21941 | Klass.call(instance, a1, a2, a3);
|
21942 | return instance;
|
21943 | } else {
|
21944 | return new Klass(a1, a2, a3);
|
21945 | }
|
21946 | };
|
21947 |
|
21948 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
21949 | var Klass = this;
|
21950 | if (Klass.instancePool.length) {
|
21951 | var instance = Klass.instancePool.pop();
|
21952 | Klass.call(instance, a1, a2, a3, a4);
|
21953 | return instance;
|
21954 | } else {
|
21955 | return new Klass(a1, a2, a3, a4);
|
21956 | }
|
21957 | };
|
21958 |
|
21959 | var standardReleaser = function (instance) {
|
21960 | var Klass = this;
|
21961 | !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
21962 | instance.destructor();
|
21963 | if (Klass.instancePool.length < Klass.poolSize) {
|
21964 | Klass.instancePool.push(instance);
|
21965 | }
|
21966 | };
|
21967 |
|
21968 | var DEFAULT_POOL_SIZE = 10;
|
21969 | var DEFAULT_POOLER = oneArgumentPooler;
|
21970 |
|
21971 |
|
21972 |
|
21973 |
|
21974 |
|
21975 |
|
21976 |
|
21977 |
|
21978 |
|
21979 |
|
21980 | var addPoolingTo = function (CopyConstructor, pooler) {
|
21981 |
|
21982 |
|
21983 | var NewKlass = CopyConstructor;
|
21984 | NewKlass.instancePool = [];
|
21985 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
21986 | if (!NewKlass.poolSize) {
|
21987 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
21988 | }
|
21989 | NewKlass.release = standardReleaser;
|
21990 | return NewKlass;
|
21991 | };
|
21992 |
|
21993 | var PooledClass = {
|
21994 | addPoolingTo: addPoolingTo,
|
21995 | oneArgumentPooler: oneArgumentPooler,
|
21996 | twoArgumentPooler: twoArgumentPooler,
|
21997 | threeArgumentPooler: threeArgumentPooler,
|
21998 | fourArgumentPooler: fourArgumentPooler
|
21999 | };
|
22000 |
|
22001 | module.exports = PooledClass;
|
22002 |
|
22003 | }),
|
22004 |
|
22005 | (function(module, exports, __webpack_require__) {
|
22006 |
|
22007 | "use strict";
|
22008 |
|
22009 |
|
22010 |
|
22011 |
|
22012 |
|
22013 |
|
22014 |
|
22015 |
|
22016 |
|
22017 |
|
22018 | var PooledClass = __webpack_require__(189);
|
22019 | var ReactElement = __webpack_require__(13);
|
22020 |
|
22021 | var emptyFunction = __webpack_require__(7);
|
22022 | var traverseAllChildren = __webpack_require__(200);
|
22023 |
|
22024 | var twoArgumentPooler = PooledClass.twoArgumentPooler;
|
22025 | var fourArgumentPooler = PooledClass.fourArgumentPooler;
|
22026 |
|
22027 | var userProvidedKeyEscapeRegex = /\/+/g;
|
22028 | function escapeUserProvidedKey(text) {
|
22029 | return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
22030 | }
|
22031 |
|
22032 |
|
22033 |
|
22034 |
|
22035 |
|
22036 |
|
22037 |
|
22038 |
|
22039 |
|
22040 | function ForEachBookKeeping(forEachFunction, forEachContext) {
|
22041 | this.func = forEachFunction;
|
22042 | this.context = forEachContext;
|
22043 | this.count = 0;
|
22044 | }
|
22045 | ForEachBookKeeping.prototype.destructor = function () {
|
22046 | this.func = null;
|
22047 | this.context = null;
|
22048 | this.count = 0;
|
22049 | };
|
22050 | PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
|
22051 |
|
22052 | function forEachSingleChild(bookKeeping, child, name) {
|
22053 | var func = bookKeeping.func,
|
22054 | context = bookKeeping.context;
|
22055 |
|
22056 | func.call(context, child, bookKeeping.count++);
|
22057 | }
|
22058 |
|
22059 |
|
22060 |
|
22061 |
|
22062 |
|
22063 |
|
22064 |
|
22065 |
|
22066 |
|
22067 |
|
22068 |
|
22069 |
|
22070 |
|
22071 | function forEachChildren(children, forEachFunc, forEachContext) {
|
22072 | if (children == null) {
|
22073 | return children;
|
22074 | }
|
22075 | var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
|
22076 | traverseAllChildren(children, forEachSingleChild, traverseContext);
|
22077 | ForEachBookKeeping.release(traverseContext);
|
22078 | }
|
22079 |
|
22080 |
|
22081 |
|
22082 |
|
22083 |
|
22084 |
|
22085 |
|
22086 |
|
22087 |
|
22088 |
|
22089 | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
|
22090 | this.result = mapResult;
|
22091 | this.keyPrefix = keyPrefix;
|
22092 | this.func = mapFunction;
|
22093 | this.context = mapContext;
|
22094 | this.count = 0;
|
22095 | }
|
22096 | MapBookKeeping.prototype.destructor = function () {
|
22097 | this.result = null;
|
22098 | this.keyPrefix = null;
|
22099 | this.func = null;
|
22100 | this.context = null;
|
22101 | this.count = 0;
|
22102 | };
|
22103 | PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
|
22104 |
|
22105 | function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
22106 | var result = bookKeeping.result,
|
22107 | keyPrefix = bookKeeping.keyPrefix,
|
22108 | func = bookKeeping.func,
|
22109 | context = bookKeeping.context;
|
22110 |
|
22111 |
|
22112 | var mappedChild = func.call(context, child, bookKeeping.count++);
|
22113 | if (Array.isArray(mappedChild)) {
|
22114 | mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
|
22115 | } else if (mappedChild != null) {
|
22116 | if (ReactElement.isValidElement(mappedChild)) {
|
22117 | mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
|
22118 |
|
22119 |
|
22120 | keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
22121 | }
|
22122 | result.push(mappedChild);
|
22123 | }
|
22124 | }
|
22125 |
|
22126 | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
22127 | var escapedPrefix = '';
|
22128 | if (prefix != null) {
|
22129 | escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
22130 | }
|
22131 | var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
|
22132 | traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
22133 | MapBookKeeping.release(traverseContext);
|
22134 | }
|
22135 |
|
22136 |
|
22137 |
|
22138 |
|
22139 |
|
22140 |
|
22141 |
|
22142 |
|
22143 |
|
22144 |
|
22145 |
|
22146 |
|
22147 |
|
22148 |
|
22149 | function mapChildren(children, func, context) {
|
22150 | if (children == null) {
|
22151 | return children;
|
22152 | }
|
22153 | var result = [];
|
22154 | mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
22155 | return result;
|
22156 | }
|
22157 |
|
22158 | function forEachSingleChildDummy(traverseContext, child, name) {
|
22159 | return null;
|
22160 | }
|
22161 |
|
22162 |
|
22163 |
|
22164 |
|
22165 |
|
22166 |
|
22167 |
|
22168 |
|
22169 |
|
22170 |
|
22171 | function countChildren(children, context) {
|
22172 | return traverseAllChildren(children, forEachSingleChildDummy, null);
|
22173 | }
|
22174 |
|
22175 |
|
22176 |
|
22177 |
|
22178 |
|
22179 |
|
22180 |
|
22181 | function toArray(children) {
|
22182 | var result = [];
|
22183 | mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
|
22184 | return result;
|
22185 | }
|
22186 |
|
22187 | var ReactChildren = {
|
22188 | forEach: forEachChildren,
|
22189 | map: mapChildren,
|
22190 | mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
|
22191 | count: countChildren,
|
22192 | toArray: toArray
|
22193 | };
|
22194 |
|
22195 | module.exports = ReactChildren;
|
22196 |
|
22197 | }),
|
22198 |
|
22199 | (function(module, exports, __webpack_require__) {
|
22200 |
|
22201 | "use strict";
|
22202 |
|
22203 |
|
22204 |
|
22205 |
|
22206 |
|
22207 |
|
22208 |
|
22209 |
|
22210 |
|
22211 |
|
22212 | var ReactElement = __webpack_require__(13);
|
22213 |
|
22214 |
|
22215 |
|
22216 |
|
22217 |
|
22218 |
|
22219 | var createDOMFactory = ReactElement.createFactory;
|
22220 | if (process.env.NODE_ENV !== 'production') {
|
22221 | var ReactElementValidator = __webpack_require__(77);
|
22222 | createDOMFactory = ReactElementValidator.createFactory;
|
22223 | }
|
22224 |
|
22225 |
|
22226 |
|
22227 |
|
22228 |
|
22229 |
|
22230 | var ReactDOMFactories = {
|
22231 | a: createDOMFactory('a'),
|
22232 | abbr: createDOMFactory('abbr'),
|
22233 | address: createDOMFactory('address'),
|
22234 | area: createDOMFactory('area'),
|
22235 | article: createDOMFactory('article'),
|
22236 | aside: createDOMFactory('aside'),
|
22237 | audio: createDOMFactory('audio'),
|
22238 | b: createDOMFactory('b'),
|
22239 | base: createDOMFactory('base'),
|
22240 | bdi: createDOMFactory('bdi'),
|
22241 | bdo: createDOMFactory('bdo'),
|
22242 | big: createDOMFactory('big'),
|
22243 | blockquote: createDOMFactory('blockquote'),
|
22244 | body: createDOMFactory('body'),
|
22245 | br: createDOMFactory('br'),
|
22246 | button: createDOMFactory('button'),
|
22247 | canvas: createDOMFactory('canvas'),
|
22248 | caption: createDOMFactory('caption'),
|
22249 | cite: createDOMFactory('cite'),
|
22250 | code: createDOMFactory('code'),
|
22251 | col: createDOMFactory('col'),
|
22252 | colgroup: createDOMFactory('colgroup'),
|
22253 | data: createDOMFactory('data'),
|
22254 | datalist: createDOMFactory('datalist'),
|
22255 | dd: createDOMFactory('dd'),
|
22256 | del: createDOMFactory('del'),
|
22257 | details: createDOMFactory('details'),
|
22258 | dfn: createDOMFactory('dfn'),
|
22259 | dialog: createDOMFactory('dialog'),
|
22260 | div: createDOMFactory('div'),
|
22261 | dl: createDOMFactory('dl'),
|
22262 | dt: createDOMFactory('dt'),
|
22263 | em: createDOMFactory('em'),
|
22264 | embed: createDOMFactory('embed'),
|
22265 | fieldset: createDOMFactory('fieldset'),
|
22266 | figcaption: createDOMFactory('figcaption'),
|
22267 | figure: createDOMFactory('figure'),
|
22268 | footer: createDOMFactory('footer'),
|
22269 | form: createDOMFactory('form'),
|
22270 | h1: createDOMFactory('h1'),
|
22271 | h2: createDOMFactory('h2'),
|
22272 | h3: createDOMFactory('h3'),
|
22273 | h4: createDOMFactory('h4'),
|
22274 | h5: createDOMFactory('h5'),
|
22275 | h6: createDOMFactory('h6'),
|
22276 | head: createDOMFactory('head'),
|
22277 | header: createDOMFactory('header'),
|
22278 | hgroup: createDOMFactory('hgroup'),
|
22279 | hr: createDOMFactory('hr'),
|
22280 | html: createDOMFactory('html'),
|
22281 | i: createDOMFactory('i'),
|
22282 | iframe: createDOMFactory('iframe'),
|
22283 | img: createDOMFactory('img'),
|
22284 | input: createDOMFactory('input'),
|
22285 | ins: createDOMFactory('ins'),
|
22286 | kbd: createDOMFactory('kbd'),
|
22287 | keygen: createDOMFactory('keygen'),
|
22288 | label: createDOMFactory('label'),
|
22289 | legend: createDOMFactory('legend'),
|
22290 | li: createDOMFactory('li'),
|
22291 | link: createDOMFactory('link'),
|
22292 | main: createDOMFactory('main'),
|
22293 | map: createDOMFactory('map'),
|
22294 | mark: createDOMFactory('mark'),
|
22295 | menu: createDOMFactory('menu'),
|
22296 | menuitem: createDOMFactory('menuitem'),
|
22297 | meta: createDOMFactory('meta'),
|
22298 | meter: createDOMFactory('meter'),
|
22299 | nav: createDOMFactory('nav'),
|
22300 | noscript: createDOMFactory('noscript'),
|
22301 | object: createDOMFactory('object'),
|
22302 | ol: createDOMFactory('ol'),
|
22303 | optgroup: createDOMFactory('optgroup'),
|
22304 | option: createDOMFactory('option'),
|
22305 | output: createDOMFactory('output'),
|
22306 | p: createDOMFactory('p'),
|
22307 | param: createDOMFactory('param'),
|
22308 | picture: createDOMFactory('picture'),
|
22309 | pre: createDOMFactory('pre'),
|
22310 | progress: createDOMFactory('progress'),
|
22311 | q: createDOMFactory('q'),
|
22312 | rp: createDOMFactory('rp'),
|
22313 | rt: createDOMFactory('rt'),
|
22314 | ruby: createDOMFactory('ruby'),
|
22315 | s: createDOMFactory('s'),
|
22316 | samp: createDOMFactory('samp'),
|
22317 | script: createDOMFactory('script'),
|
22318 | section: createDOMFactory('section'),
|
22319 | select: createDOMFactory('select'),
|
22320 | small: createDOMFactory('small'),
|
22321 | source: createDOMFactory('source'),
|
22322 | span: createDOMFactory('span'),
|
22323 | strong: createDOMFactory('strong'),
|
22324 | style: createDOMFactory('style'),
|
22325 | sub: createDOMFactory('sub'),
|
22326 | summary: createDOMFactory('summary'),
|
22327 | sup: createDOMFactory('sup'),
|
22328 | table: createDOMFactory('table'),
|
22329 | tbody: createDOMFactory('tbody'),
|
22330 | td: createDOMFactory('td'),
|
22331 | textarea: createDOMFactory('textarea'),
|
22332 | tfoot: createDOMFactory('tfoot'),
|
22333 | th: createDOMFactory('th'),
|
22334 | thead: createDOMFactory('thead'),
|
22335 | time: createDOMFactory('time'),
|
22336 | title: createDOMFactory('title'),
|
22337 | tr: createDOMFactory('tr'),
|
22338 | track: createDOMFactory('track'),
|
22339 | u: createDOMFactory('u'),
|
22340 | ul: createDOMFactory('ul'),
|
22341 | 'var': createDOMFactory('var'),
|
22342 | video: createDOMFactory('video'),
|
22343 | wbr: createDOMFactory('wbr'),
|
22344 |
|
22345 |
|
22346 | circle: createDOMFactory('circle'),
|
22347 | clipPath: createDOMFactory('clipPath'),
|
22348 | defs: createDOMFactory('defs'),
|
22349 | ellipse: createDOMFactory('ellipse'),
|
22350 | g: createDOMFactory('g'),
|
22351 | image: createDOMFactory('image'),
|
22352 | line: createDOMFactory('line'),
|
22353 | linearGradient: createDOMFactory('linearGradient'),
|
22354 | mask: createDOMFactory('mask'),
|
22355 | path: createDOMFactory('path'),
|
22356 | pattern: createDOMFactory('pattern'),
|
22357 | polygon: createDOMFactory('polygon'),
|
22358 | polyline: createDOMFactory('polyline'),
|
22359 | radialGradient: createDOMFactory('radialGradient'),
|
22360 | rect: createDOMFactory('rect'),
|
22361 | stop: createDOMFactory('stop'),
|
22362 | svg: createDOMFactory('svg'),
|
22363 | text: createDOMFactory('text'),
|
22364 | tspan: createDOMFactory('tspan')
|
22365 | };
|
22366 |
|
22367 | module.exports = ReactDOMFactories;
|
22368 |
|
22369 | }),
|
22370 |
|
22371 | (function(module, exports, __webpack_require__) {
|
22372 |
|
22373 | "use strict";
|
22374 |
|
22375 |
|
22376 |
|
22377 |
|
22378 |
|
22379 |
|
22380 |
|
22381 |
|
22382 |
|
22383 |
|
22384 |
|
22385 | var ReactPropTypeLocationNames = {};
|
22386 |
|
22387 | if (process.env.NODE_ENV !== 'production') {
|
22388 | ReactPropTypeLocationNames = {
|
22389 | prop: 'prop',
|
22390 | context: 'context',
|
22391 | childContext: 'child context'
|
22392 | };
|
22393 | }
|
22394 |
|
22395 | module.exports = ReactPropTypeLocationNames;
|
22396 |
|
22397 | }),
|
22398 |
|
22399 | (function(module, exports, __webpack_require__) {
|
22400 |
|
22401 | "use strict";
|
22402 |
|
22403 |
|
22404 |
|
22405 |
|
22406 |
|
22407 |
|
22408 |
|
22409 |
|
22410 |
|
22411 |
|
22412 | var _require = __webpack_require__(13),
|
22413 | isValidElement = _require.isValidElement;
|
22414 |
|
22415 | var factory = __webpack_require__(51);
|
22416 |
|
22417 | module.exports = factory(isValidElement);
|
22418 |
|
22419 | }),
|
22420 |
|
22421 | (function(module, exports, __webpack_require__) {
|
22422 |
|
22423 | "use strict";
|
22424 |
|
22425 |
|
22426 |
|
22427 |
|
22428 |
|
22429 |
|
22430 |
|
22431 |
|
22432 |
|
22433 |
|
22434 |
|
22435 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
22436 |
|
22437 | module.exports = ReactPropTypesSecret;
|
22438 |
|
22439 | }),
|
22440 |
|
22441 | (function(module, exports, __webpack_require__) {
|
22442 |
|
22443 | "use strict";
|
22444 |
|
22445 |
|
22446 |
|
22447 |
|
22448 |
|
22449 |
|
22450 |
|
22451 |
|
22452 |
|
22453 |
|
22454 | module.exports = '15.6.2';
|
22455 |
|
22456 | }),
|
22457 |
|
22458 | (function(module, exports, __webpack_require__) {
|
22459 |
|
22460 | "use strict";
|
22461 |
|
22462 |
|
22463 |
|
22464 |
|
22465 |
|
22466 |
|
22467 |
|
22468 |
|
22469 |
|
22470 |
|
22471 | var _prodInvariant = __webpack_require__(14);
|
22472 |
|
22473 | var ReactPropTypeLocationNames = __webpack_require__(192);
|
22474 | var ReactPropTypesSecret = __webpack_require__(194);
|
22475 |
|
22476 | var invariant = __webpack_require__(0);
|
22477 | var warning = __webpack_require__(1);
|
22478 |
|
22479 | var ReactComponentTreeHook;
|
22480 |
|
22481 | if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') {
|
22482 |
|
22483 |
|
22484 |
|
22485 |
|
22486 |
|
22487 | ReactComponentTreeHook = __webpack_require__(8);
|
22488 | }
|
22489 |
|
22490 | var loggedTypeFailures = {};
|
22491 |
|
22492 |
|
22493 |
|
22494 |
|
22495 |
|
22496 |
|
22497 |
|
22498 |
|
22499 |
|
22500 |
|
22501 |
|
22502 |
|
22503 |
|
22504 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
22505 | for (var typeSpecName in typeSpecs) {
|
22506 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
22507 | var error;
|
22508 |
|
22509 |
|
22510 |
|
22511 | try {
|
22512 |
|
22513 |
|
22514 | !(typeof typeSpecs[typeSpecName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : _prodInvariant('84', componentName || 'React class', ReactPropTypeLocationNames[location], typeSpecName) : void 0;
|
22515 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
22516 | } catch (ex) {
|
22517 | error = ex;
|
22518 | }
|
22519 | process.env.NODE_ENV !== 'production' ? 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', ReactPropTypeLocationNames[location], typeSpecName, typeof error) : void 0;
|
22520 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
22521 |
|
22522 |
|
22523 | loggedTypeFailures[error.message] = true;
|
22524 |
|
22525 | var componentStackInfo = '';
|
22526 |
|
22527 | if (process.env.NODE_ENV !== 'production') {
|
22528 | if (!ReactComponentTreeHook) {
|
22529 | ReactComponentTreeHook = __webpack_require__(8);
|
22530 | }
|
22531 | if (debugID !== null) {
|
22532 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
22533 | } else if (element !== null) {
|
22534 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
22535 | }
|
22536 | }
|
22537 |
|
22538 | process.env.NODE_ENV !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
22539 | }
|
22540 | }
|
22541 | }
|
22542 | }
|
22543 |
|
22544 | module.exports = checkReactTypeSpec;
|
22545 |
|
22546 | }),
|
22547 |
|
22548 | (function(module, exports, __webpack_require__) {
|
22549 |
|
22550 | "use strict";
|
22551 |
|
22552 |
|
22553 |
|
22554 |
|
22555 |
|
22556 |
|
22557 |
|
22558 |
|
22559 |
|
22560 |
|
22561 | var _require = __webpack_require__(75),
|
22562 | Component = _require.Component;
|
22563 |
|
22564 | var _require2 = __webpack_require__(13),
|
22565 | isValidElement = _require2.isValidElement;
|
22566 |
|
22567 | var ReactNoopUpdateQueue = __webpack_require__(78);
|
22568 | var factory = __webpack_require__(96);
|
22569 |
|
22570 | module.exports = factory(Component, isValidElement, ReactNoopUpdateQueue);
|
22571 |
|
22572 | }),
|
22573 |
|
22574 | (function(module, exports, __webpack_require__) {
|
22575 |
|
22576 | "use strict";
|
22577 |
|
22578 |
|
22579 |
|
22580 |
|
22581 |
|
22582 |
|
22583 |
|
22584 |
|
22585 |
|
22586 |
|
22587 |
|
22588 | var nextDebugID = 1;
|
22589 |
|
22590 | function getNextDebugID() {
|
22591 | return nextDebugID++;
|
22592 | }
|
22593 |
|
22594 | module.exports = getNextDebugID;
|
22595 |
|
22596 | }),
|
22597 |
|
22598 | (function(module, exports, __webpack_require__) {
|
22599 |
|
22600 | "use strict";
|
22601 |
|
22602 |
|
22603 |
|
22604 |
|
22605 |
|
22606 |
|
22607 |
|
22608 |
|
22609 |
|
22610 | var _prodInvariant = __webpack_require__(14);
|
22611 |
|
22612 | var ReactElement = __webpack_require__(13);
|
22613 |
|
22614 | var invariant = __webpack_require__(0);
|
22615 |
|
22616 |
|
22617 |
|
22618 |
|
22619 |
|
22620 |
|
22621 |
|
22622 |
|
22623 |
|
22624 |
|
22625 |
|
22626 |
|
22627 |
|
22628 |
|
22629 |
|
22630 | function onlyChild(children) {
|
22631 | !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
|
22632 | return children;
|
22633 | }
|
22634 |
|
22635 | module.exports = onlyChild;
|
22636 |
|
22637 | }),
|
22638 |
|
22639 | (function(module, exports, __webpack_require__) {
|
22640 |
|
22641 | "use strict";
|
22642 |
|
22643 |
|
22644 |
|
22645 |
|
22646 |
|
22647 |
|
22648 |
|
22649 |
|
22650 |
|
22651 |
|
22652 | var _prodInvariant = __webpack_require__(14);
|
22653 |
|
22654 | var ReactCurrentOwner = __webpack_require__(11);
|
22655 | var REACT_ELEMENT_TYPE = __webpack_require__(76);
|
22656 |
|
22657 | var getIteratorFn = __webpack_require__(79);
|
22658 | var invariant = __webpack_require__(0);
|
22659 | var KeyEscapeUtils = __webpack_require__(188);
|
22660 | var warning = __webpack_require__(1);
|
22661 |
|
22662 | var SEPARATOR = '.';
|
22663 | var SUBSEPARATOR = ':';
|
22664 |
|
22665 |
|
22666 |
|
22667 |
|
22668 |
|
22669 |
|
22670 |
|
22671 |
|
22672 |
|
22673 |
|
22674 |
|
22675 |
|
22676 | var didWarnAboutMaps = false;
|
22677 |
|
22678 |
|
22679 |
|
22680 |
|
22681 |
|
22682 |
|
22683 |
|
22684 |
|
22685 | function getComponentKey(component, index) {
|
22686 |
|
22687 |
|
22688 | if (component && typeof component === 'object' && component.key != null) {
|
22689 |
|
22690 | return KeyEscapeUtils.escape(component.key);
|
22691 | }
|
22692 |
|
22693 | return index.toString(36);
|
22694 | }
|
22695 |
|
22696 |
|
22697 |
|
22698 |
|
22699 |
|
22700 |
|
22701 |
|
22702 |
|
22703 |
|
22704 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
22705 | var type = typeof children;
|
22706 |
|
22707 | if (type === 'undefined' || type === 'boolean') {
|
22708 |
|
22709 | children = null;
|
22710 | }
|
22711 |
|
22712 | if (children === null || type === 'string' || type === 'number' ||
|
22713 |
|
22714 |
|
22715 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
22716 | callback(traverseContext, children,
|
22717 |
|
22718 |
|
22719 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
22720 | return 1;
|
22721 | }
|
22722 |
|
22723 | var child;
|
22724 | var nextName;
|
22725 | var subtreeCount = 0;
|
22726 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
22727 |
|
22728 | if (Array.isArray(children)) {
|
22729 | for (var i = 0; i < children.length; i++) {
|
22730 | child = children[i];
|
22731 | nextName = nextNamePrefix + getComponentKey(child, i);
|
22732 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
22733 | }
|
22734 | } else {
|
22735 | var iteratorFn = getIteratorFn(children);
|
22736 | if (iteratorFn) {
|
22737 | var iterator = iteratorFn.call(children);
|
22738 | var step;
|
22739 | if (iteratorFn !== children.entries) {
|
22740 | var ii = 0;
|
22741 | while (!(step = iterator.next()).done) {
|
22742 | child = step.value;
|
22743 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
22744 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
22745 | }
|
22746 | } else {
|
22747 | if (process.env.NODE_ENV !== 'production') {
|
22748 | var mapsAsChildrenAddendum = '';
|
22749 | if (ReactCurrentOwner.current) {
|
22750 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
22751 | if (mapsAsChildrenOwnerName) {
|
22752 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
22753 | }
|
22754 | }
|
22755 | process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.%s', mapsAsChildrenAddendum) : void 0;
|
22756 | didWarnAboutMaps = true;
|
22757 | }
|
22758 |
|
22759 | while (!(step = iterator.next()).done) {
|
22760 | var entry = step.value;
|
22761 | if (entry) {
|
22762 | child = entry[1];
|
22763 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
22764 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
22765 | }
|
22766 | }
|
22767 | }
|
22768 | } else if (type === 'object') {
|
22769 | var addendum = '';
|
22770 | if (process.env.NODE_ENV !== 'production') {
|
22771 | addendum = ' If you meant to render a collection of children, use an array ' + 'instead or wrap the object using createFragment(object) from the ' + 'React add-ons.';
|
22772 | if (children._isReactElement) {
|
22773 | addendum = " It looks like you're using an element created by a different " + 'version of React. Make sure to use only one copy of React.';
|
22774 | }
|
22775 | if (ReactCurrentOwner.current) {
|
22776 | var name = ReactCurrentOwner.current.getName();
|
22777 | if (name) {
|
22778 | addendum += ' Check the render method of `' + name + '`.';
|
22779 | }
|
22780 | }
|
22781 | }
|
22782 | var childrenString = String(children);
|
22783 | true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : _prodInvariant('31', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : void 0;
|
22784 | }
|
22785 | }
|
22786 |
|
22787 | return subtreeCount;
|
22788 | }
|
22789 |
|
22790 |
|
22791 |
|
22792 |
|
22793 |
|
22794 |
|
22795 |
|
22796 |
|
22797 |
|
22798 |
|
22799 |
|
22800 |
|
22801 |
|
22802 |
|
22803 |
|
22804 |
|
22805 |
|
22806 | function traverseAllChildren(children, callback, traverseContext) {
|
22807 | if (children == null) {
|
22808 | return 0;
|
22809 | }
|
22810 |
|
22811 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
22812 | }
|
22813 |
|
22814 | module.exports = traverseAllChildren;
|
22815 |
|
22816 | }),
|
22817 |
|
22818 | (function(module, exports) {
|
22819 |
|
22820 | module.exports = require("body-parser");
|
22821 |
|
22822 | }),
|
22823 |
|
22824 | (function(module, exports) {
|
22825 |
|
22826 | module.exports = require("cookie");
|
22827 |
|
22828 | }),
|
22829 |
|
22830 | (function(module, exports) {
|
22831 |
|
22832 | module.exports = require("cookie-parser");
|
22833 |
|
22834 | }),
|
22835 |
|
22836 | (function(module, exports) {
|
22837 |
|
22838 | module.exports = require("esniff");
|
22839 |
|
22840 | }),
|
22841 |
|
22842 | (function(module, exports) {
|
22843 |
|
22844 | module.exports = require("express");
|
22845 |
|
22846 | }),
|
22847 |
|
22848 | (function(module, exports) {
|
22849 |
|
22850 | module.exports = require("fluent-logger");
|
22851 |
|
22852 | }),
|
22853 |
|
22854 | (function(module, exports) {
|
22855 |
|
22856 | module.exports = require("forcedomain");
|
22857 |
|
22858 | }),
|
22859 |
|
22860 | (function(module, exports) {
|
22861 |
|
22862 | module.exports = require("hoist-non-react-statics");
|
22863 |
|
22864 | }),
|
22865 |
|
22866 | (function(module, exports) {
|
22867 |
|
22868 | module.exports = require("morgan");
|
22869 |
|
22870 | }),
|
22871 |
|
22872 | (function(module, exports) {
|
22873 |
|
22874 | module.exports = require("parseurl");
|
22875 |
|
22876 | }),
|
22877 |
|
22878 | (function(module, exports) {
|
22879 |
|
22880 | module.exports = require("preconditions");
|
22881 |
|
22882 | }),
|
22883 |
|
22884 | (function(module, exports) {
|
22885 |
|
22886 | module.exports = require("querystring");
|
22887 |
|
22888 | }),
|
22889 |
|
22890 | (function(module, exports) {
|
22891 |
|
22892 | module.exports = require("react-redux");
|
22893 |
|
22894 | }),
|
22895 |
|
22896 | (function(module, exports) {
|
22897 |
|
22898 | module.exports = require("react-router");
|
22899 |
|
22900 | }),
|
22901 |
|
22902 | (function(module, exports) {
|
22903 |
|
22904 | module.exports = require("redux");
|
22905 |
|
22906 | }),
|
22907 |
|
22908 | (function(module, exports) {
|
22909 |
|
22910 | module.exports = require("redux-thunk");
|
22911 |
|
22912 | }),
|
22913 |
|
22914 | (function(module, exports) {
|
22915 |
|
22916 | module.exports = require("rotating-file-stream");
|
22917 |
|
22918 | }),
|
22919 |
|
22920 | (function(module, exports) {
|
22921 |
|
22922 | module.exports = require("url");
|
22923 |
|
22924 | }),
|
22925 |
|
22926 | (function(module, exports) {
|
22927 |
|
22928 | module.exports = require("winston");
|
22929 |
|
22930 | }),
|
22931 |
|
22932 | (function(module, exports) {
|
22933 |
|
22934 | module.exports = require("winston-daily-rotate-file");
|
22935 |
|
22936 | })
|
22937 | ]);
|
22938 |
|
\ | No newline at end of file |