1 | |
2 |
|
3 |
|
4 |
|
5 | ;(function(f) {
|
6 |
|
7 | if (typeof exports === "object" && typeof module !== "undefined") {
|
8 | module.exports = f(require('react'));
|
9 |
|
10 |
|
11 | } else if (typeof define === "function" && define.amd) {
|
12 | define(['react'], f);
|
13 |
|
14 |
|
15 | } else {
|
16 | var g;
|
17 | if (typeof window !== "undefined") {
|
18 | g = window;
|
19 | } else if (typeof global !== "undefined") {
|
20 | g = global;
|
21 | } else if (typeof self !== "undefined") {
|
22 | g = self;
|
23 | } else {
|
24 |
|
25 |
|
26 |
|
27 | g = this;
|
28 | }
|
29 | g.ReactDOMServer = f(g.React);
|
30 | }
|
31 | })(function(React) {
|
32 | return (function(f){return f()})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | 'use strict';
|
42 |
|
43 | var ARIADOMPropertyConfig = {
|
44 | Properties: {
|
45 |
|
46 | 'aria-current': 0,
|
47 | 'aria-details': 0,
|
48 | 'aria-disabled': 0,
|
49 | 'aria-hidden': 0,
|
50 | 'aria-invalid': 0,
|
51 | 'aria-keyshortcuts': 0,
|
52 | 'aria-label': 0,
|
53 | 'aria-roledescription': 0,
|
54 |
|
55 | 'aria-autocomplete': 0,
|
56 | 'aria-checked': 0,
|
57 | 'aria-expanded': 0,
|
58 | 'aria-haspopup': 0,
|
59 | 'aria-level': 0,
|
60 | 'aria-modal': 0,
|
61 | 'aria-multiline': 0,
|
62 | 'aria-multiselectable': 0,
|
63 | 'aria-orientation': 0,
|
64 | 'aria-placeholder': 0,
|
65 | 'aria-pressed': 0,
|
66 | 'aria-readonly': 0,
|
67 | 'aria-required': 0,
|
68 | 'aria-selected': 0,
|
69 | 'aria-sort': 0,
|
70 | 'aria-valuemax': 0,
|
71 | 'aria-valuemin': 0,
|
72 | 'aria-valuenow': 0,
|
73 | 'aria-valuetext': 0,
|
74 |
|
75 | 'aria-atomic': 0,
|
76 | 'aria-busy': 0,
|
77 | 'aria-live': 0,
|
78 | 'aria-relevant': 0,
|
79 |
|
80 | 'aria-dropeffect': 0,
|
81 | 'aria-grabbed': 0,
|
82 |
|
83 | 'aria-activedescendant': 0,
|
84 | 'aria-colcount': 0,
|
85 | 'aria-colindex': 0,
|
86 | 'aria-colspan': 0,
|
87 | 'aria-controls': 0,
|
88 | 'aria-describedby': 0,
|
89 | 'aria-errormessage': 0,
|
90 | 'aria-flowto': 0,
|
91 | 'aria-labelledby': 0,
|
92 | 'aria-owns': 0,
|
93 | 'aria-posinset': 0,
|
94 | 'aria-rowcount': 0,
|
95 | 'aria-rowindex': 0,
|
96 | 'aria-rowspan': 0,
|
97 | 'aria-setsize': 0
|
98 | },
|
99 | DOMAttributeNames: {},
|
100 | DOMPropertyNames: {}
|
101 | };
|
102 |
|
103 | module.exports = ARIADOMPropertyConfig;
|
104 | },{}],2:[function(_dereq_,module,exports){
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 | 'use strict';
|
114 |
|
115 | var ReactDOMComponentTree = _dereq_(32);
|
116 |
|
117 | var focusNode = _dereq_(135);
|
118 |
|
119 | var AutoFocusUtils = {
|
120 | focusDOMComponent: function () {
|
121 | focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
|
122 | }
|
123 | };
|
124 |
|
125 | module.exports = AutoFocusUtils;
|
126 | },{"135":135,"32":32}],3:[function(_dereq_,module,exports){
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | 'use strict';
|
136 |
|
137 | var EventPropagators = _dereq_(19);
|
138 | var ExecutionEnvironment = _dereq_(127);
|
139 | var FallbackCompositionState = _dereq_(20);
|
140 | var SyntheticCompositionEvent = _dereq_(82);
|
141 | var SyntheticInputEvent = _dereq_(86);
|
142 |
|
143 | var END_KEYCODES = [9, 13, 27, 32];
|
144 | var START_KEYCODE = 229;
|
145 |
|
146 | var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
|
147 |
|
148 | var documentMode = null;
|
149 | if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
|
150 | documentMode = document.documentMode;
|
151 | }
|
152 |
|
153 |
|
154 |
|
155 |
|
156 | var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
|
157 |
|
158 |
|
159 |
|
160 |
|
161 | var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 | function isPresto() {
|
168 | var opera = window.opera;
|
169 | return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
|
170 | }
|
171 |
|
172 | var SPACEBAR_CODE = 32;
|
173 | var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
|
174 |
|
175 |
|
176 | var eventTypes = {
|
177 | beforeInput: {
|
178 | phasedRegistrationNames: {
|
179 | bubbled: 'onBeforeInput',
|
180 | captured: 'onBeforeInputCapture'
|
181 | },
|
182 | dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']
|
183 | },
|
184 | compositionEnd: {
|
185 | phasedRegistrationNames: {
|
186 | bubbled: 'onCompositionEnd',
|
187 | captured: 'onCompositionEndCapture'
|
188 | },
|
189 | dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
190 | },
|
191 | compositionStart: {
|
192 | phasedRegistrationNames: {
|
193 | bubbled: 'onCompositionStart',
|
194 | captured: 'onCompositionStartCapture'
|
195 | },
|
196 | dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
197 | },
|
198 | compositionUpdate: {
|
199 | phasedRegistrationNames: {
|
200 | bubbled: 'onCompositionUpdate',
|
201 | captured: 'onCompositionUpdateCapture'
|
202 | },
|
203 | dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']
|
204 | }
|
205 | };
|
206 |
|
207 |
|
208 | var hasSpaceKeypress = false;
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 | function isKeypressCommand(nativeEvent) {
|
216 | return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
|
217 |
|
218 | !(nativeEvent.ctrlKey && nativeEvent.altKey);
|
219 | }
|
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 | function getCompositionEventType(topLevelType) {
|
228 | switch (topLevelType) {
|
229 | case 'topCompositionStart':
|
230 | return eventTypes.compositionStart;
|
231 | case 'topCompositionEnd':
|
232 | return eventTypes.compositionEnd;
|
233 | case 'topCompositionUpdate':
|
234 | return eventTypes.compositionUpdate;
|
235 | }
|
236 | }
|
237 |
|
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 | function isFallbackCompositionStart(topLevelType, nativeEvent) {
|
247 | return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;
|
248 | }
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
|
258 | switch (topLevelType) {
|
259 | case 'topKeyUp':
|
260 |
|
261 | return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
|
262 | case 'topKeyDown':
|
263 |
|
264 |
|
265 | return nativeEvent.keyCode !== START_KEYCODE;
|
266 | case 'topKeyPress':
|
267 | case 'topMouseDown':
|
268 | case 'topBlur':
|
269 |
|
270 | return true;
|
271 | default:
|
272 | return false;
|
273 | }
|
274 | }
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 | function getDataFromCustomEvent(nativeEvent) {
|
286 | var detail = nativeEvent.detail;
|
287 | if (typeof detail === 'object' && 'data' in detail) {
|
288 | return detail.data;
|
289 | }
|
290 | return null;
|
291 | }
|
292 |
|
293 |
|
294 | var currentComposition = null;
|
295 |
|
296 |
|
297 |
|
298 |
|
299 | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
300 | var eventType;
|
301 | var fallbackData;
|
302 |
|
303 | if (canUseCompositionEvent) {
|
304 | eventType = getCompositionEventType(topLevelType);
|
305 | } else if (!currentComposition) {
|
306 | if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
|
307 | eventType = eventTypes.compositionStart;
|
308 | }
|
309 | } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
310 | eventType = eventTypes.compositionEnd;
|
311 | }
|
312 |
|
313 | if (!eventType) {
|
314 | return null;
|
315 | }
|
316 |
|
317 | if (useFallbackCompositionData) {
|
318 |
|
319 |
|
320 | if (!currentComposition && eventType === eventTypes.compositionStart) {
|
321 | currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
|
322 | } else if (eventType === eventTypes.compositionEnd) {
|
323 | if (currentComposition) {
|
324 | fallbackData = currentComposition.getData();
|
325 | }
|
326 | }
|
327 | }
|
328 |
|
329 | var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
|
330 |
|
331 | if (fallbackData) {
|
332 |
|
333 |
|
334 | event.data = fallbackData;
|
335 | } else {
|
336 | var customData = getDataFromCustomEvent(nativeEvent);
|
337 | if (customData !== null) {
|
338 | event.data = customData;
|
339 | }
|
340 | }
|
341 |
|
342 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
343 | return event;
|
344 | }
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
|
352 | switch (topLevelType) {
|
353 | case 'topCompositionEnd':
|
354 | return getDataFromCustomEvent(nativeEvent);
|
355 | case 'topKeyPress':
|
356 | |
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 |
|
370 | var which = nativeEvent.which;
|
371 | if (which !== SPACEBAR_CODE) {
|
372 | return null;
|
373 | }
|
374 |
|
375 | hasSpaceKeypress = true;
|
376 | return SPACEBAR_CHAR;
|
377 |
|
378 | case 'topTextInput':
|
379 |
|
380 | var chars = nativeEvent.data;
|
381 |
|
382 |
|
383 |
|
384 |
|
385 | if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
|
386 | return null;
|
387 | }
|
388 |
|
389 | return chars;
|
390 |
|
391 | default:
|
392 |
|
393 | return null;
|
394 | }
|
395 | }
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
|
406 |
|
407 |
|
408 |
|
409 |
|
410 | if (currentComposition) {
|
411 | if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
|
412 | var chars = currentComposition.getData();
|
413 | FallbackCompositionState.release(currentComposition);
|
414 | currentComposition = null;
|
415 | return chars;
|
416 | }
|
417 | return null;
|
418 | }
|
419 |
|
420 | switch (topLevelType) {
|
421 | case 'topPaste':
|
422 |
|
423 |
|
424 | return null;
|
425 | case 'topKeyPress':
|
426 | |
427 |
|
428 |
|
429 |
|
430 |
|
431 |
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 | if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
|
443 | return String.fromCharCode(nativeEvent.which);
|
444 | }
|
445 | return null;
|
446 | case 'topCompositionEnd':
|
447 | return useFallbackCompositionData ? null : nativeEvent.data;
|
448 | default:
|
449 | return null;
|
450 | }
|
451 | }
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
460 | var chars;
|
461 |
|
462 | if (canUseTextInputEvent) {
|
463 | chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
|
464 | } else {
|
465 | chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
|
466 | }
|
467 |
|
468 |
|
469 |
|
470 | if (!chars) {
|
471 | return null;
|
472 | }
|
473 |
|
474 | var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
|
475 |
|
476 | event.data = chars;
|
477 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
478 | return event;
|
479 | }
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 |
|
486 |
|
487 |
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 |
|
497 |
|
498 |
|
499 | var BeforeInputEventPlugin = {
|
500 | eventTypes: eventTypes,
|
501 |
|
502 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
503 | return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
|
504 | }
|
505 | };
|
506 |
|
507 | module.exports = BeforeInputEventPlugin;
|
508 | },{"127":127,"19":19,"20":20,"82":82,"86":86}],4:[function(_dereq_,module,exports){
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 | 'use strict';
|
518 |
|
519 |
|
520 |
|
521 |
|
522 |
|
523 | var isUnitlessNumber = {
|
524 | animationIterationCount: true,
|
525 | borderImageOutset: true,
|
526 | borderImageSlice: true,
|
527 | borderImageWidth: true,
|
528 | boxFlex: true,
|
529 | boxFlexGroup: true,
|
530 | boxOrdinalGroup: true,
|
531 | columnCount: true,
|
532 | columns: true,
|
533 | flex: true,
|
534 | flexGrow: true,
|
535 | flexPositive: true,
|
536 | flexShrink: true,
|
537 | flexNegative: true,
|
538 | flexOrder: true,
|
539 | gridRow: true,
|
540 | gridRowEnd: true,
|
541 | gridRowSpan: true,
|
542 | gridRowStart: true,
|
543 | gridColumn: true,
|
544 | gridColumnEnd: true,
|
545 | gridColumnSpan: true,
|
546 | gridColumnStart: true,
|
547 | fontWeight: true,
|
548 | lineClamp: true,
|
549 | lineHeight: true,
|
550 | opacity: true,
|
551 | order: true,
|
552 | orphans: true,
|
553 | tabSize: true,
|
554 | widows: true,
|
555 | zIndex: true,
|
556 | zoom: true,
|
557 |
|
558 |
|
559 | fillOpacity: true,
|
560 | floodOpacity: true,
|
561 | stopOpacity: true,
|
562 | strokeDasharray: true,
|
563 | strokeDashoffset: true,
|
564 | strokeMiterlimit: true,
|
565 | strokeOpacity: true,
|
566 | strokeWidth: true
|
567 | };
|
568 |
|
569 |
|
570 |
|
571 |
|
572 |
|
573 |
|
574 |
|
575 | function prefixKey(prefix, key) {
|
576 | return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
577 | }
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 | var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
584 |
|
585 |
|
586 |
|
587 | Object.keys(isUnitlessNumber).forEach(function (prop) {
|
588 | prefixes.forEach(function (prefix) {
|
589 | isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
590 | });
|
591 | });
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 | var shorthandPropertyExpansions = {
|
603 | background: {
|
604 | backgroundAttachment: true,
|
605 | backgroundColor: true,
|
606 | backgroundImage: true,
|
607 | backgroundPositionX: true,
|
608 | backgroundPositionY: true,
|
609 | backgroundRepeat: true
|
610 | },
|
611 | backgroundPosition: {
|
612 | backgroundPositionX: true,
|
613 | backgroundPositionY: true
|
614 | },
|
615 | border: {
|
616 | borderWidth: true,
|
617 | borderStyle: true,
|
618 | borderColor: true
|
619 | },
|
620 | borderBottom: {
|
621 | borderBottomWidth: true,
|
622 | borderBottomStyle: true,
|
623 | borderBottomColor: true
|
624 | },
|
625 | borderLeft: {
|
626 | borderLeftWidth: true,
|
627 | borderLeftStyle: true,
|
628 | borderLeftColor: true
|
629 | },
|
630 | borderRight: {
|
631 | borderRightWidth: true,
|
632 | borderRightStyle: true,
|
633 | borderRightColor: true
|
634 | },
|
635 | borderTop: {
|
636 | borderTopWidth: true,
|
637 | borderTopStyle: true,
|
638 | borderTopColor: true
|
639 | },
|
640 | font: {
|
641 | fontStyle: true,
|
642 | fontVariant: true,
|
643 | fontWeight: true,
|
644 | fontSize: true,
|
645 | lineHeight: true,
|
646 | fontFamily: true
|
647 | },
|
648 | outline: {
|
649 | outlineWidth: true,
|
650 | outlineStyle: true,
|
651 | outlineColor: true
|
652 | }
|
653 | };
|
654 |
|
655 | var CSSProperty = {
|
656 | isUnitlessNumber: isUnitlessNumber,
|
657 | shorthandPropertyExpansions: shorthandPropertyExpansions
|
658 | };
|
659 |
|
660 | module.exports = CSSProperty;
|
661 | },{}],5:[function(_dereq_,module,exports){
|
662 |
|
663 |
|
664 |
|
665 |
|
666 |
|
667 |
|
668 |
|
669 |
|
670 | 'use strict';
|
671 |
|
672 | var CSSProperty = _dereq_(4);
|
673 | var ExecutionEnvironment = _dereq_(127);
|
674 | var ReactInstrumentation = _dereq_(59);
|
675 |
|
676 | var camelizeStyleName = _dereq_(129);
|
677 | var dangerousStyleValue = _dereq_(99);
|
678 | var hyphenateStyleName = _dereq_(140);
|
679 | var memoizeStringOnly = _dereq_(144);
|
680 | var warning = _dereq_(148);
|
681 |
|
682 | var processStyleName = memoizeStringOnly(function (styleName) {
|
683 | return hyphenateStyleName(styleName);
|
684 | });
|
685 |
|
686 | var hasShorthandPropertyBug = false;
|
687 | var styleFloatAccessor = 'cssFloat';
|
688 | if (ExecutionEnvironment.canUseDOM) {
|
689 | var tempStyle = document.createElement('div').style;
|
690 | try {
|
691 |
|
692 | tempStyle.font = '';
|
693 | } catch (e) {
|
694 | hasShorthandPropertyBug = true;
|
695 | }
|
696 |
|
697 | if (document.documentElement.style.cssFloat === undefined) {
|
698 | styleFloatAccessor = 'styleFloat';
|
699 | }
|
700 | }
|
701 |
|
702 | if ("development" !== 'production') {
|
703 |
|
704 | var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
705 |
|
706 |
|
707 | var badStyleValueWithSemicolonPattern = /;\s*$/;
|
708 |
|
709 | var warnedStyleNames = {};
|
710 | var warnedStyleValues = {};
|
711 | var warnedForNaNValue = false;
|
712 |
|
713 | var warnHyphenatedStyleName = function (name, owner) {
|
714 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
715 | return;
|
716 | }
|
717 |
|
718 | warnedStyleNames[name] = true;
|
719 | "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
|
720 | };
|
721 |
|
722 | var warnBadVendoredStyleName = function (name, owner) {
|
723 | if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
724 | return;
|
725 | }
|
726 |
|
727 | warnedStyleNames[name] = true;
|
728 | "development" !== '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;
|
729 | };
|
730 |
|
731 | var warnStyleValueWithSemicolon = function (name, value, owner) {
|
732 | if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
733 | return;
|
734 | }
|
735 |
|
736 | warnedStyleValues[value] = true;
|
737 | "development" !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon.%s " + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
|
738 | };
|
739 |
|
740 | var warnStyleValueIsNaN = function (name, value, owner) {
|
741 | if (warnedForNaNValue) {
|
742 | return;
|
743 | }
|
744 |
|
745 | warnedForNaNValue = true;
|
746 | "development" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
|
747 | };
|
748 |
|
749 | var checkRenderMessage = function (owner) {
|
750 | if (owner) {
|
751 | var name = owner.getName();
|
752 | if (name) {
|
753 | return ' Check the render method of `' + name + '`.';
|
754 | }
|
755 | }
|
756 | return '';
|
757 | };
|
758 |
|
759 | |
760 |
|
761 |
|
762 |
|
763 |
|
764 | var warnValidStyle = function (name, value, component) {
|
765 | var owner;
|
766 | if (component) {
|
767 | owner = component._currentElement._owner;
|
768 | }
|
769 | if (name.indexOf('-') > -1) {
|
770 | warnHyphenatedStyleName(name, owner);
|
771 | } else if (badVendoredStyleNamePattern.test(name)) {
|
772 | warnBadVendoredStyleName(name, owner);
|
773 | } else if (badStyleValueWithSemicolonPattern.test(value)) {
|
774 | warnStyleValueWithSemicolon(name, value, owner);
|
775 | }
|
776 |
|
777 | if (typeof value === 'number' && isNaN(value)) {
|
778 | warnStyleValueIsNaN(name, value, owner);
|
779 | }
|
780 | };
|
781 | }
|
782 |
|
783 |
|
784 |
|
785 |
|
786 | var CSSPropertyOperations = {
|
787 | |
788 |
|
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 | createMarkupForStyles: function (styles, component) {
|
801 | var serialized = '';
|
802 | for (var styleName in styles) {
|
803 | if (!styles.hasOwnProperty(styleName)) {
|
804 | continue;
|
805 | }
|
806 | var isCustomProperty = styleName.indexOf('--') === 0;
|
807 | var styleValue = styles[styleName];
|
808 | if ("development" !== 'production') {
|
809 | if (!isCustomProperty) {
|
810 | warnValidStyle(styleName, styleValue, component);
|
811 | }
|
812 | }
|
813 | if (styleValue != null) {
|
814 | serialized += processStyleName(styleName) + ':';
|
815 | serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
|
816 | }
|
817 | }
|
818 | return serialized || null;
|
819 | },
|
820 |
|
821 | |
822 |
|
823 |
|
824 |
|
825 |
|
826 |
|
827 |
|
828 |
|
829 | setValueForStyles: function (node, styles, component) {
|
830 | if ("development" !== 'production') {
|
831 | ReactInstrumentation.debugTool.onHostOperation({
|
832 | instanceID: component._debugID,
|
833 | type: 'update styles',
|
834 | payload: styles
|
835 | });
|
836 | }
|
837 |
|
838 | var style = node.style;
|
839 | for (var styleName in styles) {
|
840 | if (!styles.hasOwnProperty(styleName)) {
|
841 | continue;
|
842 | }
|
843 | var isCustomProperty = styleName.indexOf('--') === 0;
|
844 | if ("development" !== 'production') {
|
845 | if (!isCustomProperty) {
|
846 | warnValidStyle(styleName, styles[styleName], component);
|
847 | }
|
848 | }
|
849 | var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
|
850 | if (styleName === 'float' || styleName === 'cssFloat') {
|
851 | styleName = styleFloatAccessor;
|
852 | }
|
853 | if (isCustomProperty) {
|
854 | style.setProperty(styleName, styleValue);
|
855 | } else if (styleValue) {
|
856 | style[styleName] = styleValue;
|
857 | } else {
|
858 | var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
|
859 | if (expansion) {
|
860 |
|
861 |
|
862 | for (var individualStyleName in expansion) {
|
863 | style[individualStyleName] = '';
|
864 | }
|
865 | } else {
|
866 | style[styleName] = '';
|
867 | }
|
868 | }
|
869 | }
|
870 | }
|
871 | };
|
872 |
|
873 | module.exports = CSSPropertyOperations;
|
874 | },{"127":127,"129":129,"140":140,"144":144,"148":148,"4":4,"59":59,"99":99}],6:[function(_dereq_,module,exports){
|
875 |
|
876 |
|
877 |
|
878 |
|
879 |
|
880 |
|
881 |
|
882 |
|
883 |
|
884 | 'use strict';
|
885 |
|
886 | var _prodInvariant = _dereq_(116);
|
887 |
|
888 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
889 |
|
890 | var PooledClass = _dereq_(24);
|
891 |
|
892 | var invariant = _dereq_(141);
|
893 |
|
894 |
|
895 |
|
896 |
|
897 |
|
898 |
|
899 |
|
900 |
|
901 |
|
902 |
|
903 |
|
904 |
|
905 |
|
906 | var CallbackQueue = function () {
|
907 | function CallbackQueue(arg) {
|
908 | _classCallCheck(this, CallbackQueue);
|
909 |
|
910 | this._callbacks = null;
|
911 | this._contexts = null;
|
912 | this._arg = arg;
|
913 | }
|
914 |
|
915 | |
916 |
|
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 |
|
924 | CallbackQueue.prototype.enqueue = function enqueue(callback, context) {
|
925 | this._callbacks = this._callbacks || [];
|
926 | this._callbacks.push(callback);
|
927 | this._contexts = this._contexts || [];
|
928 | this._contexts.push(context);
|
929 | };
|
930 |
|
931 | |
932 |
|
933 |
|
934 |
|
935 |
|
936 |
|
937 |
|
938 |
|
939 | CallbackQueue.prototype.notifyAll = function notifyAll() {
|
940 | var callbacks = this._callbacks;
|
941 | var contexts = this._contexts;
|
942 | var arg = this._arg;
|
943 | if (callbacks && contexts) {
|
944 | !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
|
945 | this._callbacks = null;
|
946 | this._contexts = null;
|
947 | for (var i = 0; i < callbacks.length; i++) {
|
948 | callbacks[i].call(contexts[i], arg);
|
949 | }
|
950 | callbacks.length = 0;
|
951 | contexts.length = 0;
|
952 | }
|
953 | };
|
954 |
|
955 | CallbackQueue.prototype.checkpoint = function checkpoint() {
|
956 | return this._callbacks ? this._callbacks.length : 0;
|
957 | };
|
958 |
|
959 | CallbackQueue.prototype.rollback = function rollback(len) {
|
960 | if (this._callbacks && this._contexts) {
|
961 | this._callbacks.length = len;
|
962 | this._contexts.length = len;
|
963 | }
|
964 | };
|
965 |
|
966 | |
967 |
|
968 |
|
969 |
|
970 |
|
971 |
|
972 |
|
973 | CallbackQueue.prototype.reset = function reset() {
|
974 | this._callbacks = null;
|
975 | this._contexts = null;
|
976 | };
|
977 |
|
978 | |
979 |
|
980 |
|
981 |
|
982 |
|
983 | CallbackQueue.prototype.destructor = function destructor() {
|
984 | this.reset();
|
985 | };
|
986 |
|
987 | return CallbackQueue;
|
988 | }();
|
989 |
|
990 | module.exports = PooledClass.addPoolingTo(CallbackQueue);
|
991 | },{"116":116,"141":141,"24":24}],7:[function(_dereq_,module,exports){
|
992 |
|
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 | 'use strict';
|
1001 |
|
1002 | var EventPluginHub = _dereq_(16);
|
1003 | var EventPropagators = _dereq_(19);
|
1004 | var ExecutionEnvironment = _dereq_(127);
|
1005 | var ReactDOMComponentTree = _dereq_(32);
|
1006 | var ReactUpdates = _dereq_(75);
|
1007 | var SyntheticEvent = _dereq_(84);
|
1008 |
|
1009 | var inputValueTracking = _dereq_(111);
|
1010 | var getEventTarget = _dereq_(106);
|
1011 | var isEventSupported = _dereq_(113);
|
1012 | var isTextInputElement = _dereq_(114);
|
1013 |
|
1014 | var eventTypes = {
|
1015 | change: {
|
1016 | phasedRegistrationNames: {
|
1017 | bubbled: 'onChange',
|
1018 | captured: 'onChangeCapture'
|
1019 | },
|
1020 | dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']
|
1021 | }
|
1022 | };
|
1023 |
|
1024 | function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
|
1025 | var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, target);
|
1026 | event.type = 'change';
|
1027 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
1028 | return event;
|
1029 | }
|
1030 |
|
1031 |
|
1032 |
|
1033 | var activeElement = null;
|
1034 | var activeElementInst = null;
|
1035 |
|
1036 |
|
1037 |
|
1038 |
|
1039 | function shouldUseChangeEvent(elem) {
|
1040 | var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
|
1041 | return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
|
1042 | }
|
1043 |
|
1044 | var doesChangeEventBubble = false;
|
1045 | if (ExecutionEnvironment.canUseDOM) {
|
1046 |
|
1047 | doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
|
1048 | }
|
1049 |
|
1050 | function manualDispatchChangeEvent(nativeEvent) {
|
1051 | var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));
|
1052 |
|
1053 |
|
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 |
|
1059 |
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 | ReactUpdates.batchedUpdates(runEventInBatch, event);
|
1065 | }
|
1066 |
|
1067 | function runEventInBatch(event) {
|
1068 | EventPluginHub.enqueueEvents(event);
|
1069 | EventPluginHub.processEventQueue(false);
|
1070 | }
|
1071 |
|
1072 | function startWatchingForChangeEventIE8(target, targetInst) {
|
1073 | activeElement = target;
|
1074 | activeElementInst = targetInst;
|
1075 | activeElement.attachEvent('onchange', manualDispatchChangeEvent);
|
1076 | }
|
1077 |
|
1078 | function stopWatchingForChangeEventIE8() {
|
1079 | if (!activeElement) {
|
1080 | return;
|
1081 | }
|
1082 | activeElement.detachEvent('onchange', manualDispatchChangeEvent);
|
1083 | activeElement = null;
|
1084 | activeElementInst = null;
|
1085 | }
|
1086 |
|
1087 | function getInstIfValueChanged(targetInst, nativeEvent) {
|
1088 | var updated = inputValueTracking.updateValueIfChanged(targetInst);
|
1089 | var simulated = nativeEvent.simulated === true && ChangeEventPlugin._allowSimulatedPassThrough;
|
1090 |
|
1091 | if (updated || simulated) {
|
1092 | return targetInst;
|
1093 | }
|
1094 | }
|
1095 |
|
1096 | function getTargetInstForChangeEvent(topLevelType, targetInst) {
|
1097 | if (topLevelType === 'topChange') {
|
1098 | return targetInst;
|
1099 | }
|
1100 | }
|
1101 |
|
1102 | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
|
1103 | if (topLevelType === 'topFocus') {
|
1104 |
|
1105 |
|
1106 | stopWatchingForChangeEventIE8();
|
1107 | startWatchingForChangeEventIE8(target, targetInst);
|
1108 | } else if (topLevelType === 'topBlur') {
|
1109 | stopWatchingForChangeEventIE8();
|
1110 | }
|
1111 | }
|
1112 |
|
1113 |
|
1114 |
|
1115 |
|
1116 | var isInputEventSupported = false;
|
1117 | if (ExecutionEnvironment.canUseDOM) {
|
1118 |
|
1119 |
|
1120 |
|
1121 | isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
|
1122 | }
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 |
|
1129 | function startWatchingForValueChange(target, targetInst) {
|
1130 | activeElement = target;
|
1131 | activeElementInst = targetInst;
|
1132 | activeElement.attachEvent('onpropertychange', handlePropertyChange);
|
1133 | }
|
1134 |
|
1135 |
|
1136 |
|
1137 |
|
1138 |
|
1139 | function stopWatchingForValueChange() {
|
1140 | if (!activeElement) {
|
1141 | return;
|
1142 | }
|
1143 | activeElement.detachEvent('onpropertychange', handlePropertyChange);
|
1144 |
|
1145 | activeElement = null;
|
1146 | activeElementInst = null;
|
1147 | }
|
1148 |
|
1149 |
|
1150 |
|
1151 |
|
1152 |
|
1153 | function handlePropertyChange(nativeEvent) {
|
1154 | if (nativeEvent.propertyName !== 'value') {
|
1155 | return;
|
1156 | }
|
1157 | if (getInstIfValueChanged(activeElementInst, nativeEvent)) {
|
1158 | manualDispatchChangeEvent(nativeEvent);
|
1159 | }
|
1160 | }
|
1161 |
|
1162 | function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
|
1163 | if (topLevelType === 'topFocus') {
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 | stopWatchingForValueChange();
|
1178 | startWatchingForValueChange(target, targetInst);
|
1179 | } else if (topLevelType === 'topBlur') {
|
1180 | stopWatchingForValueChange();
|
1181 | }
|
1182 | }
|
1183 |
|
1184 |
|
1185 | function getTargetInstForInputEventPolyfill(topLevelType, targetInst, nativeEvent) {
|
1186 | if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 | return getInstIfValueChanged(activeElementInst, nativeEvent);
|
1198 | }
|
1199 | }
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 | function shouldUseClickEvent(elem) {
|
1205 |
|
1206 |
|
1207 |
|
1208 | var nodeName = elem.nodeName;
|
1209 | return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
|
1210 | }
|
1211 |
|
1212 | function getTargetInstForClickEvent(topLevelType, targetInst, nativeEvent) {
|
1213 | if (topLevelType === 'topClick') {
|
1214 | return getInstIfValueChanged(targetInst, nativeEvent);
|
1215 | }
|
1216 | }
|
1217 |
|
1218 | function getTargetInstForInputOrChangeEvent(topLevelType, targetInst, nativeEvent) {
|
1219 | if (topLevelType === 'topInput' || topLevelType === 'topChange') {
|
1220 | return getInstIfValueChanged(targetInst, nativeEvent);
|
1221 | }
|
1222 | }
|
1223 |
|
1224 | function handleControlledInputBlur(inst, node) {
|
1225 |
|
1226 | if (inst == null) {
|
1227 | return;
|
1228 | }
|
1229 |
|
1230 |
|
1231 | var state = inst._wrapperState || node._wrapperState;
|
1232 |
|
1233 | if (!state || !state.controlled || node.type !== 'number') {
|
1234 | return;
|
1235 | }
|
1236 |
|
1237 |
|
1238 | var value = '' + node.value;
|
1239 | if (node.getAttribute('value') !== value) {
|
1240 | node.setAttribute('value', value);
|
1241 | }
|
1242 | }
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 |
|
1254 | var ChangeEventPlugin = {
|
1255 | eventTypes: eventTypes,
|
1256 |
|
1257 | _allowSimulatedPassThrough: true,
|
1258 | _isInputEventSupported: isInputEventSupported,
|
1259 |
|
1260 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
1261 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
1262 |
|
1263 | var getTargetInstFunc, handleEventFunc;
|
1264 | if (shouldUseChangeEvent(targetNode)) {
|
1265 | if (doesChangeEventBubble) {
|
1266 | getTargetInstFunc = getTargetInstForChangeEvent;
|
1267 | } else {
|
1268 | handleEventFunc = handleEventsForChangeEventIE8;
|
1269 | }
|
1270 | } else if (isTextInputElement(targetNode)) {
|
1271 | if (isInputEventSupported) {
|
1272 | getTargetInstFunc = getTargetInstForInputOrChangeEvent;
|
1273 | } else {
|
1274 | getTargetInstFunc = getTargetInstForInputEventPolyfill;
|
1275 | handleEventFunc = handleEventsForInputEventPolyfill;
|
1276 | }
|
1277 | } else if (shouldUseClickEvent(targetNode)) {
|
1278 | getTargetInstFunc = getTargetInstForClickEvent;
|
1279 | }
|
1280 |
|
1281 | if (getTargetInstFunc) {
|
1282 | var inst = getTargetInstFunc(topLevelType, targetInst, nativeEvent);
|
1283 | if (inst) {
|
1284 | var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
|
1285 | return event;
|
1286 | }
|
1287 | }
|
1288 |
|
1289 | if (handleEventFunc) {
|
1290 | handleEventFunc(topLevelType, targetNode, targetInst);
|
1291 | }
|
1292 |
|
1293 |
|
1294 | if (topLevelType === 'topBlur') {
|
1295 | handleControlledInputBlur(targetInst, targetNode);
|
1296 | }
|
1297 | }
|
1298 | };
|
1299 |
|
1300 | module.exports = ChangeEventPlugin;
|
1301 | },{"106":106,"111":111,"113":113,"114":114,"127":127,"16":16,"19":19,"32":32,"75":75,"84":84}],8:[function(_dereq_,module,exports){
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 |
|
1307 |
|
1308 |
|
1309 |
|
1310 | 'use strict';
|
1311 |
|
1312 | var DOMLazyTree = _dereq_(9);
|
1313 | var Danger = _dereq_(13);
|
1314 | var ReactDOMComponentTree = _dereq_(32);
|
1315 | var ReactInstrumentation = _dereq_(59);
|
1316 |
|
1317 | var createMicrosoftUnsafeLocalFunction = _dereq_(98);
|
1318 | var setInnerHTML = _dereq_(117);
|
1319 | var setTextContent = _dereq_(118);
|
1320 |
|
1321 | function getNodeAfter(parentNode, node) {
|
1322 |
|
1323 |
|
1324 | if (Array.isArray(node)) {
|
1325 | node = node[1];
|
1326 | }
|
1327 | return node ? node.nextSibling : parentNode.firstChild;
|
1328 | }
|
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 |
|
1337 |
|
1338 | var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
|
1339 |
|
1340 |
|
1341 |
|
1342 | parentNode.insertBefore(childNode, referenceNode);
|
1343 | });
|
1344 |
|
1345 | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
|
1346 | DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
|
1347 | }
|
1348 |
|
1349 | function moveChild(parentNode, childNode, referenceNode) {
|
1350 | if (Array.isArray(childNode)) {
|
1351 | moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
|
1352 | } else {
|
1353 | insertChildAt(parentNode, childNode, referenceNode);
|
1354 | }
|
1355 | }
|
1356 |
|
1357 | function removeChild(parentNode, childNode) {
|
1358 | if (Array.isArray(childNode)) {
|
1359 | var closingComment = childNode[1];
|
1360 | childNode = childNode[0];
|
1361 | removeDelimitedText(parentNode, childNode, closingComment);
|
1362 | parentNode.removeChild(closingComment);
|
1363 | }
|
1364 | parentNode.removeChild(childNode);
|
1365 | }
|
1366 |
|
1367 | function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
|
1368 | var node = openingComment;
|
1369 | while (true) {
|
1370 | var nextNode = node.nextSibling;
|
1371 | insertChildAt(parentNode, node, referenceNode);
|
1372 | if (node === closingComment) {
|
1373 | break;
|
1374 | }
|
1375 | node = nextNode;
|
1376 | }
|
1377 | }
|
1378 |
|
1379 | function removeDelimitedText(parentNode, startNode, closingComment) {
|
1380 | while (true) {
|
1381 | var node = startNode.nextSibling;
|
1382 | if (node === closingComment) {
|
1383 |
|
1384 | break;
|
1385 | } else {
|
1386 | parentNode.removeChild(node);
|
1387 | }
|
1388 | }
|
1389 | }
|
1390 |
|
1391 | function replaceDelimitedText(openingComment, closingComment, stringText) {
|
1392 | var parentNode = openingComment.parentNode;
|
1393 | var nodeAfterComment = openingComment.nextSibling;
|
1394 | if (nodeAfterComment === closingComment) {
|
1395 |
|
1396 |
|
1397 | if (stringText) {
|
1398 | insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
|
1399 | }
|
1400 | } else {
|
1401 | if (stringText) {
|
1402 |
|
1403 |
|
1404 | setTextContent(nodeAfterComment, stringText);
|
1405 | removeDelimitedText(parentNode, nodeAfterComment, closingComment);
|
1406 | } else {
|
1407 | removeDelimitedText(parentNode, openingComment, closingComment);
|
1408 | }
|
1409 | }
|
1410 |
|
1411 | if ("development" !== 'production') {
|
1412 | ReactInstrumentation.debugTool.onHostOperation({
|
1413 | instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID,
|
1414 | type: 'replace text',
|
1415 | payload: stringText
|
1416 | });
|
1417 | }
|
1418 | }
|
1419 |
|
1420 | var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
|
1421 | if ("development" !== 'production') {
|
1422 | dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
|
1423 | Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
|
1424 | if (prevInstance._debugID !== 0) {
|
1425 | ReactInstrumentation.debugTool.onHostOperation({
|
1426 | instanceID: prevInstance._debugID,
|
1427 | type: 'replace with',
|
1428 | payload: markup.toString()
|
1429 | });
|
1430 | } else {
|
1431 | var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
|
1432 | if (nextInstance._debugID !== 0) {
|
1433 | ReactInstrumentation.debugTool.onHostOperation({
|
1434 | instanceID: nextInstance._debugID,
|
1435 | type: 'mount',
|
1436 | payload: markup.toString()
|
1437 | });
|
1438 | }
|
1439 | }
|
1440 | };
|
1441 | }
|
1442 |
|
1443 |
|
1444 |
|
1445 |
|
1446 | var DOMChildrenOperations = {
|
1447 | dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
|
1448 |
|
1449 | replaceDelimitedText: replaceDelimitedText,
|
1450 |
|
1451 | |
1452 |
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 | processUpdates: function (parentNode, updates) {
|
1459 | if ("development" !== 'production') {
|
1460 | var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
|
1461 | }
|
1462 |
|
1463 | for (var k = 0; k < updates.length; k++) {
|
1464 | var update = updates[k];
|
1465 | switch (update.type) {
|
1466 | case 'INSERT_MARKUP':
|
1467 | insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
|
1468 | if ("development" !== 'production') {
|
1469 | ReactInstrumentation.debugTool.onHostOperation({
|
1470 | instanceID: parentNodeDebugID,
|
1471 | type: 'insert child',
|
1472 | payload: {
|
1473 | toIndex: update.toIndex,
|
1474 | content: update.content.toString()
|
1475 | }
|
1476 | });
|
1477 | }
|
1478 | break;
|
1479 | case 'MOVE_EXISTING':
|
1480 | moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
|
1481 | if ("development" !== 'production') {
|
1482 | ReactInstrumentation.debugTool.onHostOperation({
|
1483 | instanceID: parentNodeDebugID,
|
1484 | type: 'move child',
|
1485 | payload: { fromIndex: update.fromIndex, toIndex: update.toIndex }
|
1486 | });
|
1487 | }
|
1488 | break;
|
1489 | case 'SET_MARKUP':
|
1490 | setInnerHTML(parentNode, update.content);
|
1491 | if ("development" !== 'production') {
|
1492 | ReactInstrumentation.debugTool.onHostOperation({
|
1493 | instanceID: parentNodeDebugID,
|
1494 | type: 'replace children',
|
1495 | payload: update.content.toString()
|
1496 | });
|
1497 | }
|
1498 | break;
|
1499 | case 'TEXT_CONTENT':
|
1500 | setTextContent(parentNode, update.content);
|
1501 | if ("development" !== 'production') {
|
1502 | ReactInstrumentation.debugTool.onHostOperation({
|
1503 | instanceID: parentNodeDebugID,
|
1504 | type: 'replace text',
|
1505 | payload: update.content.toString()
|
1506 | });
|
1507 | }
|
1508 | break;
|
1509 | case 'REMOVE_NODE':
|
1510 | removeChild(parentNode, update.fromNode);
|
1511 | if ("development" !== 'production') {
|
1512 | ReactInstrumentation.debugTool.onHostOperation({
|
1513 | instanceID: parentNodeDebugID,
|
1514 | type: 'remove child',
|
1515 | payload: { fromIndex: update.fromIndex }
|
1516 | });
|
1517 | }
|
1518 | break;
|
1519 | }
|
1520 | }
|
1521 | }
|
1522 | };
|
1523 |
|
1524 | module.exports = DOMChildrenOperations;
|
1525 | },{"117":117,"118":118,"13":13,"32":32,"59":59,"9":9,"98":98}],9:[function(_dereq_,module,exports){
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 |
|
1531 |
|
1532 |
|
1533 |
|
1534 | 'use strict';
|
1535 |
|
1536 | var DOMNamespaces = _dereq_(10);
|
1537 | var setInnerHTML = _dereq_(117);
|
1538 |
|
1539 | var createMicrosoftUnsafeLocalFunction = _dereq_(98);
|
1540 | var setTextContent = _dereq_(118);
|
1541 |
|
1542 | var ELEMENT_NODE_TYPE = 1;
|
1543 | var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
|
1544 |
|
1545 |
|
1546 |
|
1547 |
|
1548 |
|
1549 |
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 | var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
|
1557 |
|
1558 | function insertTreeChildren(tree) {
|
1559 | if (!enableLazy) {
|
1560 | return;
|
1561 | }
|
1562 | var node = tree.node;
|
1563 | var children = tree.children;
|
1564 | if (children.length) {
|
1565 | for (var i = 0; i < children.length; i++) {
|
1566 | insertTreeBefore(node, children[i], null);
|
1567 | }
|
1568 | } else if (tree.html != null) {
|
1569 | setInnerHTML(node, tree.html);
|
1570 | } else if (tree.text != null) {
|
1571 | setTextContent(node, tree.text);
|
1572 | }
|
1573 | }
|
1574 |
|
1575 | var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
|
1576 |
|
1577 |
|
1578 |
|
1579 |
|
1580 |
|
1581 |
|
1582 | 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)) {
|
1583 | insertTreeChildren(tree);
|
1584 | parentNode.insertBefore(tree.node, referenceNode);
|
1585 | } else {
|
1586 | parentNode.insertBefore(tree.node, referenceNode);
|
1587 | insertTreeChildren(tree);
|
1588 | }
|
1589 | });
|
1590 |
|
1591 | function replaceChildWithTree(oldNode, newTree) {
|
1592 | oldNode.parentNode.replaceChild(newTree.node, oldNode);
|
1593 | insertTreeChildren(newTree);
|
1594 | }
|
1595 |
|
1596 | function queueChild(parentTree, childTree) {
|
1597 | if (enableLazy) {
|
1598 | parentTree.children.push(childTree);
|
1599 | } else {
|
1600 | parentTree.node.appendChild(childTree.node);
|
1601 | }
|
1602 | }
|
1603 |
|
1604 | function queueHTML(tree, html) {
|
1605 | if (enableLazy) {
|
1606 | tree.html = html;
|
1607 | } else {
|
1608 | setInnerHTML(tree.node, html);
|
1609 | }
|
1610 | }
|
1611 |
|
1612 | function queueText(tree, text) {
|
1613 | if (enableLazy) {
|
1614 | tree.text = text;
|
1615 | } else {
|
1616 | setTextContent(tree.node, text);
|
1617 | }
|
1618 | }
|
1619 |
|
1620 | function toString() {
|
1621 | return this.node.nodeName;
|
1622 | }
|
1623 |
|
1624 | function DOMLazyTree(node) {
|
1625 | return {
|
1626 | node: node,
|
1627 | children: [],
|
1628 | html: null,
|
1629 | text: null,
|
1630 | toString: toString
|
1631 | };
|
1632 | }
|
1633 |
|
1634 | DOMLazyTree.insertTreeBefore = insertTreeBefore;
|
1635 | DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
|
1636 | DOMLazyTree.queueChild = queueChild;
|
1637 | DOMLazyTree.queueHTML = queueHTML;
|
1638 | DOMLazyTree.queueText = queueText;
|
1639 |
|
1640 | module.exports = DOMLazyTree;
|
1641 | },{"10":10,"117":117,"118":118,"98":98}],10:[function(_dereq_,module,exports){
|
1642 |
|
1643 |
|
1644 |
|
1645 |
|
1646 |
|
1647 |
|
1648 |
|
1649 |
|
1650 | 'use strict';
|
1651 |
|
1652 | var DOMNamespaces = {
|
1653 | html: 'http://www.w3.org/1999/xhtml',
|
1654 | mathml: 'http://www.w3.org/1998/Math/MathML',
|
1655 | svg: 'http://www.w3.org/2000/svg'
|
1656 | };
|
1657 |
|
1658 | module.exports = DOMNamespaces;
|
1659 | },{}],11:[function(_dereq_,module,exports){
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 |
|
1665 |
|
1666 |
|
1667 |
|
1668 | 'use strict';
|
1669 |
|
1670 | var _prodInvariant = _dereq_(116);
|
1671 |
|
1672 | var invariant = _dereq_(141);
|
1673 |
|
1674 | function checkMask(value, bitmask) {
|
1675 | return (value & bitmask) === bitmask;
|
1676 | }
|
1677 |
|
1678 | var DOMPropertyInjection = {
|
1679 | |
1680 |
|
1681 |
|
1682 |
|
1683 | MUST_USE_PROPERTY: 0x1,
|
1684 | HAS_BOOLEAN_VALUE: 0x4,
|
1685 | HAS_NUMERIC_VALUE: 0x8,
|
1686 | HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
|
1687 | HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
|
1688 |
|
1689 | |
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 |
|
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 | injectDOMPropertyConfig: function (domPropertyConfig) {
|
1718 | var Injection = DOMPropertyInjection;
|
1719 | var Properties = domPropertyConfig.Properties || {};
|
1720 | var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
|
1721 | var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
|
1722 | var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
|
1723 | var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
|
1724 |
|
1725 | if (domPropertyConfig.isCustomAttribute) {
|
1726 | DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
|
1727 | }
|
1728 |
|
1729 | for (var propName in Properties) {
|
1730 | !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== '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;
|
1731 |
|
1732 | var lowerCased = propName.toLowerCase();
|
1733 | var propConfig = Properties[propName];
|
1734 |
|
1735 | var propertyInfo = {
|
1736 | attributeName: lowerCased,
|
1737 | attributeNamespace: null,
|
1738 | propertyName: propName,
|
1739 | mutationMethod: null,
|
1740 |
|
1741 | mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
|
1742 | hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
|
1743 | hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
|
1744 | hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
|
1745 | hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
|
1746 | };
|
1747 | !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== '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;
|
1748 |
|
1749 | if ("development" !== 'production') {
|
1750 | DOMProperty.getPossibleStandardName[lowerCased] = propName;
|
1751 | }
|
1752 |
|
1753 | if (DOMAttributeNames.hasOwnProperty(propName)) {
|
1754 | var attributeName = DOMAttributeNames[propName];
|
1755 | propertyInfo.attributeName = attributeName;
|
1756 | if ("development" !== 'production') {
|
1757 | DOMProperty.getPossibleStandardName[attributeName] = propName;
|
1758 | }
|
1759 | }
|
1760 |
|
1761 | if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
|
1762 | propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
|
1763 | }
|
1764 |
|
1765 | if (DOMPropertyNames.hasOwnProperty(propName)) {
|
1766 | propertyInfo.propertyName = DOMPropertyNames[propName];
|
1767 | }
|
1768 |
|
1769 | if (DOMMutationMethods.hasOwnProperty(propName)) {
|
1770 | propertyInfo.mutationMethod = DOMMutationMethods[propName];
|
1771 | }
|
1772 |
|
1773 | DOMProperty.properties[propName] = propertyInfo;
|
1774 | }
|
1775 | }
|
1776 | };
|
1777 |
|
1778 |
|
1779 | 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';
|
1780 |
|
1781 |
|
1782 |
|
1783 |
|
1784 |
|
1785 |
|
1786 |
|
1787 |
|
1788 |
|
1789 |
|
1790 |
|
1791 |
|
1792 |
|
1793 |
|
1794 |
|
1795 | var DOMProperty = {
|
1796 | ID_ATTRIBUTE_NAME: 'data-reactid',
|
1797 | ROOT_ATTRIBUTE_NAME: 'data-reactroot',
|
1798 |
|
1799 | ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
|
1800 | ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
|
1801 |
|
1802 | |
1803 |
|
1804 |
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 |
|
1829 |
|
1830 | properties: {},
|
1831 |
|
1832 | |
1833 |
|
1834 |
|
1835 |
|
1836 |
|
1837 |
|
1838 |
|
1839 |
|
1840 |
|
1841 | getPossibleStandardName: "development" !== 'production' ? { autofocus: 'autoFocus' } : null,
|
1842 |
|
1843 | |
1844 |
|
1845 |
|
1846 | _isCustomAttributeFunctions: [],
|
1847 |
|
1848 | |
1849 |
|
1850 |
|
1851 |
|
1852 | isCustomAttribute: function (attributeName) {
|
1853 | for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
|
1854 | var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
|
1855 | if (isCustomAttributeFn(attributeName)) {
|
1856 | return true;
|
1857 | }
|
1858 | }
|
1859 | return false;
|
1860 | },
|
1861 |
|
1862 | injection: DOMPropertyInjection
|
1863 | };
|
1864 |
|
1865 | module.exports = DOMProperty;
|
1866 | },{"116":116,"141":141}],12:[function(_dereq_,module,exports){
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 |
|
1872 |
|
1873 |
|
1874 |
|
1875 | 'use strict';
|
1876 |
|
1877 | var DOMProperty = _dereq_(11);
|
1878 | var ReactDOMComponentTree = _dereq_(32);
|
1879 | var ReactInstrumentation = _dereq_(59);
|
1880 |
|
1881 | var quoteAttributeValueForBrowser = _dereq_(115);
|
1882 | var warning = _dereq_(148);
|
1883 |
|
1884 | var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
|
1885 | var illegalAttributeNameCache = {};
|
1886 | var validatedAttributeNameCache = {};
|
1887 |
|
1888 | function isAttributeNameSafe(attributeName) {
|
1889 | if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
|
1890 | return true;
|
1891 | }
|
1892 | if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
|
1893 | return false;
|
1894 | }
|
1895 | if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
1896 | validatedAttributeNameCache[attributeName] = true;
|
1897 | return true;
|
1898 | }
|
1899 | illegalAttributeNameCache[attributeName] = true;
|
1900 | "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
|
1901 | return false;
|
1902 | }
|
1903 |
|
1904 | function shouldIgnoreValue(propertyInfo, value) {
|
1905 | return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
|
1906 | }
|
1907 |
|
1908 |
|
1909 |
|
1910 |
|
1911 | var DOMPropertyOperations = {
|
1912 | |
1913 |
|
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 | createMarkupForID: function (id) {
|
1919 | return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
|
1920 | },
|
1921 |
|
1922 | setAttributeForID: function (node, id) {
|
1923 | node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
|
1924 | },
|
1925 |
|
1926 | createMarkupForRoot: function () {
|
1927 | return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
|
1928 | },
|
1929 |
|
1930 | setAttributeForRoot: function (node) {
|
1931 | node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
|
1932 | },
|
1933 |
|
1934 | |
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 |
|
1941 | createMarkupForProperty: function (name, value) {
|
1942 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
1943 | if (propertyInfo) {
|
1944 | if (shouldIgnoreValue(propertyInfo, value)) {
|
1945 | return '';
|
1946 | }
|
1947 | var attributeName = propertyInfo.attributeName;
|
1948 | if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
1949 | return attributeName + '=""';
|
1950 | }
|
1951 | return attributeName + '=' + quoteAttributeValueForBrowser(value);
|
1952 | } else if (DOMProperty.isCustomAttribute(name)) {
|
1953 | if (value == null) {
|
1954 | return '';
|
1955 | }
|
1956 | return name + '=' + quoteAttributeValueForBrowser(value);
|
1957 | }
|
1958 | return null;
|
1959 | },
|
1960 |
|
1961 | |
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 | createMarkupForCustomAttribute: function (name, value) {
|
1969 | if (!isAttributeNameSafe(name) || value == null) {
|
1970 | return '';
|
1971 | }
|
1972 | return name + '=' + quoteAttributeValueForBrowser(value);
|
1973 | },
|
1974 |
|
1975 | |
1976 |
|
1977 |
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 | setValueForProperty: function (node, name, value) {
|
1983 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
1984 | if (propertyInfo) {
|
1985 | var mutationMethod = propertyInfo.mutationMethod;
|
1986 | if (mutationMethod) {
|
1987 | mutationMethod(node, value);
|
1988 | } else if (shouldIgnoreValue(propertyInfo, value)) {
|
1989 | this.deleteValueForProperty(node, name);
|
1990 | return;
|
1991 | } else if (propertyInfo.mustUseProperty) {
|
1992 |
|
1993 |
|
1994 | node[propertyInfo.propertyName] = value;
|
1995 | } else {
|
1996 | var attributeName = propertyInfo.attributeName;
|
1997 | var namespace = propertyInfo.attributeNamespace;
|
1998 |
|
1999 |
|
2000 | if (namespace) {
|
2001 | node.setAttributeNS(namespace, attributeName, '' + value);
|
2002 | } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
|
2003 | node.setAttribute(attributeName, '');
|
2004 | } else {
|
2005 | node.setAttribute(attributeName, '' + value);
|
2006 | }
|
2007 | }
|
2008 | } else if (DOMProperty.isCustomAttribute(name)) {
|
2009 | DOMPropertyOperations.setValueForAttribute(node, name, value);
|
2010 | return;
|
2011 | }
|
2012 |
|
2013 | if ("development" !== 'production') {
|
2014 | var payload = {};
|
2015 | payload[name] = value;
|
2016 | ReactInstrumentation.debugTool.onHostOperation({
|
2017 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
2018 | type: 'update attribute',
|
2019 | payload: payload
|
2020 | });
|
2021 | }
|
2022 | },
|
2023 |
|
2024 | setValueForAttribute: function (node, name, value) {
|
2025 | if (!isAttributeNameSafe(name)) {
|
2026 | return;
|
2027 | }
|
2028 | if (value == null) {
|
2029 | node.removeAttribute(name);
|
2030 | } else {
|
2031 | node.setAttribute(name, '' + value);
|
2032 | }
|
2033 |
|
2034 | if ("development" !== 'production') {
|
2035 | var payload = {};
|
2036 | payload[name] = value;
|
2037 | ReactInstrumentation.debugTool.onHostOperation({
|
2038 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
2039 | type: 'update attribute',
|
2040 | payload: payload
|
2041 | });
|
2042 | }
|
2043 | },
|
2044 |
|
2045 | |
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 | deleteValueForAttribute: function (node, name) {
|
2052 | node.removeAttribute(name);
|
2053 | if ("development" !== 'production') {
|
2054 | ReactInstrumentation.debugTool.onHostOperation({
|
2055 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
2056 | type: 'remove attribute',
|
2057 | payload: name
|
2058 | });
|
2059 | }
|
2060 | },
|
2061 |
|
2062 | |
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 | deleteValueForProperty: function (node, name) {
|
2069 | var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
|
2070 | if (propertyInfo) {
|
2071 | var mutationMethod = propertyInfo.mutationMethod;
|
2072 | if (mutationMethod) {
|
2073 | mutationMethod(node, undefined);
|
2074 | } else if (propertyInfo.mustUseProperty) {
|
2075 | var propName = propertyInfo.propertyName;
|
2076 | if (propertyInfo.hasBooleanValue) {
|
2077 | node[propName] = false;
|
2078 | } else {
|
2079 | node[propName] = '';
|
2080 | }
|
2081 | } else {
|
2082 | node.removeAttribute(propertyInfo.attributeName);
|
2083 | }
|
2084 | } else if (DOMProperty.isCustomAttribute(name)) {
|
2085 | node.removeAttribute(name);
|
2086 | }
|
2087 |
|
2088 | if ("development" !== 'production') {
|
2089 | ReactInstrumentation.debugTool.onHostOperation({
|
2090 | instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID,
|
2091 | type: 'remove attribute',
|
2092 | payload: name
|
2093 | });
|
2094 | }
|
2095 | }
|
2096 | };
|
2097 |
|
2098 | module.exports = DOMPropertyOperations;
|
2099 | },{"11":11,"115":115,"148":148,"32":32,"59":59}],13:[function(_dereq_,module,exports){
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 | 'use strict';
|
2109 |
|
2110 | var _prodInvariant = _dereq_(116);
|
2111 |
|
2112 | var DOMLazyTree = _dereq_(9);
|
2113 | var ExecutionEnvironment = _dereq_(127);
|
2114 |
|
2115 | var createNodesFromMarkup = _dereq_(132);
|
2116 | var emptyFunction = _dereq_(133);
|
2117 | var invariant = _dereq_(141);
|
2118 |
|
2119 | var Danger = {
|
2120 | |
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 | dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
|
2129 | !ExecutionEnvironment.canUseDOM ? "development" !== '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;
|
2130 | !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
|
2131 | !(oldChild.nodeName !== 'HTML') ? "development" !== '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;
|
2132 |
|
2133 | if (typeof markup === 'string') {
|
2134 | var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
|
2135 | oldChild.parentNode.replaceChild(newChild, oldChild);
|
2136 | } else {
|
2137 | DOMLazyTree.replaceChildWithTree(oldChild, markup);
|
2138 | }
|
2139 | }
|
2140 | };
|
2141 |
|
2142 | module.exports = Danger;
|
2143 | },{"116":116,"127":127,"132":132,"133":133,"141":141,"9":9}],14:[function(_dereq_,module,exports){
|
2144 |
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 | 'use strict';
|
2153 |
|
2154 |
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 |
|
2162 |
|
2163 |
|
2164 | var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
|
2165 |
|
2166 | module.exports = DefaultEventPluginOrder;
|
2167 | },{}],15:[function(_dereq_,module,exports){
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 |
|
2174 |
|
2175 |
|
2176 | 'use strict';
|
2177 |
|
2178 | var EventPropagators = _dereq_(19);
|
2179 | var ReactDOMComponentTree = _dereq_(32);
|
2180 | var SyntheticMouseEvent = _dereq_(88);
|
2181 |
|
2182 | var eventTypes = {
|
2183 | mouseEnter: {
|
2184 | registrationName: 'onMouseEnter',
|
2185 | dependencies: ['topMouseOut', 'topMouseOver']
|
2186 | },
|
2187 | mouseLeave: {
|
2188 | registrationName: 'onMouseLeave',
|
2189 | dependencies: ['topMouseOut', 'topMouseOver']
|
2190 | }
|
2191 | };
|
2192 |
|
2193 | var EnterLeaveEventPlugin = {
|
2194 | eventTypes: eventTypes,
|
2195 |
|
2196 | |
2197 |
|
2198 |
|
2199 |
|
2200 |
|
2201 |
|
2202 |
|
2203 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
2204 | if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
|
2205 | return null;
|
2206 | }
|
2207 | if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {
|
2208 |
|
2209 | return null;
|
2210 | }
|
2211 |
|
2212 | var win;
|
2213 | if (nativeEventTarget.window === nativeEventTarget) {
|
2214 |
|
2215 | win = nativeEventTarget;
|
2216 | } else {
|
2217 |
|
2218 | var doc = nativeEventTarget.ownerDocument;
|
2219 | if (doc) {
|
2220 | win = doc.defaultView || doc.parentWindow;
|
2221 | } else {
|
2222 | win = window;
|
2223 | }
|
2224 | }
|
2225 |
|
2226 | var from;
|
2227 | var to;
|
2228 | if (topLevelType === 'topMouseOut') {
|
2229 | from = targetInst;
|
2230 | var related = nativeEvent.relatedTarget || nativeEvent.toElement;
|
2231 | to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
|
2232 | } else {
|
2233 |
|
2234 | from = null;
|
2235 | to = targetInst;
|
2236 | }
|
2237 |
|
2238 | if (from === to) {
|
2239 |
|
2240 | return null;
|
2241 | }
|
2242 |
|
2243 | var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
|
2244 | var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
|
2245 |
|
2246 | var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
|
2247 | leave.type = 'mouseleave';
|
2248 | leave.target = fromNode;
|
2249 | leave.relatedTarget = toNode;
|
2250 |
|
2251 | var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
|
2252 | enter.type = 'mouseenter';
|
2253 | enter.target = toNode;
|
2254 | enter.relatedTarget = fromNode;
|
2255 |
|
2256 | EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
|
2257 |
|
2258 | return [leave, enter];
|
2259 | }
|
2260 | };
|
2261 |
|
2262 | module.exports = EnterLeaveEventPlugin;
|
2263 | },{"19":19,"32":32,"88":88}],16:[function(_dereq_,module,exports){
|
2264 |
|
2265 |
|
2266 |
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 |
|
2272 | 'use strict';
|
2273 |
|
2274 | var _prodInvariant = _dereq_(116);
|
2275 |
|
2276 | var EventPluginRegistry = _dereq_(17);
|
2277 | var EventPluginUtils = _dereq_(18);
|
2278 | var ReactErrorUtils = _dereq_(50);
|
2279 |
|
2280 | var accumulateInto = _dereq_(95);
|
2281 | var forEachAccumulated = _dereq_(102);
|
2282 | var invariant = _dereq_(141);
|
2283 |
|
2284 |
|
2285 |
|
2286 |
|
2287 | var listenerBank = {};
|
2288 |
|
2289 |
|
2290 |
|
2291 |
|
2292 |
|
2293 | var eventQueue = null;
|
2294 |
|
2295 |
|
2296 |
|
2297 |
|
2298 |
|
2299 |
|
2300 |
|
2301 |
|
2302 | var executeDispatchesAndRelease = function (event, simulated) {
|
2303 | if (event) {
|
2304 | EventPluginUtils.executeDispatchesInOrder(event, simulated);
|
2305 |
|
2306 | if (!event.isPersistent()) {
|
2307 | event.constructor.release(event);
|
2308 | }
|
2309 | }
|
2310 | };
|
2311 | var executeDispatchesAndReleaseSimulated = function (e) {
|
2312 | return executeDispatchesAndRelease(e, true);
|
2313 | };
|
2314 | var executeDispatchesAndReleaseTopLevel = function (e) {
|
2315 | return executeDispatchesAndRelease(e, false);
|
2316 | };
|
2317 |
|
2318 | var getDictionaryKey = function (inst) {
|
2319 |
|
2320 |
|
2321 | return '.' + inst._rootNodeID;
|
2322 | };
|
2323 |
|
2324 | function isInteractive(tag) {
|
2325 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
2326 | }
|
2327 |
|
2328 | function shouldPreventMouseEvent(name, type, props) {
|
2329 | switch (name) {
|
2330 | case 'onClick':
|
2331 | case 'onClickCapture':
|
2332 | case 'onDoubleClick':
|
2333 | case 'onDoubleClickCapture':
|
2334 | case 'onMouseDown':
|
2335 | case 'onMouseDownCapture':
|
2336 | case 'onMouseMove':
|
2337 | case 'onMouseMoveCapture':
|
2338 | case 'onMouseUp':
|
2339 | case 'onMouseUpCapture':
|
2340 | return !!(props.disabled && isInteractive(type));
|
2341 | default:
|
2342 | return false;
|
2343 | }
|
2344 | }
|
2345 |
|
2346 |
|
2347 |
|
2348 |
|
2349 |
|
2350 |
|
2351 |
|
2352 |
|
2353 |
|
2354 |
|
2355 |
|
2356 |
|
2357 |
|
2358 |
|
2359 |
|
2360 |
|
2361 |
|
2362 |
|
2363 |
|
2364 |
|
2365 |
|
2366 |
|
2367 |
|
2368 | var EventPluginHub = {
|
2369 | |
2370 |
|
2371 |
|
2372 | injection: {
|
2373 | |
2374 |
|
2375 |
|
2376 |
|
2377 | injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
|
2378 |
|
2379 | |
2380 |
|
2381 |
|
2382 | injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
|
2383 | },
|
2384 |
|
2385 | |
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 |
|
2392 | putListener: function (inst, registrationName, listener) {
|
2393 | !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
|
2394 |
|
2395 | var key = getDictionaryKey(inst);
|
2396 | var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
|
2397 | bankForRegistrationName[key] = listener;
|
2398 |
|
2399 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2400 | if (PluginModule && PluginModule.didPutListener) {
|
2401 | PluginModule.didPutListener(inst, registrationName, listener);
|
2402 | }
|
2403 | },
|
2404 |
|
2405 | |
2406 |
|
2407 |
|
2408 |
|
2409 |
|
2410 | getListener: function (inst, registrationName) {
|
2411 |
|
2412 |
|
2413 | var bankForRegistrationName = listenerBank[registrationName];
|
2414 | if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) {
|
2415 | return null;
|
2416 | }
|
2417 | var key = getDictionaryKey(inst);
|
2418 | return bankForRegistrationName && bankForRegistrationName[key];
|
2419 | },
|
2420 |
|
2421 | |
2422 |
|
2423 |
|
2424 |
|
2425 |
|
2426 |
|
2427 | deleteListener: function (inst, registrationName) {
|
2428 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2429 | if (PluginModule && PluginModule.willDeleteListener) {
|
2430 | PluginModule.willDeleteListener(inst, registrationName);
|
2431 | }
|
2432 |
|
2433 | var bankForRegistrationName = listenerBank[registrationName];
|
2434 |
|
2435 | if (bankForRegistrationName) {
|
2436 | var key = getDictionaryKey(inst);
|
2437 | delete bankForRegistrationName[key];
|
2438 | }
|
2439 | },
|
2440 |
|
2441 | |
2442 |
|
2443 |
|
2444 |
|
2445 |
|
2446 | deleteAllListeners: function (inst) {
|
2447 | var key = getDictionaryKey(inst);
|
2448 | for (var registrationName in listenerBank) {
|
2449 | if (!listenerBank.hasOwnProperty(registrationName)) {
|
2450 | continue;
|
2451 | }
|
2452 |
|
2453 | if (!listenerBank[registrationName][key]) {
|
2454 | continue;
|
2455 | }
|
2456 |
|
2457 | var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
|
2458 | if (PluginModule && PluginModule.willDeleteListener) {
|
2459 | PluginModule.willDeleteListener(inst, registrationName);
|
2460 | }
|
2461 |
|
2462 | delete listenerBank[registrationName][key];
|
2463 | }
|
2464 | },
|
2465 |
|
2466 | |
2467 |
|
2468 |
|
2469 |
|
2470 |
|
2471 |
|
2472 |
|
2473 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
2474 | var events;
|
2475 | var plugins = EventPluginRegistry.plugins;
|
2476 | for (var i = 0; i < plugins.length; i++) {
|
2477 |
|
2478 | var possiblePlugin = plugins[i];
|
2479 | if (possiblePlugin) {
|
2480 | var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
2481 | if (extractedEvents) {
|
2482 | events = accumulateInto(events, extractedEvents);
|
2483 | }
|
2484 | }
|
2485 | }
|
2486 | return events;
|
2487 | },
|
2488 |
|
2489 | |
2490 |
|
2491 |
|
2492 |
|
2493 |
|
2494 |
|
2495 |
|
2496 | enqueueEvents: function (events) {
|
2497 | if (events) {
|
2498 | eventQueue = accumulateInto(eventQueue, events);
|
2499 | }
|
2500 | },
|
2501 |
|
2502 | |
2503 |
|
2504 |
|
2505 |
|
2506 |
|
2507 | processEventQueue: function (simulated) {
|
2508 |
|
2509 |
|
2510 | var processingEventQueue = eventQueue;
|
2511 | eventQueue = null;
|
2512 | if (simulated) {
|
2513 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
2514 | } else {
|
2515 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
|
2516 | }
|
2517 | !!eventQueue ? "development" !== '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;
|
2518 |
|
2519 | ReactErrorUtils.rethrowCaughtError();
|
2520 | },
|
2521 |
|
2522 | |
2523 |
|
2524 |
|
2525 | __purge: function () {
|
2526 | listenerBank = {};
|
2527 | },
|
2528 |
|
2529 | __getListenerBank: function () {
|
2530 | return listenerBank;
|
2531 | }
|
2532 | };
|
2533 |
|
2534 | module.exports = EventPluginHub;
|
2535 | },{"102":102,"116":116,"141":141,"17":17,"18":18,"50":50,"95":95}],17:[function(_dereq_,module,exports){
|
2536 |
|
2537 |
|
2538 |
|
2539 |
|
2540 |
|
2541 |
|
2542 |
|
2543 |
|
2544 |
|
2545 | 'use strict';
|
2546 |
|
2547 | var _prodInvariant = _dereq_(116);
|
2548 |
|
2549 | var invariant = _dereq_(141);
|
2550 |
|
2551 |
|
2552 |
|
2553 |
|
2554 | var eventPluginOrder = null;
|
2555 |
|
2556 |
|
2557 |
|
2558 |
|
2559 | var namesToPlugins = {};
|
2560 |
|
2561 |
|
2562 |
|
2563 |
|
2564 |
|
2565 |
|
2566 | function recomputePluginOrdering() {
|
2567 | if (!eventPluginOrder) {
|
2568 |
|
2569 | return;
|
2570 | }
|
2571 | for (var pluginName in namesToPlugins) {
|
2572 | var pluginModule = namesToPlugins[pluginName];
|
2573 | var pluginIndex = eventPluginOrder.indexOf(pluginName);
|
2574 | !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
|
2575 | if (EventPluginRegistry.plugins[pluginIndex]) {
|
2576 | continue;
|
2577 | }
|
2578 | !pluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
|
2579 | EventPluginRegistry.plugins[pluginIndex] = pluginModule;
|
2580 | var publishedEvents = pluginModule.eventTypes;
|
2581 | for (var eventName in publishedEvents) {
|
2582 | !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
|
2583 | }
|
2584 | }
|
2585 | }
|
2586 |
|
2587 |
|
2588 |
|
2589 |
|
2590 |
|
2591 |
|
2592 |
|
2593 |
|
2594 |
|
2595 | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
|
2596 | !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
|
2597 | EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
|
2598 |
|
2599 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
2600 | if (phasedRegistrationNames) {
|
2601 | for (var phaseName in phasedRegistrationNames) {
|
2602 | if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
|
2603 | var phasedRegistrationName = phasedRegistrationNames[phaseName];
|
2604 | publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
|
2605 | }
|
2606 | }
|
2607 | return true;
|
2608 | } else if (dispatchConfig.registrationName) {
|
2609 | publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
|
2610 | return true;
|
2611 | }
|
2612 | return false;
|
2613 | }
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 |
|
2622 |
|
2623 | function publishRegistrationName(registrationName, pluginModule, eventName) {
|
2624 | !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
|
2625 | EventPluginRegistry.registrationNameModules[registrationName] = pluginModule;
|
2626 | EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;
|
2627 |
|
2628 | if ("development" !== 'production') {
|
2629 | var lowerCasedName = registrationName.toLowerCase();
|
2630 | EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
|
2631 |
|
2632 | if (registrationName === 'onDoubleClick') {
|
2633 | EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
|
2634 | }
|
2635 | }
|
2636 | }
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 |
|
2642 |
|
2643 | var EventPluginRegistry = {
|
2644 | |
2645 |
|
2646 |
|
2647 | plugins: [],
|
2648 |
|
2649 | |
2650 |
|
2651 |
|
2652 | eventNameDispatchConfigs: {},
|
2653 |
|
2654 | |
2655 |
|
2656 |
|
2657 | registrationNameModules: {},
|
2658 |
|
2659 | |
2660 |
|
2661 |
|
2662 | registrationNameDependencies: {},
|
2663 |
|
2664 | |
2665 |
|
2666 |
|
2667 |
|
2668 |
|
2669 |
|
2670 | possibleRegistrationNames: "development" !== 'production' ? {} : null,
|
2671 |
|
2672 |
|
2673 | |
2674 |
|
2675 |
|
2676 |
|
2677 |
|
2678 |
|
2679 |
|
2680 |
|
2681 |
|
2682 | injectEventPluginOrder: function (injectedEventPluginOrder) {
|
2683 | !!eventPluginOrder ? "development" !== '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;
|
2684 |
|
2685 | eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
|
2686 | recomputePluginOrdering();
|
2687 | },
|
2688 |
|
2689 | |
2690 |
|
2691 |
|
2692 |
|
2693 |
|
2694 |
|
2695 |
|
2696 |
|
2697 |
|
2698 |
|
2699 | injectEventPluginsByName: function (injectedNamesToPlugins) {
|
2700 | var isOrderingDirty = false;
|
2701 | for (var pluginName in injectedNamesToPlugins) {
|
2702 | if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
|
2703 | continue;
|
2704 | }
|
2705 | var pluginModule = injectedNamesToPlugins[pluginName];
|
2706 | if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
|
2707 | !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
|
2708 | namesToPlugins[pluginName] = pluginModule;
|
2709 | isOrderingDirty = true;
|
2710 | }
|
2711 | }
|
2712 | if (isOrderingDirty) {
|
2713 | recomputePluginOrdering();
|
2714 | }
|
2715 | },
|
2716 |
|
2717 | |
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 | getPluginModuleForEvent: function (event) {
|
2725 | var dispatchConfig = event.dispatchConfig;
|
2726 | if (dispatchConfig.registrationName) {
|
2727 | return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
|
2728 | }
|
2729 | if (dispatchConfig.phasedRegistrationNames !== undefined) {
|
2730 |
|
2731 |
|
2732 | var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
|
2733 |
|
2734 | for (var phase in phasedRegistrationNames) {
|
2735 | if (!phasedRegistrationNames.hasOwnProperty(phase)) {
|
2736 | continue;
|
2737 | }
|
2738 | var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]];
|
2739 | if (pluginModule) {
|
2740 | return pluginModule;
|
2741 | }
|
2742 | }
|
2743 | }
|
2744 | return null;
|
2745 | },
|
2746 |
|
2747 | |
2748 |
|
2749 |
|
2750 |
|
2751 | _resetEventPlugins: function () {
|
2752 | eventPluginOrder = null;
|
2753 | for (var pluginName in namesToPlugins) {
|
2754 | if (namesToPlugins.hasOwnProperty(pluginName)) {
|
2755 | delete namesToPlugins[pluginName];
|
2756 | }
|
2757 | }
|
2758 | EventPluginRegistry.plugins.length = 0;
|
2759 |
|
2760 | var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
|
2761 | for (var eventName in eventNameDispatchConfigs) {
|
2762 | if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
|
2763 | delete eventNameDispatchConfigs[eventName];
|
2764 | }
|
2765 | }
|
2766 |
|
2767 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
2768 | for (var registrationName in registrationNameModules) {
|
2769 | if (registrationNameModules.hasOwnProperty(registrationName)) {
|
2770 | delete registrationNameModules[registrationName];
|
2771 | }
|
2772 | }
|
2773 |
|
2774 | if ("development" !== 'production') {
|
2775 | var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
|
2776 | for (var lowerCasedName in possibleRegistrationNames) {
|
2777 | if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
|
2778 | delete possibleRegistrationNames[lowerCasedName];
|
2779 | }
|
2780 | }
|
2781 | }
|
2782 | }
|
2783 | };
|
2784 |
|
2785 | module.exports = EventPluginRegistry;
|
2786 | },{"116":116,"141":141}],18:[function(_dereq_,module,exports){
|
2787 |
|
2788 |
|
2789 |
|
2790 |
|
2791 |
|
2792 |
|
2793 |
|
2794 |
|
2795 | 'use strict';
|
2796 |
|
2797 | var _prodInvariant = _dereq_(116);
|
2798 |
|
2799 | var ReactErrorUtils = _dereq_(50);
|
2800 |
|
2801 | var invariant = _dereq_(141);
|
2802 | var warning = _dereq_(148);
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 |
|
2811 |
|
2812 | var ComponentTree;
|
2813 | var TreeTraversal;
|
2814 | var injection = {
|
2815 | injectComponentTree: function (Injected) {
|
2816 | ComponentTree = Injected;
|
2817 | if ("development" !== 'production') {
|
2818 | "development" !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
2819 | }
|
2820 | },
|
2821 | injectTreeTraversal: function (Injected) {
|
2822 | TreeTraversal = Injected;
|
2823 | if ("development" !== 'production') {
|
2824 | "development" !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
|
2825 | }
|
2826 | }
|
2827 | };
|
2828 |
|
2829 | function isEndish(topLevelType) {
|
2830 | return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel';
|
2831 | }
|
2832 |
|
2833 | function isMoveish(topLevelType) {
|
2834 | return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove';
|
2835 | }
|
2836 | function isStartish(topLevelType) {
|
2837 | return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart';
|
2838 | }
|
2839 |
|
2840 | var validateEventDispatches;
|
2841 | if ("development" !== 'production') {
|
2842 | validateEventDispatches = function (event) {
|
2843 | var dispatchListeners = event._dispatchListeners;
|
2844 | var dispatchInstances = event._dispatchInstances;
|
2845 |
|
2846 | var listenersIsArr = Array.isArray(dispatchListeners);
|
2847 | var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
|
2848 |
|
2849 | var instancesIsArr = Array.isArray(dispatchInstances);
|
2850 | var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
2851 |
|
2852 | "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
|
2853 | };
|
2854 | }
|
2855 |
|
2856 |
|
2857 |
|
2858 |
|
2859 |
|
2860 |
|
2861 |
|
2862 |
|
2863 | function executeDispatch(event, simulated, listener, inst) {
|
2864 | var type = event.type || 'unknown-event';
|
2865 | event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
|
2866 | if (simulated) {
|
2867 | ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
|
2868 | } else {
|
2869 | ReactErrorUtils.invokeGuardedCallback(type, listener, event);
|
2870 | }
|
2871 | event.currentTarget = null;
|
2872 | }
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 | function executeDispatchesInOrder(event, simulated) {
|
2878 | var dispatchListeners = event._dispatchListeners;
|
2879 | var dispatchInstances = event._dispatchInstances;
|
2880 | if ("development" !== 'production') {
|
2881 | validateEventDispatches(event);
|
2882 | }
|
2883 | if (Array.isArray(dispatchListeners)) {
|
2884 | for (var i = 0; i < dispatchListeners.length; i++) {
|
2885 | if (event.isPropagationStopped()) {
|
2886 | break;
|
2887 | }
|
2888 |
|
2889 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
|
2890 | }
|
2891 | } else if (dispatchListeners) {
|
2892 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
|
2893 | }
|
2894 | event._dispatchListeners = null;
|
2895 | event._dispatchInstances = null;
|
2896 | }
|
2897 |
|
2898 |
|
2899 |
|
2900 |
|
2901 |
|
2902 |
|
2903 |
|
2904 |
|
2905 | function executeDispatchesInOrderStopAtTrueImpl(event) {
|
2906 | var dispatchListeners = event._dispatchListeners;
|
2907 | var dispatchInstances = event._dispatchInstances;
|
2908 | if ("development" !== 'production') {
|
2909 | validateEventDispatches(event);
|
2910 | }
|
2911 | if (Array.isArray(dispatchListeners)) {
|
2912 | for (var i = 0; i < dispatchListeners.length; i++) {
|
2913 | if (event.isPropagationStopped()) {
|
2914 | break;
|
2915 | }
|
2916 |
|
2917 | if (dispatchListeners[i](event, dispatchInstances[i])) {
|
2918 | return dispatchInstances[i];
|
2919 | }
|
2920 | }
|
2921 | } else if (dispatchListeners) {
|
2922 | if (dispatchListeners(event, dispatchInstances)) {
|
2923 | return dispatchInstances;
|
2924 | }
|
2925 | }
|
2926 | return null;
|
2927 | }
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 | function executeDispatchesInOrderStopAtTrue(event) {
|
2933 | var ret = executeDispatchesInOrderStopAtTrueImpl(event);
|
2934 | event._dispatchInstances = null;
|
2935 | event._dispatchListeners = null;
|
2936 | return ret;
|
2937 | }
|
2938 |
|
2939 |
|
2940 |
|
2941 |
|
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 | function executeDirectDispatch(event) {
|
2949 | if ("development" !== 'production') {
|
2950 | validateEventDispatches(event);
|
2951 | }
|
2952 | var dispatchListener = event._dispatchListeners;
|
2953 | var dispatchInstance = event._dispatchInstances;
|
2954 | !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
|
2955 | event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
|
2956 | var res = dispatchListener ? dispatchListener(event) : null;
|
2957 | event.currentTarget = null;
|
2958 | event._dispatchListeners = null;
|
2959 | event._dispatchInstances = null;
|
2960 | return res;
|
2961 | }
|
2962 |
|
2963 |
|
2964 |
|
2965 |
|
2966 |
|
2967 | function hasDispatches(event) {
|
2968 | return !!event._dispatchListeners;
|
2969 | }
|
2970 |
|
2971 |
|
2972 |
|
2973 |
|
2974 | var EventPluginUtils = {
|
2975 | isEndish: isEndish,
|
2976 | isMoveish: isMoveish,
|
2977 | isStartish: isStartish,
|
2978 |
|
2979 | executeDirectDispatch: executeDirectDispatch,
|
2980 | executeDispatchesInOrder: executeDispatchesInOrder,
|
2981 | executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
|
2982 | hasDispatches: hasDispatches,
|
2983 |
|
2984 | getInstanceFromNode: function (node) {
|
2985 | return ComponentTree.getInstanceFromNode(node);
|
2986 | },
|
2987 | getNodeFromInstance: function (node) {
|
2988 | return ComponentTree.getNodeFromInstance(node);
|
2989 | },
|
2990 | isAncestor: function (a, b) {
|
2991 | return TreeTraversal.isAncestor(a, b);
|
2992 | },
|
2993 | getLowestCommonAncestor: function (a, b) {
|
2994 | return TreeTraversal.getLowestCommonAncestor(a, b);
|
2995 | },
|
2996 | getParentInstance: function (inst) {
|
2997 | return TreeTraversal.getParentInstance(inst);
|
2998 | },
|
2999 | traverseTwoPhase: function (target, fn, arg) {
|
3000 | return TreeTraversal.traverseTwoPhase(target, fn, arg);
|
3001 | },
|
3002 | traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
|
3003 | return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
|
3004 | },
|
3005 |
|
3006 | injection: injection
|
3007 | };
|
3008 |
|
3009 | module.exports = EventPluginUtils;
|
3010 | },{"116":116,"141":141,"148":148,"50":50}],19:[function(_dereq_,module,exports){
|
3011 |
|
3012 |
|
3013 |
|
3014 |
|
3015 |
|
3016 |
|
3017 |
|
3018 |
|
3019 | 'use strict';
|
3020 |
|
3021 | var EventPluginHub = _dereq_(16);
|
3022 | var EventPluginUtils = _dereq_(18);
|
3023 |
|
3024 | var accumulateInto = _dereq_(95);
|
3025 | var forEachAccumulated = _dereq_(102);
|
3026 | var warning = _dereq_(148);
|
3027 |
|
3028 | var getListener = EventPluginHub.getListener;
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 |
|
3034 | function listenerAtPhase(inst, event, propagationPhase) {
|
3035 | var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
3036 | return getListener(inst, registrationName);
|
3037 | }
|
3038 |
|
3039 |
|
3040 |
|
3041 |
|
3042 |
|
3043 |
|
3044 |
|
3045 | function accumulateDirectionalDispatches(inst, phase, event) {
|
3046 | if ("development" !== 'production') {
|
3047 | "development" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
3048 | }
|
3049 | var listener = listenerAtPhase(inst, event, phase);
|
3050 | if (listener) {
|
3051 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
3052 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
3053 | }
|
3054 | }
|
3055 |
|
3056 |
|
3057 |
|
3058 |
|
3059 |
|
3060 |
|
3061 |
|
3062 |
|
3063 | function accumulateTwoPhaseDispatchesSingle(event) {
|
3064 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
3065 | EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
3066 | }
|
3067 | }
|
3068 |
|
3069 |
|
3070 |
|
3071 |
|
3072 | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
3073 | if (event && event.dispatchConfig.phasedRegistrationNames) {
|
3074 | var targetInst = event._targetInst;
|
3075 | var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
3076 | EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
3077 | }
|
3078 | }
|
3079 |
|
3080 |
|
3081 |
|
3082 |
|
3083 |
|
3084 |
|
3085 | function accumulateDispatches(inst, ignoredDirection, event) {
|
3086 | if (event && event.dispatchConfig.registrationName) {
|
3087 | var registrationName = event.dispatchConfig.registrationName;
|
3088 | var listener = getListener(inst, registrationName);
|
3089 | if (listener) {
|
3090 | event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
3091 | event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
3092 | }
|
3093 | }
|
3094 | }
|
3095 |
|
3096 |
|
3097 |
|
3098 |
|
3099 |
|
3100 |
|
3101 | function accumulateDirectDispatchesSingle(event) {
|
3102 | if (event && event.dispatchConfig.registrationName) {
|
3103 | accumulateDispatches(event._targetInst, null, event);
|
3104 | }
|
3105 | }
|
3106 |
|
3107 | function accumulateTwoPhaseDispatches(events) {
|
3108 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
|
3109 | }
|
3110 |
|
3111 | function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
3112 | forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
3113 | }
|
3114 |
|
3115 | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
3116 | EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
3117 | }
|
3118 |
|
3119 | function accumulateDirectDispatches(events) {
|
3120 | forEachAccumulated(events, accumulateDirectDispatchesSingle);
|
3121 | }
|
3122 |
|
3123 |
|
3124 |
|
3125 |
|
3126 |
|
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 | var EventPropagators = {
|
3135 | accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
|
3136 | accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
|
3137 | accumulateDirectDispatches: accumulateDirectDispatches,
|
3138 | accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
|
3139 | };
|
3140 |
|
3141 | module.exports = EventPropagators;
|
3142 | },{"102":102,"148":148,"16":16,"18":18,"95":95}],20:[function(_dereq_,module,exports){
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 |
|
3151 | 'use strict';
|
3152 |
|
3153 | var _assign = _dereq_(149);
|
3154 |
|
3155 | var PooledClass = _dereq_(24);
|
3156 |
|
3157 | var getTextContentAccessor = _dereq_(109);
|
3158 |
|
3159 |
|
3160 |
|
3161 |
|
3162 |
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 | function FallbackCompositionState(root) {
|
3171 | this._root = root;
|
3172 | this._startText = this.getText();
|
3173 | this._fallbackText = null;
|
3174 | }
|
3175 |
|
3176 | _assign(FallbackCompositionState.prototype, {
|
3177 | destructor: function () {
|
3178 | this._root = null;
|
3179 | this._startText = null;
|
3180 | this._fallbackText = null;
|
3181 | },
|
3182 |
|
3183 | |
3184 |
|
3185 |
|
3186 |
|
3187 |
|
3188 | getText: function () {
|
3189 | if ('value' in this._root) {
|
3190 | return this._root.value;
|
3191 | }
|
3192 | return this._root[getTextContentAccessor()];
|
3193 | },
|
3194 |
|
3195 | |
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 | getData: function () {
|
3202 | if (this._fallbackText) {
|
3203 | return this._fallbackText;
|
3204 | }
|
3205 |
|
3206 | var start;
|
3207 | var startValue = this._startText;
|
3208 | var startLength = startValue.length;
|
3209 | var end;
|
3210 | var endValue = this.getText();
|
3211 | var endLength = endValue.length;
|
3212 |
|
3213 | for (start = 0; start < startLength; start++) {
|
3214 | if (startValue[start] !== endValue[start]) {
|
3215 | break;
|
3216 | }
|
3217 | }
|
3218 |
|
3219 | var minEnd = startLength - start;
|
3220 | for (end = 1; end <= minEnd; end++) {
|
3221 | if (startValue[startLength - end] !== endValue[endLength - end]) {
|
3222 | break;
|
3223 | }
|
3224 | }
|
3225 |
|
3226 | var sliceTail = end > 1 ? 1 - end : undefined;
|
3227 | this._fallbackText = endValue.slice(start, sliceTail);
|
3228 | return this._fallbackText;
|
3229 | }
|
3230 | });
|
3231 |
|
3232 | PooledClass.addPoolingTo(FallbackCompositionState);
|
3233 |
|
3234 | module.exports = FallbackCompositionState;
|
3235 | },{"109":109,"149":149,"24":24}],21:[function(_dereq_,module,exports){
|
3236 |
|
3237 |
|
3238 |
|
3239 |
|
3240 |
|
3241 |
|
3242 |
|
3243 |
|
3244 | 'use strict';
|
3245 |
|
3246 | var DOMProperty = _dereq_(11);
|
3247 |
|
3248 | var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
3249 | var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
3250 | var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
3251 | var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
3252 | var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
3253 |
|
3254 | var HTMLDOMPropertyConfig = {
|
3255 | isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
3256 | Properties: {
|
3257 | |
3258 |
|
3259 |
|
3260 | accept: 0,
|
3261 | acceptCharset: 0,
|
3262 | accessKey: 0,
|
3263 | action: 0,
|
3264 | allowFullScreen: HAS_BOOLEAN_VALUE,
|
3265 | allowTransparency: 0,
|
3266 | alt: 0,
|
3267 |
|
3268 | as: 0,
|
3269 | async: HAS_BOOLEAN_VALUE,
|
3270 | autoComplete: 0,
|
3271 |
|
3272 |
|
3273 | autoPlay: HAS_BOOLEAN_VALUE,
|
3274 | capture: HAS_BOOLEAN_VALUE,
|
3275 | cellPadding: 0,
|
3276 | cellSpacing: 0,
|
3277 | charSet: 0,
|
3278 | challenge: 0,
|
3279 | checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
3280 | cite: 0,
|
3281 | classID: 0,
|
3282 | className: 0,
|
3283 | cols: HAS_POSITIVE_NUMERIC_VALUE,
|
3284 | colSpan: 0,
|
3285 | content: 0,
|
3286 | contentEditable: 0,
|
3287 | contextMenu: 0,
|
3288 | controls: HAS_BOOLEAN_VALUE,
|
3289 | controlsList: 0,
|
3290 | coords: 0,
|
3291 | crossOrigin: 0,
|
3292 | data: 0,
|
3293 | dateTime: 0,
|
3294 | 'default': HAS_BOOLEAN_VALUE,
|
3295 | defer: HAS_BOOLEAN_VALUE,
|
3296 | dir: 0,
|
3297 | disabled: HAS_BOOLEAN_VALUE,
|
3298 | download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
3299 | draggable: 0,
|
3300 | encType: 0,
|
3301 | form: 0,
|
3302 | formAction: 0,
|
3303 | formEncType: 0,
|
3304 | formMethod: 0,
|
3305 | formNoValidate: HAS_BOOLEAN_VALUE,
|
3306 | formTarget: 0,
|
3307 | frameBorder: 0,
|
3308 | headers: 0,
|
3309 | height: 0,
|
3310 | hidden: HAS_BOOLEAN_VALUE,
|
3311 | high: 0,
|
3312 | href: 0,
|
3313 | hrefLang: 0,
|
3314 | htmlFor: 0,
|
3315 | httpEquiv: 0,
|
3316 | icon: 0,
|
3317 | id: 0,
|
3318 | inputMode: 0,
|
3319 | integrity: 0,
|
3320 | is: 0,
|
3321 | keyParams: 0,
|
3322 | keyType: 0,
|
3323 | kind: 0,
|
3324 | label: 0,
|
3325 | lang: 0,
|
3326 | list: 0,
|
3327 | loop: HAS_BOOLEAN_VALUE,
|
3328 | low: 0,
|
3329 | manifest: 0,
|
3330 | marginHeight: 0,
|
3331 | marginWidth: 0,
|
3332 | max: 0,
|
3333 | maxLength: 0,
|
3334 | media: 0,
|
3335 | mediaGroup: 0,
|
3336 | method: 0,
|
3337 | min: 0,
|
3338 | minLength: 0,
|
3339 |
|
3340 |
|
3341 | multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
3342 | muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
3343 | name: 0,
|
3344 | nonce: 0,
|
3345 | noValidate: HAS_BOOLEAN_VALUE,
|
3346 | open: HAS_BOOLEAN_VALUE,
|
3347 | optimum: 0,
|
3348 | pattern: 0,
|
3349 | placeholder: 0,
|
3350 | playsInline: HAS_BOOLEAN_VALUE,
|
3351 | poster: 0,
|
3352 | preload: 0,
|
3353 | profile: 0,
|
3354 | radioGroup: 0,
|
3355 | readOnly: HAS_BOOLEAN_VALUE,
|
3356 | referrerPolicy: 0,
|
3357 | rel: 0,
|
3358 | required: HAS_BOOLEAN_VALUE,
|
3359 | reversed: HAS_BOOLEAN_VALUE,
|
3360 | role: 0,
|
3361 | rows: HAS_POSITIVE_NUMERIC_VALUE,
|
3362 | rowSpan: HAS_NUMERIC_VALUE,
|
3363 | sandbox: 0,
|
3364 | scope: 0,
|
3365 | scoped: HAS_BOOLEAN_VALUE,
|
3366 | scrolling: 0,
|
3367 | seamless: HAS_BOOLEAN_VALUE,
|
3368 | selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
3369 | shape: 0,
|
3370 | size: HAS_POSITIVE_NUMERIC_VALUE,
|
3371 | sizes: 0,
|
3372 | span: HAS_POSITIVE_NUMERIC_VALUE,
|
3373 | spellCheck: 0,
|
3374 | src: 0,
|
3375 | srcDoc: 0,
|
3376 | srcLang: 0,
|
3377 | srcSet: 0,
|
3378 | start: HAS_NUMERIC_VALUE,
|
3379 | step: 0,
|
3380 | style: 0,
|
3381 | summary: 0,
|
3382 | tabIndex: 0,
|
3383 | target: 0,
|
3384 | title: 0,
|
3385 |
|
3386 | type: 0,
|
3387 | useMap: 0,
|
3388 | value: 0,
|
3389 | width: 0,
|
3390 | wmode: 0,
|
3391 | wrap: 0,
|
3392 |
|
3393 | |
3394 |
|
3395 |
|
3396 | about: 0,
|
3397 | datatype: 0,
|
3398 | inlist: 0,
|
3399 | prefix: 0,
|
3400 |
|
3401 | property: 0,
|
3402 | resource: 0,
|
3403 | 'typeof': 0,
|
3404 | vocab: 0,
|
3405 |
|
3406 | |
3407 |
|
3408 |
|
3409 |
|
3410 |
|
3411 | autoCapitalize: 0,
|
3412 | autoCorrect: 0,
|
3413 |
|
3414 | autoSave: 0,
|
3415 |
|
3416 | color: 0,
|
3417 |
|
3418 |
|
3419 | itemProp: 0,
|
3420 | itemScope: HAS_BOOLEAN_VALUE,
|
3421 | itemType: 0,
|
3422 |
|
3423 |
|
3424 |
|
3425 | itemID: 0,
|
3426 | itemRef: 0,
|
3427 |
|
3428 |
|
3429 | results: 0,
|
3430 |
|
3431 |
|
3432 | security: 0,
|
3433 |
|
3434 | unselectable: 0
|
3435 | },
|
3436 | DOMAttributeNames: {
|
3437 | acceptCharset: 'accept-charset',
|
3438 | className: 'class',
|
3439 | htmlFor: 'for',
|
3440 | httpEquiv: 'http-equiv'
|
3441 | },
|
3442 | DOMPropertyNames: {},
|
3443 | DOMMutationMethods: {
|
3444 | value: function (node, value) {
|
3445 | if (value == null) {
|
3446 | return node.removeAttribute('value');
|
3447 | }
|
3448 |
|
3449 |
|
3450 |
|
3451 |
|
3452 | if (node.type !== 'number' || node.hasAttribute('value') === false) {
|
3453 | node.setAttribute('value', '' + value);
|
3454 | } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {
|
3455 |
|
3456 |
|
3457 |
|
3458 |
|
3459 |
|
3460 |
|
3461 |
|
3462 |
|
3463 | node.setAttribute('value', '' + value);
|
3464 | }
|
3465 | }
|
3466 | }
|
3467 | };
|
3468 |
|
3469 | module.exports = HTMLDOMPropertyConfig;
|
3470 | },{"11":11}],22:[function(_dereq_,module,exports){
|
3471 |
|
3472 |
|
3473 |
|
3474 |
|
3475 |
|
3476 |
|
3477 |
|
3478 |
|
3479 |
|
3480 | 'use strict';
|
3481 |
|
3482 |
|
3483 |
|
3484 |
|
3485 |
|
3486 |
|
3487 |
|
3488 |
|
3489 | function escape(key) {
|
3490 | var escapeRegex = /[=:]/g;
|
3491 | var escaperLookup = {
|
3492 | '=': '=0',
|
3493 | ':': '=2'
|
3494 | };
|
3495 | var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
3496 | return escaperLookup[match];
|
3497 | });
|
3498 |
|
3499 | return '$' + escapedString;
|
3500 | }
|
3501 |
|
3502 |
|
3503 |
|
3504 |
|
3505 |
|
3506 |
|
3507 |
|
3508 | function unescape(key) {
|
3509 | var unescapeRegex = /(=0|=2)/g;
|
3510 | var unescaperLookup = {
|
3511 | '=0': '=',
|
3512 | '=2': ':'
|
3513 | };
|
3514 | var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
|
3515 |
|
3516 | return ('' + keySubstring).replace(unescapeRegex, function (match) {
|
3517 | return unescaperLookup[match];
|
3518 | });
|
3519 | }
|
3520 |
|
3521 | var KeyEscapeUtils = {
|
3522 | escape: escape,
|
3523 | unescape: unescape
|
3524 | };
|
3525 |
|
3526 | module.exports = KeyEscapeUtils;
|
3527 | },{}],23:[function(_dereq_,module,exports){
|
3528 |
|
3529 |
|
3530 |
|
3531 |
|
3532 |
|
3533 |
|
3534 |
|
3535 |
|
3536 | 'use strict';
|
3537 |
|
3538 | var _prodInvariant = _dereq_(116);
|
3539 |
|
3540 | var ReactPropTypesSecret = _dereq_(66);
|
3541 | var propTypesFactory = _dereq_(151);
|
3542 |
|
3543 | var React = _dereq_(124);
|
3544 | var PropTypes = propTypesFactory(React.isValidElement);
|
3545 |
|
3546 | var invariant = _dereq_(141);
|
3547 | var warning = _dereq_(148);
|
3548 |
|
3549 | var hasReadOnlyValue = {
|
3550 | button: true,
|
3551 | checkbox: true,
|
3552 | image: true,
|
3553 | hidden: true,
|
3554 | radio: true,
|
3555 | reset: true,
|
3556 | submit: true
|
3557 | };
|
3558 |
|
3559 | function _assertSingleLink(inputProps) {
|
3560 | !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== '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;
|
3561 | }
|
3562 | function _assertValueLink(inputProps) {
|
3563 | _assertSingleLink(inputProps);
|
3564 | !(inputProps.value == null && inputProps.onChange == null) ? "development" !== '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;
|
3565 | }
|
3566 |
|
3567 | function _assertCheckedLink(inputProps) {
|
3568 | _assertSingleLink(inputProps);
|
3569 | !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== '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;
|
3570 | }
|
3571 |
|
3572 | var propTypes = {
|
3573 | value: function (props, propName, componentName) {
|
3574 | if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
|
3575 | return null;
|
3576 | }
|
3577 | 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`.');
|
3578 | },
|
3579 | checked: function (props, propName, componentName) {
|
3580 | if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
|
3581 | return null;
|
3582 | }
|
3583 | 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`.');
|
3584 | },
|
3585 | onChange: PropTypes.func
|
3586 | };
|
3587 |
|
3588 | var loggedTypeFailures = {};
|
3589 | function getDeclarationErrorAddendum(owner) {
|
3590 | if (owner) {
|
3591 | var name = owner.getName();
|
3592 | if (name) {
|
3593 | return ' Check the render method of `' + name + '`.';
|
3594 | }
|
3595 | }
|
3596 | return '';
|
3597 | }
|
3598 |
|
3599 |
|
3600 |
|
3601 |
|
3602 |
|
3603 | var LinkedValueUtils = {
|
3604 | checkPropTypes: function (tagName, props, owner) {
|
3605 | for (var propName in propTypes) {
|
3606 | if (propTypes.hasOwnProperty(propName)) {
|
3607 | var error = propTypes[propName](props, propName, tagName, 'prop', null, ReactPropTypesSecret);
|
3608 | }
|
3609 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
3610 |
|
3611 |
|
3612 | loggedTypeFailures[error.message] = true;
|
3613 |
|
3614 | var addendum = getDeclarationErrorAddendum(owner);
|
3615 | "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
3616 | }
|
3617 | }
|
3618 | },
|
3619 |
|
3620 | |
3621 |
|
3622 |
|
3623 |
|
3624 | getValue: function (inputProps) {
|
3625 | if (inputProps.valueLink) {
|
3626 | _assertValueLink(inputProps);
|
3627 | return inputProps.valueLink.value;
|
3628 | }
|
3629 | return inputProps.value;
|
3630 | },
|
3631 |
|
3632 | |
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 | getChecked: function (inputProps) {
|
3638 | if (inputProps.checkedLink) {
|
3639 | _assertCheckedLink(inputProps);
|
3640 | return inputProps.checkedLink.value;
|
3641 | }
|
3642 | return inputProps.checked;
|
3643 | },
|
3644 |
|
3645 | |
3646 |
|
3647 |
|
3648 |
|
3649 | executeOnChange: function (inputProps, event) {
|
3650 | if (inputProps.valueLink) {
|
3651 | _assertValueLink(inputProps);
|
3652 | return inputProps.valueLink.requestChange(event.target.value);
|
3653 | } else if (inputProps.checkedLink) {
|
3654 | _assertCheckedLink(inputProps);
|
3655 | return inputProps.checkedLink.requestChange(event.target.checked);
|
3656 | } else if (inputProps.onChange) {
|
3657 | return inputProps.onChange.call(undefined, event);
|
3658 | }
|
3659 | }
|
3660 | };
|
3661 |
|
3662 | module.exports = LinkedValueUtils;
|
3663 | },{"116":116,"124":124,"141":141,"148":148,"151":151,"66":66}],24:[function(_dereq_,module,exports){
|
3664 |
|
3665 |
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 |
|
3672 |
|
3673 | 'use strict';
|
3674 |
|
3675 | var _prodInvariant = _dereq_(116);
|
3676 |
|
3677 | var invariant = _dereq_(141);
|
3678 |
|
3679 |
|
3680 |
|
3681 |
|
3682 |
|
3683 |
|
3684 |
|
3685 |
|
3686 | var oneArgumentPooler = function (copyFieldsFrom) {
|
3687 | var Klass = this;
|
3688 | if (Klass.instancePool.length) {
|
3689 | var instance = Klass.instancePool.pop();
|
3690 | Klass.call(instance, copyFieldsFrom);
|
3691 | return instance;
|
3692 | } else {
|
3693 | return new Klass(copyFieldsFrom);
|
3694 | }
|
3695 | };
|
3696 |
|
3697 | var twoArgumentPooler = function (a1, a2) {
|
3698 | var Klass = this;
|
3699 | if (Klass.instancePool.length) {
|
3700 | var instance = Klass.instancePool.pop();
|
3701 | Klass.call(instance, a1, a2);
|
3702 | return instance;
|
3703 | } else {
|
3704 | return new Klass(a1, a2);
|
3705 | }
|
3706 | };
|
3707 |
|
3708 | var threeArgumentPooler = function (a1, a2, a3) {
|
3709 | var Klass = this;
|
3710 | if (Klass.instancePool.length) {
|
3711 | var instance = Klass.instancePool.pop();
|
3712 | Klass.call(instance, a1, a2, a3);
|
3713 | return instance;
|
3714 | } else {
|
3715 | return new Klass(a1, a2, a3);
|
3716 | }
|
3717 | };
|
3718 |
|
3719 | var fourArgumentPooler = function (a1, a2, a3, a4) {
|
3720 | var Klass = this;
|
3721 | if (Klass.instancePool.length) {
|
3722 | var instance = Klass.instancePool.pop();
|
3723 | Klass.call(instance, a1, a2, a3, a4);
|
3724 | return instance;
|
3725 | } else {
|
3726 | return new Klass(a1, a2, a3, a4);
|
3727 | }
|
3728 | };
|
3729 |
|
3730 | var standardReleaser = function (instance) {
|
3731 | var Klass = this;
|
3732 | !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
|
3733 | instance.destructor();
|
3734 | if (Klass.instancePool.length < Klass.poolSize) {
|
3735 | Klass.instancePool.push(instance);
|
3736 | }
|
3737 | };
|
3738 |
|
3739 | var DEFAULT_POOL_SIZE = 10;
|
3740 | var DEFAULT_POOLER = oneArgumentPooler;
|
3741 |
|
3742 |
|
3743 |
|
3744 |
|
3745 |
|
3746 |
|
3747 |
|
3748 |
|
3749 |
|
3750 |
|
3751 | var addPoolingTo = function (CopyConstructor, pooler) {
|
3752 |
|
3753 |
|
3754 | var NewKlass = CopyConstructor;
|
3755 | NewKlass.instancePool = [];
|
3756 | NewKlass.getPooled = pooler || DEFAULT_POOLER;
|
3757 | if (!NewKlass.poolSize) {
|
3758 | NewKlass.poolSize = DEFAULT_POOL_SIZE;
|
3759 | }
|
3760 | NewKlass.release = standardReleaser;
|
3761 | return NewKlass;
|
3762 | };
|
3763 |
|
3764 | var PooledClass = {
|
3765 | addPoolingTo: addPoolingTo,
|
3766 | oneArgumentPooler: oneArgumentPooler,
|
3767 | twoArgumentPooler: twoArgumentPooler,
|
3768 | threeArgumentPooler: threeArgumentPooler,
|
3769 | fourArgumentPooler: fourArgumentPooler
|
3770 | };
|
3771 |
|
3772 | module.exports = PooledClass;
|
3773 | },{"116":116,"141":141}],25:[function(_dereq_,module,exports){
|
3774 |
|
3775 |
|
3776 |
|
3777 |
|
3778 |
|
3779 |
|
3780 |
|
3781 |
|
3782 | 'use strict';
|
3783 |
|
3784 | var _assign = _dereq_(149);
|
3785 |
|
3786 | var EventPluginRegistry = _dereq_(17);
|
3787 | var ReactEventEmitterMixin = _dereq_(51);
|
3788 | var ViewportMetrics = _dereq_(94);
|
3789 |
|
3790 | var getVendorPrefixedEventName = _dereq_(110);
|
3791 | var isEventSupported = _dereq_(113);
|
3792 |
|
3793 |
|
3794 |
|
3795 |
|
3796 |
|
3797 |
|
3798 |
|
3799 |
|
3800 |
|
3801 |
|
3802 |
|
3803 |
|
3804 |
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 |
|
3811 |
|
3812 |
|
3813 |
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 |
|
3822 |
|
3823 |
|
3824 |
|
3825 |
|
3826 |
|
3827 |
|
3828 |
|
3829 |
|
3830 |
|
3831 |
|
3832 |
|
3833 |
|
3834 |
|
3835 |
|
3836 |
|
3837 |
|
3838 |
|
3839 |
|
3840 |
|
3841 |
|
3842 |
|
3843 |
|
3844 |
|
3845 |
|
3846 |
|
3847 |
|
3848 | var hasEventPageXY;
|
3849 | var alreadyListeningTo = {};
|
3850 | var isMonitoringScrollValue = false;
|
3851 | var reactTopListenersCounter = 0;
|
3852 |
|
3853 |
|
3854 |
|
3855 |
|
3856 | var topEventMapping = {
|
3857 | topAbort: 'abort',
|
3858 | topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
|
3859 | topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
|
3860 | topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
|
3861 | topBlur: 'blur',
|
3862 | topCanPlay: 'canplay',
|
3863 | topCanPlayThrough: 'canplaythrough',
|
3864 | topChange: 'change',
|
3865 | topClick: 'click',
|
3866 | topCompositionEnd: 'compositionend',
|
3867 | topCompositionStart: 'compositionstart',
|
3868 | topCompositionUpdate: 'compositionupdate',
|
3869 | topContextMenu: 'contextmenu',
|
3870 | topCopy: 'copy',
|
3871 | topCut: 'cut',
|
3872 | topDoubleClick: 'dblclick',
|
3873 | topDrag: 'drag',
|
3874 | topDragEnd: 'dragend',
|
3875 | topDragEnter: 'dragenter',
|
3876 | topDragExit: 'dragexit',
|
3877 | topDragLeave: 'dragleave',
|
3878 | topDragOver: 'dragover',
|
3879 | topDragStart: 'dragstart',
|
3880 | topDrop: 'drop',
|
3881 | topDurationChange: 'durationchange',
|
3882 | topEmptied: 'emptied',
|
3883 | topEncrypted: 'encrypted',
|
3884 | topEnded: 'ended',
|
3885 | topError: 'error',
|
3886 | topFocus: 'focus',
|
3887 | topInput: 'input',
|
3888 | topKeyDown: 'keydown',
|
3889 | topKeyPress: 'keypress',
|
3890 | topKeyUp: 'keyup',
|
3891 | topLoadedData: 'loadeddata',
|
3892 | topLoadedMetadata: 'loadedmetadata',
|
3893 | topLoadStart: 'loadstart',
|
3894 | topMouseDown: 'mousedown',
|
3895 | topMouseMove: 'mousemove',
|
3896 | topMouseOut: 'mouseout',
|
3897 | topMouseOver: 'mouseover',
|
3898 | topMouseUp: 'mouseup',
|
3899 | topPaste: 'paste',
|
3900 | topPause: 'pause',
|
3901 | topPlay: 'play',
|
3902 | topPlaying: 'playing',
|
3903 | topProgress: 'progress',
|
3904 | topRateChange: 'ratechange',
|
3905 | topScroll: 'scroll',
|
3906 | topSeeked: 'seeked',
|
3907 | topSeeking: 'seeking',
|
3908 | topSelectionChange: 'selectionchange',
|
3909 | topStalled: 'stalled',
|
3910 | topSuspend: 'suspend',
|
3911 | topTextInput: 'textInput',
|
3912 | topTimeUpdate: 'timeupdate',
|
3913 | topTouchCancel: 'touchcancel',
|
3914 | topTouchEnd: 'touchend',
|
3915 | topTouchMove: 'touchmove',
|
3916 | topTouchStart: 'touchstart',
|
3917 | topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
|
3918 | topVolumeChange: 'volumechange',
|
3919 | topWaiting: 'waiting',
|
3920 | topWheel: 'wheel'
|
3921 | };
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 | var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
|
3927 |
|
3928 | function getListeningForDocument(mountAt) {
|
3929 |
|
3930 |
|
3931 | if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
|
3932 | mountAt[topListenersIDKey] = reactTopListenersCounter++;
|
3933 | alreadyListeningTo[mountAt[topListenersIDKey]] = {};
|
3934 | }
|
3935 | return alreadyListeningTo[mountAt[topListenersIDKey]];
|
3936 | }
|
3937 |
|
3938 |
|
3939 |
|
3940 |
|
3941 |
|
3942 |
|
3943 |
|
3944 |
|
3945 |
|
3946 |
|
3947 |
|
3948 | var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
|
3949 | |
3950 |
|
3951 |
|
3952 | ReactEventListener: null,
|
3953 |
|
3954 | injection: {
|
3955 | |
3956 |
|
3957 |
|
3958 | injectReactEventListener: function (ReactEventListener) {
|
3959 | ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
|
3960 | ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
|
3961 | }
|
3962 | },
|
3963 |
|
3964 | |
3965 |
|
3966 |
|
3967 |
|
3968 |
|
3969 | setEnabled: function (enabled) {
|
3970 | if (ReactBrowserEventEmitter.ReactEventListener) {
|
3971 | ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
|
3972 | }
|
3973 | },
|
3974 |
|
3975 | |
3976 |
|
3977 |
|
3978 | isEnabled: function () {
|
3979 | return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
|
3980 | },
|
3981 |
|
3982 | |
3983 |
|
3984 |
|
3985 |
|
3986 |
|
3987 |
|
3988 |
|
3989 |
|
3990 |
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 | listenTo: function (registrationName, contentDocumentHandle) {
|
4004 | var mountAt = contentDocumentHandle;
|
4005 | var isListening = getListeningForDocument(mountAt);
|
4006 | var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
|
4007 |
|
4008 | for (var i = 0; i < dependencies.length; i++) {
|
4009 | var dependency = dependencies[i];
|
4010 | if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
4011 | if (dependency === 'topWheel') {
|
4012 | if (isEventSupported('wheel')) {
|
4013 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt);
|
4014 | } else if (isEventSupported('mousewheel')) {
|
4015 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
4016 | } else {
|
4017 |
|
4018 |
|
4019 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
4020 | }
|
4021 | } else if (dependency === 'topScroll') {
|
4022 | if (isEventSupported('scroll', true)) {
|
4023 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
|
4024 | } else {
|
4025 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
|
4026 | }
|
4027 | } else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
4028 | if (isEventSupported('focus', true)) {
|
4029 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
|
4030 | ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
|
4031 | } else if (isEventSupported('focusin')) {
|
4032 |
|
4033 |
|
4034 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt);
|
4035 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt);
|
4036 | }
|
4037 |
|
4038 |
|
4039 | isListening.topBlur = true;
|
4040 | isListening.topFocus = true;
|
4041 | } else if (topEventMapping.hasOwnProperty(dependency)) {
|
4042 | ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
|
4043 | }
|
4044 |
|
4045 | isListening[dependency] = true;
|
4046 | }
|
4047 | }
|
4048 | },
|
4049 |
|
4050 | trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
|
4051 | return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
|
4052 | },
|
4053 |
|
4054 | trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
|
4055 | return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
|
4056 | },
|
4057 |
|
4058 | |
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 | supportsEventPageXY: function () {
|
4064 | if (!document.createEvent) {
|
4065 | return false;
|
4066 | }
|
4067 | var ev = document.createEvent('MouseEvent');
|
4068 | return ev != null && 'pageX' in ev;
|
4069 | },
|
4070 |
|
4071 | |
4072 |
|
4073 |
|
4074 |
|
4075 |
|
4076 |
|
4077 |
|
4078 |
|
4079 |
|
4080 |
|
4081 |
|
4082 | ensureScrollValueMonitoring: function () {
|
4083 | if (hasEventPageXY === undefined) {
|
4084 | hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
|
4085 | }
|
4086 | if (!hasEventPageXY && !isMonitoringScrollValue) {
|
4087 | var refresh = ViewportMetrics.refreshScrollValues;
|
4088 | ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
|
4089 | isMonitoringScrollValue = true;
|
4090 | }
|
4091 | }
|
4092 | });
|
4093 |
|
4094 | module.exports = ReactBrowserEventEmitter;
|
4095 | },{"110":110,"113":113,"149":149,"17":17,"51":51,"94":94}],26:[function(_dereq_,module,exports){
|
4096 | (function (process){
|
4097 |
|
4098 |
|
4099 |
|
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 | 'use strict';
|
4106 |
|
4107 | var ReactReconciler = _dereq_(68);
|
4108 |
|
4109 | var instantiateReactComponent = _dereq_(112);
|
4110 | var KeyEscapeUtils = _dereq_(22);
|
4111 | var shouldUpdateReactComponent = _dereq_(119);
|
4112 | var traverseAllChildren = _dereq_(120);
|
4113 | var warning = _dereq_(148);
|
4114 |
|
4115 | var ReactComponentTreeHook;
|
4116 |
|
4117 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
4118 |
|
4119 |
|
4120 |
|
4121 |
|
4122 |
|
4123 | ReactComponentTreeHook = _dereq_(122);
|
4124 | }
|
4125 |
|
4126 | function instantiateChild(childInstances, child, name, selfDebugID) {
|
4127 |
|
4128 | var keyUnique = childInstances[name] === undefined;
|
4129 | if ("development" !== 'production') {
|
4130 | if (!ReactComponentTreeHook) {
|
4131 | ReactComponentTreeHook = _dereq_(122);
|
4132 | }
|
4133 | if (!keyUnique) {
|
4134 | "development" !== '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;
|
4135 | }
|
4136 | }
|
4137 | if (child != null && keyUnique) {
|
4138 | childInstances[name] = instantiateReactComponent(child, true);
|
4139 | }
|
4140 | }
|
4141 |
|
4142 |
|
4143 |
|
4144 |
|
4145 |
|
4146 |
|
4147 | var ReactChildReconciler = {
|
4148 | |
4149 |
|
4150 |
|
4151 |
|
4152 |
|
4153 |
|
4154 |
|
4155 |
|
4156 | instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
|
4157 | {
|
4158 | if (nestedChildNodes == null) {
|
4159 | return null;
|
4160 | }
|
4161 | var childInstances = {};
|
4162 |
|
4163 | if ("development" !== 'production') {
|
4164 | traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
|
4165 | return instantiateChild(childInsts, child, name, selfDebugID);
|
4166 | }, childInstances);
|
4167 | } else {
|
4168 | traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
|
4169 | }
|
4170 | return childInstances;
|
4171 | },
|
4172 |
|
4173 | |
4174 |
|
4175 |
|
4176 |
|
4177 |
|
4178 |
|
4179 |
|
4180 |
|
4181 |
|
4182 |
|
4183 | updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
|
4184 | {
|
4185 |
|
4186 |
|
4187 |
|
4188 |
|
4189 |
|
4190 | if (!nextChildren && !prevChildren) {
|
4191 | return;
|
4192 | }
|
4193 | var name;
|
4194 | var prevChild;
|
4195 | for (name in nextChildren) {
|
4196 | if (!nextChildren.hasOwnProperty(name)) {
|
4197 | continue;
|
4198 | }
|
4199 | prevChild = prevChildren && prevChildren[name];
|
4200 | var prevElement = prevChild && prevChild._currentElement;
|
4201 | var nextElement = nextChildren[name];
|
4202 | if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
|
4203 | ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
|
4204 | nextChildren[name] = prevChild;
|
4205 | } else {
|
4206 | if (prevChild) {
|
4207 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
4208 | ReactReconciler.unmountComponent(prevChild, false);
|
4209 | }
|
4210 |
|
4211 | var nextChildInstance = instantiateReactComponent(nextElement, true);
|
4212 | nextChildren[name] = nextChildInstance;
|
4213 |
|
4214 |
|
4215 | var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
|
4216 | mountImages.push(nextChildMountImage);
|
4217 | }
|
4218 | }
|
4219 |
|
4220 | for (name in prevChildren) {
|
4221 | if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
|
4222 | prevChild = prevChildren[name];
|
4223 | removedNodes[name] = ReactReconciler.getHostNode(prevChild);
|
4224 | ReactReconciler.unmountComponent(prevChild, false);
|
4225 | }
|
4226 | }
|
4227 | },
|
4228 |
|
4229 | |
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 | unmountChildren: function (renderedChildren, safely) {
|
4237 | for (var name in renderedChildren) {
|
4238 | if (renderedChildren.hasOwnProperty(name)) {
|
4239 | var renderedChild = renderedChildren[name];
|
4240 | ReactReconciler.unmountComponent(renderedChild, safely);
|
4241 | }
|
4242 | }
|
4243 | }
|
4244 | };
|
4245 |
|
4246 | module.exports = ReactChildReconciler;
|
4247 | }).call(this,undefined)
|
4248 | },{"112":112,"119":119,"120":120,"122":122,"148":148,"22":22,"68":68}],27:[function(_dereq_,module,exports){
|
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 |
|
4254 |
|
4255 |
|
4256 |
|
4257 | 'use strict';
|
4258 |
|
4259 | var DOMChildrenOperations = _dereq_(8);
|
4260 | var ReactDOMIDOperations = _dereq_(35);
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 | var ReactComponentBrowserEnvironment = {
|
4268 | processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
|
4269 |
|
4270 | replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
|
4271 | };
|
4272 |
|
4273 | module.exports = ReactComponentBrowserEnvironment;
|
4274 | },{"35":35,"8":8}],28:[function(_dereq_,module,exports){
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 | 'use strict';
|
4285 |
|
4286 | var _prodInvariant = _dereq_(116);
|
4287 |
|
4288 | var invariant = _dereq_(141);
|
4289 |
|
4290 | var injected = false;
|
4291 |
|
4292 | var ReactComponentEnvironment = {
|
4293 | |
4294 |
|
4295 |
|
4296 |
|
4297 | replaceNodeWithMarkup: null,
|
4298 |
|
4299 | |
4300 |
|
4301 |
|
4302 |
|
4303 | processChildrenUpdates: null,
|
4304 |
|
4305 | injection: {
|
4306 | injectEnvironment: function (environment) {
|
4307 | !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
|
4308 | ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
|
4309 | ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
|
4310 | injected = true;
|
4311 | }
|
4312 | }
|
4313 | };
|
4314 |
|
4315 | module.exports = ReactComponentEnvironment;
|
4316 | },{"116":116,"141":141}],29:[function(_dereq_,module,exports){
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 |
|
4324 |
|
4325 | 'use strict';
|
4326 |
|
4327 | var _prodInvariant = _dereq_(116),
|
4328 | _assign = _dereq_(149);
|
4329 |
|
4330 | var React = _dereq_(124);
|
4331 | var ReactComponentEnvironment = _dereq_(28);
|
4332 | var ReactCurrentOwner = _dereq_(123);
|
4333 | var ReactErrorUtils = _dereq_(50);
|
4334 | var ReactInstanceMap = _dereq_(58);
|
4335 | var ReactInstrumentation = _dereq_(59);
|
4336 | var ReactNodeTypes = _dereq_(63);
|
4337 | var ReactReconciler = _dereq_(68);
|
4338 |
|
4339 | if ("development" !== 'production') {
|
4340 | var checkReactTypeSpec = _dereq_(97);
|
4341 | }
|
4342 |
|
4343 | var emptyObject = _dereq_(134);
|
4344 | var invariant = _dereq_(141);
|
4345 | var shallowEqual = _dereq_(147);
|
4346 | var shouldUpdateReactComponent = _dereq_(119);
|
4347 | var warning = _dereq_(148);
|
4348 |
|
4349 | var CompositeTypes = {
|
4350 | ImpureClass: 0,
|
4351 | PureClass: 1,
|
4352 | StatelessFunctional: 2
|
4353 | };
|
4354 |
|
4355 | function StatelessComponent(Component) {}
|
4356 | StatelessComponent.prototype.render = function () {
|
4357 | var Component = ReactInstanceMap.get(this)._currentElement.type;
|
4358 | var element = Component(this.props, this.context, this.updater);
|
4359 | warnIfInvalidElement(Component, element);
|
4360 | return element;
|
4361 | };
|
4362 |
|
4363 | function warnIfInvalidElement(Component, element) {
|
4364 | if ("development" !== 'production') {
|
4365 | "development" !== '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;
|
4366 | "development" !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
|
4367 | }
|
4368 | }
|
4369 |
|
4370 | function shouldConstruct(Component) {
|
4371 | return !!(Component.prototype && Component.prototype.isReactComponent);
|
4372 | }
|
4373 |
|
4374 | function isPureComponent(Component) {
|
4375 | return !!(Component.prototype && Component.prototype.isPureReactComponent);
|
4376 | }
|
4377 |
|
4378 |
|
4379 | function measureLifeCyclePerf(fn, debugID, timerType) {
|
4380 | if (debugID === 0) {
|
4381 |
|
4382 |
|
4383 |
|
4384 | return fn();
|
4385 | }
|
4386 |
|
4387 | ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
|
4388 | try {
|
4389 | return fn();
|
4390 | } finally {
|
4391 | ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
|
4392 | }
|
4393 | }
|
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 | var nextMountID = 1;
|
4429 |
|
4430 |
|
4431 |
|
4432 |
|
4433 | var ReactCompositeComponent = {
|
4434 | |
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 | construct: function (element) {
|
4442 | this._currentElement = element;
|
4443 | this._rootNodeID = 0;
|
4444 | this._compositeType = null;
|
4445 | this._instance = null;
|
4446 | this._hostParent = null;
|
4447 | this._hostContainerInfo = null;
|
4448 |
|
4449 |
|
4450 | this._updateBatchNumber = null;
|
4451 | this._pendingElement = null;
|
4452 | this._pendingStateQueue = null;
|
4453 | this._pendingReplaceState = false;
|
4454 | this._pendingForceUpdate = false;
|
4455 |
|
4456 | this._renderedNodeType = null;
|
4457 | this._renderedComponent = null;
|
4458 | this._context = null;
|
4459 | this._mountOrder = 0;
|
4460 | this._topLevelWrapper = null;
|
4461 |
|
4462 |
|
4463 | this._pendingCallbacks = null;
|
4464 |
|
4465 |
|
4466 | this._calledComponentWillUnmount = false;
|
4467 |
|
4468 | if ("development" !== 'production') {
|
4469 | this._warnedAboutRefsInRender = false;
|
4470 | }
|
4471 | },
|
4472 |
|
4473 | |
4474 |
|
4475 |
|
4476 |
|
4477 |
|
4478 |
|
4479 |
|
4480 |
|
4481 |
|
4482 |
|
4483 |
|
4484 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
4485 | var _this = this;
|
4486 |
|
4487 | this._context = context;
|
4488 | this._mountOrder = nextMountID++;
|
4489 | this._hostParent = hostParent;
|
4490 | this._hostContainerInfo = hostContainerInfo;
|
4491 |
|
4492 | var publicProps = this._currentElement.props;
|
4493 | var publicContext = this._processContext(context);
|
4494 |
|
4495 | var Component = this._currentElement.type;
|
4496 |
|
4497 | var updateQueue = transaction.getUpdateQueue();
|
4498 |
|
4499 |
|
4500 | var doConstruct = shouldConstruct(Component);
|
4501 | var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
|
4502 | var renderedElement;
|
4503 |
|
4504 |
|
4505 | if (!doConstruct && (inst == null || inst.render == null)) {
|
4506 | renderedElement = inst;
|
4507 | warnIfInvalidElement(Component, renderedElement);
|
4508 | !(inst === null || inst === false || React.isValidElement(inst)) ? "development" !== '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;
|
4509 | inst = new StatelessComponent(Component);
|
4510 | this._compositeType = CompositeTypes.StatelessFunctional;
|
4511 | } else {
|
4512 | if (isPureComponent(Component)) {
|
4513 | this._compositeType = CompositeTypes.PureClass;
|
4514 | } else {
|
4515 | this._compositeType = CompositeTypes.ImpureClass;
|
4516 | }
|
4517 | }
|
4518 |
|
4519 | if ("development" !== 'production') {
|
4520 |
|
4521 |
|
4522 | if (inst.render == null) {
|
4523 | "development" !== '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;
|
4524 | }
|
4525 |
|
4526 | var propsMutated = inst.props !== publicProps;
|
4527 | var componentName = Component.displayName || Component.name || 'Component';
|
4528 |
|
4529 | "development" !== '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;
|
4530 | }
|
4531 |
|
4532 |
|
4533 |
|
4534 | inst.props = publicProps;
|
4535 | inst.context = publicContext;
|
4536 | inst.refs = emptyObject;
|
4537 | inst.updater = updateQueue;
|
4538 |
|
4539 | this._instance = inst;
|
4540 |
|
4541 |
|
4542 | ReactInstanceMap.set(inst, this);
|
4543 |
|
4544 | if ("development" !== 'production') {
|
4545 |
|
4546 |
|
4547 |
|
4548 | "development" !== '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;
|
4549 | "development" !== '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;
|
4550 | "development" !== '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;
|
4551 | "development" !== '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;
|
4552 | "development" !== '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;
|
4553 | "development" !== '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;
|
4554 | "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
|
4555 | }
|
4556 |
|
4557 | var initialState = inst.state;
|
4558 | if (initialState === undefined) {
|
4559 | inst.state = initialState = null;
|
4560 | }
|
4561 | !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
|
4562 |
|
4563 | this._pendingStateQueue = null;
|
4564 | this._pendingReplaceState = false;
|
4565 | this._pendingForceUpdate = false;
|
4566 |
|
4567 | var markup;
|
4568 | if (inst.unstable_handleError) {
|
4569 | markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
4570 | } else {
|
4571 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
4572 | }
|
4573 |
|
4574 | if (inst.componentDidMount) {
|
4575 | if ("development" !== 'production') {
|
4576 | transaction.getReactMountReady().enqueue(function () {
|
4577 | measureLifeCyclePerf(function () {
|
4578 | return inst.componentDidMount();
|
4579 | }, _this._debugID, 'componentDidMount');
|
4580 | });
|
4581 | } else {
|
4582 | transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
|
4583 | }
|
4584 | }
|
4585 |
|
4586 | return markup;
|
4587 | },
|
4588 |
|
4589 | _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
|
4590 | if ("development" !== 'production' && !doConstruct) {
|
4591 | ReactCurrentOwner.current = this;
|
4592 | try {
|
4593 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
4594 | } finally {
|
4595 | ReactCurrentOwner.current = null;
|
4596 | }
|
4597 | } else {
|
4598 | return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
|
4599 | }
|
4600 | },
|
4601 |
|
4602 | _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
|
4603 | var Component = this._currentElement.type;
|
4604 |
|
4605 | if (doConstruct) {
|
4606 | if ("development" !== 'production') {
|
4607 | return measureLifeCyclePerf(function () {
|
4608 | return new Component(publicProps, publicContext, updateQueue);
|
4609 | }, this._debugID, 'ctor');
|
4610 | } else {
|
4611 | return new Component(publicProps, publicContext, updateQueue);
|
4612 | }
|
4613 | }
|
4614 |
|
4615 |
|
4616 |
|
4617 | if ("development" !== 'production') {
|
4618 | return measureLifeCyclePerf(function () {
|
4619 | return Component(publicProps, publicContext, updateQueue);
|
4620 | }, this._debugID, 'render');
|
4621 | } else {
|
4622 | return Component(publicProps, publicContext, updateQueue);
|
4623 | }
|
4624 | },
|
4625 |
|
4626 | performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
4627 | var markup;
|
4628 | var checkpoint = transaction.checkpoint();
|
4629 | try {
|
4630 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
4631 | } catch (e) {
|
4632 |
|
4633 | transaction.rollback(checkpoint);
|
4634 | this._instance.unstable_handleError(e);
|
4635 | if (this._pendingStateQueue) {
|
4636 | this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
|
4637 | }
|
4638 | checkpoint = transaction.checkpoint();
|
4639 |
|
4640 | this._renderedComponent.unmountComponent(true);
|
4641 | transaction.rollback(checkpoint);
|
4642 |
|
4643 |
|
4644 |
|
4645 | markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
|
4646 | }
|
4647 | return markup;
|
4648 | },
|
4649 |
|
4650 | performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
|
4651 | var inst = this._instance;
|
4652 |
|
4653 | var debugID = 0;
|
4654 | if ("development" !== 'production') {
|
4655 | debugID = this._debugID;
|
4656 | }
|
4657 |
|
4658 | if (inst.componentWillMount) {
|
4659 | if ("development" !== 'production') {
|
4660 | measureLifeCyclePerf(function () {
|
4661 | return inst.componentWillMount();
|
4662 | }, debugID, 'componentWillMount');
|
4663 | } else {
|
4664 | inst.componentWillMount();
|
4665 | }
|
4666 |
|
4667 |
|
4668 | if (this._pendingStateQueue) {
|
4669 | inst.state = this._processPendingState(inst.props, inst.context);
|
4670 | }
|
4671 | }
|
4672 |
|
4673 |
|
4674 | if (renderedElement === undefined) {
|
4675 | renderedElement = this._renderValidatedComponent();
|
4676 | }
|
4677 |
|
4678 | var nodeType = ReactNodeTypes.getType(renderedElement);
|
4679 | this._renderedNodeType = nodeType;
|
4680 | var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY
|
4681 | );
|
4682 | this._renderedComponent = child;
|
4683 |
|
4684 | var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
|
4685 |
|
4686 | if ("development" !== 'production') {
|
4687 | if (debugID !== 0) {
|
4688 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
4689 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
4690 | }
|
4691 | }
|
4692 |
|
4693 | return markup;
|
4694 | },
|
4695 |
|
4696 | getHostNode: function () {
|
4697 | return ReactReconciler.getHostNode(this._renderedComponent);
|
4698 | },
|
4699 |
|
4700 | |
4701 |
|
4702 |
|
4703 |
|
4704 |
|
4705 |
|
4706 | unmountComponent: function (safely) {
|
4707 | if (!this._renderedComponent) {
|
4708 | return;
|
4709 | }
|
4710 |
|
4711 | var inst = this._instance;
|
4712 |
|
4713 | if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
|
4714 | inst._calledComponentWillUnmount = true;
|
4715 |
|
4716 | if (safely) {
|
4717 | var name = this.getName() + '.componentWillUnmount()';
|
4718 | ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
|
4719 | } else {
|
4720 | if ("development" !== 'production') {
|
4721 | measureLifeCyclePerf(function () {
|
4722 | return inst.componentWillUnmount();
|
4723 | }, this._debugID, 'componentWillUnmount');
|
4724 | } else {
|
4725 | inst.componentWillUnmount();
|
4726 | }
|
4727 | }
|
4728 | }
|
4729 |
|
4730 | if (this._renderedComponent) {
|
4731 | ReactReconciler.unmountComponent(this._renderedComponent, safely);
|
4732 | this._renderedNodeType = null;
|
4733 | this._renderedComponent = null;
|
4734 | this._instance = null;
|
4735 | }
|
4736 |
|
4737 |
|
4738 |
|
4739 |
|
4740 | this._pendingStateQueue = null;
|
4741 | this._pendingReplaceState = false;
|
4742 | this._pendingForceUpdate = false;
|
4743 | this._pendingCallbacks = null;
|
4744 | this._pendingElement = null;
|
4745 |
|
4746 |
|
4747 |
|
4748 | this._context = null;
|
4749 | this._rootNodeID = 0;
|
4750 | this._topLevelWrapper = null;
|
4751 |
|
4752 |
|
4753 |
|
4754 |
|
4755 | ReactInstanceMap.remove(inst);
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 |
|
4761 |
|
4762 | },
|
4763 |
|
4764 | |
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 | _maskContext: function (context) {
|
4773 | var Component = this._currentElement.type;
|
4774 | var contextTypes = Component.contextTypes;
|
4775 | if (!contextTypes) {
|
4776 | return emptyObject;
|
4777 | }
|
4778 | var maskedContext = {};
|
4779 | for (var contextName in contextTypes) {
|
4780 | maskedContext[contextName] = context[contextName];
|
4781 | }
|
4782 | return maskedContext;
|
4783 | },
|
4784 |
|
4785 | |
4786 |
|
4787 |
|
4788 |
|
4789 |
|
4790 |
|
4791 |
|
4792 |
|
4793 | _processContext: function (context) {
|
4794 | var maskedContext = this._maskContext(context);
|
4795 | if ("development" !== 'production') {
|
4796 | var Component = this._currentElement.type;
|
4797 | if (Component.contextTypes) {
|
4798 | this._checkContextTypes(Component.contextTypes, maskedContext, 'context');
|
4799 | }
|
4800 | }
|
4801 | return maskedContext;
|
4802 | },
|
4803 |
|
4804 | |
4805 |
|
4806 |
|
4807 |
|
4808 |
|
4809 | _processChildContext: function (currentContext) {
|
4810 | var Component = this._currentElement.type;
|
4811 | var inst = this._instance;
|
4812 | var childContext;
|
4813 |
|
4814 | if (inst.getChildContext) {
|
4815 | if ("development" !== 'production') {
|
4816 | ReactInstrumentation.debugTool.onBeginProcessingChildContext();
|
4817 | try {
|
4818 | childContext = inst.getChildContext();
|
4819 | } finally {
|
4820 | ReactInstrumentation.debugTool.onEndProcessingChildContext();
|
4821 | }
|
4822 | } else {
|
4823 | childContext = inst.getChildContext();
|
4824 | }
|
4825 | }
|
4826 |
|
4827 | if (childContext) {
|
4828 | !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
|
4829 | if ("development" !== 'production') {
|
4830 | this._checkContextTypes(Component.childContextTypes, childContext, 'child context');
|
4831 | }
|
4832 | for (var name in childContext) {
|
4833 | !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
|
4834 | }
|
4835 | return _assign({}, currentContext, childContext);
|
4836 | }
|
4837 | return currentContext;
|
4838 | },
|
4839 |
|
4840 | |
4841 |
|
4842 |
|
4843 |
|
4844 |
|
4845 |
|
4846 |
|
4847 |
|
4848 | _checkContextTypes: function (typeSpecs, values, location) {
|
4849 | if ("development" !== 'production') {
|
4850 | checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
|
4851 | }
|
4852 | },
|
4853 |
|
4854 | receiveComponent: function (nextElement, transaction, nextContext) {
|
4855 | var prevElement = this._currentElement;
|
4856 | var prevContext = this._context;
|
4857 |
|
4858 | this._pendingElement = null;
|
4859 |
|
4860 | this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
|
4861 | },
|
4862 |
|
4863 | |
4864 |
|
4865 |
|
4866 |
|
4867 |
|
4868 |
|
4869 |
|
4870 | performUpdateIfNecessary: function (transaction) {
|
4871 | if (this._pendingElement != null) {
|
4872 | ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
|
4873 | } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
|
4874 | this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
|
4875 | } else {
|
4876 | this._updateBatchNumber = null;
|
4877 | }
|
4878 | },
|
4879 |
|
4880 | |
4881 |
|
4882 |
|
4883 |
|
4884 |
|
4885 |
|
4886 |
|
4887 |
|
4888 |
|
4889 |
|
4890 |
|
4891 |
|
4892 |
|
4893 |
|
4894 |
|
4895 | updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
|
4896 | var inst = this._instance;
|
4897 | !(inst != null) ? "development" !== '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;
|
4898 |
|
4899 | var willReceive = false;
|
4900 | var nextContext;
|
4901 |
|
4902 |
|
4903 | if (this._context === nextUnmaskedContext) {
|
4904 | nextContext = inst.context;
|
4905 | } else {
|
4906 | nextContext = this._processContext(nextUnmaskedContext);
|
4907 | willReceive = true;
|
4908 | }
|
4909 |
|
4910 | var prevProps = prevParentElement.props;
|
4911 | var nextProps = nextParentElement.props;
|
4912 |
|
4913 |
|
4914 | if (prevParentElement !== nextParentElement) {
|
4915 | willReceive = true;
|
4916 | }
|
4917 |
|
4918 |
|
4919 |
|
4920 |
|
4921 | if (willReceive && inst.componentWillReceiveProps) {
|
4922 | if ("development" !== 'production') {
|
4923 | measureLifeCyclePerf(function () {
|
4924 | return inst.componentWillReceiveProps(nextProps, nextContext);
|
4925 | }, this._debugID, 'componentWillReceiveProps');
|
4926 | } else {
|
4927 | inst.componentWillReceiveProps(nextProps, nextContext);
|
4928 | }
|
4929 | }
|
4930 |
|
4931 | var nextState = this._processPendingState(nextProps, nextContext);
|
4932 | var shouldUpdate = true;
|
4933 |
|
4934 | if (!this._pendingForceUpdate) {
|
4935 | if (inst.shouldComponentUpdate) {
|
4936 | if ("development" !== 'production') {
|
4937 | shouldUpdate = measureLifeCyclePerf(function () {
|
4938 | return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
4939 | }, this._debugID, 'shouldComponentUpdate');
|
4940 | } else {
|
4941 | shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
|
4942 | }
|
4943 | } else {
|
4944 | if (this._compositeType === CompositeTypes.PureClass) {
|
4945 | shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
|
4946 | }
|
4947 | }
|
4948 | }
|
4949 |
|
4950 | if ("development" !== 'production') {
|
4951 | "development" !== '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;
|
4952 | }
|
4953 |
|
4954 | this._updateBatchNumber = null;
|
4955 | if (shouldUpdate) {
|
4956 | this._pendingForceUpdate = false;
|
4957 |
|
4958 | this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
|
4959 | } else {
|
4960 |
|
4961 |
|
4962 | this._currentElement = nextParentElement;
|
4963 | this._context = nextUnmaskedContext;
|
4964 | inst.props = nextProps;
|
4965 | inst.state = nextState;
|
4966 | inst.context = nextContext;
|
4967 | }
|
4968 | },
|
4969 |
|
4970 | _processPendingState: function (props, context) {
|
4971 | var inst = this._instance;
|
4972 | var queue = this._pendingStateQueue;
|
4973 | var replace = this._pendingReplaceState;
|
4974 | this._pendingReplaceState = false;
|
4975 | this._pendingStateQueue = null;
|
4976 |
|
4977 | if (!queue) {
|
4978 | return inst.state;
|
4979 | }
|
4980 |
|
4981 | if (replace && queue.length === 1) {
|
4982 | return queue[0];
|
4983 | }
|
4984 |
|
4985 | var nextState = _assign({}, replace ? queue[0] : inst.state);
|
4986 | for (var i = replace ? 1 : 0; i < queue.length; i++) {
|
4987 | var partial = queue[i];
|
4988 | _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
|
4989 | }
|
4990 |
|
4991 | return nextState;
|
4992 | },
|
4993 |
|
4994 | |
4995 |
|
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 |
|
5001 |
|
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 | _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
|
5007 | var _this2 = this;
|
5008 |
|
5009 | var inst = this._instance;
|
5010 |
|
5011 | var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
|
5012 | var prevProps;
|
5013 | var prevState;
|
5014 | var prevContext;
|
5015 | if (hasComponentDidUpdate) {
|
5016 | prevProps = inst.props;
|
5017 | prevState = inst.state;
|
5018 | prevContext = inst.context;
|
5019 | }
|
5020 |
|
5021 | if (inst.componentWillUpdate) {
|
5022 | if ("development" !== 'production') {
|
5023 | measureLifeCyclePerf(function () {
|
5024 | return inst.componentWillUpdate(nextProps, nextState, nextContext);
|
5025 | }, this._debugID, 'componentWillUpdate');
|
5026 | } else {
|
5027 | inst.componentWillUpdate(nextProps, nextState, nextContext);
|
5028 | }
|
5029 | }
|
5030 |
|
5031 | this._currentElement = nextElement;
|
5032 | this._context = unmaskedContext;
|
5033 | inst.props = nextProps;
|
5034 | inst.state = nextState;
|
5035 | inst.context = nextContext;
|
5036 |
|
5037 | this._updateRenderedComponent(transaction, unmaskedContext);
|
5038 |
|
5039 | if (hasComponentDidUpdate) {
|
5040 | if ("development" !== 'production') {
|
5041 | transaction.getReactMountReady().enqueue(function () {
|
5042 | measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
|
5043 | });
|
5044 | } else {
|
5045 | transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
|
5046 | }
|
5047 | }
|
5048 | },
|
5049 |
|
5050 | |
5051 |
|
5052 |
|
5053 |
|
5054 |
|
5055 |
|
5056 | _updateRenderedComponent: function (transaction, context) {
|
5057 | var prevComponentInstance = this._renderedComponent;
|
5058 | var prevRenderedElement = prevComponentInstance._currentElement;
|
5059 | var nextRenderedElement = this._renderValidatedComponent();
|
5060 |
|
5061 | var debugID = 0;
|
5062 | if ("development" !== 'production') {
|
5063 | debugID = this._debugID;
|
5064 | }
|
5065 |
|
5066 | if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
|
5067 | ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
|
5068 | } else {
|
5069 | var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
|
5070 | ReactReconciler.unmountComponent(prevComponentInstance, false);
|
5071 |
|
5072 | var nodeType = ReactNodeTypes.getType(nextRenderedElement);
|
5073 | this._renderedNodeType = nodeType;
|
5074 | var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY
|
5075 | );
|
5076 | this._renderedComponent = child;
|
5077 |
|
5078 | var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
|
5079 |
|
5080 | if ("development" !== 'production') {
|
5081 | if (debugID !== 0) {
|
5082 | var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
|
5083 | ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
|
5084 | }
|
5085 | }
|
5086 |
|
5087 | this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
|
5088 | }
|
5089 | },
|
5090 |
|
5091 | |
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 | _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
|
5097 | ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
|
5098 | },
|
5099 |
|
5100 | |
5101 |
|
5102 |
|
5103 | _renderValidatedComponentWithoutOwnerOrContext: function () {
|
5104 | var inst = this._instance;
|
5105 | var renderedElement;
|
5106 |
|
5107 | if ("development" !== 'production') {
|
5108 | renderedElement = measureLifeCyclePerf(function () {
|
5109 | return inst.render();
|
5110 | }, this._debugID, 'render');
|
5111 | } else {
|
5112 | renderedElement = inst.render();
|
5113 | }
|
5114 |
|
5115 | if ("development" !== 'production') {
|
5116 |
|
5117 | if (renderedElement === undefined && inst.render._isMockFunction) {
|
5118 |
|
5119 |
|
5120 | renderedElement = null;
|
5121 | }
|
5122 | }
|
5123 |
|
5124 | return renderedElement;
|
5125 | },
|
5126 |
|
5127 | |
5128 |
|
5129 |
|
5130 | _renderValidatedComponent: function () {
|
5131 | var renderedElement;
|
5132 | if ("development" !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
|
5133 | ReactCurrentOwner.current = this;
|
5134 | try {
|
5135 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
5136 | } finally {
|
5137 | ReactCurrentOwner.current = null;
|
5138 | }
|
5139 | } else {
|
5140 | renderedElement = this._renderValidatedComponentWithoutOwnerOrContext();
|
5141 | }
|
5142 | !(
|
5143 |
|
5144 | renderedElement === null || renderedElement === false || React.isValidElement(renderedElement)) ? "development" !== '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;
|
5145 |
|
5146 | return renderedElement;
|
5147 | },
|
5148 |
|
5149 | |
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 |
|
5157 | attachRef: function (ref, component) {
|
5158 | var inst = this.getPublicInstance();
|
5159 | !(inst != null) ? "development" !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
|
5160 | var publicComponentInstance = component.getPublicInstance();
|
5161 | if ("development" !== 'production') {
|
5162 | var componentName = component && component.getName ? component.getName() : 'a component';
|
5163 | "development" !== '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;
|
5164 | }
|
5165 | var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
|
5166 | refs[ref] = publicComponentInstance;
|
5167 | },
|
5168 |
|
5169 | |
5170 |
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 | detachRef: function (ref) {
|
5177 | var refs = this.getPublicInstance().refs;
|
5178 | delete refs[ref];
|
5179 | },
|
5180 |
|
5181 | |
5182 |
|
5183 |
|
5184 |
|
5185 |
|
5186 |
|
5187 | getName: function () {
|
5188 | var type = this._currentElement.type;
|
5189 | var constructor = this._instance && this._instance.constructor;
|
5190 | return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
|
5191 | },
|
5192 |
|
5193 | /**
|
5194 | * Get the publicly accessible representation of this component - i.e. what
|
5195 | * is exposed by refs and returned by render. Can be null for stateless
|
5196 | * components.
|
5197 | *
|
5198 | * @return {ReactComponent} the public component instance.
|
5199 | * @internal
|
5200 | */
|
5201 | getPublicInstance: function () {
|
5202 | var inst = this._instance;
|
5203 | if (this._compositeType === CompositeTypes.StatelessFunctional) {
|
5204 | return null;
|
5205 | }
|
5206 | return inst;
|
5207 | },
|
5208 |
|
5209 |
|
5210 | _instantiateReactComponent: null
|
5211 | };
|
5212 |
|
5213 | module.exports = ReactCompositeComponent;
|
5214 | },{"116":116,"119":119,"123":123,"124":124,"134":134,"141":141,"147":147,"148":148,"149":149,"28":28,"50":50,"58":58,"59":59,"63":63,"68":68,"97":97}],30:[function(_dereq_,module,exports){
|
5215 |
|
5216 |
|
5217 |
|
5218 |
|
5219 |
|
5220 |
|
5221 |
|
5222 |
|
5223 |
|
5224 |
|
5225 | 'use strict';
|
5226 |
|
5227 | var _prodInvariant = _dereq_(116),
|
5228 | _assign = _dereq_(149);
|
5229 |
|
5230 | var AutoFocusUtils = _dereq_(2);
|
5231 | var CSSPropertyOperations = _dereq_(5);
|
5232 | var DOMLazyTree = _dereq_(9);
|
5233 | var DOMNamespaces = _dereq_(10);
|
5234 | var DOMProperty = _dereq_(11);
|
5235 | var DOMPropertyOperations = _dereq_(12);
|
5236 | var EventPluginHub = _dereq_(16);
|
5237 | var EventPluginRegistry = _dereq_(17);
|
5238 | var ReactBrowserEventEmitter = _dereq_(25);
|
5239 | var ReactDOMComponentFlags = _dereq_(31);
|
5240 | var ReactDOMComponentTree = _dereq_(32);
|
5241 | var ReactDOMInput = _dereq_(36);
|
5242 | var ReactDOMOption = _dereq_(37);
|
5243 | var ReactDOMSelect = _dereq_(38);
|
5244 | var ReactDOMTextarea = _dereq_(43);
|
5245 | var ReactInstrumentation = _dereq_(59);
|
5246 | var ReactMultiChild = _dereq_(62);
|
5247 | var ReactServerRenderingTransaction = _dereq_(72);
|
5248 |
|
5249 | var emptyFunction = _dereq_(133);
|
5250 | var escapeTextContentForBrowser = _dereq_(100);
|
5251 | var invariant = _dereq_(141);
|
5252 | var isEventSupported = _dereq_(113);
|
5253 | var shallowEqual = _dereq_(147);
|
5254 | var inputValueTracking = _dereq_(111);
|
5255 | var validateDOMNesting = _dereq_(121);
|
5256 | var warning = _dereq_(148);
|
5257 |
|
5258 | var Flags = ReactDOMComponentFlags;
|
5259 | var deleteListener = EventPluginHub.deleteListener;
|
5260 | var getNode = ReactDOMComponentTree.getNodeFromInstance;
|
5261 | var listenTo = ReactBrowserEventEmitter.listenTo;
|
5262 | var registrationNameModules = EventPluginRegistry.registrationNameModules;
|
5263 |
|
5264 |
|
5265 | var CONTENT_TYPES = { string: true, number: true };
|
5266 |
|
5267 | var STYLE = 'style';
|
5268 | var HTML = '__html';
|
5269 | var RESERVED_PROPS = {
|
5270 | children: null,
|
5271 | dangerouslySetInnerHTML: null,
|
5272 | suppressContentEditableWarning: null
|
5273 | };
|
5274 |
|
5275 |
|
5276 | var DOC_FRAGMENT_TYPE = 11;
|
5277 |
|
5278 | function getDeclarationErrorAddendum(internalInstance) {
|
5279 | if (internalInstance) {
|
5280 | var owner = internalInstance._currentElement._owner || null;
|
5281 | if (owner) {
|
5282 | var name = owner.getName();
|
5283 | if (name) {
|
5284 | return ' This DOM node was rendered by `' + name + '`.';
|
5285 | }
|
5286 | }
|
5287 | }
|
5288 | return '';
|
5289 | }
|
5290 |
|
5291 | function friendlyStringify(obj) {
|
5292 | if (typeof obj === 'object') {
|
5293 | if (Array.isArray(obj)) {
|
5294 | return '[' + obj.map(friendlyStringify).join(', ') + ']';
|
5295 | } else {
|
5296 | var pairs = [];
|
5297 | for (var key in obj) {
|
5298 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
5299 | var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
|
5300 | pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
|
5301 | }
|
5302 | }
|
5303 | return '{' + pairs.join(', ') + '}';
|
5304 | }
|
5305 | } else if (typeof obj === 'string') {
|
5306 | return JSON.stringify(obj);
|
5307 | } else if (typeof obj === 'function') {
|
5308 | return '[function object]';
|
5309 | }
|
5310 |
|
5311 |
|
5312 | return String(obj);
|
5313 | }
|
5314 |
|
5315 | var styleMutationWarning = {};
|
5316 |
|
5317 | function checkAndWarnForMutatedStyle(style1, style2, component) {
|
5318 | if (style1 == null || style2 == null) {
|
5319 | return;
|
5320 | }
|
5321 | if (shallowEqual(style1, style2)) {
|
5322 | return;
|
5323 | }
|
5324 |
|
5325 | var componentName = component._tag;
|
5326 | var owner = component._currentElement._owner;
|
5327 | var ownerName;
|
5328 | if (owner) {
|
5329 | ownerName = owner.getName();
|
5330 | }
|
5331 |
|
5332 | var hash = ownerName + '|' + componentName;
|
5333 |
|
5334 | if (styleMutationWarning.hasOwnProperty(hash)) {
|
5335 | return;
|
5336 | }
|
5337 |
|
5338 | styleMutationWarning[hash] = true;
|
5339 |
|
5340 | "development" !== '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;
|
5341 | }
|
5342 |
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 | function assertValidProps(component, props) {
|
5348 | if (!props) {
|
5349 | return;
|
5350 | }
|
5351 |
|
5352 | if (voidElementTags[component._tag]) {
|
5353 | !(props.children == null && props.dangerouslySetInnerHTML == null) ? "development" !== '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;
|
5354 | }
|
5355 | if (props.dangerouslySetInnerHTML != null) {
|
5356 | !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
|
5357 | !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? "development" !== '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;
|
5358 | }
|
5359 | if ("development" !== 'production') {
|
5360 | "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
|
5361 | "development" !== '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;
|
5362 | "development" !== '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;
|
5363 | }
|
5364 | !(props.style == null || typeof props.style === 'object') ? "development" !== '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;
|
5365 | }
|
5366 |
|
5367 | function enqueuePutListener(inst, registrationName, listener, transaction) {
|
5368 | if (transaction instanceof ReactServerRenderingTransaction) {
|
5369 | return;
|
5370 | }
|
5371 | if ("development" !== 'production') {
|
5372 |
|
5373 |
|
5374 | "development" !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
|
5375 | }
|
5376 | var containerInfo = inst._hostContainerInfo;
|
5377 | var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
|
5378 | var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
|
5379 | listenTo(registrationName, doc);
|
5380 | transaction.getReactMountReady().enqueue(putListener, {
|
5381 | inst: inst,
|
5382 | registrationName: registrationName,
|
5383 | listener: listener
|
5384 | });
|
5385 | }
|
5386 |
|
5387 | function putListener() {
|
5388 | var listenerToPut = this;
|
5389 | EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
|
5390 | }
|
5391 |
|
5392 | function inputPostMount() {
|
5393 | var inst = this;
|
5394 | ReactDOMInput.postMountWrapper(inst);
|
5395 | }
|
5396 |
|
5397 | function textareaPostMount() {
|
5398 | var inst = this;
|
5399 | ReactDOMTextarea.postMountWrapper(inst);
|
5400 | }
|
5401 |
|
5402 | function optionPostMount() {
|
5403 | var inst = this;
|
5404 | ReactDOMOption.postMountWrapper(inst);
|
5405 | }
|
5406 |
|
5407 | var setAndValidateContentChildDev = emptyFunction;
|
5408 | if ("development" !== 'production') {
|
5409 | setAndValidateContentChildDev = function (content) {
|
5410 | var hasExistingContent = this._contentDebugID != null;
|
5411 | var debugID = this._debugID;
|
5412 |
|
5413 | var contentDebugID = -debugID;
|
5414 |
|
5415 | if (content == null) {
|
5416 | if (hasExistingContent) {
|
5417 | ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
|
5418 | }
|
5419 | this._contentDebugID = null;
|
5420 | return;
|
5421 | }
|
5422 |
|
5423 | validateDOMNesting(null, String(content), this, this._ancestorInfo);
|
5424 | this._contentDebugID = contentDebugID;
|
5425 | if (hasExistingContent) {
|
5426 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
|
5427 | ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
|
5428 | } else {
|
5429 | ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
|
5430 | ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
|
5431 | ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
|
5432 | }
|
5433 | };
|
5434 | }
|
5435 |
|
5436 |
|
5437 |
|
5438 | var mediaEvents = {
|
5439 | topAbort: 'abort',
|
5440 | topCanPlay: 'canplay',
|
5441 | topCanPlayThrough: 'canplaythrough',
|
5442 | topDurationChange: 'durationchange',
|
5443 | topEmptied: 'emptied',
|
5444 | topEncrypted: 'encrypted',
|
5445 | topEnded: 'ended',
|
5446 | topError: 'error',
|
5447 | topLoadedData: 'loadeddata',
|
5448 | topLoadedMetadata: 'loadedmetadata',
|
5449 | topLoadStart: 'loadstart',
|
5450 | topPause: 'pause',
|
5451 | topPlay: 'play',
|
5452 | topPlaying: 'playing',
|
5453 | topProgress: 'progress',
|
5454 | topRateChange: 'ratechange',
|
5455 | topSeeked: 'seeked',
|
5456 | topSeeking: 'seeking',
|
5457 | topStalled: 'stalled',
|
5458 | topSuspend: 'suspend',
|
5459 | topTimeUpdate: 'timeupdate',
|
5460 | topVolumeChange: 'volumechange',
|
5461 | topWaiting: 'waiting'
|
5462 | };
|
5463 |
|
5464 | function trackInputValue() {
|
5465 | inputValueTracking.track(this);
|
5466 | }
|
5467 |
|
5468 | function trapBubbledEventsLocal() {
|
5469 | var inst = this;
|
5470 |
|
5471 |
|
5472 | !inst._rootNodeID ? "development" !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
|
5473 | var node = getNode(inst);
|
5474 | !node ? "development" !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
|
5475 |
|
5476 | switch (inst._tag) {
|
5477 | case 'iframe':
|
5478 | case 'object':
|
5479 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
5480 | break;
|
5481 | case 'video':
|
5482 | case 'audio':
|
5483 | inst._wrapperState.listeners = [];
|
5484 |
|
5485 | for (var event in mediaEvents) {
|
5486 | if (mediaEvents.hasOwnProperty(event)) {
|
5487 | inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node));
|
5488 | }
|
5489 | }
|
5490 | break;
|
5491 | case 'source':
|
5492 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)];
|
5493 | break;
|
5494 | case 'img':
|
5495 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)];
|
5496 | break;
|
5497 | case 'form':
|
5498 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)];
|
5499 | break;
|
5500 | case 'input':
|
5501 | case 'select':
|
5502 | case 'textarea':
|
5503 | inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)];
|
5504 | break;
|
5505 | }
|
5506 | }
|
5507 |
|
5508 | function postUpdateSelectWrapper() {
|
5509 | ReactDOMSelect.postUpdateWrapper(this);
|
5510 | }
|
5511 |
|
5512 |
|
5513 |
|
5514 |
|
5515 | var omittedCloseTags = {
|
5516 | area: true,
|
5517 | base: true,
|
5518 | br: true,
|
5519 | col: true,
|
5520 | embed: true,
|
5521 | hr: true,
|
5522 | img: true,
|
5523 | input: true,
|
5524 | keygen: true,
|
5525 | link: true,
|
5526 | meta: true,
|
5527 | param: true,
|
5528 | source: true,
|
5529 | track: true,
|
5530 | wbr: true
|
5531 |
|
5532 | };
|
5533 |
|
5534 | var newlineEatingTags = {
|
5535 | listing: true,
|
5536 | pre: true,
|
5537 | textarea: true
|
5538 | };
|
5539 |
|
5540 |
|
5541 |
|
5542 |
|
5543 | var voidElementTags = _assign({
|
5544 | menuitem: true
|
5545 | }, omittedCloseTags);
|
5546 |
|
5547 |
|
5548 |
|
5549 |
|
5550 |
|
5551 | var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
5552 | var validatedTagCache = {};
|
5553 | var hasOwnProperty = {}.hasOwnProperty;
|
5554 |
|
5555 | function validateDangerousTag(tag) {
|
5556 | if (!hasOwnProperty.call(validatedTagCache, tag)) {
|
5557 | !VALID_TAG_REGEX.test(tag) ? "development" !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
|
5558 | validatedTagCache[tag] = true;
|
5559 | }
|
5560 | }
|
5561 |
|
5562 | function isCustomComponent(tagName, props) {
|
5563 | return tagName.indexOf('-') >= 0 || props.is != null;
|
5564 | }
|
5565 |
|
5566 | var globalIdCounter = 1;
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 |
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 | function ReactDOMComponent(element) {
|
5583 | var tag = element.type;
|
5584 | validateDangerousTag(tag);
|
5585 | this._currentElement = element;
|
5586 | this._tag = tag.toLowerCase();
|
5587 | this._namespaceURI = null;
|
5588 | this._renderedChildren = null;
|
5589 | this._previousStyle = null;
|
5590 | this._previousStyleCopy = null;
|
5591 | this._hostNode = null;
|
5592 | this._hostParent = null;
|
5593 | this._rootNodeID = 0;
|
5594 | this._domID = 0;
|
5595 | this._hostContainerInfo = null;
|
5596 | this._wrapperState = null;
|
5597 | this._topLevelWrapper = null;
|
5598 | this._flags = 0;
|
5599 | if ("development" !== 'production') {
|
5600 | this._ancestorInfo = null;
|
5601 | setAndValidateContentChildDev.call(this, null);
|
5602 | }
|
5603 | }
|
5604 |
|
5605 | ReactDOMComponent.displayName = 'ReactDOMComponent';
|
5606 |
|
5607 | ReactDOMComponent.Mixin = {
|
5608 | |
5609 |
|
5610 |
|
5611 |
|
5612 |
|
5613 |
|
5614 |
|
5615 |
|
5616 |
|
5617 |
|
5618 |
|
5619 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
5620 | this._rootNodeID = globalIdCounter++;
|
5621 | this._domID = hostContainerInfo._idCounter++;
|
5622 | this._hostParent = hostParent;
|
5623 | this._hostContainerInfo = hostContainerInfo;
|
5624 |
|
5625 | var props = this._currentElement.props;
|
5626 |
|
5627 | switch (this._tag) {
|
5628 | case 'audio':
|
5629 | case 'form':
|
5630 | case 'iframe':
|
5631 | case 'img':
|
5632 | case 'link':
|
5633 | case 'object':
|
5634 | case 'source':
|
5635 | case 'video':
|
5636 | this._wrapperState = {
|
5637 | listeners: null
|
5638 | };
|
5639 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
5640 | break;
|
5641 | case 'input':
|
5642 | ReactDOMInput.mountWrapper(this, props, hostParent);
|
5643 | props = ReactDOMInput.getHostProps(this, props);
|
5644 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
5645 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
5646 | break;
|
5647 | case 'option':
|
5648 | ReactDOMOption.mountWrapper(this, props, hostParent);
|
5649 | props = ReactDOMOption.getHostProps(this, props);
|
5650 | break;
|
5651 | case 'select':
|
5652 | ReactDOMSelect.mountWrapper(this, props, hostParent);
|
5653 | props = ReactDOMSelect.getHostProps(this, props);
|
5654 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
5655 | break;
|
5656 | case 'textarea':
|
5657 | ReactDOMTextarea.mountWrapper(this, props, hostParent);
|
5658 | props = ReactDOMTextarea.getHostProps(this, props);
|
5659 | transaction.getReactMountReady().enqueue(trackInputValue, this);
|
5660 | transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
|
5661 | break;
|
5662 | }
|
5663 |
|
5664 | assertValidProps(this, props);
|
5665 |
|
5666 |
|
5667 |
|
5668 | var namespaceURI;
|
5669 | var parentTag;
|
5670 | if (hostParent != null) {
|
5671 | namespaceURI = hostParent._namespaceURI;
|
5672 | parentTag = hostParent._tag;
|
5673 | } else if (hostContainerInfo._tag) {
|
5674 | namespaceURI = hostContainerInfo._namespaceURI;
|
5675 | parentTag = hostContainerInfo._tag;
|
5676 | }
|
5677 | if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
|
5678 | namespaceURI = DOMNamespaces.html;
|
5679 | }
|
5680 | if (namespaceURI === DOMNamespaces.html) {
|
5681 | if (this._tag === 'svg') {
|
5682 | namespaceURI = DOMNamespaces.svg;
|
5683 | } else if (this._tag === 'math') {
|
5684 | namespaceURI = DOMNamespaces.mathml;
|
5685 | }
|
5686 | }
|
5687 | this._namespaceURI = namespaceURI;
|
5688 |
|
5689 | if ("development" !== 'production') {
|
5690 | var parentInfo;
|
5691 | if (hostParent != null) {
|
5692 | parentInfo = hostParent._ancestorInfo;
|
5693 | } else if (hostContainerInfo._tag) {
|
5694 | parentInfo = hostContainerInfo._ancestorInfo;
|
5695 | }
|
5696 | if (parentInfo) {
|
5697 |
|
5698 |
|
5699 | validateDOMNesting(this._tag, null, this, parentInfo);
|
5700 | }
|
5701 | this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
|
5702 | }
|
5703 |
|
5704 | var mountImage;
|
5705 | if (transaction.useCreateElement) {
|
5706 | var ownerDocument = hostContainerInfo._ownerDocument;
|
5707 | var el;
|
5708 | if (namespaceURI === DOMNamespaces.html) {
|
5709 | if (this._tag === 'script') {
|
5710 |
|
5711 |
|
5712 | var div = ownerDocument.createElement('div');
|
5713 | var type = this._currentElement.type;
|
5714 | div.innerHTML = '<' + type + '></' + type + '>';
|
5715 | el = div.removeChild(div.firstChild);
|
5716 | } else if (props.is) {
|
5717 | el = ownerDocument.createElement(this._currentElement.type, props.is);
|
5718 | } else {
|
5719 |
|
5720 |
|
5721 |
|
5722 | el = ownerDocument.createElement(this._currentElement.type);
|
5723 | }
|
5724 | } else {
|
5725 | el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
|
5726 | }
|
5727 | ReactDOMComponentTree.precacheNode(this, el);
|
5728 | this._flags |= Flags.hasCachedChildNodes;
|
5729 | if (!this._hostParent) {
|
5730 | DOMPropertyOperations.setAttributeForRoot(el);
|
5731 | }
|
5732 | this._updateDOMProperties(null, props, transaction);
|
5733 | var lazyTree = DOMLazyTree(el);
|
5734 | this._createInitialChildren(transaction, props, context, lazyTree);
|
5735 | mountImage = lazyTree;
|
5736 | } else {
|
5737 | var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
|
5738 | var tagContent = this._createContentMarkup(transaction, props, context);
|
5739 | if (!tagContent && omittedCloseTags[this._tag]) {
|
5740 | mountImage = tagOpen + '/>';
|
5741 | } else {
|
5742 | mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
|
5743 | }
|
5744 | }
|
5745 |
|
5746 | switch (this._tag) {
|
5747 | case 'input':
|
5748 | transaction.getReactMountReady().enqueue(inputPostMount, this);
|
5749 | if (props.autoFocus) {
|
5750 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
5751 | }
|
5752 | break;
|
5753 | case 'textarea':
|
5754 | transaction.getReactMountReady().enqueue(textareaPostMount, this);
|
5755 | if (props.autoFocus) {
|
5756 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
5757 | }
|
5758 | break;
|
5759 | case 'select':
|
5760 | if (props.autoFocus) {
|
5761 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
5762 | }
|
5763 | break;
|
5764 | case 'button':
|
5765 | if (props.autoFocus) {
|
5766 | transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
|
5767 | }
|
5768 | break;
|
5769 | case 'option':
|
5770 | transaction.getReactMountReady().enqueue(optionPostMount, this);
|
5771 | break;
|
5772 | }
|
5773 |
|
5774 | return mountImage;
|
5775 | },
|
5776 |
|
5777 | |
5778 |
|
5779 |
|
5780 |
|
5781 |
|
5782 |
|
5783 |
|
5784 |
|
5785 |
|
5786 |
|
5787 |
|
5788 |
|
5789 |
|
5790 | _createOpenTagMarkupAndPutListeners: function (transaction, props) {
|
5791 | var ret = '<' + this._currentElement.type;
|
5792 |
|
5793 | for (var propKey in props) {
|
5794 | if (!props.hasOwnProperty(propKey)) {
|
5795 | continue;
|
5796 | }
|
5797 | var propValue = props[propKey];
|
5798 | if (propValue == null) {
|
5799 | continue;
|
5800 | }
|
5801 | if (registrationNameModules.hasOwnProperty(propKey)) {
|
5802 | if (propValue) {
|
5803 | enqueuePutListener(this, propKey, propValue, transaction);
|
5804 | }
|
5805 | } else {
|
5806 | if (propKey === STYLE) {
|
5807 | if (propValue) {
|
5808 | if ("development" !== 'production') {
|
5809 |
|
5810 | this._previousStyle = propValue;
|
5811 | }
|
5812 | propValue = this._previousStyleCopy = _assign({}, props.style);
|
5813 | }
|
5814 | propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
|
5815 | }
|
5816 | var markup = null;
|
5817 | if (this._tag != null && isCustomComponent(this._tag, props)) {
|
5818 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
5819 | markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
|
5820 | }
|
5821 | } else {
|
5822 | markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
|
5823 | }
|
5824 | if (markup) {
|
5825 | ret += ' ' + markup;
|
5826 | }
|
5827 | }
|
5828 | }
|
5829 |
|
5830 |
|
5831 |
|
5832 | if (transaction.renderToStaticMarkup) {
|
5833 | return ret;
|
5834 | }
|
5835 |
|
5836 | if (!this._hostParent) {
|
5837 | ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
|
5838 | }
|
5839 | ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
|
5840 | return ret;
|
5841 | },
|
5842 |
|
5843 | |
5844 |
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 | _createContentMarkup: function (transaction, props, context) {
|
5853 | var ret = '';
|
5854 |
|
5855 |
|
5856 | var innerHTML = props.dangerouslySetInnerHTML;
|
5857 | if (innerHTML != null) {
|
5858 | if (innerHTML.__html != null) {
|
5859 | ret = innerHTML.__html;
|
5860 | }
|
5861 | } else {
|
5862 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
5863 | var childrenToUse = contentToUse != null ? null : props.children;
|
5864 | if (contentToUse != null) {
|
5865 |
|
5866 | ret = escapeTextContentForBrowser(contentToUse);
|
5867 | if ("development" !== 'production') {
|
5868 | setAndValidateContentChildDev.call(this, contentToUse);
|
5869 | }
|
5870 | } else if (childrenToUse != null) {
|
5871 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
5872 | ret = mountImages.join('');
|
5873 | }
|
5874 | }
|
5875 | if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
|
5876 |
|
5877 |
|
5878 |
|
5879 |
|
5880 |
|
5881 |
|
5882 |
|
5883 |
|
5884 |
|
5885 |
|
5886 | return '\n' + ret;
|
5887 | } else {
|
5888 | return ret;
|
5889 | }
|
5890 | },
|
5891 |
|
5892 | _createInitialChildren: function (transaction, props, context, lazyTree) {
|
5893 |
|
5894 | var innerHTML = props.dangerouslySetInnerHTML;
|
5895 | if (innerHTML != null) {
|
5896 | if (innerHTML.__html != null) {
|
5897 | DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
|
5898 | }
|
5899 | } else {
|
5900 | var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
|
5901 | var childrenToUse = contentToUse != null ? null : props.children;
|
5902 |
|
5903 | if (contentToUse != null) {
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 | if (contentToUse !== '') {
|
5909 | if ("development" !== 'production') {
|
5910 | setAndValidateContentChildDev.call(this, contentToUse);
|
5911 | }
|
5912 | DOMLazyTree.queueText(lazyTree, contentToUse);
|
5913 | }
|
5914 | } else if (childrenToUse != null) {
|
5915 | var mountImages = this.mountChildren(childrenToUse, transaction, context);
|
5916 | for (var i = 0; i < mountImages.length; i++) {
|
5917 | DOMLazyTree.queueChild(lazyTree, mountImages[i]);
|
5918 | }
|
5919 | }
|
5920 | }
|
5921 | },
|
5922 |
|
5923 | |
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 | receiveComponent: function (nextElement, transaction, context) {
|
5932 | var prevElement = this._currentElement;
|
5933 | this._currentElement = nextElement;
|
5934 | this.updateComponent(transaction, prevElement, nextElement, context);
|
5935 | },
|
5936 |
|
5937 | |
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 | updateComponent: function (transaction, prevElement, nextElement, context) {
|
5948 | var lastProps = prevElement.props;
|
5949 | var nextProps = this._currentElement.props;
|
5950 |
|
5951 | switch (this._tag) {
|
5952 | case 'input':
|
5953 | lastProps = ReactDOMInput.getHostProps(this, lastProps);
|
5954 | nextProps = ReactDOMInput.getHostProps(this, nextProps);
|
5955 | break;
|
5956 | case 'option':
|
5957 | lastProps = ReactDOMOption.getHostProps(this, lastProps);
|
5958 | nextProps = ReactDOMOption.getHostProps(this, nextProps);
|
5959 | break;
|
5960 | case 'select':
|
5961 | lastProps = ReactDOMSelect.getHostProps(this, lastProps);
|
5962 | nextProps = ReactDOMSelect.getHostProps(this, nextProps);
|
5963 | break;
|
5964 | case 'textarea':
|
5965 | lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
|
5966 | nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
|
5967 | break;
|
5968 | }
|
5969 |
|
5970 | assertValidProps(this, nextProps);
|
5971 | this._updateDOMProperties(lastProps, nextProps, transaction);
|
5972 | this._updateDOMChildren(lastProps, nextProps, transaction, context);
|
5973 |
|
5974 | switch (this._tag) {
|
5975 | case 'input':
|
5976 |
|
5977 |
|
5978 |
|
5979 | ReactDOMInput.updateWrapper(this);
|
5980 |
|
5981 |
|
5982 |
|
5983 | inputValueTracking.updateValueIfChanged(this);
|
5984 | break;
|
5985 | case 'textarea':
|
5986 | ReactDOMTextarea.updateWrapper(this);
|
5987 | break;
|
5988 | case 'select':
|
5989 |
|
5990 |
|
5991 | transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
|
5992 | break;
|
5993 | }
|
5994 | },
|
5995 |
|
5996 | |
5997 |
|
5998 |
|
5999 |
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 |
|
6005 |
|
6006 |
|
6007 |
|
6008 |
|
6009 |
|
6010 |
|
6011 |
|
6012 | _updateDOMProperties: function (lastProps, nextProps, transaction) {
|
6013 | var propKey;
|
6014 | var styleName;
|
6015 | var styleUpdates;
|
6016 | for (propKey in lastProps) {
|
6017 | if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
|
6018 | continue;
|
6019 | }
|
6020 | if (propKey === STYLE) {
|
6021 | var lastStyle = this._previousStyleCopy;
|
6022 | for (styleName in lastStyle) {
|
6023 | if (lastStyle.hasOwnProperty(styleName)) {
|
6024 | styleUpdates = styleUpdates || {};
|
6025 | styleUpdates[styleName] = '';
|
6026 | }
|
6027 | }
|
6028 | this._previousStyleCopy = null;
|
6029 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
6030 | if (lastProps[propKey]) {
|
6031 |
|
6032 |
|
6033 |
|
6034 | deleteListener(this, propKey);
|
6035 | }
|
6036 | } else if (isCustomComponent(this._tag, lastProps)) {
|
6037 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
6038 | DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
|
6039 | }
|
6040 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
6041 | DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
|
6042 | }
|
6043 | }
|
6044 | for (propKey in nextProps) {
|
6045 | var nextProp = nextProps[propKey];
|
6046 | var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
|
6047 | if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
|
6048 | continue;
|
6049 | }
|
6050 | if (propKey === STYLE) {
|
6051 | if (nextProp) {
|
6052 | if ("development" !== 'production') {
|
6053 | checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
|
6054 | this._previousStyle = nextProp;
|
6055 | }
|
6056 | nextProp = this._previousStyleCopy = _assign({}, nextProp);
|
6057 | } else {
|
6058 | this._previousStyleCopy = null;
|
6059 | }
|
6060 | if (lastProp) {
|
6061 |
|
6062 | for (styleName in lastProp) {
|
6063 | if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
|
6064 | styleUpdates = styleUpdates || {};
|
6065 | styleUpdates[styleName] = '';
|
6066 | }
|
6067 | }
|
6068 |
|
6069 | for (styleName in nextProp) {
|
6070 | if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
|
6071 | styleUpdates = styleUpdates || {};
|
6072 | styleUpdates[styleName] = nextProp[styleName];
|
6073 | }
|
6074 | }
|
6075 | } else {
|
6076 |
|
6077 | styleUpdates = nextProp;
|
6078 | }
|
6079 | } else if (registrationNameModules.hasOwnProperty(propKey)) {
|
6080 | if (nextProp) {
|
6081 | enqueuePutListener(this, propKey, nextProp, transaction);
|
6082 | } else if (lastProp) {
|
6083 | deleteListener(this, propKey);
|
6084 | }
|
6085 | } else if (isCustomComponent(this._tag, nextProps)) {
|
6086 | if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
|
6087 | DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
|
6088 | }
|
6089 | } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
|
6090 | var node = getNode(this);
|
6091 |
|
6092 |
|
6093 |
|
6094 | if (nextProp != null) {
|
6095 | DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
|
6096 | } else {
|
6097 | DOMPropertyOperations.deleteValueForProperty(node, propKey);
|
6098 | }
|
6099 | }
|
6100 | }
|
6101 | if (styleUpdates) {
|
6102 | CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
|
6103 | }
|
6104 | },
|
6105 |
|
6106 | |
6107 |
|
6108 |
|
6109 |
|
6110 |
|
6111 |
|
6112 |
|
6113 |
|
6114 |
|
6115 | _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
|
6116 | var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
|
6117 | var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
|
6118 |
|
6119 | var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
|
6120 | var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
|
6121 |
|
6122 |
|
6123 | var lastChildren = lastContent != null ? null : lastProps.children;
|
6124 | var nextChildren = nextContent != null ? null : nextProps.children;
|
6125 |
|
6126 |
|
6127 |
|
6128 | var lastHasContentOrHtml = lastContent != null || lastHtml != null;
|
6129 | var nextHasContentOrHtml = nextContent != null || nextHtml != null;
|
6130 | if (lastChildren != null && nextChildren == null) {
|
6131 | this.updateChildren(null, transaction, context);
|
6132 | } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
|
6133 | this.updateTextContent('');
|
6134 | if ("development" !== 'production') {
|
6135 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
6136 | }
|
6137 | }
|
6138 |
|
6139 | if (nextContent != null) {
|
6140 | if (lastContent !== nextContent) {
|
6141 | this.updateTextContent('' + nextContent);
|
6142 | if ("development" !== 'production') {
|
6143 | setAndValidateContentChildDev.call(this, nextContent);
|
6144 | }
|
6145 | }
|
6146 | } else if (nextHtml != null) {
|
6147 | if (lastHtml !== nextHtml) {
|
6148 | this.updateMarkup('' + nextHtml);
|
6149 | }
|
6150 | if ("development" !== 'production') {
|
6151 | ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
|
6152 | }
|
6153 | } else if (nextChildren != null) {
|
6154 | if ("development" !== 'production') {
|
6155 | setAndValidateContentChildDev.call(this, null);
|
6156 | }
|
6157 |
|
6158 | this.updateChildren(nextChildren, transaction, context);
|
6159 | }
|
6160 | },
|
6161 |
|
6162 | getHostNode: function () {
|
6163 | return getNode(this);
|
6164 | },
|
6165 |
|
6166 | |
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 | unmountComponent: function (safely) {
|
6173 | switch (this._tag) {
|
6174 | case 'audio':
|
6175 | case 'form':
|
6176 | case 'iframe':
|
6177 | case 'img':
|
6178 | case 'link':
|
6179 | case 'object':
|
6180 | case 'source':
|
6181 | case 'video':
|
6182 | var listeners = this._wrapperState.listeners;
|
6183 | if (listeners) {
|
6184 | for (var i = 0; i < listeners.length; i++) {
|
6185 | listeners[i].remove();
|
6186 | }
|
6187 | }
|
6188 | break;
|
6189 | case 'input':
|
6190 | case 'textarea':
|
6191 | inputValueTracking.stopTracking(this);
|
6192 | break;
|
6193 | case 'html':
|
6194 | case 'head':
|
6195 | case 'body':
|
6196 | |
6197 |
|
6198 |
|
6199 |
|
6200 |
|
6201 |
|
6202 | !false ? "development" !== '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;
|
6203 | break;
|
6204 | }
|
6205 |
|
6206 | this.unmountChildren(safely);
|
6207 | ReactDOMComponentTree.uncacheNode(this);
|
6208 | EventPluginHub.deleteAllListeners(this);
|
6209 | this._rootNodeID = 0;
|
6210 | this._domID = 0;
|
6211 | this._wrapperState = null;
|
6212 |
|
6213 | if ("development" !== 'production') {
|
6214 | setAndValidateContentChildDev.call(this, null);
|
6215 | }
|
6216 | },
|
6217 |
|
6218 | getPublicInstance: function () {
|
6219 | return getNode(this);
|
6220 | }
|
6221 | };
|
6222 |
|
6223 | _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
|
6224 |
|
6225 | module.exports = ReactDOMComponent;
|
6226 | },{"10":10,"100":100,"11":11,"111":111,"113":113,"116":116,"12":12,"121":121,"133":133,"141":141,"147":147,"148":148,"149":149,"16":16,"17":17,"2":2,"25":25,"31":31,"32":32,"36":36,"37":37,"38":38,"43":43,"5":5,"59":59,"62":62,"72":72,"9":9}],31:[function(_dereq_,module,exports){
|
6227 |
|
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 | 'use strict';
|
6236 |
|
6237 | var ReactDOMComponentFlags = {
|
6238 | hasCachedChildNodes: 1 << 0
|
6239 | };
|
6240 |
|
6241 | module.exports = ReactDOMComponentFlags;
|
6242 | },{}],32:[function(_dereq_,module,exports){
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 |
|
6248 |
|
6249 |
|
6250 |
|
6251 | 'use strict';
|
6252 |
|
6253 | var _prodInvariant = _dereq_(116);
|
6254 |
|
6255 | var DOMProperty = _dereq_(11);
|
6256 | var ReactDOMComponentFlags = _dereq_(31);
|
6257 |
|
6258 | var invariant = _dereq_(141);
|
6259 |
|
6260 | var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
|
6261 | var Flags = ReactDOMComponentFlags;
|
6262 |
|
6263 | var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
|
6264 |
|
6265 |
|
6266 |
|
6267 |
|
6268 | function shouldPrecacheNode(node, nodeID) {
|
6269 | 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 + ' ';
|
6270 | }
|
6271 |
|
6272 |
|
6273 |
|
6274 |
|
6275 |
|
6276 |
|
6277 |
|
6278 |
|
6279 | function getRenderedHostOrTextFromComponent(component) {
|
6280 | var rendered;
|
6281 | while (rendered = component._renderedComponent) {
|
6282 | component = rendered;
|
6283 | }
|
6284 | return component;
|
6285 | }
|
6286 |
|
6287 |
|
6288 |
|
6289 |
|
6290 |
|
6291 | function precacheNode(inst, node) {
|
6292 | var hostInst = getRenderedHostOrTextFromComponent(inst);
|
6293 | hostInst._hostNode = node;
|
6294 | node[internalInstanceKey] = hostInst;
|
6295 | }
|
6296 |
|
6297 | function uncacheNode(inst) {
|
6298 | var node = inst._hostNode;
|
6299 | if (node) {
|
6300 | delete node[internalInstanceKey];
|
6301 | inst._hostNode = null;
|
6302 | }
|
6303 | }
|
6304 |
|
6305 |
|
6306 |
|
6307 |
|
6308 |
|
6309 |
|
6310 |
|
6311 |
|
6312 |
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 | function precacheChildNodes(inst, node) {
|
6320 | if (inst._flags & Flags.hasCachedChildNodes) {
|
6321 | return;
|
6322 | }
|
6323 | var children = inst._renderedChildren;
|
6324 | var childNode = node.firstChild;
|
6325 | outer: for (var name in children) {
|
6326 | if (!children.hasOwnProperty(name)) {
|
6327 | continue;
|
6328 | }
|
6329 | var childInst = children[name];
|
6330 | var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
|
6331 | if (childID === 0) {
|
6332 |
|
6333 | continue;
|
6334 | }
|
6335 |
|
6336 | for (; childNode !== null; childNode = childNode.nextSibling) {
|
6337 | if (shouldPrecacheNode(childNode, childID)) {
|
6338 | precacheNode(childInst, childNode);
|
6339 | continue outer;
|
6340 | }
|
6341 | }
|
6342 |
|
6343 | !false ? "development" !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
|
6344 | }
|
6345 | inst._flags |= Flags.hasCachedChildNodes;
|
6346 | }
|
6347 |
|
6348 |
|
6349 |
|
6350 |
|
6351 |
|
6352 | function getClosestInstanceFromNode(node) {
|
6353 | if (node[internalInstanceKey]) {
|
6354 | return node[internalInstanceKey];
|
6355 | }
|
6356 |
|
6357 |
|
6358 | var parents = [];
|
6359 | while (!node[internalInstanceKey]) {
|
6360 | parents.push(node);
|
6361 | if (node.parentNode) {
|
6362 | node = node.parentNode;
|
6363 | } else {
|
6364 |
|
6365 |
|
6366 | return null;
|
6367 | }
|
6368 | }
|
6369 |
|
6370 | var closest;
|
6371 | var inst;
|
6372 | for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
|
6373 | closest = inst;
|
6374 | if (parents.length) {
|
6375 | precacheChildNodes(inst, node);
|
6376 | }
|
6377 | }
|
6378 |
|
6379 | return closest;
|
6380 | }
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 | function getInstanceFromNode(node) {
|
6387 | var inst = getClosestInstanceFromNode(node);
|
6388 | if (inst != null && inst._hostNode === node) {
|
6389 | return inst;
|
6390 | } else {
|
6391 | return null;
|
6392 | }
|
6393 | }
|
6394 |
|
6395 |
|
6396 |
|
6397 |
|
6398 |
|
6399 | function getNodeFromInstance(inst) {
|
6400 |
|
6401 |
|
6402 | !(inst._hostNode !== undefined) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
6403 |
|
6404 | if (inst._hostNode) {
|
6405 | return inst._hostNode;
|
6406 | }
|
6407 |
|
6408 |
|
6409 | var parents = [];
|
6410 | while (!inst._hostNode) {
|
6411 | parents.push(inst);
|
6412 | !inst._hostParent ? "development" !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
|
6413 | inst = inst._hostParent;
|
6414 | }
|
6415 |
|
6416 |
|
6417 |
|
6418 | for (; parents.length; inst = parents.pop()) {
|
6419 | precacheChildNodes(inst, inst._hostNode);
|
6420 | }
|
6421 |
|
6422 | return inst._hostNode;
|
6423 | }
|
6424 |
|
6425 | var ReactDOMComponentTree = {
|
6426 | getClosestInstanceFromNode: getClosestInstanceFromNode,
|
6427 | getInstanceFromNode: getInstanceFromNode,
|
6428 | getNodeFromInstance: getNodeFromInstance,
|
6429 | precacheChildNodes: precacheChildNodes,
|
6430 | precacheNode: precacheNode,
|
6431 | uncacheNode: uncacheNode
|
6432 | };
|
6433 |
|
6434 | module.exports = ReactDOMComponentTree;
|
6435 | },{"11":11,"116":116,"141":141,"31":31}],33:[function(_dereq_,module,exports){
|
6436 |
|
6437 |
|
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 | 'use strict';
|
6445 |
|
6446 | var validateDOMNesting = _dereq_(121);
|
6447 |
|
6448 | var DOC_NODE_TYPE = 9;
|
6449 |
|
6450 | function ReactDOMContainerInfo(topLevelWrapper, node) {
|
6451 | var info = {
|
6452 | _topLevelWrapper: topLevelWrapper,
|
6453 | _idCounter: 1,
|
6454 | _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
|
6455 | _node: node,
|
6456 | _tag: node ? node.nodeName.toLowerCase() : null,
|
6457 | _namespaceURI: node ? node.namespaceURI : null
|
6458 | };
|
6459 | if ("development" !== 'production') {
|
6460 | info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
|
6461 | }
|
6462 | return info;
|
6463 | }
|
6464 |
|
6465 | module.exports = ReactDOMContainerInfo;
|
6466 | },{"121":121}],34:[function(_dereq_,module,exports){
|
6467 |
|
6468 |
|
6469 |
|
6470 |
|
6471 |
|
6472 |
|
6473 |
|
6474 |
|
6475 | 'use strict';
|
6476 |
|
6477 | var _assign = _dereq_(149);
|
6478 |
|
6479 | var DOMLazyTree = _dereq_(9);
|
6480 | var ReactDOMComponentTree = _dereq_(32);
|
6481 |
|
6482 | var ReactDOMEmptyComponent = function (instantiate) {
|
6483 |
|
6484 | this._currentElement = null;
|
6485 |
|
6486 | this._hostNode = null;
|
6487 | this._hostParent = null;
|
6488 | this._hostContainerInfo = null;
|
6489 | this._domID = 0;
|
6490 | };
|
6491 | _assign(ReactDOMEmptyComponent.prototype, {
|
6492 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
6493 | var domID = hostContainerInfo._idCounter++;
|
6494 | this._domID = domID;
|
6495 | this._hostParent = hostParent;
|
6496 | this._hostContainerInfo = hostContainerInfo;
|
6497 |
|
6498 | var nodeValue = ' react-empty: ' + this._domID + ' ';
|
6499 | if (transaction.useCreateElement) {
|
6500 | var ownerDocument = hostContainerInfo._ownerDocument;
|
6501 | var node = ownerDocument.createComment(nodeValue);
|
6502 | ReactDOMComponentTree.precacheNode(this, node);
|
6503 | return DOMLazyTree(node);
|
6504 | } else {
|
6505 | if (transaction.renderToStaticMarkup) {
|
6506 |
|
6507 |
|
6508 |
|
6509 | return '';
|
6510 | }
|
6511 | return '<!--' + nodeValue + '-->';
|
6512 | }
|
6513 | },
|
6514 | receiveComponent: function () {},
|
6515 | getHostNode: function () {
|
6516 | return ReactDOMComponentTree.getNodeFromInstance(this);
|
6517 | },
|
6518 | unmountComponent: function () {
|
6519 | ReactDOMComponentTree.uncacheNode(this);
|
6520 | }
|
6521 | });
|
6522 |
|
6523 | module.exports = ReactDOMEmptyComponent;
|
6524 | },{"149":149,"32":32,"9":9}],35:[function(_dereq_,module,exports){
|
6525 |
|
6526 |
|
6527 |
|
6528 |
|
6529 |
|
6530 |
|
6531 |
|
6532 |
|
6533 | 'use strict';
|
6534 |
|
6535 | var DOMChildrenOperations = _dereq_(8);
|
6536 | var ReactDOMComponentTree = _dereq_(32);
|
6537 |
|
6538 |
|
6539 |
|
6540 |
|
6541 | var ReactDOMIDOperations = {
|
6542 | |
6543 |
|
6544 |
|
6545 |
|
6546 |
|
6547 |
|
6548 | dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
|
6549 | var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
|
6550 | DOMChildrenOperations.processUpdates(node, updates);
|
6551 | }
|
6552 | };
|
6553 |
|
6554 | module.exports = ReactDOMIDOperations;
|
6555 | },{"32":32,"8":8}],36:[function(_dereq_,module,exports){
|
6556 |
|
6557 |
|
6558 |
|
6559 |
|
6560 |
|
6561 |
|
6562 |
|
6563 |
|
6564 | 'use strict';
|
6565 |
|
6566 | var _prodInvariant = _dereq_(116),
|
6567 | _assign = _dereq_(149);
|
6568 |
|
6569 | var DOMPropertyOperations = _dereq_(12);
|
6570 | var LinkedValueUtils = _dereq_(23);
|
6571 | var ReactDOMComponentTree = _dereq_(32);
|
6572 | var ReactUpdates = _dereq_(75);
|
6573 |
|
6574 | var invariant = _dereq_(141);
|
6575 | var warning = _dereq_(148);
|
6576 |
|
6577 | var didWarnValueLink = false;
|
6578 | var didWarnCheckedLink = false;
|
6579 | var didWarnValueDefaultValue = false;
|
6580 | var didWarnCheckedDefaultChecked = false;
|
6581 | var didWarnControlledToUncontrolled = false;
|
6582 | var didWarnUncontrolledToControlled = false;
|
6583 |
|
6584 | function forceUpdateIfMounted() {
|
6585 | if (this._rootNodeID) {
|
6586 |
|
6587 | ReactDOMInput.updateWrapper(this);
|
6588 | }
|
6589 | }
|
6590 |
|
6591 | function isControlled(props) {
|
6592 | var usesChecked = props.type === 'checkbox' || props.type === 'radio';
|
6593 | return usesChecked ? props.checked != null : props.value != null;
|
6594 | }
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 |
|
6600 |
|
6601 |
|
6602 |
|
6603 |
|
6604 |
|
6605 |
|
6606 |
|
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 | var ReactDOMInput = {
|
6613 | getHostProps: function (inst, props) {
|
6614 | var value = LinkedValueUtils.getValue(props);
|
6615 | var checked = LinkedValueUtils.getChecked(props);
|
6616 |
|
6617 | var hostProps = _assign({
|
6618 |
|
6619 |
|
6620 | type: undefined,
|
6621 |
|
6622 |
|
6623 | step: undefined,
|
6624 |
|
6625 |
|
6626 | min: undefined,
|
6627 | max: undefined
|
6628 | }, props, {
|
6629 | defaultChecked: undefined,
|
6630 | defaultValue: undefined,
|
6631 | value: value != null ? value : inst._wrapperState.initialValue,
|
6632 | checked: checked != null ? checked : inst._wrapperState.initialChecked,
|
6633 | onChange: inst._wrapperState.onChange
|
6634 | });
|
6635 |
|
6636 | return hostProps;
|
6637 | },
|
6638 |
|
6639 | mountWrapper: function (inst, props) {
|
6640 | if ("development" !== 'production') {
|
6641 | LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
|
6642 |
|
6643 | var owner = inst._currentElement._owner;
|
6644 |
|
6645 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
6646 | "development" !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
6647 | didWarnValueLink = true;
|
6648 | }
|
6649 | if (props.checkedLink !== undefined && !didWarnCheckedLink) {
|
6650 | "development" !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
|
6651 | didWarnCheckedLink = true;
|
6652 | }
|
6653 | if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
|
6654 | "development" !== '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;
|
6655 | didWarnCheckedDefaultChecked = true;
|
6656 | }
|
6657 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
6658 | "development" !== '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;
|
6659 | didWarnValueDefaultValue = true;
|
6660 | }
|
6661 | }
|
6662 |
|
6663 | var defaultValue = props.defaultValue;
|
6664 | inst._wrapperState = {
|
6665 | initialChecked: props.checked != null ? props.checked : props.defaultChecked,
|
6666 | initialValue: props.value != null ? props.value : defaultValue,
|
6667 | listeners: null,
|
6668 | onChange: _handleChange.bind(inst),
|
6669 | controlled: isControlled(props)
|
6670 | };
|
6671 | },
|
6672 |
|
6673 | updateWrapper: function (inst) {
|
6674 | var props = inst._currentElement.props;
|
6675 |
|
6676 | if ("development" !== 'production') {
|
6677 | var controlled = isControlled(props);
|
6678 | var owner = inst._currentElement._owner;
|
6679 |
|
6680 | if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
|
6681 | "development" !== '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;
|
6682 | didWarnUncontrolledToControlled = true;
|
6683 | }
|
6684 | if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
|
6685 | "development" !== '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;
|
6686 | didWarnControlledToUncontrolled = true;
|
6687 | }
|
6688 | }
|
6689 |
|
6690 |
|
6691 | var checked = props.checked;
|
6692 | if (checked != null) {
|
6693 | DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
|
6694 | }
|
6695 |
|
6696 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
6697 | var value = LinkedValueUtils.getValue(props);
|
6698 | if (value != null) {
|
6699 | if (value === 0 && node.value === '') {
|
6700 | node.value = '0';
|
6701 |
|
6702 | } else if (props.type === 'number') {
|
6703 |
|
6704 | var valueAsNumber = parseFloat(node.value, 10) || 0;
|
6705 |
|
6706 | if (
|
6707 |
|
6708 | value != valueAsNumber ||
|
6709 |
|
6710 | value == valueAsNumber && node.value != value) {
|
6711 |
|
6712 |
|
6713 | node.value = '' + value;
|
6714 | }
|
6715 | } else if (node.value !== '' + value) {
|
6716 |
|
6717 |
|
6718 | node.value = '' + value;
|
6719 | }
|
6720 | } else {
|
6721 | if (props.value == null && props.defaultValue != null) {
|
6722 |
|
6723 |
|
6724 |
|
6725 |
|
6726 |
|
6727 |
|
6728 |
|
6729 |
|
6730 | if (node.defaultValue !== '' + props.defaultValue) {
|
6731 | node.defaultValue = '' + props.defaultValue;
|
6732 | }
|
6733 | }
|
6734 | if (props.checked == null && props.defaultChecked != null) {
|
6735 | node.defaultChecked = !!props.defaultChecked;
|
6736 | }
|
6737 | }
|
6738 | },
|
6739 |
|
6740 | postMountWrapper: function (inst) {
|
6741 | var props = inst._currentElement.props;
|
6742 |
|
6743 |
|
6744 |
|
6745 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
6746 |
|
6747 |
|
6748 |
|
6749 |
|
6750 |
|
6751 |
|
6752 |
|
6753 | switch (props.type) {
|
6754 | case 'submit':
|
6755 | case 'reset':
|
6756 | break;
|
6757 | case 'color':
|
6758 | case 'date':
|
6759 | case 'datetime':
|
6760 | case 'datetime-local':
|
6761 | case 'month':
|
6762 | case 'time':
|
6763 | case 'week':
|
6764 |
|
6765 |
|
6766 | node.value = '';
|
6767 | node.value = node.defaultValue;
|
6768 | break;
|
6769 | default:
|
6770 | node.value = node.value;
|
6771 | break;
|
6772 | }
|
6773 |
|
6774 |
|
6775 |
|
6776 |
|
6777 |
|
6778 |
|
6779 | var name = node.name;
|
6780 | if (name !== '') {
|
6781 | node.name = '';
|
6782 | }
|
6783 | node.defaultChecked = !node.defaultChecked;
|
6784 | node.defaultChecked = !node.defaultChecked;
|
6785 | if (name !== '') {
|
6786 | node.name = name;
|
6787 | }
|
6788 | }
|
6789 | };
|
6790 |
|
6791 | function _handleChange(event) {
|
6792 | var props = this._currentElement.props;
|
6793 |
|
6794 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
6795 |
|
6796 |
|
6797 |
|
6798 |
|
6799 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
6800 |
|
6801 | var name = props.name;
|
6802 | if (props.type === 'radio' && name != null) {
|
6803 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
|
6804 | var queryRoot = rootNode;
|
6805 |
|
6806 | while (queryRoot.parentNode) {
|
6807 | queryRoot = queryRoot.parentNode;
|
6808 | }
|
6809 |
|
6810 |
|
6811 |
|
6812 |
|
6813 |
|
6814 |
|
6815 |
|
6816 | var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
|
6817 |
|
6818 | for (var i = 0; i < group.length; i++) {
|
6819 | var otherNode = group[i];
|
6820 | if (otherNode === rootNode || otherNode.form !== rootNode.form) {
|
6821 | continue;
|
6822 | }
|
6823 |
|
6824 |
|
6825 |
|
6826 |
|
6827 | var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
|
6828 | !otherInstance ? "development" !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
|
6829 |
|
6830 |
|
6831 |
|
6832 | ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
|
6833 | }
|
6834 | }
|
6835 |
|
6836 | return returnValue;
|
6837 | }
|
6838 |
|
6839 | module.exports = ReactDOMInput;
|
6840 | },{"116":116,"12":12,"141":141,"148":148,"149":149,"23":23,"32":32,"75":75}],37:[function(_dereq_,module,exports){
|
6841 |
|
6842 |
|
6843 |
|
6844 |
|
6845 |
|
6846 |
|
6847 |
|
6848 |
|
6849 | 'use strict';
|
6850 |
|
6851 | var _assign = _dereq_(149);
|
6852 |
|
6853 | var React = _dereq_(124);
|
6854 | var ReactDOMComponentTree = _dereq_(32);
|
6855 | var ReactDOMSelect = _dereq_(38);
|
6856 |
|
6857 | var warning = _dereq_(148);
|
6858 | var didWarnInvalidOptionChildren = false;
|
6859 |
|
6860 | function flattenChildren(children) {
|
6861 | var content = '';
|
6862 |
|
6863 |
|
6864 |
|
6865 | React.Children.forEach(children, function (child) {
|
6866 | if (child == null) {
|
6867 | return;
|
6868 | }
|
6869 | if (typeof child === 'string' || typeof child === 'number') {
|
6870 | content += child;
|
6871 | } else if (!didWarnInvalidOptionChildren) {
|
6872 | didWarnInvalidOptionChildren = true;
|
6873 | "development" !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
|
6874 | }
|
6875 | });
|
6876 |
|
6877 | return content;
|
6878 | }
|
6879 |
|
6880 |
|
6881 |
|
6882 |
|
6883 | var ReactDOMOption = {
|
6884 | mountWrapper: function (inst, props, hostParent) {
|
6885 |
|
6886 | if ("development" !== 'production') {
|
6887 | "development" !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
|
6888 | }
|
6889 |
|
6890 |
|
6891 | var selectValue = null;
|
6892 | if (hostParent != null) {
|
6893 | var selectParent = hostParent;
|
6894 |
|
6895 | if (selectParent._tag === 'optgroup') {
|
6896 | selectParent = selectParent._hostParent;
|
6897 | }
|
6898 |
|
6899 | if (selectParent != null && selectParent._tag === 'select') {
|
6900 | selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
|
6901 | }
|
6902 | }
|
6903 |
|
6904 |
|
6905 |
|
6906 | var selected = null;
|
6907 | if (selectValue != null) {
|
6908 | var value;
|
6909 | if (props.value != null) {
|
6910 | value = props.value + '';
|
6911 | } else {
|
6912 | value = flattenChildren(props.children);
|
6913 | }
|
6914 | selected = false;
|
6915 | if (Array.isArray(selectValue)) {
|
6916 |
|
6917 | for (var i = 0; i < selectValue.length; i++) {
|
6918 | if ('' + selectValue[i] === value) {
|
6919 | selected = true;
|
6920 | break;
|
6921 | }
|
6922 | }
|
6923 | } else {
|
6924 | selected = '' + selectValue === value;
|
6925 | }
|
6926 | }
|
6927 |
|
6928 | inst._wrapperState = { selected: selected };
|
6929 | },
|
6930 |
|
6931 | postMountWrapper: function (inst) {
|
6932 |
|
6933 | var props = inst._currentElement.props;
|
6934 | if (props.value != null) {
|
6935 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
6936 | node.setAttribute('value', props.value);
|
6937 | }
|
6938 | },
|
6939 |
|
6940 | getHostProps: function (inst, props) {
|
6941 | var hostProps = _assign({ selected: undefined, children: undefined }, props);
|
6942 |
|
6943 |
|
6944 |
|
6945 | if (inst._wrapperState.selected != null) {
|
6946 | hostProps.selected = inst._wrapperState.selected;
|
6947 | }
|
6948 |
|
6949 | var content = flattenChildren(props.children);
|
6950 |
|
6951 | if (content) {
|
6952 | hostProps.children = content;
|
6953 | }
|
6954 |
|
6955 | return hostProps;
|
6956 | }
|
6957 | };
|
6958 |
|
6959 | module.exports = ReactDOMOption;
|
6960 | },{"124":124,"148":148,"149":149,"32":32,"38":38}],38:[function(_dereq_,module,exports){
|
6961 |
|
6962 |
|
6963 |
|
6964 |
|
6965 |
|
6966 |
|
6967 |
|
6968 |
|
6969 | 'use strict';
|
6970 |
|
6971 | var _assign = _dereq_(149);
|
6972 |
|
6973 | var LinkedValueUtils = _dereq_(23);
|
6974 | var ReactDOMComponentTree = _dereq_(32);
|
6975 | var ReactUpdates = _dereq_(75);
|
6976 |
|
6977 | var warning = _dereq_(148);
|
6978 |
|
6979 | var didWarnValueLink = false;
|
6980 | var didWarnValueDefaultValue = false;
|
6981 |
|
6982 | function updateOptionsIfPendingUpdateAndMounted() {
|
6983 | if (this._rootNodeID && this._wrapperState.pendingUpdate) {
|
6984 | this._wrapperState.pendingUpdate = false;
|
6985 |
|
6986 | var props = this._currentElement.props;
|
6987 | var value = LinkedValueUtils.getValue(props);
|
6988 |
|
6989 | if (value != null) {
|
6990 | updateOptions(this, Boolean(props.multiple), value);
|
6991 | }
|
6992 | }
|
6993 | }
|
6994 |
|
6995 | function getDeclarationErrorAddendum(owner) {
|
6996 | if (owner) {
|
6997 | var name = owner.getName();
|
6998 | if (name) {
|
6999 | return ' Check the render method of `' + name + '`.';
|
7000 | }
|
7001 | }
|
7002 | return '';
|
7003 | }
|
7004 |
|
7005 | var valuePropNames = ['value', 'defaultValue'];
|
7006 |
|
7007 |
|
7008 |
|
7009 |
|
7010 |
|
7011 | function checkSelectPropTypes(inst, props) {
|
7012 | var owner = inst._currentElement._owner;
|
7013 | LinkedValueUtils.checkPropTypes('select', props, owner);
|
7014 |
|
7015 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
7016 | "development" !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
|
7017 | didWarnValueLink = true;
|
7018 | }
|
7019 |
|
7020 | for (var i = 0; i < valuePropNames.length; i++) {
|
7021 | var propName = valuePropNames[i];
|
7022 | if (props[propName] == null) {
|
7023 | continue;
|
7024 | }
|
7025 | var isArray = Array.isArray(props[propName]);
|
7026 | if (props.multiple && !isArray) {
|
7027 | "development" !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
7028 | } else if (!props.multiple && isArray) {
|
7029 | "development" !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
|
7030 | }
|
7031 | }
|
7032 | }
|
7033 |
|
7034 |
|
7035 |
|
7036 |
|
7037 |
|
7038 |
|
7039 |
|
7040 | function updateOptions(inst, multiple, propValue) {
|
7041 | var selectedValue, i;
|
7042 | var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
|
7043 |
|
7044 | if (multiple) {
|
7045 | selectedValue = {};
|
7046 | for (i = 0; i < propValue.length; i++) {
|
7047 | selectedValue['' + propValue[i]] = true;
|
7048 | }
|
7049 | for (i = 0; i < options.length; i++) {
|
7050 | var selected = selectedValue.hasOwnProperty(options[i].value);
|
7051 | if (options[i].selected !== selected) {
|
7052 | options[i].selected = selected;
|
7053 | }
|
7054 | }
|
7055 | } else {
|
7056 |
|
7057 |
|
7058 | selectedValue = '' + propValue;
|
7059 | for (i = 0; i < options.length; i++) {
|
7060 | if (options[i].value === selectedValue) {
|
7061 | options[i].selected = true;
|
7062 | return;
|
7063 | }
|
7064 | }
|
7065 | if (options.length) {
|
7066 | options[0].selected = true;
|
7067 | }
|
7068 | }
|
7069 | }
|
7070 |
|
7071 |
|
7072 |
|
7073 |
|
7074 |
|
7075 |
|
7076 |
|
7077 |
|
7078 |
|
7079 |
|
7080 |
|
7081 |
|
7082 |
|
7083 |
|
7084 |
|
7085 |
|
7086 | var ReactDOMSelect = {
|
7087 | getHostProps: function (inst, props) {
|
7088 | return _assign({}, props, {
|
7089 | onChange: inst._wrapperState.onChange,
|
7090 | value: undefined
|
7091 | });
|
7092 | },
|
7093 |
|
7094 | mountWrapper: function (inst, props) {
|
7095 | if ("development" !== 'production') {
|
7096 | checkSelectPropTypes(inst, props);
|
7097 | }
|
7098 |
|
7099 | var value = LinkedValueUtils.getValue(props);
|
7100 | inst._wrapperState = {
|
7101 | pendingUpdate: false,
|
7102 | initialValue: value != null ? value : props.defaultValue,
|
7103 | listeners: null,
|
7104 | onChange: _handleChange.bind(inst),
|
7105 | wasMultiple: Boolean(props.multiple)
|
7106 | };
|
7107 |
|
7108 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
|
7109 | "development" !== '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;
|
7110 | didWarnValueDefaultValue = true;
|
7111 | }
|
7112 | },
|
7113 |
|
7114 | getSelectValueContext: function (inst) {
|
7115 |
|
7116 |
|
7117 | return inst._wrapperState.initialValue;
|
7118 | },
|
7119 |
|
7120 | postUpdateWrapper: function (inst) {
|
7121 | var props = inst._currentElement.props;
|
7122 |
|
7123 |
|
7124 |
|
7125 | inst._wrapperState.initialValue = undefined;
|
7126 |
|
7127 | var wasMultiple = inst._wrapperState.wasMultiple;
|
7128 | inst._wrapperState.wasMultiple = Boolean(props.multiple);
|
7129 |
|
7130 | var value = LinkedValueUtils.getValue(props);
|
7131 | if (value != null) {
|
7132 | inst._wrapperState.pendingUpdate = false;
|
7133 | updateOptions(inst, Boolean(props.multiple), value);
|
7134 | } else if (wasMultiple !== Boolean(props.multiple)) {
|
7135 |
|
7136 | if (props.defaultValue != null) {
|
7137 | updateOptions(inst, Boolean(props.multiple), props.defaultValue);
|
7138 | } else {
|
7139 |
|
7140 | updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
|
7141 | }
|
7142 | }
|
7143 | }
|
7144 | };
|
7145 |
|
7146 | function _handleChange(event) {
|
7147 | var props = this._currentElement.props;
|
7148 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
7149 |
|
7150 | if (this._rootNodeID) {
|
7151 | this._wrapperState.pendingUpdate = true;
|
7152 | }
|
7153 | ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
|
7154 | return returnValue;
|
7155 | }
|
7156 |
|
7157 | module.exports = ReactDOMSelect;
|
7158 | },{"148":148,"149":149,"23":23,"32":32,"75":75}],39:[function(_dereq_,module,exports){
|
7159 |
|
7160 |
|
7161 |
|
7162 |
|
7163 |
|
7164 |
|
7165 |
|
7166 |
|
7167 | 'use strict';
|
7168 |
|
7169 | var ExecutionEnvironment = _dereq_(127);
|
7170 |
|
7171 | var getNodeForCharacterOffset = _dereq_(108);
|
7172 | var getTextContentAccessor = _dereq_(109);
|
7173 |
|
7174 |
|
7175 |
|
7176 |
|
7177 |
|
7178 |
|
7179 | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
|
7180 | return anchorNode === focusNode && anchorOffset === focusOffset;
|
7181 | }
|
7182 |
|
7183 |
|
7184 |
|
7185 |
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 |
|
7191 |
|
7192 |
|
7193 |
|
7194 |
|
7195 |
|
7196 |
|
7197 | function getIEOffsets(node) {
|
7198 | var selection = document.selection;
|
7199 | var selectedRange = selection.createRange();
|
7200 | var selectedLength = selectedRange.text.length;
|
7201 |
|
7202 |
|
7203 | var fromStart = selectedRange.duplicate();
|
7204 | fromStart.moveToElementText(node);
|
7205 | fromStart.setEndPoint('EndToStart', selectedRange);
|
7206 |
|
7207 | var startOffset = fromStart.text.length;
|
7208 | var endOffset = startOffset + selectedLength;
|
7209 |
|
7210 | return {
|
7211 | start: startOffset,
|
7212 | end: endOffset
|
7213 | };
|
7214 | }
|
7215 |
|
7216 |
|
7217 |
|
7218 |
|
7219 |
|
7220 | function getModernOffsets(node) {
|
7221 | var selection = window.getSelection && window.getSelection();
|
7222 |
|
7223 | if (!selection || selection.rangeCount === 0) {
|
7224 | return null;
|
7225 | }
|
7226 |
|
7227 | var anchorNode = selection.anchorNode;
|
7228 | var anchorOffset = selection.anchorOffset;
|
7229 | var focusNode = selection.focusNode;
|
7230 | var focusOffset = selection.focusOffset;
|
7231 |
|
7232 | var currentRange = selection.getRangeAt(0);
|
7233 |
|
7234 |
|
7235 |
|
7236 |
|
7237 |
|
7238 |
|
7239 |
|
7240 |
|
7241 | try {
|
7242 |
|
7243 | currentRange.startContainer.nodeType;
|
7244 | currentRange.endContainer.nodeType;
|
7245 |
|
7246 | } catch (e) {
|
7247 | return null;
|
7248 | }
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 | var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
|
7254 |
|
7255 | var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
|
7256 |
|
7257 | var tempRange = currentRange.cloneRange();
|
7258 | tempRange.selectNodeContents(node);
|
7259 | tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
|
7260 |
|
7261 | var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
|
7262 |
|
7263 | var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
|
7264 | var end = start + rangeLength;
|
7265 |
|
7266 |
|
7267 | var detectionRange = document.createRange();
|
7268 | detectionRange.setStart(anchorNode, anchorOffset);
|
7269 | detectionRange.setEnd(focusNode, focusOffset);
|
7270 | var isBackward = detectionRange.collapsed;
|
7271 |
|
7272 | return {
|
7273 | start: isBackward ? end : start,
|
7274 | end: isBackward ? start : end
|
7275 | };
|
7276 | }
|
7277 |
|
7278 |
|
7279 |
|
7280 |
|
7281 |
|
7282 | function setIEOffsets(node, offsets) {
|
7283 | var range = document.selection.createRange().duplicate();
|
7284 | var start, end;
|
7285 |
|
7286 | if (offsets.end === undefined) {
|
7287 | start = offsets.start;
|
7288 | end = start;
|
7289 | } else if (offsets.start > offsets.end) {
|
7290 | start = offsets.end;
|
7291 | end = offsets.start;
|
7292 | } else {
|
7293 | start = offsets.start;
|
7294 | end = offsets.end;
|
7295 | }
|
7296 |
|
7297 | range.moveToElementText(node);
|
7298 | range.moveStart('character', start);
|
7299 | range.setEndPoint('EndToStart', range);
|
7300 | range.moveEnd('character', end - start);
|
7301 | range.select();
|
7302 | }
|
7303 |
|
7304 |
|
7305 |
|
7306 |
|
7307 |
|
7308 |
|
7309 |
|
7310 |
|
7311 |
|
7312 |
|
7313 |
|
7314 |
|
7315 |
|
7316 | function setModernOffsets(node, offsets) {
|
7317 | if (!window.getSelection) {
|
7318 | return;
|
7319 | }
|
7320 |
|
7321 | var selection = window.getSelection();
|
7322 | var length = node[getTextContentAccessor()].length;
|
7323 | var start = Math.min(offsets.start, length);
|
7324 | var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
|
7325 |
|
7326 |
|
7327 |
|
7328 | if (!selection.extend && start > end) {
|
7329 | var temp = end;
|
7330 | end = start;
|
7331 | start = temp;
|
7332 | }
|
7333 |
|
7334 | var startMarker = getNodeForCharacterOffset(node, start);
|
7335 | var endMarker = getNodeForCharacterOffset(node, end);
|
7336 |
|
7337 | if (startMarker && endMarker) {
|
7338 | var range = document.createRange();
|
7339 | range.setStart(startMarker.node, startMarker.offset);
|
7340 | selection.removeAllRanges();
|
7341 |
|
7342 | if (start > end) {
|
7343 | selection.addRange(range);
|
7344 | selection.extend(endMarker.node, endMarker.offset);
|
7345 | } else {
|
7346 | range.setEnd(endMarker.node, endMarker.offset);
|
7347 | selection.addRange(range);
|
7348 | }
|
7349 | }
|
7350 | }
|
7351 |
|
7352 | var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
|
7353 |
|
7354 | var ReactDOMSelection = {
|
7355 | |
7356 |
|
7357 |
|
7358 | getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
|
7359 |
|
7360 | |
7361 |
|
7362 |
|
7363 |
|
7364 | setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
|
7365 | };
|
7366 |
|
7367 | module.exports = ReactDOMSelection;
|
7368 | },{"108":108,"109":109,"127":127}],40:[function(_dereq_,module,exports){
|
7369 |
|
7370 |
|
7371 |
|
7372 |
|
7373 |
|
7374 |
|
7375 |
|
7376 |
|
7377 | 'use strict';
|
7378 |
|
7379 | var ReactDefaultInjection = _dereq_(47);
|
7380 | var ReactServerRendering = _dereq_(71);
|
7381 | var ReactVersion = _dereq_(76);
|
7382 |
|
7383 | ReactDefaultInjection.inject();
|
7384 |
|
7385 | var ReactDOMServer = {
|
7386 | renderToString: ReactServerRendering.renderToString,
|
7387 | renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
|
7388 | version: ReactVersion
|
7389 | };
|
7390 |
|
7391 | module.exports = ReactDOMServer;
|
7392 | },{"47":47,"71":71,"76":76}],41:[function(_dereq_,module,exports){
|
7393 |
|
7394 |
|
7395 |
|
7396 |
|
7397 |
|
7398 |
|
7399 |
|
7400 |
|
7401 | 'use strict';
|
7402 |
|
7403 | var ReactDOMServer = _dereq_(40);
|
7404 |
|
7405 | module.exports = ReactDOMServer;
|
7406 | },{"40":40}],42:[function(_dereq_,module,exports){
|
7407 |
|
7408 |
|
7409 |
|
7410 |
|
7411 |
|
7412 |
|
7413 |
|
7414 |
|
7415 | 'use strict';
|
7416 |
|
7417 | var _prodInvariant = _dereq_(116),
|
7418 | _assign = _dereq_(149);
|
7419 |
|
7420 | var DOMChildrenOperations = _dereq_(8);
|
7421 | var DOMLazyTree = _dereq_(9);
|
7422 | var ReactDOMComponentTree = _dereq_(32);
|
7423 |
|
7424 | var escapeTextContentForBrowser = _dereq_(100);
|
7425 | var invariant = _dereq_(141);
|
7426 | var validateDOMNesting = _dereq_(121);
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 | var ReactDOMTextComponent = function (text) {
|
7444 |
|
7445 | this._currentElement = text;
|
7446 | this._stringText = '' + text;
|
7447 |
|
7448 | this._hostNode = null;
|
7449 | this._hostParent = null;
|
7450 |
|
7451 |
|
7452 | this._domID = 0;
|
7453 | this._mountIndex = 0;
|
7454 | this._closingComment = null;
|
7455 | this._commentNodes = null;
|
7456 | };
|
7457 |
|
7458 | _assign(ReactDOMTextComponent.prototype, {
|
7459 | |
7460 |
|
7461 |
|
7462 |
|
7463 |
|
7464 |
|
7465 |
|
7466 |
|
7467 | mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
|
7468 | if ("development" !== 'production') {
|
7469 | var parentInfo;
|
7470 | if (hostParent != null) {
|
7471 | parentInfo = hostParent._ancestorInfo;
|
7472 | } else if (hostContainerInfo != null) {
|
7473 | parentInfo = hostContainerInfo._ancestorInfo;
|
7474 | }
|
7475 | if (parentInfo) {
|
7476 |
|
7477 |
|
7478 | validateDOMNesting(null, this._stringText, this, parentInfo);
|
7479 | }
|
7480 | }
|
7481 |
|
7482 | var domID = hostContainerInfo._idCounter++;
|
7483 | var openingValue = ' react-text: ' + domID + ' ';
|
7484 | var closingValue = ' /react-text ';
|
7485 | this._domID = domID;
|
7486 | this._hostParent = hostParent;
|
7487 | if (transaction.useCreateElement) {
|
7488 | var ownerDocument = hostContainerInfo._ownerDocument;
|
7489 | var openingComment = ownerDocument.createComment(openingValue);
|
7490 | var closingComment = ownerDocument.createComment(closingValue);
|
7491 | var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
|
7492 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
|
7493 | if (this._stringText) {
|
7494 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
|
7495 | }
|
7496 | DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
|
7497 | ReactDOMComponentTree.precacheNode(this, openingComment);
|
7498 | this._closingComment = closingComment;
|
7499 | return lazyTree;
|
7500 | } else {
|
7501 | var escapedText = escapeTextContentForBrowser(this._stringText);
|
7502 |
|
7503 | if (transaction.renderToStaticMarkup) {
|
7504 |
|
7505 |
|
7506 |
|
7507 | return escapedText;
|
7508 | }
|
7509 |
|
7510 | return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
|
7511 | }
|
7512 | },
|
7513 |
|
7514 | |
7515 |
|
7516 |
|
7517 |
|
7518 |
|
7519 |
|
7520 |
|
7521 | receiveComponent: function (nextText, transaction) {
|
7522 | if (nextText !== this._currentElement) {
|
7523 | this._currentElement = nextText;
|
7524 | var nextStringText = '' + nextText;
|
7525 | if (nextStringText !== this._stringText) {
|
7526 |
|
7527 |
|
7528 |
|
7529 | this._stringText = nextStringText;
|
7530 | var commentNodes = this.getHostNode();
|
7531 | DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
|
7532 | }
|
7533 | }
|
7534 | },
|
7535 |
|
7536 | getHostNode: function () {
|
7537 | var hostNode = this._commentNodes;
|
7538 | if (hostNode) {
|
7539 | return hostNode;
|
7540 | }
|
7541 | if (!this._closingComment) {
|
7542 | var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
|
7543 | var node = openingComment.nextSibling;
|
7544 | while (true) {
|
7545 | !(node != null) ? "development" !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
|
7546 | if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
|
7547 | this._closingComment = node;
|
7548 | break;
|
7549 | }
|
7550 | node = node.nextSibling;
|
7551 | }
|
7552 | }
|
7553 | hostNode = [this._hostNode, this._closingComment];
|
7554 | this._commentNodes = hostNode;
|
7555 | return hostNode;
|
7556 | },
|
7557 |
|
7558 | unmountComponent: function () {
|
7559 | this._closingComment = null;
|
7560 | this._commentNodes = null;
|
7561 | ReactDOMComponentTree.uncacheNode(this);
|
7562 | }
|
7563 | });
|
7564 |
|
7565 | module.exports = ReactDOMTextComponent;
|
7566 | },{"100":100,"116":116,"121":121,"141":141,"149":149,"32":32,"8":8,"9":9}],43:[function(_dereq_,module,exports){
|
7567 |
|
7568 |
|
7569 |
|
7570 |
|
7571 |
|
7572 |
|
7573 |
|
7574 |
|
7575 | 'use strict';
|
7576 |
|
7577 | var _prodInvariant = _dereq_(116),
|
7578 | _assign = _dereq_(149);
|
7579 |
|
7580 | var LinkedValueUtils = _dereq_(23);
|
7581 | var ReactDOMComponentTree = _dereq_(32);
|
7582 | var ReactUpdates = _dereq_(75);
|
7583 |
|
7584 | var invariant = _dereq_(141);
|
7585 | var warning = _dereq_(148);
|
7586 |
|
7587 | var didWarnValueLink = false;
|
7588 | var didWarnValDefaultVal = false;
|
7589 |
|
7590 | function forceUpdateIfMounted() {
|
7591 | if (this._rootNodeID) {
|
7592 |
|
7593 | ReactDOMTextarea.updateWrapper(this);
|
7594 | }
|
7595 | }
|
7596 |
|
7597 |
|
7598 |
|
7599 |
|
7600 |
|
7601 |
|
7602 |
|
7603 |
|
7604 |
|
7605 |
|
7606 |
|
7607 |
|
7608 |
|
7609 |
|
7610 |
|
7611 |
|
7612 | var ReactDOMTextarea = {
|
7613 | getHostProps: function (inst, props) {
|
7614 | !(props.dangerouslySetInnerHTML == null) ? "development" !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
|
7615 |
|
7616 |
|
7617 |
|
7618 |
|
7619 |
|
7620 |
|
7621 | var hostProps = _assign({}, props, {
|
7622 | value: undefined,
|
7623 | defaultValue: undefined,
|
7624 | children: '' + inst._wrapperState.initialValue,
|
7625 | onChange: inst._wrapperState.onChange
|
7626 | });
|
7627 |
|
7628 | return hostProps;
|
7629 | },
|
7630 |
|
7631 | mountWrapper: function (inst, props) {
|
7632 | if ("development" !== 'production') {
|
7633 | LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
|
7634 | if (props.valueLink !== undefined && !didWarnValueLink) {
|
7635 | "development" !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
|
7636 | didWarnValueLink = true;
|
7637 | }
|
7638 | if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
|
7639 | "development" !== '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;
|
7640 | didWarnValDefaultVal = true;
|
7641 | }
|
7642 | }
|
7643 |
|
7644 | var value = LinkedValueUtils.getValue(props);
|
7645 | var initialValue = value;
|
7646 |
|
7647 |
|
7648 | if (value == null) {
|
7649 | var defaultValue = props.defaultValue;
|
7650 |
|
7651 | var children = props.children;
|
7652 | if (children != null) {
|
7653 | if ("development" !== 'production') {
|
7654 | "development" !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
|
7655 | }
|
7656 | !(defaultValue == null) ? "development" !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
|
7657 | if (Array.isArray(children)) {
|
7658 | !(children.length <= 1) ? "development" !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
|
7659 | children = children[0];
|
7660 | }
|
7661 |
|
7662 | defaultValue = '' + children;
|
7663 | }
|
7664 | if (defaultValue == null) {
|
7665 | defaultValue = '';
|
7666 | }
|
7667 | initialValue = defaultValue;
|
7668 | }
|
7669 |
|
7670 | inst._wrapperState = {
|
7671 | initialValue: '' + initialValue,
|
7672 | listeners: null,
|
7673 | onChange: _handleChange.bind(inst)
|
7674 | };
|
7675 | },
|
7676 |
|
7677 | updateWrapper: function (inst) {
|
7678 | var props = inst._currentElement.props;
|
7679 |
|
7680 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
7681 | var value = LinkedValueUtils.getValue(props);
|
7682 | if (value != null) {
|
7683 |
|
7684 |
|
7685 | var newValue = '' + value;
|
7686 |
|
7687 |
|
7688 | if (newValue !== node.value) {
|
7689 | node.value = newValue;
|
7690 | }
|
7691 | if (props.defaultValue == null) {
|
7692 | node.defaultValue = newValue;
|
7693 | }
|
7694 | }
|
7695 | if (props.defaultValue != null) {
|
7696 | node.defaultValue = props.defaultValue;
|
7697 | }
|
7698 | },
|
7699 |
|
7700 | postMountWrapper: function (inst) {
|
7701 |
|
7702 |
|
7703 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
7704 | var textContent = node.textContent;
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 |
|
7710 | if (textContent === inst._wrapperState.initialValue) {
|
7711 | node.value = textContent;
|
7712 | }
|
7713 | }
|
7714 | };
|
7715 |
|
7716 | function _handleChange(event) {
|
7717 | var props = this._currentElement.props;
|
7718 | var returnValue = LinkedValueUtils.executeOnChange(props, event);
|
7719 | ReactUpdates.asap(forceUpdateIfMounted, this);
|
7720 | return returnValue;
|
7721 | }
|
7722 |
|
7723 | module.exports = ReactDOMTextarea;
|
7724 | },{"116":116,"141":141,"148":148,"149":149,"23":23,"32":32,"75":75}],44:[function(_dereq_,module,exports){
|
7725 |
|
7726 |
|
7727 |
|
7728 |
|
7729 |
|
7730 |
|
7731 |
|
7732 |
|
7733 | 'use strict';
|
7734 |
|
7735 | var _prodInvariant = _dereq_(116);
|
7736 |
|
7737 | var invariant = _dereq_(141);
|
7738 |
|
7739 |
|
7740 |
|
7741 |
|
7742 |
|
7743 | function getLowestCommonAncestor(instA, instB) {
|
7744 | !('_hostNode' in instA) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
7745 | !('_hostNode' in instB) ? "development" !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
|
7746 |
|
7747 | var depthA = 0;
|
7748 | for (var tempA = instA; tempA; tempA = tempA._hostParent) {
|
7749 | depthA++;
|
7750 | }
|
7751 | var depthB = 0;
|
7752 | for (var tempB = instB; tempB; tempB = tempB._hostParent) {
|
7753 | depthB++;
|
7754 | }
|
7755 |
|
7756 |
|
7757 | while (depthA - depthB > 0) {
|
7758 | instA = instA._hostParent;
|
7759 | depthA--;
|
7760 | }
|
7761 |
|
7762 |
|
7763 | while (depthB - depthA > 0) {
|
7764 | instB = instB._hostParent;
|
7765 | depthB--;
|
7766 | }
|
7767 |
|
7768 |
|
7769 | var depth = depthA;
|
7770 | while (depth--) {
|
7771 | if (instA === instB) {
|
7772 | return instA;
|
7773 | }
|
7774 | instA = instA._hostParent;
|
7775 | instB = instB._hostParent;
|
7776 | }
|
7777 | return null;
|
7778 | }
|
7779 |
|
7780 |
|
7781 |
|
7782 |
|
7783 | function isAncestor(instA, instB) {
|
7784 | !('_hostNode' in instA) ? "development" !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
7785 | !('_hostNode' in instB) ? "development" !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
|
7786 |
|
7787 | while (instB) {
|
7788 | if (instB === instA) {
|
7789 | return true;
|
7790 | }
|
7791 | instB = instB._hostParent;
|
7792 | }
|
7793 | return false;
|
7794 | }
|
7795 |
|
7796 |
|
7797 |
|
7798 |
|
7799 | function getParentInstance(inst) {
|
7800 | !('_hostNode' in inst) ? "development" !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
|
7801 |
|
7802 | return inst._hostParent;
|
7803 | }
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 | function traverseTwoPhase(inst, fn, arg) {
|
7809 | var path = [];
|
7810 | while (inst) {
|
7811 | path.push(inst);
|
7812 | inst = inst._hostParent;
|
7813 | }
|
7814 | var i;
|
7815 | for (i = path.length; i-- > 0;) {
|
7816 | fn(path[i], 'captured', arg);
|
7817 | }
|
7818 | for (i = 0; i < path.length; i++) {
|
7819 | fn(path[i], 'bubbled', arg);
|
7820 | }
|
7821 | }
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
|
7831 | var common = from && to ? getLowestCommonAncestor(from, to) : null;
|
7832 | var pathFrom = [];
|
7833 | while (from && from !== common) {
|
7834 | pathFrom.push(from);
|
7835 | from = from._hostParent;
|
7836 | }
|
7837 | var pathTo = [];
|
7838 | while (to && to !== common) {
|
7839 | pathTo.push(to);
|
7840 | to = to._hostParent;
|
7841 | }
|
7842 | var i;
|
7843 | for (i = 0; i < pathFrom.length; i++) {
|
7844 | fn(pathFrom[i], 'bubbled', argFrom);
|
7845 | }
|
7846 | for (i = pathTo.length; i-- > 0;) {
|
7847 | fn(pathTo[i], 'captured', argTo);
|
7848 | }
|
7849 | }
|
7850 |
|
7851 | module.exports = {
|
7852 | isAncestor: isAncestor,
|
7853 | getLowestCommonAncestor: getLowestCommonAncestor,
|
7854 | getParentInstance: getParentInstance,
|
7855 | traverseTwoPhase: traverseTwoPhase,
|
7856 | traverseEnterLeave: traverseEnterLeave
|
7857 | };
|
7858 | },{"116":116,"141":141}],45:[function(_dereq_,module,exports){
|
7859 |
|
7860 |
|
7861 |
|
7862 |
|
7863 |
|
7864 |
|
7865 |
|
7866 |
|
7867 |
|
7868 | 'use strict';
|
7869 |
|
7870 | var ReactInvalidSetStateWarningHook = _dereq_(60);
|
7871 | var ReactHostOperationHistoryHook = _dereq_(55);
|
7872 | var ReactComponentTreeHook = _dereq_(122);
|
7873 | var ExecutionEnvironment = _dereq_(127);
|
7874 |
|
7875 | var performanceNow = _dereq_(146);
|
7876 | var warning = _dereq_(148);
|
7877 |
|
7878 | var hooks = [];
|
7879 | var didHookThrowForEvent = {};
|
7880 |
|
7881 | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
7882 | try {
|
7883 | fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
7884 | } catch (e) {
|
7885 | "development" !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
|
7886 | didHookThrowForEvent[event] = true;
|
7887 | }
|
7888 | }
|
7889 |
|
7890 | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
|
7891 | for (var i = 0; i < hooks.length; i++) {
|
7892 | var hook = hooks[i];
|
7893 | var fn = hook[event];
|
7894 | if (fn) {
|
7895 | callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
7896 | }
|
7897 | }
|
7898 | }
|
7899 |
|
7900 | var isProfiling = false;
|
7901 | var flushHistory = [];
|
7902 | var lifeCycleTimerStack = [];
|
7903 | var currentFlushNesting = 0;
|
7904 | var currentFlushMeasurements = [];
|
7905 | var currentFlushStartTime = 0;
|
7906 | var currentTimerDebugID = null;
|
7907 | var currentTimerStartTime = 0;
|
7908 | var currentTimerNestedFlushDuration = 0;
|
7909 | var currentTimerType = null;
|
7910 |
|
7911 | var lifeCycleTimerHasWarned = false;
|
7912 |
|
7913 | function clearHistory() {
|
7914 | ReactComponentTreeHook.purgeUnmountedComponents();
|
7915 | ReactHostOperationHistoryHook.clearHistory();
|
7916 | }
|
7917 |
|
7918 | function getTreeSnapshot(registeredIDs) {
|
7919 | return registeredIDs.reduce(function (tree, id) {
|
7920 | var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
7921 | var parentID = ReactComponentTreeHook.getParentID(id);
|
7922 | tree[id] = {
|
7923 | displayName: ReactComponentTreeHook.getDisplayName(id),
|
7924 | text: ReactComponentTreeHook.getText(id),
|
7925 | updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
7926 | childIDs: ReactComponentTreeHook.getChildIDs(id),
|
7927 |
|
7928 | ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
|
7929 | parentID: parentID
|
7930 | };
|
7931 | return tree;
|
7932 | }, {});
|
7933 | }
|
7934 |
|
7935 | function resetMeasurements() {
|
7936 | var previousStartTime = currentFlushStartTime;
|
7937 | var previousMeasurements = currentFlushMeasurements;
|
7938 | var previousOperations = ReactHostOperationHistoryHook.getHistory();
|
7939 |
|
7940 | if (currentFlushNesting === 0) {
|
7941 | currentFlushStartTime = 0;
|
7942 | currentFlushMeasurements = [];
|
7943 | clearHistory();
|
7944 | return;
|
7945 | }
|
7946 |
|
7947 | if (previousMeasurements.length || previousOperations.length) {
|
7948 | var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
7949 | flushHistory.push({
|
7950 | duration: performanceNow() - previousStartTime,
|
7951 | measurements: previousMeasurements || [],
|
7952 | operations: previousOperations || [],
|
7953 | treeSnapshot: getTreeSnapshot(registeredIDs)
|
7954 | });
|
7955 | }
|
7956 |
|
7957 | clearHistory();
|
7958 | currentFlushStartTime = performanceNow();
|
7959 | currentFlushMeasurements = [];
|
7960 | }
|
7961 |
|
7962 | function checkDebugID(debugID) {
|
7963 | var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
7964 |
|
7965 | if (allowRoot && debugID === 0) {
|
7966 | return;
|
7967 | }
|
7968 | if (!debugID) {
|
7969 | "development" !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
|
7970 | }
|
7971 | }
|
7972 |
|
7973 | function beginLifeCycleTimer(debugID, timerType) {
|
7974 | if (currentFlushNesting === 0) {
|
7975 | return;
|
7976 | }
|
7977 | if (currentTimerType && !lifeCycleTimerHasWarned) {
|
7978 | "development" !== '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;
|
7979 | lifeCycleTimerHasWarned = true;
|
7980 | }
|
7981 | currentTimerStartTime = performanceNow();
|
7982 | currentTimerNestedFlushDuration = 0;
|
7983 | currentTimerDebugID = debugID;
|
7984 | currentTimerType = timerType;
|
7985 | }
|
7986 |
|
7987 | function endLifeCycleTimer(debugID, timerType) {
|
7988 | if (currentFlushNesting === 0) {
|
7989 | return;
|
7990 | }
|
7991 | if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
|
7992 | "development" !== '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;
|
7993 | lifeCycleTimerHasWarned = true;
|
7994 | }
|
7995 | if (isProfiling) {
|
7996 | currentFlushMeasurements.push({
|
7997 | timerType: timerType,
|
7998 | instanceID: debugID,
|
7999 | duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
8000 | });
|
8001 | }
|
8002 | currentTimerStartTime = 0;
|
8003 | currentTimerNestedFlushDuration = 0;
|
8004 | currentTimerDebugID = null;
|
8005 | currentTimerType = null;
|
8006 | }
|
8007 |
|
8008 | function pauseCurrentLifeCycleTimer() {
|
8009 | var currentTimer = {
|
8010 | startTime: currentTimerStartTime,
|
8011 | nestedFlushStartTime: performanceNow(),
|
8012 | debugID: currentTimerDebugID,
|
8013 | timerType: currentTimerType
|
8014 | };
|
8015 | lifeCycleTimerStack.push(currentTimer);
|
8016 | currentTimerStartTime = 0;
|
8017 | currentTimerNestedFlushDuration = 0;
|
8018 | currentTimerDebugID = null;
|
8019 | currentTimerType = null;
|
8020 | }
|
8021 |
|
8022 | function resumeCurrentLifeCycleTimer() {
|
8023 | var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(),
|
8024 | startTime = _lifeCycleTimerStack$.startTime,
|
8025 | nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime,
|
8026 | debugID = _lifeCycleTimerStack$.debugID,
|
8027 | timerType = _lifeCycleTimerStack$.timerType;
|
8028 |
|
8029 | var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
8030 | currentTimerStartTime = startTime;
|
8031 | currentTimerNestedFlushDuration += nestedFlushDuration;
|
8032 | currentTimerDebugID = debugID;
|
8033 | currentTimerType = timerType;
|
8034 | }
|
8035 |
|
8036 | var lastMarkTimeStamp = 0;
|
8037 | var canUsePerformanceMeasure = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';
|
8038 |
|
8039 | function shouldMark(debugID) {
|
8040 | if (!isProfiling || !canUsePerformanceMeasure) {
|
8041 | return false;
|
8042 | }
|
8043 | var element = ReactComponentTreeHook.getElement(debugID);
|
8044 | if (element == null || typeof element !== 'object') {
|
8045 | return false;
|
8046 | }
|
8047 | var isHostElement = typeof element.type === 'string';
|
8048 | if (isHostElement) {
|
8049 | return false;
|
8050 | }
|
8051 | return true;
|
8052 | }
|
8053 |
|
8054 | function markBegin(debugID, markType) {
|
8055 | if (!shouldMark(debugID)) {
|
8056 | return;
|
8057 | }
|
8058 |
|
8059 | var markName = debugID + '::' + markType;
|
8060 | lastMarkTimeStamp = performanceNow();
|
8061 | performance.mark(markName);
|
8062 | }
|
8063 |
|
8064 | function markEnd(debugID, markType) {
|
8065 | if (!shouldMark(debugID)) {
|
8066 | return;
|
8067 | }
|
8068 |
|
8069 | var markName = debugID + '::' + markType;
|
8070 | var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown';
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 | var timeStamp = performanceNow();
|
8079 | if (timeStamp - lastMarkTimeStamp > 0.1) {
|
8080 | var measurementName = displayName + ' [' + markType + ']';
|
8081 | performance.measure(measurementName, markName);
|
8082 | }
|
8083 |
|
8084 | performance.clearMarks(markName);
|
8085 | if (measurementName) {
|
8086 | performance.clearMeasures(measurementName);
|
8087 | }
|
8088 | }
|
8089 |
|
8090 | var ReactDebugTool = {
|
8091 | addHook: function (hook) {
|
8092 | hooks.push(hook);
|
8093 | },
|
8094 | removeHook: function (hook) {
|
8095 | for (var i = 0; i < hooks.length; i++) {
|
8096 | if (hooks[i] === hook) {
|
8097 | hooks.splice(i, 1);
|
8098 | i--;
|
8099 | }
|
8100 | }
|
8101 | },
|
8102 | isProfiling: function () {
|
8103 | return isProfiling;
|
8104 | },
|
8105 | beginProfiling: function () {
|
8106 | if (isProfiling) {
|
8107 | return;
|
8108 | }
|
8109 |
|
8110 | isProfiling = true;
|
8111 | flushHistory.length = 0;
|
8112 | resetMeasurements();
|
8113 | ReactDebugTool.addHook(ReactHostOperationHistoryHook);
|
8114 | },
|
8115 | endProfiling: function () {
|
8116 | if (!isProfiling) {
|
8117 | return;
|
8118 | }
|
8119 |
|
8120 | isProfiling = false;
|
8121 | resetMeasurements();
|
8122 | ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
|
8123 | },
|
8124 | getFlushHistory: function () {
|
8125 | return flushHistory;
|
8126 | },
|
8127 | onBeginFlush: function () {
|
8128 | currentFlushNesting++;
|
8129 | resetMeasurements();
|
8130 | pauseCurrentLifeCycleTimer();
|
8131 | emitEvent('onBeginFlush');
|
8132 | },
|
8133 | onEndFlush: function () {
|
8134 | resetMeasurements();
|
8135 | currentFlushNesting--;
|
8136 | resumeCurrentLifeCycleTimer();
|
8137 | emitEvent('onEndFlush');
|
8138 | },
|
8139 | onBeginLifeCycleTimer: function (debugID, timerType) {
|
8140 | checkDebugID(debugID);
|
8141 | emitEvent('onBeginLifeCycleTimer', debugID, timerType);
|
8142 | markBegin(debugID, timerType);
|
8143 | beginLifeCycleTimer(debugID, timerType);
|
8144 | },
|
8145 | onEndLifeCycleTimer: function (debugID, timerType) {
|
8146 | checkDebugID(debugID);
|
8147 | endLifeCycleTimer(debugID, timerType);
|
8148 | markEnd(debugID, timerType);
|
8149 | emitEvent('onEndLifeCycleTimer', debugID, timerType);
|
8150 | },
|
8151 | onBeginProcessingChildContext: function () {
|
8152 | emitEvent('onBeginProcessingChildContext');
|
8153 | },
|
8154 | onEndProcessingChildContext: function () {
|
8155 | emitEvent('onEndProcessingChildContext');
|
8156 | },
|
8157 | onHostOperation: function (operation) {
|
8158 | checkDebugID(operation.instanceID);
|
8159 | emitEvent('onHostOperation', operation);
|
8160 | },
|
8161 | onSetState: function () {
|
8162 | emitEvent('onSetState');
|
8163 | },
|
8164 | onSetChildren: function (debugID, childDebugIDs) {
|
8165 | checkDebugID(debugID);
|
8166 | childDebugIDs.forEach(checkDebugID);
|
8167 | emitEvent('onSetChildren', debugID, childDebugIDs);
|
8168 | },
|
8169 | onBeforeMountComponent: function (debugID, element, parentDebugID) {
|
8170 | checkDebugID(debugID);
|
8171 | checkDebugID(parentDebugID, true);
|
8172 | emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
|
8173 | markBegin(debugID, 'mount');
|
8174 | },
|
8175 | onMountComponent: function (debugID) {
|
8176 | checkDebugID(debugID);
|
8177 | markEnd(debugID, 'mount');
|
8178 | emitEvent('onMountComponent', debugID);
|
8179 | },
|
8180 | onBeforeUpdateComponent: function (debugID, element) {
|
8181 | checkDebugID(debugID);
|
8182 | emitEvent('onBeforeUpdateComponent', debugID, element);
|
8183 | markBegin(debugID, 'update');
|
8184 | },
|
8185 | onUpdateComponent: function (debugID) {
|
8186 | checkDebugID(debugID);
|
8187 | markEnd(debugID, 'update');
|
8188 | emitEvent('onUpdateComponent', debugID);
|
8189 | },
|
8190 | onBeforeUnmountComponent: function (debugID) {
|
8191 | checkDebugID(debugID);
|
8192 | emitEvent('onBeforeUnmountComponent', debugID);
|
8193 | markBegin(debugID, 'unmount');
|
8194 | },
|
8195 | onUnmountComponent: function (debugID) {
|
8196 | checkDebugID(debugID);
|
8197 | markEnd(debugID, 'unmount');
|
8198 | emitEvent('onUnmountComponent', debugID);
|
8199 | },
|
8200 | onTestEvent: function () {
|
8201 | emitEvent('onTestEvent');
|
8202 | }
|
8203 | };
|
8204 |
|
8205 |
|
8206 | ReactDebugTool.addDevtool = ReactDebugTool.addHook;
|
8207 | ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
|
8208 |
|
8209 | ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
|
8210 | ReactDebugTool.addHook(ReactComponentTreeHook);
|
8211 | var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
|
8212 | if (/[?&]react_perf\b/.test(url)) {
|
8213 | ReactDebugTool.beginProfiling();
|
8214 | }
|
8215 |
|
8216 | module.exports = ReactDebugTool;
|
8217 | },{"122":122,"127":127,"146":146,"148":148,"55":55,"60":60}],46:[function(_dereq_,module,exports){
|
8218 |
|
8219 |
|
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 | 'use strict';
|
8227 |
|
8228 | var _assign = _dereq_(149);
|
8229 |
|
8230 | var ReactUpdates = _dereq_(75);
|
8231 | var Transaction = _dereq_(93);
|
8232 |
|
8233 | var emptyFunction = _dereq_(133);
|
8234 |
|
8235 | var RESET_BATCHED_UPDATES = {
|
8236 | initialize: emptyFunction,
|
8237 | close: function () {
|
8238 | ReactDefaultBatchingStrategy.isBatchingUpdates = false;
|
8239 | }
|
8240 | };
|
8241 |
|
8242 | var FLUSH_BATCHED_UPDATES = {
|
8243 | initialize: emptyFunction,
|
8244 | close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
|
8245 | };
|
8246 |
|
8247 | var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
|
8248 |
|
8249 | function ReactDefaultBatchingStrategyTransaction() {
|
8250 | this.reinitializeTransaction();
|
8251 | }
|
8252 |
|
8253 | _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction, {
|
8254 | getTransactionWrappers: function () {
|
8255 | return TRANSACTION_WRAPPERS;
|
8256 | }
|
8257 | });
|
8258 |
|
8259 | var transaction = new ReactDefaultBatchingStrategyTransaction();
|
8260 |
|
8261 | var ReactDefaultBatchingStrategy = {
|
8262 | isBatchingUpdates: false,
|
8263 |
|
8264 | |
8265 |
|
8266 |
|
8267 |
|
8268 | batchedUpdates: function (callback, a, b, c, d, e) {
|
8269 | var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
|
8270 |
|
8271 | ReactDefaultBatchingStrategy.isBatchingUpdates = true;
|
8272 |
|
8273 |
|
8274 | if (alreadyBatchingUpdates) {
|
8275 | return callback(a, b, c, d, e);
|
8276 | } else {
|
8277 | return transaction.perform(callback, null, a, b, c, d, e);
|
8278 | }
|
8279 | }
|
8280 | };
|
8281 |
|
8282 | module.exports = ReactDefaultBatchingStrategy;
|
8283 | },{"133":133,"149":149,"75":75,"93":93}],47:[function(_dereq_,module,exports){
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 |
|
8291 |
|
8292 | 'use strict';
|
8293 |
|
8294 | var ARIADOMPropertyConfig = _dereq_(1);
|
8295 | var BeforeInputEventPlugin = _dereq_(3);
|
8296 | var ChangeEventPlugin = _dereq_(7);
|
8297 | var DefaultEventPluginOrder = _dereq_(14);
|
8298 | var EnterLeaveEventPlugin = _dereq_(15);
|
8299 | var HTMLDOMPropertyConfig = _dereq_(21);
|
8300 | var ReactComponentBrowserEnvironment = _dereq_(27);
|
8301 | var ReactDOMComponent = _dereq_(30);
|
8302 | var ReactDOMComponentTree = _dereq_(32);
|
8303 | var ReactDOMEmptyComponent = _dereq_(34);
|
8304 | var ReactDOMTreeTraversal = _dereq_(44);
|
8305 | var ReactDOMTextComponent = _dereq_(42);
|
8306 | var ReactDefaultBatchingStrategy = _dereq_(46);
|
8307 | var ReactEventListener = _dereq_(52);
|
8308 | var ReactInjection = _dereq_(56);
|
8309 | var ReactReconcileTransaction = _dereq_(67);
|
8310 | var SVGDOMPropertyConfig = _dereq_(77);
|
8311 | var SelectEventPlugin = _dereq_(78);
|
8312 | var SimpleEventPlugin = _dereq_(79);
|
8313 |
|
8314 | var alreadyInjected = false;
|
8315 |
|
8316 | function inject() {
|
8317 | if (alreadyInjected) {
|
8318 |
|
8319 |
|
8320 |
|
8321 | return;
|
8322 | }
|
8323 | alreadyInjected = true;
|
8324 |
|
8325 | ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
|
8326 |
|
8327 | |
8328 |
|
8329 |
|
8330 | ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
|
8331 | ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
|
8332 | ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
|
8333 |
|
8334 | |
8335 |
|
8336 |
|
8337 |
|
8338 | ReactInjection.EventPluginHub.injectEventPluginsByName({
|
8339 | SimpleEventPlugin: SimpleEventPlugin,
|
8340 | EnterLeaveEventPlugin: EnterLeaveEventPlugin,
|
8341 | ChangeEventPlugin: ChangeEventPlugin,
|
8342 | SelectEventPlugin: SelectEventPlugin,
|
8343 | BeforeInputEventPlugin: BeforeInputEventPlugin
|
8344 | });
|
8345 |
|
8346 | ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
|
8347 |
|
8348 | ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
|
8349 |
|
8350 | ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig);
|
8351 | ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
|
8352 | ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
|
8353 |
|
8354 | ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
|
8355 | return new ReactDOMEmptyComponent(instantiate);
|
8356 | });
|
8357 |
|
8358 | ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
|
8359 | ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
8360 |
|
8361 | ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
|
8362 | }
|
8363 |
|
8364 | module.exports = {
|
8365 | inject: inject
|
8366 | };
|
8367 | },{"1":1,"14":14,"15":15,"21":21,"27":27,"3":3,"30":30,"32":32,"34":34,"42":42,"44":44,"46":46,"52":52,"56":56,"67":67,"7":7,"77":77,"78":78,"79":79}],48:[function(_dereq_,module,exports){
|
8368 |
|
8369 |
|
8370 |
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 |
|
8376 |
|
8377 | 'use strict';
|
8378 |
|
8379 |
|
8380 |
|
8381 |
|
8382 | var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
8383 |
|
8384 | module.exports = REACT_ELEMENT_TYPE;
|
8385 | },{}],49:[function(_dereq_,module,exports){
|
8386 |
|
8387 |
|
8388 |
|
8389 |
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 | 'use strict';
|
8395 |
|
8396 | var emptyComponentFactory;
|
8397 |
|
8398 | var ReactEmptyComponentInjection = {
|
8399 | injectEmptyComponentFactory: function (factory) {
|
8400 | emptyComponentFactory = factory;
|
8401 | }
|
8402 | };
|
8403 |
|
8404 | var ReactEmptyComponent = {
|
8405 | create: function (instantiate) {
|
8406 | return emptyComponentFactory(instantiate);
|
8407 | }
|
8408 | };
|
8409 |
|
8410 | ReactEmptyComponent.injection = ReactEmptyComponentInjection;
|
8411 |
|
8412 | module.exports = ReactEmptyComponent;
|
8413 | },{}],50:[function(_dereq_,module,exports){
|
8414 |
|
8415 |
|
8416 |
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 | 'use strict';
|
8424 |
|
8425 | var caughtError = null;
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 |
|
8432 |
|
8433 |
|
8434 |
|
8435 | function invokeGuardedCallback(name, func, a) {
|
8436 | try {
|
8437 | func(a);
|
8438 | } catch (x) {
|
8439 | if (caughtError === null) {
|
8440 | caughtError = x;
|
8441 | }
|
8442 | }
|
8443 | }
|
8444 |
|
8445 | var ReactErrorUtils = {
|
8446 | invokeGuardedCallback: invokeGuardedCallback,
|
8447 |
|
8448 | |
8449 |
|
8450 |
|
8451 |
|
8452 | invokeGuardedCallbackWithCatch: invokeGuardedCallback,
|
8453 |
|
8454 | |
8455 |
|
8456 |
|
8457 |
|
8458 | rethrowCaughtError: function () {
|
8459 | if (caughtError) {
|
8460 | var error = caughtError;
|
8461 | caughtError = null;
|
8462 | throw error;
|
8463 | }
|
8464 | }
|
8465 | };
|
8466 |
|
8467 | if ("development" !== 'production') {
|
8468 | |
8469 |
|
8470 |
|
8471 |
|
8472 | if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
|
8473 | var fakeNode = document.createElement('react');
|
8474 | ReactErrorUtils.invokeGuardedCallback = function (name, func, a) {
|
8475 | var boundFunc = function () {
|
8476 | func(a);
|
8477 | };
|
8478 | var evtType = 'react-' + name;
|
8479 | fakeNode.addEventListener(evtType, boundFunc, false);
|
8480 | var evt = document.createEvent('Event');
|
8481 | evt.initEvent(evtType, false, false);
|
8482 | fakeNode.dispatchEvent(evt);
|
8483 | fakeNode.removeEventListener(evtType, boundFunc, false);
|
8484 | };
|
8485 | }
|
8486 | }
|
8487 |
|
8488 | module.exports = ReactErrorUtils;
|
8489 | },{}],51:[function(_dereq_,module,exports){
|
8490 |
|
8491 |
|
8492 |
|
8493 |
|
8494 |
|
8495 |
|
8496 |
|
8497 |
|
8498 | 'use strict';
|
8499 |
|
8500 | var EventPluginHub = _dereq_(16);
|
8501 |
|
8502 | function runEventQueueInBatch(events) {
|
8503 | EventPluginHub.enqueueEvents(events);
|
8504 | EventPluginHub.processEventQueue(false);
|
8505 | }
|
8506 |
|
8507 | var ReactEventEmitterMixin = {
|
8508 | |
8509 |
|
8510 |
|
8511 |
|
8512 | handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
8513 | var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
|
8514 | runEventQueueInBatch(events);
|
8515 | }
|
8516 | };
|
8517 |
|
8518 | module.exports = ReactEventEmitterMixin;
|
8519 | },{"16":16}],52:[function(_dereq_,module,exports){
|
8520 |
|
8521 |
|
8522 |
|
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 | 'use strict';
|
8529 |
|
8530 | var _assign = _dereq_(149);
|
8531 |
|
8532 | var EventListener = _dereq_(126);
|
8533 | var ExecutionEnvironment = _dereq_(127);
|
8534 | var PooledClass = _dereq_(24);
|
8535 | var ReactDOMComponentTree = _dereq_(32);
|
8536 | var ReactUpdates = _dereq_(75);
|
8537 |
|
8538 | var getEventTarget = _dereq_(106);
|
8539 | var getUnboundedScrollPosition = _dereq_(138);
|
8540 |
|
8541 |
|
8542 |
|
8543 |
|
8544 |
|
8545 |
|
8546 | function findParent(inst) {
|
8547 |
|
8548 |
|
8549 |
|
8550 | while (inst._hostParent) {
|
8551 | inst = inst._hostParent;
|
8552 | }
|
8553 | var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
|
8554 | var container = rootNode.parentNode;
|
8555 | return ReactDOMComponentTree.getClosestInstanceFromNode(container);
|
8556 | }
|
8557 |
|
8558 |
|
8559 | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
|
8560 | this.topLevelType = topLevelType;
|
8561 | this.nativeEvent = nativeEvent;
|
8562 | this.ancestors = [];
|
8563 | }
|
8564 | _assign(TopLevelCallbackBookKeeping.prototype, {
|
8565 | destructor: function () {
|
8566 | this.topLevelType = null;
|
8567 | this.nativeEvent = null;
|
8568 | this.ancestors.length = 0;
|
8569 | }
|
8570 | });
|
8571 | PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
|
8572 |
|
8573 | function handleTopLevelImpl(bookKeeping) {
|
8574 | var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
|
8575 | var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
|
8576 |
|
8577 |
|
8578 |
|
8579 |
|
8580 |
|
8581 | var ancestor = targetInst;
|
8582 | do {
|
8583 | bookKeeping.ancestors.push(ancestor);
|
8584 | ancestor = ancestor && findParent(ancestor);
|
8585 | } while (ancestor);
|
8586 |
|
8587 | for (var i = 0; i < bookKeeping.ancestors.length; i++) {
|
8588 | targetInst = bookKeeping.ancestors[i];
|
8589 | ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
|
8590 | }
|
8591 | }
|
8592 |
|
8593 | function scrollValueMonitor(cb) {
|
8594 | var scrollPosition = getUnboundedScrollPosition(window);
|
8595 | cb(scrollPosition);
|
8596 | }
|
8597 |
|
8598 | var ReactEventListener = {
|
8599 | _enabled: true,
|
8600 | _handleTopLevel: null,
|
8601 |
|
8602 | WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
|
8603 |
|
8604 | setHandleTopLevel: function (handleTopLevel) {
|
8605 | ReactEventListener._handleTopLevel = handleTopLevel;
|
8606 | },
|
8607 |
|
8608 | setEnabled: function (enabled) {
|
8609 | ReactEventListener._enabled = !!enabled;
|
8610 | },
|
8611 |
|
8612 | isEnabled: function () {
|
8613 | return ReactEventListener._enabled;
|
8614 | },
|
8615 |
|
8616 | |
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 | trapBubbledEvent: function (topLevelType, handlerBaseName, element) {
|
8627 | if (!element) {
|
8628 | return null;
|
8629 | }
|
8630 | return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
8631 | },
|
8632 |
|
8633 | |
8634 |
|
8635 |
|
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 | trapCapturedEvent: function (topLevelType, handlerBaseName, element) {
|
8644 | if (!element) {
|
8645 | return null;
|
8646 | }
|
8647 | return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
|
8648 | },
|
8649 |
|
8650 | monitorScrollValue: function (refresh) {
|
8651 | var callback = scrollValueMonitor.bind(null, refresh);
|
8652 | EventListener.listen(window, 'scroll', callback);
|
8653 | },
|
8654 |
|
8655 | dispatchEvent: function (topLevelType, nativeEvent) {
|
8656 | if (!ReactEventListener._enabled) {
|
8657 | return;
|
8658 | }
|
8659 |
|
8660 | var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
|
8661 | try {
|
8662 |
|
8663 |
|
8664 | ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
|
8665 | } finally {
|
8666 | TopLevelCallbackBookKeeping.release(bookKeeping);
|
8667 | }
|
8668 | }
|
8669 | };
|
8670 |
|
8671 | module.exports = ReactEventListener;
|
8672 | },{"106":106,"126":126,"127":127,"138":138,"149":149,"24":24,"32":32,"75":75}],53:[function(_dereq_,module,exports){
|
8673 |
|
8674 |
|
8675 |
|
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 | 'use strict';
|
8683 |
|
8684 | var ReactFeatureFlags = {
|
8685 |
|
8686 |
|
8687 |
|
8688 | logTopLevelRenders: false
|
8689 | };
|
8690 |
|
8691 | module.exports = ReactFeatureFlags;
|
8692 | },{}],54:[function(_dereq_,module,exports){
|
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 | 'use strict';
|
8702 |
|
8703 | var _prodInvariant = _dereq_(116);
|
8704 |
|
8705 | var invariant = _dereq_(141);
|
8706 |
|
8707 | var genericComponentClass = null;
|
8708 | var textComponentClass = null;
|
8709 |
|
8710 | var ReactHostComponentInjection = {
|
8711 |
|
8712 |
|
8713 | injectGenericComponentClass: function (componentClass) {
|
8714 | genericComponentClass = componentClass;
|
8715 | },
|
8716 |
|
8717 |
|
8718 | injectTextComponentClass: function (componentClass) {
|
8719 | textComponentClass = componentClass;
|
8720 | }
|
8721 | };
|
8722 |
|
8723 |
|
8724 |
|
8725 |
|
8726 |
|
8727 |
|
8728 |
|
8729 | function createInternalComponent(element) {
|
8730 | !genericComponentClass ? "development" !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
|
8731 | return new genericComponentClass(element);
|
8732 | }
|
8733 |
|
8734 |
|
8735 |
|
8736 |
|
8737 |
|
8738 | function createInstanceForText(text) {
|
8739 | return new textComponentClass(text);
|
8740 | }
|
8741 |
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 | function isTextComponent(component) {
|
8747 | return component instanceof textComponentClass;
|
8748 | }
|
8749 |
|
8750 | var ReactHostComponent = {
|
8751 | createInternalComponent: createInternalComponent,
|
8752 | createInstanceForText: createInstanceForText,
|
8753 | isTextComponent: isTextComponent,
|
8754 | injection: ReactHostComponentInjection
|
8755 | };
|
8756 |
|
8757 | module.exports = ReactHostComponent;
|
8758 | },{"116":116,"141":141}],55:[function(_dereq_,module,exports){
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 |
|
8764 |
|
8765 |
|
8766 |
|
8767 |
|
8768 | 'use strict';
|
8769 |
|
8770 | var history = [];
|
8771 |
|
8772 | var ReactHostOperationHistoryHook = {
|
8773 | onHostOperation: function (operation) {
|
8774 | history.push(operation);
|
8775 | },
|
8776 | clearHistory: function () {
|
8777 | if (ReactHostOperationHistoryHook._preventClearing) {
|
8778 |
|
8779 | return;
|
8780 | }
|
8781 |
|
8782 | history = [];
|
8783 | },
|
8784 | getHistory: function () {
|
8785 | return history;
|
8786 | }
|
8787 | };
|
8788 |
|
8789 | module.exports = ReactHostOperationHistoryHook;
|
8790 | },{}],56:[function(_dereq_,module,exports){
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 |
|
8796 |
|
8797 |
|
8798 |
|
8799 | 'use strict';
|
8800 |
|
8801 | var DOMProperty = _dereq_(11);
|
8802 | var EventPluginHub = _dereq_(16);
|
8803 | var EventPluginUtils = _dereq_(18);
|
8804 | var ReactComponentEnvironment = _dereq_(28);
|
8805 | var ReactEmptyComponent = _dereq_(49);
|
8806 | var ReactBrowserEventEmitter = _dereq_(25);
|
8807 | var ReactHostComponent = _dereq_(54);
|
8808 | var ReactUpdates = _dereq_(75);
|
8809 |
|
8810 | var ReactInjection = {
|
8811 | Component: ReactComponentEnvironment.injection,
|
8812 | DOMProperty: DOMProperty.injection,
|
8813 | EmptyComponent: ReactEmptyComponent.injection,
|
8814 | EventPluginHub: EventPluginHub.injection,
|
8815 | EventPluginUtils: EventPluginUtils.injection,
|
8816 | EventEmitter: ReactBrowserEventEmitter.injection,
|
8817 | HostComponent: ReactHostComponent.injection,
|
8818 | Updates: ReactUpdates.injection
|
8819 | };
|
8820 |
|
8821 | module.exports = ReactInjection;
|
8822 | },{"11":11,"16":16,"18":18,"25":25,"28":28,"49":49,"54":54,"75":75}],57:[function(_dereq_,module,exports){
|
8823 |
|
8824 |
|
8825 |
|
8826 |
|
8827 |
|
8828 |
|
8829 |
|
8830 |
|
8831 | 'use strict';
|
8832 |
|
8833 | var ReactDOMSelection = _dereq_(39);
|
8834 |
|
8835 | var containsNode = _dereq_(130);
|
8836 | var focusNode = _dereq_(135);
|
8837 | var getActiveElement = _dereq_(136);
|
8838 |
|
8839 | function isInDocument(node) {
|
8840 | return containsNode(document.documentElement, node);
|
8841 | }
|
8842 |
|
8843 |
|
8844 |
|
8845 |
|
8846 |
|
8847 |
|
8848 |
|
8849 | var ReactInputSelection = {
|
8850 | hasSelectionCapabilities: function (elem) {
|
8851 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
8852 | return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
|
8853 | },
|
8854 |
|
8855 | getSelectionInformation: function () {
|
8856 | var focusedElem = getActiveElement();
|
8857 | return {
|
8858 | focusedElem: focusedElem,
|
8859 | selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
|
8860 | };
|
8861 | },
|
8862 |
|
8863 | |
8864 |
|
8865 |
|
8866 |
|
8867 |
|
8868 | restoreSelection: function (priorSelectionInformation) {
|
8869 | var curFocusedElem = getActiveElement();
|
8870 | var priorFocusedElem = priorSelectionInformation.focusedElem;
|
8871 | var priorSelectionRange = priorSelectionInformation.selectionRange;
|
8872 | if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
|
8873 | if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
|
8874 | ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
|
8875 | }
|
8876 | focusNode(priorFocusedElem);
|
8877 | }
|
8878 | },
|
8879 |
|
8880 | |
8881 |
|
8882 |
|
8883 |
|
8884 |
|
8885 |
|
8886 | getSelection: function (input) {
|
8887 | var selection;
|
8888 |
|
8889 | if ('selectionStart' in input) {
|
8890 |
|
8891 | selection = {
|
8892 | start: input.selectionStart,
|
8893 | end: input.selectionEnd
|
8894 | };
|
8895 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
8896 |
|
8897 | var range = document.selection.createRange();
|
8898 |
|
8899 |
|
8900 | if (range.parentElement() === input) {
|
8901 | selection = {
|
8902 | start: -range.moveStart('character', -input.value.length),
|
8903 | end: -range.moveEnd('character', -input.value.length)
|
8904 | };
|
8905 | }
|
8906 | } else {
|
8907 |
|
8908 | selection = ReactDOMSelection.getOffsets(input);
|
8909 | }
|
8910 |
|
8911 | return selection || { start: 0, end: 0 };
|
8912 | },
|
8913 |
|
8914 | |
8915 |
|
8916 |
|
8917 |
|
8918 |
|
8919 |
|
8920 | setSelection: function (input, offsets) {
|
8921 | var start = offsets.start;
|
8922 | var end = offsets.end;
|
8923 | if (end === undefined) {
|
8924 | end = start;
|
8925 | }
|
8926 |
|
8927 | if ('selectionStart' in input) {
|
8928 | input.selectionStart = start;
|
8929 | input.selectionEnd = Math.min(end, input.value.length);
|
8930 | } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
|
8931 | var range = input.createTextRange();
|
8932 | range.collapse(true);
|
8933 | range.moveStart('character', start);
|
8934 | range.moveEnd('character', end - start);
|
8935 | range.select();
|
8936 | } else {
|
8937 | ReactDOMSelection.setOffsets(input, offsets);
|
8938 | }
|
8939 | }
|
8940 | };
|
8941 |
|
8942 | module.exports = ReactInputSelection;
|
8943 | },{"130":130,"135":135,"136":136,"39":39}],58:[function(_dereq_,module,exports){
|
8944 |
|
8945 |
|
8946 |
|
8947 |
|
8948 |
|
8949 |
|
8950 |
|
8951 |
|
8952 | 'use strict';
|
8953 |
|
8954 |
|
8955 |
|
8956 |
|
8957 |
|
8958 |
|
8959 |
|
8960 |
|
8961 |
|
8962 |
|
8963 | var ReactInstanceMap = {
|
8964 | |
8965 |
|
8966 |
|
8967 |
|
8968 |
|
8969 | remove: function (key) {
|
8970 | key._reactInternalInstance = undefined;
|
8971 | },
|
8972 |
|
8973 | get: function (key) {
|
8974 | return key._reactInternalInstance;
|
8975 | },
|
8976 |
|
8977 | has: function (key) {
|
8978 | return key._reactInternalInstance !== undefined;
|
8979 | },
|
8980 |
|
8981 | set: function (key, value) {
|
8982 | key._reactInternalInstance = value;
|
8983 | }
|
8984 | };
|
8985 |
|
8986 | module.exports = ReactInstanceMap;
|
8987 | },{}],59:[function(_dereq_,module,exports){
|
8988 |
|
8989 |
|
8990 |
|
8991 |
|
8992 |
|
8993 |
|
8994 |
|
8995 |
|
8996 |
|
8997 | 'use strict';
|
8998 |
|
8999 |
|
9000 |
|
9001 | var debugTool = null;
|
9002 |
|
9003 | if ("development" !== 'production') {
|
9004 | var ReactDebugTool = _dereq_(45);
|
9005 | debugTool = ReactDebugTool;
|
9006 | }
|
9007 |
|
9008 | module.exports = { debugTool: debugTool };
|
9009 | },{"45":45}],60:[function(_dereq_,module,exports){
|
9010 |
|
9011 |
|
9012 |
|
9013 |
|
9014 |
|
9015 |
|
9016 |
|
9017 |
|
9018 |
|
9019 | 'use strict';
|
9020 |
|
9021 | var warning = _dereq_(148);
|
9022 |
|
9023 | if ("development" !== 'production') {
|
9024 | var processingChildContext = false;
|
9025 |
|
9026 | var warnInvalidSetState = function () {
|
9027 | "development" !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
|
9028 | };
|
9029 | }
|
9030 |
|
9031 | var ReactInvalidSetStateWarningHook = {
|
9032 | onBeginProcessingChildContext: function () {
|
9033 | processingChildContext = true;
|
9034 | },
|
9035 | onEndProcessingChildContext: function () {
|
9036 | processingChildContext = false;
|
9037 | },
|
9038 | onSetState: function () {
|
9039 | warnInvalidSetState();
|
9040 | }
|
9041 | };
|
9042 |
|
9043 | module.exports = ReactInvalidSetStateWarningHook;
|
9044 | },{"148":148}],61:[function(_dereq_,module,exports){
|
9045 |
|
9046 |
|
9047 |
|
9048 |
|
9049 |
|
9050 |
|
9051 |
|
9052 |
|
9053 | 'use strict';
|
9054 |
|
9055 | var adler32 = _dereq_(96);
|
9056 |
|
9057 | var TAG_END = /\/?>/;
|
9058 | var COMMENT_START = /^<\!\-\-/;
|
9059 |
|
9060 | var ReactMarkupChecksum = {
|
9061 | CHECKSUM_ATTR_NAME: 'data-react-checksum',
|
9062 |
|
9063 | |
9064 |
|
9065 |
|
9066 |
|
9067 | addChecksumToMarkup: function (markup) {
|
9068 | var checksum = adler32(markup);
|
9069 |
|
9070 |
|
9071 | if (COMMENT_START.test(markup)) {
|
9072 | return markup;
|
9073 | } else {
|
9074 | return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
|
9075 | }
|
9076 | },
|
9077 |
|
9078 | |
9079 |
|
9080 |
|
9081 |
|
9082 |
|
9083 | canReuseMarkup: function (markup, element) {
|
9084 | var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
|
9085 | existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
|
9086 | var markupChecksum = adler32(markup);
|
9087 | return markupChecksum === existingChecksum;
|
9088 | }
|
9089 | };
|
9090 |
|
9091 | module.exports = ReactMarkupChecksum;
|
9092 | },{"96":96}],62:[function(_dereq_,module,exports){
|
9093 |
|
9094 |
|
9095 |
|
9096 |
|
9097 |
|
9098 |
|
9099 |
|
9100 |
|
9101 | 'use strict';
|
9102 |
|
9103 | var _prodInvariant = _dereq_(116);
|
9104 |
|
9105 | var ReactComponentEnvironment = _dereq_(28);
|
9106 | var ReactInstanceMap = _dereq_(58);
|
9107 | var ReactInstrumentation = _dereq_(59);
|
9108 |
|
9109 | var ReactCurrentOwner = _dereq_(123);
|
9110 | var ReactReconciler = _dereq_(68);
|
9111 | var ReactChildReconciler = _dereq_(26);
|
9112 |
|
9113 | var emptyFunction = _dereq_(133);
|
9114 | var flattenChildren = _dereq_(101);
|
9115 | var invariant = _dereq_(141);
|
9116 |
|
9117 |
|
9118 |
|
9119 |
|
9120 |
|
9121 |
|
9122 |
|
9123 |
|
9124 | function makeInsertMarkup(markup, afterNode, toIndex) {
|
9125 |
|
9126 | return {
|
9127 | type: 'INSERT_MARKUP',
|
9128 | content: markup,
|
9129 | fromIndex: null,
|
9130 | fromNode: null,
|
9131 | toIndex: toIndex,
|
9132 | afterNode: afterNode
|
9133 | };
|
9134 | }
|
9135 |
|
9136 |
|
9137 |
|
9138 |
|
9139 |
|
9140 |
|
9141 |
|
9142 |
|
9143 | function makeMove(child, afterNode, toIndex) {
|
9144 |
|
9145 | return {
|
9146 | type: 'MOVE_EXISTING',
|
9147 | content: null,
|
9148 | fromIndex: child._mountIndex,
|
9149 | fromNode: ReactReconciler.getHostNode(child),
|
9150 | toIndex: toIndex,
|
9151 | afterNode: afterNode
|
9152 | };
|
9153 | }
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 |
|
9160 |
|
9161 | function makeRemove(child, node) {
|
9162 |
|
9163 | return {
|
9164 | type: 'REMOVE_NODE',
|
9165 | content: null,
|
9166 | fromIndex: child._mountIndex,
|
9167 | fromNode: node,
|
9168 | toIndex: null,
|
9169 | afterNode: null
|
9170 | };
|
9171 | }
|
9172 |
|
9173 |
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 | function makeSetMarkup(markup) {
|
9180 |
|
9181 | return {
|
9182 | type: 'SET_MARKUP',
|
9183 | content: markup,
|
9184 | fromIndex: null,
|
9185 | fromNode: null,
|
9186 | toIndex: null,
|
9187 | afterNode: null
|
9188 | };
|
9189 | }
|
9190 |
|
9191 |
|
9192 |
|
9193 |
|
9194 |
|
9195 |
|
9196 |
|
9197 | function makeTextContent(textContent) {
|
9198 |
|
9199 | return {
|
9200 | type: 'TEXT_CONTENT',
|
9201 | content: textContent,
|
9202 | fromIndex: null,
|
9203 | fromNode: null,
|
9204 | toIndex: null,
|
9205 | afterNode: null
|
9206 | };
|
9207 | }
|
9208 |
|
9209 |
|
9210 |
|
9211 |
|
9212 |
|
9213 | function enqueue(queue, update) {
|
9214 | if (update) {
|
9215 | queue = queue || [];
|
9216 | queue.push(update);
|
9217 | }
|
9218 | return queue;
|
9219 | }
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 |
|
9226 | function processQueue(inst, updateQueue) {
|
9227 | ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
|
9228 | }
|
9229 |
|
9230 | var setChildrenForInstrumentation = emptyFunction;
|
9231 | if ("development" !== 'production') {
|
9232 | var getDebugID = function (inst) {
|
9233 | if (!inst._debugID) {
|
9234 |
|
9235 | var internal;
|
9236 | if (internal = ReactInstanceMap.get(inst)) {
|
9237 | inst = internal;
|
9238 | }
|
9239 | }
|
9240 | return inst._debugID;
|
9241 | };
|
9242 | setChildrenForInstrumentation = function (children) {
|
9243 | var debugID = getDebugID(this);
|
9244 |
|
9245 |
|
9246 | if (debugID !== 0) {
|
9247 | ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
|
9248 | return children[key]._debugID;
|
9249 | }) : []);
|
9250 | }
|
9251 | };
|
9252 | }
|
9253 |
|
9254 |
|
9255 |
|
9256 |
|
9257 |
|
9258 |
|
9259 |
|
9260 | var ReactMultiChild = {
|
9261 | |
9262 |
|
9263 |
|
9264 |
|
9265 |
|
9266 |
|
9267 |
|
9268 | Mixin: {
|
9269 | _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
|
9270 | if ("development" !== 'production') {
|
9271 | var selfDebugID = getDebugID(this);
|
9272 | if (this._currentElement) {
|
9273 | try {
|
9274 | ReactCurrentOwner.current = this._currentElement._owner;
|
9275 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
|
9276 | } finally {
|
9277 | ReactCurrentOwner.current = null;
|
9278 | }
|
9279 | }
|
9280 | }
|
9281 | return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
|
9282 | },
|
9283 |
|
9284 | _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
|
9285 | var nextChildren;
|
9286 | var selfDebugID = 0;
|
9287 | if ("development" !== 'production') {
|
9288 | selfDebugID = getDebugID(this);
|
9289 | if (this._currentElement) {
|
9290 | try {
|
9291 | ReactCurrentOwner.current = this._currentElement._owner;
|
9292 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
9293 | } finally {
|
9294 | ReactCurrentOwner.current = null;
|
9295 | }
|
9296 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
9297 | return nextChildren;
|
9298 | }
|
9299 | }
|
9300 | nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
|
9301 | ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
9302 | return nextChildren;
|
9303 | },
|
9304 |
|
9305 | |
9306 |
|
9307 |
|
9308 |
|
9309 |
|
9310 |
|
9311 |
|
9312 |
|
9313 | mountChildren: function (nestedChildren, transaction, context) {
|
9314 | var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
|
9315 | this._renderedChildren = children;
|
9316 |
|
9317 | var mountImages = [];
|
9318 | var index = 0;
|
9319 | for (var name in children) {
|
9320 | if (children.hasOwnProperty(name)) {
|
9321 | var child = children[name];
|
9322 | var selfDebugID = 0;
|
9323 | if ("development" !== 'production') {
|
9324 | selfDebugID = getDebugID(this);
|
9325 | }
|
9326 | var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
|
9327 | child._mountIndex = index++;
|
9328 | mountImages.push(mountImage);
|
9329 | }
|
9330 | }
|
9331 |
|
9332 | if ("development" !== 'production') {
|
9333 | setChildrenForInstrumentation.call(this, children);
|
9334 | }
|
9335 |
|
9336 | return mountImages;
|
9337 | },
|
9338 |
|
9339 | |
9340 |
|
9341 |
|
9342 |
|
9343 |
|
9344 |
|
9345 | updateTextContent: function (nextContent) {
|
9346 | var prevChildren = this._renderedChildren;
|
9347 |
|
9348 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
9349 | for (var name in prevChildren) {
|
9350 | if (prevChildren.hasOwnProperty(name)) {
|
9351 | !false ? "development" !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
9352 | }
|
9353 | }
|
9354 |
|
9355 | var updates = [makeTextContent(nextContent)];
|
9356 | processQueue(this, updates);
|
9357 | },
|
9358 |
|
9359 | |
9360 |
|
9361 |
|
9362 |
|
9363 |
|
9364 |
|
9365 | updateMarkup: function (nextMarkup) {
|
9366 | var prevChildren = this._renderedChildren;
|
9367 |
|
9368 | ReactChildReconciler.unmountChildren(prevChildren, false);
|
9369 | for (var name in prevChildren) {
|
9370 | if (prevChildren.hasOwnProperty(name)) {
|
9371 | !false ? "development" !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
|
9372 | }
|
9373 | }
|
9374 | var updates = [makeSetMarkup(nextMarkup)];
|
9375 | processQueue(this, updates);
|
9376 | },
|
9377 |
|
9378 | |
9379 |
|
9380 |
|
9381 |
|
9382 |
|
9383 |
|
9384 |
|
9385 | updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
9386 |
|
9387 | this._updateChildren(nextNestedChildrenElements, transaction, context);
|
9388 | },
|
9389 |
|
9390 | |
9391 |
|
9392 |
|
9393 |
|
9394 |
|
9395 |
|
9396 | _updateChildren: function (nextNestedChildrenElements, transaction, context) {
|
9397 | var prevChildren = this._renderedChildren;
|
9398 | var removedNodes = {};
|
9399 | var mountImages = [];
|
9400 | var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
|
9401 | if (!nextChildren && !prevChildren) {
|
9402 | return;
|
9403 | }
|
9404 | var updates = null;
|
9405 | var name;
|
9406 |
|
9407 |
|
9408 | var nextIndex = 0;
|
9409 | var lastIndex = 0;
|
9410 |
|
9411 | var nextMountIndex = 0;
|
9412 | var lastPlacedNode = null;
|
9413 | for (name in nextChildren) {
|
9414 | if (!nextChildren.hasOwnProperty(name)) {
|
9415 | continue;
|
9416 | }
|
9417 | var prevChild = prevChildren && prevChildren[name];
|
9418 | var nextChild = nextChildren[name];
|
9419 | if (prevChild === nextChild) {
|
9420 | updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
|
9421 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
9422 | prevChild._mountIndex = nextIndex;
|
9423 | } else {
|
9424 | if (prevChild) {
|
9425 |
|
9426 | lastIndex = Math.max(prevChild._mountIndex, lastIndex);
|
9427 |
|
9428 | }
|
9429 |
|
9430 | updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
|
9431 | nextMountIndex++;
|
9432 | }
|
9433 | nextIndex++;
|
9434 | lastPlacedNode = ReactReconciler.getHostNode(nextChild);
|
9435 | }
|
9436 |
|
9437 | for (name in removedNodes) {
|
9438 | if (removedNodes.hasOwnProperty(name)) {
|
9439 | updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
|
9440 | }
|
9441 | }
|
9442 | if (updates) {
|
9443 | processQueue(this, updates);
|
9444 | }
|
9445 | this._renderedChildren = nextChildren;
|
9446 |
|
9447 | if ("development" !== 'production') {
|
9448 | setChildrenForInstrumentation.call(this, nextChildren);
|
9449 | }
|
9450 | },
|
9451 |
|
9452 | |
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 |
|
9458 |
|
9459 | unmountChildren: function (safely) {
|
9460 | var renderedChildren = this._renderedChildren;
|
9461 | ReactChildReconciler.unmountChildren(renderedChildren, safely);
|
9462 | this._renderedChildren = null;
|
9463 | },
|
9464 |
|
9465 | |
9466 |
|
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 |
|
9472 |
|
9473 | moveChild: function (child, afterNode, toIndex, lastIndex) {
|
9474 |
|
9475 |
|
9476 |
|
9477 | if (child._mountIndex < lastIndex) {
|
9478 | return makeMove(child, afterNode, toIndex);
|
9479 | }
|
9480 | },
|
9481 |
|
9482 | |
9483 |
|
9484 |
|
9485 |
|
9486 |
|
9487 |
|
9488 |
|
9489 | createChild: function (child, afterNode, mountImage) {
|
9490 | return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
|
9491 | },
|
9492 |
|
9493 | |
9494 |
|
9495 |
|
9496 |
|
9497 |
|
9498 |
|
9499 | removeChild: function (child, node) {
|
9500 | return makeRemove(child, node);
|
9501 | },
|
9502 |
|
9503 | |
9504 |
|
9505 |
|
9506 |
|
9507 |
|
9508 |
|
9509 |
|
9510 |
|
9511 |
|
9512 |
|
9513 |
|
9514 | _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
|
9515 | child._mountIndex = index;
|
9516 | return this.createChild(child, afterNode, mountImage);
|
9517 | },
|
9518 |
|
9519 | |
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 | _unmountChild: function (child, node) {
|
9528 | var update = this.removeChild(child, node);
|
9529 | child._mountIndex = null;
|
9530 | return update;
|
9531 | }
|
9532 | }
|
9533 | };
|
9534 |
|
9535 | module.exports = ReactMultiChild;
|
9536 | },{"101":101,"116":116,"123":123,"133":133,"141":141,"26":26,"28":28,"58":58,"59":59,"68":68}],63:[function(_dereq_,module,exports){
|
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 |
|
9543 |
|
9544 |
|
9545 |
|
9546 | 'use strict';
|
9547 |
|
9548 | var _prodInvariant = _dereq_(116);
|
9549 |
|
9550 | var React = _dereq_(124);
|
9551 |
|
9552 | var invariant = _dereq_(141);
|
9553 |
|
9554 | var ReactNodeTypes = {
|
9555 | HOST: 0,
|
9556 | COMPOSITE: 1,
|
9557 | EMPTY: 2,
|
9558 |
|
9559 | getType: function (node) {
|
9560 | if (node === null || node === false) {
|
9561 | return ReactNodeTypes.EMPTY;
|
9562 | } else if (React.isValidElement(node)) {
|
9563 | if (typeof node.type === 'function') {
|
9564 | return ReactNodeTypes.COMPOSITE;
|
9565 | } else {
|
9566 | return ReactNodeTypes.HOST;
|
9567 | }
|
9568 | }
|
9569 | !false ? "development" !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
|
9570 | }
|
9571 | };
|
9572 |
|
9573 | module.exports = ReactNodeTypes;
|
9574 | },{"116":116,"124":124,"141":141}],64:[function(_dereq_,module,exports){
|
9575 |
|
9576 |
|
9577 |
|
9578 |
|
9579 |
|
9580 |
|
9581 |
|
9582 |
|
9583 |
|
9584 | 'use strict';
|
9585 |
|
9586 | var _prodInvariant = _dereq_(116);
|
9587 |
|
9588 | var invariant = _dereq_(141);
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 | function isValidOwner(object) {
|
9596 | return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
|
9597 | }
|
9598 |
|
9599 |
|
9600 |
|
9601 |
|
9602 |
|
9603 |
|
9604 |
|
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 |
|
9615 |
|
9616 |
|
9617 |
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 |
|
9623 |
|
9624 |
|
9625 |
|
9626 |
|
9627 |
|
9628 |
|
9629 | var ReactOwner = {
|
9630 | |
9631 |
|
9632 |
|
9633 |
|
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 |
|
9639 | addComponentAsRefTo: function (component, ref, owner) {
|
9640 | !isValidOwner(owner) ? "development" !== '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;
|
9641 | owner.attachRef(ref, component);
|
9642 | },
|
9643 |
|
9644 | |
9645 |
|
9646 |
|
9647 |
|
9648 |
|
9649 |
|
9650 |
|
9651 |
|
9652 |
|
9653 | removeComponentAsRefFrom: function (component, ref, owner) {
|
9654 | !isValidOwner(owner) ? "development" !== '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;
|
9655 | var ownerPublicInstance = owner.getPublicInstance();
|
9656 |
|
9657 |
|
9658 | if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
|
9659 | owner.detachRef(ref);
|
9660 | }
|
9661 | }
|
9662 | };
|
9663 |
|
9664 | module.exports = ReactOwner;
|
9665 | },{"116":116,"141":141}],65:[function(_dereq_,module,exports){
|
9666 |
|
9667 |
|
9668 |
|
9669 |
|
9670 |
|
9671 |
|
9672 |
|
9673 |
|
9674 |
|
9675 | 'use strict';
|
9676 |
|
9677 | var ReactPropTypeLocationNames = {};
|
9678 |
|
9679 | if ("development" !== 'production') {
|
9680 | ReactPropTypeLocationNames = {
|
9681 | prop: 'prop',
|
9682 | context: 'context',
|
9683 | childContext: 'child context'
|
9684 | };
|
9685 | }
|
9686 |
|
9687 | module.exports = ReactPropTypeLocationNames;
|
9688 | },{}],66:[function(_dereq_,module,exports){
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 | 'use strict';
|
9699 |
|
9700 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
9701 |
|
9702 | module.exports = ReactPropTypesSecret;
|
9703 | },{}],67:[function(_dereq_,module,exports){
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 | 'use strict';
|
9713 |
|
9714 | var _assign = _dereq_(149);
|
9715 |
|
9716 | var CallbackQueue = _dereq_(6);
|
9717 | var PooledClass = _dereq_(24);
|
9718 | var ReactBrowserEventEmitter = _dereq_(25);
|
9719 | var ReactInputSelection = _dereq_(57);
|
9720 | var ReactInstrumentation = _dereq_(59);
|
9721 | var Transaction = _dereq_(93);
|
9722 | var ReactUpdateQueue = _dereq_(74);
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 | var SELECTION_RESTORATION = {
|
9729 | |
9730 |
|
9731 |
|
9732 | initialize: ReactInputSelection.getSelectionInformation,
|
9733 | |
9734 |
|
9735 |
|
9736 | close: ReactInputSelection.restoreSelection
|
9737 | };
|
9738 |
|
9739 |
|
9740 |
|
9741 |
|
9742 |
|
9743 |
|
9744 | var EVENT_SUPPRESSION = {
|
9745 | |
9746 |
|
9747 |
|
9748 |
|
9749 | initialize: function () {
|
9750 | var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
|
9751 | ReactBrowserEventEmitter.setEnabled(false);
|
9752 | return currentlyEnabled;
|
9753 | },
|
9754 |
|
9755 | |
9756 |
|
9757 |
|
9758 |
|
9759 |
|
9760 | close: function (previouslyEnabled) {
|
9761 | ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
|
9762 | }
|
9763 | };
|
9764 |
|
9765 |
|
9766 |
|
9767 |
|
9768 |
|
9769 | var ON_DOM_READY_QUEUEING = {
|
9770 | |
9771 |
|
9772 |
|
9773 | initialize: function () {
|
9774 | this.reactMountReady.reset();
|
9775 | },
|
9776 |
|
9777 | |
9778 |
|
9779 |
|
9780 | close: function () {
|
9781 | this.reactMountReady.notifyAll();
|
9782 | }
|
9783 | };
|
9784 |
|
9785 |
|
9786 |
|
9787 |
|
9788 |
|
9789 |
|
9790 | var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
|
9791 |
|
9792 | if ("development" !== 'production') {
|
9793 | TRANSACTION_WRAPPERS.push({
|
9794 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
9795 | close: ReactInstrumentation.debugTool.onEndFlush
|
9796 | });
|
9797 | }
|
9798 |
|
9799 |
|
9800 |
|
9801 |
|
9802 |
|
9803 |
|
9804 |
|
9805 |
|
9806 |
|
9807 |
|
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 | function ReactReconcileTransaction(useCreateElement) {
|
9814 | this.reinitializeTransaction();
|
9815 |
|
9816 |
|
9817 |
|
9818 |
|
9819 |
|
9820 | this.renderToStaticMarkup = false;
|
9821 | this.reactMountReady = CallbackQueue.getPooled(null);
|
9822 | this.useCreateElement = useCreateElement;
|
9823 | }
|
9824 |
|
9825 | var Mixin = {
|
9826 | |
9827 |
|
9828 |
|
9829 |
|
9830 |
|
9831 |
|
9832 |
|
9833 | getTransactionWrappers: function () {
|
9834 | return TRANSACTION_WRAPPERS;
|
9835 | },
|
9836 |
|
9837 | |
9838 |
|
9839 |
|
9840 | getReactMountReady: function () {
|
9841 | return this.reactMountReady;
|
9842 | },
|
9843 |
|
9844 | |
9845 |
|
9846 |
|
9847 | getUpdateQueue: function () {
|
9848 | return ReactUpdateQueue;
|
9849 | },
|
9850 |
|
9851 | |
9852 |
|
9853 |
|
9854 |
|
9855 | checkpoint: function () {
|
9856 |
|
9857 | return this.reactMountReady.checkpoint();
|
9858 | },
|
9859 |
|
9860 | rollback: function (checkpoint) {
|
9861 | this.reactMountReady.rollback(checkpoint);
|
9862 | },
|
9863 |
|
9864 | |
9865 |
|
9866 |
|
9867 |
|
9868 | destructor: function () {
|
9869 | CallbackQueue.release(this.reactMountReady);
|
9870 | this.reactMountReady = null;
|
9871 | }
|
9872 | };
|
9873 |
|
9874 | _assign(ReactReconcileTransaction.prototype, Transaction, Mixin);
|
9875 |
|
9876 | PooledClass.addPoolingTo(ReactReconcileTransaction);
|
9877 |
|
9878 | module.exports = ReactReconcileTransaction;
|
9879 | },{"149":149,"24":24,"25":25,"57":57,"59":59,"6":6,"74":74,"93":93}],68:[function(_dereq_,module,exports){
|
9880 |
|
9881 |
|
9882 |
|
9883 |
|
9884 |
|
9885 |
|
9886 |
|
9887 |
|
9888 | 'use strict';
|
9889 |
|
9890 | var ReactRef = _dereq_(69);
|
9891 | var ReactInstrumentation = _dereq_(59);
|
9892 |
|
9893 | var warning = _dereq_(148);
|
9894 |
|
9895 |
|
9896 |
|
9897 |
|
9898 |
|
9899 | function attachRefs() {
|
9900 | ReactRef.attachRefs(this, this._currentElement);
|
9901 | }
|
9902 |
|
9903 | var ReactReconciler = {
|
9904 | |
9905 |
|
9906 |
|
9907 |
|
9908 |
|
9909 |
|
9910 |
|
9911 |
|
9912 |
|
9913 |
|
9914 |
|
9915 | mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID) // 0 in production and for roots
|
9916 | {
|
9917 | if ("development" !== 'production') {
|
9918 | if (internalInstance._debugID !== 0) {
|
9919 | ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
|
9920 | }
|
9921 | }
|
9922 | var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
|
9923 | if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
9924 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
9925 | }
|
9926 | if ("development" !== 'production') {
|
9927 | if (internalInstance._debugID !== 0) {
|
9928 | ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
|
9929 | }
|
9930 | }
|
9931 | return markup;
|
9932 | },
|
9933 |
|
9934 | |
9935 |
|
9936 |
|
9937 |
|
9938 | getHostNode: function (internalInstance) {
|
9939 | return internalInstance.getHostNode();
|
9940 | },
|
9941 |
|
9942 | |
9943 |
|
9944 |
|
9945 |
|
9946 |
|
9947 |
|
9948 | unmountComponent: function (internalInstance, safely) {
|
9949 | if ("development" !== 'production') {
|
9950 | if (internalInstance._debugID !== 0) {
|
9951 | ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
|
9952 | }
|
9953 | }
|
9954 | ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
|
9955 | internalInstance.unmountComponent(safely);
|
9956 | if ("development" !== 'production') {
|
9957 | if (internalInstance._debugID !== 0) {
|
9958 | ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
|
9959 | }
|
9960 | }
|
9961 | },
|
9962 |
|
9963 | |
9964 |
|
9965 |
|
9966 |
|
9967 |
|
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 | receiveComponent: function (internalInstance, nextElement, transaction, context) {
|
9973 | var prevElement = internalInstance._currentElement;
|
9974 |
|
9975 | if (nextElement === prevElement && context === internalInstance._context) {
|
9976 |
|
9977 |
|
9978 |
|
9979 |
|
9980 |
|
9981 |
|
9982 |
|
9983 |
|
9984 |
|
9985 |
|
9986 | return;
|
9987 | }
|
9988 |
|
9989 | if ("development" !== 'production') {
|
9990 | if (internalInstance._debugID !== 0) {
|
9991 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
|
9992 | }
|
9993 | }
|
9994 |
|
9995 | var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
|
9996 |
|
9997 | if (refsChanged) {
|
9998 | ReactRef.detachRefs(internalInstance, prevElement);
|
9999 | }
|
10000 |
|
10001 | internalInstance.receiveComponent(nextElement, transaction, context);
|
10002 |
|
10003 | if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
|
10004 | transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
|
10005 | }
|
10006 |
|
10007 | if ("development" !== 'production') {
|
10008 | if (internalInstance._debugID !== 0) {
|
10009 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
10010 | }
|
10011 | }
|
10012 | },
|
10013 |
|
10014 | |
10015 |
|
10016 |
|
10017 |
|
10018 |
|
10019 |
|
10020 |
|
10021 | performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
|
10022 | if (internalInstance._updateBatchNumber !== updateBatchNumber) {
|
10023 |
|
10024 |
|
10025 | "development" !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
|
10026 | return;
|
10027 | }
|
10028 | if ("development" !== 'production') {
|
10029 | if (internalInstance._debugID !== 0) {
|
10030 | ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
|
10031 | }
|
10032 | }
|
10033 | internalInstance.performUpdateIfNecessary(transaction);
|
10034 | if ("development" !== 'production') {
|
10035 | if (internalInstance._debugID !== 0) {
|
10036 | ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
|
10037 | }
|
10038 | }
|
10039 | }
|
10040 | };
|
10041 |
|
10042 | module.exports = ReactReconciler;
|
10043 | },{"148":148,"59":59,"69":69}],69:[function(_dereq_,module,exports){
|
10044 |
|
10045 |
|
10046 |
|
10047 |
|
10048 |
|
10049 |
|
10050 |
|
10051 |
|
10052 |
|
10053 | 'use strict';
|
10054 |
|
10055 | var ReactOwner = _dereq_(64);
|
10056 |
|
10057 | var ReactRef = {};
|
10058 |
|
10059 | function attachRef(ref, component, owner) {
|
10060 | if (typeof ref === 'function') {
|
10061 | ref(component.getPublicInstance());
|
10062 | } else {
|
10063 |
|
10064 | ReactOwner.addComponentAsRefTo(component, ref, owner);
|
10065 | }
|
10066 | }
|
10067 |
|
10068 | function detachRef(ref, component, owner) {
|
10069 | if (typeof ref === 'function') {
|
10070 | ref(null);
|
10071 | } else {
|
10072 |
|
10073 | ReactOwner.removeComponentAsRefFrom(component, ref, owner);
|
10074 | }
|
10075 | }
|
10076 |
|
10077 | ReactRef.attachRefs = function (instance, element) {
|
10078 | if (element === null || typeof element !== 'object') {
|
10079 | return;
|
10080 | }
|
10081 | var ref = element.ref;
|
10082 | if (ref != null) {
|
10083 | attachRef(ref, instance, element._owner);
|
10084 | }
|
10085 | };
|
10086 |
|
10087 | ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
|
10088 |
|
10089 |
|
10090 |
|
10091 |
|
10092 |
|
10093 |
|
10094 |
|
10095 |
|
10096 |
|
10097 |
|
10098 |
|
10099 |
|
10100 | var prevRef = null;
|
10101 | var prevOwner = null;
|
10102 | if (prevElement !== null && typeof prevElement === 'object') {
|
10103 | prevRef = prevElement.ref;
|
10104 | prevOwner = prevElement._owner;
|
10105 | }
|
10106 |
|
10107 | var nextRef = null;
|
10108 | var nextOwner = null;
|
10109 | if (nextElement !== null && typeof nextElement === 'object') {
|
10110 | nextRef = nextElement.ref;
|
10111 | nextOwner = nextElement._owner;
|
10112 | }
|
10113 |
|
10114 | return prevRef !== nextRef ||
|
10115 |
|
10116 | typeof nextRef === 'string' && nextOwner !== prevOwner;
|
10117 | };
|
10118 |
|
10119 | ReactRef.detachRefs = function (instance, element) {
|
10120 | if (element === null || typeof element !== 'object') {
|
10121 | return;
|
10122 | }
|
10123 | var ref = element.ref;
|
10124 | if (ref != null) {
|
10125 | detachRef(ref, instance, element._owner);
|
10126 | }
|
10127 | };
|
10128 |
|
10129 | module.exports = ReactRef;
|
10130 | },{"64":64}],70:[function(_dereq_,module,exports){
|
10131 |
|
10132 |
|
10133 |
|
10134 |
|
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 | 'use strict';
|
10140 |
|
10141 | var ReactServerBatchingStrategy = {
|
10142 | isBatchingUpdates: false,
|
10143 | batchedUpdates: function (callback) {
|
10144 |
|
10145 |
|
10146 | }
|
10147 | };
|
10148 |
|
10149 | module.exports = ReactServerBatchingStrategy;
|
10150 | },{}],71:[function(_dereq_,module,exports){
|
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 |
|
10156 |
|
10157 |
|
10158 | 'use strict';
|
10159 |
|
10160 | var _prodInvariant = _dereq_(116);
|
10161 |
|
10162 | var React = _dereq_(124);
|
10163 | var ReactDOMContainerInfo = _dereq_(33);
|
10164 | var ReactDefaultBatchingStrategy = _dereq_(46);
|
10165 | var ReactInstrumentation = _dereq_(59);
|
10166 | var ReactMarkupChecksum = _dereq_(61);
|
10167 | var ReactReconciler = _dereq_(68);
|
10168 | var ReactServerBatchingStrategy = _dereq_(70);
|
10169 | var ReactServerRenderingTransaction = _dereq_(72);
|
10170 | var ReactUpdates = _dereq_(75);
|
10171 |
|
10172 | var emptyObject = _dereq_(134);
|
10173 | var instantiateReactComponent = _dereq_(112);
|
10174 | var invariant = _dereq_(141);
|
10175 |
|
10176 | var pendingTransactions = 0;
|
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 | function renderToStringImpl(element, makeStaticMarkup) {
|
10183 | var transaction;
|
10184 | try {
|
10185 | ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
|
10186 |
|
10187 | transaction = ReactServerRenderingTransaction.getPooled(makeStaticMarkup);
|
10188 |
|
10189 | pendingTransactions++;
|
10190 |
|
10191 | return transaction.perform(function () {
|
10192 | var componentInstance = instantiateReactComponent(element, true);
|
10193 | var markup = ReactReconciler.mountComponent(componentInstance, transaction, null, ReactDOMContainerInfo(), emptyObject, 0
|
10194 | );
|
10195 | if ("development" !== 'production') {
|
10196 | ReactInstrumentation.debugTool.onUnmountComponent(componentInstance._debugID);
|
10197 | }
|
10198 | if (!makeStaticMarkup) {
|
10199 | markup = ReactMarkupChecksum.addChecksumToMarkup(markup);
|
10200 | }
|
10201 | return markup;
|
10202 | }, null);
|
10203 | } finally {
|
10204 | pendingTransactions--;
|
10205 | ReactServerRenderingTransaction.release(transaction);
|
10206 |
|
10207 |
|
10208 | if (!pendingTransactions) {
|
10209 | ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
|
10210 | }
|
10211 | }
|
10212 | }
|
10213 |
|
10214 |
|
10215 |
|
10216 |
|
10217 |
|
10218 |
|
10219 | function renderToString(element) {
|
10220 | !React.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : _prodInvariant('46') : void 0;
|
10221 | return renderToStringImpl(element, false);
|
10222 | }
|
10223 |
|
10224 |
|
10225 |
|
10226 |
|
10227 |
|
10228 |
|
10229 | function renderToStaticMarkup(element) {
|
10230 | !React.isValidElement(element) ? "development" !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : _prodInvariant('47') : void 0;
|
10231 | return renderToStringImpl(element, true);
|
10232 | }
|
10233 |
|
10234 | module.exports = {
|
10235 | renderToString: renderToString,
|
10236 | renderToStaticMarkup: renderToStaticMarkup
|
10237 | };
|
10238 | },{"112":112,"116":116,"124":124,"134":134,"141":141,"33":33,"46":46,"59":59,"61":61,"68":68,"70":70,"72":72,"75":75}],72:[function(_dereq_,module,exports){
|
10239 |
|
10240 |
|
10241 |
|
10242 |
|
10243 |
|
10244 |
|
10245 |
|
10246 |
|
10247 | 'use strict';
|
10248 |
|
10249 | var _assign = _dereq_(149);
|
10250 |
|
10251 | var PooledClass = _dereq_(24);
|
10252 | var Transaction = _dereq_(93);
|
10253 | var ReactInstrumentation = _dereq_(59);
|
10254 | var ReactServerUpdateQueue = _dereq_(73);
|
10255 |
|
10256 |
|
10257 |
|
10258 |
|
10259 |
|
10260 |
|
10261 | var TRANSACTION_WRAPPERS = [];
|
10262 |
|
10263 | if ("development" !== 'production') {
|
10264 | TRANSACTION_WRAPPERS.push({
|
10265 | initialize: ReactInstrumentation.debugTool.onBeginFlush,
|
10266 | close: ReactInstrumentation.debugTool.onEndFlush
|
10267 | });
|
10268 | }
|
10269 |
|
10270 | var noopCallbackQueue = {
|
10271 | enqueue: function () {}
|
10272 | };
|
10273 |
|
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 | function ReactServerRenderingTransaction(renderToStaticMarkup) {
|
10279 | this.reinitializeTransaction();
|
10280 | this.renderToStaticMarkup = renderToStaticMarkup;
|
10281 | this.useCreateElement = false;
|
10282 | this.updateQueue = new ReactServerUpdateQueue(this);
|
10283 | }
|
10284 |
|
10285 | var Mixin = {
|
10286 | |
10287 |
|
10288 |
|
10289 |
|
10290 |
|
10291 |
|
10292 | getTransactionWrappers: function () {
|
10293 | return TRANSACTION_WRAPPERS;
|
10294 | },
|
10295 |
|
10296 | |
10297 |
|
10298 |
|
10299 | getReactMountReady: function () {
|
10300 | return noopCallbackQueue;
|
10301 | },
|
10302 |
|
10303 | |
10304 |
|
10305 |
|
10306 | getUpdateQueue: function () {
|
10307 | return this.updateQueue;
|
10308 | },
|
10309 |
|
10310 | |
10311 |
|
10312 |
|
10313 |
|
10314 | destructor: function () {},
|
10315 |
|
10316 | checkpoint: function () {},
|
10317 |
|
10318 | rollback: function () {}
|
10319 | };
|
10320 |
|
10321 | _assign(ReactServerRenderingTransaction.prototype, Transaction, Mixin);
|
10322 |
|
10323 | PooledClass.addPoolingTo(ReactServerRenderingTransaction);
|
10324 |
|
10325 | module.exports = ReactServerRenderingTransaction;
|
10326 | },{"149":149,"24":24,"59":59,"73":73,"93":93}],73:[function(_dereq_,module,exports){
|
10327 |
|
10328 |
|
10329 |
|
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 | 'use strict';
|
10337 |
|
10338 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10339 |
|
10340 | var ReactUpdateQueue = _dereq_(74);
|
10341 |
|
10342 | var warning = _dereq_(148);
|
10343 |
|
10344 | function warnNoop(publicInstance, callerName) {
|
10345 | if ("development" !== 'production') {
|
10346 | var constructor = publicInstance.constructor;
|
10347 | "development" !== '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;
|
10348 | }
|
10349 | }
|
10350 |
|
10351 | /**
|
10352 | * This is the update queue used for server rendering.
|
10353 | * It delegates to ReactUpdateQueue while server rendering is in progress and
|
10354 | * switches to ReactNoopUpdateQueue after the transaction has completed.
|
10355 | * @class ReactServerUpdateQueue
|
10356 | * @param {Transaction} transaction
|
10357 | */
|
10358 |
|
10359 | var ReactServerUpdateQueue = function () {
|
10360 | function ReactServerUpdateQueue(transaction) {
|
10361 | _classCallCheck(this, ReactServerUpdateQueue);
|
10362 |
|
10363 | this.transaction = transaction;
|
10364 | }
|
10365 |
|
10366 | |
10367 |
|
10368 |
|
10369 |
|
10370 |
|
10371 |
|
10372 |
|
10373 |
|
10374 |
|
10375 | ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
|
10376 | return false;
|
10377 | };
|
10378 |
|
10379 | |
10380 |
|
10381 |
|
10382 |
|
10383 |
|
10384 |
|
10385 |
|
10386 |
|
10387 |
|
10388 |
|
10389 | ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
|
10390 | if (this.transaction.isInTransaction()) {
|
10391 | ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
|
10392 | }
|
10393 | };
|
10394 |
|
10395 | |
10396 |
|
10397 |
|
10398 |
|
10399 |
|
10400 |
|
10401 |
|
10402 |
|
10403 |
|
10404 |
|
10405 |
|
10406 |
|
10407 |
|
10408 |
|
10409 |
|
10410 | ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
|
10411 | if (this.transaction.isInTransaction()) {
|
10412 | ReactUpdateQueue.enqueueForceUpdate(publicInstance);
|
10413 | } else {
|
10414 | warnNoop(publicInstance, 'forceUpdate');
|
10415 | }
|
10416 | };
|
10417 |
|
10418 | |
10419 |
|
10420 |
|
10421 |
|
10422 |
|
10423 |
|
10424 |
|
10425 |
|
10426 |
|
10427 |
|
10428 |
|
10429 |
|
10430 |
|
10431 | ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
|
10432 | if (this.transaction.isInTransaction()) {
|
10433 | ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
|
10434 | } else {
|
10435 | warnNoop(publicInstance, 'replaceState');
|
10436 | }
|
10437 | };
|
10438 |
|
10439 | |
10440 |
|
10441 |
|
10442 |
|
10443 |
|
10444 |
|
10445 |
|
10446 |
|
10447 |
|
10448 |
|
10449 |
|
10450 |
|
10451 | ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
|
10452 | if (this.transaction.isInTransaction()) {
|
10453 | ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
|
10454 | } else {
|
10455 | warnNoop(publicInstance, 'setState');
|
10456 | }
|
10457 | };
|
10458 |
|
10459 | return ReactServerUpdateQueue;
|
10460 | }();
|
10461 |
|
10462 | module.exports = ReactServerUpdateQueue;
|
10463 | },{"148":148,"74":74}],74:[function(_dereq_,module,exports){
|
10464 |
|
10465 |
|
10466 |
|
10467 |
|
10468 |
|
10469 |
|
10470 |
|
10471 |
|
10472 | 'use strict';
|
10473 |
|
10474 | var _prodInvariant = _dereq_(116);
|
10475 |
|
10476 | var ReactCurrentOwner = _dereq_(123);
|
10477 | var ReactInstanceMap = _dereq_(58);
|
10478 | var ReactInstrumentation = _dereq_(59);
|
10479 | var ReactUpdates = _dereq_(75);
|
10480 |
|
10481 | var invariant = _dereq_(141);
|
10482 | var warning = _dereq_(148);
|
10483 |
|
10484 | function enqueueUpdate(internalInstance) {
|
10485 | ReactUpdates.enqueueUpdate(internalInstance);
|
10486 | }
|
10487 |
|
10488 | function formatUnexpectedArgument(arg) {
|
10489 | var type = typeof arg;
|
10490 | if (type !== 'object') {
|
10491 | return type;
|
10492 | }
|
10493 | var displayName = arg.constructor && arg.constructor.name || type;
|
10494 | var keys = Object.keys(arg);
|
10495 | if (keys.length > 0 && keys.length < 20) {
|
10496 | return displayName + ' (keys: ' + keys.join(', ') + ')';
|
10497 | }
|
10498 | return displayName;
|
10499 | }
|
10500 |
|
10501 | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
|
10502 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
10503 | if (!internalInstance) {
|
10504 | if ("development" !== 'production') {
|
10505 | var ctor = publicInstance.constructor;
|
10506 |
|
10507 |
|
10508 |
|
10509 | "development" !== '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;
|
10510 | }
|
10511 | return null;
|
10512 | }
|
10513 |
|
10514 | if ("development" !== 'production') {
|
10515 | "development" !== '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;
|
10516 | }
|
10517 |
|
10518 | return internalInstance;
|
10519 | }
|
10520 |
|
10521 |
|
10522 |
|
10523 |
|
10524 |
|
10525 | var ReactUpdateQueue = {
|
10526 | |
10527 |
|
10528 |
|
10529 |
|
10530 |
|
10531 |
|
10532 |
|
10533 | isMounted: function (publicInstance) {
|
10534 | if ("development" !== 'production') {
|
10535 | var owner = ReactCurrentOwner.current;
|
10536 | if (owner !== null) {
|
10537 | "development" !== '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;
|
10538 | owner._warnedAboutRefsInRender = true;
|
10539 | }
|
10540 | }
|
10541 | var internalInstance = ReactInstanceMap.get(publicInstance);
|
10542 | if (internalInstance) {
|
10543 |
|
10544 |
|
10545 |
|
10546 | return !!internalInstance._renderedComponent;
|
10547 | } else {
|
10548 | return false;
|
10549 | }
|
10550 | },
|
10551 |
|
10552 | |
10553 |
|
10554 |
|
10555 |
|
10556 |
|
10557 |
|
10558 |
|
10559 |
|
10560 |
|
10561 | enqueueCallback: function (publicInstance, callback, callerName) {
|
10562 | ReactUpdateQueue.validateCallback(callback, callerName);
|
10563 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
|
10564 |
|
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 |
|
10570 | if (!internalInstance) {
|
10571 | return null;
|
10572 | }
|
10573 |
|
10574 | if (internalInstance._pendingCallbacks) {
|
10575 | internalInstance._pendingCallbacks.push(callback);
|
10576 | } else {
|
10577 | internalInstance._pendingCallbacks = [callback];
|
10578 | }
|
10579 |
|
10580 |
|
10581 |
|
10582 |
|
10583 | enqueueUpdate(internalInstance);
|
10584 | },
|
10585 |
|
10586 | enqueueCallbackInternal: function (internalInstance, callback) {
|
10587 | if (internalInstance._pendingCallbacks) {
|
10588 | internalInstance._pendingCallbacks.push(callback);
|
10589 | } else {
|
10590 | internalInstance._pendingCallbacks = [callback];
|
10591 | }
|
10592 | enqueueUpdate(internalInstance);
|
10593 | },
|
10594 |
|
10595 | |
10596 |
|
10597 |
|
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 |
|
10604 |
|
10605 |
|
10606 |
|
10607 |
|
10608 | enqueueForceUpdate: function (publicInstance) {
|
10609 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
|
10610 |
|
10611 | if (!internalInstance) {
|
10612 | return;
|
10613 | }
|
10614 |
|
10615 | internalInstance._pendingForceUpdate = true;
|
10616 |
|
10617 | enqueueUpdate(internalInstance);
|
10618 | },
|
10619 |
|
10620 | |
10621 |
|
10622 |
|
10623 |
|
10624 |
|
10625 |
|
10626 |
|
10627 |
|
10628 |
|
10629 |
|
10630 |
|
10631 | enqueueReplaceState: function (publicInstance, completeState, callback) {
|
10632 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
|
10633 |
|
10634 | if (!internalInstance) {
|
10635 | return;
|
10636 | }
|
10637 |
|
10638 | internalInstance._pendingStateQueue = [completeState];
|
10639 | internalInstance._pendingReplaceState = true;
|
10640 |
|
10641 |
|
10642 | if (callback !== undefined && callback !== null) {
|
10643 | ReactUpdateQueue.validateCallback(callback, 'replaceState');
|
10644 | if (internalInstance._pendingCallbacks) {
|
10645 | internalInstance._pendingCallbacks.push(callback);
|
10646 | } else {
|
10647 | internalInstance._pendingCallbacks = [callback];
|
10648 | }
|
10649 | }
|
10650 |
|
10651 | enqueueUpdate(internalInstance);
|
10652 | },
|
10653 |
|
10654 | |
10655 |
|
10656 |
|
10657 |
|
10658 |
|
10659 |
|
10660 |
|
10661 |
|
10662 |
|
10663 |
|
10664 | enqueueSetState: function (publicInstance, partialState) {
|
10665 | if ("development" !== 'production') {
|
10666 | ReactInstrumentation.debugTool.onSetState();
|
10667 | "development" !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
|
10668 | }
|
10669 |
|
10670 | var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
|
10671 |
|
10672 | if (!internalInstance) {
|
10673 | return;
|
10674 | }
|
10675 |
|
10676 | var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
|
10677 | queue.push(partialState);
|
10678 |
|
10679 | enqueueUpdate(internalInstance);
|
10680 | },
|
10681 |
|
10682 | enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
|
10683 | internalInstance._pendingElement = nextElement;
|
10684 |
|
10685 | internalInstance._context = nextContext;
|
10686 | enqueueUpdate(internalInstance);
|
10687 | },
|
10688 |
|
10689 | validateCallback: function (callback, callerName) {
|
10690 | !(!callback || typeof callback === 'function') ? "development" !== '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;
|
10691 | }
|
10692 | };
|
10693 |
|
10694 | module.exports = ReactUpdateQueue;
|
10695 | },{"116":116,"123":123,"141":141,"148":148,"58":58,"59":59,"75":75}],75:[function(_dereq_,module,exports){
|
10696 |
|
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 |
|
10703 |
|
10704 | 'use strict';
|
10705 |
|
10706 | var _prodInvariant = _dereq_(116),
|
10707 | _assign = _dereq_(149);
|
10708 |
|
10709 | var CallbackQueue = _dereq_(6);
|
10710 | var PooledClass = _dereq_(24);
|
10711 | var ReactFeatureFlags = _dereq_(53);
|
10712 | var ReactReconciler = _dereq_(68);
|
10713 | var Transaction = _dereq_(93);
|
10714 |
|
10715 | var invariant = _dereq_(141);
|
10716 |
|
10717 | var dirtyComponents = [];
|
10718 | var updateBatchNumber = 0;
|
10719 | var asapCallbackQueue = CallbackQueue.getPooled();
|
10720 | var asapEnqueued = false;
|
10721 |
|
10722 | var batchingStrategy = null;
|
10723 |
|
10724 | function ensureInjected() {
|
10725 | !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
|
10726 | }
|
10727 |
|
10728 | var NESTED_UPDATES = {
|
10729 | initialize: function () {
|
10730 | this.dirtyComponentsLength = dirtyComponents.length;
|
10731 | },
|
10732 | close: function () {
|
10733 | if (this.dirtyComponentsLength !== dirtyComponents.length) {
|
10734 |
|
10735 |
|
10736 |
|
10737 |
|
10738 |
|
10739 | dirtyComponents.splice(0, this.dirtyComponentsLength);
|
10740 | flushBatchedUpdates();
|
10741 | } else {
|
10742 | dirtyComponents.length = 0;
|
10743 | }
|
10744 | }
|
10745 | };
|
10746 |
|
10747 | var UPDATE_QUEUEING = {
|
10748 | initialize: function () {
|
10749 | this.callbackQueue.reset();
|
10750 | },
|
10751 | close: function () {
|
10752 | this.callbackQueue.notifyAll();
|
10753 | }
|
10754 | };
|
10755 |
|
10756 | var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
|
10757 |
|
10758 | function ReactUpdatesFlushTransaction() {
|
10759 | this.reinitializeTransaction();
|
10760 | this.dirtyComponentsLength = null;
|
10761 | this.callbackQueue = CallbackQueue.getPooled();
|
10762 | this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
|
10763 | true);
|
10764 | }
|
10765 |
|
10766 | _assign(ReactUpdatesFlushTransaction.prototype, Transaction, {
|
10767 | getTransactionWrappers: function () {
|
10768 | return TRANSACTION_WRAPPERS;
|
10769 | },
|
10770 |
|
10771 | destructor: function () {
|
10772 | this.dirtyComponentsLength = null;
|
10773 | CallbackQueue.release(this.callbackQueue);
|
10774 | this.callbackQueue = null;
|
10775 | ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
|
10776 | this.reconcileTransaction = null;
|
10777 | },
|
10778 |
|
10779 | perform: function (method, scope, a) {
|
10780 |
|
10781 |
|
10782 | return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
|
10783 | }
|
10784 | });
|
10785 |
|
10786 | PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
|
10787 |
|
10788 | function batchedUpdates(callback, a, b, c, d, e) {
|
10789 | ensureInjected();
|
10790 | return batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
|
10791 | }
|
10792 |
|
10793 |
|
10794 |
|
10795 |
|
10796 |
|
10797 |
|
10798 |
|
10799 |
|
10800 | function mountOrderComparator(c1, c2) {
|
10801 | return c1._mountOrder - c2._mountOrder;
|
10802 | }
|
10803 |
|
10804 | function runBatchedUpdates(transaction) {
|
10805 | var len = transaction.dirtyComponentsLength;
|
10806 | !(len === dirtyComponents.length) ? "development" !== '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;
|
10807 |
|
10808 |
|
10809 |
|
10810 |
|
10811 | dirtyComponents.sort(mountOrderComparator);
|
10812 |
|
10813 |
|
10814 |
|
10815 |
|
10816 |
|
10817 |
|
10818 | updateBatchNumber++;
|
10819 |
|
10820 | for (var i = 0; i < len; i++) {
|
10821 |
|
10822 |
|
10823 |
|
10824 | var component = dirtyComponents[i];
|
10825 |
|
10826 |
|
10827 |
|
10828 |
|
10829 | var callbacks = component._pendingCallbacks;
|
10830 | component._pendingCallbacks = null;
|
10831 |
|
10832 | var markerName;
|
10833 | if (ReactFeatureFlags.logTopLevelRenders) {
|
10834 | var namedComponent = component;
|
10835 |
|
10836 | if (component._currentElement.type.isReactTopLevelWrapper) {
|
10837 | namedComponent = component._renderedComponent;
|
10838 | }
|
10839 | markerName = 'React update: ' + namedComponent.getName();
|
10840 | console.time(markerName);
|
10841 | }
|
10842 |
|
10843 | ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
|
10844 |
|
10845 | if (markerName) {
|
10846 | console.timeEnd(markerName);
|
10847 | }
|
10848 |
|
10849 | if (callbacks) {
|
10850 | for (var j = 0; j < callbacks.length; j++) {
|
10851 | transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
|
10852 | }
|
10853 | }
|
10854 | }
|
10855 | }
|
10856 |
|
10857 | var flushBatchedUpdates = function () {
|
10858 |
|
10859 |
|
10860 |
|
10861 |
|
10862 | while (dirtyComponents.length || asapEnqueued) {
|
10863 | if (dirtyComponents.length) {
|
10864 | var transaction = ReactUpdatesFlushTransaction.getPooled();
|
10865 | transaction.perform(runBatchedUpdates, null, transaction);
|
10866 | ReactUpdatesFlushTransaction.release(transaction);
|
10867 | }
|
10868 |
|
10869 | if (asapEnqueued) {
|
10870 | asapEnqueued = false;
|
10871 | var queue = asapCallbackQueue;
|
10872 | asapCallbackQueue = CallbackQueue.getPooled();
|
10873 | queue.notifyAll();
|
10874 | CallbackQueue.release(queue);
|
10875 | }
|
10876 | }
|
10877 | };
|
10878 |
|
10879 |
|
10880 |
|
10881 |
|
10882 |
|
10883 | function enqueueUpdate(component) {
|
10884 | ensureInjected();
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 |
|
10892 | if (!batchingStrategy.isBatchingUpdates) {
|
10893 | batchingStrategy.batchedUpdates(enqueueUpdate, component);
|
10894 | return;
|
10895 | }
|
10896 |
|
10897 | dirtyComponents.push(component);
|
10898 | if (component._updateBatchNumber == null) {
|
10899 | component._updateBatchNumber = updateBatchNumber + 1;
|
10900 | }
|
10901 | }
|
10902 |
|
10903 |
|
10904 |
|
10905 |
|
10906 |
|
10907 | function asap(callback, context) {
|
10908 | invariant(batchingStrategy.isBatchingUpdates, "ReactUpdates.asap: Can't enqueue an asap callback in a context where" + 'updates are not being batched.');
|
10909 | asapCallbackQueue.enqueue(callback, context);
|
10910 | asapEnqueued = true;
|
10911 | }
|
10912 |
|
10913 | var ReactUpdatesInjection = {
|
10914 | injectReconcileTransaction: function (ReconcileTransaction) {
|
10915 | !ReconcileTransaction ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
|
10916 | ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
|
10917 | },
|
10918 |
|
10919 | injectBatchingStrategy: function (_batchingStrategy) {
|
10920 | !_batchingStrategy ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
|
10921 | !(typeof _batchingStrategy.batchedUpdates === 'function') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
|
10922 | !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? "development" !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
|
10923 | batchingStrategy = _batchingStrategy;
|
10924 | }
|
10925 | };
|
10926 |
|
10927 | var ReactUpdates = {
|
10928 | |
10929 |
|
10930 |
|
10931 |
|
10932 |
|
10933 |
|
10934 | ReactReconcileTransaction: null,
|
10935 |
|
10936 | batchedUpdates: batchedUpdates,
|
10937 | enqueueUpdate: enqueueUpdate,
|
10938 | flushBatchedUpdates: flushBatchedUpdates,
|
10939 | injection: ReactUpdatesInjection,
|
10940 | asap: asap
|
10941 | };
|
10942 |
|
10943 | module.exports = ReactUpdates;
|
10944 | },{"116":116,"141":141,"149":149,"24":24,"53":53,"6":6,"68":68,"93":93}],76:[function(_dereq_,module,exports){
|
10945 |
|
10946 |
|
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 | 'use strict';
|
10954 |
|
10955 | module.exports = '15.7.0';
|
10956 | },{}],77:[function(_dereq_,module,exports){
|
10957 |
|
10958 |
|
10959 |
|
10960 |
|
10961 |
|
10962 |
|
10963 |
|
10964 |
|
10965 | 'use strict';
|
10966 |
|
10967 | var NS = {
|
10968 | xlink: 'http://www.w3.org/1999/xlink',
|
10969 | xml: 'http://www.w3.org/XML/1998/namespace'
|
10970 | };
|
10971 |
|
10972 |
|
10973 |
|
10974 |
|
10975 |
|
10976 |
|
10977 |
|
10978 |
|
10979 |
|
10980 |
|
10981 |
|
10982 |
|
10983 |
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 |
|
10989 | var ATTRS = {
|
10990 | accentHeight: 'accent-height',
|
10991 | accumulate: 0,
|
10992 | additive: 0,
|
10993 | alignmentBaseline: 'alignment-baseline',
|
10994 | allowReorder: 'allowReorder',
|
10995 | alphabetic: 0,
|
10996 | amplitude: 0,
|
10997 | arabicForm: 'arabic-form',
|
10998 | ascent: 0,
|
10999 | attributeName: 'attributeName',
|
11000 | attributeType: 'attributeType',
|
11001 | autoReverse: 'autoReverse',
|
11002 | azimuth: 0,
|
11003 | baseFrequency: 'baseFrequency',
|
11004 | baseProfile: 'baseProfile',
|
11005 | baselineShift: 'baseline-shift',
|
11006 | bbox: 0,
|
11007 | begin: 0,
|
11008 | bias: 0,
|
11009 | by: 0,
|
11010 | calcMode: 'calcMode',
|
11011 | capHeight: 'cap-height',
|
11012 | clip: 0,
|
11013 | clipPath: 'clip-path',
|
11014 | clipRule: 'clip-rule',
|
11015 | clipPathUnits: 'clipPathUnits',
|
11016 | colorInterpolation: 'color-interpolation',
|
11017 | colorInterpolationFilters: 'color-interpolation-filters',
|
11018 | colorProfile: 'color-profile',
|
11019 | colorRendering: 'color-rendering',
|
11020 | contentScriptType: 'contentScriptType',
|
11021 | contentStyleType: 'contentStyleType',
|
11022 | cursor: 0,
|
11023 | cx: 0,
|
11024 | cy: 0,
|
11025 | d: 0,
|
11026 | decelerate: 0,
|
11027 | descent: 0,
|
11028 | diffuseConstant: 'diffuseConstant',
|
11029 | direction: 0,
|
11030 | display: 0,
|
11031 | divisor: 0,
|
11032 | dominantBaseline: 'dominant-baseline',
|
11033 | dur: 0,
|
11034 | dx: 0,
|
11035 | dy: 0,
|
11036 | edgeMode: 'edgeMode',
|
11037 | elevation: 0,
|
11038 | enableBackground: 'enable-background',
|
11039 | end: 0,
|
11040 | exponent: 0,
|
11041 | externalResourcesRequired: 'externalResourcesRequired',
|
11042 | fill: 0,
|
11043 | fillOpacity: 'fill-opacity',
|
11044 | fillRule: 'fill-rule',
|
11045 | filter: 0,
|
11046 | filterRes: 'filterRes',
|
11047 | filterUnits: 'filterUnits',
|
11048 | floodColor: 'flood-color',
|
11049 | floodOpacity: 'flood-opacity',
|
11050 | focusable: 0,
|
11051 | fontFamily: 'font-family',
|
11052 | fontSize: 'font-size',
|
11053 | fontSizeAdjust: 'font-size-adjust',
|
11054 | fontStretch: 'font-stretch',
|
11055 | fontStyle: 'font-style',
|
11056 | fontVariant: 'font-variant',
|
11057 | fontWeight: 'font-weight',
|
11058 | format: 0,
|
11059 | from: 0,
|
11060 | fx: 0,
|
11061 | fy: 0,
|
11062 | g1: 0,
|
11063 | g2: 0,
|
11064 | glyphName: 'glyph-name',
|
11065 | glyphOrientationHorizontal: 'glyph-orientation-horizontal',
|
11066 | glyphOrientationVertical: 'glyph-orientation-vertical',
|
11067 | glyphRef: 'glyphRef',
|
11068 | gradientTransform: 'gradientTransform',
|
11069 | gradientUnits: 'gradientUnits',
|
11070 | hanging: 0,
|
11071 | horizAdvX: 'horiz-adv-x',
|
11072 | horizOriginX: 'horiz-origin-x',
|
11073 | ideographic: 0,
|
11074 | imageRendering: 'image-rendering',
|
11075 | 'in': 0,
|
11076 | in2: 0,
|
11077 | intercept: 0,
|
11078 | k: 0,
|
11079 | k1: 0,
|
11080 | k2: 0,
|
11081 | k3: 0,
|
11082 | k4: 0,
|
11083 | kernelMatrix: 'kernelMatrix',
|
11084 | kernelUnitLength: 'kernelUnitLength',
|
11085 | kerning: 0,
|
11086 | keyPoints: 'keyPoints',
|
11087 | keySplines: 'keySplines',
|
11088 | keyTimes: 'keyTimes',
|
11089 | lengthAdjust: 'lengthAdjust',
|
11090 | letterSpacing: 'letter-spacing',
|
11091 | lightingColor: 'lighting-color',
|
11092 | limitingConeAngle: 'limitingConeAngle',
|
11093 | local: 0,
|
11094 | markerEnd: 'marker-end',
|
11095 | markerMid: 'marker-mid',
|
11096 | markerStart: 'marker-start',
|
11097 | markerHeight: 'markerHeight',
|
11098 | markerUnits: 'markerUnits',
|
11099 | markerWidth: 'markerWidth',
|
11100 | mask: 0,
|
11101 | maskContentUnits: 'maskContentUnits',
|
11102 | maskUnits: 'maskUnits',
|
11103 | mathematical: 0,
|
11104 | mode: 0,
|
11105 | numOctaves: 'numOctaves',
|
11106 | offset: 0,
|
11107 | opacity: 0,
|
11108 | operator: 0,
|
11109 | order: 0,
|
11110 | orient: 0,
|
11111 | orientation: 0,
|
11112 | origin: 0,
|
11113 | overflow: 0,
|
11114 | overlinePosition: 'overline-position',
|
11115 | overlineThickness: 'overline-thickness',
|
11116 | paintOrder: 'paint-order',
|
11117 | panose1: 'panose-1',
|
11118 | pathLength: 'pathLength',
|
11119 | patternContentUnits: 'patternContentUnits',
|
11120 | patternTransform: 'patternTransform',
|
11121 | patternUnits: 'patternUnits',
|
11122 | pointerEvents: 'pointer-events',
|
11123 | points: 0,
|
11124 | pointsAtX: 'pointsAtX',
|
11125 | pointsAtY: 'pointsAtY',
|
11126 | pointsAtZ: 'pointsAtZ',
|
11127 | preserveAlpha: 'preserveAlpha',
|
11128 | preserveAspectRatio: 'preserveAspectRatio',
|
11129 | primitiveUnits: 'primitiveUnits',
|
11130 | r: 0,
|
11131 | radius: 0,
|
11132 | refX: 'refX',
|
11133 | refY: 'refY',
|
11134 | renderingIntent: 'rendering-intent',
|
11135 | repeatCount: 'repeatCount',
|
11136 | repeatDur: 'repeatDur',
|
11137 | requiredExtensions: 'requiredExtensions',
|
11138 | requiredFeatures: 'requiredFeatures',
|
11139 | restart: 0,
|
11140 | result: 0,
|
11141 | rotate: 0,
|
11142 | rx: 0,
|
11143 | ry: 0,
|
11144 | scale: 0,
|
11145 | seed: 0,
|
11146 | shapeRendering: 'shape-rendering',
|
11147 | slope: 0,
|
11148 | spacing: 0,
|
11149 | specularConstant: 'specularConstant',
|
11150 | specularExponent: 'specularExponent',
|
11151 | speed: 0,
|
11152 | spreadMethod: 'spreadMethod',
|
11153 | startOffset: 'startOffset',
|
11154 | stdDeviation: 'stdDeviation',
|
11155 | stemh: 0,
|
11156 | stemv: 0,
|
11157 | stitchTiles: 'stitchTiles',
|
11158 | stopColor: 'stop-color',
|
11159 | stopOpacity: 'stop-opacity',
|
11160 | strikethroughPosition: 'strikethrough-position',
|
11161 | strikethroughThickness: 'strikethrough-thickness',
|
11162 | string: 0,
|
11163 | stroke: 0,
|
11164 | strokeDasharray: 'stroke-dasharray',
|
11165 | strokeDashoffset: 'stroke-dashoffset',
|
11166 | strokeLinecap: 'stroke-linecap',
|
11167 | strokeLinejoin: 'stroke-linejoin',
|
11168 | strokeMiterlimit: 'stroke-miterlimit',
|
11169 | strokeOpacity: 'stroke-opacity',
|
11170 | strokeWidth: 'stroke-width',
|
11171 | surfaceScale: 'surfaceScale',
|
11172 | systemLanguage: 'systemLanguage',
|
11173 | tableValues: 'tableValues',
|
11174 | targetX: 'targetX',
|
11175 | targetY: 'targetY',
|
11176 | textAnchor: 'text-anchor',
|
11177 | textDecoration: 'text-decoration',
|
11178 | textRendering: 'text-rendering',
|
11179 | textLength: 'textLength',
|
11180 | to: 0,
|
11181 | transform: 0,
|
11182 | u1: 0,
|
11183 | u2: 0,
|
11184 | underlinePosition: 'underline-position',
|
11185 | underlineThickness: 'underline-thickness',
|
11186 | unicode: 0,
|
11187 | unicodeBidi: 'unicode-bidi',
|
11188 | unicodeRange: 'unicode-range',
|
11189 | unitsPerEm: 'units-per-em',
|
11190 | vAlphabetic: 'v-alphabetic',
|
11191 | vHanging: 'v-hanging',
|
11192 | vIdeographic: 'v-ideographic',
|
11193 | vMathematical: 'v-mathematical',
|
11194 | values: 0,
|
11195 | vectorEffect: 'vector-effect',
|
11196 | version: 0,
|
11197 | vertAdvY: 'vert-adv-y',
|
11198 | vertOriginX: 'vert-origin-x',
|
11199 | vertOriginY: 'vert-origin-y',
|
11200 | viewBox: 'viewBox',
|
11201 | viewTarget: 'viewTarget',
|
11202 | visibility: 0,
|
11203 | widths: 0,
|
11204 | wordSpacing: 'word-spacing',
|
11205 | writingMode: 'writing-mode',
|
11206 | x: 0,
|
11207 | xHeight: 'x-height',
|
11208 | x1: 0,
|
11209 | x2: 0,
|
11210 | xChannelSelector: 'xChannelSelector',
|
11211 | xlinkActuate: 'xlink:actuate',
|
11212 | xlinkArcrole: 'xlink:arcrole',
|
11213 | xlinkHref: 'xlink:href',
|
11214 | xlinkRole: 'xlink:role',
|
11215 | xlinkShow: 'xlink:show',
|
11216 | xlinkTitle: 'xlink:title',
|
11217 | xlinkType: 'xlink:type',
|
11218 | xmlBase: 'xml:base',
|
11219 | xmlns: 0,
|
11220 | xmlnsXlink: 'xmlns:xlink',
|
11221 | xmlLang: 'xml:lang',
|
11222 | xmlSpace: 'xml:space',
|
11223 | y: 0,
|
11224 | y1: 0,
|
11225 | y2: 0,
|
11226 | yChannelSelector: 'yChannelSelector',
|
11227 | z: 0,
|
11228 | zoomAndPan: 'zoomAndPan'
|
11229 | };
|
11230 |
|
11231 | var SVGDOMPropertyConfig = {
|
11232 | Properties: {},
|
11233 | DOMAttributeNamespaces: {
|
11234 | xlinkActuate: NS.xlink,
|
11235 | xlinkArcrole: NS.xlink,
|
11236 | xlinkHref: NS.xlink,
|
11237 | xlinkRole: NS.xlink,
|
11238 | xlinkShow: NS.xlink,
|
11239 | xlinkTitle: NS.xlink,
|
11240 | xlinkType: NS.xlink,
|
11241 | xmlBase: NS.xml,
|
11242 | xmlLang: NS.xml,
|
11243 | xmlSpace: NS.xml
|
11244 | },
|
11245 | DOMAttributeNames: {}
|
11246 | };
|
11247 |
|
11248 | Object.keys(ATTRS).forEach(function (key) {
|
11249 | SVGDOMPropertyConfig.Properties[key] = 0;
|
11250 | if (ATTRS[key]) {
|
11251 | SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
|
11252 | }
|
11253 | });
|
11254 |
|
11255 | module.exports = SVGDOMPropertyConfig;
|
11256 | },{}],78:[function(_dereq_,module,exports){
|
11257 |
|
11258 |
|
11259 |
|
11260 |
|
11261 |
|
11262 |
|
11263 |
|
11264 |
|
11265 | 'use strict';
|
11266 |
|
11267 | var EventPropagators = _dereq_(19);
|
11268 | var ExecutionEnvironment = _dereq_(127);
|
11269 | var ReactDOMComponentTree = _dereq_(32);
|
11270 | var ReactInputSelection = _dereq_(57);
|
11271 | var SyntheticEvent = _dereq_(84);
|
11272 |
|
11273 | var getActiveElement = _dereq_(136);
|
11274 | var isTextInputElement = _dereq_(114);
|
11275 | var shallowEqual = _dereq_(147);
|
11276 |
|
11277 | var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
|
11278 |
|
11279 | var eventTypes = {
|
11280 | select: {
|
11281 | phasedRegistrationNames: {
|
11282 | bubbled: 'onSelect',
|
11283 | captured: 'onSelectCapture'
|
11284 | },
|
11285 | dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']
|
11286 | }
|
11287 | };
|
11288 |
|
11289 | var activeElement = null;
|
11290 | var activeElementInst = null;
|
11291 | var lastSelection = null;
|
11292 | var mouseDown = false;
|
11293 |
|
11294 |
|
11295 |
|
11296 | var hasListener = false;
|
11297 |
|
11298 |
|
11299 |
|
11300 |
|
11301 |
|
11302 |
|
11303 |
|
11304 |
|
11305 |
|
11306 |
|
11307 | function getSelection(node) {
|
11308 | if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
|
11309 | return {
|
11310 | start: node.selectionStart,
|
11311 | end: node.selectionEnd
|
11312 | };
|
11313 | } else if (window.getSelection) {
|
11314 | var selection = window.getSelection();
|
11315 | return {
|
11316 | anchorNode: selection.anchorNode,
|
11317 | anchorOffset: selection.anchorOffset,
|
11318 | focusNode: selection.focusNode,
|
11319 | focusOffset: selection.focusOffset
|
11320 | };
|
11321 | } else if (document.selection) {
|
11322 | var range = document.selection.createRange();
|
11323 | return {
|
11324 | parentElement: range.parentElement(),
|
11325 | text: range.text,
|
11326 | top: range.boundingTop,
|
11327 | left: range.boundingLeft
|
11328 | };
|
11329 | }
|
11330 | }
|
11331 |
|
11332 |
|
11333 |
|
11334 |
|
11335 |
|
11336 |
|
11337 |
|
11338 | function constructSelectEvent(nativeEvent, nativeEventTarget) {
|
11339 |
|
11340 |
|
11341 |
|
11342 |
|
11343 | if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
|
11344 | return null;
|
11345 | }
|
11346 |
|
11347 |
|
11348 | var currentSelection = getSelection(activeElement);
|
11349 | if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
|
11350 | lastSelection = currentSelection;
|
11351 |
|
11352 | var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
|
11353 |
|
11354 | syntheticEvent.type = 'select';
|
11355 | syntheticEvent.target = activeElement;
|
11356 |
|
11357 | EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
|
11358 |
|
11359 | return syntheticEvent;
|
11360 | }
|
11361 |
|
11362 | return null;
|
11363 | }
|
11364 |
|
11365 |
|
11366 |
|
11367 |
|
11368 |
|
11369 |
|
11370 |
|
11371 |
|
11372 |
|
11373 |
|
11374 |
|
11375 |
|
11376 |
|
11377 |
|
11378 |
|
11379 | var SelectEventPlugin = {
|
11380 | eventTypes: eventTypes,
|
11381 |
|
11382 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
11383 | if (!hasListener) {
|
11384 | return null;
|
11385 | }
|
11386 |
|
11387 | var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
|
11388 |
|
11389 | switch (topLevelType) {
|
11390 |
|
11391 | case 'topFocus':
|
11392 | if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
|
11393 | activeElement = targetNode;
|
11394 | activeElementInst = targetInst;
|
11395 | lastSelection = null;
|
11396 | }
|
11397 | break;
|
11398 | case 'topBlur':
|
11399 | activeElement = null;
|
11400 | activeElementInst = null;
|
11401 | lastSelection = null;
|
11402 | break;
|
11403 |
|
11404 |
|
11405 | case 'topMouseDown':
|
11406 | mouseDown = true;
|
11407 | break;
|
11408 | case 'topContextMenu':
|
11409 | case 'topMouseUp':
|
11410 | mouseDown = false;
|
11411 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
11412 |
|
11413 |
|
11414 |
|
11415 |
|
11416 |
|
11417 |
|
11418 |
|
11419 |
|
11420 |
|
11421 | case 'topSelectionChange':
|
11422 | if (skipSelectionChangeEvent) {
|
11423 | break;
|
11424 | }
|
11425 |
|
11426 | case 'topKeyDown':
|
11427 | case 'topKeyUp':
|
11428 | return constructSelectEvent(nativeEvent, nativeEventTarget);
|
11429 | }
|
11430 |
|
11431 | return null;
|
11432 | },
|
11433 |
|
11434 | didPutListener: function (inst, registrationName, listener) {
|
11435 | if (registrationName === 'onSelect') {
|
11436 | hasListener = true;
|
11437 | }
|
11438 | }
|
11439 | };
|
11440 |
|
11441 | module.exports = SelectEventPlugin;
|
11442 | },{"114":114,"127":127,"136":136,"147":147,"19":19,"32":32,"57":57,"84":84}],79:[function(_dereq_,module,exports){
|
11443 |
|
11444 |
|
11445 |
|
11446 |
|
11447 |
|
11448 |
|
11449 |
|
11450 |
|
11451 |
|
11452 | 'use strict';
|
11453 |
|
11454 | var _prodInvariant = _dereq_(116);
|
11455 |
|
11456 | var EventListener = _dereq_(126);
|
11457 | var EventPropagators = _dereq_(19);
|
11458 | var ReactDOMComponentTree = _dereq_(32);
|
11459 | var SyntheticAnimationEvent = _dereq_(80);
|
11460 | var SyntheticClipboardEvent = _dereq_(81);
|
11461 | var SyntheticEvent = _dereq_(84);
|
11462 | var SyntheticFocusEvent = _dereq_(85);
|
11463 | var SyntheticKeyboardEvent = _dereq_(87);
|
11464 | var SyntheticMouseEvent = _dereq_(88);
|
11465 | var SyntheticDragEvent = _dereq_(83);
|
11466 | var SyntheticTouchEvent = _dereq_(89);
|
11467 | var SyntheticTransitionEvent = _dereq_(90);
|
11468 | var SyntheticUIEvent = _dereq_(91);
|
11469 | var SyntheticWheelEvent = _dereq_(92);
|
11470 |
|
11471 | var emptyFunction = _dereq_(133);
|
11472 | var getEventCharCode = _dereq_(103);
|
11473 | var invariant = _dereq_(141);
|
11474 |
|
11475 |
|
11476 |
|
11477 |
|
11478 |
|
11479 |
|
11480 |
|
11481 |
|
11482 |
|
11483 |
|
11484 |
|
11485 |
|
11486 |
|
11487 |
|
11488 |
|
11489 |
|
11490 |
|
11491 |
|
11492 |
|
11493 | var eventTypes = {};
|
11494 | var topLevelEventsToDispatchConfig = {};
|
11495 | ['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) {
|
11496 | var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
|
11497 | var onEvent = 'on' + capitalizedEvent;
|
11498 | var topEvent = 'top' + capitalizedEvent;
|
11499 |
|
11500 | var type = {
|
11501 | phasedRegistrationNames: {
|
11502 | bubbled: onEvent,
|
11503 | captured: onEvent + 'Capture'
|
11504 | },
|
11505 | dependencies: [topEvent]
|
11506 | };
|
11507 | eventTypes[event] = type;
|
11508 | topLevelEventsToDispatchConfig[topEvent] = type;
|
11509 | });
|
11510 |
|
11511 | var onClickListeners = {};
|
11512 |
|
11513 | function getDictionaryKey(inst) {
|
11514 |
|
11515 |
|
11516 | return '.' + inst._rootNodeID;
|
11517 | }
|
11518 |
|
11519 | function isInteractive(tag) {
|
11520 | return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
|
11521 | }
|
11522 |
|
11523 | var SimpleEventPlugin = {
|
11524 | eventTypes: eventTypes,
|
11525 |
|
11526 | extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
11527 | var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
|
11528 | if (!dispatchConfig) {
|
11529 | return null;
|
11530 | }
|
11531 | var EventConstructor;
|
11532 | switch (topLevelType) {
|
11533 | case 'topAbort':
|
11534 | case 'topCanPlay':
|
11535 | case 'topCanPlayThrough':
|
11536 | case 'topDurationChange':
|
11537 | case 'topEmptied':
|
11538 | case 'topEncrypted':
|
11539 | case 'topEnded':
|
11540 | case 'topError':
|
11541 | case 'topInput':
|
11542 | case 'topInvalid':
|
11543 | case 'topLoad':
|
11544 | case 'topLoadedData':
|
11545 | case 'topLoadedMetadata':
|
11546 | case 'topLoadStart':
|
11547 | case 'topPause':
|
11548 | case 'topPlay':
|
11549 | case 'topPlaying':
|
11550 | case 'topProgress':
|
11551 | case 'topRateChange':
|
11552 | case 'topReset':
|
11553 | case 'topSeeked':
|
11554 | case 'topSeeking':
|
11555 | case 'topStalled':
|
11556 | case 'topSubmit':
|
11557 | case 'topSuspend':
|
11558 | case 'topTimeUpdate':
|
11559 | case 'topVolumeChange':
|
11560 | case 'topWaiting':
|
11561 |
|
11562 |
|
11563 | EventConstructor = SyntheticEvent;
|
11564 | break;
|
11565 | case 'topKeyPress':
|
11566 |
|
11567 |
|
11568 |
|
11569 | if (getEventCharCode(nativeEvent) === 0) {
|
11570 | return null;
|
11571 | }
|
11572 |
|
11573 | case 'topKeyDown':
|
11574 | case 'topKeyUp':
|
11575 | EventConstructor = SyntheticKeyboardEvent;
|
11576 | break;
|
11577 | case 'topBlur':
|
11578 | case 'topFocus':
|
11579 | EventConstructor = SyntheticFocusEvent;
|
11580 | break;
|
11581 | case 'topClick':
|
11582 |
|
11583 |
|
11584 | if (nativeEvent.button === 2) {
|
11585 | return null;
|
11586 | }
|
11587 |
|
11588 | case 'topDoubleClick':
|
11589 | case 'topMouseDown':
|
11590 | case 'topMouseMove':
|
11591 | case 'topMouseUp':
|
11592 |
|
11593 |
|
11594 | case 'topMouseOut':
|
11595 | case 'topMouseOver':
|
11596 | case 'topContextMenu':
|
11597 | EventConstructor = SyntheticMouseEvent;
|
11598 | break;
|
11599 | case 'topDrag':
|
11600 | case 'topDragEnd':
|
11601 | case 'topDragEnter':
|
11602 | case 'topDragExit':
|
11603 | case 'topDragLeave':
|
11604 | case 'topDragOver':
|
11605 | case 'topDragStart':
|
11606 | case 'topDrop':
|
11607 | EventConstructor = SyntheticDragEvent;
|
11608 | break;
|
11609 | case 'topTouchCancel':
|
11610 | case 'topTouchEnd':
|
11611 | case 'topTouchMove':
|
11612 | case 'topTouchStart':
|
11613 | EventConstructor = SyntheticTouchEvent;
|
11614 | break;
|
11615 | case 'topAnimationEnd':
|
11616 | case 'topAnimationIteration':
|
11617 | case 'topAnimationStart':
|
11618 | EventConstructor = SyntheticAnimationEvent;
|
11619 | break;
|
11620 | case 'topTransitionEnd':
|
11621 | EventConstructor = SyntheticTransitionEvent;
|
11622 | break;
|
11623 | case 'topScroll':
|
11624 | EventConstructor = SyntheticUIEvent;
|
11625 | break;
|
11626 | case 'topWheel':
|
11627 | EventConstructor = SyntheticWheelEvent;
|
11628 | break;
|
11629 | case 'topCopy':
|
11630 | case 'topCut':
|
11631 | case 'topPaste':
|
11632 | EventConstructor = SyntheticClipboardEvent;
|
11633 | break;
|
11634 | }
|
11635 | !EventConstructor ? "development" !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
|
11636 | var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
|
11637 | EventPropagators.accumulateTwoPhaseDispatches(event);
|
11638 | return event;
|
11639 | },
|
11640 |
|
11641 | didPutListener: function (inst, registrationName, listener) {
|
11642 |
|
11643 |
|
11644 |
|
11645 |
|
11646 |
|
11647 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
11648 | var key = getDictionaryKey(inst);
|
11649 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
11650 | if (!onClickListeners[key]) {
|
11651 | onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
|
11652 | }
|
11653 | }
|
11654 | },
|
11655 |
|
11656 | willDeleteListener: function (inst, registrationName) {
|
11657 | if (registrationName === 'onClick' && !isInteractive(inst._tag)) {
|
11658 | var key = getDictionaryKey(inst);
|
11659 | onClickListeners[key].remove();
|
11660 | delete onClickListeners[key];
|
11661 | }
|
11662 | }
|
11663 | };
|
11664 |
|
11665 | module.exports = SimpleEventPlugin;
|
11666 | },{"103":103,"116":116,"126":126,"133":133,"141":141,"19":19,"32":32,"80":80,"81":81,"83":83,"84":84,"85":85,"87":87,"88":88,"89":89,"90":90,"91":91,"92":92}],80:[function(_dereq_,module,exports){
|
11667 |
|
11668 |
|
11669 |
|
11670 |
|
11671 |
|
11672 |
|
11673 |
|
11674 |
|
11675 | 'use strict';
|
11676 |
|
11677 | var SyntheticEvent = _dereq_(84);
|
11678 |
|
11679 |
|
11680 |
|
11681 |
|
11682 |
|
11683 |
|
11684 | var AnimationEventInterface = {
|
11685 | animationName: null,
|
11686 | elapsedTime: null,
|
11687 | pseudoElement: null
|
11688 | };
|
11689 |
|
11690 |
|
11691 |
|
11692 |
|
11693 |
|
11694 |
|
11695 |
|
11696 | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
11697 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
11698 | }
|
11699 |
|
11700 | SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
|
11701 |
|
11702 | module.exports = SyntheticAnimationEvent;
|
11703 | },{"84":84}],81:[function(_dereq_,module,exports){
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 |
|
11711 |
|
11712 | 'use strict';
|
11713 |
|
11714 | var SyntheticEvent = _dereq_(84);
|
11715 |
|
11716 |
|
11717 |
|
11718 |
|
11719 |
|
11720 | var ClipboardEventInterface = {
|
11721 | clipboardData: function (event) {
|
11722 | return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
11723 | }
|
11724 | };
|
11725 |
|
11726 |
|
11727 |
|
11728 |
|
11729 |
|
11730 |
|
11731 |
|
11732 | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
11733 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
11734 | }
|
11735 |
|
11736 | SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
|
11737 |
|
11738 | module.exports = SyntheticClipboardEvent;
|
11739 | },{"84":84}],82:[function(_dereq_,module,exports){
|
11740 |
|
11741 |
|
11742 |
|
11743 |
|
11744 |
|
11745 |
|
11746 |
|
11747 |
|
11748 | 'use strict';
|
11749 |
|
11750 | var SyntheticEvent = _dereq_(84);
|
11751 |
|
11752 |
|
11753 |
|
11754 |
|
11755 |
|
11756 | var CompositionEventInterface = {
|
11757 | data: null
|
11758 | };
|
11759 |
|
11760 |
|
11761 |
|
11762 |
|
11763 |
|
11764 |
|
11765 |
|
11766 | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
11767 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
11768 | }
|
11769 |
|
11770 | SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
|
11771 |
|
11772 | module.exports = SyntheticCompositionEvent;
|
11773 | },{"84":84}],83:[function(_dereq_,module,exports){
|
11774 |
|
11775 |
|
11776 |
|
11777 |
|
11778 |
|
11779 |
|
11780 |
|
11781 |
|
11782 | 'use strict';
|
11783 |
|
11784 | var SyntheticMouseEvent = _dereq_(88);
|
11785 |
|
11786 |
|
11787 |
|
11788 |
|
11789 |
|
11790 | var DragEventInterface = {
|
11791 | dataTransfer: null
|
11792 | };
|
11793 |
|
11794 |
|
11795 |
|
11796 |
|
11797 |
|
11798 |
|
11799 |
|
11800 | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
11801 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
11802 | }
|
11803 |
|
11804 | SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
|
11805 |
|
11806 | module.exports = SyntheticDragEvent;
|
11807 | },{"88":88}],84:[function(_dereq_,module,exports){
|
11808 |
|
11809 |
|
11810 |
|
11811 |
|
11812 |
|
11813 |
|
11814 |
|
11815 |
|
11816 | 'use strict';
|
11817 |
|
11818 | var _assign = _dereq_(149);
|
11819 |
|
11820 | var PooledClass = _dereq_(24);
|
11821 |
|
11822 | var emptyFunction = _dereq_(133);
|
11823 | var warning = _dereq_(148);
|
11824 |
|
11825 | var didWarnForAddedNewProperty = false;
|
11826 | var isProxySupported = typeof Proxy === 'function';
|
11827 |
|
11828 | var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
|
11829 |
|
11830 |
|
11831 |
|
11832 |
|
11833 |
|
11834 | var EventInterface = {
|
11835 | type: null,
|
11836 | target: null,
|
11837 |
|
11838 | currentTarget: emptyFunction.thatReturnsNull,
|
11839 | eventPhase: null,
|
11840 | bubbles: null,
|
11841 | cancelable: null,
|
11842 | timeStamp: function (event) {
|
11843 | return event.timeStamp || Date.now();
|
11844 | },
|
11845 | defaultPrevented: null,
|
11846 | isTrusted: null
|
11847 | };
|
11848 |
|
11849 |
|
11850 |
|
11851 |
|
11852 |
|
11853 |
|
11854 |
|
11855 |
|
11856 |
|
11857 |
|
11858 |
|
11859 |
|
11860 |
|
11861 |
|
11862 |
|
11863 |
|
11864 |
|
11865 |
|
11866 |
|
11867 | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
|
11868 | if ("development" !== 'production') {
|
11869 |
|
11870 | delete this.nativeEvent;
|
11871 | delete this.preventDefault;
|
11872 | delete this.stopPropagation;
|
11873 | }
|
11874 |
|
11875 | this.dispatchConfig = dispatchConfig;
|
11876 | this._targetInst = targetInst;
|
11877 | this.nativeEvent = nativeEvent;
|
11878 |
|
11879 | var Interface = this.constructor.Interface;
|
11880 | for (var propName in Interface) {
|
11881 | if (!Interface.hasOwnProperty(propName)) {
|
11882 | continue;
|
11883 | }
|
11884 | if ("development" !== 'production') {
|
11885 | delete this[propName];
|
11886 | }
|
11887 | var normalize = Interface[propName];
|
11888 | if (normalize) {
|
11889 | this[propName] = normalize(nativeEvent);
|
11890 | } else {
|
11891 | if (propName === 'target') {
|
11892 | this.target = nativeEventTarget;
|
11893 | } else {
|
11894 | this[propName] = nativeEvent[propName];
|
11895 | }
|
11896 | }
|
11897 | }
|
11898 |
|
11899 | var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
11900 | if (defaultPrevented) {
|
11901 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
11902 | } else {
|
11903 | this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
11904 | }
|
11905 | this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
11906 | return this;
|
11907 | }
|
11908 |
|
11909 | _assign(SyntheticEvent.prototype, {
|
11910 | preventDefault: function () {
|
11911 | this.defaultPrevented = true;
|
11912 | var event = this.nativeEvent;
|
11913 | if (!event) {
|
11914 | return;
|
11915 | }
|
11916 |
|
11917 | if (event.preventDefault) {
|
11918 | event.preventDefault();
|
11919 |
|
11920 | } else if (typeof event.returnValue !== 'unknown') {
|
11921 | event.returnValue = false;
|
11922 | }
|
11923 | this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
11924 | },
|
11925 |
|
11926 | stopPropagation: function () {
|
11927 | var event = this.nativeEvent;
|
11928 | if (!event) {
|
11929 | return;
|
11930 | }
|
11931 |
|
11932 | if (event.stopPropagation) {
|
11933 | event.stopPropagation();
|
11934 |
|
11935 | } else if (typeof event.cancelBubble !== 'unknown') {
|
11936 |
|
11937 |
|
11938 |
|
11939 |
|
11940 |
|
11941 | event.cancelBubble = true;
|
11942 | }
|
11943 |
|
11944 | this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
11945 | },
|
11946 |
|
11947 | |
11948 |
|
11949 |
|
11950 |
|
11951 |
|
11952 | persist: function () {
|
11953 | this.isPersistent = emptyFunction.thatReturnsTrue;
|
11954 | },
|
11955 |
|
11956 | |
11957 |
|
11958 |
|
11959 |
|
11960 |
|
11961 | isPersistent: emptyFunction.thatReturnsFalse,
|
11962 |
|
11963 | |
11964 |
|
11965 |
|
11966 | destructor: function () {
|
11967 | var Interface = this.constructor.Interface;
|
11968 | for (var propName in Interface) {
|
11969 | if ("development" !== 'production') {
|
11970 | Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
|
11971 | } else {
|
11972 | this[propName] = null;
|
11973 | }
|
11974 | }
|
11975 | for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
|
11976 | this[shouldBeReleasedProperties[i]] = null;
|
11977 | }
|
11978 | if ("development" !== 'production') {
|
11979 | Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
11980 | Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
11981 | Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
11982 | }
|
11983 | }
|
11984 | });
|
11985 |
|
11986 | SyntheticEvent.Interface = EventInterface;
|
11987 |
|
11988 |
|
11989 |
|
11990 |
|
11991 |
|
11992 |
|
11993 |
|
11994 | SyntheticEvent.augmentClass = function (Class, Interface) {
|
11995 | var Super = this;
|
11996 |
|
11997 | var E = function () {};
|
11998 | E.prototype = Super.prototype;
|
11999 | var prototype = new E();
|
12000 |
|
12001 | _assign(prototype, Class.prototype);
|
12002 | Class.prototype = prototype;
|
12003 | Class.prototype.constructor = Class;
|
12004 |
|
12005 | Class.Interface = _assign({}, Super.Interface, Interface);
|
12006 | Class.augmentClass = Super.augmentClass;
|
12007 |
|
12008 | PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
|
12009 | };
|
12010 |
|
12011 |
|
12012 |
|
12013 |
|
12014 |
|
12015 | if ("development" !== 'production') {
|
12016 | if (isProxySupported) {
|
12017 |
|
12018 | SyntheticEvent = new Proxy(SyntheticEvent, {
|
12019 | construct: function (target, args) {
|
12020 | return this.apply(target, Object.create(target.prototype), args);
|
12021 | },
|
12022 | apply: function (constructor, that, args) {
|
12023 | return new Proxy(constructor.apply(that, args), {
|
12024 | set: function (target, prop, value) {
|
12025 | if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
12026 | "development" !== '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;
|
12027 | didWarnForAddedNewProperty = true;
|
12028 | }
|
12029 | target[prop] = value;
|
12030 | return true;
|
12031 | }
|
12032 | });
|
12033 | }
|
12034 | });
|
12035 |
|
12036 | }
|
12037 | }
|
12038 |
|
12039 | PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
|
12040 |
|
12041 | module.exports = SyntheticEvent;
|
12042 |
|
12043 |
|
12044 |
|
12045 |
|
12046 |
|
12047 |
|
12048 |
|
12049 |
|
12050 | function getPooledWarningPropertyDefinition(propName, getVal) {
|
12051 | var isFunction = typeof getVal === 'function';
|
12052 | return {
|
12053 | configurable: true,
|
12054 | set: set,
|
12055 | get: get
|
12056 | };
|
12057 |
|
12058 | function set(val) {
|
12059 | var action = isFunction ? 'setting the method' : 'setting the property';
|
12060 | warn(action, 'This is effectively a no-op');
|
12061 | return val;
|
12062 | }
|
12063 |
|
12064 | function get() {
|
12065 | var action = isFunction ? 'accessing the method' : 'accessing the property';
|
12066 | var result = isFunction ? 'This is a no-op function' : 'This is set to null';
|
12067 | warn(action, result);
|
12068 | return getVal;
|
12069 | }
|
12070 |
|
12071 | function warn(action, result) {
|
12072 | var warningCondition = false;
|
12073 | "development" !== '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;
|
12074 | }
|
12075 | }
|
12076 | },{"133":133,"148":148,"149":149,"24":24}],85:[function(_dereq_,module,exports){
|
12077 |
|
12078 |
|
12079 |
|
12080 |
|
12081 |
|
12082 |
|
12083 |
|
12084 |
|
12085 | 'use strict';
|
12086 |
|
12087 | var SyntheticUIEvent = _dereq_(91);
|
12088 |
|
12089 |
|
12090 |
|
12091 |
|
12092 |
|
12093 | var FocusEventInterface = {
|
12094 | relatedTarget: null
|
12095 | };
|
12096 |
|
12097 |
|
12098 |
|
12099 |
|
12100 |
|
12101 |
|
12102 |
|
12103 | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12104 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12105 | }
|
12106 |
|
12107 | SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
|
12108 |
|
12109 | module.exports = SyntheticFocusEvent;
|
12110 | },{"91":91}],86:[function(_dereq_,module,exports){
|
12111 |
|
12112 |
|
12113 |
|
12114 |
|
12115 |
|
12116 |
|
12117 |
|
12118 |
|
12119 | 'use strict';
|
12120 |
|
12121 | var SyntheticEvent = _dereq_(84);
|
12122 |
|
12123 |
|
12124 |
|
12125 |
|
12126 |
|
12127 |
|
12128 | var InputEventInterface = {
|
12129 | data: null
|
12130 | };
|
12131 |
|
12132 |
|
12133 |
|
12134 |
|
12135 |
|
12136 |
|
12137 |
|
12138 | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12139 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12140 | }
|
12141 |
|
12142 | SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
|
12143 |
|
12144 | module.exports = SyntheticInputEvent;
|
12145 | },{"84":84}],87:[function(_dereq_,module,exports){
|
12146 |
|
12147 |
|
12148 |
|
12149 |
|
12150 |
|
12151 |
|
12152 |
|
12153 |
|
12154 | 'use strict';
|
12155 |
|
12156 | var SyntheticUIEvent = _dereq_(91);
|
12157 |
|
12158 | var getEventCharCode = _dereq_(103);
|
12159 | var getEventKey = _dereq_(104);
|
12160 | var getEventModifierState = _dereq_(105);
|
12161 |
|
12162 |
|
12163 |
|
12164 |
|
12165 |
|
12166 | var KeyboardEventInterface = {
|
12167 | key: getEventKey,
|
12168 | location: null,
|
12169 | ctrlKey: null,
|
12170 | shiftKey: null,
|
12171 | altKey: null,
|
12172 | metaKey: null,
|
12173 | repeat: null,
|
12174 | locale: null,
|
12175 | getModifierState: getEventModifierState,
|
12176 |
|
12177 | charCode: function (event) {
|
12178 |
|
12179 |
|
12180 |
|
12181 |
|
12182 |
|
12183 | if (event.type === 'keypress') {
|
12184 | return getEventCharCode(event);
|
12185 | }
|
12186 | return 0;
|
12187 | },
|
12188 | keyCode: function (event) {
|
12189 |
|
12190 |
|
12191 |
|
12192 |
|
12193 |
|
12194 |
|
12195 |
|
12196 | if (event.type === 'keydown' || event.type === 'keyup') {
|
12197 | return event.keyCode;
|
12198 | }
|
12199 | return 0;
|
12200 | },
|
12201 | which: function (event) {
|
12202 |
|
12203 |
|
12204 | if (event.type === 'keypress') {
|
12205 | return getEventCharCode(event);
|
12206 | }
|
12207 | if (event.type === 'keydown' || event.type === 'keyup') {
|
12208 | return event.keyCode;
|
12209 | }
|
12210 | return 0;
|
12211 | }
|
12212 | };
|
12213 |
|
12214 |
|
12215 |
|
12216 |
|
12217 |
|
12218 |
|
12219 |
|
12220 | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12221 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12222 | }
|
12223 |
|
12224 | SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
|
12225 |
|
12226 | module.exports = SyntheticKeyboardEvent;
|
12227 | },{"103":103,"104":104,"105":105,"91":91}],88:[function(_dereq_,module,exports){
|
12228 |
|
12229 |
|
12230 |
|
12231 |
|
12232 |
|
12233 |
|
12234 |
|
12235 |
|
12236 | 'use strict';
|
12237 |
|
12238 | var SyntheticUIEvent = _dereq_(91);
|
12239 | var ViewportMetrics = _dereq_(94);
|
12240 |
|
12241 | var getEventModifierState = _dereq_(105);
|
12242 |
|
12243 |
|
12244 |
|
12245 |
|
12246 |
|
12247 | var MouseEventInterface = {
|
12248 | screenX: null,
|
12249 | screenY: null,
|
12250 | clientX: null,
|
12251 | clientY: null,
|
12252 | ctrlKey: null,
|
12253 | shiftKey: null,
|
12254 | altKey: null,
|
12255 | metaKey: null,
|
12256 | getModifierState: getEventModifierState,
|
12257 | button: function (event) {
|
12258 |
|
12259 |
|
12260 |
|
12261 | var button = event.button;
|
12262 | if ('which' in event) {
|
12263 | return button;
|
12264 | }
|
12265 |
|
12266 |
|
12267 |
|
12268 |
|
12269 | return button === 2 ? 2 : button === 4 ? 1 : 0;
|
12270 | },
|
12271 | buttons: null,
|
12272 | relatedTarget: function (event) {
|
12273 | return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
|
12274 | },
|
12275 |
|
12276 | pageX: function (event) {
|
12277 | return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
|
12278 | },
|
12279 | pageY: function (event) {
|
12280 | return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
|
12281 | }
|
12282 | };
|
12283 |
|
12284 |
|
12285 |
|
12286 |
|
12287 |
|
12288 |
|
12289 |
|
12290 | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12291 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12292 | }
|
12293 |
|
12294 | SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
|
12295 |
|
12296 | module.exports = SyntheticMouseEvent;
|
12297 | },{"105":105,"91":91,"94":94}],89:[function(_dereq_,module,exports){
|
12298 |
|
12299 |
|
12300 |
|
12301 |
|
12302 |
|
12303 |
|
12304 |
|
12305 |
|
12306 | 'use strict';
|
12307 |
|
12308 | var SyntheticUIEvent = _dereq_(91);
|
12309 |
|
12310 | var getEventModifierState = _dereq_(105);
|
12311 |
|
12312 |
|
12313 |
|
12314 |
|
12315 |
|
12316 | var TouchEventInterface = {
|
12317 | touches: null,
|
12318 | targetTouches: null,
|
12319 | changedTouches: null,
|
12320 | altKey: null,
|
12321 | metaKey: null,
|
12322 | ctrlKey: null,
|
12323 | shiftKey: null,
|
12324 | getModifierState: getEventModifierState
|
12325 | };
|
12326 |
|
12327 |
|
12328 |
|
12329 |
|
12330 |
|
12331 |
|
12332 |
|
12333 | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12334 | return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12335 | }
|
12336 |
|
12337 | SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
|
12338 |
|
12339 | module.exports = SyntheticTouchEvent;
|
12340 | },{"105":105,"91":91}],90:[function(_dereq_,module,exports){
|
12341 |
|
12342 |
|
12343 |
|
12344 |
|
12345 |
|
12346 |
|
12347 |
|
12348 |
|
12349 | 'use strict';
|
12350 |
|
12351 | var SyntheticEvent = _dereq_(84);
|
12352 |
|
12353 |
|
12354 |
|
12355 |
|
12356 |
|
12357 |
|
12358 | var TransitionEventInterface = {
|
12359 | propertyName: null,
|
12360 | elapsedTime: null,
|
12361 | pseudoElement: null
|
12362 | };
|
12363 |
|
12364 |
|
12365 |
|
12366 |
|
12367 |
|
12368 |
|
12369 |
|
12370 | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12371 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12372 | }
|
12373 |
|
12374 | SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
|
12375 |
|
12376 | module.exports = SyntheticTransitionEvent;
|
12377 | },{"84":84}],91:[function(_dereq_,module,exports){
|
12378 |
|
12379 |
|
12380 |
|
12381 |
|
12382 |
|
12383 |
|
12384 |
|
12385 |
|
12386 | 'use strict';
|
12387 |
|
12388 | var SyntheticEvent = _dereq_(84);
|
12389 |
|
12390 | var getEventTarget = _dereq_(106);
|
12391 |
|
12392 |
|
12393 |
|
12394 |
|
12395 |
|
12396 | var UIEventInterface = {
|
12397 | view: function (event) {
|
12398 | if (event.view) {
|
12399 | return event.view;
|
12400 | }
|
12401 |
|
12402 | var target = getEventTarget(event);
|
12403 | if (target.window === target) {
|
12404 |
|
12405 | return target;
|
12406 | }
|
12407 |
|
12408 | var doc = target.ownerDocument;
|
12409 |
|
12410 | if (doc) {
|
12411 | return doc.defaultView || doc.parentWindow;
|
12412 | } else {
|
12413 | return window;
|
12414 | }
|
12415 | },
|
12416 | detail: function (event) {
|
12417 | return event.detail || 0;
|
12418 | }
|
12419 | };
|
12420 |
|
12421 |
|
12422 |
|
12423 |
|
12424 |
|
12425 |
|
12426 |
|
12427 | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12428 | return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12429 | }
|
12430 |
|
12431 | SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
|
12432 |
|
12433 | module.exports = SyntheticUIEvent;
|
12434 | },{"106":106,"84":84}],92:[function(_dereq_,module,exports){
|
12435 |
|
12436 |
|
12437 |
|
12438 |
|
12439 |
|
12440 |
|
12441 |
|
12442 |
|
12443 | 'use strict';
|
12444 |
|
12445 | var SyntheticMouseEvent = _dereq_(88);
|
12446 |
|
12447 |
|
12448 |
|
12449 |
|
12450 |
|
12451 | var WheelEventInterface = {
|
12452 | deltaX: function (event) {
|
12453 | return 'deltaX' in event ? event.deltaX :
|
12454 | 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
|
12455 | },
|
12456 | deltaY: function (event) {
|
12457 | return 'deltaY' in event ? event.deltaY :
|
12458 | 'wheelDeltaY' in event ? -event.wheelDeltaY :
|
12459 | 'wheelDelta' in event ? -event.wheelDelta : 0;
|
12460 | },
|
12461 | deltaZ: null,
|
12462 |
|
12463 |
|
12464 |
|
12465 |
|
12466 |
|
12467 | deltaMode: null
|
12468 | };
|
12469 |
|
12470 |
|
12471 |
|
12472 |
|
12473 |
|
12474 |
|
12475 |
|
12476 | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
|
12477 | return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
|
12478 | }
|
12479 |
|
12480 | SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
|
12481 |
|
12482 | module.exports = SyntheticWheelEvent;
|
12483 | },{"88":88}],93:[function(_dereq_,module,exports){
|
12484 |
|
12485 |
|
12486 |
|
12487 |
|
12488 |
|
12489 |
|
12490 |
|
12491 |
|
12492 |
|
12493 | 'use strict';
|
12494 |
|
12495 | var _prodInvariant = _dereq_(116);
|
12496 |
|
12497 | var invariant = _dereq_(141);
|
12498 |
|
12499 | var OBSERVED_ERROR = {};
|
12500 |
|
12501 |
|
12502 |
|
12503 |
|
12504 |
|
12505 |
|
12506 |
|
12507 |
|
12508 |
|
12509 |
|
12510 |
|
12511 |
|
12512 |
|
12513 |
|
12514 |
|
12515 |
|
12516 |
|
12517 |
|
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 | var TransactionImpl = {
|
12563 | |
12564 |
|
12565 |
|
12566 |
|
12567 |
|
12568 |
|
12569 |
|
12570 | reinitializeTransaction: function () {
|
12571 | this.transactionWrappers = this.getTransactionWrappers();
|
12572 | if (this.wrapperInitData) {
|
12573 | this.wrapperInitData.length = 0;
|
12574 | } else {
|
12575 | this.wrapperInitData = [];
|
12576 | }
|
12577 | this._isInTransaction = false;
|
12578 | },
|
12579 |
|
12580 | _isInTransaction: false,
|
12581 |
|
12582 | |
12583 |
|
12584 |
|
12585 |
|
12586 | getTransactionWrappers: null,
|
12587 |
|
12588 | isInTransaction: function () {
|
12589 | return !!this._isInTransaction;
|
12590 | },
|
12591 |
|
12592 |
|
12593 |
|
12594 | |
12595 |
|
12596 |
|
12597 |
|
12598 |
|
12599 |
|
12600 |
|
12601 |
|
12602 |
|
12603 |
|
12604 |
|
12605 |
|
12606 |
|
12607 |
|
12608 |
|
12609 |
|
12610 |
|
12611 | perform: function (method, scope, a, b, c, d, e, f) {
|
12612 |
|
12613 | !!this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
|
12614 | var errorThrown;
|
12615 | var ret;
|
12616 | try {
|
12617 | this._isInTransaction = true;
|
12618 |
|
12619 |
|
12620 |
|
12621 |
|
12622 | errorThrown = true;
|
12623 | this.initializeAll(0);
|
12624 | ret = method.call(scope, a, b, c, d, e, f);
|
12625 | errorThrown = false;
|
12626 | } finally {
|
12627 | try {
|
12628 | if (errorThrown) {
|
12629 |
|
12630 |
|
12631 | try {
|
12632 | this.closeAll(0);
|
12633 | } catch (err) {}
|
12634 | } else {
|
12635 |
|
12636 |
|
12637 | this.closeAll(0);
|
12638 | }
|
12639 | } finally {
|
12640 | this._isInTransaction = false;
|
12641 | }
|
12642 | }
|
12643 | return ret;
|
12644 | },
|
12645 |
|
12646 | initializeAll: function (startIndex) {
|
12647 | var transactionWrappers = this.transactionWrappers;
|
12648 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
12649 | var wrapper = transactionWrappers[i];
|
12650 | try {
|
12651 |
|
12652 |
|
12653 |
|
12654 |
|
12655 | this.wrapperInitData[i] = OBSERVED_ERROR;
|
12656 | this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
|
12657 | } finally {
|
12658 | if (this.wrapperInitData[i] === OBSERVED_ERROR) {
|
12659 |
|
12660 |
|
12661 |
|
12662 | try {
|
12663 | this.initializeAll(i + 1);
|
12664 | } catch (err) {}
|
12665 | }
|
12666 | }
|
12667 | }
|
12668 | },
|
12669 |
|
12670 | |
12671 |
|
12672 |
|
12673 |
|
12674 |
|
12675 |
|
12676 | closeAll: function (startIndex) {
|
12677 | !this.isInTransaction() ? "development" !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
|
12678 | var transactionWrappers = this.transactionWrappers;
|
12679 | for (var i = startIndex; i < transactionWrappers.length; i++) {
|
12680 | var wrapper = transactionWrappers[i];
|
12681 | var initData = this.wrapperInitData[i];
|
12682 | var errorThrown;
|
12683 | try {
|
12684 |
|
12685 |
|
12686 |
|
12687 |
|
12688 | errorThrown = true;
|
12689 | if (initData !== OBSERVED_ERROR && wrapper.close) {
|
12690 | wrapper.close.call(this, initData);
|
12691 | }
|
12692 | errorThrown = false;
|
12693 | } finally {
|
12694 | if (errorThrown) {
|
12695 |
|
12696 |
|
12697 |
|
12698 | try {
|
12699 | this.closeAll(i + 1);
|
12700 | } catch (e) {}
|
12701 | }
|
12702 | }
|
12703 | }
|
12704 | this.wrapperInitData.length = 0;
|
12705 | }
|
12706 | };
|
12707 |
|
12708 | module.exports = TransactionImpl;
|
12709 | },{"116":116,"141":141}],94:[function(_dereq_,module,exports){
|
12710 |
|
12711 |
|
12712 |
|
12713 |
|
12714 |
|
12715 |
|
12716 |
|
12717 |
|
12718 | 'use strict';
|
12719 |
|
12720 | var ViewportMetrics = {
|
12721 | currentScrollLeft: 0,
|
12722 |
|
12723 | currentScrollTop: 0,
|
12724 |
|
12725 | refreshScrollValues: function (scrollPosition) {
|
12726 | ViewportMetrics.currentScrollLeft = scrollPosition.x;
|
12727 | ViewportMetrics.currentScrollTop = scrollPosition.y;
|
12728 | }
|
12729 | };
|
12730 |
|
12731 | module.exports = ViewportMetrics;
|
12732 | },{}],95:[function(_dereq_,module,exports){
|
12733 |
|
12734 |
|
12735 |
|
12736 |
|
12737 |
|
12738 |
|
12739 |
|
12740 |
|
12741 |
|
12742 | 'use strict';
|
12743 |
|
12744 | var _prodInvariant = _dereq_(116);
|
12745 |
|
12746 | var invariant = _dereq_(141);
|
12747 |
|
12748 |
|
12749 |
|
12750 |
|
12751 |
|
12752 |
|
12753 |
|
12754 |
|
12755 |
|
12756 |
|
12757 |
|
12758 |
|
12759 |
|
12760 |
|
12761 | function accumulateInto(current, next) {
|
12762 | !(next != null) ? "development" !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
|
12763 |
|
12764 | if (current == null) {
|
12765 | return next;
|
12766 | }
|
12767 |
|
12768 |
|
12769 |
|
12770 | if (Array.isArray(current)) {
|
12771 | if (Array.isArray(next)) {
|
12772 | current.push.apply(current, next);
|
12773 | return current;
|
12774 | }
|
12775 | current.push(next);
|
12776 | return current;
|
12777 | }
|
12778 |
|
12779 | if (Array.isArray(next)) {
|
12780 |
|
12781 | return [current].concat(next);
|
12782 | }
|
12783 |
|
12784 | return [current, next];
|
12785 | }
|
12786 |
|
12787 | module.exports = accumulateInto;
|
12788 | },{"116":116,"141":141}],96:[function(_dereq_,module,exports){
|
12789 |
|
12790 |
|
12791 |
|
12792 |
|
12793 |
|
12794 |
|
12795 |
|
12796 |
|
12797 |
|
12798 | 'use strict';
|
12799 |
|
12800 | var MOD = 65521;
|
12801 |
|
12802 |
|
12803 |
|
12804 |
|
12805 |
|
12806 |
|
12807 | function adler32(data) {
|
12808 | var a = 1;
|
12809 | var b = 0;
|
12810 | var i = 0;
|
12811 | var l = data.length;
|
12812 | var m = l & ~0x3;
|
12813 | while (i < m) {
|
12814 | var n = Math.min(i + 4096, m);
|
12815 | for (; i < n; i += 4) {
|
12816 | b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
|
12817 | }
|
12818 | a %= MOD;
|
12819 | b %= MOD;
|
12820 | }
|
12821 | for (; i < l; i++) {
|
12822 | b += a += data.charCodeAt(i);
|
12823 | }
|
12824 | a %= MOD;
|
12825 | b %= MOD;
|
12826 | return a | b << 16;
|
12827 | }
|
12828 |
|
12829 | module.exports = adler32;
|
12830 | },{}],97:[function(_dereq_,module,exports){
|
12831 | (function (process){
|
12832 |
|
12833 |
|
12834 |
|
12835 |
|
12836 |
|
12837 |
|
12838 |
|
12839 |
|
12840 | 'use strict';
|
12841 |
|
12842 | var _prodInvariant = _dereq_(116);
|
12843 |
|
12844 | var ReactPropTypeLocationNames = _dereq_(65);
|
12845 | var ReactPropTypesSecret = _dereq_(66);
|
12846 |
|
12847 | var invariant = _dereq_(141);
|
12848 | var warning = _dereq_(148);
|
12849 |
|
12850 | var ReactComponentTreeHook;
|
12851 |
|
12852 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
12853 |
|
12854 |
|
12855 |
|
12856 |
|
12857 |
|
12858 | ReactComponentTreeHook = _dereq_(122);
|
12859 | }
|
12860 |
|
12861 | var loggedTypeFailures = {};
|
12862 |
|
12863 |
|
12864 |
|
12865 |
|
12866 |
|
12867 |
|
12868 |
|
12869 |
|
12870 |
|
12871 |
|
12872 |
|
12873 |
|
12874 |
|
12875 | function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
|
12876 | for (var typeSpecName in typeSpecs) {
|
12877 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
12878 | var error;
|
12879 |
|
12880 |
|
12881 |
|
12882 | try {
|
12883 |
|
12884 |
|
12885 | !(typeof typeSpecs[typeSpecName] === 'function') ? "development" !== '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;
|
12886 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
12887 | } catch (ex) {
|
12888 | error = ex;
|
12889 | }
|
12890 | "development" !== '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;
|
12891 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
12892 |
|
12893 |
|
12894 | loggedTypeFailures[error.message] = true;
|
12895 |
|
12896 | var componentStackInfo = '';
|
12897 |
|
12898 | if ("development" !== 'production') {
|
12899 | if (!ReactComponentTreeHook) {
|
12900 | ReactComponentTreeHook = _dereq_(122);
|
12901 | }
|
12902 | if (debugID !== null) {
|
12903 | componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
|
12904 | } else if (element !== null) {
|
12905 | componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
|
12906 | }
|
12907 | }
|
12908 |
|
12909 | "development" !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
|
12910 | }
|
12911 | }
|
12912 | }
|
12913 | }
|
12914 |
|
12915 | module.exports = checkReactTypeSpec;
|
12916 | }).call(this,undefined)
|
12917 | },{"116":116,"122":122,"141":141,"148":148,"65":65,"66":66}],98:[function(_dereq_,module,exports){
|
12918 |
|
12919 |
|
12920 |
|
12921 |
|
12922 |
|
12923 |
|
12924 |
|
12925 |
|
12926 |
|
12927 |
|
12928 | 'use strict';
|
12929 |
|
12930 |
|
12931 |
|
12932 |
|
12933 |
|
12934 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
12935 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
12936 | return function (arg0, arg1, arg2, arg3) {
|
12937 | MSApp.execUnsafeLocalFunction(function () {
|
12938 | return func(arg0, arg1, arg2, arg3);
|
12939 | });
|
12940 | };
|
12941 | } else {
|
12942 | return func;
|
12943 | }
|
12944 | };
|
12945 |
|
12946 | module.exports = createMicrosoftUnsafeLocalFunction;
|
12947 | },{}],99:[function(_dereq_,module,exports){
|
12948 |
|
12949 |
|
12950 |
|
12951 |
|
12952 |
|
12953 |
|
12954 |
|
12955 |
|
12956 | 'use strict';
|
12957 |
|
12958 | var CSSProperty = _dereq_(4);
|
12959 | var warning = _dereq_(148);
|
12960 |
|
12961 | var isUnitlessNumber = CSSProperty.isUnitlessNumber;
|
12962 | var styleWarnings = {};
|
12963 |
|
12964 |
|
12965 |
|
12966 |
|
12967 |
|
12968 |
|
12969 |
|
12970 |
|
12971 |
|
12972 |
|
12973 |
|
12974 | function dangerousStyleValue(name, value, component, isCustomProperty) {
|
12975 |
|
12976 |
|
12977 |
|
12978 |
|
12979 |
|
12980 |
|
12981 |
|
12982 |
|
12983 |
|
12984 |
|
12985 | var isEmpty = value == null || typeof value === 'boolean' || value === '';
|
12986 | if (isEmpty) {
|
12987 | return '';
|
12988 | }
|
12989 |
|
12990 | var isNonNumeric = isNaN(value);
|
12991 | if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
|
12992 | return '' + value;
|
12993 | }
|
12994 |
|
12995 | if (typeof value === 'string') {
|
12996 | if ("development" !== 'production') {
|
12997 |
|
12998 |
|
12999 | if (component && value !== '0') {
|
13000 | var owner = component._currentElement._owner;
|
13001 | var ownerName = owner ? owner.getName() : null;
|
13002 | if (ownerName && !styleWarnings[ownerName]) {
|
13003 | styleWarnings[ownerName] = {};
|
13004 | }
|
13005 | var warned = false;
|
13006 | if (ownerName) {
|
13007 | var warnings = styleWarnings[ownerName];
|
13008 | warned = warnings[name];
|
13009 | if (!warned) {
|
13010 | warnings[name] = true;
|
13011 | }
|
13012 | }
|
13013 | if (!warned) {
|
13014 | "development" !== '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;
|
13015 | }
|
13016 | }
|
13017 | }
|
13018 | value = value.trim();
|
13019 | }
|
13020 | return value + 'px';
|
13021 | }
|
13022 |
|
13023 | module.exports = dangerousStyleValue;
|
13024 | },{"148":148,"4":4}],100:[function(_dereq_,module,exports){
|
13025 |
|
13026 |
|
13027 |
|
13028 |
|
13029 |
|
13030 |
|
13031 |
|
13032 |
|
13033 |
|
13034 |
|
13035 |
|
13036 |
|
13037 |
|
13038 |
|
13039 |
|
13040 |
|
13041 |
|
13042 |
|
13043 |
|
13044 |
|
13045 |
|
13046 |
|
13047 |
|
13048 |
|
13049 |
|
13050 |
|
13051 |
|
13052 |
|
13053 |
|
13054 |
|
13055 |
|
13056 |
|
13057 |
|
13058 | 'use strict';
|
13059 |
|
13060 |
|
13061 |
|
13062 |
|
13063 |
|
13064 |
|
13065 |
|
13066 | var matchHtmlRegExp = /["'&<>]/;
|
13067 |
|
13068 |
|
13069 |
|
13070 |
|
13071 |
|
13072 |
|
13073 |
|
13074 |
|
13075 |
|
13076 | function escapeHtml(string) {
|
13077 | var str = '' + string;
|
13078 | var match = matchHtmlRegExp.exec(str);
|
13079 |
|
13080 | if (!match) {
|
13081 | return str;
|
13082 | }
|
13083 |
|
13084 | var escape;
|
13085 | var html = '';
|
13086 | var index = 0;
|
13087 | var lastIndex = 0;
|
13088 |
|
13089 | for (index = match.index; index < str.length; index++) {
|
13090 | switch (str.charCodeAt(index)) {
|
13091 | case 34:
|
13092 |
|
13093 | escape = '"';
|
13094 | break;
|
13095 | case 38:
|
13096 |
|
13097 | escape = '&';
|
13098 | break;
|
13099 | case 39:
|
13100 |
|
13101 | escape = ''';
|
13102 | break;
|
13103 | case 60:
|
13104 |
|
13105 | escape = '<';
|
13106 | break;
|
13107 | case 62:
|
13108 |
|
13109 | escape = '>';
|
13110 | break;
|
13111 | default:
|
13112 | continue;
|
13113 | }
|
13114 |
|
13115 | if (lastIndex !== index) {
|
13116 | html += str.substring(lastIndex, index);
|
13117 | }
|
13118 |
|
13119 | lastIndex = index + 1;
|
13120 | html += escape;
|
13121 | }
|
13122 |
|
13123 | return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
13124 | }
|
13125 |
|
13126 |
|
13127 |
|
13128 |
|
13129 |
|
13130 |
|
13131 |
|
13132 |
|
13133 | function escapeTextContentForBrowser(text) {
|
13134 | if (typeof text === 'boolean' || typeof text === 'number') {
|
13135 |
|
13136 |
|
13137 |
|
13138 | return '' + text;
|
13139 | }
|
13140 | return escapeHtml(text);
|
13141 | }
|
13142 |
|
13143 | module.exports = escapeTextContentForBrowser;
|
13144 | },{}],101:[function(_dereq_,module,exports){
|
13145 | (function (process){
|
13146 |
|
13147 |
|
13148 |
|
13149 |
|
13150 |
|
13151 |
|
13152 |
|
13153 |
|
13154 |
|
13155 | 'use strict';
|
13156 |
|
13157 | var KeyEscapeUtils = _dereq_(22);
|
13158 | var traverseAllChildren = _dereq_(120);
|
13159 | var warning = _dereq_(148);
|
13160 |
|
13161 | var ReactComponentTreeHook;
|
13162 |
|
13163 | if (typeof process !== 'undefined' && process.env && "development" === 'test') {
|
13164 |
|
13165 |
|
13166 |
|
13167 |
|
13168 |
|
13169 | ReactComponentTreeHook = _dereq_(122);
|
13170 | }
|
13171 |
|
13172 |
|
13173 |
|
13174 |
|
13175 |
|
13176 |
|
13177 |
|
13178 | function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
|
13179 |
|
13180 | if (traverseContext && typeof traverseContext === 'object') {
|
13181 | var result = traverseContext;
|
13182 | var keyUnique = result[name] === undefined;
|
13183 | if ("development" !== 'production') {
|
13184 | if (!ReactComponentTreeHook) {
|
13185 | ReactComponentTreeHook = _dereq_(122);
|
13186 | }
|
13187 | if (!keyUnique) {
|
13188 | "development" !== '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;
|
13189 | }
|
13190 | }
|
13191 | if (keyUnique && child != null) {
|
13192 | result[name] = child;
|
13193 | }
|
13194 | }
|
13195 | }
|
13196 |
|
13197 |
|
13198 |
|
13199 |
|
13200 |
|
13201 |
|
13202 | function flattenChildren(children, selfDebugID) {
|
13203 | if (children == null) {
|
13204 | return children;
|
13205 | }
|
13206 | var result = {};
|
13207 |
|
13208 | if ("development" !== 'production') {
|
13209 | traverseAllChildren(children, function (traverseContext, child, name) {
|
13210 | return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
|
13211 | }, result);
|
13212 | } else {
|
13213 | traverseAllChildren(children, flattenSingleChildIntoContext, result);
|
13214 | }
|
13215 | return result;
|
13216 | }
|
13217 |
|
13218 | module.exports = flattenChildren;
|
13219 | }).call(this,undefined)
|
13220 | },{"120":120,"122":122,"148":148,"22":22}],102:[function(_dereq_,module,exports){
|
13221 |
|
13222 |
|
13223 |
|
13224 |
|
13225 |
|
13226 |
|
13227 |
|
13228 |
|
13229 |
|
13230 | 'use strict';
|
13231 |
|
13232 |
|
13233 |
|
13234 |
|
13235 |
|
13236 |
|
13237 |
|
13238 |
|
13239 |
|
13240 | function forEachAccumulated(arr, cb, scope) {
|
13241 | if (Array.isArray(arr)) {
|
13242 | arr.forEach(cb, scope);
|
13243 | } else if (arr) {
|
13244 | cb.call(scope, arr);
|
13245 | }
|
13246 | }
|
13247 |
|
13248 | module.exports = forEachAccumulated;
|
13249 | },{}],103:[function(_dereq_,module,exports){
|
13250 |
|
13251 |
|
13252 |
|
13253 |
|
13254 |
|
13255 |
|
13256 |
|
13257 |
|
13258 | 'use strict';
|
13259 |
|
13260 |
|
13261 |
|
13262 |
|
13263 |
|
13264 |
|
13265 |
|
13266 |
|
13267 |
|
13268 |
|
13269 |
|
13270 |
|
13271 | function getEventCharCode(nativeEvent) {
|
13272 | var charCode;
|
13273 | var keyCode = nativeEvent.keyCode;
|
13274 |
|
13275 | if ('charCode' in nativeEvent) {
|
13276 | charCode = nativeEvent.charCode;
|
13277 |
|
13278 |
|
13279 | if (charCode === 0 && keyCode === 13) {
|
13280 | charCode = 13;
|
13281 | }
|
13282 | } else {
|
13283 |
|
13284 | charCode = keyCode;
|
13285 | }
|
13286 |
|
13287 |
|
13288 |
|
13289 | if (charCode >= 32 || charCode === 13) {
|
13290 | return charCode;
|
13291 | }
|
13292 |
|
13293 | return 0;
|
13294 | }
|
13295 |
|
13296 | module.exports = getEventCharCode;
|
13297 | },{}],104:[function(_dereq_,module,exports){
|
13298 |
|
13299 |
|
13300 |
|
13301 |
|
13302 |
|
13303 |
|
13304 |
|
13305 |
|
13306 | 'use strict';
|
13307 |
|
13308 | var getEventCharCode = _dereq_(103);
|
13309 |
|
13310 |
|
13311 |
|
13312 |
|
13313 |
|
13314 | var normalizeKey = {
|
13315 | Esc: 'Escape',
|
13316 | Spacebar: ' ',
|
13317 | Left: 'ArrowLeft',
|
13318 | Up: 'ArrowUp',
|
13319 | Right: 'ArrowRight',
|
13320 | Down: 'ArrowDown',
|
13321 | Del: 'Delete',
|
13322 | Win: 'OS',
|
13323 | Menu: 'ContextMenu',
|
13324 | Apps: 'ContextMenu',
|
13325 | Scroll: 'ScrollLock',
|
13326 | MozPrintableKey: 'Unidentified'
|
13327 | };
|
13328 |
|
13329 |
|
13330 |
|
13331 |
|
13332 |
|
13333 |
|
13334 | var translateToKey = {
|
13335 | 8: 'Backspace',
|
13336 | 9: 'Tab',
|
13337 | 12: 'Clear',
|
13338 | 13: 'Enter',
|
13339 | 16: 'Shift',
|
13340 | 17: 'Control',
|
13341 | 18: 'Alt',
|
13342 | 19: 'Pause',
|
13343 | 20: 'CapsLock',
|
13344 | 27: 'Escape',
|
13345 | 32: ' ',
|
13346 | 33: 'PageUp',
|
13347 | 34: 'PageDown',
|
13348 | 35: 'End',
|
13349 | 36: 'Home',
|
13350 | 37: 'ArrowLeft',
|
13351 | 38: 'ArrowUp',
|
13352 | 39: 'ArrowRight',
|
13353 | 40: 'ArrowDown',
|
13354 | 45: 'Insert',
|
13355 | 46: 'Delete',
|
13356 | 112: 'F1',
|
13357 | 113: 'F2',
|
13358 | 114: 'F3',
|
13359 | 115: 'F4',
|
13360 | 116: 'F5',
|
13361 | 117: 'F6',
|
13362 | 118: 'F7',
|
13363 | 119: 'F8',
|
13364 | 120: 'F9',
|
13365 | 121: 'F10',
|
13366 | 122: 'F11',
|
13367 | 123: 'F12',
|
13368 | 144: 'NumLock',
|
13369 | 145: 'ScrollLock',
|
13370 | 224: 'Meta'
|
13371 | };
|
13372 |
|
13373 |
|
13374 |
|
13375 |
|
13376 |
|
13377 | function getEventKey(nativeEvent) {
|
13378 | if (nativeEvent.key) {
|
13379 |
|
13380 |
|
13381 |
|
13382 |
|
13383 |
|
13384 | var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
|
13385 | if (key !== 'Unidentified') {
|
13386 | return key;
|
13387 | }
|
13388 | }
|
13389 |
|
13390 |
|
13391 | if (nativeEvent.type === 'keypress') {
|
13392 | var charCode = getEventCharCode(nativeEvent);
|
13393 |
|
13394 |
|
13395 |
|
13396 | return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
|
13397 | }
|
13398 | if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
|
13399 |
|
13400 |
|
13401 | return translateToKey[nativeEvent.keyCode] || 'Unidentified';
|
13402 | }
|
13403 | return '';
|
13404 | }
|
13405 |
|
13406 | module.exports = getEventKey;
|
13407 | },{"103":103}],105:[function(_dereq_,module,exports){
|
13408 |
|
13409 |
|
13410 |
|
13411 |
|
13412 |
|
13413 |
|
13414 |
|
13415 |
|
13416 | 'use strict';
|
13417 |
|
13418 |
|
13419 |
|
13420 |
|
13421 |
|
13422 |
|
13423 | var modifierKeyToProp = {
|
13424 | Alt: 'altKey',
|
13425 | Control: 'ctrlKey',
|
13426 | Meta: 'metaKey',
|
13427 | Shift: 'shiftKey'
|
13428 | };
|
13429 |
|
13430 |
|
13431 |
|
13432 |
|
13433 | function modifierStateGetter(keyArg) {
|
13434 | var syntheticEvent = this;
|
13435 | var nativeEvent = syntheticEvent.nativeEvent;
|
13436 | if (nativeEvent.getModifierState) {
|
13437 | return nativeEvent.getModifierState(keyArg);
|
13438 | }
|
13439 | var keyProp = modifierKeyToProp[keyArg];
|
13440 | return keyProp ? !!nativeEvent[keyProp] : false;
|
13441 | }
|
13442 |
|
13443 | function getEventModifierState(nativeEvent) {
|
13444 | return modifierStateGetter;
|
13445 | }
|
13446 |
|
13447 | module.exports = getEventModifierState;
|
13448 | },{}],106:[function(_dereq_,module,exports){
|
13449 |
|
13450 |
|
13451 |
|
13452 |
|
13453 |
|
13454 |
|
13455 |
|
13456 |
|
13457 | 'use strict';
|
13458 |
|
13459 |
|
13460 |
|
13461 |
|
13462 |
|
13463 |
|
13464 |
|
13465 |
|
13466 |
|
13467 | function getEventTarget(nativeEvent) {
|
13468 | var target = nativeEvent.target || nativeEvent.srcElement || window;
|
13469 |
|
13470 |
|
13471 | if (target.correspondingUseElement) {
|
13472 | target = target.correspondingUseElement;
|
13473 | }
|
13474 |
|
13475 |
|
13476 |
|
13477 | return target.nodeType === 3 ? target.parentNode : target;
|
13478 | }
|
13479 |
|
13480 | module.exports = getEventTarget;
|
13481 | },{}],107:[function(_dereq_,module,exports){
|
13482 |
|
13483 |
|
13484 |
|
13485 |
|
13486 |
|
13487 |
|
13488 |
|
13489 |
|
13490 |
|
13491 | 'use strict';
|
13492 |
|
13493 |
|
13494 |
|
13495 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
13496 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
13497 |
|
13498 |
|
13499 |
|
13500 |
|
13501 |
|
13502 |
|
13503 |
|
13504 |
|
13505 |
|
13506 |
|
13507 |
|
13508 |
|
13509 |
|
13510 |
|
13511 |
|
13512 | function getIteratorFn(maybeIterable) {
|
13513 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
13514 | if (typeof iteratorFn === 'function') {
|
13515 | return iteratorFn;
|
13516 | }
|
13517 | }
|
13518 |
|
13519 | module.exports = getIteratorFn;
|
13520 | },{}],108:[function(_dereq_,module,exports){
|
13521 |
|
13522 |
|
13523 |
|
13524 |
|
13525 |
|
13526 |
|
13527 |
|
13528 |
|
13529 | 'use strict';
|
13530 |
|
13531 |
|
13532 |
|
13533 |
|
13534 |
|
13535 |
|
13536 |
|
13537 |
|
13538 | function getLeafNode(node) {
|
13539 | while (node && node.firstChild) {
|
13540 | node = node.firstChild;
|
13541 | }
|
13542 | return node;
|
13543 | }
|
13544 |
|
13545 |
|
13546 |
|
13547 |
|
13548 |
|
13549 |
|
13550 |
|
13551 |
|
13552 | function getSiblingNode(node) {
|
13553 | while (node) {
|
13554 | if (node.nextSibling) {
|
13555 | return node.nextSibling;
|
13556 | }
|
13557 | node = node.parentNode;
|
13558 | }
|
13559 | }
|
13560 |
|
13561 |
|
13562 |
|
13563 |
|
13564 |
|
13565 |
|
13566 |
|
13567 |
|
13568 | function getNodeForCharacterOffset(root, offset) {
|
13569 | var node = getLeafNode(root);
|
13570 | var nodeStart = 0;
|
13571 | var nodeEnd = 0;
|
13572 |
|
13573 | while (node) {
|
13574 | if (node.nodeType === 3) {
|
13575 | nodeEnd = nodeStart + node.textContent.length;
|
13576 |
|
13577 | if (nodeStart <= offset && nodeEnd >= offset) {
|
13578 | return {
|
13579 | node: node,
|
13580 | offset: offset - nodeStart
|
13581 | };
|
13582 | }
|
13583 |
|
13584 | nodeStart = nodeEnd;
|
13585 | }
|
13586 |
|
13587 | node = getLeafNode(getSiblingNode(node));
|
13588 | }
|
13589 | }
|
13590 |
|
13591 | module.exports = getNodeForCharacterOffset;
|
13592 | },{}],109:[function(_dereq_,module,exports){
|
13593 |
|
13594 |
|
13595 |
|
13596 |
|
13597 |
|
13598 |
|
13599 |
|
13600 |
|
13601 | 'use strict';
|
13602 |
|
13603 | var ExecutionEnvironment = _dereq_(127);
|
13604 |
|
13605 | var contentKey = null;
|
13606 |
|
13607 |
|
13608 |
|
13609 |
|
13610 |
|
13611 |
|
13612 |
|
13613 | function getTextContentAccessor() {
|
13614 | if (!contentKey && ExecutionEnvironment.canUseDOM) {
|
13615 |
|
13616 |
|
13617 | contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
|
13618 | }
|
13619 | return contentKey;
|
13620 | }
|
13621 |
|
13622 | module.exports = getTextContentAccessor;
|
13623 | },{"127":127}],110:[function(_dereq_,module,exports){
|
13624 |
|
13625 |
|
13626 |
|
13627 |
|
13628 |
|
13629 |
|
13630 |
|
13631 |
|
13632 | 'use strict';
|
13633 |
|
13634 | var ExecutionEnvironment = _dereq_(127);
|
13635 |
|
13636 |
|
13637 |
|
13638 |
|
13639 |
|
13640 |
|
13641 |
|
13642 |
|
13643 | function makePrefixMap(styleProp, eventName) {
|
13644 | var prefixes = {};
|
13645 |
|
13646 | prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
|
13647 | prefixes['Webkit' + styleProp] = 'webkit' + eventName;
|
13648 | prefixes['Moz' + styleProp] = 'moz' + eventName;
|
13649 | prefixes['ms' + styleProp] = 'MS' + eventName;
|
13650 | prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
|
13651 |
|
13652 | return prefixes;
|
13653 | }
|
13654 |
|
13655 |
|
13656 |
|
13657 |
|
13658 | var vendorPrefixes = {
|
13659 | animationend: makePrefixMap('Animation', 'AnimationEnd'),
|
13660 | animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
|
13661 | animationstart: makePrefixMap('Animation', 'AnimationStart'),
|
13662 | transitionend: makePrefixMap('Transition', 'TransitionEnd')
|
13663 | };
|
13664 |
|
13665 |
|
13666 |
|
13667 |
|
13668 | var prefixedEventNames = {};
|
13669 |
|
13670 |
|
13671 |
|
13672 |
|
13673 | var style = {};
|
13674 |
|
13675 |
|
13676 |
|
13677 |
|
13678 | if (ExecutionEnvironment.canUseDOM) {
|
13679 | style = document.createElement('div').style;
|
13680 |
|
13681 |
|
13682 |
|
13683 |
|
13684 |
|
13685 | if (!('AnimationEvent' in window)) {
|
13686 | delete vendorPrefixes.animationend.animation;
|
13687 | delete vendorPrefixes.animationiteration.animation;
|
13688 | delete vendorPrefixes.animationstart.animation;
|
13689 | }
|
13690 |
|
13691 |
|
13692 | if (!('TransitionEvent' in window)) {
|
13693 | delete vendorPrefixes.transitionend.transition;
|
13694 | }
|
13695 | }
|
13696 |
|
13697 |
|
13698 |
|
13699 |
|
13700 |
|
13701 |
|
13702 |
|
13703 | function getVendorPrefixedEventName(eventName) {
|
13704 | if (prefixedEventNames[eventName]) {
|
13705 | return prefixedEventNames[eventName];
|
13706 | } else if (!vendorPrefixes[eventName]) {
|
13707 | return eventName;
|
13708 | }
|
13709 |
|
13710 | var prefixMap = vendorPrefixes[eventName];
|
13711 |
|
13712 | for (var styleProp in prefixMap) {
|
13713 | if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
|
13714 | return prefixedEventNames[eventName] = prefixMap[styleProp];
|
13715 | }
|
13716 | }
|
13717 |
|
13718 | return '';
|
13719 | }
|
13720 |
|
13721 | module.exports = getVendorPrefixedEventName;
|
13722 | },{"127":127}],111:[function(_dereq_,module,exports){
|
13723 |
|
13724 |
|
13725 |
|
13726 |
|
13727 |
|
13728 |
|
13729 |
|
13730 |
|
13731 | 'use strict';
|
13732 |
|
13733 | var ReactDOMComponentTree = _dereq_(32);
|
13734 |
|
13735 | function isCheckable(elem) {
|
13736 | var type = elem.type;
|
13737 | var nodeName = elem.nodeName;
|
13738 | return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
|
13739 | }
|
13740 |
|
13741 | function getTracker(inst) {
|
13742 | return inst._wrapperState.valueTracker;
|
13743 | }
|
13744 |
|
13745 | function attachTracker(inst, tracker) {
|
13746 | inst._wrapperState.valueTracker = tracker;
|
13747 | }
|
13748 |
|
13749 | function detachTracker(inst) {
|
13750 | inst._wrapperState.valueTracker = null;
|
13751 | }
|
13752 |
|
13753 | function getValueFromNode(node) {
|
13754 | var value;
|
13755 | if (node) {
|
13756 | value = isCheckable(node) ? '' + node.checked : node.value;
|
13757 | }
|
13758 | return value;
|
13759 | }
|
13760 |
|
13761 | var inputValueTracking = {
|
13762 |
|
13763 | _getTrackerFromNode: function (node) {
|
13764 | return getTracker(ReactDOMComponentTree.getInstanceFromNode(node));
|
13765 | },
|
13766 |
|
13767 |
|
13768 | track: function (inst) {
|
13769 | if (getTracker(inst)) {
|
13770 | return;
|
13771 | }
|
13772 |
|
13773 | var node = ReactDOMComponentTree.getNodeFromInstance(inst);
|
13774 | var valueField = isCheckable(node) ? 'checked' : 'value';
|
13775 | var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
|
13776 |
|
13777 | var currentValue = '' + node[valueField];
|
13778 |
|
13779 |
|
13780 |
|
13781 |
|
13782 |
|
13783 | if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
|
13784 | return;
|
13785 | }
|
13786 |
|
13787 | Object.defineProperty(node, valueField, {
|
13788 | enumerable: descriptor.enumerable,
|
13789 | configurable: true,
|
13790 | get: function () {
|
13791 | return descriptor.get.call(this);
|
13792 | },
|
13793 | set: function (value) {
|
13794 | currentValue = '' + value;
|
13795 | descriptor.set.call(this, value);
|
13796 | }
|
13797 | });
|
13798 |
|
13799 | attachTracker(inst, {
|
13800 | getValue: function () {
|
13801 | return currentValue;
|
13802 | },
|
13803 | setValue: function (value) {
|
13804 | currentValue = '' + value;
|
13805 | },
|
13806 | stopTracking: function () {
|
13807 | detachTracker(inst);
|
13808 | delete node[valueField];
|
13809 | }
|
13810 | });
|
13811 | },
|
13812 |
|
13813 | updateValueIfChanged: function (inst) {
|
13814 | if (!inst) {
|
13815 | return false;
|
13816 | }
|
13817 | var tracker = getTracker(inst);
|
13818 |
|
13819 | if (!tracker) {
|
13820 | inputValueTracking.track(inst);
|
13821 | return true;
|
13822 | }
|
13823 |
|
13824 | var lastValue = tracker.getValue();
|
13825 | var nextValue = getValueFromNode(ReactDOMComponentTree.getNodeFromInstance(inst));
|
13826 |
|
13827 | if (nextValue !== lastValue) {
|
13828 | tracker.setValue(nextValue);
|
13829 | return true;
|
13830 | }
|
13831 |
|
13832 | return false;
|
13833 | },
|
13834 | stopTracking: function (inst) {
|
13835 | var tracker = getTracker(inst);
|
13836 | if (tracker) {
|
13837 | tracker.stopTracking();
|
13838 | }
|
13839 | }
|
13840 | };
|
13841 |
|
13842 | module.exports = inputValueTracking;
|
13843 | },{"32":32}],112:[function(_dereq_,module,exports){
|
13844 |
|
13845 |
|
13846 |
|
13847 |
|
13848 |
|
13849 |
|
13850 |
|
13851 |
|
13852 | 'use strict';
|
13853 |
|
13854 | var _prodInvariant = _dereq_(116),
|
13855 | _assign = _dereq_(149);
|
13856 |
|
13857 | var ReactCompositeComponent = _dereq_(29);
|
13858 | var ReactEmptyComponent = _dereq_(49);
|
13859 | var ReactHostComponent = _dereq_(54);
|
13860 |
|
13861 | var getNextDebugID = _dereq_(125);
|
13862 | var invariant = _dereq_(141);
|
13863 | var warning = _dereq_(148);
|
13864 |
|
13865 |
|
13866 | var ReactCompositeComponentWrapper = function (element) {
|
13867 | this.construct(element);
|
13868 | };
|
13869 |
|
13870 | function getDeclarationErrorAddendum(owner) {
|
13871 | if (owner) {
|
13872 | var name = owner.getName();
|
13873 | if (name) {
|
13874 | return ' Check the render method of `' + name + '`.';
|
13875 | }
|
13876 | }
|
13877 | return '';
|
13878 | }
|
13879 |
|
13880 |
|
13881 |
|
13882 |
|
13883 |
|
13884 |
|
13885 |
|
13886 |
|
13887 | function isInternalComponentType(type) {
|
13888 | return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
|
13889 | }
|
13890 |
|
13891 |
|
13892 |
|
13893 |
|
13894 |
|
13895 |
|
13896 |
|
13897 |
|
13898 |
|
13899 | function instantiateReactComponent(node, shouldHaveDebugID) {
|
13900 | var instance;
|
13901 |
|
13902 | if (node === null || node === false) {
|
13903 | instance = ReactEmptyComponent.create(instantiateReactComponent);
|
13904 | } else if (typeof node === 'object') {
|
13905 | var element = node;
|
13906 | var type = element.type;
|
13907 | if (typeof type !== 'function' && typeof type !== 'string') {
|
13908 | var info = '';
|
13909 | if ("development" !== 'production') {
|
13910 | if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
13911 | info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
13912 | }
|
13913 | }
|
13914 | info += getDeclarationErrorAddendum(element._owner);
|
13915 | !false ? "development" !== '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;
|
13916 | }
|
13917 |
|
13918 |
|
13919 | if (typeof element.type === 'string') {
|
13920 | instance = ReactHostComponent.createInternalComponent(element);
|
13921 | } else if (isInternalComponentType(element.type)) {
|
13922 |
|
13923 |
|
13924 |
|
13925 | instance = new element.type(element);
|
13926 |
|
13927 |
|
13928 | if (!instance.getHostNode) {
|
13929 | instance.getHostNode = instance.getNativeNode;
|
13930 | }
|
13931 | } else {
|
13932 | instance = new ReactCompositeComponentWrapper(element);
|
13933 | }
|
13934 | } else if (typeof node === 'string' || typeof node === 'number') {
|
13935 | instance = ReactHostComponent.createInstanceForText(node);
|
13936 | } else {
|
13937 | !false ? "development" !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
|
13938 | }
|
13939 |
|
13940 | if ("development" !== 'production') {
|
13941 | "development" !== '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;
|
13942 | }
|
13943 |
|
13944 |
|
13945 |
|
13946 |
|
13947 | instance._mountIndex = 0;
|
13948 | instance._mountImage = null;
|
13949 |
|
13950 | if ("development" !== 'production') {
|
13951 | instance._debugID = shouldHaveDebugID ? getNextDebugID() : 0;
|
13952 | }
|
13953 |
|
13954 |
|
13955 |
|
13956 | if ("development" !== 'production') {
|
13957 | if (Object.preventExtensions) {
|
13958 | Object.preventExtensions(instance);
|
13959 | }
|
13960 | }
|
13961 |
|
13962 | return instance;
|
13963 | }
|
13964 |
|
13965 | _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent, {
|
13966 | _instantiateReactComponent: instantiateReactComponent
|
13967 | });
|
13968 |
|
13969 | module.exports = instantiateReactComponent;
|
13970 | },{"116":116,"125":125,"141":141,"148":148,"149":149,"29":29,"49":49,"54":54}],113:[function(_dereq_,module,exports){
|
13971 |
|
13972 |
|
13973 |
|
13974 |
|
13975 |
|
13976 |
|
13977 |
|
13978 |
|
13979 | 'use strict';
|
13980 |
|
13981 | var ExecutionEnvironment = _dereq_(127);
|
13982 |
|
13983 | var useHasFeature;
|
13984 | if (ExecutionEnvironment.canUseDOM) {
|
13985 | useHasFeature = document.implementation && document.implementation.hasFeature &&
|
13986 |
|
13987 |
|
13988 | document.implementation.hasFeature('', '') !== true;
|
13989 | }
|
13990 |
|
13991 |
|
13992 |
|
13993 |
|
13994 |
|
13995 |
|
13996 |
|
13997 |
|
13998 |
|
13999 |
|
14000 |
|
14001 |
|
14002 |
|
14003 |
|
14004 |
|
14005 | function isEventSupported(eventNameSuffix, capture) {
|
14006 | if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
|
14007 | return false;
|
14008 | }
|
14009 |
|
14010 | var eventName = 'on' + eventNameSuffix;
|
14011 | var isSupported = eventName in document;
|
14012 |
|
14013 | if (!isSupported) {
|
14014 | var element = document.createElement('div');
|
14015 | element.setAttribute(eventName, 'return;');
|
14016 | isSupported = typeof element[eventName] === 'function';
|
14017 | }
|
14018 |
|
14019 | if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
|
14020 |
|
14021 | isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
|
14022 | }
|
14023 |
|
14024 | return isSupported;
|
14025 | }
|
14026 |
|
14027 | module.exports = isEventSupported;
|
14028 | },{"127":127}],114:[function(_dereq_,module,exports){
|
14029 |
|
14030 |
|
14031 |
|
14032 |
|
14033 |
|
14034 |
|
14035 |
|
14036 |
|
14037 |
|
14038 | 'use strict';
|
14039 |
|
14040 |
|
14041 |
|
14042 |
|
14043 |
|
14044 | var supportedInputTypes = {
|
14045 | color: true,
|
14046 | date: true,
|
14047 | datetime: true,
|
14048 | 'datetime-local': true,
|
14049 | email: true,
|
14050 | month: true,
|
14051 | number: true,
|
14052 | password: true,
|
14053 | range: true,
|
14054 | search: true,
|
14055 | tel: true,
|
14056 | text: true,
|
14057 | time: true,
|
14058 | url: true,
|
14059 | week: true
|
14060 | };
|
14061 |
|
14062 | function isTextInputElement(elem) {
|
14063 | var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
|
14064 |
|
14065 | if (nodeName === 'input') {
|
14066 | return !!supportedInputTypes[elem.type];
|
14067 | }
|
14068 |
|
14069 | if (nodeName === 'textarea') {
|
14070 | return true;
|
14071 | }
|
14072 |
|
14073 | return false;
|
14074 | }
|
14075 |
|
14076 | module.exports = isTextInputElement;
|
14077 | },{}],115:[function(_dereq_,module,exports){
|
14078 |
|
14079 |
|
14080 |
|
14081 |
|
14082 |
|
14083 |
|
14084 |
|
14085 |
|
14086 | 'use strict';
|
14087 |
|
14088 | var escapeTextContentForBrowser = _dereq_(100);
|
14089 |
|
14090 |
|
14091 |
|
14092 |
|
14093 |
|
14094 |
|
14095 |
|
14096 | function quoteAttributeValueForBrowser(value) {
|
14097 | return '"' + escapeTextContentForBrowser(value) + '"';
|
14098 | }
|
14099 |
|
14100 | module.exports = quoteAttributeValueForBrowser;
|
14101 | },{"100":100}],116:[function(_dereq_,module,exports){
|
14102 |
|
14103 |
|
14104 |
|
14105 |
|
14106 |
|
14107 |
|
14108 |
|
14109 |
|
14110 | 'use strict';
|
14111 |
|
14112 |
|
14113 |
|
14114 |
|
14115 |
|
14116 |
|
14117 |
|
14118 |
|
14119 | function reactProdInvariant(code) {
|
14120 | var argCount = arguments.length - 1;
|
14121 |
|
14122 | var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
|
14123 |
|
14124 | for (var argIdx = 0; argIdx < argCount; argIdx++) {
|
14125 | message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
|
14126 | }
|
14127 |
|
14128 | message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
|
14129 |
|
14130 | var error = new Error(message);
|
14131 | error.name = 'Invariant Violation';
|
14132 | error.framesToPop = 1;
|
14133 |
|
14134 | throw error;
|
14135 | }
|
14136 |
|
14137 | module.exports = reactProdInvariant;
|
14138 | },{}],117:[function(_dereq_,module,exports){
|
14139 |
|
14140 |
|
14141 |
|
14142 |
|
14143 |
|
14144 |
|
14145 |
|
14146 |
|
14147 | 'use strict';
|
14148 |
|
14149 | var ExecutionEnvironment = _dereq_(127);
|
14150 | var DOMNamespaces = _dereq_(10);
|
14151 |
|
14152 | var WHITESPACE_TEST = /^[ \r\n\t\f]/;
|
14153 | var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
|
14154 |
|
14155 | var createMicrosoftUnsafeLocalFunction = _dereq_(98);
|
14156 |
|
14157 |
|
14158 | var reusableSVGContainer;
|
14159 |
|
14160 |
|
14161 |
|
14162 |
|
14163 |
|
14164 |
|
14165 |
|
14166 |
|
14167 |
|
14168 | var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
14169 |
|
14170 |
|
14171 |
|
14172 | if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
|
14173 | reusableSVGContainer = reusableSVGContainer || document.createElement('div');
|
14174 | reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
|
14175 | var svgNode = reusableSVGContainer.firstChild;
|
14176 | while (svgNode.firstChild) {
|
14177 | node.appendChild(svgNode.firstChild);
|
14178 | }
|
14179 | } else {
|
14180 | node.innerHTML = html;
|
14181 | }
|
14182 | });
|
14183 |
|
14184 | if (ExecutionEnvironment.canUseDOM) {
|
14185 |
|
14186 |
|
14187 |
|
14188 |
|
14189 |
|
14190 |
|
14191 | var testElement = document.createElement('div');
|
14192 | testElement.innerHTML = ' ';
|
14193 | if (testElement.innerHTML === '') {
|
14194 | setInnerHTML = function (node, html) {
|
14195 |
|
14196 |
|
14197 |
|
14198 |
|
14199 |
|
14200 | if (node.parentNode) {
|
14201 | node.parentNode.replaceChild(node, node);
|
14202 | }
|
14203 |
|
14204 |
|
14205 |
|
14206 |
|
14207 |
|
14208 | if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
|
14209 |
|
14210 |
|
14211 |
|
14212 |
|
14213 |
|
14214 |
|
14215 | node.innerHTML = String.fromCharCode(0xfeff) + html;
|
14216 |
|
14217 |
|
14218 |
|
14219 | var textNode = node.firstChild;
|
14220 | if (textNode.data.length === 1) {
|
14221 | node.removeChild(textNode);
|
14222 | } else {
|
14223 | textNode.deleteData(0, 1);
|
14224 | }
|
14225 | } else {
|
14226 | node.innerHTML = html;
|
14227 | }
|
14228 | };
|
14229 | }
|
14230 | testElement = null;
|
14231 | }
|
14232 |
|
14233 | module.exports = setInnerHTML;
|
14234 | },{"10":10,"127":127,"98":98}],118:[function(_dereq_,module,exports){
|
14235 |
|
14236 |
|
14237 |
|
14238 |
|
14239 |
|
14240 |
|
14241 |
|
14242 |
|
14243 | 'use strict';
|
14244 |
|
14245 | var ExecutionEnvironment = _dereq_(127);
|
14246 | var escapeTextContentForBrowser = _dereq_(100);
|
14247 | var setInnerHTML = _dereq_(117);
|
14248 |
|
14249 |
|
14250 |
|
14251 |
|
14252 |
|
14253 |
|
14254 |
|
14255 |
|
14256 |
|
14257 |
|
14258 |
|
14259 | var setTextContent = function (node, text) {
|
14260 | if (text) {
|
14261 | var firstChild = node.firstChild;
|
14262 |
|
14263 | if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
|
14264 | firstChild.nodeValue = text;
|
14265 | return;
|
14266 | }
|
14267 | }
|
14268 | node.textContent = text;
|
14269 | };
|
14270 |
|
14271 | if (ExecutionEnvironment.canUseDOM) {
|
14272 | if (!('textContent' in document.documentElement)) {
|
14273 | setTextContent = function (node, text) {
|
14274 | if (node.nodeType === 3) {
|
14275 | node.nodeValue = text;
|
14276 | return;
|
14277 | }
|
14278 | setInnerHTML(node, escapeTextContentForBrowser(text));
|
14279 | };
|
14280 | }
|
14281 | }
|
14282 |
|
14283 | module.exports = setTextContent;
|
14284 | },{"100":100,"117":117,"127":127}],119:[function(_dereq_,module,exports){
|
14285 |
|
14286 |
|
14287 |
|
14288 |
|
14289 |
|
14290 |
|
14291 |
|
14292 |
|
14293 | 'use strict';
|
14294 |
|
14295 |
|
14296 |
|
14297 |
|
14298 |
|
14299 |
|
14300 |
|
14301 |
|
14302 |
|
14303 |
|
14304 |
|
14305 |
|
14306 |
|
14307 | function shouldUpdateReactComponent(prevElement, nextElement) {
|
14308 | var prevEmpty = prevElement === null || prevElement === false;
|
14309 | var nextEmpty = nextElement === null || nextElement === false;
|
14310 | if (prevEmpty || nextEmpty) {
|
14311 | return prevEmpty === nextEmpty;
|
14312 | }
|
14313 |
|
14314 | var prevType = typeof prevElement;
|
14315 | var nextType = typeof nextElement;
|
14316 | if (prevType === 'string' || prevType === 'number') {
|
14317 | return nextType === 'string' || nextType === 'number';
|
14318 | } else {
|
14319 | return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
|
14320 | }
|
14321 | }
|
14322 |
|
14323 | module.exports = shouldUpdateReactComponent;
|
14324 | },{}],120:[function(_dereq_,module,exports){
|
14325 |
|
14326 |
|
14327 |
|
14328 |
|
14329 |
|
14330 |
|
14331 |
|
14332 |
|
14333 | 'use strict';
|
14334 |
|
14335 | var _prodInvariant = _dereq_(116);
|
14336 |
|
14337 | var ReactCurrentOwner = _dereq_(123);
|
14338 | var REACT_ELEMENT_TYPE = _dereq_(48);
|
14339 |
|
14340 | var getIteratorFn = _dereq_(107);
|
14341 | var invariant = _dereq_(141);
|
14342 | var KeyEscapeUtils = _dereq_(22);
|
14343 | var warning = _dereq_(148);
|
14344 |
|
14345 | var SEPARATOR = '.';
|
14346 | var SUBSEPARATOR = ':';
|
14347 |
|
14348 |
|
14349 |
|
14350 |
|
14351 |
|
14352 |
|
14353 |
|
14354 |
|
14355 |
|
14356 |
|
14357 |
|
14358 |
|
14359 | var didWarnAboutMaps = false;
|
14360 |
|
14361 |
|
14362 |
|
14363 |
|
14364 |
|
14365 |
|
14366 |
|
14367 |
|
14368 | function getComponentKey(component, index) {
|
14369 |
|
14370 |
|
14371 | if (component && typeof component === 'object' && component.key != null) {
|
14372 |
|
14373 | return KeyEscapeUtils.escape(component.key);
|
14374 | }
|
14375 |
|
14376 | return index.toString(36);
|
14377 | }
|
14378 |
|
14379 |
|
14380 |
|
14381 |
|
14382 |
|
14383 |
|
14384 |
|
14385 |
|
14386 |
|
14387 | function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
14388 | var type = typeof children;
|
14389 |
|
14390 | if (type === 'undefined' || type === 'boolean') {
|
14391 |
|
14392 | children = null;
|
14393 | }
|
14394 |
|
14395 | if (children === null || type === 'string' || type === 'number' ||
|
14396 |
|
14397 |
|
14398 | type === 'object' && children.$$typeof === REACT_ELEMENT_TYPE) {
|
14399 | callback(traverseContext, children,
|
14400 |
|
14401 |
|
14402 | nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
14403 | return 1;
|
14404 | }
|
14405 |
|
14406 | var child;
|
14407 | var nextName;
|
14408 | var subtreeCount = 0;
|
14409 | var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
14410 |
|
14411 | if (Array.isArray(children)) {
|
14412 | for (var i = 0; i < children.length; i++) {
|
14413 | child = children[i];
|
14414 | nextName = nextNamePrefix + getComponentKey(child, i);
|
14415 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14416 | }
|
14417 | } else {
|
14418 | var iteratorFn = getIteratorFn(children);
|
14419 | if (iteratorFn) {
|
14420 | var iterator = iteratorFn.call(children);
|
14421 | var step;
|
14422 | if (iteratorFn !== children.entries) {
|
14423 | var ii = 0;
|
14424 | while (!(step = iterator.next()).done) {
|
14425 | child = step.value;
|
14426 | nextName = nextNamePrefix + getComponentKey(child, ii++);
|
14427 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14428 | }
|
14429 | } else {
|
14430 | if ("development" !== 'production') {
|
14431 | var mapsAsChildrenAddendum = '';
|
14432 | if (ReactCurrentOwner.current) {
|
14433 | var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
|
14434 | if (mapsAsChildrenOwnerName) {
|
14435 | mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
|
14436 | }
|
14437 | }
|
14438 | "development" !== '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;
|
14439 | didWarnAboutMaps = true;
|
14440 | }
|
14441 |
|
14442 | while (!(step = iterator.next()).done) {
|
14443 | var entry = step.value;
|
14444 | if (entry) {
|
14445 | child = entry[1];
|
14446 | nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
|
14447 | subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
14448 | }
|
14449 | }
|
14450 | }
|
14451 | } else if (type === 'object') {
|
14452 | var addendum = '';
|
14453 | if ("development" !== 'production') {
|
14454 | 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.';
|
14455 | if (children._isReactElement) {
|
14456 | 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.';
|
14457 | }
|
14458 | if (ReactCurrentOwner.current) {
|
14459 | var name = ReactCurrentOwner.current.getName();
|
14460 | if (name) {
|
14461 | addendum += ' Check the render method of `' + name + '`.';
|
14462 | }
|
14463 | }
|
14464 | }
|
14465 | var childrenString = String(children);
|
14466 | !false ? "development" !== '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;
|
14467 | }
|
14468 | }
|
14469 |
|
14470 | return subtreeCount;
|
14471 | }
|
14472 |
|
14473 |
|
14474 |
|
14475 |
|
14476 |
|
14477 |
|
14478 |
|
14479 |
|
14480 |
|
14481 |
|
14482 |
|
14483 |
|
14484 |
|
14485 |
|
14486 |
|
14487 |
|
14488 |
|
14489 | function traverseAllChildren(children, callback, traverseContext) {
|
14490 | if (children == null) {
|
14491 | return 0;
|
14492 | }
|
14493 |
|
14494 | return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
14495 | }
|
14496 |
|
14497 | module.exports = traverseAllChildren;
|
14498 | },{"107":107,"116":116,"123":123,"141":141,"148":148,"22":22,"48":48}],121:[function(_dereq_,module,exports){
|
14499 |
|
14500 |
|
14501 |
|
14502 |
|
14503 |
|
14504 |
|
14505 |
|
14506 |
|
14507 | 'use strict';
|
14508 |
|
14509 | var _assign = _dereq_(149);
|
14510 |
|
14511 | var emptyFunction = _dereq_(133);
|
14512 | var warning = _dereq_(148);
|
14513 |
|
14514 | var validateDOMNesting = emptyFunction;
|
14515 |
|
14516 | if ("development" !== 'production') {
|
14517 |
|
14518 |
|
14519 |
|
14520 |
|
14521 |
|
14522 |
|
14523 |
|
14524 |
|
14525 |
|
14526 |
|
14527 |
|
14528 |
|
14529 | 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'];
|
14530 |
|
14531 |
|
14532 | var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
|
14533 |
|
14534 |
|
14535 |
|
14536 |
|
14537 | 'foreignObject', 'desc', 'title'];
|
14538 |
|
14539 |
|
14540 | var buttonScopeTags = inScopeTags.concat(['button']);
|
14541 |
|
14542 |
|
14543 | var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
|
14544 |
|
14545 | var emptyAncestorInfo = {
|
14546 | current: null,
|
14547 |
|
14548 | formTag: null,
|
14549 | aTagInScope: null,
|
14550 | buttonTagInScope: null,
|
14551 | nobrTagInScope: null,
|
14552 | pTagInButtonScope: null,
|
14553 |
|
14554 | listItemTagAutoclosing: null,
|
14555 | dlItemTagAutoclosing: null
|
14556 | };
|
14557 |
|
14558 | var updatedAncestorInfo = function (oldInfo, tag, instance) {
|
14559 | var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
|
14560 | var info = { tag: tag, instance: instance };
|
14561 |
|
14562 | if (inScopeTags.indexOf(tag) !== -1) {
|
14563 | ancestorInfo.aTagInScope = null;
|
14564 | ancestorInfo.buttonTagInScope = null;
|
14565 | ancestorInfo.nobrTagInScope = null;
|
14566 | }
|
14567 | if (buttonScopeTags.indexOf(tag) !== -1) {
|
14568 | ancestorInfo.pTagInButtonScope = null;
|
14569 | }
|
14570 |
|
14571 |
|
14572 |
|
14573 | if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
|
14574 | ancestorInfo.listItemTagAutoclosing = null;
|
14575 | ancestorInfo.dlItemTagAutoclosing = null;
|
14576 | }
|
14577 |
|
14578 | ancestorInfo.current = info;
|
14579 |
|
14580 | if (tag === 'form') {
|
14581 | ancestorInfo.formTag = info;
|
14582 | }
|
14583 | if (tag === 'a') {
|
14584 | ancestorInfo.aTagInScope = info;
|
14585 | }
|
14586 | if (tag === 'button') {
|
14587 | ancestorInfo.buttonTagInScope = info;
|
14588 | }
|
14589 | if (tag === 'nobr') {
|
14590 | ancestorInfo.nobrTagInScope = info;
|
14591 | }
|
14592 | if (tag === 'p') {
|
14593 | ancestorInfo.pTagInButtonScope = info;
|
14594 | }
|
14595 | if (tag === 'li') {
|
14596 | ancestorInfo.listItemTagAutoclosing = info;
|
14597 | }
|
14598 | if (tag === 'dd' || tag === 'dt') {
|
14599 | ancestorInfo.dlItemTagAutoclosing = info;
|
14600 | }
|
14601 |
|
14602 | return ancestorInfo;
|
14603 | };
|
14604 |
|
14605 | |
14606 |
|
14607 |
|
14608 | var isTagValidWithParent = function (tag, parentTag) {
|
14609 |
|
14610 | switch (parentTag) {
|
14611 |
|
14612 | case 'select':
|
14613 | return tag === 'option' || tag === 'optgroup' || tag === '#text';
|
14614 | case 'optgroup':
|
14615 | return tag === 'option' || tag === '#text';
|
14616 |
|
14617 |
|
14618 | case 'option':
|
14619 | return tag === '#text';
|
14620 |
|
14621 |
|
14622 |
|
14623 |
|
14624 |
|
14625 |
|
14626 | case 'tr':
|
14627 | return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
|
14628 |
|
14629 | case 'tbody':
|
14630 | case 'thead':
|
14631 | case 'tfoot':
|
14632 | return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
|
14633 |
|
14634 | case 'colgroup':
|
14635 | return tag === 'col' || tag === 'template';
|
14636 |
|
14637 | case 'table':
|
14638 | return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
|
14639 |
|
14640 | case 'head':
|
14641 | return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
|
14642 |
|
14643 | case 'html':
|
14644 | return tag === 'head' || tag === 'body';
|
14645 | case '#document':
|
14646 | return tag === 'html';
|
14647 | }
|
14648 |
|
14649 |
|
14650 |
|
14651 |
|
14652 | switch (tag) {
|
14653 | case 'h1':
|
14654 | case 'h2':
|
14655 | case 'h3':
|
14656 | case 'h4':
|
14657 | case 'h5':
|
14658 | case 'h6':
|
14659 | return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
|
14660 |
|
14661 | case 'rp':
|
14662 | case 'rt':
|
14663 | return impliedEndTags.indexOf(parentTag) === -1;
|
14664 |
|
14665 | case 'body':
|
14666 | case 'caption':
|
14667 | case 'col':
|
14668 | case 'colgroup':
|
14669 | case 'frame':
|
14670 | case 'head':
|
14671 | case 'html':
|
14672 | case 'tbody':
|
14673 | case 'td':
|
14674 | case 'tfoot':
|
14675 | case 'th':
|
14676 | case 'thead':
|
14677 | case 'tr':
|
14678 |
|
14679 |
|
14680 |
|
14681 |
|
14682 | return parentTag == null;
|
14683 | }
|
14684 |
|
14685 | return true;
|
14686 | };
|
14687 |
|
14688 | |
14689 |
|
14690 |
|
14691 | var findInvalidAncestorForTag = function (tag, ancestorInfo) {
|
14692 | switch (tag) {
|
14693 | case 'address':
|
14694 | case 'article':
|
14695 | case 'aside':
|
14696 | case 'blockquote':
|
14697 | case 'center':
|
14698 | case 'details':
|
14699 | case 'dialog':
|
14700 | case 'dir':
|
14701 | case 'div':
|
14702 | case 'dl':
|
14703 | case 'fieldset':
|
14704 | case 'figcaption':
|
14705 | case 'figure':
|
14706 | case 'footer':
|
14707 | case 'header':
|
14708 | case 'hgroup':
|
14709 | case 'main':
|
14710 | case 'menu':
|
14711 | case 'nav':
|
14712 | case 'ol':
|
14713 | case 'p':
|
14714 | case 'section':
|
14715 | case 'summary':
|
14716 | case 'ul':
|
14717 | case 'pre':
|
14718 | case 'listing':
|
14719 | case 'table':
|
14720 | case 'hr':
|
14721 | case 'xmp':
|
14722 | case 'h1':
|
14723 | case 'h2':
|
14724 | case 'h3':
|
14725 | case 'h4':
|
14726 | case 'h5':
|
14727 | case 'h6':
|
14728 | return ancestorInfo.pTagInButtonScope;
|
14729 |
|
14730 | case 'form':
|
14731 | return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
|
14732 |
|
14733 | case 'li':
|
14734 | return ancestorInfo.listItemTagAutoclosing;
|
14735 |
|
14736 | case 'dd':
|
14737 | case 'dt':
|
14738 | return ancestorInfo.dlItemTagAutoclosing;
|
14739 |
|
14740 | case 'button':
|
14741 | return ancestorInfo.buttonTagInScope;
|
14742 |
|
14743 | case 'a':
|
14744 |
|
14745 |
|
14746 | return ancestorInfo.aTagInScope;
|
14747 |
|
14748 | case 'nobr':
|
14749 | return ancestorInfo.nobrTagInScope;
|
14750 | }
|
14751 |
|
14752 | return null;
|
14753 | };
|
14754 |
|
14755 | |
14756 |
|
14757 |
|
14758 |
|
14759 | var findOwnerStack = function (instance) {
|
14760 | if (!instance) {
|
14761 | return [];
|
14762 | }
|
14763 |
|
14764 | var stack = [];
|
14765 | do {
|
14766 | stack.push(instance);
|
14767 | } while (instance = instance._currentElement._owner);
|
14768 | stack.reverse();
|
14769 | return stack;
|
14770 | };
|
14771 |
|
14772 | var didWarn = {};
|
14773 |
|
14774 | validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
|
14775 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
14776 | var parentInfo = ancestorInfo.current;
|
14777 | var parentTag = parentInfo && parentInfo.tag;
|
14778 |
|
14779 | if (childText != null) {
|
14780 | "development" !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
|
14781 | childTag = '#text';
|
14782 | }
|
14783 |
|
14784 | var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
|
14785 | var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
|
14786 | var problematic = invalidParent || invalidAncestor;
|
14787 |
|
14788 | if (problematic) {
|
14789 | var ancestorTag = problematic.tag;
|
14790 | var ancestorInstance = problematic.instance;
|
14791 |
|
14792 | var childOwner = childInstance && childInstance._currentElement._owner;
|
14793 | var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
|
14794 |
|
14795 | var childOwners = findOwnerStack(childOwner);
|
14796 | var ancestorOwners = findOwnerStack(ancestorOwner);
|
14797 |
|
14798 | var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
|
14799 | var i;
|
14800 |
|
14801 | var deepestCommon = -1;
|
14802 | for (i = 0; i < minStackLen; i++) {
|
14803 | if (childOwners[i] === ancestorOwners[i]) {
|
14804 | deepestCommon = i;
|
14805 | } else {
|
14806 | break;
|
14807 | }
|
14808 | }
|
14809 |
|
14810 | var UNKNOWN = '(unknown)';
|
14811 | var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
|
14812 | return inst.getName() || UNKNOWN;
|
14813 | });
|
14814 | var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
|
14815 | return inst.getName() || UNKNOWN;
|
14816 | });
|
14817 | var ownerInfo = [].concat(
|
14818 |
|
14819 |
|
14820 | deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
|
14821 |
|
14822 | invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
|
14823 |
|
14824 | var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
|
14825 | if (didWarn[warnKey]) {
|
14826 | return;
|
14827 | }
|
14828 | didWarn[warnKey] = true;
|
14829 |
|
14830 | var tagDisplayName = childTag;
|
14831 | var whitespaceInfo = '';
|
14832 | if (childTag === '#text') {
|
14833 | if (/\S/.test(childText)) {
|
14834 | tagDisplayName = 'Text nodes';
|
14835 | } else {
|
14836 | tagDisplayName = 'Whitespace text nodes';
|
14837 | whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
|
14838 | }
|
14839 | } else {
|
14840 | tagDisplayName = '<' + childTag + '>';
|
14841 | }
|
14842 |
|
14843 | if (invalidParent) {
|
14844 | var info = '';
|
14845 | if (ancestorTag === 'table' && childTag === 'tr') {
|
14846 | info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
|
14847 | }
|
14848 | "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
|
14849 | } else {
|
14850 | "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
|
14851 | }
|
14852 | }
|
14853 | };
|
14854 |
|
14855 | validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
|
14856 |
|
14857 |
|
14858 | validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
|
14859 | ancestorInfo = ancestorInfo || emptyAncestorInfo;
|
14860 | var parentInfo = ancestorInfo.current;
|
14861 | var parentTag = parentInfo && parentInfo.tag;
|
14862 | return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
|
14863 | };
|
14864 | }
|
14865 |
|
14866 | module.exports = validateDOMNesting;
|
14867 | },{"133":133,"148":148,"149":149}],122:[function(_dereq_,module,exports){
|
14868 |
|
14869 |
|
14870 |
|
14871 |
|
14872 |
|
14873 |
|
14874 |
|
14875 |
|
14876 |
|
14877 |
|
14878 | 'use strict';
|
14879 |
|
14880 | var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
14881 |
|
14882 | module.exports = ReactInternals.ReactComponentTreeHook;
|
14883 | },{}],123:[function(_dereq_,module,exports){
|
14884 |
|
14885 |
|
14886 |
|
14887 |
|
14888 |
|
14889 |
|
14890 |
|
14891 |
|
14892 |
|
14893 |
|
14894 | 'use strict';
|
14895 |
|
14896 | var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
14897 |
|
14898 | module.exports = ReactInternals.ReactCurrentOwner;
|
14899 | },{}],124:[function(_dereq_,module,exports){
|
14900 |
|
14901 |
|
14902 |
|
14903 |
|
14904 |
|
14905 |
|
14906 |
|
14907 |
|
14908 |
|
14909 |
|
14910 | 'use strict';
|
14911 |
|
14912 | module.exports = React;
|
14913 | },{}],125:[function(_dereq_,module,exports){
|
14914 |
|
14915 |
|
14916 |
|
14917 |
|
14918 |
|
14919 |
|
14920 |
|
14921 |
|
14922 |
|
14923 |
|
14924 | 'use strict';
|
14925 |
|
14926 | var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
14927 |
|
14928 | module.exports = ReactInternals.getNextDebugID;
|
14929 | },{}],126:[function(_dereq_,module,exports){
|
14930 | 'use strict';
|
14931 |
|
14932 |
|
14933 |
|
14934 |
|
14935 |
|
14936 |
|
14937 |
|
14938 |
|
14939 |
|
14940 |
|
14941 |
|
14942 |
|
14943 |
|
14944 |
|
14945 |
|
14946 |
|
14947 |
|
14948 |
|
14949 |
|
14950 | var emptyFunction = _dereq_(133);
|
14951 |
|
14952 |
|
14953 |
|
14954 |
|
14955 |
|
14956 | var EventListener = {
|
14957 | |
14958 |
|
14959 |
|
14960 |
|
14961 |
|
14962 |
|
14963 |
|
14964 |
|
14965 | listen: function listen(target, eventType, callback) {
|
14966 | if (target.addEventListener) {
|
14967 | target.addEventListener(eventType, callback, false);
|
14968 | return {
|
14969 | remove: function remove() {
|
14970 | target.removeEventListener(eventType, callback, false);
|
14971 | }
|
14972 | };
|
14973 | } else if (target.attachEvent) {
|
14974 | target.attachEvent('on' + eventType, callback);
|
14975 | return {
|
14976 | remove: function remove() {
|
14977 | target.detachEvent('on' + eventType, callback);
|
14978 | }
|
14979 | };
|
14980 | }
|
14981 | },
|
14982 |
|
14983 | |
14984 |
|
14985 |
|
14986 |
|
14987 |
|
14988 |
|
14989 |
|
14990 |
|
14991 | capture: function capture(target, eventType, callback) {
|
14992 | if (target.addEventListener) {
|
14993 | target.addEventListener(eventType, callback, true);
|
14994 | return {
|
14995 | remove: function remove() {
|
14996 | target.removeEventListener(eventType, callback, true);
|
14997 | }
|
14998 | };
|
14999 | } else {
|
15000 | if ("development" !== 'production') {
|
15001 | 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.');
|
15002 | }
|
15003 | return {
|
15004 | remove: emptyFunction
|
15005 | };
|
15006 | }
|
15007 | },
|
15008 |
|
15009 | registerDefault: function registerDefault() {}
|
15010 | };
|
15011 |
|
15012 | module.exports = EventListener;
|
15013 | },{"133":133}],127:[function(_dereq_,module,exports){
|
15014 |
|
15015 |
|
15016 |
|
15017 |
|
15018 |
|
15019 |
|
15020 |
|
15021 |
|
15022 |
|
15023 |
|
15024 | 'use strict';
|
15025 |
|
15026 | var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
15027 |
|
15028 |
|
15029 |
|
15030 |
|
15031 |
|
15032 |
|
15033 |
|
15034 | var ExecutionEnvironment = {
|
15035 |
|
15036 | canUseDOM: canUseDOM,
|
15037 |
|
15038 | canUseWorkers: typeof Worker !== 'undefined',
|
15039 |
|
15040 | canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
|
15041 |
|
15042 | canUseViewport: canUseDOM && !!window.screen,
|
15043 |
|
15044 | isInWorker: !canUseDOM
|
15045 |
|
15046 | };
|
15047 |
|
15048 | module.exports = ExecutionEnvironment;
|
15049 | },{}],128:[function(_dereq_,module,exports){
|
15050 | "use strict";
|
15051 |
|
15052 |
|
15053 |
|
15054 |
|
15055 |
|
15056 |
|
15057 |
|
15058 |
|
15059 |
|
15060 |
|
15061 |
|
15062 |
|
15063 | var _hyphenPattern = /-(.)/g;
|
15064 |
|
15065 |
|
15066 |
|
15067 |
|
15068 |
|
15069 |
|
15070 |
|
15071 |
|
15072 |
|
15073 |
|
15074 | function camelize(string) {
|
15075 | return string.replace(_hyphenPattern, function (_, character) {
|
15076 | return character.toUpperCase();
|
15077 | });
|
15078 | }
|
15079 |
|
15080 | module.exports = camelize;
|
15081 | },{}],129:[function(_dereq_,module,exports){
|
15082 |
|
15083 |
|
15084 |
|
15085 |
|
15086 |
|
15087 |
|
15088 |
|
15089 |
|
15090 |
|
15091 |
|
15092 |
|
15093 | 'use strict';
|
15094 |
|
15095 | var camelize = _dereq_(128);
|
15096 |
|
15097 | var msPattern = /^-ms-/;
|
15098 |
|
15099 |
|
15100 |
|
15101 |
|
15102 |
|
15103 |
|
15104 |
|
15105 |
|
15106 |
|
15107 |
|
15108 |
|
15109 |
|
15110 |
|
15111 |
|
15112 |
|
15113 |
|
15114 |
|
15115 |
|
15116 | function camelizeStyleName(string) {
|
15117 | return camelize(string.replace(msPattern, 'ms-'));
|
15118 | }
|
15119 |
|
15120 | module.exports = camelizeStyleName;
|
15121 | },{"128":128}],130:[function(_dereq_,module,exports){
|
15122 | 'use strict';
|
15123 |
|
15124 |
|
15125 |
|
15126 |
|
15127 |
|
15128 |
|
15129 |
|
15130 |
|
15131 |
|
15132 |
|
15133 |
|
15134 |
|
15135 | var isTextNode = _dereq_(143);
|
15136 |
|
15137 |
|
15138 |
|
15139 |
|
15140 |
|
15141 |
|
15142 | function containsNode(outerNode, innerNode) {
|
15143 | if (!outerNode || !innerNode) {
|
15144 | return false;
|
15145 | } else if (outerNode === innerNode) {
|
15146 | return true;
|
15147 | } else if (isTextNode(outerNode)) {
|
15148 | return false;
|
15149 | } else if (isTextNode(innerNode)) {
|
15150 | return containsNode(outerNode, innerNode.parentNode);
|
15151 | } else if ('contains' in outerNode) {
|
15152 | return outerNode.contains(innerNode);
|
15153 | } else if (outerNode.compareDocumentPosition) {
|
15154 | return !!(outerNode.compareDocumentPosition(innerNode) & 16);
|
15155 | } else {
|
15156 | return false;
|
15157 | }
|
15158 | }
|
15159 |
|
15160 | module.exports = containsNode;
|
15161 | },{"143":143}],131:[function(_dereq_,module,exports){
|
15162 | 'use strict';
|
15163 |
|
15164 |
|
15165 |
|
15166 |
|
15167 |
|
15168 |
|
15169 |
|
15170 |
|
15171 |
|
15172 |
|
15173 |
|
15174 |
|
15175 | var invariant = _dereq_(141);
|
15176 |
|
15177 |
|
15178 |
|
15179 |
|
15180 |
|
15181 |
|
15182 |
|
15183 |
|
15184 |
|
15185 |
|
15186 | function toArray(obj) {
|
15187 | var length = obj.length;
|
15188 |
|
15189 |
|
15190 |
|
15191 | !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? "development" !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
|
15192 |
|
15193 | !(typeof length === 'number') ? "development" !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
|
15194 |
|
15195 | !(length === 0 || length - 1 in obj) ? "development" !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
|
15196 |
|
15197 | !(typeof obj.callee !== 'function') ? "development" !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
|
15198 |
|
15199 |
|
15200 |
|
15201 |
|
15202 | if (obj.hasOwnProperty) {
|
15203 | try {
|
15204 | return Array.prototype.slice.call(obj);
|
15205 | } catch (e) {
|
15206 |
|
15207 | }
|
15208 | }
|
15209 |
|
15210 |
|
15211 |
|
15212 | var ret = Array(length);
|
15213 | for (var ii = 0; ii < length; ii++) {
|
15214 | ret[ii] = obj[ii];
|
15215 | }
|
15216 | return ret;
|
15217 | }
|
15218 |
|
15219 |
|
15220 |
|
15221 |
|
15222 |
|
15223 |
|
15224 |
|
15225 |
|
15226 |
|
15227 |
|
15228 |
|
15229 |
|
15230 |
|
15231 |
|
15232 |
|
15233 |
|
15234 | function hasArrayNature(obj) {
|
15235 | return (
|
15236 |
|
15237 | !!obj && (
|
15238 |
|
15239 | typeof obj == 'object' || typeof obj == 'function') &&
|
15240 |
|
15241 | 'length' in obj &&
|
15242 |
|
15243 | !('setInterval' in obj) &&
|
15244 |
|
15245 |
|
15246 | typeof obj.nodeType != 'number' && (
|
15247 |
|
15248 | Array.isArray(obj) ||
|
15249 |
|
15250 | 'callee' in obj ||
|
15251 |
|
15252 | 'item' in obj)
|
15253 | );
|
15254 | }
|
15255 |
|
15256 |
|
15257 |
|
15258 |
|
15259 |
|
15260 |
|
15261 |
|
15262 |
|
15263 |
|
15264 |
|
15265 |
|
15266 |
|
15267 |
|
15268 |
|
15269 |
|
15270 |
|
15271 |
|
15272 |
|
15273 |
|
15274 |
|
15275 |
|
15276 |
|
15277 | function createArrayFromMixed(obj) {
|
15278 | if (!hasArrayNature(obj)) {
|
15279 | return [obj];
|
15280 | } else if (Array.isArray(obj)) {
|
15281 | return obj.slice();
|
15282 | } else {
|
15283 | return toArray(obj);
|
15284 | }
|
15285 | }
|
15286 |
|
15287 | module.exports = createArrayFromMixed;
|
15288 | },{"141":141}],132:[function(_dereq_,module,exports){
|
15289 | 'use strict';
|
15290 |
|
15291 |
|
15292 |
|
15293 |
|
15294 |
|
15295 |
|
15296 |
|
15297 |
|
15298 |
|
15299 |
|
15300 |
|
15301 |
|
15302 |
|
15303 |
|
15304 | var ExecutionEnvironment = _dereq_(127);
|
15305 |
|
15306 | var createArrayFromMixed = _dereq_(131);
|
15307 | var getMarkupWrap = _dereq_(137);
|
15308 | var invariant = _dereq_(141);
|
15309 |
|
15310 |
|
15311 |
|
15312 |
|
15313 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
15314 |
|
15315 |
|
15316 |
|
15317 |
|
15318 | var nodeNamePattern = /^\s*<(\w+)/;
|
15319 |
|
15320 |
|
15321 |
|
15322 |
|
15323 |
|
15324 |
|
15325 |
|
15326 | function getNodeName(markup) {
|
15327 | var nodeNameMatch = markup.match(nodeNamePattern);
|
15328 | return nodeNameMatch && nodeNameMatch[1].toLowerCase();
|
15329 | }
|
15330 |
|
15331 |
|
15332 |
|
15333 |
|
15334 |
|
15335 |
|
15336 |
|
15337 |
|
15338 |
|
15339 |
|
15340 |
|
15341 | function createNodesFromMarkup(markup, handleScript) {
|
15342 | var node = dummyNode;
|
15343 | !!!dummyNode ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
|
15344 | var nodeName = getNodeName(markup);
|
15345 |
|
15346 | var wrap = nodeName && getMarkupWrap(nodeName);
|
15347 | if (wrap) {
|
15348 | node.innerHTML = wrap[1] + markup + wrap[2];
|
15349 |
|
15350 | var wrapDepth = wrap[0];
|
15351 | while (wrapDepth--) {
|
15352 | node = node.lastChild;
|
15353 | }
|
15354 | } else {
|
15355 | node.innerHTML = markup;
|
15356 | }
|
15357 |
|
15358 | var scripts = node.getElementsByTagName('script');
|
15359 | if (scripts.length) {
|
15360 | !handleScript ? "development" !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
|
15361 | createArrayFromMixed(scripts).forEach(handleScript);
|
15362 | }
|
15363 |
|
15364 | var nodes = Array.from(node.childNodes);
|
15365 | while (node.lastChild) {
|
15366 | node.removeChild(node.lastChild);
|
15367 | }
|
15368 | return nodes;
|
15369 | }
|
15370 |
|
15371 | module.exports = createNodesFromMarkup;
|
15372 | },{"127":127,"131":131,"137":137,"141":141}],133:[function(_dereq_,module,exports){
|
15373 | "use strict";
|
15374 |
|
15375 |
|
15376 |
|
15377 |
|
15378 |
|
15379 |
|
15380 |
|
15381 |
|
15382 |
|
15383 |
|
15384 |
|
15385 |
|
15386 | function makeEmptyFunction(arg) {
|
15387 | return function () {
|
15388 | return arg;
|
15389 | };
|
15390 | }
|
15391 |
|
15392 |
|
15393 |
|
15394 |
|
15395 |
|
15396 |
|
15397 | var emptyFunction = function emptyFunction() {};
|
15398 |
|
15399 | emptyFunction.thatReturns = makeEmptyFunction;
|
15400 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
15401 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
15402 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
15403 | emptyFunction.thatReturnsThis = function () {
|
15404 | return this;
|
15405 | };
|
15406 | emptyFunction.thatReturnsArgument = function (arg) {
|
15407 | return arg;
|
15408 | };
|
15409 |
|
15410 | module.exports = emptyFunction;
|
15411 | },{}],134:[function(_dereq_,module,exports){
|
15412 |
|
15413 |
|
15414 |
|
15415 |
|
15416 |
|
15417 |
|
15418 |
|
15419 |
|
15420 |
|
15421 |
|
15422 | 'use strict';
|
15423 |
|
15424 | var emptyObject = {};
|
15425 |
|
15426 | if ("development" !== 'production') {
|
15427 | Object.freeze(emptyObject);
|
15428 | }
|
15429 |
|
15430 | module.exports = emptyObject;
|
15431 | },{}],135:[function(_dereq_,module,exports){
|
15432 |
|
15433 |
|
15434 |
|
15435 |
|
15436 |
|
15437 |
|
15438 |
|
15439 |
|
15440 |
|
15441 |
|
15442 | 'use strict';
|
15443 |
|
15444 |
|
15445 |
|
15446 |
|
15447 |
|
15448 | function focusNode(node) {
|
15449 |
|
15450 |
|
15451 |
|
15452 | try {
|
15453 | node.focus();
|
15454 | } catch (e) {}
|
15455 | }
|
15456 |
|
15457 | module.exports = focusNode;
|
15458 | },{}],136:[function(_dereq_,module,exports){
|
15459 | 'use strict';
|
15460 |
|
15461 |
|
15462 |
|
15463 |
|
15464 |
|
15465 |
|
15466 |
|
15467 |
|
15468 |
|
15469 |
|
15470 |
|
15471 |
|
15472 |
|
15473 |
|
15474 |
|
15475 |
|
15476 |
|
15477 |
|
15478 |
|
15479 |
|
15480 |
|
15481 |
|
15482 |
|
15483 |
|
15484 | function getActiveElement(doc) /*?DOMElement*/{
|
15485 | doc = doc || (typeof document !== 'undefined' ? document : undefined);
|
15486 | if (typeof doc === 'undefined') {
|
15487 | return null;
|
15488 | }
|
15489 | try {
|
15490 | return doc.activeElement || doc.body;
|
15491 | } catch (e) {
|
15492 | return doc.body;
|
15493 | }
|
15494 | }
|
15495 |
|
15496 | module.exports = getActiveElement;
|
15497 | },{}],137:[function(_dereq_,module,exports){
|
15498 | 'use strict';
|
15499 |
|
15500 |
|
15501 |
|
15502 |
|
15503 |
|
15504 |
|
15505 |
|
15506 |
|
15507 |
|
15508 |
|
15509 |
|
15510 |
|
15511 |
|
15512 | var ExecutionEnvironment = _dereq_(127);
|
15513 |
|
15514 | var invariant = _dereq_(141);
|
15515 |
|
15516 |
|
15517 |
|
15518 |
|
15519 | var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
|
15520 |
|
15521 |
|
15522 |
|
15523 |
|
15524 |
|
15525 |
|
15526 |
|
15527 |
|
15528 | var shouldWrap = {};
|
15529 |
|
15530 | var selectWrap = [1, '<select multiple="true">', '</select>'];
|
15531 | var tableWrap = [1, '<table>', '</table>'];
|
15532 | var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
|
15533 |
|
15534 | var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
|
15535 |
|
15536 | var markupWrap = {
|
15537 | '*': [1, '?<div>', '</div>'],
|
15538 |
|
15539 | 'area': [1, '<map>', '</map>'],
|
15540 | 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
|
15541 | 'legend': [1, '<fieldset>', '</fieldset>'],
|
15542 | 'param': [1, '<object>', '</object>'],
|
15543 | 'tr': [2, '<table><tbody>', '</tbody></table>'],
|
15544 |
|
15545 | 'optgroup': selectWrap,
|
15546 | 'option': selectWrap,
|
15547 |
|
15548 | 'caption': tableWrap,
|
15549 | 'colgroup': tableWrap,
|
15550 | 'tbody': tableWrap,
|
15551 | 'tfoot': tableWrap,
|
15552 | 'thead': tableWrap,
|
15553 |
|
15554 | 'td': trWrap,
|
15555 | 'th': trWrap
|
15556 | };
|
15557 |
|
15558 |
|
15559 |
|
15560 |
|
15561 | var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
|
15562 | svgElements.forEach(function (nodeName) {
|
15563 | markupWrap[nodeName] = svgWrap;
|
15564 | shouldWrap[nodeName] = true;
|
15565 | });
|
15566 |
|
15567 |
|
15568 |
|
15569 |
|
15570 |
|
15571 |
|
15572 |
|
15573 |
|
15574 |
|
15575 | function getMarkupWrap(nodeName) {
|
15576 | !!!dummyNode ? "development" !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
|
15577 | if (!markupWrap.hasOwnProperty(nodeName)) {
|
15578 | nodeName = '*';
|
15579 | }
|
15580 | if (!shouldWrap.hasOwnProperty(nodeName)) {
|
15581 | if (nodeName === '*') {
|
15582 | dummyNode.innerHTML = '<link />';
|
15583 | } else {
|
15584 | dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
|
15585 | }
|
15586 | shouldWrap[nodeName] = !dummyNode.firstChild;
|
15587 | }
|
15588 | return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
|
15589 | }
|
15590 |
|
15591 | module.exports = getMarkupWrap;
|
15592 | },{"127":127,"141":141}],138:[function(_dereq_,module,exports){
|
15593 |
|
15594 |
|
15595 |
|
15596 |
|
15597 |
|
15598 |
|
15599 |
|
15600 |
|
15601 |
|
15602 |
|
15603 |
|
15604 | 'use strict';
|
15605 |
|
15606 |
|
15607 |
|
15608 |
|
15609 |
|
15610 |
|
15611 |
|
15612 |
|
15613 |
|
15614 |
|
15615 |
|
15616 |
|
15617 | function getUnboundedScrollPosition(scrollable) {
|
15618 | if (scrollable.Window && scrollable instanceof scrollable.Window) {
|
15619 | return {
|
15620 | x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
|
15621 | y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
|
15622 | };
|
15623 | }
|
15624 | return {
|
15625 | x: scrollable.scrollLeft,
|
15626 | y: scrollable.scrollTop
|
15627 | };
|
15628 | }
|
15629 |
|
15630 | module.exports = getUnboundedScrollPosition;
|
15631 | },{}],139:[function(_dereq_,module,exports){
|
15632 | 'use strict';
|
15633 |
|
15634 |
|
15635 |
|
15636 |
|
15637 |
|
15638 |
|
15639 |
|
15640 |
|
15641 |
|
15642 |
|
15643 |
|
15644 |
|
15645 | var _uppercasePattern = /([A-Z])/g;
|
15646 |
|
15647 |
|
15648 |
|
15649 |
|
15650 |
|
15651 |
|
15652 |
|
15653 |
|
15654 |
|
15655 |
|
15656 |
|
15657 |
|
15658 |
|
15659 | function hyphenate(string) {
|
15660 | return string.replace(_uppercasePattern, '-$1').toLowerCase();
|
15661 | }
|
15662 |
|
15663 | module.exports = hyphenate;
|
15664 | },{}],140:[function(_dereq_,module,exports){
|
15665 |
|
15666 |
|
15667 |
|
15668 |
|
15669 |
|
15670 |
|
15671 |
|
15672 |
|
15673 |
|
15674 |
|
15675 |
|
15676 | 'use strict';
|
15677 |
|
15678 | var hyphenate = _dereq_(139);
|
15679 |
|
15680 | var msPattern = /^ms-/;
|
15681 |
|
15682 |
|
15683 |
|
15684 |
|
15685 |
|
15686 |
|
15687 |
|
15688 |
|
15689 |
|
15690 |
|
15691 |
|
15692 |
|
15693 |
|
15694 |
|
15695 |
|
15696 |
|
15697 |
|
15698 | function hyphenateStyleName(string) {
|
15699 | return hyphenate(string).replace(msPattern, '-ms-');
|
15700 | }
|
15701 |
|
15702 | module.exports = hyphenateStyleName;
|
15703 | },{"139":139}],141:[function(_dereq_,module,exports){
|
15704 |
|
15705 |
|
15706 |
|
15707 |
|
15708 |
|
15709 |
|
15710 |
|
15711 |
|
15712 |
|
15713 |
|
15714 | 'use strict';
|
15715 |
|
15716 |
|
15717 |
|
15718 |
|
15719 |
|
15720 |
|
15721 |
|
15722 |
|
15723 |
|
15724 |
|
15725 |
|
15726 |
|
15727 | var validateFormat = function validateFormat(format) {};
|
15728 |
|
15729 | if ("development" !== 'production') {
|
15730 | validateFormat = function validateFormat(format) {
|
15731 | if (format === undefined) {
|
15732 | throw new Error('invariant requires an error message argument');
|
15733 | }
|
15734 | };
|
15735 | }
|
15736 |
|
15737 | function invariant(condition, format, a, b, c, d, e, f) {
|
15738 | validateFormat(format);
|
15739 |
|
15740 | if (!condition) {
|
15741 | var error;
|
15742 | if (format === undefined) {
|
15743 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
15744 | } else {
|
15745 | var args = [a, b, c, d, e, f];
|
15746 | var argIndex = 0;
|
15747 | error = new Error(format.replace(/%s/g, function () {
|
15748 | return args[argIndex++];
|
15749 | }));
|
15750 | error.name = 'Invariant Violation';
|
15751 | }
|
15752 |
|
15753 | error.framesToPop = 1;
|
15754 | throw error;
|
15755 | }
|
15756 | }
|
15757 |
|
15758 | module.exports = invariant;
|
15759 | },{}],142:[function(_dereq_,module,exports){
|
15760 | 'use strict';
|
15761 |
|
15762 |
|
15763 |
|
15764 |
|
15765 |
|
15766 |
|
15767 |
|
15768 |
|
15769 |
|
15770 |
|
15771 |
|
15772 |
|
15773 |
|
15774 |
|
15775 |
|
15776 |
|
15777 | function isNode(object) {
|
15778 | var doc = object ? object.ownerDocument || object : document;
|
15779 | var defaultView = doc.defaultView || window;
|
15780 | return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
|
15781 | }
|
15782 |
|
15783 | module.exports = isNode;
|
15784 | },{}],143:[function(_dereq_,module,exports){
|
15785 | 'use strict';
|
15786 |
|
15787 |
|
15788 |
|
15789 |
|
15790 |
|
15791 |
|
15792 |
|
15793 |
|
15794 |
|
15795 |
|
15796 |
|
15797 |
|
15798 | var isNode = _dereq_(142);
|
15799 |
|
15800 |
|
15801 |
|
15802 |
|
15803 |
|
15804 | function isTextNode(object) {
|
15805 | return isNode(object) && object.nodeType == 3;
|
15806 | }
|
15807 |
|
15808 | module.exports = isTextNode;
|
15809 | },{"142":142}],144:[function(_dereq_,module,exports){
|
15810 |
|
15811 |
|
15812 |
|
15813 |
|
15814 |
|
15815 |
|
15816 |
|
15817 |
|
15818 |
|
15819 |
|
15820 |
|
15821 |
|
15822 | 'use strict';
|
15823 |
|
15824 |
|
15825 |
|
15826 |
|
15827 |
|
15828 | function memoizeStringOnly(callback) {
|
15829 | var cache = {};
|
15830 | return function (string) {
|
15831 | if (!cache.hasOwnProperty(string)) {
|
15832 | cache[string] = callback.call(this, string);
|
15833 | }
|
15834 | return cache[string];
|
15835 | };
|
15836 | }
|
15837 |
|
15838 | module.exports = memoizeStringOnly;
|
15839 | },{}],145:[function(_dereq_,module,exports){
|
15840 |
|
15841 |
|
15842 |
|
15843 |
|
15844 |
|
15845 |
|
15846 |
|
15847 |
|
15848 |
|
15849 |
|
15850 |
|
15851 | 'use strict';
|
15852 |
|
15853 | var ExecutionEnvironment = _dereq_(127);
|
15854 |
|
15855 | var performance;
|
15856 |
|
15857 | if (ExecutionEnvironment.canUseDOM) {
|
15858 | performance = window.performance || window.msPerformance || window.webkitPerformance;
|
15859 | }
|
15860 |
|
15861 | module.exports = performance || {};
|
15862 | },{"127":127}],146:[function(_dereq_,module,exports){
|
15863 | 'use strict';
|
15864 |
|
15865 |
|
15866 |
|
15867 |
|
15868 |
|
15869 |
|
15870 |
|
15871 |
|
15872 |
|
15873 |
|
15874 |
|
15875 |
|
15876 | var performance = _dereq_(145);
|
15877 |
|
15878 | var performanceNow;
|
15879 |
|
15880 |
|
15881 |
|
15882 |
|
15883 |
|
15884 |
|
15885 | if (performance.now) {
|
15886 | performanceNow = function performanceNow() {
|
15887 | return performance.now();
|
15888 | };
|
15889 | } else {
|
15890 | performanceNow = function performanceNow() {
|
15891 | return Date.now();
|
15892 | };
|
15893 | }
|
15894 |
|
15895 | module.exports = performanceNow;
|
15896 | },{"145":145}],147:[function(_dereq_,module,exports){
|
15897 |
|
15898 |
|
15899 |
|
15900 |
|
15901 |
|
15902 |
|
15903 |
|
15904 |
|
15905 |
|
15906 |
|
15907 |
|
15908 |
|
15909 |
|
15910 |
|
15911 | 'use strict';
|
15912 |
|
15913 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
15914 |
|
15915 |
|
15916 |
|
15917 |
|
15918 |
|
15919 | function is(x, y) {
|
15920 |
|
15921 | if (x === y) {
|
15922 |
|
15923 |
|
15924 |
|
15925 | return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
15926 | } else {
|
15927 |
|
15928 | return x !== x && y !== y;
|
15929 | }
|
15930 | }
|
15931 |
|
15932 |
|
15933 |
|
15934 |
|
15935 |
|
15936 |
|
15937 | function shallowEqual(objA, objB) {
|
15938 | if (is(objA, objB)) {
|
15939 | return true;
|
15940 | }
|
15941 |
|
15942 | if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
15943 | return false;
|
15944 | }
|
15945 |
|
15946 | var keysA = Object.keys(objA);
|
15947 | var keysB = Object.keys(objB);
|
15948 |
|
15949 | if (keysA.length !== keysB.length) {
|
15950 | return false;
|
15951 | }
|
15952 |
|
15953 |
|
15954 | for (var i = 0; i < keysA.length; i++) {
|
15955 | if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
15956 | return false;
|
15957 | }
|
15958 | }
|
15959 |
|
15960 | return true;
|
15961 | }
|
15962 |
|
15963 | module.exports = shallowEqual;
|
15964 | },{}],148:[function(_dereq_,module,exports){
|
15965 |
|
15966 |
|
15967 |
|
15968 |
|
15969 |
|
15970 |
|
15971 |
|
15972 |
|
15973 |
|
15974 |
|
15975 | 'use strict';
|
15976 |
|
15977 | var emptyFunction = _dereq_(133);
|
15978 |
|
15979 |
|
15980 |
|
15981 |
|
15982 |
|
15983 |
|
15984 |
|
15985 |
|
15986 | var warning = emptyFunction;
|
15987 |
|
15988 | if ("development" !== 'production') {
|
15989 | (function () {
|
15990 | var printWarning = function printWarning(format) {
|
15991 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
15992 | args[_key - 1] = arguments[_key];
|
15993 | }
|
15994 |
|
15995 | var argIndex = 0;
|
15996 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
15997 | return args[argIndex++];
|
15998 | });
|
15999 | if (typeof console !== 'undefined') {
|
16000 | console.error(message);
|
16001 | }
|
16002 | try {
|
16003 |
|
16004 |
|
16005 |
|
16006 | throw new Error(message);
|
16007 | } catch (x) {}
|
16008 | };
|
16009 |
|
16010 | warning = function warning(condition, format) {
|
16011 | if (format === undefined) {
|
16012 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
16013 | }
|
16014 |
|
16015 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
16016 | return;
|
16017 | }
|
16018 |
|
16019 | if (!condition) {
|
16020 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
16021 | args[_key2 - 2] = arguments[_key2];
|
16022 | }
|
16023 |
|
16024 | printWarning.apply(undefined, [format].concat(args));
|
16025 | }
|
16026 | };
|
16027 | })();
|
16028 | }
|
16029 |
|
16030 | module.exports = warning;
|
16031 | },{"133":133}],149:[function(_dereq_,module,exports){
|
16032 |
|
16033 |
|
16034 |
|
16035 |
|
16036 |
|
16037 |
|
16038 | 'use strict';
|
16039 |
|
16040 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
16041 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
16042 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
16043 |
|
16044 | function toObject(val) {
|
16045 | if (val === null || val === undefined) {
|
16046 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
16047 | }
|
16048 |
|
16049 | return Object(val);
|
16050 | }
|
16051 |
|
16052 | function shouldUseNative() {
|
16053 | try {
|
16054 | if (!Object.assign) {
|
16055 | return false;
|
16056 | }
|
16057 |
|
16058 |
|
16059 |
|
16060 |
|
16061 | var test1 = new String('abc');
|
16062 | test1[5] = 'de';
|
16063 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
16064 | return false;
|
16065 | }
|
16066 |
|
16067 |
|
16068 | var test2 = {};
|
16069 | for (var i = 0; i < 10; i++) {
|
16070 | test2['_' + String.fromCharCode(i)] = i;
|
16071 | }
|
16072 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
16073 | return test2[n];
|
16074 | });
|
16075 | if (order2.join('') !== '0123456789') {
|
16076 | return false;
|
16077 | }
|
16078 |
|
16079 |
|
16080 | var test3 = {};
|
16081 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
16082 | test3[letter] = letter;
|
16083 | });
|
16084 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
16085 | 'abcdefghijklmnopqrst') {
|
16086 | return false;
|
16087 | }
|
16088 |
|
16089 | return true;
|
16090 | } catch (err) {
|
16091 |
|
16092 | return false;
|
16093 | }
|
16094 | }
|
16095 |
|
16096 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
16097 | var from;
|
16098 | var to = toObject(target);
|
16099 | var symbols;
|
16100 |
|
16101 | for (var s = 1; s < arguments.length; s++) {
|
16102 | from = Object(arguments[s]);
|
16103 |
|
16104 | for (var key in from) {
|
16105 | if (hasOwnProperty.call(from, key)) {
|
16106 | to[key] = from[key];
|
16107 | }
|
16108 | }
|
16109 |
|
16110 | if (getOwnPropertySymbols) {
|
16111 | symbols = getOwnPropertySymbols(from);
|
16112 | for (var i = 0; i < symbols.length; i++) {
|
16113 | if (propIsEnumerable.call(from, symbols[i])) {
|
16114 | to[symbols[i]] = from[symbols[i]];
|
16115 | }
|
16116 | }
|
16117 | }
|
16118 | }
|
16119 |
|
16120 | return to;
|
16121 | };
|
16122 |
|
16123 | },{}],150:[function(_dereq_,module,exports){
|
16124 |
|
16125 |
|
16126 |
|
16127 |
|
16128 |
|
16129 |
|
16130 |
|
16131 |
|
16132 |
|
16133 | 'use strict';
|
16134 |
|
16135 | if ("development" !== 'production') {
|
16136 | var invariant = _dereq_(141);
|
16137 | var warning = _dereq_(148);
|
16138 | var ReactPropTypesSecret = _dereq_(153);
|
16139 | var loggedTypeFailures = {};
|
16140 | }
|
16141 |
|
16142 |
|
16143 |
|
16144 |
|
16145 |
|
16146 |
|
16147 |
|
16148 |
|
16149 |
|
16150 |
|
16151 |
|
16152 |
|
16153 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
16154 | if ("development" !== 'production') {
|
16155 | for (var typeSpecName in typeSpecs) {
|
16156 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
16157 | var error;
|
16158 |
|
16159 |
|
16160 |
|
16161 | try {
|
16162 |
|
16163 |
|
16164 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
|
16165 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
16166 | } catch (ex) {
|
16167 | error = ex;
|
16168 | }
|
16169 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
|
16170 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
16171 |
|
16172 |
|
16173 | loggedTypeFailures[error.message] = true;
|
16174 |
|
16175 | var stack = getStack ? getStack() : '';
|
16176 |
|
16177 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
16178 | }
|
16179 | }
|
16180 | }
|
16181 | }
|
16182 | }
|
16183 |
|
16184 | module.exports = checkPropTypes;
|
16185 |
|
16186 | },{"141":141,"148":148,"153":153}],151:[function(_dereq_,module,exports){
|
16187 |
|
16188 |
|
16189 |
|
16190 |
|
16191 |
|
16192 |
|
16193 |
|
16194 |
|
16195 |
|
16196 | 'use strict';
|
16197 |
|
16198 |
|
16199 |
|
16200 |
|
16201 |
|
16202 | var factory = _dereq_(152);
|
16203 | module.exports = function(isValidElement) {
|
16204 |
|
16205 | var throwOnDirectAccess = false;
|
16206 | return factory(isValidElement, throwOnDirectAccess);
|
16207 | };
|
16208 |
|
16209 | },{"152":152}],152:[function(_dereq_,module,exports){
|
16210 |
|
16211 |
|
16212 |
|
16213 |
|
16214 |
|
16215 |
|
16216 |
|
16217 |
|
16218 |
|
16219 | 'use strict';
|
16220 |
|
16221 | var emptyFunction = _dereq_(133);
|
16222 | var invariant = _dereq_(141);
|
16223 | var warning = _dereq_(148);
|
16224 |
|
16225 | var ReactPropTypesSecret = _dereq_(153);
|
16226 | var checkPropTypes = _dereq_(150);
|
16227 |
|
16228 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
16229 |
|
16230 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
16231 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
16232 |
|
16233 | |
16234 |
|
16235 |
|
16236 |
|
16237 |
|
16238 |
|
16239 |
|
16240 |
|
16241 |
|
16242 |
|
16243 |
|
16244 |
|
16245 |
|
16246 |
|
16247 | function getIteratorFn(maybeIterable) {
|
16248 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
16249 | if (typeof iteratorFn === 'function') {
|
16250 | return iteratorFn;
|
16251 | }
|
16252 | }
|
16253 |
|
16254 | |
16255 |
|
16256 |
|
16257 |
|
16258 |
|
16259 |
|
16260 |
|
16261 |
|
16262 |
|
16263 |
|
16264 |
|
16265 |
|
16266 |
|
16267 |
|
16268 |
|
16269 |
|
16270 |
|
16271 |
|
16272 |
|
16273 |
|
16274 |
|
16275 |
|
16276 |
|
16277 |
|
16278 |
|
16279 |
|
16280 |
|
16281 |
|
16282 |
|
16283 |
|
16284 |
|
16285 |
|
16286 |
|
16287 |
|
16288 |
|
16289 |
|
16290 |
|
16291 |
|
16292 |
|
16293 |
|
16294 |
|
16295 |
|
16296 |
|
16297 |
|
16298 |
|
16299 |
|
16300 |
|
16301 | var ANONYMOUS = '<<anonymous>>';
|
16302 |
|
16303 |
|
16304 |
|
16305 | var ReactPropTypes = {
|
16306 | array: createPrimitiveTypeChecker('array'),
|
16307 | bool: createPrimitiveTypeChecker('boolean'),
|
16308 | func: createPrimitiveTypeChecker('function'),
|
16309 | number: createPrimitiveTypeChecker('number'),
|
16310 | object: createPrimitiveTypeChecker('object'),
|
16311 | string: createPrimitiveTypeChecker('string'),
|
16312 | symbol: createPrimitiveTypeChecker('symbol'),
|
16313 |
|
16314 | any: createAnyTypeChecker(),
|
16315 | arrayOf: createArrayOfTypeChecker,
|
16316 | element: createElementTypeChecker(),
|
16317 | instanceOf: createInstanceTypeChecker,
|
16318 | node: createNodeChecker(),
|
16319 | objectOf: createObjectOfTypeChecker,
|
16320 | oneOf: createEnumTypeChecker,
|
16321 | oneOfType: createUnionTypeChecker,
|
16322 | shape: createShapeTypeChecker
|
16323 | };
|
16324 |
|
16325 | |
16326 |
|
16327 |
|
16328 |
|
16329 |
|
16330 | function is(x, y) {
|
16331 |
|
16332 | if (x === y) {
|
16333 |
|
16334 |
|
16335 | return x !== 0 || 1 / x === 1 / y;
|
16336 | } else {
|
16337 |
|
16338 | return x !== x && y !== y;
|
16339 | }
|
16340 | }
|
16341 |
|
16342 |
|
16343 | |
16344 |
|
16345 |
|
16346 |
|
16347 |
|
16348 |
|
16349 |
|
16350 | function PropTypeError(message) {
|
16351 | this.message = message;
|
16352 | this.stack = '';
|
16353 | }
|
16354 |
|
16355 | PropTypeError.prototype = Error.prototype;
|
16356 |
|
16357 | function createChainableTypeChecker(validate) {
|
16358 | if ("development" !== 'production') {
|
16359 | var manualPropTypeCallCache = {};
|
16360 | var manualPropTypeWarningCount = 0;
|
16361 | }
|
16362 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
16363 | componentName = componentName || ANONYMOUS;
|
16364 | propFullName = propFullName || propName;
|
16365 |
|
16366 | if (secret !== ReactPropTypesSecret) {
|
16367 | if (throwOnDirectAccess) {
|
16368 |
|
16369 | invariant(
|
16370 | false,
|
16371 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
16372 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
16373 | 'Read more at http://fb.me/use-check-prop-types'
|
16374 | );
|
16375 | } else if ("development" !== 'production' && typeof console !== 'undefined') {
|
16376 |
|
16377 | var cacheKey = componentName + ':' + propName;
|
16378 | if (
|
16379 | !manualPropTypeCallCache[cacheKey] &&
|
16380 |
|
16381 | manualPropTypeWarningCount < 3
|
16382 | ) {
|
16383 | warning(
|
16384 | false,
|
16385 | 'You are manually calling a React.PropTypes validation ' +
|
16386 | 'function for the `%s` prop on `%s`. This is deprecated ' +
|
16387 | 'and will throw in the standalone `prop-types` package. ' +
|
16388 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
16389 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
16390 | propFullName,
|
16391 | componentName
|
16392 | );
|
16393 | manualPropTypeCallCache[cacheKey] = true;
|
16394 | manualPropTypeWarningCount++;
|
16395 | }
|
16396 | }
|
16397 | }
|
16398 | if (props[propName] == null) {
|
16399 | if (isRequired) {
|
16400 | if (props[propName] === null) {
|
16401 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
16402 | }
|
16403 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
16404 | }
|
16405 | return null;
|
16406 | } else {
|
16407 | return validate(props, propName, componentName, location, propFullName);
|
16408 | }
|
16409 | }
|
16410 |
|
16411 | var chainedCheckType = checkType.bind(null, false);
|
16412 | chainedCheckType.isRequired = checkType.bind(null, true);
|
16413 |
|
16414 | return chainedCheckType;
|
16415 | }
|
16416 |
|
16417 | function createPrimitiveTypeChecker(expectedType) {
|
16418 | function validate(props, propName, componentName, location, propFullName, secret) {
|
16419 | var propValue = props[propName];
|
16420 | var propType = getPropType(propValue);
|
16421 | if (propType !== expectedType) {
|
16422 |
|
16423 |
|
16424 |
|
16425 | var preciseType = getPreciseType(propValue);
|
16426 |
|
16427 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
16428 | }
|
16429 | return null;
|
16430 | }
|
16431 | return createChainableTypeChecker(validate);
|
16432 | }
|
16433 |
|
16434 | function createAnyTypeChecker() {
|
16435 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
16436 | }
|
16437 |
|
16438 | function createArrayOfTypeChecker(typeChecker) {
|
16439 | function validate(props, propName, componentName, location, propFullName) {
|
16440 | if (typeof typeChecker !== 'function') {
|
16441 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
16442 | }
|
16443 | var propValue = props[propName];
|
16444 | if (!Array.isArray(propValue)) {
|
16445 | var propType = getPropType(propValue);
|
16446 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
16447 | }
|
16448 | for (var i = 0; i < propValue.length; i++) {
|
16449 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
16450 | if (error instanceof Error) {
|
16451 | return error;
|
16452 | }
|
16453 | }
|
16454 | return null;
|
16455 | }
|
16456 | return createChainableTypeChecker(validate);
|
16457 | }
|
16458 |
|
16459 | function createElementTypeChecker() {
|
16460 | function validate(props, propName, componentName, location, propFullName) {
|
16461 | var propValue = props[propName];
|
16462 | if (!isValidElement(propValue)) {
|
16463 | var propType = getPropType(propValue);
|
16464 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
16465 | }
|
16466 | return null;
|
16467 | }
|
16468 | return createChainableTypeChecker(validate);
|
16469 | }
|
16470 |
|
16471 | function createInstanceTypeChecker(expectedClass) {
|
16472 | function validate(props, propName, componentName, location, propFullName) {
|
16473 | if (!(props[propName] instanceof expectedClass)) {
|
16474 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
16475 | var actualClassName = getClassName(props[propName]);
|
16476 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
16477 | }
|
16478 | return null;
|
16479 | }
|
16480 | return createChainableTypeChecker(validate);
|
16481 | }
|
16482 |
|
16483 | function createEnumTypeChecker(expectedValues) {
|
16484 | if (!Array.isArray(expectedValues)) {
|
16485 | "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
16486 | return emptyFunction.thatReturnsNull;
|
16487 | }
|
16488 |
|
16489 | function validate(props, propName, componentName, location, propFullName) {
|
16490 | var propValue = props[propName];
|
16491 | for (var i = 0; i < expectedValues.length; i++) {
|
16492 | if (is(propValue, expectedValues[i])) {
|
16493 | return null;
|
16494 | }
|
16495 | }
|
16496 |
|
16497 | var valuesString = JSON.stringify(expectedValues);
|
16498 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
16499 | }
|
16500 | return createChainableTypeChecker(validate);
|
16501 | }
|
16502 |
|
16503 | function createObjectOfTypeChecker(typeChecker) {
|
16504 | function validate(props, propName, componentName, location, propFullName) {
|
16505 | if (typeof typeChecker !== 'function') {
|
16506 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
16507 | }
|
16508 | var propValue = props[propName];
|
16509 | var propType = getPropType(propValue);
|
16510 | if (propType !== 'object') {
|
16511 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
16512 | }
|
16513 | for (var key in propValue) {
|
16514 | if (propValue.hasOwnProperty(key)) {
|
16515 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
16516 | if (error instanceof Error) {
|
16517 | return error;
|
16518 | }
|
16519 | }
|
16520 | }
|
16521 | return null;
|
16522 | }
|
16523 | return createChainableTypeChecker(validate);
|
16524 | }
|
16525 |
|
16526 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
16527 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
16528 | "development" !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
16529 | return emptyFunction.thatReturnsNull;
|
16530 | }
|
16531 |
|
16532 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
16533 | var checker = arrayOfTypeCheckers[i];
|
16534 | if (typeof checker !== 'function') {
|
16535 | warning(
|
16536 | false,
|
16537 | 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
|
16538 | 'received %s at index %s.',
|
16539 | getPostfixForTypeWarning(checker),
|
16540 | i
|
16541 | );
|
16542 | return emptyFunction.thatReturnsNull;
|
16543 | }
|
16544 | }
|
16545 |
|
16546 | function validate(props, propName, componentName, location, propFullName) {
|
16547 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
16548 | var checker = arrayOfTypeCheckers[i];
|
16549 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
16550 | return null;
|
16551 | }
|
16552 | }
|
16553 |
|
16554 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
16555 | }
|
16556 | return createChainableTypeChecker(validate);
|
16557 | }
|
16558 |
|
16559 | function createNodeChecker() {
|
16560 | function validate(props, propName, componentName, location, propFullName) {
|
16561 | if (!isNode(props[propName])) {
|
16562 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
16563 | }
|
16564 | return null;
|
16565 | }
|
16566 | return createChainableTypeChecker(validate);
|
16567 | }
|
16568 |
|
16569 | function createShapeTypeChecker(shapeTypes) {
|
16570 | function validate(props, propName, componentName, location, propFullName) {
|
16571 | var propValue = props[propName];
|
16572 | var propType = getPropType(propValue);
|
16573 | if (propType !== 'object') {
|
16574 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
16575 | }
|
16576 | for (var key in shapeTypes) {
|
16577 | var checker = shapeTypes[key];
|
16578 | if (!checker) {
|
16579 | continue;
|
16580 | }
|
16581 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
16582 | if (error) {
|
16583 | return error;
|
16584 | }
|
16585 | }
|
16586 | return null;
|
16587 | }
|
16588 | return createChainableTypeChecker(validate);
|
16589 | }
|
16590 |
|
16591 | function isNode(propValue) {
|
16592 | switch (typeof propValue) {
|
16593 | case 'number':
|
16594 | case 'string':
|
16595 | case 'undefined':
|
16596 | return true;
|
16597 | case 'boolean':
|
16598 | return !propValue;
|
16599 | case 'object':
|
16600 | if (Array.isArray(propValue)) {
|
16601 | return propValue.every(isNode);
|
16602 | }
|
16603 | if (propValue === null || isValidElement(propValue)) {
|
16604 | return true;
|
16605 | }
|
16606 |
|
16607 | var iteratorFn = getIteratorFn(propValue);
|
16608 | if (iteratorFn) {
|
16609 | var iterator = iteratorFn.call(propValue);
|
16610 | var step;
|
16611 | if (iteratorFn !== propValue.entries) {
|
16612 | while (!(step = iterator.next()).done) {
|
16613 | if (!isNode(step.value)) {
|
16614 | return false;
|
16615 | }
|
16616 | }
|
16617 | } else {
|
16618 |
|
16619 | while (!(step = iterator.next()).done) {
|
16620 | var entry = step.value;
|
16621 | if (entry) {
|
16622 | if (!isNode(entry[1])) {
|
16623 | return false;
|
16624 | }
|
16625 | }
|
16626 | }
|
16627 | }
|
16628 | } else {
|
16629 | return false;
|
16630 | }
|
16631 |
|
16632 | return true;
|
16633 | default:
|
16634 | return false;
|
16635 | }
|
16636 | }
|
16637 |
|
16638 | function isSymbol(propType, propValue) {
|
16639 |
|
16640 | if (propType === 'symbol') {
|
16641 | return true;
|
16642 | }
|
16643 |
|
16644 |
|
16645 | if (propValue['@@toStringTag'] === 'Symbol') {
|
16646 | return true;
|
16647 | }
|
16648 |
|
16649 |
|
16650 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
16651 | return true;
|
16652 | }
|
16653 |
|
16654 | return false;
|
16655 | }
|
16656 |
|
16657 |
|
16658 | function getPropType(propValue) {
|
16659 | var propType = typeof propValue;
|
16660 | if (Array.isArray(propValue)) {
|
16661 | return 'array';
|
16662 | }
|
16663 | if (propValue instanceof RegExp) {
|
16664 |
|
16665 |
|
16666 |
|
16667 | return 'object';
|
16668 | }
|
16669 | if (isSymbol(propType, propValue)) {
|
16670 | return 'symbol';
|
16671 | }
|
16672 | return propType;
|
16673 | }
|
16674 |
|
16675 |
|
16676 |
|
16677 | function getPreciseType(propValue) {
|
16678 | if (typeof propValue === 'undefined' || propValue === null) {
|
16679 | return '' + propValue;
|
16680 | }
|
16681 | var propType = getPropType(propValue);
|
16682 | if (propType === 'object') {
|
16683 | if (propValue instanceof Date) {
|
16684 | return 'date';
|
16685 | } else if (propValue instanceof RegExp) {
|
16686 | return 'regexp';
|
16687 | }
|
16688 | }
|
16689 | return propType;
|
16690 | }
|
16691 |
|
16692 |
|
16693 |
|
16694 | function getPostfixForTypeWarning(value) {
|
16695 | var type = getPreciseType(value);
|
16696 | switch (type) {
|
16697 | case 'array':
|
16698 | case 'object':
|
16699 | return 'an ' + type;
|
16700 | case 'boolean':
|
16701 | case 'date':
|
16702 | case 'regexp':
|
16703 | return 'a ' + type;
|
16704 | default:
|
16705 | return type;
|
16706 | }
|
16707 | }
|
16708 |
|
16709 |
|
16710 | function getClassName(propValue) {
|
16711 | if (!propValue.constructor || !propValue.constructor.name) {
|
16712 | return ANONYMOUS;
|
16713 | }
|
16714 | return propValue.constructor.name;
|
16715 | }
|
16716 |
|
16717 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
16718 | ReactPropTypes.PropTypes = ReactPropTypes;
|
16719 |
|
16720 | return ReactPropTypes;
|
16721 | };
|
16722 |
|
16723 | },{"133":133,"141":141,"148":148,"150":150,"153":153}],153:[function(_dereq_,module,exports){
|
16724 |
|
16725 |
|
16726 |
|
16727 |
|
16728 |
|
16729 |
|
16730 |
|
16731 |
|
16732 |
|
16733 | 'use strict';
|
16734 |
|
16735 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
16736 |
|
16737 | module.exports = ReactPropTypesSecret;
|
16738 |
|
16739 | },{}]},{},[41])(41)
|
16740 | });
|
16741 | });
|