UNPKG

695 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["index"] = factory();
8 else
9 root["index"] = factory();
10})(this, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId])
20/******/ return installedModules[moduleId].exports;
21
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ exports: {},
25/******/ id: moduleId,
26/******/ loaded: false
27/******/ };
28
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
32/******/ // Flag the module as loaded
33/******/ module.loaded = true;
34
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38
39
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45
46/******/ // __webpack_public_path__
47/******/ __webpack_require__.p = "";
48
49/******/ // Load entry module and return exports
50/******/ return __webpack_require__(0);
51/******/ })
52/************************************************************************/
53/******/ ([
54/* 0 */
55/***/ (function(module, exports, __webpack_require__) {
56
57 __webpack_require__(1);
58 module.exports = __webpack_require__(1);
59
60
61/***/ }),
62/* 1 */
63/***/ (function(module, exports, __webpack_require__) {
64
65 'use strict';
66
67 Object.defineProperty(exports, "__esModule", {
68 value: true
69 });
70 exports.removeResizeListener = exports.addResizeListener = undefined;
71
72 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /* eslint-disable */
73
74
75 exports.clearToolTipDom = clearToolTipDom;
76 exports.uid = uid;
77 exports.judgeBrowser = judgeBrowser;
78 exports.judgeSys = judgeSys;
79 exports.contains = contains;
80 exports.createDom = createDom;
81 exports.getHeightLight = getHeightLight;
82 exports.deepClone = deepClone;
83 exports.transferData = transferData;
84 exports.encode = encode;
85 exports.decode = decode;
86
87 var _react = __webpack_require__(2);
88
89 var _react2 = _interopRequireDefault(_react);
90
91 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
92
93 function clearToolTipDom() {
94 var dom_1 = document.getElementsByClassName('tooltip')[0];
95 var dom_2 = document.getElementsByClassName('tooltip-arrow')[0];
96 if (dom_1 && dom_2) {
97 var parNode = dom_1.parentNode;
98 parNode.removeChild(dom_1);
99 parNode.removeChild(dom_2);
100 }
101 }
102
103 function uid(flag) {
104 var now = +new Date();
105 return flag + ('-' + now);
106 }
107
108 function judgeBrowser() {
109 var userAgent = navigator.userAgent;
110 var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
111 reIE.test(userAgent);
112 var fIEVersion = parseFloat(RegExp["$1"]);
113 var browser = {
114 isEdge: /Edge/.test(userAgent),
115 isOpera: /Opera/.test(userAgent),
116 isFirefox: /Firefox/.test(userAgent),
117 isBaidu: /bidubrowser/.test(userAgent),
118 isSougo: /metasr/.test(userAgent),
119 is360: /360se/.test(userAgent),
120 isUc: /ucweb/.test(userAgent),
121 isLB: /lbbrowser/.test(userAgent),
122 isWX: /micromessenger/.test(userAgent),
123 isQQ: /qqbrowser/.test(userAgent),
124 isChrome: userAgent.indexOf("Chrome") > -1 && userAgent.indexOf("Safari") > -1,
125 isSafari: userAgent.indexOf("Safari") > -1 && userAgent.indexOf("Chrome") == -1,
126 isIe: !!window.ActiveXObject || "ActiveXObject" in window,
127 isIe7: fIEVersion == 7,
128 isIe8: fIEVersion == 8,
129 isIe9: fIEVersion == 9,
130 ieIe10: fIEVersion == 10,
131 ieIe11: fIEVersion == 11
132 };
133 return browser;
134 }
135
136 function judgeSys() {
137 var userAgent = navigator.userAgent;
138 var browser = {
139 isMac: /Mac OS/.test(userAgent),
140 isIpad: /ipad/.test(userAgent),
141 isIphone: /iphone os/.test(userAgent),
142 isAndroid: /android/.test(userAgent),
143 isWindowsCe: /windows ce/.test(userAgent),
144 isWindowsMobile: /windows mobile/.test(userAgent),
145 isWin2K: /windows nt 5.0/.test(userAgent),
146 isXP: /windows nt 5.1/.test(userAgent),
147 isVista: /windows nt 6.0/.test(userAgent),
148 isWin7: /windows nt 6.1/.test(userAgent),
149 isWin8: /windows nt 6.2/.test(userAgent),
150 isWin81: /windows nt 6.3/.test(userAgent),
151 isWin10: /"Windows NT 10.0/.test(userAgent)
152 };
153 return browser;
154 }
155
156 // 判断n 元素是否是 root中的子元素
157 function contains(root, n) {
158 var node = n;
159 while (node) {
160 if (node === root) {
161 return true;
162 }
163 node = node.parentNode;
164 }
165
166 return false;
167 }
168
169 /* Modified from https://github.com/sdecima/javascript-detect-element-resize
170 * version: 0.5.3
171 *
172 * The MIT License (MIT)
173 *
174 * Copyright (c) 2013 Sebastián Décima
175 *
176 * Permission is hereby granted, free of charge, to any person obtaining a copy of
177 * this software and associated documentation files (the "Software"), to deal in
178 * the Software without restriction, including without limitation the rights to
179 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
180 * the Software, and to permit persons to whom the Software is furnished to do so,
181 * subject to the following conditions:
182 *
183 * The above copyright notice and this permission notice shall be included in all
184 * copies or substantial portions of the Software.
185 *
186 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
187 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
188 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
189 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
190 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
191 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
192 *
193 */
194 /* eslint-disable */
195 var isServer = typeof window === 'undefined';
196
197 /* istanbul ignore next */
198 var requestFrame = function () {
199 if (isServer) return;
200 var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
201 return window.setTimeout(fn, 20);
202 };
203 return function (fn) {
204 return raf(fn);
205 };
206 }();
207
208 /* istanbul ignore next */
209 var cancelFrame = function () {
210 if (isServer) return;
211 var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout;
212 return function (id) {
213 return cancel(id);
214 };
215 }();
216
217 /* istanbul ignore next */
218 var resetTrigger = function resetTrigger(element) {
219 var trigger = element.__resizeTrigger__;
220 var expand = trigger.firstElementChild;
221 var contract = trigger.lastElementChild;
222 var expandChild = expand.firstElementChild;
223
224 contract.scrollLeft = contract.scrollWidth;
225 contract.scrollTop = contract.scrollHeight;
226 expandChild.style.width = expand.offsetWidth + 1 + 'px';
227 expandChild.style.height = expand.offsetHeight + 1 + 'px';
228 expand.scrollLeft = expand.scrollWidth;
229 expand.scrollTop = expand.scrollHeight;
230 };
231
232 /* istanbul ignore next */
233 var checkTriggers = function checkTriggers(element) {
234 return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
235 };
236
237 /* istanbul ignore next */
238 var scrollListener = function scrollListener(event) {
239 var _this = this;
240
241 resetTrigger(this);
242 if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
243 this.__resizeRAF__ = requestFrame(function () {
244 if (checkTriggers(_this)) {
245 _this.__resizeLast__.width = _this.offsetWidth;
246 _this.__resizeLast__.height = _this.offsetHeight;
247 _this.__resizeListeners__.forEach(function (fn) {
248 fn.call(_this, event);
249 });
250 }
251 });
252 };
253
254 /* Detect CSS Animations support to detect element display/re-attach */
255 var attachEvent = isServer ? {} : document.attachEvent;
256 var DOM_PREFIXES = 'Webkit Moz O ms'.split(' ');
257 var START_EVENTS = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
258 var RESIZE_ANIMATION_NAME = 'resizeanim';
259 var animation = false;
260 var keyFramePrefix = '';
261 var animationStartEvent = 'animationstart';
262
263 /* istanbul ignore next */
264 if (!attachEvent && !isServer) {
265 var testElement = document.createElement('fakeelement');
266 if (testElement.style.animationName !== undefined) {
267 animation = true;
268 }
269
270 if (animation === false) {
271 var prefix = '';
272 for (var i = 0; i < DOM_PREFIXES.length; i++) {
273 if (testElement.style[DOM_PREFIXES[i] + 'AnimationName'] !== undefined) {
274 prefix = DOM_PREFIXES[i];
275 keyFramePrefix = '-' + prefix.toLowerCase() + '-';
276 animationStartEvent = START_EVENTS[i];
277 animation = true;
278 break;
279 }
280 }
281 }
282 }
283
284 var stylesCreated = false;
285 /* istanbul ignore next */
286 var createStyles = function createStyles() {
287 if (!stylesCreated && !isServer) {
288 var animationKeyframes = '@' + keyFramePrefix + 'keyframes ' + RESIZE_ANIMATION_NAME + ' { from { opacity: 0; } to { opacity: 0; } } ';
289 var animationStyle = keyFramePrefix + 'animation: 1ms ' + RESIZE_ANIMATION_NAME + ';';
290
291 // opacity: 0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
292 var css = animationKeyframes + '\n .resize-triggers { ' + animationStyle + ' visibility: hidden; opacity: 0; }\n .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1 }\n .resize-triggers > div { background: #eee; overflow: auto; }\n .contract-trigger:before { width: 200%; height: 200%; }';
293
294 var head = document.head || document.getElementsByTagName('head')[0];
295 var style = document.createElement('style');
296
297 style.type = 'text/css';
298 if (style.styleSheet) {
299 style.styleSheet.cssText = css;
300 } else {
301 style.appendChild(document.createTextNode(css));
302 }
303
304 head.appendChild(style);
305 stylesCreated = true;
306 }
307 };
308
309 /* istanbul ignore next */
310 var addResizeListener = exports.addResizeListener = function addResizeListener(element, fn) {
311 if (isServer) return;
312 if (attachEvent) {
313 element.attachEvent('onresize', fn);
314 } else {
315 if (!element.__resizeTrigger__) {
316 if (getComputedStyle(element).position === 'static') {
317 element.style.position = 'relative';
318 }
319 createStyles();
320 element.__resizeLast__ = {};
321 element.__resizeListeners__ = [];
322
323 var resizeTrigger = element.__resizeTrigger__ = document.createElement('div');
324 resizeTrigger.className = 'resize-triggers';
325 resizeTrigger.innerHTML = '<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';
326 element.appendChild(resizeTrigger);
327
328 resetTrigger(element);
329 element.addEventListener('scroll', scrollListener, true);
330
331 /* Listen for a css animation to detect element display/re-attach */
332 if (animationStartEvent) {
333 resizeTrigger.addEventListener(animationStartEvent, function (event) {
334 if (event.animationName === RESIZE_ANIMATION_NAME) {
335 resetTrigger(element);
336 }
337 });
338 }
339 }
340 element.__resizeListeners__.push(fn);
341 }
342 };
343
344 /* istanbul ignore next */
345 var removeResizeListener = exports.removeResizeListener = function removeResizeListener(element, fn) {
346 if (attachEvent) {
347 element.detachEvent('onresize', fn);
348 } else {
349 element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
350 if (!element.__resizeListeners__.length) {
351 element.removeEventListener('scroll', scrollListener);
352 element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
353 }
354 }
355 };
356
357 // 创建挂载容器
358 function createDom(id) {
359 if (document.getElementById(id)) return;
360 var oDiv = document.createElement('div');
361 oDiv.id = id;
362 document.body.appendChild(oDiv);
363 }
364
365 function getHeightLight(searchval, text) {
366 var str = [];
367 if (searchval.length > 0) {
368 //获取搜索字符在字段中的位置,分两种 1.首位(index==0) 2.非首位
369 var index = text.indexOf(searchval);
370 var valueLength = searchval.length;
371
372 if (index == 0) {
373 str.beforeText = "";
374 var subValue = text.substring(index, valueLength);
375 str.searchContent = _react2.default.createElement(
376 'em',
377 null,
378 subValue
379 );
380 str.lastext = text.substring(valueLength, text.length);
381 } else if (index > 0) {
382 str.beforeText = text.substring(0, index);
383 var _subValue = text.substring(index, valueLength + index);
384 str.searchContent = _react2.default.createElement(
385 'em',
386 null,
387 _subValue
388 );
389 str.lastext = text.substring(valueLength + index, text.length);
390 }
391 } else {
392 str.beforeText = "";
393 str.searchContent = "";
394 str.lastext = text;
395 }
396 return str;
397 }
398
399 function deepClone(item) {
400 if (!item) return item;
401 var types = [Number, String, Boolean],
402 result;
403 types.forEach(function (type) {
404 if (item instanceof type) {
405 result = type(item);
406 }
407 });
408
409 if (typeof result == "undefined") {
410 if (Object.prototype.toString.call(item) === "[object Array]") {
411 result = [];
412 item.forEach(function (child, index, array) {
413 result[index] = deepClone(child);
414 });
415 } else if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) == "object") {
416 if (item.nodeType && typeof item.cloneNode == "function") {
417 result = item.cloneNode(true);
418 } else if (!item.prototype) {
419 if (item instanceof Date) {
420 result = new Date(item);
421 } else {
422 result = {};
423 for (var i in item) {
424 result[i] = deepClone(item[i]);
425 }
426 }
427 } else {
428 result = item;
429 }
430 } else {
431 result = item;
432 }
433 }
434 return result;
435 }
436
437 function transferData(data) {
438 var filter = [],
439 getData = {},
440 self = this;
441
442 for (var _i in data) {
443 if (data[_i] != undefined) getData[data[_i]["id"]] = data[_i];
444 }
445 for (var j in data) {
446 if (data[j]) {
447 var item = data[j],
448 temp = getData[item["pid"]];
449 if (temp && temp.id != temp.pid) {
450 !temp["li"] && (temp["li"] = []);
451 temp["li"].push(item);
452 } else {
453 filter.push(item);
454 }
455 }
456 }
457 return filter;
458 }
459
460 function encode(str) {
461 if (!str || typeof str != 'string') {
462 return str;
463 }
464 str = str.toString();
465 return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
466 }
467
468 function decode(str) {
469 if (!str || typeof str != 'string') {
470 return str;
471 }
472 str = str.toString();
473 return str.replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&amp;/g, '&');
474 }
475
476/***/ }),
477/* 2 */
478/***/ (function(module, exports, __webpack_require__) {
479
480 'use strict';
481
482 module.exports = __webpack_require__(3);
483
484
485/***/ }),
486/* 3 */
487/***/ (function(module, exports, __webpack_require__) {
488
489 /**
490 * Copyright 2013-2015, Facebook, Inc.
491 * All rights reserved.
492 *
493 * This source code is licensed under the BSD-style license found in the
494 * LICENSE file in the root directory of this source tree. An additional grant
495 * of patent rights can be found in the PATENTS file in the same directory.
496 *
497 * @providesModule React
498 */
499
500 'use strict';
501
502 var ReactDOM = __webpack_require__(4);
503 var ReactDOMServer = __webpack_require__(149);
504 var ReactIsomorphic = __webpack_require__(153);
505
506 var assign = __webpack_require__(40);
507 var deprecated = __webpack_require__(158);
508
509 // `version` will be added here by ReactIsomorphic.
510 var React = {};
511
512 assign(React, ReactIsomorphic);
513
514 assign(React, {
515 // ReactDOM
516 findDOMNode: deprecated('findDOMNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.findDOMNode),
517 render: deprecated('render', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.render),
518 unmountComponentAtNode: deprecated('unmountComponentAtNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.unmountComponentAtNode),
519
520 // ReactDOMServer
521 renderToString: deprecated('renderToString', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToString),
522 renderToStaticMarkup: deprecated('renderToStaticMarkup', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToStaticMarkup)
523 });
524
525 React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM;
526 React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMServer;
527
528 module.exports = React;
529
530/***/ }),
531/* 4 */
532/***/ (function(module, exports, __webpack_require__) {
533
534 /* WEBPACK VAR INJECTION */(function(process) {/**
535 * Copyright 2013-2015, Facebook, Inc.
536 * All rights reserved.
537 *
538 * This source code is licensed under the BSD-style license found in the
539 * LICENSE file in the root directory of this source tree. An additional grant
540 * of patent rights can be found in the PATENTS file in the same directory.
541 *
542 * @providesModule ReactDOM
543 */
544
545 /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
546
547 'use strict';
548
549 var ReactCurrentOwner = __webpack_require__(6);
550 var ReactDOMTextComponent = __webpack_require__(7);
551 var ReactDefaultInjection = __webpack_require__(72);
552 var ReactInstanceHandles = __webpack_require__(46);
553 var ReactMount = __webpack_require__(29);
554 var ReactPerf = __webpack_require__(19);
555 var ReactReconciler = __webpack_require__(51);
556 var ReactUpdates = __webpack_require__(55);
557 var ReactVersion = __webpack_require__(147);
558
559 var findDOMNode = __webpack_require__(92);
560 var renderSubtreeIntoContainer = __webpack_require__(148);
561 var warning = __webpack_require__(26);
562
563 ReactDefaultInjection.inject();
564
565 var render = ReactPerf.measure('React', 'render', ReactMount.render);
566
567 var React = {
568 findDOMNode: findDOMNode,
569 render: render,
570 unmountComponentAtNode: ReactMount.unmountComponentAtNode,
571 version: ReactVersion,
572
573 /* eslint-disable camelcase */
574 unstable_batchedUpdates: ReactUpdates.batchedUpdates,
575 unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
576 };
577
578 // Inject the runtime into a devtools global hook regardless of browser.
579 // Allows for debugging when the hook is injected on the page.
580 /* eslint-enable camelcase */
581 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
582 __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
583 CurrentOwner: ReactCurrentOwner,
584 InstanceHandles: ReactInstanceHandles,
585 Mount: ReactMount,
586 Reconciler: ReactReconciler,
587 TextComponent: ReactDOMTextComponent
588 });
589 }
590
591 if (process.env.NODE_ENV !== 'production') {
592 var ExecutionEnvironment = __webpack_require__(10);
593 if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
594
595 // First check if devtools is not installed
596 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
597 // If we're in Chrome or Firefox, provide a download link if not installed.
598 if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
599 console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools');
600 }
601 }
602
603 // If we're in IE8, check to see if we are in compatibility mode and provide
604 // information on preventing compatibility mode
605 var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
606
607 process.env.NODE_ENV !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : undefined;
608
609 var expectedFeatures = [
610 // shims
611 Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim,
612
613 // shams
614 Object.create, Object.freeze];
615
616 for (var i = 0; i < expectedFeatures.length; i++) {
617 if (!expectedFeatures[i]) {
618 console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills');
619 break;
620 }
621 }
622 }
623 }
624
625 module.exports = React;
626 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
627
628/***/ }),
629/* 5 */
630/***/ (function(module, exports) {
631
632 // shim for using process in browser
633 var process = module.exports = {};
634
635 // cached from whatever global is present so that test runners that stub it
636 // don't break things. But we need to wrap it in a try catch in case it is
637 // wrapped in strict mode code which doesn't define any globals. It's inside a
638 // function because try/catches deoptimize in certain engines.
639
640 var cachedSetTimeout;
641 var cachedClearTimeout;
642
643 function defaultSetTimout() {
644 throw new Error('setTimeout has not been defined');
645 }
646 function defaultClearTimeout () {
647 throw new Error('clearTimeout has not been defined');
648 }
649 (function () {
650 try {
651 if (typeof setTimeout === 'function') {
652 cachedSetTimeout = setTimeout;
653 } else {
654 cachedSetTimeout = defaultSetTimout;
655 }
656 } catch (e) {
657 cachedSetTimeout = defaultSetTimout;
658 }
659 try {
660 if (typeof clearTimeout === 'function') {
661 cachedClearTimeout = clearTimeout;
662 } else {
663 cachedClearTimeout = defaultClearTimeout;
664 }
665 } catch (e) {
666 cachedClearTimeout = defaultClearTimeout;
667 }
668 } ())
669 function runTimeout(fun) {
670 if (cachedSetTimeout === setTimeout) {
671 //normal enviroments in sane situations
672 return setTimeout(fun, 0);
673 }
674 // if setTimeout wasn't available but was latter defined
675 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
676 cachedSetTimeout = setTimeout;
677 return setTimeout(fun, 0);
678 }
679 try {
680 // when when somebody has screwed with setTimeout but no I.E. maddness
681 return cachedSetTimeout(fun, 0);
682 } catch(e){
683 try {
684 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
685 return cachedSetTimeout.call(null, fun, 0);
686 } catch(e){
687 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
688 return cachedSetTimeout.call(this, fun, 0);
689 }
690 }
691
692
693 }
694 function runClearTimeout(marker) {
695 if (cachedClearTimeout === clearTimeout) {
696 //normal enviroments in sane situations
697 return clearTimeout(marker);
698 }
699 // if clearTimeout wasn't available but was latter defined
700 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
701 cachedClearTimeout = clearTimeout;
702 return clearTimeout(marker);
703 }
704 try {
705 // when when somebody has screwed with setTimeout but no I.E. maddness
706 return cachedClearTimeout(marker);
707 } catch (e){
708 try {
709 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
710 return cachedClearTimeout.call(null, marker);
711 } catch (e){
712 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
713 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
714 return cachedClearTimeout.call(this, marker);
715 }
716 }
717
718
719
720 }
721 var queue = [];
722 var draining = false;
723 var currentQueue;
724 var queueIndex = -1;
725
726 function cleanUpNextTick() {
727 if (!draining || !currentQueue) {
728 return;
729 }
730 draining = false;
731 if (currentQueue.length) {
732 queue = currentQueue.concat(queue);
733 } else {
734 queueIndex = -1;
735 }
736 if (queue.length) {
737 drainQueue();
738 }
739 }
740
741 function drainQueue() {
742 if (draining) {
743 return;
744 }
745 var timeout = runTimeout(cleanUpNextTick);
746 draining = true;
747
748 var len = queue.length;
749 while(len) {
750 currentQueue = queue;
751 queue = [];
752 while (++queueIndex < len) {
753 if (currentQueue) {
754 currentQueue[queueIndex].run();
755 }
756 }
757 queueIndex = -1;
758 len = queue.length;
759 }
760 currentQueue = null;
761 draining = false;
762 runClearTimeout(timeout);
763 }
764
765 process.nextTick = function (fun) {
766 var args = new Array(arguments.length - 1);
767 if (arguments.length > 1) {
768 for (var i = 1; i < arguments.length; i++) {
769 args[i - 1] = arguments[i];
770 }
771 }
772 queue.push(new Item(fun, args));
773 if (queue.length === 1 && !draining) {
774 runTimeout(drainQueue);
775 }
776 };
777
778 // v8 likes predictible objects
779 function Item(fun, array) {
780 this.fun = fun;
781 this.array = array;
782 }
783 Item.prototype.run = function () {
784 this.fun.apply(null, this.array);
785 };
786 process.title = 'browser';
787 process.browser = true;
788 process.env = {};
789 process.argv = [];
790 process.version = ''; // empty string to avoid regexp issues
791 process.versions = {};
792
793 function noop() {}
794
795 process.on = noop;
796 process.addListener = noop;
797 process.once = noop;
798 process.off = noop;
799 process.removeListener = noop;
800 process.removeAllListeners = noop;
801 process.emit = noop;
802 process.prependListener = noop;
803 process.prependOnceListener = noop;
804
805 process.listeners = function (name) { return [] }
806
807 process.binding = function (name) {
808 throw new Error('process.binding is not supported');
809 };
810
811 process.cwd = function () { return '/' };
812 process.chdir = function (dir) {
813 throw new Error('process.chdir is not supported');
814 };
815 process.umask = function() { return 0; };
816
817
818/***/ }),
819/* 6 */
820/***/ (function(module, exports) {
821
822 /**
823 * Copyright 2013-2015, Facebook, Inc.
824 * All rights reserved.
825 *
826 * This source code is licensed under the BSD-style license found in the
827 * LICENSE file in the root directory of this source tree. An additional grant
828 * of patent rights can be found in the PATENTS file in the same directory.
829 *
830 * @providesModule ReactCurrentOwner
831 */
832
833 'use strict';
834
835 /**
836 * Keeps track of the current owner.
837 *
838 * The current owner is the component who should own any components that are
839 * currently being constructed.
840 */
841 var ReactCurrentOwner = {
842
843 /**
844 * @internal
845 * @type {ReactComponent}
846 */
847 current: null
848
849 };
850
851 module.exports = ReactCurrentOwner;
852
853/***/ }),
854/* 7 */
855/***/ (function(module, exports, __webpack_require__) {
856
857 /* WEBPACK VAR INJECTION */(function(process) {/**
858 * Copyright 2013-2015, Facebook, Inc.
859 * All rights reserved.
860 *
861 * This source code is licensed under the BSD-style license found in the
862 * LICENSE file in the root directory of this source tree. An additional grant
863 * of patent rights can be found in the PATENTS file in the same directory.
864 *
865 * @providesModule ReactDOMTextComponent
866 * @typechecks static-only
867 */
868
869 'use strict';
870
871 var DOMChildrenOperations = __webpack_require__(8);
872 var DOMPropertyOperations = __webpack_require__(23);
873 var ReactComponentBrowserEnvironment = __webpack_require__(27);
874 var ReactMount = __webpack_require__(29);
875
876 var assign = __webpack_require__(40);
877 var escapeTextContentForBrowser = __webpack_require__(22);
878 var setTextContent = __webpack_require__(21);
879 var validateDOMNesting = __webpack_require__(71);
880
881 /**
882 * Text nodes violate a couple assumptions that React makes about components:
883 *
884 * - When mounting text into the DOM, adjacent text nodes are merged.
885 * - Text nodes cannot be assigned a React root ID.
886 *
887 * This component is used to wrap strings in elements so that they can undergo
888 * the same reconciliation that is applied to elements.
889 *
890 * TODO: Investigate representing React components in the DOM with text nodes.
891 *
892 * @class ReactDOMTextComponent
893 * @extends ReactComponent
894 * @internal
895 */
896 var ReactDOMTextComponent = function (props) {
897 // This constructor and its argument is currently used by mocks.
898 };
899
900 assign(ReactDOMTextComponent.prototype, {
901
902 /**
903 * @param {ReactText} text
904 * @internal
905 */
906 construct: function (text) {
907 // TODO: This is really a ReactText (ReactNode), not a ReactElement
908 this._currentElement = text;
909 this._stringText = '' + text;
910
911 // Properties
912 this._rootNodeID = null;
913 this._mountIndex = 0;
914 },
915
916 /**
917 * Creates the markup for this text node. This node is not intended to have
918 * any features besides containing text content.
919 *
920 * @param {string} rootID DOM ID of the root node.
921 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
922 * @return {string} Markup for this text node.
923 * @internal
924 */
925 mountComponent: function (rootID, transaction, context) {
926 if (process.env.NODE_ENV !== 'production') {
927 if (context[validateDOMNesting.ancestorInfoContextKey]) {
928 validateDOMNesting('span', null, context[validateDOMNesting.ancestorInfoContextKey]);
929 }
930 }
931
932 this._rootNodeID = rootID;
933 if (transaction.useCreateElement) {
934 var ownerDocument = context[ReactMount.ownerDocumentContextKey];
935 var el = ownerDocument.createElement('span');
936 DOMPropertyOperations.setAttributeForID(el, rootID);
937 // Populate node cache
938 ReactMount.getID(el);
939 setTextContent(el, this._stringText);
940 return el;
941 } else {
942 var escapedText = escapeTextContentForBrowser(this._stringText);
943
944 if (transaction.renderToStaticMarkup) {
945 // Normally we'd wrap this in a `span` for the reasons stated above, but
946 // since this is a situation where React won't take over (static pages),
947 // we can simply return the text as it is.
948 return escapedText;
949 }
950
951 return '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + escapedText + '</span>';
952 }
953 },
954
955 /**
956 * Updates this component by updating the text content.
957 *
958 * @param {ReactText} nextText The next text content
959 * @param {ReactReconcileTransaction} transaction
960 * @internal
961 */
962 receiveComponent: function (nextText, transaction) {
963 if (nextText !== this._currentElement) {
964 this._currentElement = nextText;
965 var nextStringText = '' + nextText;
966 if (nextStringText !== this._stringText) {
967 // TODO: Save this as pending props and use performUpdateIfNecessary
968 // and/or updateComponent to do the actual update for consistency with
969 // other component types?
970 this._stringText = nextStringText;
971 var node = ReactMount.getNode(this._rootNodeID);
972 DOMChildrenOperations.updateTextContent(node, nextStringText);
973 }
974 }
975 },
976
977 unmountComponent: function () {
978 ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
979 }
980
981 });
982
983 module.exports = ReactDOMTextComponent;
984 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
985
986/***/ }),
987/* 8 */
988/***/ (function(module, exports, __webpack_require__) {
989
990 /* WEBPACK VAR INJECTION */(function(process) {/**
991 * Copyright 2013-2015, Facebook, Inc.
992 * All rights reserved.
993 *
994 * This source code is licensed under the BSD-style license found in the
995 * LICENSE file in the root directory of this source tree. An additional grant
996 * of patent rights can be found in the PATENTS file in the same directory.
997 *
998 * @providesModule DOMChildrenOperations
999 * @typechecks static-only
1000 */
1001
1002 'use strict';
1003
1004 var Danger = __webpack_require__(9);
1005 var ReactMultiChildUpdateTypes = __webpack_require__(17);
1006 var ReactPerf = __webpack_require__(19);
1007
1008 var setInnerHTML = __webpack_require__(20);
1009 var setTextContent = __webpack_require__(21);
1010 var invariant = __webpack_require__(14);
1011
1012 /**
1013 * Inserts `childNode` as a child of `parentNode` at the `index`.
1014 *
1015 * @param {DOMElement} parentNode Parent node in which to insert.
1016 * @param {DOMElement} childNode Child node to insert.
1017 * @param {number} index Index at which to insert the child.
1018 * @internal
1019 */
1020 function insertChildAt(parentNode, childNode, index) {
1021 // By exploiting arrays returning `undefined` for an undefined index, we can
1022 // rely exclusively on `insertBefore(node, null)` instead of also using
1023 // `appendChild(node)`. However, using `undefined` is not allowed by all
1024 // browsers so we must replace it with `null`.
1025
1026 // fix render order error in safari
1027 // IE8 will throw error when index out of list size.
1028 var beforeChild = index >= parentNode.childNodes.length ? null : parentNode.childNodes.item(index);
1029
1030 parentNode.insertBefore(childNode, beforeChild);
1031 }
1032
1033 /**
1034 * Operations for updating with DOM children.
1035 */
1036 var DOMChildrenOperations = {
1037
1038 dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
1039
1040 updateTextContent: setTextContent,
1041
1042 /**
1043 * Updates a component's children by processing a series of updates. The
1044 * update configurations are each expected to have a `parentNode` property.
1045 *
1046 * @param {array<object>} updates List of update configurations.
1047 * @param {array<string>} markupList List of markup strings.
1048 * @internal
1049 */
1050 processUpdates: function (updates, markupList) {
1051 var update;
1052 // Mapping from parent IDs to initial child orderings.
1053 var initialChildren = null;
1054 // List of children that will be moved or removed.
1055 var updatedChildren = null;
1056
1057 for (var i = 0; i < updates.length; i++) {
1058 update = updates[i];
1059 if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
1060 var updatedIndex = update.fromIndex;
1061 var updatedChild = update.parentNode.childNodes[updatedIndex];
1062 var parentID = update.parentID;
1063
1064 !updatedChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a <tbody> when using tables, ' + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + 'in an <svg> parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(false) : undefined;
1065
1066 initialChildren = initialChildren || {};
1067 initialChildren[parentID] = initialChildren[parentID] || [];
1068 initialChildren[parentID][updatedIndex] = updatedChild;
1069
1070 updatedChildren = updatedChildren || [];
1071 updatedChildren.push(updatedChild);
1072 }
1073 }
1074
1075 var renderedMarkup;
1076 // markupList is either a list of markup or just a list of elements
1077 if (markupList.length && typeof markupList[0] === 'string') {
1078 renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);
1079 } else {
1080 renderedMarkup = markupList;
1081 }
1082
1083 // Remove updated children first so that `toIndex` is consistent.
1084 if (updatedChildren) {
1085 for (var j = 0; j < updatedChildren.length; j++) {
1086 updatedChildren[j].parentNode.removeChild(updatedChildren[j]);
1087 }
1088 }
1089
1090 for (var k = 0; k < updates.length; k++) {
1091 update = updates[k];
1092 switch (update.type) {
1093 case ReactMultiChildUpdateTypes.INSERT_MARKUP:
1094 insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex);
1095 break;
1096 case ReactMultiChildUpdateTypes.MOVE_EXISTING:
1097 insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex);
1098 break;
1099 case ReactMultiChildUpdateTypes.SET_MARKUP:
1100 setInnerHTML(update.parentNode, update.content);
1101 break;
1102 case ReactMultiChildUpdateTypes.TEXT_CONTENT:
1103 setTextContent(update.parentNode, update.content);
1104 break;
1105 case ReactMultiChildUpdateTypes.REMOVE_NODE:
1106 // Already removed by the for-loop above.
1107 break;
1108 }
1109 }
1110 }
1111
1112 };
1113
1114 ReactPerf.measureMethods(DOMChildrenOperations, 'DOMChildrenOperations', {
1115 updateTextContent: 'updateTextContent'
1116 });
1117
1118 module.exports = DOMChildrenOperations;
1119 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1120
1121/***/ }),
1122/* 9 */
1123/***/ (function(module, exports, __webpack_require__) {
1124
1125 /* WEBPACK VAR INJECTION */(function(process) {/**
1126 * Copyright 2013-2015, Facebook, Inc.
1127 * All rights reserved.
1128 *
1129 * This source code is licensed under the BSD-style license found in the
1130 * LICENSE file in the root directory of this source tree. An additional grant
1131 * of patent rights can be found in the PATENTS file in the same directory.
1132 *
1133 * @providesModule Danger
1134 * @typechecks static-only
1135 */
1136
1137 'use strict';
1138
1139 var ExecutionEnvironment = __webpack_require__(10);
1140
1141 var createNodesFromMarkup = __webpack_require__(11);
1142 var emptyFunction = __webpack_require__(16);
1143 var getMarkupWrap = __webpack_require__(15);
1144 var invariant = __webpack_require__(14);
1145
1146 var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;
1147 var RESULT_INDEX_ATTR = 'data-danger-index';
1148
1149 /**
1150 * Extracts the `nodeName` from a string of markup.
1151 *
1152 * NOTE: Extracting the `nodeName` does not require a regular expression match
1153 * because we make assumptions about React-generated markup (i.e. there are no
1154 * spaces surrounding the opening tag and there is at least one attribute).
1155 *
1156 * @param {string} markup String of markup.
1157 * @return {string} Node name of the supplied markup.
1158 * @see http://jsperf.com/extract-nodename
1159 */
1160 function getNodeName(markup) {
1161 return markup.substring(1, markup.indexOf(' '));
1162 }
1163
1164 var Danger = {
1165
1166 /**
1167 * Renders markup into an array of nodes. The markup is expected to render
1168 * into a list of root nodes. Also, the length of `resultList` and
1169 * `markupList` should be the same.
1170 *
1171 * @param {array<string>} markupList List of markup strings to render.
1172 * @return {array<DOMElement>} List of rendered nodes.
1173 * @internal
1174 */
1175 dangerouslyRenderMarkup: function (markupList) {
1176 !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): 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.') : invariant(false) : undefined;
1177 var nodeName;
1178 var markupByNodeName = {};
1179 // Group markup by `nodeName` if a wrap is necessary, else by '*'.
1180 for (var i = 0; i < markupList.length; i++) {
1181 !markupList[i] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : undefined;
1182 nodeName = getNodeName(markupList[i]);
1183 nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
1184 markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
1185 markupByNodeName[nodeName][i] = markupList[i];
1186 }
1187 var resultList = [];
1188 var resultListAssignmentCount = 0;
1189 for (nodeName in markupByNodeName) {
1190 if (!markupByNodeName.hasOwnProperty(nodeName)) {
1191 continue;
1192 }
1193 var markupListByNodeName = markupByNodeName[nodeName];
1194
1195 // This for-in loop skips the holes of the sparse array. The order of
1196 // iteration should follow the order of assignment, which happens to match
1197 // numerical index order, but we don't rely on that.
1198 var resultIndex;
1199 for (resultIndex in markupListByNodeName) {
1200 if (markupListByNodeName.hasOwnProperty(resultIndex)) {
1201 var markup = markupListByNodeName[resultIndex];
1202
1203 // Push the requested markup with an additional RESULT_INDEX_ATTR
1204 // attribute. If the markup does not start with a < character, it
1205 // will be discarded below (with an appropriate console.error).
1206 markupListByNodeName[resultIndex] = markup.replace(OPEN_TAG_NAME_EXP,
1207 // This index will be parsed back out below.
1208 '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ');
1209 }
1210 }
1211
1212 // Render each group of markup with similar wrapping `nodeName`.
1213 var renderNodes = createNodesFromMarkup(markupListByNodeName.join(''), emptyFunction // Do nothing special with <script> tags.
1214 );
1215
1216 for (var j = 0; j < renderNodes.length; ++j) {
1217 var renderNode = renderNodes[j];
1218 if (renderNode.hasAttribute && renderNode.hasAttribute(RESULT_INDEX_ATTR)) {
1219
1220 resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
1221 renderNode.removeAttribute(RESULT_INDEX_ATTR);
1222
1223 !!resultList.hasOwnProperty(resultIndex) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Assigning to an already-occupied result index.') : invariant(false) : undefined;
1224
1225 resultList[resultIndex] = renderNode;
1226
1227 // This should match resultList.length and markupList.length when
1228 // we're done.
1229 resultListAssignmentCount += 1;
1230 } else if (process.env.NODE_ENV !== 'production') {
1231 console.error('Danger: Discarding unexpected node:', renderNode);
1232 }
1233 }
1234 }
1235
1236 // Although resultList was populated out of order, it should now be a dense
1237 // array.
1238 !(resultListAssignmentCount === resultList.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Did not assign to every index of resultList.') : invariant(false) : undefined;
1239
1240 !(resultList.length === markupList.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Danger: Expected markup to render %s nodes, but rendered %s.', markupList.length, resultList.length) : invariant(false) : undefined;
1241
1242 return resultList;
1243 },
1244
1245 /**
1246 * Replaces a node with a string of markup at its current position within its
1247 * parent. The markup must render into a single root node.
1248 *
1249 * @param {DOMElement} oldChild Child node to replace.
1250 * @param {string} markup Markup to render in place of the child node.
1251 * @internal
1252 */
1253 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
1254 !ExecutionEnvironment.canUseDOM ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + 'worker thread. Make sure `window` and `document` are available ' + 'globally before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined;
1255 !markup ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(false) : undefined;
1256 !(oldChild.tagName.toLowerCase() !== 'html') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + '<html> node. This is because browser quirks make this unreliable ' + 'and/or slow. If you want to render to the root you must use ' + 'server rendering. See ReactDOMServer.renderToString().') : invariant(false) : undefined;
1257
1258 var newChild;
1259 if (typeof markup === 'string') {
1260 newChild = createNodesFromMarkup(markup, emptyFunction)[0];
1261 } else {
1262 newChild = markup;
1263 }
1264 oldChild.parentNode.replaceChild(newChild, oldChild);
1265 }
1266
1267 };
1268
1269 module.exports = Danger;
1270 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1271
1272/***/ }),
1273/* 10 */
1274/***/ (function(module, exports) {
1275
1276 /**
1277 * Copyright 2013-2015, Facebook, Inc.
1278 * All rights reserved.
1279 *
1280 * This source code is licensed under the BSD-style license found in the
1281 * LICENSE file in the root directory of this source tree. An additional grant
1282 * of patent rights can be found in the PATENTS file in the same directory.
1283 *
1284 * @providesModule ExecutionEnvironment
1285 */
1286
1287 'use strict';
1288
1289 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
1290
1291 /**
1292 * Simple, lightweight module assisting with the detection and context of
1293 * Worker. Helps avoid circular dependencies and allows code to reason about
1294 * whether or not they are in a Worker, even if they never include the main
1295 * `ReactWorker` dependency.
1296 */
1297 var ExecutionEnvironment = {
1298
1299 canUseDOM: canUseDOM,
1300
1301 canUseWorkers: typeof Worker !== 'undefined',
1302
1303 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
1304
1305 canUseViewport: canUseDOM && !!window.screen,
1306
1307 isInWorker: !canUseDOM // For now, this is true - might change in the future.
1308
1309 };
1310
1311 module.exports = ExecutionEnvironment;
1312
1313/***/ }),
1314/* 11 */
1315/***/ (function(module, exports, __webpack_require__) {
1316
1317 /* WEBPACK VAR INJECTION */(function(process) {/**
1318 * Copyright 2013-2015, Facebook, Inc.
1319 * All rights reserved.
1320 *
1321 * This source code is licensed under the BSD-style license found in the
1322 * LICENSE file in the root directory of this source tree. An additional grant
1323 * of patent rights can be found in the PATENTS file in the same directory.
1324 *
1325 * @providesModule createNodesFromMarkup
1326 * @typechecks
1327 */
1328
1329 /*eslint-disable fb-www/unsafe-html*/
1330
1331 'use strict';
1332
1333 var ExecutionEnvironment = __webpack_require__(10);
1334
1335 var createArrayFromMixed = __webpack_require__(12);
1336 var getMarkupWrap = __webpack_require__(15);
1337 var invariant = __webpack_require__(14);
1338
1339 /**
1340 * Dummy container used to render all markup.
1341 */
1342 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
1343
1344 /**
1345 * Pattern used by `getNodeName`.
1346 */
1347 var nodeNamePattern = /^\s*<(\w+)/;
1348
1349 /**
1350 * Extracts the `nodeName` of the first element in a string of markup.
1351 *
1352 * @param {string} markup String of markup.
1353 * @return {?string} Node name of the supplied markup.
1354 */
1355 function getNodeName(markup) {
1356 var nodeNameMatch = markup.match(nodeNamePattern);
1357 return nodeNameMatch && nodeNameMatch[1].toLowerCase();
1358 }
1359
1360 /**
1361 * Creates an array containing the nodes rendered from the supplied markup. The
1362 * optionally supplied `handleScript` function will be invoked once for each
1363 * <script> element that is rendered. If no `handleScript` function is supplied,
1364 * an exception is thrown if any <script> elements are rendered.
1365 *
1366 * @param {string} markup A string of valid HTML markup.
1367 * @param {?function} handleScript Invoked once for each rendered <script>.
1368 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
1369 */
1370 function createNodesFromMarkup(markup, handleScript) {
1371 var node = dummyNode;
1372 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : undefined;
1373 var nodeName = getNodeName(markup);
1374
1375 var wrap = nodeName && getMarkupWrap(nodeName);
1376 if (wrap) {
1377 node.innerHTML = wrap[1] + markup + wrap[2];
1378
1379 var wrapDepth = wrap[0];
1380 while (wrapDepth--) {
1381 node = node.lastChild;
1382 }
1383 } else {
1384 node.innerHTML = markup;
1385 }
1386
1387 var scripts = node.getElementsByTagName('script');
1388 if (scripts.length) {
1389 !handleScript ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : undefined;
1390 createArrayFromMixed(scripts).forEach(handleScript);
1391 }
1392
1393 var nodes = createArrayFromMixed(node.childNodes);
1394 while (node.lastChild) {
1395 node.removeChild(node.lastChild);
1396 }
1397 return nodes;
1398 }
1399
1400 module.exports = createNodesFromMarkup;
1401 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1402
1403/***/ }),
1404/* 12 */
1405/***/ (function(module, exports, __webpack_require__) {
1406
1407 /**
1408 * Copyright 2013-2015, Facebook, Inc.
1409 * All rights reserved.
1410 *
1411 * This source code is licensed under the BSD-style license found in the
1412 * LICENSE file in the root directory of this source tree. An additional grant
1413 * of patent rights can be found in the PATENTS file in the same directory.
1414 *
1415 * @providesModule createArrayFromMixed
1416 * @typechecks
1417 */
1418
1419 'use strict';
1420
1421 var toArray = __webpack_require__(13);
1422
1423 /**
1424 * Perform a heuristic test to determine if an object is "array-like".
1425 *
1426 * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
1427 * Joshu replied: "Mu."
1428 *
1429 * This function determines if its argument has "array nature": it returns
1430 * true if the argument is an actual array, an `arguments' object, or an
1431 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
1432 *
1433 * It will return false for other array-like objects like Filelist.
1434 *
1435 * @param {*} obj
1436 * @return {boolean}
1437 */
1438 function hasArrayNature(obj) {
1439 return(
1440 // not null/false
1441 !!obj && (
1442 // arrays are objects, NodeLists are functions in Safari
1443 typeof obj == 'object' || typeof obj == 'function') &&
1444 // quacks like an array
1445 'length' in obj &&
1446 // not window
1447 !('setInterval' in obj) &&
1448 // no DOM node should be considered an array-like
1449 // a 'select' element has 'length' and 'item' properties on IE8
1450 typeof obj.nodeType != 'number' && (
1451 // a real array
1452 Array.isArray(obj) ||
1453 // arguments
1454 'callee' in obj ||
1455 // HTMLCollection/NodeList
1456 'item' in obj)
1457 );
1458 }
1459
1460 /**
1461 * Ensure that the argument is an array by wrapping it in an array if it is not.
1462 * Creates a copy of the argument if it is already an array.
1463 *
1464 * This is mostly useful idiomatically:
1465 *
1466 * var createArrayFromMixed = require('createArrayFromMixed');
1467 *
1468 * function takesOneOrMoreThings(things) {
1469 * things = createArrayFromMixed(things);
1470 * ...
1471 * }
1472 *
1473 * This allows you to treat `things' as an array, but accept scalars in the API.
1474 *
1475 * If you need to convert an array-like object, like `arguments`, into an array
1476 * use toArray instead.
1477 *
1478 * @param {*} obj
1479 * @return {array}
1480 */
1481 function createArrayFromMixed(obj) {
1482 if (!hasArrayNature(obj)) {
1483 return [obj];
1484 } else if (Array.isArray(obj)) {
1485 return obj.slice();
1486 } else {
1487 return toArray(obj);
1488 }
1489 }
1490
1491 module.exports = createArrayFromMixed;
1492
1493/***/ }),
1494/* 13 */
1495/***/ (function(module, exports, __webpack_require__) {
1496
1497 /* WEBPACK VAR INJECTION */(function(process) {/**
1498 * Copyright 2013-2015, Facebook, Inc.
1499 * All rights reserved.
1500 *
1501 * This source code is licensed under the BSD-style license found in the
1502 * LICENSE file in the root directory of this source tree. An additional grant
1503 * of patent rights can be found in the PATENTS file in the same directory.
1504 *
1505 * @providesModule toArray
1506 * @typechecks
1507 */
1508
1509 'use strict';
1510
1511 var invariant = __webpack_require__(14);
1512
1513 /**
1514 * Convert array-like objects to arrays.
1515 *
1516 * This API assumes the caller knows the contents of the data type. For less
1517 * well defined inputs use createArrayFromMixed.
1518 *
1519 * @param {object|function|filelist} obj
1520 * @return {array}
1521 */
1522 function toArray(obj) {
1523 var length = obj.length;
1524
1525 // Some browse builtin objects can report typeof 'function' (e.g. NodeList in
1526 // old versions of Safari).
1527 !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : undefined;
1528
1529 !(typeof length === 'number') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : undefined;
1530
1531 !(length === 0 || length - 1 in obj) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : undefined;
1532
1533 // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
1534 // without method will throw during the slice call and skip straight to the
1535 // fallback.
1536 if (obj.hasOwnProperty) {
1537 try {
1538 return Array.prototype.slice.call(obj);
1539 } catch (e) {
1540 // IE < 9 does not support Array#slice on collections objects
1541 }
1542 }
1543
1544 // Fall back to copying key by key. This assumes all keys have a value,
1545 // so will not preserve sparsely populated inputs.
1546 var ret = Array(length);
1547 for (var ii = 0; ii < length; ii++) {
1548 ret[ii] = obj[ii];
1549 }
1550 return ret;
1551 }
1552
1553 module.exports = toArray;
1554 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1555
1556/***/ }),
1557/* 14 */
1558/***/ (function(module, exports, __webpack_require__) {
1559
1560 /* WEBPACK VAR INJECTION */(function(process) {/**
1561 * Copyright 2013-2015, Facebook, Inc.
1562 * All rights reserved.
1563 *
1564 * This source code is licensed under the BSD-style license found in the
1565 * LICENSE file in the root directory of this source tree. An additional grant
1566 * of patent rights can be found in the PATENTS file in the same directory.
1567 *
1568 * @providesModule invariant
1569 */
1570
1571 'use strict';
1572
1573 /**
1574 * Use invariant() to assert state which your program assumes to be true.
1575 *
1576 * Provide sprintf-style format (only %s is supported) and arguments
1577 * to provide information about what broke and what you were
1578 * expecting.
1579 *
1580 * The invariant message will be stripped in production, but the invariant
1581 * will remain to ensure logic does not differ in production.
1582 */
1583
1584 function invariant(condition, format, a, b, c, d, e, f) {
1585 if (process.env.NODE_ENV !== 'production') {
1586 if (format === undefined) {
1587 throw new Error('invariant requires an error message argument');
1588 }
1589 }
1590
1591 if (!condition) {
1592 var error;
1593 if (format === undefined) {
1594 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1595 } else {
1596 var args = [a, b, c, d, e, f];
1597 var argIndex = 0;
1598 error = new Error(format.replace(/%s/g, function () {
1599 return args[argIndex++];
1600 }));
1601 error.name = 'Invariant Violation';
1602 }
1603
1604 error.framesToPop = 1; // we don't care about invariant's own frame
1605 throw error;
1606 }
1607 }
1608
1609 module.exports = invariant;
1610 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1611
1612/***/ }),
1613/* 15 */
1614/***/ (function(module, exports, __webpack_require__) {
1615
1616 /* WEBPACK VAR INJECTION */(function(process) {/**
1617 * Copyright 2013-2015, Facebook, Inc.
1618 * All rights reserved.
1619 *
1620 * This source code is licensed under the BSD-style license found in the
1621 * LICENSE file in the root directory of this source tree. An additional grant
1622 * of patent rights can be found in the PATENTS file in the same directory.
1623 *
1624 * @providesModule getMarkupWrap
1625 */
1626
1627 /*eslint-disable fb-www/unsafe-html */
1628
1629 'use strict';
1630
1631 var ExecutionEnvironment = __webpack_require__(10);
1632
1633 var invariant = __webpack_require__(14);
1634
1635 /**
1636 * Dummy container used to detect which wraps are necessary.
1637 */
1638 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
1639
1640 /**
1641 * Some browsers cannot use `innerHTML` to render certain elements standalone,
1642 * so we wrap them, render the wrapped nodes, then extract the desired node.
1643 *
1644 * In IE8, certain elements cannot render alone, so wrap all elements ('*').
1645 */
1646
1647 var shouldWrap = {};
1648
1649 var selectWrap = [1, '<select multiple="true">', '</select>'];
1650 var tableWrap = [1, '<table>', '</table>'];
1651 var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
1652
1653 var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
1654
1655 var markupWrap = {
1656 '*': [1, '?<div>', '</div>'],
1657
1658 'area': [1, '<map>', '</map>'],
1659 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
1660 'legend': [1, '<fieldset>', '</fieldset>'],
1661 'param': [1, '<object>', '</object>'],
1662 'tr': [2, '<table><tbody>', '</tbody></table>'],
1663
1664 'optgroup': selectWrap,
1665 'option': selectWrap,
1666
1667 'caption': tableWrap,
1668 'colgroup': tableWrap,
1669 'tbody': tableWrap,
1670 'tfoot': tableWrap,
1671 'thead': tableWrap,
1672
1673 'td': trWrap,
1674 'th': trWrap
1675 };
1676
1677 // Initialize the SVG elements since we know they'll always need to be wrapped
1678 // consistently. If they are created inside a <div> they will be initialized in
1679 // the wrong namespace (and will not display).
1680 var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
1681 svgElements.forEach(function (nodeName) {
1682 markupWrap[nodeName] = svgWrap;
1683 shouldWrap[nodeName] = true;
1684 });
1685
1686 /**
1687 * Gets the markup wrap configuration for the supplied `nodeName`.
1688 *
1689 * NOTE: This lazily detects which wraps are necessary for the current browser.
1690 *
1691 * @param {string} nodeName Lowercase `nodeName`.
1692 * @return {?array} Markup wrap configuration, if applicable.
1693 */
1694 function getMarkupWrap(nodeName) {
1695 !!!dummyNode ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : undefined;
1696 if (!markupWrap.hasOwnProperty(nodeName)) {
1697 nodeName = '*';
1698 }
1699 if (!shouldWrap.hasOwnProperty(nodeName)) {
1700 if (nodeName === '*') {
1701 dummyNode.innerHTML = '<link />';
1702 } else {
1703 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
1704 }
1705 shouldWrap[nodeName] = !dummyNode.firstChild;
1706 }
1707 return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
1708 }
1709
1710 module.exports = getMarkupWrap;
1711 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1712
1713/***/ }),
1714/* 16 */
1715/***/ (function(module, exports) {
1716
1717 /**
1718 * Copyright 2013-2015, Facebook, Inc.
1719 * All rights reserved.
1720 *
1721 * This source code is licensed under the BSD-style license found in the
1722 * LICENSE file in the root directory of this source tree. An additional grant
1723 * of patent rights can be found in the PATENTS file in the same directory.
1724 *
1725 * @providesModule emptyFunction
1726 */
1727
1728 "use strict";
1729
1730 function makeEmptyFunction(arg) {
1731 return function () {
1732 return arg;
1733 };
1734 }
1735
1736 /**
1737 * This function accepts and discards inputs; it has no side effects. This is
1738 * primarily useful idiomatically for overridable function endpoints which
1739 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1740 */
1741 function emptyFunction() {}
1742
1743 emptyFunction.thatReturns = makeEmptyFunction;
1744 emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1745 emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1746 emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1747 emptyFunction.thatReturnsThis = function () {
1748 return this;
1749 };
1750 emptyFunction.thatReturnsArgument = function (arg) {
1751 return arg;
1752 };
1753
1754 module.exports = emptyFunction;
1755
1756/***/ }),
1757/* 17 */
1758/***/ (function(module, exports, __webpack_require__) {
1759
1760 /**
1761 * Copyright 2013-2015, Facebook, Inc.
1762 * All rights reserved.
1763 *
1764 * This source code is licensed under the BSD-style license found in the
1765 * LICENSE file in the root directory of this source tree. An additional grant
1766 * of patent rights can be found in the PATENTS file in the same directory.
1767 *
1768 * @providesModule ReactMultiChildUpdateTypes
1769 */
1770
1771 'use strict';
1772
1773 var keyMirror = __webpack_require__(18);
1774
1775 /**
1776 * When a component's children are updated, a series of update configuration
1777 * objects are created in order to batch and serialize the required changes.
1778 *
1779 * Enumerates all the possible types of update configurations.
1780 *
1781 * @internal
1782 */
1783 var ReactMultiChildUpdateTypes = keyMirror({
1784 INSERT_MARKUP: null,
1785 MOVE_EXISTING: null,
1786 REMOVE_NODE: null,
1787 SET_MARKUP: null,
1788 TEXT_CONTENT: null
1789 });
1790
1791 module.exports = ReactMultiChildUpdateTypes;
1792
1793/***/ }),
1794/* 18 */
1795/***/ (function(module, exports, __webpack_require__) {
1796
1797 /* WEBPACK VAR INJECTION */(function(process) {/**
1798 * Copyright 2013-2015, Facebook, Inc.
1799 * All rights reserved.
1800 *
1801 * This source code is licensed under the BSD-style license found in the
1802 * LICENSE file in the root directory of this source tree. An additional grant
1803 * of patent rights can be found in the PATENTS file in the same directory.
1804 *
1805 * @providesModule keyMirror
1806 * @typechecks static-only
1807 */
1808
1809 'use strict';
1810
1811 var invariant = __webpack_require__(14);
1812
1813 /**
1814 * Constructs an enumeration with keys equal to their value.
1815 *
1816 * For example:
1817 *
1818 * var COLORS = keyMirror({blue: null, red: null});
1819 * var myColor = COLORS.blue;
1820 * var isColorValid = !!COLORS[myColor];
1821 *
1822 * The last line could not be performed if the values of the generated enum were
1823 * not equal to their keys.
1824 *
1825 * Input: {key1: val1, key2: val2}
1826 * Output: {key1: key1, key2: key2}
1827 *
1828 * @param {object} obj
1829 * @return {object}
1830 */
1831 var keyMirror = function (obj) {
1832 var ret = {};
1833 var key;
1834 !(obj instanceof Object && !Array.isArray(obj)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : undefined;
1835 for (key in obj) {
1836 if (!obj.hasOwnProperty(key)) {
1837 continue;
1838 }
1839 ret[key] = key;
1840 }
1841 return ret;
1842 };
1843
1844 module.exports = keyMirror;
1845 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1846
1847/***/ }),
1848/* 19 */
1849/***/ (function(module, exports, __webpack_require__) {
1850
1851 /* WEBPACK VAR INJECTION */(function(process) {/**
1852 * Copyright 2013-2015, Facebook, Inc.
1853 * All rights reserved.
1854 *
1855 * This source code is licensed under the BSD-style license found in the
1856 * LICENSE file in the root directory of this source tree. An additional grant
1857 * of patent rights can be found in the PATENTS file in the same directory.
1858 *
1859 * @providesModule ReactPerf
1860 * @typechecks static-only
1861 */
1862
1863 'use strict';
1864
1865 /**
1866 * ReactPerf is a general AOP system designed to measure performance. This
1867 * module only has the hooks: see ReactDefaultPerf for the analysis tool.
1868 */
1869 var ReactPerf = {
1870 /**
1871 * Boolean to enable/disable measurement. Set to false by default to prevent
1872 * accidental logging and perf loss.
1873 */
1874 enableMeasure: false,
1875
1876 /**
1877 * Holds onto the measure function in use. By default, don't measure
1878 * anything, but we'll override this if we inject a measure function.
1879 */
1880 storedMeasure: _noMeasure,
1881
1882 /**
1883 * @param {object} object
1884 * @param {string} objectName
1885 * @param {object<string>} methodNames
1886 */
1887 measureMethods: function (object, objectName, methodNames) {
1888 if (process.env.NODE_ENV !== 'production') {
1889 for (var key in methodNames) {
1890 if (!methodNames.hasOwnProperty(key)) {
1891 continue;
1892 }
1893 object[key] = ReactPerf.measure(objectName, methodNames[key], object[key]);
1894 }
1895 }
1896 },
1897
1898 /**
1899 * Use this to wrap methods you want to measure. Zero overhead in production.
1900 *
1901 * @param {string} objName
1902 * @param {string} fnName
1903 * @param {function} func
1904 * @return {function}
1905 */
1906 measure: function (objName, fnName, func) {
1907 if (process.env.NODE_ENV !== 'production') {
1908 var measuredFunc = null;
1909 var wrapper = function () {
1910 if (ReactPerf.enableMeasure) {
1911 if (!measuredFunc) {
1912 measuredFunc = ReactPerf.storedMeasure(objName, fnName, func);
1913 }
1914 return measuredFunc.apply(this, arguments);
1915 }
1916 return func.apply(this, arguments);
1917 };
1918 wrapper.displayName = objName + '_' + fnName;
1919 return wrapper;
1920 }
1921 return func;
1922 },
1923
1924 injection: {
1925 /**
1926 * @param {function} measure
1927 */
1928 injectMeasure: function (measure) {
1929 ReactPerf.storedMeasure = measure;
1930 }
1931 }
1932 };
1933
1934 /**
1935 * Simply passes through the measured function, without measuring it.
1936 *
1937 * @param {string} objName
1938 * @param {string} fnName
1939 * @param {function} func
1940 * @return {function}
1941 */
1942 function _noMeasure(objName, fnName, func) {
1943 return func;
1944 }
1945
1946 module.exports = ReactPerf;
1947 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
1948
1949/***/ }),
1950/* 20 */
1951/***/ (function(module, exports, __webpack_require__) {
1952
1953 /**
1954 * Copyright 2013-2015, Facebook, Inc.
1955 * All rights reserved.
1956 *
1957 * This source code is licensed under the BSD-style license found in the
1958 * LICENSE file in the root directory of this source tree. An additional grant
1959 * of patent rights can be found in the PATENTS file in the same directory.
1960 *
1961 * @providesModule setInnerHTML
1962 */
1963
1964 /* globals MSApp */
1965
1966 'use strict';
1967
1968 var ExecutionEnvironment = __webpack_require__(10);
1969
1970 var WHITESPACE_TEST = /^[ \r\n\t\f]/;
1971 var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
1972
1973 /**
1974 * Set the innerHTML property of a node, ensuring that whitespace is preserved
1975 * even in IE8.
1976 *
1977 * @param {DOMElement} node
1978 * @param {string} html
1979 * @internal
1980 */
1981 var setInnerHTML = function (node, html) {
1982 node.innerHTML = html;
1983 };
1984
1985 // Win8 apps: Allow all html to be inserted
1986 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
1987 setInnerHTML = function (node, html) {
1988 MSApp.execUnsafeLocalFunction(function () {
1989 node.innerHTML = html;
1990 });
1991 };
1992 }
1993
1994 if (ExecutionEnvironment.canUseDOM) {
1995 // IE8: When updating a just created node with innerHTML only leading
1996 // whitespace is removed. When updating an existing node with innerHTML
1997 // whitespace in root TextNodes is also collapsed.
1998 // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
1999
2000 // Feature detection; only IE8 is known to behave improperly like this.
2001 var testElement = document.createElement('div');
2002 testElement.innerHTML = ' ';
2003 if (testElement.innerHTML === '') {
2004 setInnerHTML = function (node, html) {
2005 // Magic theory: IE8 supposedly differentiates between added and updated
2006 // nodes when processing innerHTML, innerHTML on updated nodes suffers
2007 // from worse whitespace behavior. Re-adding a node like this triggers
2008 // the initial and more favorable whitespace behavior.
2009 // TODO: What to do on a detached node?
2010 if (node.parentNode) {
2011 node.parentNode.replaceChild(node, node);
2012 }
2013
2014 // We also implement a workaround for non-visible tags disappearing into
2015 // thin air on IE8, this only happens if there is no visible text
2016 // in-front of the non-visible tags. Piggyback on the whitespace fix
2017 // and simply check if any non-visible tags appear in the source.
2018 if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
2019 // Recover leading whitespace by temporarily prepending any character.
2020 // \uFEFF has the potential advantage of being zero-width/invisible.
2021 // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
2022 // in hopes that this is preserved even if "\uFEFF" is transformed to
2023 // the actual Unicode character (by Babel, for example).
2024 // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
2025 node.innerHTML = String.fromCharCode(0xFEFF) + html;
2026
2027 // deleteData leaves an empty `TextNode` which offsets the index of all
2028 // children. Definitely want to avoid this.
2029 var textNode = node.firstChild;
2030 if (textNode.data.length === 1) {
2031 node.removeChild(textNode);
2032 } else {
2033 textNode.deleteData(0, 1);
2034 }
2035 } else {
2036 node.innerHTML = html;
2037 }
2038 };
2039 }
2040 }
2041
2042 module.exports = setInnerHTML;
2043
2044/***/ }),
2045/* 21 */
2046/***/ (function(module, exports, __webpack_require__) {
2047
2048 /**
2049 * Copyright 2013-2015, Facebook, Inc.
2050 * All rights reserved.
2051 *
2052 * This source code is licensed under the BSD-style license found in the
2053 * LICENSE file in the root directory of this source tree. An additional grant
2054 * of patent rights can be found in the PATENTS file in the same directory.
2055 *
2056 * @providesModule setTextContent
2057 */
2058
2059 'use strict';
2060
2061 var ExecutionEnvironment = __webpack_require__(10);
2062 var escapeTextContentForBrowser = __webpack_require__(22);
2063 var setInnerHTML = __webpack_require__(20);
2064
2065 /**
2066 * Set the textContent property of a node, ensuring that whitespace is preserved
2067 * even in IE8. innerText is a poor substitute for textContent and, among many
2068 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
2069 * as it should.
2070 *
2071 * @param {DOMElement} node
2072 * @param {string} text
2073 * @internal
2074 */
2075 var setTextContent = function (node, text) {
2076 node.textContent = text;
2077 };
2078
2079 if (ExecutionEnvironment.canUseDOM) {
2080 if (!('textContent' in document.documentElement)) {
2081 setTextContent = function (node, text) {
2082 setInnerHTML(node, escapeTextContentForBrowser(text));
2083 };
2084 }
2085 }
2086
2087 module.exports = setTextContent;
2088
2089/***/ }),
2090/* 22 */
2091/***/ (function(module, exports) {
2092
2093 /**
2094 * Copyright 2013-2015, Facebook, Inc.
2095 * All rights reserved.
2096 *
2097 * This source code is licensed under the BSD-style license found in the
2098 * LICENSE file in the root directory of this source tree. An additional grant
2099 * of patent rights can be found in the PATENTS file in the same directory.
2100 *
2101 * @providesModule escapeTextContentForBrowser
2102 */
2103
2104 'use strict';
2105
2106 var ESCAPE_LOOKUP = {
2107 '&': '&amp;',
2108 '>': '&gt;',
2109 '<': '&lt;',
2110 '"': '&quot;',
2111 '\'': '&#x27;'
2112 };
2113
2114 var ESCAPE_REGEX = /[&><"']/g;
2115
2116 function escaper(match) {
2117 return ESCAPE_LOOKUP[match];
2118 }
2119
2120 /**
2121 * Escapes text to prevent scripting attacks.
2122 *
2123 * @param {*} text Text value to escape.
2124 * @return {string} An escaped string.
2125 */
2126 function escapeTextContentForBrowser(text) {
2127 return ('' + text).replace(ESCAPE_REGEX, escaper);
2128 }
2129
2130 module.exports = escapeTextContentForBrowser;
2131
2132/***/ }),
2133/* 23 */
2134/***/ (function(module, exports, __webpack_require__) {
2135
2136 /* WEBPACK VAR INJECTION */(function(process) {/**
2137 * Copyright 2013-2015, Facebook, Inc.
2138 * All rights reserved.
2139 *
2140 * This source code is licensed under the BSD-style license found in the
2141 * LICENSE file in the root directory of this source tree. An additional grant
2142 * of patent rights can be found in the PATENTS file in the same directory.
2143 *
2144 * @providesModule DOMPropertyOperations
2145 * @typechecks static-only
2146 */
2147
2148 'use strict';
2149
2150 var DOMProperty = __webpack_require__(24);
2151 var ReactPerf = __webpack_require__(19);
2152
2153 var quoteAttributeValueForBrowser = __webpack_require__(25);
2154 var warning = __webpack_require__(26);
2155
2156 // Simplified subset
2157 var VALID_ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][\w\.\-]*$/;
2158 var illegalAttributeNameCache = {};
2159 var validatedAttributeNameCache = {};
2160
2161 function isAttributeNameSafe(attributeName) {
2162 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
2163 return true;
2164 }
2165 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
2166 return false;
2167 }
2168 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
2169 validatedAttributeNameCache[attributeName] = true;
2170 return true;
2171 }
2172 illegalAttributeNameCache[attributeName] = true;
2173 process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : undefined;
2174 return false;
2175 }
2176
2177 function shouldIgnoreValue(propertyInfo, value) {
2178 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
2179 }
2180
2181 if (process.env.NODE_ENV !== 'production') {
2182 var reactProps = {
2183 children: true,
2184 dangerouslySetInnerHTML: true,
2185 key: true,
2186 ref: true
2187 };
2188 var warnedProperties = {};
2189
2190 var warnUnknownProperty = function (name) {
2191 if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
2192 return;
2193 }
2194
2195 warnedProperties[name] = true;
2196 var lowerCasedName = name.toLowerCase();
2197
2198 // data-* attributes should be lowercase; suggest the lowercase version
2199 var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
2200
2201 // For now, only warn when we have a suggested correction. This prevents
2202 // logging too much when using transferPropsTo.
2203 process.env.NODE_ENV !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : undefined;
2204 };
2205 }
2206
2207 /**
2208 * Operations for dealing with DOM properties.
2209 */
2210 var DOMPropertyOperations = {
2211
2212 /**
2213 * Creates markup for the ID property.
2214 *
2215 * @param {string} id Unescaped ID.
2216 * @return {string} Markup string.
2217 */
2218 createMarkupForID: function (id) {
2219 return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
2220 },
2221
2222 setAttributeForID: function (node, id) {
2223 node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
2224 },
2225
2226 /**
2227 * Creates markup for a property.
2228 *
2229 * @param {string} name
2230 * @param {*} value
2231 * @return {?string} Markup string, or null if the property was invalid.
2232 */
2233 createMarkupForProperty: function (name, value) {
2234 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2235 if (propertyInfo) {
2236 if (shouldIgnoreValue(propertyInfo, value)) {
2237 return '';
2238 }
2239 var attributeName = propertyInfo.attributeName;
2240 if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
2241 return attributeName + '=""';
2242 }
2243 return attributeName + '=' + quoteAttributeValueForBrowser(value);
2244 } else if (DOMProperty.isCustomAttribute(name)) {
2245 if (value == null) {
2246 return '';
2247 }
2248 return name + '=' + quoteAttributeValueForBrowser(value);
2249 } else if (process.env.NODE_ENV !== 'production') {
2250 warnUnknownProperty(name);
2251 }
2252 return null;
2253 },
2254
2255 /**
2256 * Creates markup for a custom property.
2257 *
2258 * @param {string} name
2259 * @param {*} value
2260 * @return {string} Markup string, or empty string if the property was invalid.
2261 */
2262 createMarkupForCustomAttribute: function (name, value) {
2263 if (!isAttributeNameSafe(name) || value == null) {
2264 return '';
2265 }
2266 return name + '=' + quoteAttributeValueForBrowser(value);
2267 },
2268
2269 /**
2270 * Sets the value for a property on a node.
2271 *
2272 * @param {DOMElement} node
2273 * @param {string} name
2274 * @param {*} value
2275 */
2276 setValueForProperty: function (node, name, value) {
2277 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2278 if (propertyInfo) {
2279 var mutationMethod = propertyInfo.mutationMethod;
2280 if (mutationMethod) {
2281 mutationMethod(node, value);
2282 } else if (shouldIgnoreValue(propertyInfo, value)) {
2283 this.deleteValueForProperty(node, name);
2284 } else if (propertyInfo.mustUseAttribute) {
2285 var attributeName = propertyInfo.attributeName;
2286 var namespace = propertyInfo.attributeNamespace;
2287 // `setAttribute` with objects becomes only `[object]` in IE8/9,
2288 // ('' + value) makes it output the correct toString()-value.
2289 if (namespace) {
2290 node.setAttributeNS(namespace, attributeName, '' + value);
2291 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
2292 node.setAttribute(attributeName, '');
2293 } else {
2294 node.setAttribute(attributeName, '' + value);
2295 }
2296 } else {
2297 var propName = propertyInfo.propertyName;
2298 // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
2299 // property type before comparing; only `value` does and is string.
2300 if (!propertyInfo.hasSideEffects || '' + node[propName] !== '' + value) {
2301 // Contrary to `setAttribute`, object properties are properly
2302 // `toString`ed by IE8/9.
2303 node[propName] = value;
2304 }
2305 }
2306 } else if (DOMProperty.isCustomAttribute(name)) {
2307 DOMPropertyOperations.setValueForAttribute(node, name, value);
2308 } else if (process.env.NODE_ENV !== 'production') {
2309 warnUnknownProperty(name);
2310 }
2311 },
2312
2313 setValueForAttribute: function (node, name, value) {
2314 if (!isAttributeNameSafe(name)) {
2315 return;
2316 }
2317 if (value == null) {
2318 node.removeAttribute(name);
2319 } else {
2320 node.setAttribute(name, '' + value);
2321 }
2322 },
2323
2324 /**
2325 * Deletes the value for a property on a node.
2326 *
2327 * @param {DOMElement} node
2328 * @param {string} name
2329 */
2330 deleteValueForProperty: function (node, name) {
2331 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
2332 if (propertyInfo) {
2333 var mutationMethod = propertyInfo.mutationMethod;
2334 if (mutationMethod) {
2335 mutationMethod(node, undefined);
2336 } else if (propertyInfo.mustUseAttribute) {
2337 node.removeAttribute(propertyInfo.attributeName);
2338 } else {
2339 var propName = propertyInfo.propertyName;
2340 var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName);
2341 if (!propertyInfo.hasSideEffects || '' + node[propName] !== defaultValue) {
2342 node[propName] = defaultValue;
2343 }
2344 }
2345 } else if (DOMProperty.isCustomAttribute(name)) {
2346 node.removeAttribute(name);
2347 } else if (process.env.NODE_ENV !== 'production') {
2348 warnUnknownProperty(name);
2349 }
2350 }
2351
2352 };
2353
2354 ReactPerf.measureMethods(DOMPropertyOperations, 'DOMPropertyOperations', {
2355 setValueForProperty: 'setValueForProperty',
2356 setValueForAttribute: 'setValueForAttribute',
2357 deleteValueForProperty: 'deleteValueForProperty'
2358 });
2359
2360 module.exports = DOMPropertyOperations;
2361 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
2362
2363/***/ }),
2364/* 24 */
2365/***/ (function(module, exports, __webpack_require__) {
2366
2367 /* WEBPACK VAR INJECTION */(function(process) {/**
2368 * Copyright 2013-2015, Facebook, Inc.
2369 * All rights reserved.
2370 *
2371 * This source code is licensed under the BSD-style license found in the
2372 * LICENSE file in the root directory of this source tree. An additional grant
2373 * of patent rights can be found in the PATENTS file in the same directory.
2374 *
2375 * @providesModule DOMProperty
2376 * @typechecks static-only
2377 */
2378
2379 'use strict';
2380
2381 var invariant = __webpack_require__(14);
2382
2383 function checkMask(value, bitmask) {
2384 return (value & bitmask) === bitmask;
2385 }
2386
2387 var DOMPropertyInjection = {
2388 /**
2389 * Mapping from normalized, camelcased property names to a configuration that
2390 * specifies how the associated DOM property should be accessed or rendered.
2391 */
2392 MUST_USE_ATTRIBUTE: 0x1,
2393 MUST_USE_PROPERTY: 0x2,
2394 HAS_SIDE_EFFECTS: 0x4,
2395 HAS_BOOLEAN_VALUE: 0x8,
2396 HAS_NUMERIC_VALUE: 0x10,
2397 HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10,
2398 HAS_OVERLOADED_BOOLEAN_VALUE: 0x40,
2399
2400 /**
2401 * Inject some specialized knowledge about the DOM. This takes a config object
2402 * with the following properties:
2403 *
2404 * isCustomAttribute: function that given an attribute name will return true
2405 * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
2406 * attributes where it's impossible to enumerate all of the possible
2407 * attribute names,
2408 *
2409 * Properties: object mapping DOM property name to one of the
2410 * DOMPropertyInjection constants or null. If your attribute isn't in here,
2411 * it won't get written to the DOM.
2412 *
2413 * DOMAttributeNames: object mapping React attribute name to the DOM
2414 * attribute name. Attribute names not specified use the **lowercase**
2415 * normalized name.
2416 *
2417 * DOMAttributeNamespaces: object mapping React attribute name to the DOM
2418 * attribute namespace URL. (Attribute names not specified use no namespace.)
2419 *
2420 * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
2421 * Property names not specified use the normalized name.
2422 *
2423 * DOMMutationMethods: Properties that require special mutation methods. If
2424 * `value` is undefined, the mutation method should unset the property.
2425 *
2426 * @param {object} domPropertyConfig the config as described above.
2427 */
2428 injectDOMPropertyConfig: function (domPropertyConfig) {
2429 var Injection = DOMPropertyInjection;
2430 var Properties = domPropertyConfig.Properties || {};
2431 var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
2432 var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
2433 var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
2434 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
2435
2436 if (domPropertyConfig.isCustomAttribute) {
2437 DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
2438 }
2439
2440 for (var propName in Properties) {
2441 !!DOMProperty.properties.hasOwnProperty(propName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : undefined;
2442
2443 var lowerCased = propName.toLowerCase();
2444 var propConfig = Properties[propName];
2445
2446 var propertyInfo = {
2447 attributeName: lowerCased,
2448 attributeNamespace: null,
2449 propertyName: propName,
2450 mutationMethod: null,
2451
2452 mustUseAttribute: checkMask(propConfig, Injection.MUST_USE_ATTRIBUTE),
2453 mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
2454 hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS),
2455 hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
2456 hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
2457 hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
2458 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
2459 };
2460
2461 !(!propertyInfo.mustUseAttribute || !propertyInfo.mustUseProperty) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(false) : undefined;
2462 !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : undefined;
2463 !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : undefined;
2464
2465 if (process.env.NODE_ENV !== 'production') {
2466 DOMProperty.getPossibleStandardName[lowerCased] = propName;
2467 }
2468
2469 if (DOMAttributeNames.hasOwnProperty(propName)) {
2470 var attributeName = DOMAttributeNames[propName];
2471 propertyInfo.attributeName = attributeName;
2472 if (process.env.NODE_ENV !== 'production') {
2473 DOMProperty.getPossibleStandardName[attributeName] = propName;
2474 }
2475 }
2476
2477 if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
2478 propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
2479 }
2480
2481 if (DOMPropertyNames.hasOwnProperty(propName)) {
2482 propertyInfo.propertyName = DOMPropertyNames[propName];
2483 }
2484
2485 if (DOMMutationMethods.hasOwnProperty(propName)) {
2486 propertyInfo.mutationMethod = DOMMutationMethods[propName];
2487 }
2488
2489 DOMProperty.properties[propName] = propertyInfo;
2490 }
2491 }
2492 };
2493 var defaultValueCache = {};
2494
2495 /**
2496 * DOMProperty exports lookup objects that can be used like functions:
2497 *
2498 * > DOMProperty.isValid['id']
2499 * true
2500 * > DOMProperty.isValid['foobar']
2501 * undefined
2502 *
2503 * Although this may be confusing, it performs better in general.
2504 *
2505 * @see http://jsperf.com/key-exists
2506 * @see http://jsperf.com/key-missing
2507 */
2508 var DOMProperty = {
2509
2510 ID_ATTRIBUTE_NAME: 'data-reactid',
2511
2512 /**
2513 * Map from property "standard name" to an object with info about how to set
2514 * the property in the DOM. Each object contains:
2515 *
2516 * attributeName:
2517 * Used when rendering markup or with `*Attribute()`.
2518 * attributeNamespace
2519 * propertyName:
2520 * Used on DOM node instances. (This includes properties that mutate due to
2521 * external factors.)
2522 * mutationMethod:
2523 * If non-null, used instead of the property or `setAttribute()` after
2524 * initial render.
2525 * mustUseAttribute:
2526 * Whether the property must be accessed and mutated using `*Attribute()`.
2527 * (This includes anything that fails `<propName> in <element>`.)
2528 * mustUseProperty:
2529 * Whether the property must be accessed and mutated as an object property.
2530 * hasSideEffects:
2531 * Whether or not setting a value causes side effects such as triggering
2532 * resources to be loaded or text selection changes. If true, we read from
2533 * the DOM before updating to ensure that the value is only set if it has
2534 * changed.
2535 * hasBooleanValue:
2536 * Whether the property should be removed when set to a falsey value.
2537 * hasNumericValue:
2538 * Whether the property must be numeric or parse as a numeric and should be
2539 * removed when set to a falsey value.
2540 * hasPositiveNumericValue:
2541 * Whether the property must be positive numeric or parse as a positive
2542 * numeric and should be removed when set to a falsey value.
2543 * hasOverloadedBooleanValue:
2544 * Whether the property can be used as a flag as well as with a value.
2545 * Removed when strictly equal to false; present without a value when
2546 * strictly equal to true; present with a value otherwise.
2547 */
2548 properties: {},
2549
2550 /**
2551 * Mapping from lowercase property names to the properly cased version, used
2552 * to warn in the case of missing properties. Available only in __DEV__.
2553 * @type {Object}
2554 */
2555 getPossibleStandardName: process.env.NODE_ENV !== 'production' ? {} : null,
2556
2557 /**
2558 * All of the isCustomAttribute() functions that have been injected.
2559 */
2560 _isCustomAttributeFunctions: [],
2561
2562 /**
2563 * Checks whether a property name is a custom attribute.
2564 * @method
2565 */
2566 isCustomAttribute: function (attributeName) {
2567 for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
2568 var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
2569 if (isCustomAttributeFn(attributeName)) {
2570 return true;
2571 }
2572 }
2573 return false;
2574 },
2575
2576 /**
2577 * Returns the default property value for a DOM property (i.e., not an
2578 * attribute). Most default values are '' or false, but not all. Worse yet,
2579 * some (in particular, `type`) vary depending on the type of element.
2580 *
2581 * TODO: Is it better to grab all the possible properties when creating an
2582 * element to avoid having to create the same element twice?
2583 */
2584 getDefaultValueForProperty: function (nodeName, prop) {
2585 var nodeDefaults = defaultValueCache[nodeName];
2586 var testElement;
2587 if (!nodeDefaults) {
2588 defaultValueCache[nodeName] = nodeDefaults = {};
2589 }
2590 if (!(prop in nodeDefaults)) {
2591 testElement = document.createElement(nodeName);
2592 nodeDefaults[prop] = testElement[prop];
2593 }
2594 return nodeDefaults[prop];
2595 },
2596
2597 injection: DOMPropertyInjection
2598 };
2599
2600 module.exports = DOMProperty;
2601 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
2602
2603/***/ }),
2604/* 25 */
2605/***/ (function(module, exports, __webpack_require__) {
2606
2607 /**
2608 * Copyright 2013-2015, Facebook, Inc.
2609 * All rights reserved.
2610 *
2611 * This source code is licensed under the BSD-style license found in the
2612 * LICENSE file in the root directory of this source tree. An additional grant
2613 * of patent rights can be found in the PATENTS file in the same directory.
2614 *
2615 * @providesModule quoteAttributeValueForBrowser
2616 */
2617
2618 'use strict';
2619
2620 var escapeTextContentForBrowser = __webpack_require__(22);
2621
2622 /**
2623 * Escapes attribute value to prevent scripting attacks.
2624 *
2625 * @param {*} value Value to escape.
2626 * @return {string} An escaped string.
2627 */
2628 function quoteAttributeValueForBrowser(value) {
2629 return '"' + escapeTextContentForBrowser(value) + '"';
2630 }
2631
2632 module.exports = quoteAttributeValueForBrowser;
2633
2634/***/ }),
2635/* 26 */
2636/***/ (function(module, exports, __webpack_require__) {
2637
2638 /* WEBPACK VAR INJECTION */(function(process) {/**
2639 * Copyright 2014-2015, Facebook, Inc.
2640 * All rights reserved.
2641 *
2642 * This source code is licensed under the BSD-style license found in the
2643 * LICENSE file in the root directory of this source tree. An additional grant
2644 * of patent rights can be found in the PATENTS file in the same directory.
2645 *
2646 * @providesModule warning
2647 */
2648
2649 'use strict';
2650
2651 var emptyFunction = __webpack_require__(16);
2652
2653 /**
2654 * Similar to invariant but only logs a warning if the condition is not met.
2655 * This can be used to log issues in development environments in critical
2656 * paths. Removing the logging code for production environments will keep the
2657 * same logic and follow the same code paths.
2658 */
2659
2660 var warning = emptyFunction;
2661
2662 if (process.env.NODE_ENV !== 'production') {
2663 warning = function (condition, format) {
2664 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
2665 args[_key - 2] = arguments[_key];
2666 }
2667
2668 if (format === undefined) {
2669 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
2670 }
2671
2672 if (format.indexOf('Failed Composite propType: ') === 0) {
2673 return; // Ignore CompositeComponent proptype check.
2674 }
2675
2676 if (!condition) {
2677 var argIndex = 0;
2678 var message = 'Warning: ' + format.replace(/%s/g, function () {
2679 return args[argIndex++];
2680 });
2681 if (typeof console !== 'undefined') {
2682 console.error(message);
2683 }
2684 try {
2685 // --- Welcome to debugging React ---
2686 // This error was thrown as a convenience so that you can use this stack
2687 // to find the callsite that caused this warning to fire.
2688 throw new Error(message);
2689 } catch (x) {}
2690 }
2691 };
2692 }
2693
2694 module.exports = warning;
2695 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
2696
2697/***/ }),
2698/* 27 */
2699/***/ (function(module, exports, __webpack_require__) {
2700
2701 /**
2702 * Copyright 2013-2015, Facebook, Inc.
2703 * All rights reserved.
2704 *
2705 * This source code is licensed under the BSD-style license found in the
2706 * LICENSE file in the root directory of this source tree. An additional grant
2707 * of patent rights can be found in the PATENTS file in the same directory.
2708 *
2709 * @providesModule ReactComponentBrowserEnvironment
2710 */
2711
2712 'use strict';
2713
2714 var ReactDOMIDOperations = __webpack_require__(28);
2715 var ReactMount = __webpack_require__(29);
2716
2717 /**
2718 * Abstracts away all functionality of the reconciler that requires knowledge of
2719 * the browser context. TODO: These callers should be refactored to avoid the
2720 * need for this injection.
2721 */
2722 var ReactComponentBrowserEnvironment = {
2723
2724 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
2725
2726 replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,
2727
2728 /**
2729 * If a particular environment requires that some resources be cleaned up,
2730 * specify this in the injected Mixin. In the DOM, we would likely want to
2731 * purge any cached node ID lookups.
2732 *
2733 * @private
2734 */
2735 unmountIDFromEnvironment: function (rootNodeID) {
2736 ReactMount.purgeID(rootNodeID);
2737 }
2738
2739 };
2740
2741 module.exports = ReactComponentBrowserEnvironment;
2742
2743/***/ }),
2744/* 28 */
2745/***/ (function(module, exports, __webpack_require__) {
2746
2747 /* WEBPACK VAR INJECTION */(function(process) {/**
2748 * Copyright 2013-2015, Facebook, Inc.
2749 * All rights reserved.
2750 *
2751 * This source code is licensed under the BSD-style license found in the
2752 * LICENSE file in the root directory of this source tree. An additional grant
2753 * of patent rights can be found in the PATENTS file in the same directory.
2754 *
2755 * @providesModule ReactDOMIDOperations
2756 * @typechecks static-only
2757 */
2758
2759 'use strict';
2760
2761 var DOMChildrenOperations = __webpack_require__(8);
2762 var DOMPropertyOperations = __webpack_require__(23);
2763 var ReactMount = __webpack_require__(29);
2764 var ReactPerf = __webpack_require__(19);
2765
2766 var invariant = __webpack_require__(14);
2767
2768 /**
2769 * Errors for properties that should not be updated with `updatePropertyByID()`.
2770 *
2771 * @type {object}
2772 * @private
2773 */
2774 var INVALID_PROPERTY_ERRORS = {
2775 dangerouslySetInnerHTML: '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',
2776 style: '`style` must be set using `updateStylesByID()`.'
2777 };
2778
2779 /**
2780 * Operations used to process updates to DOM nodes.
2781 */
2782 var ReactDOMIDOperations = {
2783
2784 /**
2785 * Updates a DOM node with new property values. This should only be used to
2786 * update DOM properties in `DOMProperty`.
2787 *
2788 * @param {string} id ID of the node to update.
2789 * @param {string} name A valid property name, see `DOMProperty`.
2790 * @param {*} value New value of the property.
2791 * @internal
2792 */
2793 updatePropertyByID: function (id, name, value) {
2794 var node = ReactMount.getNode(id);
2795 !!INVALID_PROPERTY_ERRORS.hasOwnProperty(name) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(false) : undefined;
2796
2797 // If we're updating to null or undefined, we should remove the property
2798 // from the DOM node instead of inadvertantly setting to a string. This
2799 // brings us in line with the same behavior we have on initial render.
2800 if (value != null) {
2801 DOMPropertyOperations.setValueForProperty(node, name, value);
2802 } else {
2803 DOMPropertyOperations.deleteValueForProperty(node, name);
2804 }
2805 },
2806
2807 /**
2808 * Replaces a DOM node that exists in the document with markup.
2809 *
2810 * @param {string} id ID of child to be replaced.
2811 * @param {string} markup Dangerous markup to inject in place of child.
2812 * @internal
2813 * @see {Danger.dangerouslyReplaceNodeWithMarkup}
2814 */
2815 dangerouslyReplaceNodeWithMarkupByID: function (id, markup) {
2816 var node = ReactMount.getNode(id);
2817 DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup);
2818 },
2819
2820 /**
2821 * Updates a component's children by processing a series of updates.
2822 *
2823 * @param {array<object>} updates List of update configurations.
2824 * @param {array<string>} markup List of markup strings.
2825 * @internal
2826 */
2827 dangerouslyProcessChildrenUpdates: function (updates, markup) {
2828 for (var i = 0; i < updates.length; i++) {
2829 updates[i].parentNode = ReactMount.getNode(updates[i].parentID);
2830 }
2831 DOMChildrenOperations.processUpdates(updates, markup);
2832 }
2833 };
2834
2835 ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', {
2836 dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID',
2837 dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates'
2838 });
2839
2840 module.exports = ReactDOMIDOperations;
2841 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
2842
2843/***/ }),
2844/* 29 */
2845/***/ (function(module, exports, __webpack_require__) {
2846
2847 /* WEBPACK VAR INJECTION */(function(process) {/**
2848 * Copyright 2013-2015, Facebook, Inc.
2849 * All rights reserved.
2850 *
2851 * This source code is licensed under the BSD-style license found in the
2852 * LICENSE file in the root directory of this source tree. An additional grant
2853 * of patent rights can be found in the PATENTS file in the same directory.
2854 *
2855 * @providesModule ReactMount
2856 */
2857
2858 'use strict';
2859
2860 var DOMProperty = __webpack_require__(24);
2861 var ReactBrowserEventEmitter = __webpack_require__(30);
2862 var ReactCurrentOwner = __webpack_require__(6);
2863 var ReactDOMFeatureFlags = __webpack_require__(42);
2864 var ReactElement = __webpack_require__(43);
2865 var ReactEmptyComponentRegistry = __webpack_require__(45);
2866 var ReactInstanceHandles = __webpack_require__(46);
2867 var ReactInstanceMap = __webpack_require__(48);
2868 var ReactMarkupChecksum = __webpack_require__(49);
2869 var ReactPerf = __webpack_require__(19);
2870 var ReactReconciler = __webpack_require__(51);
2871 var ReactUpdateQueue = __webpack_require__(54);
2872 var ReactUpdates = __webpack_require__(55);
2873
2874 var assign = __webpack_require__(40);
2875 var emptyObject = __webpack_require__(59);
2876 var containsNode = __webpack_require__(60);
2877 var instantiateReactComponent = __webpack_require__(63);
2878 var invariant = __webpack_require__(14);
2879 var setInnerHTML = __webpack_require__(20);
2880 var shouldUpdateReactComponent = __webpack_require__(68);
2881 var validateDOMNesting = __webpack_require__(71);
2882 var warning = __webpack_require__(26);
2883
2884 var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
2885 var nodeCache = {};
2886
2887 var ELEMENT_NODE_TYPE = 1;
2888 var DOC_NODE_TYPE = 9;
2889 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
2890
2891 var ownerDocumentContextKey = '__ReactMount_ownerDocument$' + Math.random().toString(36).slice(2);
2892
2893 /** Mapping from reactRootID to React component instance. */
2894 var instancesByReactRootID = {};
2895
2896 /** Mapping from reactRootID to `container` nodes. */
2897 var containersByReactRootID = {};
2898
2899 if (process.env.NODE_ENV !== 'production') {
2900 /** __DEV__-only mapping from reactRootID to root elements. */
2901 var rootElementsByReactRootID = {};
2902 }
2903
2904 // Used to store breadth-first search state in findComponentRoot.
2905 var findComponentRootReusableArray = [];
2906
2907 /**
2908 * Finds the index of the first character
2909 * that's not common between the two given strings.
2910 *
2911 * @return {number} the index of the character where the strings diverge
2912 */
2913 function firstDifferenceIndex(string1, string2) {
2914 var minLen = Math.min(string1.length, string2.length);
2915 for (var i = 0; i < minLen; i++) {
2916 if (string1.charAt(i) !== string2.charAt(i)) {
2917 return i;
2918 }
2919 }
2920 return string1.length === string2.length ? -1 : minLen;
2921 }
2922
2923 /**
2924 * @param {DOMElement|DOMDocument} container DOM element that may contain
2925 * a React component
2926 * @return {?*} DOM element that may have the reactRoot ID, or null.
2927 */
2928 function getReactRootElementInContainer(container) {
2929 if (!container) {
2930 return null;
2931 }
2932
2933 if (container.nodeType === DOC_NODE_TYPE) {
2934 return container.documentElement;
2935 } else {
2936 return container.firstChild;
2937 }
2938 }
2939
2940 /**
2941 * @param {DOMElement} container DOM element that may contain a React component.
2942 * @return {?string} A "reactRoot" ID, if a React component is rendered.
2943 */
2944 function getReactRootID(container) {
2945 var rootElement = getReactRootElementInContainer(container);
2946 return rootElement && ReactMount.getID(rootElement);
2947 }
2948
2949 /**
2950 * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form
2951 * element can return its control whose name or ID equals ATTR_NAME. All
2952 * DOM nodes support `getAttributeNode` but this can also get called on
2953 * other objects so just return '' if we're given something other than a
2954 * DOM node (such as window).
2955 *
2956 * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node.
2957 * @return {string} ID of the supplied `domNode`.
2958 */
2959 function getID(node) {
2960 var id = internalGetID(node);
2961 if (id) {
2962 if (nodeCache.hasOwnProperty(id)) {
2963 var cached = nodeCache[id];
2964 if (cached !== node) {
2965 !!isValid(cached, id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', ATTR_NAME, id) : invariant(false) : undefined;
2966
2967 nodeCache[id] = node;
2968 }
2969 } else {
2970 nodeCache[id] = node;
2971 }
2972 }
2973
2974 return id;
2975 }
2976
2977 function internalGetID(node) {
2978 // If node is something like a window, document, or text node, none of
2979 // which support attributes or a .getAttribute method, gracefully return
2980 // the empty string, as if the attribute were missing.
2981 return node && node.getAttribute && node.getAttribute(ATTR_NAME) || '';
2982 }
2983
2984 /**
2985 * Sets the React-specific ID of the given node.
2986 *
2987 * @param {DOMElement} node The DOM node whose ID will be set.
2988 * @param {string} id The value of the ID attribute.
2989 */
2990 function setID(node, id) {
2991 var oldID = internalGetID(node);
2992 if (oldID !== id) {
2993 delete nodeCache[oldID];
2994 }
2995 node.setAttribute(ATTR_NAME, id);
2996 nodeCache[id] = node;
2997 }
2998
2999 /**
3000 * Finds the node with the supplied React-generated DOM ID.
3001 *
3002 * @param {string} id A React-generated DOM ID.
3003 * @return {DOMElement} DOM node with the suppled `id`.
3004 * @internal
3005 */
3006 function getNode(id) {
3007 if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
3008 nodeCache[id] = ReactMount.findReactNodeByID(id);
3009 }
3010 return nodeCache[id];
3011 }
3012
3013 /**
3014 * Finds the node with the supplied public React instance.
3015 *
3016 * @param {*} instance A public React instance.
3017 * @return {?DOMElement} DOM node with the suppled `id`.
3018 * @internal
3019 */
3020 function getNodeFromInstance(instance) {
3021 var id = ReactInstanceMap.get(instance)._rootNodeID;
3022 if (ReactEmptyComponentRegistry.isNullComponentID(id)) {
3023 return null;
3024 }
3025 if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) {
3026 nodeCache[id] = ReactMount.findReactNodeByID(id);
3027 }
3028 return nodeCache[id];
3029 }
3030
3031 /**
3032 * A node is "valid" if it is contained by a currently mounted container.
3033 *
3034 * This means that the node does not have to be contained by a document in
3035 * order to be considered valid.
3036 *
3037 * @param {?DOMElement} node The candidate DOM node.
3038 * @param {string} id The expected ID of the node.
3039 * @return {boolean} Whether the node is contained by a mounted container.
3040 */
3041 function isValid(node, id) {
3042 if (node) {
3043 !(internalGetID(node) === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactMount: Unexpected modification of `%s`', ATTR_NAME) : invariant(false) : undefined;
3044
3045 var container = ReactMount.findReactContainerForID(id);
3046 if (container && containsNode(container, node)) {
3047 return true;
3048 }
3049 }
3050
3051 return false;
3052 }
3053
3054 /**
3055 * Causes the cache to forget about one React-specific ID.
3056 *
3057 * @param {string} id The ID to forget.
3058 */
3059 function purgeID(id) {
3060 delete nodeCache[id];
3061 }
3062
3063 var deepestNodeSoFar = null;
3064 function findDeepestCachedAncestorImpl(ancestorID) {
3065 var ancestor = nodeCache[ancestorID];
3066 if (ancestor && isValid(ancestor, ancestorID)) {
3067 deepestNodeSoFar = ancestor;
3068 } else {
3069 // This node isn't populated in the cache, so presumably none of its
3070 // descendants are. Break out of the loop.
3071 return false;
3072 }
3073 }
3074
3075 /**
3076 * Return the deepest cached node whose ID is a prefix of `targetID`.
3077 */
3078 function findDeepestCachedAncestor(targetID) {
3079 deepestNodeSoFar = null;
3080 ReactInstanceHandles.traverseAncestors(targetID, findDeepestCachedAncestorImpl);
3081
3082 var foundNode = deepestNodeSoFar;
3083 deepestNodeSoFar = null;
3084 return foundNode;
3085 }
3086
3087 /**
3088 * Mounts this component and inserts it into the DOM.
3089 *
3090 * @param {ReactComponent} componentInstance The instance to mount.
3091 * @param {string} rootID DOM ID of the root node.
3092 * @param {DOMElement} container DOM element to mount into.
3093 * @param {ReactReconcileTransaction} transaction
3094 * @param {boolean} shouldReuseMarkup If true, do not insert markup
3095 */
3096 function mountComponentIntoNode(componentInstance, rootID, container, transaction, shouldReuseMarkup, context) {
3097 if (ReactDOMFeatureFlags.useCreateElement) {
3098 context = assign({}, context);
3099 if (container.nodeType === DOC_NODE_TYPE) {
3100 context[ownerDocumentContextKey] = container;
3101 } else {
3102 context[ownerDocumentContextKey] = container.ownerDocument;
3103 }
3104 }
3105 if (process.env.NODE_ENV !== 'production') {
3106 if (context === emptyObject) {
3107 context = {};
3108 }
3109 var tag = container.nodeName.toLowerCase();
3110 context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(null, tag, null);
3111 }
3112 var markup = ReactReconciler.mountComponent(componentInstance, rootID, transaction, context);
3113 componentInstance._renderedComponent._topLevelWrapper = componentInstance;
3114 ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup, transaction);
3115 }
3116
3117 /**
3118 * Batched mount.
3119 *
3120 * @param {ReactComponent} componentInstance The instance to mount.
3121 * @param {string} rootID DOM ID of the root node.
3122 * @param {DOMElement} container DOM element to mount into.
3123 * @param {boolean} shouldReuseMarkup If true, do not insert markup
3124 */
3125 function batchedMountComponentIntoNode(componentInstance, rootID, container, shouldReuseMarkup, context) {
3126 var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
3127 /* forceHTML */shouldReuseMarkup);
3128 transaction.perform(mountComponentIntoNode, null, componentInstance, rootID, container, transaction, shouldReuseMarkup, context);
3129 ReactUpdates.ReactReconcileTransaction.release(transaction);
3130 }
3131
3132 /**
3133 * Unmounts a component and removes it from the DOM.
3134 *
3135 * @param {ReactComponent} instance React component instance.
3136 * @param {DOMElement} container DOM element to unmount from.
3137 * @final
3138 * @internal
3139 * @see {ReactMount.unmountComponentAtNode}
3140 */
3141 function unmountComponentFromNode(instance, container) {
3142 ReactReconciler.unmountComponent(instance);
3143
3144 if (container.nodeType === DOC_NODE_TYPE) {
3145 container = container.documentElement;
3146 }
3147
3148 // http://jsperf.com/emptying-a-node
3149 while (container.lastChild) {
3150 container.removeChild(container.lastChild);
3151 }
3152 }
3153
3154 /**
3155 * True if the supplied DOM node has a direct React-rendered child that is
3156 * not a React root element. Useful for warning in `render`,
3157 * `unmountComponentAtNode`, etc.
3158 *
3159 * @param {?DOMElement} node The candidate DOM node.
3160 * @return {boolean} True if the DOM element contains a direct child that was
3161 * rendered by React but is not a root element.
3162 * @internal
3163 */
3164 function hasNonRootReactChild(node) {
3165 var reactRootID = getReactRootID(node);
3166 return reactRootID ? reactRootID !== ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID) : false;
3167 }
3168
3169 /**
3170 * Returns the first (deepest) ancestor of a node which is rendered by this copy
3171 * of React.
3172 */
3173 function findFirstReactDOMImpl(node) {
3174 // This node might be from another React instance, so we make sure not to
3175 // examine the node cache here
3176 for (; node && node.parentNode !== node; node = node.parentNode) {
3177 if (node.nodeType !== 1) {
3178 // Not a DOMElement, therefore not a React component
3179 continue;
3180 }
3181 var nodeID = internalGetID(node);
3182 if (!nodeID) {
3183 continue;
3184 }
3185 var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
3186
3187 // If containersByReactRootID contains the container we find by crawling up
3188 // the tree, we know that this instance of React rendered the node.
3189 // nb. isValid's strategy (with containsNode) does not work because render
3190 // trees may be nested and we don't want a false positive in that case.
3191 var current = node;
3192 var lastID;
3193 do {
3194 lastID = internalGetID(current);
3195 current = current.parentNode;
3196 if (current == null) {
3197 // The passed-in node has been detached from the container it was
3198 // originally rendered into.
3199 return null;
3200 }
3201 } while (lastID !== reactRootID);
3202
3203 if (current === containersByReactRootID[reactRootID]) {
3204 return node;
3205 }
3206 }
3207 return null;
3208 }
3209
3210 /**
3211 * Temporary (?) hack so that we can store all top-level pending updates on
3212 * composites instead of having to worry about different types of components
3213 * here.
3214 */
3215 var TopLevelWrapper = function () {};
3216 TopLevelWrapper.prototype.isReactComponent = {};
3217 if (process.env.NODE_ENV !== 'production') {
3218 TopLevelWrapper.displayName = 'TopLevelWrapper';
3219 }
3220 TopLevelWrapper.prototype.render = function () {
3221 // this.props is actually a ReactElement
3222 return this.props;
3223 };
3224
3225 /**
3226 * Mounting is the process of initializing a React component by creating its
3227 * representative DOM elements and inserting them into a supplied `container`.
3228 * Any prior content inside `container` is destroyed in the process.
3229 *
3230 * ReactMount.render(
3231 * component,
3232 * document.getElementById('container')
3233 * );
3234 *
3235 * <div id="container"> <-- Supplied `container`.
3236 * <div data-reactid=".3"> <-- Rendered reactRoot of React
3237 * // ... component.
3238 * </div>
3239 * </div>
3240 *
3241 * Inside of `container`, the first element rendered is the "reactRoot".
3242 */
3243 var ReactMount = {
3244
3245 TopLevelWrapper: TopLevelWrapper,
3246
3247 /** Exposed for debugging purposes **/
3248 _instancesByReactRootID: instancesByReactRootID,
3249
3250 /**
3251 * This is a hook provided to support rendering React components while
3252 * ensuring that the apparent scroll position of its `container` does not
3253 * change.
3254 *
3255 * @param {DOMElement} container The `container` being rendered into.
3256 * @param {function} renderCallback This must be called once to do the render.
3257 */
3258 scrollMonitor: function (container, renderCallback) {
3259 renderCallback();
3260 },
3261
3262 /**
3263 * Take a component that's already mounted into the DOM and replace its props
3264 * @param {ReactComponent} prevComponent component instance already in the DOM
3265 * @param {ReactElement} nextElement component instance to render
3266 * @param {DOMElement} container container to render into
3267 * @param {?function} callback function triggered on completion
3268 */
3269 _updateRootComponent: function (prevComponent, nextElement, container, callback) {
3270 ReactMount.scrollMonitor(container, function () {
3271 ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement);
3272 if (callback) {
3273 ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
3274 }
3275 });
3276
3277 if (process.env.NODE_ENV !== 'production') {
3278 // Record the root element in case it later gets transplanted.
3279 rootElementsByReactRootID[getReactRootID(container)] = getReactRootElementInContainer(container);
3280 }
3281
3282 return prevComponent;
3283 },
3284
3285 /**
3286 * Register a component into the instance map and starts scroll value
3287 * monitoring
3288 * @param {ReactComponent} nextComponent component instance to render
3289 * @param {DOMElement} container container to render into
3290 * @return {string} reactRoot ID prefix
3291 */
3292 _registerComponent: function (nextComponent, container) {
3293 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : invariant(false) : undefined;
3294
3295 ReactBrowserEventEmitter.ensureScrollValueMonitoring();
3296
3297 var reactRootID = ReactMount.registerContainer(container);
3298 instancesByReactRootID[reactRootID] = nextComponent;
3299 return reactRootID;
3300 },
3301
3302 /**
3303 * Render a new component into the DOM.
3304 * @param {ReactElement} nextElement element to render
3305 * @param {DOMElement} container container to render into
3306 * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
3307 * @return {ReactComponent} nextComponent
3308 */
3309 _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
3310 // Various parts of our code (such as ReactCompositeComponent's
3311 // _renderValidatedComponent) assume that calls to render aren't nested;
3312 // verify that that's the case.
3313 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined;
3314
3315 var componentInstance = instantiateReactComponent(nextElement, null);
3316 var reactRootID = ReactMount._registerComponent(componentInstance, container);
3317
3318 // The initial render is synchronous but any updates that happen during
3319 // rendering, in componentWillMount or componentDidMount, will be batched
3320 // according to the current batching strategy.
3321
3322 ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, reactRootID, container, shouldReuseMarkup, context);
3323
3324 if (process.env.NODE_ENV !== 'production') {
3325 // Record the root element in case it later gets transplanted.
3326 rootElementsByReactRootID[reactRootID] = getReactRootElementInContainer(container);
3327 }
3328
3329 return componentInstance;
3330 },
3331
3332 /**
3333 * Renders a React component into the DOM in the supplied `container`.
3334 *
3335 * If the React component was previously rendered into `container`, this will
3336 * perform an update on it and only mutate the DOM as necessary to reflect the
3337 * latest React component.
3338 *
3339 * @param {ReactComponent} parentComponent The conceptual parent of this render tree.
3340 * @param {ReactElement} nextElement Component element to render.
3341 * @param {DOMElement} container DOM element to render into.
3342 * @param {?function} callback function triggered on completion
3343 * @return {ReactComponent} Component instance rendered in `container`.
3344 */
3345 renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
3346 !(parentComponent != null && parentComponent._reactInternalInstance != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : invariant(false) : undefined;
3347 return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
3348 },
3349
3350 _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
3351 !ReactElement.isValidElement(nextElement) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOM.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing an element string, make sure to instantiate ' + 'it by passing it to React.createElement.' : typeof nextElement === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' :
3352 // Check if it quacks like an element
3353 nextElement != null && nextElement.props !== undefined ? ' This may be caused by unintentionally loading two independent ' + 'copies of React.' : '') : invariant(false) : undefined;
3354
3355 process.env.NODE_ENV !== 'production' ? warning(!container || !container.tagName || container.tagName.toUpperCase() !== 'BODY', 'render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.') : undefined;
3356
3357 var nextWrappedElement = new ReactElement(TopLevelWrapper, null, null, null, null, null, nextElement);
3358
3359 var prevComponent = instancesByReactRootID[getReactRootID(container)];
3360
3361 if (prevComponent) {
3362 var prevWrappedElement = prevComponent._currentElement;
3363 var prevElement = prevWrappedElement.props;
3364 if (shouldUpdateReactComponent(prevElement, nextElement)) {
3365 var publicInst = prevComponent._renderedComponent.getPublicInstance();
3366 var updatedCallback = callback && function () {
3367 callback.call(publicInst);
3368 };
3369 ReactMount._updateRootComponent(prevComponent, nextWrappedElement, container, updatedCallback);
3370 return publicInst;
3371 } else {
3372 ReactMount.unmountComponentAtNode(container);
3373 }
3374 }
3375
3376 var reactRootElement = getReactRootElementInContainer(container);
3377 var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
3378 var containerHasNonRootReactChild = hasNonRootReactChild(container);
3379
3380 if (process.env.NODE_ENV !== 'production') {
3381 process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.') : undefined;
3382
3383 if (!containerHasReactMarkup || reactRootElement.nextSibling) {
3384 var rootElementSibling = reactRootElement;
3385 while (rootElementSibling) {
3386 if (internalGetID(rootElementSibling)) {
3387 process.env.NODE_ENV !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : undefined;
3388 break;
3389 }
3390 rootElementSibling = rootElementSibling.nextSibling;
3391 }
3392 }
3393 }
3394
3395 var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
3396 var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, parentComponent != null ? parentComponent._reactInternalInstance._processChildContext(parentComponent._reactInternalInstance._context) : emptyObject)._renderedComponent.getPublicInstance();
3397 if (callback) {
3398 callback.call(component);
3399 }
3400 return component;
3401 },
3402
3403 /**
3404 * Renders a React component into the DOM in the supplied `container`.
3405 *
3406 * If the React component was previously rendered into `container`, this will
3407 * perform an update on it and only mutate the DOM as necessary to reflect the
3408 * latest React component.
3409 *
3410 * @param {ReactElement} nextElement Component element to render.
3411 * @param {DOMElement} container DOM element to render into.
3412 * @param {?function} callback function triggered on completion
3413 * @return {ReactComponent} Component instance rendered in `container`.
3414 */
3415 render: function (nextElement, container, callback) {
3416 return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
3417 },
3418
3419 /**
3420 * Registers a container node into which React components will be rendered.
3421 * This also creates the "reactRoot" ID that will be assigned to the element
3422 * rendered within.
3423 *
3424 * @param {DOMElement} container DOM element to register as a container.
3425 * @return {string} The "reactRoot" ID of elements rendered within.
3426 */
3427 registerContainer: function (container) {
3428 var reactRootID = getReactRootID(container);
3429 if (reactRootID) {
3430 // If one exists, make sure it is a valid "reactRoot" ID.
3431 reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID);
3432 }
3433 if (!reactRootID) {
3434 // No valid "reactRoot" ID found, create one.
3435 reactRootID = ReactInstanceHandles.createReactRootID();
3436 }
3437 containersByReactRootID[reactRootID] = container;
3438 return reactRootID;
3439 },
3440
3441 /**
3442 * Unmounts and destroys the React component rendered in the `container`.
3443 *
3444 * @param {DOMElement} container DOM element containing a React component.
3445 * @return {boolean} True if a component was found in and unmounted from
3446 * `container`
3447 */
3448 unmountComponentAtNode: function (container) {
3449 // Various parts of our code (such as ReactCompositeComponent's
3450 // _renderValidatedComponent) assume that calls to render aren't nested;
3451 // verify that that's the case. (Strictly speaking, unmounting won't cause a
3452 // render but we still don't expect to be in a render call here.)
3453 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from render ' + 'is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate. Check the render method of %s.', ReactCurrentOwner.current && ReactCurrentOwner.current.getName() || 'ReactCompositeComponent') : undefined;
3454
3455 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : invariant(false) : undefined;
3456
3457 var reactRootID = getReactRootID(container);
3458 var component = instancesByReactRootID[reactRootID];
3459 if (!component) {
3460 // Check if the node being unmounted was rendered by React, but isn't a
3461 // root node.
3462 var containerHasNonRootReactChild = hasNonRootReactChild(container);
3463
3464 // Check if the container itself is a React root node.
3465 var containerID = internalGetID(container);
3466 var isContainerReactRoot = containerID && containerID === ReactInstanceHandles.getReactRootIDFromNodeID(containerID);
3467
3468 if (process.env.NODE_ENV !== 'production') {
3469 process.env.NODE_ENV !== 'production' ? warning(!containerHasNonRootReactChild, 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.') : undefined;
3470 }
3471
3472 return false;
3473 }
3474 ReactUpdates.batchedUpdates(unmountComponentFromNode, component, container);
3475 delete instancesByReactRootID[reactRootID];
3476 delete containersByReactRootID[reactRootID];
3477 if (process.env.NODE_ENV !== 'production') {
3478 delete rootElementsByReactRootID[reactRootID];
3479 }
3480 return true;
3481 },
3482
3483 /**
3484 * Finds the container DOM element that contains React component to which the
3485 * supplied DOM `id` belongs.
3486 *
3487 * @param {string} id The ID of an element rendered by a React component.
3488 * @return {?DOMElement} DOM element that contains the `id`.
3489 */
3490 findReactContainerForID: function (id) {
3491 var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id);
3492 var container = containersByReactRootID[reactRootID];
3493
3494 if (process.env.NODE_ENV !== 'production') {
3495 var rootElement = rootElementsByReactRootID[reactRootID];
3496 if (rootElement && rootElement.parentNode !== container) {
3497 process.env.NODE_ENV !== 'production' ? warning(
3498 // Call internalGetID here because getID calls isValid which calls
3499 // findReactContainerForID (this function).
3500 internalGetID(rootElement) === reactRootID, 'ReactMount: Root element ID differed from reactRootID.') : undefined;
3501 var containerChild = container.firstChild;
3502 if (containerChild && reactRootID === internalGetID(containerChild)) {
3503 // If the container has a new child with the same ID as the old
3504 // root element, then rootElementsByReactRootID[reactRootID] is
3505 // just stale and needs to be updated. The case that deserves a
3506 // warning is when the container is empty.
3507 rootElementsByReactRootID[reactRootID] = containerChild;
3508 } else {
3509 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactMount: Root element has been removed from its original ' + 'container. New container: %s', rootElement.parentNode) : undefined;
3510 }
3511 }
3512 }
3513
3514 return container;
3515 },
3516
3517 /**
3518 * Finds an element rendered by React with the supplied ID.
3519 *
3520 * @param {string} id ID of a DOM node in the React component.
3521 * @return {DOMElement} Root DOM node of the React component.
3522 */
3523 findReactNodeByID: function (id) {
3524 var reactRoot = ReactMount.findReactContainerForID(id);
3525 return ReactMount.findComponentRoot(reactRoot, id);
3526 },
3527
3528 /**
3529 * Traverses up the ancestors of the supplied node to find a node that is a
3530 * DOM representation of a React component rendered by this copy of React.
3531 *
3532 * @param {*} node
3533 * @return {?DOMEventTarget}
3534 * @internal
3535 */
3536 getFirstReactDOM: function (node) {
3537 return findFirstReactDOMImpl(node);
3538 },
3539
3540 /**
3541 * Finds a node with the supplied `targetID` inside of the supplied
3542 * `ancestorNode`. Exploits the ID naming scheme to perform the search
3543 * quickly.
3544 *
3545 * @param {DOMEventTarget} ancestorNode Search from this root.
3546 * @pararm {string} targetID ID of the DOM representation of the component.
3547 * @return {DOMEventTarget} DOM node with the supplied `targetID`.
3548 * @internal
3549 */
3550 findComponentRoot: function (ancestorNode, targetID) {
3551 var firstChildren = findComponentRootReusableArray;
3552 var childIndex = 0;
3553
3554 var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode;
3555
3556 if (process.env.NODE_ENV !== 'production') {
3557 // This will throw on the next line; give an early warning
3558 process.env.NODE_ENV !== 'production' ? warning(deepestAncestor != null, 'React can\'t find the root component node for data-reactid value ' + '`%s`. If you\'re seeing this message, it probably means that ' + 'you\'ve loaded two copies of React on the page. At this time, only ' + 'a single copy of React can be loaded at a time.', targetID) : undefined;
3559 }
3560
3561 firstChildren[0] = deepestAncestor.firstChild;
3562 firstChildren.length = 1;
3563
3564 while (childIndex < firstChildren.length) {
3565 var child = firstChildren[childIndex++];
3566 var targetChild;
3567
3568 while (child) {
3569 var childID = ReactMount.getID(child);
3570 if (childID) {
3571 // Even if we find the node we're looking for, we finish looping
3572 // through its siblings to ensure they're cached so that we don't have
3573 // to revisit this node again. Otherwise, we make n^2 calls to getID
3574 // when visiting the many children of a single node in order.
3575
3576 if (targetID === childID) {
3577 targetChild = child;
3578 } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) {
3579 // If we find a child whose ID is an ancestor of the given ID,
3580 // then we can be sure that we only want to search the subtree
3581 // rooted at this child, so we can throw out the rest of the
3582 // search state.
3583 firstChildren.length = childIndex = 0;
3584 firstChildren.push(child.firstChild);
3585 }
3586 } else {
3587 // If this child had no ID, then there's a chance that it was
3588 // injected automatically by the browser, as when a `<table>`
3589 // element sprouts an extra `<tbody>` child as a side effect of
3590 // `.innerHTML` parsing. Optimistically continue down this
3591 // branch, but not before examining the other siblings.
3592 firstChildren.push(child.firstChild);
3593 }
3594
3595 child = child.nextSibling;
3596 }
3597
3598 if (targetChild) {
3599 // Emptying firstChildren/findComponentRootReusableArray is
3600 // not necessary for correctness, but it helps the GC reclaim
3601 // any nodes that were left at the end of the search.
3602 firstChildren.length = 0;
3603
3604 return targetChild;
3605 }
3606 }
3607
3608 firstChildren.length = 0;
3609
3610 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findComponentRoot(..., %s): Unable to find element. This probably ' + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + 'parent. ' + 'Try inspecting the child nodes of the element with React ID `%s`.', targetID, ReactMount.getID(ancestorNode)) : invariant(false) : undefined;
3611 },
3612
3613 _mountImageIntoNode: function (markup, container, shouldReuseMarkup, transaction) {
3614 !(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE || container.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : invariant(false) : undefined;
3615
3616 if (shouldReuseMarkup) {
3617 var rootElement = getReactRootElementInContainer(container);
3618 if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
3619 return;
3620 } else {
3621 var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
3622 rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
3623
3624 var rootMarkup = rootElement.outerHTML;
3625 rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
3626
3627 var normalizedMarkup = markup;
3628 if (process.env.NODE_ENV !== 'production') {
3629 // because rootMarkup is retrieved from the DOM, various normalizations
3630 // will have occurred which will not be present in `markup`. Here,
3631 // insert markup into a <div> or <iframe> depending on the container
3632 // type to perform the same normalizations before comparing.
3633 var normalizer;
3634 if (container.nodeType === ELEMENT_NODE_TYPE) {
3635 normalizer = document.createElement('div');
3636 normalizer.innerHTML = markup;
3637 normalizedMarkup = normalizer.innerHTML;
3638 } else {
3639 normalizer = document.createElement('iframe');
3640 document.body.appendChild(normalizer);
3641 normalizer.contentDocument.write(markup);
3642 normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
3643 document.body.removeChild(normalizer);
3644 }
3645 }
3646
3647 var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
3648 var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
3649
3650 !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document using ' + 'server rendering but the checksum was invalid. This usually ' + 'means you rendered a different component type or props on ' + 'the client from the one on the server, or your render() ' + 'methods are impure. React cannot handle this case due to ' + 'cross-browser quirks by rendering at the document root. You ' + 'should look for environment dependent code in your components ' + 'and ensure the props are the same client and server side:\n%s', difference) : invariant(false) : undefined;
3651
3652 if (process.env.NODE_ENV !== 'production') {
3653 process.env.NODE_ENV !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : undefined;
3654 }
3655 }
3656 }
3657
3658 !(container.nodeType !== DOC_NODE_TYPE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You\'re trying to render a component to the document but ' + 'you didn\'t use server rendering. We can\'t do this ' + 'without using server rendering due to cross-browser quirks. ' + 'See ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined;
3659
3660 if (transaction.useCreateElement) {
3661 while (container.lastChild) {
3662 container.removeChild(container.lastChild);
3663 }
3664 container.appendChild(markup);
3665 } else {
3666 setInnerHTML(container, markup);
3667 }
3668 },
3669
3670 ownerDocumentContextKey: ownerDocumentContextKey,
3671
3672 /**
3673 * React ID utilities.
3674 */
3675
3676 getReactRootID: getReactRootID,
3677
3678 getID: getID,
3679
3680 setID: setID,
3681
3682 getNode: getNode,
3683
3684 getNodeFromInstance: getNodeFromInstance,
3685
3686 isValid: isValid,
3687
3688 purgeID: purgeID
3689 };
3690
3691 ReactPerf.measureMethods(ReactMount, 'ReactMount', {
3692 _renderNewRootComponent: '_renderNewRootComponent',
3693 _mountImageIntoNode: '_mountImageIntoNode'
3694 });
3695
3696 module.exports = ReactMount;
3697 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
3698
3699/***/ }),
3700/* 30 */
3701/***/ (function(module, exports, __webpack_require__) {
3702
3703 /**
3704 * Copyright 2013-2015, Facebook, Inc.
3705 * All rights reserved.
3706 *
3707 * This source code is licensed under the BSD-style license found in the
3708 * LICENSE file in the root directory of this source tree. An additional grant
3709 * of patent rights can be found in the PATENTS file in the same directory.
3710 *
3711 * @providesModule ReactBrowserEventEmitter
3712 * @typechecks static-only
3713 */
3714
3715 'use strict';
3716
3717 var EventConstants = __webpack_require__(31);
3718 var EventPluginHub = __webpack_require__(32);
3719 var EventPluginRegistry = __webpack_require__(33);
3720 var ReactEventEmitterMixin = __webpack_require__(38);
3721 var ReactPerf = __webpack_require__(19);
3722 var ViewportMetrics = __webpack_require__(39);
3723
3724 var assign = __webpack_require__(40);
3725 var isEventSupported = __webpack_require__(41);
3726
3727 /**
3728 * Summary of `ReactBrowserEventEmitter` event handling:
3729 *
3730 * - Top-level delegation is used to trap most native browser events. This
3731 * may only occur in the main thread and is the responsibility of
3732 * ReactEventListener, which is injected and can therefore support pluggable
3733 * event sources. This is the only work that occurs in the main thread.
3734 *
3735 * - We normalize and de-duplicate events to account for browser quirks. This
3736 * may be done in the worker thread.
3737 *
3738 * - Forward these native events (with the associated top-level type used to
3739 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
3740 * to extract any synthetic events.
3741 *
3742 * - The `EventPluginHub` will then process each event by annotating them with
3743 * "dispatches", a sequence of listeners and IDs that care about that event.
3744 *
3745 * - The `EventPluginHub` then dispatches the events.
3746 *
3747 * Overview of React and the event system:
3748 *
3749 * +------------+ .
3750 * | DOM | .
3751 * +------------+ .
3752 * | .
3753 * v .
3754 * +------------+ .
3755 * | ReactEvent | .
3756 * | Listener | .
3757 * +------------+ . +-----------+
3758 * | . +--------+|SimpleEvent|
3759 * | . | |Plugin |
3760 * +-----|------+ . v +-----------+
3761 * | | | . +--------------+ +------------+
3762 * | +-----------.--->|EventPluginHub| | Event |
3763 * | | . | | +-----------+ | Propagators|
3764 * | ReactEvent | . | | |TapEvent | |------------|
3765 * | Emitter | . | |<---+|Plugin | |other plugin|
3766 * | | . | | +-----------+ | utilities |
3767 * | +-----------.--->| | +------------+
3768 * | | | . +--------------+
3769 * +-----|------+ . ^ +-----------+
3770 * | . | |Enter/Leave|
3771 * + . +-------+|Plugin |
3772 * +-------------+ . +-----------+
3773 * | application | .
3774 * |-------------| .
3775 * | | .
3776 * | | .
3777 * +-------------+ .
3778 * .
3779 * React Core . General Purpose Event Plugin System
3780 */
3781
3782 var alreadyListeningTo = {};
3783 var isMonitoringScrollValue = false;
3784 var reactTopListenersCounter = 0;
3785
3786 // For events like 'submit' which don't consistently bubble (which we trap at a
3787 // lower node than `document`), binding at `document` would cause duplicate
3788 // events so we don't include them here
3789 var topEventMapping = {
3790 topAbort: 'abort',
3791 topBlur: 'blur',
3792 topCanPlay: 'canplay',
3793 topCanPlayThrough: 'canplaythrough',
3794 topChange: 'change',
3795 topClick: 'click',
3796 topCompositionEnd: 'compositionend',
3797 topCompositionStart: 'compositionstart',
3798 topCompositionUpdate: 'compositionupdate',
3799 topContextMenu: 'contextmenu',
3800 topCopy: 'copy',
3801 topCut: 'cut',
3802 topDoubleClick: 'dblclick',
3803 topDrag: 'drag',
3804 topDragEnd: 'dragend',
3805 topDragEnter: 'dragenter',
3806 topDragExit: 'dragexit',
3807 topDragLeave: 'dragleave',
3808 topDragOver: 'dragover',
3809 topDragStart: 'dragstart',
3810 topDrop: 'drop',
3811 topDurationChange: 'durationchange',
3812 topEmptied: 'emptied',
3813 topEncrypted: 'encrypted',
3814 topEnded: 'ended',
3815 topError: 'error',
3816 topFocus: 'focus',
3817 topInput: 'input',
3818 topKeyDown: 'keydown',
3819 topKeyPress: 'keypress',
3820 topKeyUp: 'keyup',
3821 topLoadedData: 'loadeddata',
3822 topLoadedMetadata: 'loadedmetadata',
3823 topLoadStart: 'loadstart',
3824 topMouseDown: 'mousedown',
3825 topMouseMove: 'mousemove',
3826 topMouseOut: 'mouseout',
3827 topMouseOver: 'mouseover',
3828 topMouseUp: 'mouseup',
3829 topPaste: 'paste',
3830 topPause: 'pause',
3831 topPlay: 'play',
3832 topPlaying: 'playing',
3833 topProgress: 'progress',
3834 topRateChange: 'ratechange',
3835 topScroll: 'scroll',
3836 topSeeked: 'seeked',
3837 topSeeking: 'seeking',
3838 topSelectionChange: 'selectionchange',
3839 topStalled: 'stalled',
3840 topSuspend: 'suspend',
3841 topTextInput: 'textInput',
3842 topTimeUpdate: 'timeupdate',
3843 topTouchCancel: 'touchcancel',
3844 topTouchEnd: 'touchend',
3845 topTouchMove: 'touchmove',
3846 topTouchStart: 'touchstart',
3847 topVolumeChange: 'volumechange',
3848 topWaiting: 'waiting',
3849 topWheel: 'wheel'
3850 };
3851
3852 /**
3853 * To ensure no conflicts with other potential React instances on the page
3854 */
3855 var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
3856
3857 function getListeningForDocument(mountAt) {
3858 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
3859 // directly.
3860 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
3861 mountAt[topListenersIDKey] = reactTopListenersCounter++;
3862 alreadyListeningTo[mountAt[topListenersIDKey]] = {};
3863 }
3864 return alreadyListeningTo[mountAt[topListenersIDKey]];
3865 }
3866
3867 /**
3868 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
3869 * example:
3870 *
3871 * ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction);
3872 *
3873 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
3874 *
3875 * @internal
3876 */
3877 var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
3878
3879 /**
3880 * Injectable event backend
3881 */
3882 ReactEventListener: null,
3883
3884 injection: {
3885 /**
3886 * @param {object} ReactEventListener
3887 */
3888 injectReactEventListener: function (ReactEventListener) {
3889 ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
3890 ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
3891 }
3892 },
3893
3894 /**
3895 * Sets whether or not any created callbacks should be enabled.
3896 *
3897 * @param {boolean} enabled True if callbacks should be enabled.
3898 */
3899 setEnabled: function (enabled) {
3900 if (ReactBrowserEventEmitter.ReactEventListener) {
3901 ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
3902 }
3903 },
3904
3905 /**
3906 * @return {boolean} True if callbacks are enabled.
3907 */
3908 isEnabled: function () {
3909 return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
3910 },
3911
3912 /**
3913 * We listen for bubbled touch events on the document object.
3914 *
3915 * Firefox v8.01 (and possibly others) exhibited strange behavior when
3916 * mounting `onmousemove` events at some node that was not the document
3917 * element. The symptoms were that if your mouse is not moving over something
3918 * contained within that mount point (for example on the background) the
3919 * top-level listeners for `onmousemove` won't be called. However, if you
3920 * register the `mousemove` on the document object, then it will of course
3921 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
3922 * top-level listeners to the document object only, at least for these
3923 * movement types of events and possibly all events.
3924 *
3925 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
3926 *
3927 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
3928 * they bubble to document.
3929 *
3930 * @param {string} registrationName Name of listener (e.g. `onClick`).
3931 * @param {object} contentDocumentHandle Document which owns the container
3932 */
3933 listenTo: function (registrationName, contentDocumentHandle) {
3934 var mountAt = contentDocumentHandle;
3935 var isListening = getListeningForDocument(mountAt);
3936 var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
3937
3938 var topLevelTypes = EventConstants.topLevelTypes;
3939 for (var i = 0; i < dependencies.length; i++) {
3940 var dependency = dependencies[i];
3941 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
3942 if (dependency === topLevelTypes.topWheel) {
3943 if (isEventSupported('wheel')) {
3944 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
3945 } else if (isEventSupported('mousewheel')) {
3946 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
3947 } else {
3948 // Firefox needs to capture a different mouse scroll event.
3949 // @see http://www.quirksmode.org/dom/events/tests/scroll.html
3950 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
3951 }
3952 } else if (dependency === topLevelTypes.topScroll) {
3953
3954 if (isEventSupported('scroll', true)) {
3955 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
3956 } else {
3957 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
3958 }
3959 } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
3960
3961 if (isEventSupported('focus', true)) {
3962 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
3963 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
3964 } else if (isEventSupported('focusin')) {
3965 // IE has `focusin` and `focusout` events which bubble.
3966 // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
3967 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
3968 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
3969 }
3970
3971 // to make sure blur and focus event listeners are only attached once
3972 isListening[topLevelTypes.topBlur] = true;
3973 isListening[topLevelTypes.topFocus] = true;
3974 } else if (topEventMapping.hasOwnProperty(dependency)) {
3975 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
3976 }
3977
3978 isListening[dependency] = true;
3979 }
3980 }
3981 },
3982
3983 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
3984 return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
3985 },
3986
3987 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
3988 return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
3989 },
3990
3991 /**
3992 * Listens to window scroll and resize events. We cache scroll values so that
3993 * application code can access them without triggering reflows.
3994 *
3995 * NOTE: Scroll events do not bubble.
3996 *
3997 * @see http://www.quirksmode.org/dom/events/scroll.html
3998 */
3999 ensureScrollValueMonitoring: function () {
4000 if (!isMonitoringScrollValue) {
4001 var refresh = ViewportMetrics.refreshScrollValues;
4002 ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
4003 isMonitoringScrollValue = true;
4004 }
4005 },
4006
4007 eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,
4008
4009 registrationNameModules: EventPluginHub.registrationNameModules,
4010
4011 putListener: EventPluginHub.putListener,
4012
4013 getListener: EventPluginHub.getListener,
4014
4015 deleteListener: EventPluginHub.deleteListener,
4016
4017 deleteAllListeners: EventPluginHub.deleteAllListeners
4018
4019 });
4020
4021 ReactPerf.measureMethods(ReactBrowserEventEmitter, 'ReactBrowserEventEmitter', {
4022 putListener: 'putListener',
4023 deleteListener: 'deleteListener'
4024 });
4025
4026 module.exports = ReactBrowserEventEmitter;
4027
4028/***/ }),
4029/* 31 */
4030/***/ (function(module, exports, __webpack_require__) {
4031
4032 /**
4033 * Copyright 2013-2015, Facebook, Inc.
4034 * All rights reserved.
4035 *
4036 * This source code is licensed under the BSD-style license found in the
4037 * LICENSE file in the root directory of this source tree. An additional grant
4038 * of patent rights can be found in the PATENTS file in the same directory.
4039 *
4040 * @providesModule EventConstants
4041 */
4042
4043 'use strict';
4044
4045 var keyMirror = __webpack_require__(18);
4046
4047 var PropagationPhases = keyMirror({ bubbled: null, captured: null });
4048
4049 /**
4050 * Types of raw signals from the browser caught at the top level.
4051 */
4052 var topLevelTypes = keyMirror({
4053 topAbort: null,
4054 topBlur: null,
4055 topCanPlay: null,
4056 topCanPlayThrough: null,
4057 topChange: null,
4058 topClick: null,
4059 topCompositionEnd: null,
4060 topCompositionStart: null,
4061 topCompositionUpdate: null,
4062 topContextMenu: null,
4063 topCopy: null,
4064 topCut: null,
4065 topDoubleClick: null,
4066 topDrag: null,
4067 topDragEnd: null,
4068 topDragEnter: null,
4069 topDragExit: null,
4070 topDragLeave: null,
4071 topDragOver: null,
4072 topDragStart: null,
4073 topDrop: null,
4074 topDurationChange: null,
4075 topEmptied: null,
4076 topEncrypted: null,
4077 topEnded: null,
4078 topError: null,
4079 topFocus: null,
4080 topInput: null,
4081 topKeyDown: null,
4082 topKeyPress: null,
4083 topKeyUp: null,
4084 topLoad: null,
4085 topLoadedData: null,
4086 topLoadedMetadata: null,
4087 topLoadStart: null,
4088 topMouseDown: null,
4089 topMouseMove: null,
4090 topMouseOut: null,
4091 topMouseOver: null,
4092 topMouseUp: null,
4093 topPaste: null,
4094 topPause: null,
4095 topPlay: null,
4096 topPlaying: null,
4097 topProgress: null,
4098 topRateChange: null,
4099 topReset: null,
4100 topScroll: null,
4101 topSeeked: null,
4102 topSeeking: null,
4103 topSelectionChange: null,
4104 topStalled: null,
4105 topSubmit: null,
4106 topSuspend: null,
4107 topTextInput: null,
4108 topTimeUpdate: null,
4109 topTouchCancel: null,
4110 topTouchEnd: null,
4111 topTouchMove: null,
4112 topTouchStart: null,
4113 topVolumeChange: null,
4114 topWaiting: null,
4115 topWheel: null
4116 });
4117
4118 var EventConstants = {
4119 topLevelTypes: topLevelTypes,
4120 PropagationPhases: PropagationPhases
4121 };
4122
4123 module.exports = EventConstants;
4124
4125/***/ }),
4126/* 32 */
4127/***/ (function(module, exports, __webpack_require__) {
4128
4129 /* WEBPACK VAR INJECTION */(function(process) {/**
4130 * Copyright 2013-2015, Facebook, Inc.
4131 * All rights reserved.
4132 *
4133 * This source code is licensed under the BSD-style license found in the
4134 * LICENSE file in the root directory of this source tree. An additional grant
4135 * of patent rights can be found in the PATENTS file in the same directory.
4136 *
4137 * @providesModule EventPluginHub
4138 */
4139
4140 'use strict';
4141
4142 var EventPluginRegistry = __webpack_require__(33);
4143 var EventPluginUtils = __webpack_require__(34);
4144 var ReactErrorUtils = __webpack_require__(35);
4145
4146 var accumulateInto = __webpack_require__(36);
4147 var forEachAccumulated = __webpack_require__(37);
4148 var invariant = __webpack_require__(14);
4149 var warning = __webpack_require__(26);
4150
4151 /**
4152 * Internal store for event listeners
4153 */
4154 var listenerBank = {};
4155
4156 /**
4157 * Internal queue of events that have accumulated their dispatches and are
4158 * waiting to have their dispatches executed.
4159 */
4160 var eventQueue = null;
4161
4162 /**
4163 * Dispatches an event and releases it back into the pool, unless persistent.
4164 *
4165 * @param {?object} event Synthetic event to be dispatched.
4166 * @param {boolean} simulated If the event is simulated (changes exn behavior)
4167 * @private
4168 */
4169 var executeDispatchesAndRelease = function (event, simulated) {
4170 if (event) {
4171 EventPluginUtils.executeDispatchesInOrder(event, simulated);
4172
4173 if (!event.isPersistent()) {
4174 event.constructor.release(event);
4175 }
4176 }
4177 };
4178 var executeDispatchesAndReleaseSimulated = function (e) {
4179 return executeDispatchesAndRelease(e, true);
4180 };
4181 var executeDispatchesAndReleaseTopLevel = function (e) {
4182 return executeDispatchesAndRelease(e, false);
4183 };
4184
4185 /**
4186 * - `InstanceHandle`: [required] Module that performs logical traversals of DOM
4187 * hierarchy given ids of the logical DOM elements involved.
4188 */
4189 var InstanceHandle = null;
4190
4191 function validateInstanceHandle() {
4192 var valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave;
4193 process.env.NODE_ENV !== 'production' ? warning(valid, 'InstanceHandle not injected before use!') : undefined;
4194 }
4195
4196 /**
4197 * This is a unified interface for event plugins to be installed and configured.
4198 *
4199 * Event plugins can implement the following properties:
4200 *
4201 * `extractEvents` {function(string, DOMEventTarget, string, object): *}
4202 * Required. When a top-level event is fired, this method is expected to
4203 * extract synthetic events that will in turn be queued and dispatched.
4204 *
4205 * `eventTypes` {object}
4206 * Optional, plugins that fire events must publish a mapping of registration
4207 * names that are used to register listeners. Values of this mapping must
4208 * be objects that contain `registrationName` or `phasedRegistrationNames`.
4209 *
4210 * `executeDispatch` {function(object, function, string)}
4211 * Optional, allows plugins to override how an event gets dispatched. By
4212 * default, the listener is simply invoked.
4213 *
4214 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
4215 *
4216 * @public
4217 */
4218 var EventPluginHub = {
4219
4220 /**
4221 * Methods for injecting dependencies.
4222 */
4223 injection: {
4224
4225 /**
4226 * @param {object} InjectedMount
4227 * @public
4228 */
4229 injectMount: EventPluginUtils.injection.injectMount,
4230
4231 /**
4232 * @param {object} InjectedInstanceHandle
4233 * @public
4234 */
4235 injectInstanceHandle: function (InjectedInstanceHandle) {
4236 InstanceHandle = InjectedInstanceHandle;
4237 if (process.env.NODE_ENV !== 'production') {
4238 validateInstanceHandle();
4239 }
4240 },
4241
4242 getInstanceHandle: function () {
4243 if (process.env.NODE_ENV !== 'production') {
4244 validateInstanceHandle();
4245 }
4246 return InstanceHandle;
4247 },
4248
4249 /**
4250 * @param {array} InjectedEventPluginOrder
4251 * @public
4252 */
4253 injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
4254
4255 /**
4256 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
4257 */
4258 injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
4259
4260 },
4261
4262 eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,
4263
4264 registrationNameModules: EventPluginRegistry.registrationNameModules,
4265
4266 /**
4267 * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.
4268 *
4269 * @param {string} id ID of the DOM element.
4270 * @param {string} registrationName Name of listener (e.g. `onClick`).
4271 * @param {?function} listener The callback to store.
4272 */
4273 putListener: function (id, registrationName, listener) {
4274 !(typeof listener === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : undefined;
4275
4276 var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
4277 bankForRegistrationName[id] = listener;
4278
4279 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4280 if (PluginModule && PluginModule.didPutListener) {
4281 PluginModule.didPutListener(id, registrationName, listener);
4282 }
4283 },
4284
4285 /**
4286 * @param {string} id ID of the DOM element.
4287 * @param {string} registrationName Name of listener (e.g. `onClick`).
4288 * @return {?function} The stored callback.
4289 */
4290 getListener: function (id, registrationName) {
4291 var bankForRegistrationName = listenerBank[registrationName];
4292 return bankForRegistrationName && bankForRegistrationName[id];
4293 },
4294
4295 /**
4296 * Deletes a listener from the registration bank.
4297 *
4298 * @param {string} id ID of the DOM element.
4299 * @param {string} registrationName Name of listener (e.g. `onClick`).
4300 */
4301 deleteListener: function (id, registrationName) {
4302 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4303 if (PluginModule && PluginModule.willDeleteListener) {
4304 PluginModule.willDeleteListener(id, registrationName);
4305 }
4306
4307 var bankForRegistrationName = listenerBank[registrationName];
4308 // TODO: This should never be null -- when is it?
4309 if (bankForRegistrationName) {
4310 delete bankForRegistrationName[id];
4311 }
4312 },
4313
4314 /**
4315 * Deletes all listeners for the DOM element with the supplied ID.
4316 *
4317 * @param {string} id ID of the DOM element.
4318 */
4319 deleteAllListeners: function (id) {
4320 for (var registrationName in listenerBank) {
4321 if (!listenerBank[registrationName][id]) {
4322 continue;
4323 }
4324
4325 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
4326 if (PluginModule && PluginModule.willDeleteListener) {
4327 PluginModule.willDeleteListener(id, registrationName);
4328 }
4329
4330 delete listenerBank[registrationName][id];
4331 }
4332 },
4333
4334 /**
4335 * Allows registered plugins an opportunity to extract events from top-level
4336 * native browser events.
4337 *
4338 * @param {string} topLevelType Record from `EventConstants`.
4339 * @param {DOMEventTarget} topLevelTarget The listening component root node.
4340 * @param {string} topLevelTargetID ID of `topLevelTarget`.
4341 * @param {object} nativeEvent Native browser event.
4342 * @return {*} An accumulation of synthetic events.
4343 * @internal
4344 */
4345 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
4346 var events;
4347 var plugins = EventPluginRegistry.plugins;
4348 for (var i = 0; i < plugins.length; i++) {
4349 // Not every plugin in the ordering may be loaded at runtime.
4350 var possiblePlugin = plugins[i];
4351 if (possiblePlugin) {
4352 var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget);
4353 if (extractedEvents) {
4354 events = accumulateInto(events, extractedEvents);
4355 }
4356 }
4357 }
4358 return events;
4359 },
4360
4361 /**
4362 * Enqueues a synthetic event that should be dispatched when
4363 * `processEventQueue` is invoked.
4364 *
4365 * @param {*} events An accumulation of synthetic events.
4366 * @internal
4367 */
4368 enqueueEvents: function (events) {
4369 if (events) {
4370 eventQueue = accumulateInto(eventQueue, events);
4371 }
4372 },
4373
4374 /**
4375 * Dispatches all synthetic events on the event queue.
4376 *
4377 * @internal
4378 */
4379 processEventQueue: function (simulated) {
4380 // Set `eventQueue` to null before processing it so that we can tell if more
4381 // events get enqueued while processing.
4382 var processingEventQueue = eventQueue;
4383 eventQueue = null;
4384 if (simulated) {
4385 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
4386 } else {
4387 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
4388 }
4389 !!eventQueue ? process.env.NODE_ENV !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : undefined;
4390 // This would be a good time to rethrow if any of the event handlers threw.
4391 ReactErrorUtils.rethrowCaughtError();
4392 },
4393
4394 /**
4395 * These are needed for tests only. Do not use!
4396 */
4397 __purge: function () {
4398 listenerBank = {};
4399 },
4400
4401 __getListenerBank: function () {
4402 return listenerBank;
4403 }
4404
4405 };
4406
4407 module.exports = EventPluginHub;
4408 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4409
4410/***/ }),
4411/* 33 */
4412/***/ (function(module, exports, __webpack_require__) {
4413
4414 /* WEBPACK VAR INJECTION */(function(process) {/**
4415 * Copyright 2013-2015, Facebook, Inc.
4416 * All rights reserved.
4417 *
4418 * This source code is licensed under the BSD-style license found in the
4419 * LICENSE file in the root directory of this source tree. An additional grant
4420 * of patent rights can be found in the PATENTS file in the same directory.
4421 *
4422 * @providesModule EventPluginRegistry
4423 * @typechecks static-only
4424 */
4425
4426 'use strict';
4427
4428 var invariant = __webpack_require__(14);
4429
4430 /**
4431 * Injectable ordering of event plugins.
4432 */
4433 var EventPluginOrder = null;
4434
4435 /**
4436 * Injectable mapping from names to event plugin modules.
4437 */
4438 var namesToPlugins = {};
4439
4440 /**
4441 * Recomputes the plugin list using the injected plugins and plugin ordering.
4442 *
4443 * @private
4444 */
4445 function recomputePluginOrdering() {
4446 if (!EventPluginOrder) {
4447 // Wait until an `EventPluginOrder` is injected.
4448 return;
4449 }
4450 for (var pluginName in namesToPlugins) {
4451 var PluginModule = namesToPlugins[pluginName];
4452 var pluginIndex = EventPluginOrder.indexOf(pluginName);
4453 !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : undefined;
4454 if (EventPluginRegistry.plugins[pluginIndex]) {
4455 continue;
4456 }
4457 !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : undefined;
4458 EventPluginRegistry.plugins[pluginIndex] = PluginModule;
4459 var publishedEvents = PluginModule.eventTypes;
4460 for (var eventName in publishedEvents) {
4461 !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : undefined;
4462 }
4463 }
4464 }
4465
4466 /**
4467 * Publishes an event so that it can be dispatched by the supplied plugin.
4468 *
4469 * @param {object} dispatchConfig Dispatch configuration for the event.
4470 * @param {object} PluginModule Plugin publishing the event.
4471 * @return {boolean} True if the event was successfully published.
4472 * @private
4473 */
4474 function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
4475 !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : undefined;
4476 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
4477
4478 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
4479 if (phasedRegistrationNames) {
4480 for (var phaseName in phasedRegistrationNames) {
4481 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
4482 var phasedRegistrationName = phasedRegistrationNames[phaseName];
4483 publishRegistrationName(phasedRegistrationName, PluginModule, eventName);
4484 }
4485 }
4486 return true;
4487 } else if (dispatchConfig.registrationName) {
4488 publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName);
4489 return true;
4490 }
4491 return false;
4492 }
4493
4494 /**
4495 * Publishes a registration name that is used to identify dispatched events and
4496 * can be used with `EventPluginHub.putListener` to register listeners.
4497 *
4498 * @param {string} registrationName Registration name to add.
4499 * @param {object} PluginModule Plugin publishing the event.
4500 * @private
4501 */
4502 function publishRegistrationName(registrationName, PluginModule, eventName) {
4503 !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : undefined;
4504 EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
4505 EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
4506 }
4507
4508 /**
4509 * Registers plugins so that they can extract and dispatch events.
4510 *
4511 * @see {EventPluginHub}
4512 */
4513 var EventPluginRegistry = {
4514
4515 /**
4516 * Ordered list of injected plugins.
4517 */
4518 plugins: [],
4519
4520 /**
4521 * Mapping from event name to dispatch config
4522 */
4523 eventNameDispatchConfigs: {},
4524
4525 /**
4526 * Mapping from registration name to plugin module
4527 */
4528 registrationNameModules: {},
4529
4530 /**
4531 * Mapping from registration name to event name
4532 */
4533 registrationNameDependencies: {},
4534
4535 /**
4536 * Injects an ordering of plugins (by plugin name). This allows the ordering
4537 * to be decoupled from injection of the actual plugins so that ordering is
4538 * always deterministic regardless of packaging, on-the-fly injection, etc.
4539 *
4540 * @param {array} InjectedEventPluginOrder
4541 * @internal
4542 * @see {EventPluginHub.injection.injectEventPluginOrder}
4543 */
4544 injectEventPluginOrder: function (InjectedEventPluginOrder) {
4545 !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : undefined;
4546 // Clone the ordering so it cannot be dynamically mutated.
4547 EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
4548 recomputePluginOrdering();
4549 },
4550
4551 /**
4552 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
4553 * in the ordering injected by `injectEventPluginOrder`.
4554 *
4555 * Plugins can be injected as part of page initialization or on-the-fly.
4556 *
4557 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
4558 * @internal
4559 * @see {EventPluginHub.injection.injectEventPluginsByName}
4560 */
4561 injectEventPluginsByName: function (injectedNamesToPlugins) {
4562 var isOrderingDirty = false;
4563 for (var pluginName in injectedNamesToPlugins) {
4564 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
4565 continue;
4566 }
4567 var PluginModule = injectedNamesToPlugins[pluginName];
4568 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
4569 !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : undefined;
4570 namesToPlugins[pluginName] = PluginModule;
4571 isOrderingDirty = true;
4572 }
4573 }
4574 if (isOrderingDirty) {
4575 recomputePluginOrdering();
4576 }
4577 },
4578
4579 /**
4580 * Looks up the plugin for the supplied event.
4581 *
4582 * @param {object} event A synthetic event.
4583 * @return {?object} The plugin that created the supplied event.
4584 * @internal
4585 */
4586 getPluginModuleForEvent: function (event) {
4587 var dispatchConfig = event.dispatchConfig;
4588 if (dispatchConfig.registrationName) {
4589 return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
4590 }
4591 for (var phase in dispatchConfig.phasedRegistrationNames) {
4592 if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
4593 continue;
4594 }
4595 var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];
4596 if (PluginModule) {
4597 return PluginModule;
4598 }
4599 }
4600 return null;
4601 },
4602
4603 /**
4604 * Exposed for unit testing.
4605 * @private
4606 */
4607 _resetEventPlugins: function () {
4608 EventPluginOrder = null;
4609 for (var pluginName in namesToPlugins) {
4610 if (namesToPlugins.hasOwnProperty(pluginName)) {
4611 delete namesToPlugins[pluginName];
4612 }
4613 }
4614 EventPluginRegistry.plugins.length = 0;
4615
4616 var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
4617 for (var eventName in eventNameDispatchConfigs) {
4618 if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
4619 delete eventNameDispatchConfigs[eventName];
4620 }
4621 }
4622
4623 var registrationNameModules = EventPluginRegistry.registrationNameModules;
4624 for (var registrationName in registrationNameModules) {
4625 if (registrationNameModules.hasOwnProperty(registrationName)) {
4626 delete registrationNameModules[registrationName];
4627 }
4628 }
4629 }
4630
4631 };
4632
4633 module.exports = EventPluginRegistry;
4634 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4635
4636/***/ }),
4637/* 34 */
4638/***/ (function(module, exports, __webpack_require__) {
4639
4640 /* WEBPACK VAR INJECTION */(function(process) {/**
4641 * Copyright 2013-2015, Facebook, Inc.
4642 * All rights reserved.
4643 *
4644 * This source code is licensed under the BSD-style license found in the
4645 * LICENSE file in the root directory of this source tree. An additional grant
4646 * of patent rights can be found in the PATENTS file in the same directory.
4647 *
4648 * @providesModule EventPluginUtils
4649 */
4650
4651 'use strict';
4652
4653 var EventConstants = __webpack_require__(31);
4654 var ReactErrorUtils = __webpack_require__(35);
4655
4656 var invariant = __webpack_require__(14);
4657 var warning = __webpack_require__(26);
4658
4659 /**
4660 * Injected dependencies:
4661 */
4662
4663 /**
4664 * - `Mount`: [required] Module that can convert between React dom IDs and
4665 * actual node references.
4666 */
4667 var injection = {
4668 Mount: null,
4669 injectMount: function (InjectedMount) {
4670 injection.Mount = InjectedMount;
4671 if (process.env.NODE_ENV !== 'production') {
4672 process.env.NODE_ENV !== 'production' ? warning(InjectedMount && InjectedMount.getNode && InjectedMount.getID, 'EventPluginUtils.injection.injectMount(...): Injected Mount ' + 'module is missing getNode or getID.') : undefined;
4673 }
4674 }
4675 };
4676
4677 var topLevelTypes = EventConstants.topLevelTypes;
4678
4679 function isEndish(topLevelType) {
4680 return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
4681 }
4682
4683 function isMoveish(topLevelType) {
4684 return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove;
4685 }
4686 function isStartish(topLevelType) {
4687 return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart;
4688 }
4689
4690 var validateEventDispatches;
4691 if (process.env.NODE_ENV !== 'production') {
4692 validateEventDispatches = function (event) {
4693 var dispatchListeners = event._dispatchListeners;
4694 var dispatchIDs = event._dispatchIDs;
4695
4696 var listenersIsArr = Array.isArray(dispatchListeners);
4697 var idsIsArr = Array.isArray(dispatchIDs);
4698 var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;
4699 var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
4700
4701 process.env.NODE_ENV !== 'production' ? warning(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : undefined;
4702 };
4703 }
4704
4705 /**
4706 * Dispatch the event to the listener.
4707 * @param {SyntheticEvent} event SyntheticEvent to handle
4708 * @param {boolean} simulated If the event is simulated (changes exn behavior)
4709 * @param {function} listener Application-level callback
4710 * @param {string} domID DOM id to pass to the callback.
4711 */
4712 function executeDispatch(event, simulated, listener, domID) {
4713 var type = event.type || 'unknown-event';
4714 event.currentTarget = injection.Mount.getNode(domID);
4715 if (simulated) {
4716 ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event, domID);
4717 } else {
4718 ReactErrorUtils.invokeGuardedCallback(type, listener, event, domID);
4719 }
4720 event.currentTarget = null;
4721 }
4722
4723 /**
4724 * Standard/simple iteration through an event's collected dispatches.
4725 */
4726 function executeDispatchesInOrder(event, simulated) {
4727 var dispatchListeners = event._dispatchListeners;
4728 var dispatchIDs = event._dispatchIDs;
4729 if (process.env.NODE_ENV !== 'production') {
4730 validateEventDispatches(event);
4731 }
4732 if (Array.isArray(dispatchListeners)) {
4733 for (var i = 0; i < dispatchListeners.length; i++) {
4734 if (event.isPropagationStopped()) {
4735 break;
4736 }
4737 // Listeners and IDs are two parallel arrays that are always in sync.
4738 executeDispatch(event, simulated, dispatchListeners[i], dispatchIDs[i]);
4739 }
4740 } else if (dispatchListeners) {
4741 executeDispatch(event, simulated, dispatchListeners, dispatchIDs);
4742 }
4743 event._dispatchListeners = null;
4744 event._dispatchIDs = null;
4745 }
4746
4747 /**
4748 * Standard/simple iteration through an event's collected dispatches, but stops
4749 * at the first dispatch execution returning true, and returns that id.
4750 *
4751 * @return {?string} id of the first dispatch execution who's listener returns
4752 * true, or null if no listener returned true.
4753 */
4754 function executeDispatchesInOrderStopAtTrueImpl(event) {
4755 var dispatchListeners = event._dispatchListeners;
4756 var dispatchIDs = event._dispatchIDs;
4757 if (process.env.NODE_ENV !== 'production') {
4758 validateEventDispatches(event);
4759 }
4760 if (Array.isArray(dispatchListeners)) {
4761 for (var i = 0; i < dispatchListeners.length; i++) {
4762 if (event.isPropagationStopped()) {
4763 break;
4764 }
4765 // Listeners and IDs are two parallel arrays that are always in sync.
4766 if (dispatchListeners[i](event, dispatchIDs[i])) {
4767 return dispatchIDs[i];
4768 }
4769 }
4770 } else if (dispatchListeners) {
4771 if (dispatchListeners(event, dispatchIDs)) {
4772 return dispatchIDs;
4773 }
4774 }
4775 return null;
4776 }
4777
4778 /**
4779 * @see executeDispatchesInOrderStopAtTrueImpl
4780 */
4781 function executeDispatchesInOrderStopAtTrue(event) {
4782 var ret = executeDispatchesInOrderStopAtTrueImpl(event);
4783 event._dispatchIDs = null;
4784 event._dispatchListeners = null;
4785 return ret;
4786 }
4787
4788 /**
4789 * Execution of a "direct" dispatch - there must be at most one dispatch
4790 * accumulated on the event or it is considered an error. It doesn't really make
4791 * sense for an event with multiple dispatches (bubbled) to keep track of the
4792 * return values at each dispatch execution, but it does tend to make sense when
4793 * dealing with "direct" dispatches.
4794 *
4795 * @return {*} The return value of executing the single dispatch.
4796 */
4797 function executeDirectDispatch(event) {
4798 if (process.env.NODE_ENV !== 'production') {
4799 validateEventDispatches(event);
4800 }
4801 var dispatchListener = event._dispatchListeners;
4802 var dispatchID = event._dispatchIDs;
4803 !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : undefined;
4804 var res = dispatchListener ? dispatchListener(event, dispatchID) : null;
4805 event._dispatchListeners = null;
4806 event._dispatchIDs = null;
4807 return res;
4808 }
4809
4810 /**
4811 * @param {SyntheticEvent} event
4812 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
4813 */
4814 function hasDispatches(event) {
4815 return !!event._dispatchListeners;
4816 }
4817
4818 /**
4819 * General utilities that are useful in creating custom Event Plugins.
4820 */
4821 var EventPluginUtils = {
4822 isEndish: isEndish,
4823 isMoveish: isMoveish,
4824 isStartish: isStartish,
4825
4826 executeDirectDispatch: executeDirectDispatch,
4827 executeDispatchesInOrder: executeDispatchesInOrder,
4828 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
4829 hasDispatches: hasDispatches,
4830
4831 getNode: function (id) {
4832 return injection.Mount.getNode(id);
4833 },
4834 getID: function (node) {
4835 return injection.Mount.getID(node);
4836 },
4837
4838 injection: injection
4839 };
4840
4841 module.exports = EventPluginUtils;
4842 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4843
4844/***/ }),
4845/* 35 */
4846/***/ (function(module, exports, __webpack_require__) {
4847
4848 /* WEBPACK VAR INJECTION */(function(process) {/**
4849 * Copyright 2013-2015, Facebook, Inc.
4850 * All rights reserved.
4851 *
4852 * This source code is licensed under the BSD-style license found in the
4853 * LICENSE file in the root directory of this source tree. An additional grant
4854 * of patent rights can be found in the PATENTS file in the same directory.
4855 *
4856 * @providesModule ReactErrorUtils
4857 * @typechecks
4858 */
4859
4860 'use strict';
4861
4862 var caughtError = null;
4863
4864 /**
4865 * Call a function while guarding against errors that happens within it.
4866 *
4867 * @param {?String} name of the guard to use for logging or debugging
4868 * @param {Function} func The function to invoke
4869 * @param {*} a First argument
4870 * @param {*} b Second argument
4871 */
4872 function invokeGuardedCallback(name, func, a, b) {
4873 try {
4874 return func(a, b);
4875 } catch (x) {
4876 if (caughtError === null) {
4877 caughtError = x;
4878 }
4879 return undefined;
4880 }
4881 }
4882
4883 var ReactErrorUtils = {
4884 invokeGuardedCallback: invokeGuardedCallback,
4885
4886 /**
4887 * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
4888 * handler are sure to be rethrown by rethrowCaughtError.
4889 */
4890 invokeGuardedCallbackWithCatch: invokeGuardedCallback,
4891
4892 /**
4893 * During execution of guarded functions we will capture the first error which
4894 * we will rethrow to be handled by the top level error handler.
4895 */
4896 rethrowCaughtError: function () {
4897 if (caughtError) {
4898 var error = caughtError;
4899 caughtError = null;
4900 throw error;
4901 }
4902 }
4903 };
4904
4905 if (process.env.NODE_ENV !== 'production') {
4906 /**
4907 * To help development we can get better devtools integration by simulating a
4908 * real browser event.
4909 */
4910 if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
4911 var fakeNode = document.createElement('react');
4912 ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) {
4913 var boundFunc = func.bind(null, a, b);
4914 var evtType = 'react-' + name;
4915 fakeNode.addEventListener(evtType, boundFunc, false);
4916 var evt = document.createEvent('Event');
4917 evt.initEvent(evtType, false, false);
4918 fakeNode.dispatchEvent(evt);
4919 fakeNode.removeEventListener(evtType, boundFunc, false);
4920 };
4921 }
4922 }
4923
4924 module.exports = ReactErrorUtils;
4925 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4926
4927/***/ }),
4928/* 36 */
4929/***/ (function(module, exports, __webpack_require__) {
4930
4931 /* WEBPACK VAR INJECTION */(function(process) {/**
4932 * Copyright 2014-2015, Facebook, Inc.
4933 * All rights reserved.
4934 *
4935 * This source code is licensed under the BSD-style license found in the
4936 * LICENSE file in the root directory of this source tree. An additional grant
4937 * of patent rights can be found in the PATENTS file in the same directory.
4938 *
4939 * @providesModule accumulateInto
4940 */
4941
4942 'use strict';
4943
4944 var invariant = __webpack_require__(14);
4945
4946 /**
4947 *
4948 * Accumulates items that must not be null or undefined into the first one. This
4949 * is used to conserve memory by avoiding array allocations, and thus sacrifices
4950 * API cleanness. Since `current` can be null before being passed in and not
4951 * null after this function, make sure to assign it back to `current`:
4952 *
4953 * `a = accumulateInto(a, b);`
4954 *
4955 * This API should be sparingly used. Try `accumulate` for something cleaner.
4956 *
4957 * @return {*|array<*>} An accumulation of items.
4958 */
4959
4960 function accumulateInto(current, next) {
4961 !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : undefined;
4962 if (current == null) {
4963 return next;
4964 }
4965
4966 // Both are not empty. Warning: Never call x.concat(y) when you are not
4967 // certain that x is an Array (x could be a string with concat method).
4968 var currentIsArray = Array.isArray(current);
4969 var nextIsArray = Array.isArray(next);
4970
4971 if (currentIsArray && nextIsArray) {
4972 current.push.apply(current, next);
4973 return current;
4974 }
4975
4976 if (currentIsArray) {
4977 current.push(next);
4978 return current;
4979 }
4980
4981 if (nextIsArray) {
4982 // A bit too dangerous to mutate `next`.
4983 return [current].concat(next);
4984 }
4985
4986 return [current, next];
4987 }
4988
4989 module.exports = accumulateInto;
4990 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
4991
4992/***/ }),
4993/* 37 */
4994/***/ (function(module, exports) {
4995
4996 /**
4997 * Copyright 2013-2015, Facebook, Inc.
4998 * All rights reserved.
4999 *
5000 * This source code is licensed under the BSD-style license found in the
5001 * LICENSE file in the root directory of this source tree. An additional grant
5002 * of patent rights can be found in the PATENTS file in the same directory.
5003 *
5004 * @providesModule forEachAccumulated
5005 */
5006
5007 'use strict';
5008
5009 /**
5010 * @param {array} arr an "accumulation" of items which is either an Array or
5011 * a single item. Useful when paired with the `accumulate` module. This is a
5012 * simple utility that allows us to reason about a collection of items, but
5013 * handling the case when there is exactly one item (and we do not need to
5014 * allocate an array).
5015 */
5016 var forEachAccumulated = function (arr, cb, scope) {
5017 if (Array.isArray(arr)) {
5018 arr.forEach(cb, scope);
5019 } else if (arr) {
5020 cb.call(scope, arr);
5021 }
5022 };
5023
5024 module.exports = forEachAccumulated;
5025
5026/***/ }),
5027/* 38 */
5028/***/ (function(module, exports, __webpack_require__) {
5029
5030 /**
5031 * Copyright 2013-2015, Facebook, Inc.
5032 * All rights reserved.
5033 *
5034 * This source code is licensed under the BSD-style license found in the
5035 * LICENSE file in the root directory of this source tree. An additional grant
5036 * of patent rights can be found in the PATENTS file in the same directory.
5037 *
5038 * @providesModule ReactEventEmitterMixin
5039 */
5040
5041 'use strict';
5042
5043 var EventPluginHub = __webpack_require__(32);
5044
5045 function runEventQueueInBatch(events) {
5046 EventPluginHub.enqueueEvents(events);
5047 EventPluginHub.processEventQueue(false);
5048 }
5049
5050 var ReactEventEmitterMixin = {
5051
5052 /**
5053 * Streams a fired top-level event to `EventPluginHub` where plugins have the
5054 * opportunity to create `ReactEvent`s to be dispatched.
5055 *
5056 * @param {string} topLevelType Record from `EventConstants`.
5057 * @param {object} topLevelTarget The listening component root node.
5058 * @param {string} topLevelTargetID ID of `topLevelTarget`.
5059 * @param {object} nativeEvent Native environment event.
5060 */
5061 handleTopLevel: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
5062 var events = EventPluginHub.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget);
5063 runEventQueueInBatch(events);
5064 }
5065 };
5066
5067 module.exports = ReactEventEmitterMixin;
5068
5069/***/ }),
5070/* 39 */
5071/***/ (function(module, exports) {
5072
5073 /**
5074 * Copyright 2013-2015, Facebook, Inc.
5075 * All rights reserved.
5076 *
5077 * This source code is licensed under the BSD-style license found in the
5078 * LICENSE file in the root directory of this source tree. An additional grant
5079 * of patent rights can be found in the PATENTS file in the same directory.
5080 *
5081 * @providesModule ViewportMetrics
5082 */
5083
5084 'use strict';
5085
5086 var ViewportMetrics = {
5087
5088 currentScrollLeft: 0,
5089
5090 currentScrollTop: 0,
5091
5092 refreshScrollValues: function (scrollPosition) {
5093 ViewportMetrics.currentScrollLeft = scrollPosition.x;
5094 ViewportMetrics.currentScrollTop = scrollPosition.y;
5095 }
5096
5097 };
5098
5099 module.exports = ViewportMetrics;
5100
5101/***/ }),
5102/* 40 */
5103/***/ (function(module, exports) {
5104
5105 /**
5106 * Copyright 2014-2015, Facebook, Inc.
5107 * All rights reserved.
5108 *
5109 * This source code is licensed under the BSD-style license found in the
5110 * LICENSE file in the root directory of this source tree. An additional grant
5111 * of patent rights can be found in the PATENTS file in the same directory.
5112 *
5113 * @providesModule Object.assign
5114 */
5115
5116 // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
5117
5118 'use strict';
5119
5120 function assign(target, sources) {
5121 if (target == null) {
5122 throw new TypeError('Object.assign target cannot be null or undefined');
5123 }
5124
5125 var to = Object(target);
5126 var hasOwnProperty = Object.prototype.hasOwnProperty;
5127
5128 for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
5129 var nextSource = arguments[nextIndex];
5130 if (nextSource == null) {
5131 continue;
5132 }
5133
5134 var from = Object(nextSource);
5135
5136 // We don't currently support accessors nor proxies. Therefore this
5137 // copy cannot throw. If we ever supported this then we must handle
5138 // exceptions and side-effects. We don't support symbols so they won't
5139 // be transferred.
5140
5141 for (var key in from) {
5142 if (hasOwnProperty.call(from, key)) {
5143 to[key] = from[key];
5144 }
5145 }
5146 }
5147
5148 return to;
5149 }
5150
5151 module.exports = assign;
5152
5153/***/ }),
5154/* 41 */
5155/***/ (function(module, exports, __webpack_require__) {
5156
5157 /**
5158 * Copyright 2013-2015, Facebook, Inc.
5159 * All rights reserved.
5160 *
5161 * This source code is licensed under the BSD-style license found in the
5162 * LICENSE file in the root directory of this source tree. An additional grant
5163 * of patent rights can be found in the PATENTS file in the same directory.
5164 *
5165 * @providesModule isEventSupported
5166 */
5167
5168 'use strict';
5169
5170 var ExecutionEnvironment = __webpack_require__(10);
5171
5172 var useHasFeature;
5173 if (ExecutionEnvironment.canUseDOM) {
5174 useHasFeature = document.implementation && document.implementation.hasFeature &&
5175 // always returns true in newer browsers as per the standard.
5176 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
5177 document.implementation.hasFeature('', '') !== true;
5178 }
5179
5180 /**
5181 * Checks if an event is supported in the current execution environment.
5182 *
5183 * NOTE: This will not work correctly for non-generic events such as `change`,
5184 * `reset`, `load`, `error`, and `select`.
5185 *
5186 * Borrows from Modernizr.
5187 *
5188 * @param {string} eventNameSuffix Event name, e.g. "click".
5189 * @param {?boolean} capture Check if the capture phase is supported.
5190 * @return {boolean} True if the event is supported.
5191 * @internal
5192 * @license Modernizr 3.0.0pre (Custom Build) | MIT
5193 */
5194 function isEventSupported(eventNameSuffix, capture) {
5195 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
5196 return false;
5197 }
5198
5199 var eventName = 'on' + eventNameSuffix;
5200 var isSupported = (eventName in document);
5201
5202 if (!isSupported) {
5203 var element = document.createElement('div');
5204 element.setAttribute(eventName, 'return;');
5205 isSupported = typeof element[eventName] === 'function';
5206 }
5207
5208 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
5209 // This is the only way to test support for the `wheel` event in IE9+.
5210 isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
5211 }
5212
5213 return isSupported;
5214 }
5215
5216 module.exports = isEventSupported;
5217
5218/***/ }),
5219/* 42 */
5220/***/ (function(module, exports) {
5221
5222 /**
5223 * Copyright 2013-2015, Facebook, Inc.
5224 * All rights reserved.
5225 *
5226 * This source code is licensed under the BSD-style license found in the
5227 * LICENSE file in the root directory of this source tree. An additional grant
5228 * of patent rights can be found in the PATENTS file in the same directory.
5229 *
5230 * @providesModule ReactDOMFeatureFlags
5231 */
5232
5233 'use strict';
5234
5235 var ReactDOMFeatureFlags = {
5236 useCreateElement: false
5237 };
5238
5239 module.exports = ReactDOMFeatureFlags;
5240
5241/***/ }),
5242/* 43 */
5243/***/ (function(module, exports, __webpack_require__) {
5244
5245 /* WEBPACK VAR INJECTION */(function(process) {/**
5246 * Copyright 2014-2015, Facebook, Inc.
5247 * All rights reserved.
5248 *
5249 * This source code is licensed under the BSD-style license found in the
5250 * LICENSE file in the root directory of this source tree. An additional grant
5251 * of patent rights can be found in the PATENTS file in the same directory.
5252 *
5253 * @providesModule ReactElement
5254 */
5255
5256 'use strict';
5257
5258 var ReactCurrentOwner = __webpack_require__(6);
5259
5260 var assign = __webpack_require__(40);
5261 var canDefineProperty = __webpack_require__(44);
5262
5263 // The Symbol used to tag the ReactElement type. If there is no native Symbol
5264 // nor polyfill, then a plain number is used for performance.
5265 var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
5266
5267 var RESERVED_PROPS = {
5268 key: true,
5269 ref: true,
5270 __self: true,
5271 __source: true
5272 };
5273
5274 /**
5275 * Base constructor for all React elements. This is only used to make this
5276 * work with a dynamic instanceof check. Nothing should live on this prototype.
5277 *
5278 * @param {*} type
5279 * @param {*} key
5280 * @param {string|object} ref
5281 * @param {*} self A *temporary* helper to detect places where `this` is
5282 * different from the `owner` when React.createElement is called, so that we
5283 * can warn. We want to get rid of owner and replace string `ref`s with arrow
5284 * functions, and as long as `this` and owner are the same, there will be no
5285 * change in behavior.
5286 * @param {*} source An annotation object (added by a transpiler or otherwise)
5287 * indicating filename, line number, and/or other information.
5288 * @param {*} owner
5289 * @param {*} props
5290 * @internal
5291 */
5292 var ReactElement = function (type, key, ref, self, source, owner, props) {
5293 var element = {
5294 // This tag allow us to uniquely identify this as a React Element
5295 $$typeof: REACT_ELEMENT_TYPE,
5296
5297 // Built-in properties that belong on the element
5298 type: type,
5299 key: key,
5300 ref: ref,
5301 props: props,
5302
5303 // Record the component responsible for creating this element.
5304 _owner: owner
5305 };
5306
5307 if (process.env.NODE_ENV !== 'production') {
5308 // The validation flag is currently mutative. We put it on
5309 // an external backing store so that we can freeze the whole object.
5310 // This can be replaced with a WeakMap once they are implemented in
5311 // commonly used development environments.
5312 element._store = {};
5313
5314 // To make comparing ReactElements easier for testing purposes, we make
5315 // the validation flag non-enumerable (where possible, which should
5316 // include every environment we run tests in), so the test framework
5317 // ignores it.
5318 if (canDefineProperty) {
5319 Object.defineProperty(element._store, 'validated', {
5320 configurable: false,
5321 enumerable: false,
5322 writable: true,
5323 value: false
5324 });
5325 // self and source are DEV only properties.
5326 Object.defineProperty(element, '_self', {
5327 configurable: false,
5328 enumerable: false,
5329 writable: false,
5330 value: self
5331 });
5332 // Two elements created in two different places should be considered
5333 // equal for testing purposes and therefore we hide it from enumeration.
5334 Object.defineProperty(element, '_source', {
5335 configurable: false,
5336 enumerable: false,
5337 writable: false,
5338 value: source
5339 });
5340 } else {
5341 element._store.validated = false;
5342 element._self = self;
5343 element._source = source;
5344 }
5345 Object.freeze(element.props);
5346 Object.freeze(element);
5347 }
5348
5349 return element;
5350 };
5351
5352 ReactElement.createElement = function (type, config, children) {
5353 var propName;
5354
5355 // Reserved names are extracted
5356 var props = {};
5357
5358 var key = null;
5359 var ref = null;
5360 var self = null;
5361 var source = null;
5362
5363 if (config != null) {
5364 ref = config.ref === undefined ? null : config.ref;
5365 key = config.key === undefined ? null : '' + config.key;
5366 self = config.__self === undefined ? null : config.__self;
5367 source = config.__source === undefined ? null : config.__source;
5368 // Remaining properties are added to a new props object
5369 for (propName in config) {
5370 if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
5371 props[propName] = config[propName];
5372 }
5373 }
5374 }
5375
5376 // Children can be more than one argument, and those are transferred onto
5377 // the newly allocated props object.
5378 var childrenLength = arguments.length - 2;
5379 if (childrenLength === 1) {
5380 props.children = children;
5381 } else if (childrenLength > 1) {
5382 var childArray = Array(childrenLength);
5383 for (var i = 0; i < childrenLength; i++) {
5384 childArray[i] = arguments[i + 2];
5385 }
5386 props.children = childArray;
5387 }
5388
5389 // Resolve default props
5390 if (type && type.defaultProps) {
5391 var defaultProps = type.defaultProps;
5392 for (propName in defaultProps) {
5393 if (typeof props[propName] === 'undefined') {
5394 props[propName] = defaultProps[propName];
5395 }
5396 }
5397 }
5398
5399 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
5400 };
5401
5402 ReactElement.createFactory = function (type) {
5403 var factory = ReactElement.createElement.bind(null, type);
5404 // Expose the type on the factory and the prototype so that it can be
5405 // easily accessed on elements. E.g. `<Foo />.type === Foo`.
5406 // This should not be named `constructor` since this may not be the function
5407 // that created the element, and it may not even be a constructor.
5408 // Legacy hook TODO: Warn if this is accessed
5409 factory.type = type;
5410 return factory;
5411 };
5412
5413 ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
5414 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
5415
5416 return newElement;
5417 };
5418
5419 ReactElement.cloneAndReplaceProps = function (oldElement, newProps) {
5420 var newElement = ReactElement(oldElement.type, oldElement.key, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, newProps);
5421
5422 if (process.env.NODE_ENV !== 'production') {
5423 // If the key on the original is valid, then the clone is valid
5424 newElement._store.validated = oldElement._store.validated;
5425 }
5426
5427 return newElement;
5428 };
5429
5430 ReactElement.cloneElement = function (element, config, children) {
5431 var propName;
5432
5433 // Original props are copied
5434 var props = assign({}, element.props);
5435
5436 // Reserved names are extracted
5437 var key = element.key;
5438 var ref = element.ref;
5439 // Self is preserved since the owner is preserved.
5440 var self = element._self;
5441 // Source is preserved since cloneElement is unlikely to be targeted by a
5442 // transpiler, and the original source is probably a better indicator of the
5443 // true owner.
5444 var source = element._source;
5445
5446 // Owner will be preserved, unless ref is overridden
5447 var owner = element._owner;
5448
5449 if (config != null) {
5450 if (config.ref !== undefined) {
5451 // Silently steal the ref from the parent.
5452 ref = config.ref;
5453 owner = ReactCurrentOwner.current;
5454 }
5455 if (config.key !== undefined) {
5456 key = '' + config.key;
5457 }
5458 // Remaining properties override existing props
5459 for (propName in config) {
5460 if (config.hasOwnProperty(propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
5461 props[propName] = config[propName];
5462 }
5463 }
5464 }
5465
5466 // Children can be more than one argument, and those are transferred onto
5467 // the newly allocated props object.
5468 var childrenLength = arguments.length - 2;
5469 if (childrenLength === 1) {
5470 props.children = children;
5471 } else if (childrenLength > 1) {
5472 var childArray = Array(childrenLength);
5473 for (var i = 0; i < childrenLength; i++) {
5474 childArray[i] = arguments[i + 2];
5475 }
5476 props.children = childArray;
5477 }
5478
5479 return ReactElement(element.type, key, ref, self, source, owner, props);
5480 };
5481
5482 /**
5483 * @param {?object} object
5484 * @return {boolean} True if `object` is a valid component.
5485 * @final
5486 */
5487 ReactElement.isValidElement = function (object) {
5488 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
5489 };
5490
5491 module.exports = ReactElement;
5492 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5493
5494/***/ }),
5495/* 44 */
5496/***/ (function(module, exports, __webpack_require__) {
5497
5498 /* WEBPACK VAR INJECTION */(function(process) {/**
5499 * Copyright 2013-2015, Facebook, Inc.
5500 * All rights reserved.
5501 *
5502 * This source code is licensed under the BSD-style license found in the
5503 * LICENSE file in the root directory of this source tree. An additional grant
5504 * of patent rights can be found in the PATENTS file in the same directory.
5505 *
5506 * @providesModule canDefineProperty
5507 */
5508
5509 'use strict';
5510
5511 var canDefineProperty = false;
5512 if (process.env.NODE_ENV !== 'production') {
5513 try {
5514 Object.defineProperty({}, 'x', { get: function () {} });
5515 canDefineProperty = true;
5516 } catch (x) {
5517 // IE will fail on defineProperty
5518 }
5519 }
5520
5521 module.exports = canDefineProperty;
5522 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5523
5524/***/ }),
5525/* 45 */
5526/***/ (function(module, exports) {
5527
5528 /**
5529 * Copyright 2014-2015, Facebook, Inc.
5530 * All rights reserved.
5531 *
5532 * This source code is licensed under the BSD-style license found in the
5533 * LICENSE file in the root directory of this source tree. An additional grant
5534 * of patent rights can be found in the PATENTS file in the same directory.
5535 *
5536 * @providesModule ReactEmptyComponentRegistry
5537 */
5538
5539 'use strict';
5540
5541 // This registry keeps track of the React IDs of the components that rendered to
5542 // `null` (in reality a placeholder such as `noscript`)
5543 var nullComponentIDsRegistry = {};
5544
5545 /**
5546 * @param {string} id Component's `_rootNodeID`.
5547 * @return {boolean} True if the component is rendered to null.
5548 */
5549 function isNullComponentID(id) {
5550 return !!nullComponentIDsRegistry[id];
5551 }
5552
5553 /**
5554 * Mark the component as having rendered to null.
5555 * @param {string} id Component's `_rootNodeID`.
5556 */
5557 function registerNullComponentID(id) {
5558 nullComponentIDsRegistry[id] = true;
5559 }
5560
5561 /**
5562 * Unmark the component as having rendered to null: it renders to something now.
5563 * @param {string} id Component's `_rootNodeID`.
5564 */
5565 function deregisterNullComponentID(id) {
5566 delete nullComponentIDsRegistry[id];
5567 }
5568
5569 var ReactEmptyComponentRegistry = {
5570 isNullComponentID: isNullComponentID,
5571 registerNullComponentID: registerNullComponentID,
5572 deregisterNullComponentID: deregisterNullComponentID
5573 };
5574
5575 module.exports = ReactEmptyComponentRegistry;
5576
5577/***/ }),
5578/* 46 */
5579/***/ (function(module, exports, __webpack_require__) {
5580
5581 /* WEBPACK VAR INJECTION */(function(process) {/**
5582 * Copyright 2013-2015, Facebook, Inc.
5583 * All rights reserved.
5584 *
5585 * This source code is licensed under the BSD-style license found in the
5586 * LICENSE file in the root directory of this source tree. An additional grant
5587 * of patent rights can be found in the PATENTS file in the same directory.
5588 *
5589 * @providesModule ReactInstanceHandles
5590 * @typechecks static-only
5591 */
5592
5593 'use strict';
5594
5595 var ReactRootIndex = __webpack_require__(47);
5596
5597 var invariant = __webpack_require__(14);
5598
5599 var SEPARATOR = '.';
5600 var SEPARATOR_LENGTH = SEPARATOR.length;
5601
5602 /**
5603 * Maximum depth of traversals before we consider the possibility of a bad ID.
5604 */
5605 var MAX_TREE_DEPTH = 10000;
5606
5607 /**
5608 * Creates a DOM ID prefix to use when mounting React components.
5609 *
5610 * @param {number} index A unique integer
5611 * @return {string} React root ID.
5612 * @internal
5613 */
5614 function getReactRootIDString(index) {
5615 return SEPARATOR + index.toString(36);
5616 }
5617
5618 /**
5619 * Checks if a character in the supplied ID is a separator or the end.
5620 *
5621 * @param {string} id A React DOM ID.
5622 * @param {number} index Index of the character to check.
5623 * @return {boolean} True if the character is a separator or end of the ID.
5624 * @private
5625 */
5626 function isBoundary(id, index) {
5627 return id.charAt(index) === SEPARATOR || index === id.length;
5628 }
5629
5630 /**
5631 * Checks if the supplied string is a valid React DOM ID.
5632 *
5633 * @param {string} id A React DOM ID, maybe.
5634 * @return {boolean} True if the string is a valid React DOM ID.
5635 * @private
5636 */
5637 function isValidID(id) {
5638 return id === '' || id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR;
5639 }
5640
5641 /**
5642 * Checks if the first ID is an ancestor of or equal to the second ID.
5643 *
5644 * @param {string} ancestorID
5645 * @param {string} descendantID
5646 * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`.
5647 * @internal
5648 */
5649 function isAncestorIDOf(ancestorID, descendantID) {
5650 return descendantID.indexOf(ancestorID) === 0 && isBoundary(descendantID, ancestorID.length);
5651 }
5652
5653 /**
5654 * Gets the parent ID of the supplied React DOM ID, `id`.
5655 *
5656 * @param {string} id ID of a component.
5657 * @return {string} ID of the parent, or an empty string.
5658 * @private
5659 */
5660 function getParentID(id) {
5661 return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : '';
5662 }
5663
5664 /**
5665 * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the
5666 * supplied `destinationID`. If they are equal, the ID is returned.
5667 *
5668 * @param {string} ancestorID ID of an ancestor node of `destinationID`.
5669 * @param {string} destinationID ID of the destination node.
5670 * @return {string} Next ID on the path from `ancestorID` to `destinationID`.
5671 * @private
5672 */
5673 function getNextDescendantID(ancestorID, destinationID) {
5674 !(isValidID(ancestorID) && isValidID(destinationID)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(false) : undefined;
5675 !isAncestorIDOf(ancestorID, destinationID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getNextDescendantID(...): React has made an invalid assumption about ' + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', ancestorID, destinationID) : invariant(false) : undefined;
5676 if (ancestorID === destinationID) {
5677 return ancestorID;
5678 }
5679 // Skip over the ancestor and the immediate separator. Traverse until we hit
5680 // another separator or we reach the end of `destinationID`.
5681 var start = ancestorID.length + SEPARATOR_LENGTH;
5682 var i;
5683 for (i = start; i < destinationID.length; i++) {
5684 if (isBoundary(destinationID, i)) {
5685 break;
5686 }
5687 }
5688 return destinationID.substr(0, i);
5689 }
5690
5691 /**
5692 * Gets the nearest common ancestor ID of two IDs.
5693 *
5694 * Using this ID scheme, the nearest common ancestor ID is the longest common
5695 * prefix of the two IDs that immediately preceded a "marker" in both strings.
5696 *
5697 * @param {string} oneID
5698 * @param {string} twoID
5699 * @return {string} Nearest common ancestor ID, or the empty string if none.
5700 * @private
5701 */
5702 function getFirstCommonAncestorID(oneID, twoID) {
5703 var minLength = Math.min(oneID.length, twoID.length);
5704 if (minLength === 0) {
5705 return '';
5706 }
5707 var lastCommonMarkerIndex = 0;
5708 // Use `<=` to traverse until the "EOL" of the shorter string.
5709 for (var i = 0; i <= minLength; i++) {
5710 if (isBoundary(oneID, i) && isBoundary(twoID, i)) {
5711 lastCommonMarkerIndex = i;
5712 } else if (oneID.charAt(i) !== twoID.charAt(i)) {
5713 break;
5714 }
5715 }
5716 var longestCommonID = oneID.substr(0, lastCommonMarkerIndex);
5717 !isValidID(longestCommonID) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', oneID, twoID, longestCommonID) : invariant(false) : undefined;
5718 return longestCommonID;
5719 }
5720
5721 /**
5722 * Traverses the parent path between two IDs (either up or down). The IDs must
5723 * not be the same, and there must exist a parent path between them. If the
5724 * callback returns `false`, traversal is stopped.
5725 *
5726 * @param {?string} start ID at which to start traversal.
5727 * @param {?string} stop ID at which to end traversal.
5728 * @param {function} cb Callback to invoke each ID with.
5729 * @param {*} arg Argument to invoke the callback with.
5730 * @param {?boolean} skipFirst Whether or not to skip the first node.
5731 * @param {?boolean} skipLast Whether or not to skip the last node.
5732 * @private
5733 */
5734 function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) {
5735 start = start || '';
5736 stop = stop || '';
5737 !(start !== stop) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(false) : undefined;
5738 var traverseUp = isAncestorIDOf(stop, start);
5739 !(traverseUp || isAncestorIDOf(start, stop)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + 'not have a parent path.', start, stop) : invariant(false) : undefined;
5740 // Traverse from `start` to `stop` one depth at a time.
5741 var depth = 0;
5742 var traverse = traverseUp ? getParentID : getNextDescendantID;
5743 for (var id = start;; /* until break */id = traverse(id, stop)) {
5744 var ret;
5745 if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) {
5746 ret = cb(id, traverseUp, arg);
5747 }
5748 if (ret === false || id === stop) {
5749 // Only break //after// visiting `stop`.
5750 break;
5751 }
5752 !(depth++ < MAX_TREE_DEPTH) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', start, stop, id) : invariant(false) : undefined;
5753 }
5754 }
5755
5756 /**
5757 * Manages the IDs assigned to DOM representations of React components. This
5758 * uses a specific scheme in order to traverse the DOM efficiently (e.g. in
5759 * order to simulate events).
5760 *
5761 * @internal
5762 */
5763 var ReactInstanceHandles = {
5764
5765 /**
5766 * Constructs a React root ID
5767 * @return {string} A React root ID.
5768 */
5769 createReactRootID: function () {
5770 return getReactRootIDString(ReactRootIndex.createReactRootIndex());
5771 },
5772
5773 /**
5774 * Constructs a React ID by joining a root ID with a name.
5775 *
5776 * @param {string} rootID Root ID of a parent component.
5777 * @param {string} name A component's name (as flattened children).
5778 * @return {string} A React ID.
5779 * @internal
5780 */
5781 createReactID: function (rootID, name) {
5782 return rootID + name;
5783 },
5784
5785 /**
5786 * Gets the DOM ID of the React component that is the root of the tree that
5787 * contains the React component with the supplied DOM ID.
5788 *
5789 * @param {string} id DOM ID of a React component.
5790 * @return {?string} DOM ID of the React component that is the root.
5791 * @internal
5792 */
5793 getReactRootIDFromNodeID: function (id) {
5794 if (id && id.charAt(0) === SEPARATOR && id.length > 1) {
5795 var index = id.indexOf(SEPARATOR, 1);
5796 return index > -1 ? id.substr(0, index) : id;
5797 }
5798 return null;
5799 },
5800
5801 /**
5802 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
5803 * should would receive a `mouseEnter` or `mouseLeave` event.
5804 *
5805 * NOTE: Does not invoke the callback on the nearest common ancestor because
5806 * nothing "entered" or "left" that element.
5807 *
5808 * @param {string} leaveID ID being left.
5809 * @param {string} enterID ID being entered.
5810 * @param {function} cb Callback to invoke on each entered/left ID.
5811 * @param {*} upArg Argument to invoke the callback with on left IDs.
5812 * @param {*} downArg Argument to invoke the callback with on entered IDs.
5813 * @internal
5814 */
5815 traverseEnterLeave: function (leaveID, enterID, cb, upArg, downArg) {
5816 var ancestorID = getFirstCommonAncestorID(leaveID, enterID);
5817 if (ancestorID !== leaveID) {
5818 traverseParentPath(leaveID, ancestorID, cb, upArg, false, true);
5819 }
5820 if (ancestorID !== enterID) {
5821 traverseParentPath(ancestorID, enterID, cb, downArg, true, false);
5822 }
5823 },
5824
5825 /**
5826 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
5827 *
5828 * NOTE: This traversal happens on IDs without touching the DOM.
5829 *
5830 * @param {string} targetID ID of the target node.
5831 * @param {function} cb Callback to invoke.
5832 * @param {*} arg Argument to invoke the callback with.
5833 * @internal
5834 */
5835 traverseTwoPhase: function (targetID, cb, arg) {
5836 if (targetID) {
5837 traverseParentPath('', targetID, cb, arg, true, false);
5838 traverseParentPath(targetID, '', cb, arg, false, true);
5839 }
5840 },
5841
5842 /**
5843 * Same as `traverseTwoPhase` but skips the `targetID`.
5844 */
5845 traverseTwoPhaseSkipTarget: function (targetID, cb, arg) {
5846 if (targetID) {
5847 traverseParentPath('', targetID, cb, arg, true, true);
5848 traverseParentPath(targetID, '', cb, arg, true, true);
5849 }
5850 },
5851
5852 /**
5853 * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For
5854 * example, passing `.0.$row-0.1` would result in `cb` getting called
5855 * with `.0`, `.0.$row-0`, and `.0.$row-0.1`.
5856 *
5857 * NOTE: This traversal happens on IDs without touching the DOM.
5858 *
5859 * @param {string} targetID ID of the target node.
5860 * @param {function} cb Callback to invoke.
5861 * @param {*} arg Argument to invoke the callback with.
5862 * @internal
5863 */
5864 traverseAncestors: function (targetID, cb, arg) {
5865 traverseParentPath('', targetID, cb, arg, true, false);
5866 },
5867
5868 getFirstCommonAncestorID: getFirstCommonAncestorID,
5869
5870 /**
5871 * Exposed for unit testing.
5872 * @private
5873 */
5874 _getNextDescendantID: getNextDescendantID,
5875
5876 isAncestorIDOf: isAncestorIDOf,
5877
5878 SEPARATOR: SEPARATOR
5879
5880 };
5881
5882 module.exports = ReactInstanceHandles;
5883 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
5884
5885/***/ }),
5886/* 47 */
5887/***/ (function(module, exports) {
5888
5889 /**
5890 * Copyright 2013-2015, Facebook, Inc.
5891 * All rights reserved.
5892 *
5893 * This source code is licensed under the BSD-style license found in the
5894 * LICENSE file in the root directory of this source tree. An additional grant
5895 * of patent rights can be found in the PATENTS file in the same directory.
5896 *
5897 * @providesModule ReactRootIndex
5898 * @typechecks
5899 */
5900
5901 'use strict';
5902
5903 var ReactRootIndexInjection = {
5904 /**
5905 * @param {function} _createReactRootIndex
5906 */
5907 injectCreateReactRootIndex: function (_createReactRootIndex) {
5908 ReactRootIndex.createReactRootIndex = _createReactRootIndex;
5909 }
5910 };
5911
5912 var ReactRootIndex = {
5913 createReactRootIndex: null,
5914 injection: ReactRootIndexInjection
5915 };
5916
5917 module.exports = ReactRootIndex;
5918
5919/***/ }),
5920/* 48 */
5921/***/ (function(module, exports) {
5922
5923 /**
5924 * Copyright 2013-2015, Facebook, Inc.
5925 * All rights reserved.
5926 *
5927 * This source code is licensed under the BSD-style license found in the
5928 * LICENSE file in the root directory of this source tree. An additional grant
5929 * of patent rights can be found in the PATENTS file in the same directory.
5930 *
5931 * @providesModule ReactInstanceMap
5932 */
5933
5934 'use strict';
5935
5936 /**
5937 * `ReactInstanceMap` maintains a mapping from a public facing stateful
5938 * instance (key) and the internal representation (value). This allows public
5939 * methods to accept the user facing instance as an argument and map them back
5940 * to internal methods.
5941 */
5942
5943 // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
5944 var ReactInstanceMap = {
5945
5946 /**
5947 * This API should be called `delete` but we'd have to make sure to always
5948 * transform these to strings for IE support. When this transform is fully
5949 * supported we can rename it.
5950 */
5951 remove: function (key) {
5952 key._reactInternalInstance = undefined;
5953 },
5954
5955 get: function (key) {
5956 return key._reactInternalInstance;
5957 },
5958
5959 has: function (key) {
5960 return key._reactInternalInstance !== undefined;
5961 },
5962
5963 set: function (key, value) {
5964 key._reactInternalInstance = value;
5965 }
5966
5967 };
5968
5969 module.exports = ReactInstanceMap;
5970
5971/***/ }),
5972/* 49 */
5973/***/ (function(module, exports, __webpack_require__) {
5974
5975 /**
5976 * Copyright 2013-2015, Facebook, Inc.
5977 * All rights reserved.
5978 *
5979 * This source code is licensed under the BSD-style license found in the
5980 * LICENSE file in the root directory of this source tree. An additional grant
5981 * of patent rights can be found in the PATENTS file in the same directory.
5982 *
5983 * @providesModule ReactMarkupChecksum
5984 */
5985
5986 'use strict';
5987
5988 var adler32 = __webpack_require__(50);
5989
5990 var TAG_END = /\/?>/;
5991
5992 var ReactMarkupChecksum = {
5993 CHECKSUM_ATTR_NAME: 'data-react-checksum',
5994
5995 /**
5996 * @param {string} markup Markup string
5997 * @return {string} Markup string with checksum attribute attached
5998 */
5999 addChecksumToMarkup: function (markup) {
6000 var checksum = adler32(markup);
6001
6002 // Add checksum (handle both parent tags and self-closing tags)
6003 return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
6004 },
6005
6006 /**
6007 * @param {string} markup to use
6008 * @param {DOMElement} element root React element
6009 * @returns {boolean} whether or not the markup is the same
6010 */
6011 canReuseMarkup: function (markup, element) {
6012 var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
6013 existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
6014 var markupChecksum = adler32(markup);
6015 return markupChecksum === existingChecksum;
6016 }
6017 };
6018
6019 module.exports = ReactMarkupChecksum;
6020
6021/***/ }),
6022/* 50 */
6023/***/ (function(module, exports) {
6024
6025 /**
6026 * Copyright 2013-2015, Facebook, Inc.
6027 * All rights reserved.
6028 *
6029 * This source code is licensed under the BSD-style license found in the
6030 * LICENSE file in the root directory of this source tree. An additional grant
6031 * of patent rights can be found in the PATENTS file in the same directory.
6032 *
6033 * @providesModule adler32
6034 */
6035
6036 'use strict';
6037
6038 var MOD = 65521;
6039
6040 // adler32 is not cryptographically strong, and is only used to sanity check that
6041 // markup generated on the server matches the markup generated on the client.
6042 // This implementation (a modified version of the SheetJS version) has been optimized
6043 // for our use case, at the expense of conforming to the adler32 specification
6044 // for non-ascii inputs.
6045 function adler32(data) {
6046 var a = 1;
6047 var b = 0;
6048 var i = 0;
6049 var l = data.length;
6050 var m = l & ~0x3;
6051 while (i < m) {
6052 for (; i < Math.min(i + 4096, m); i += 4) {
6053 b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
6054 }
6055 a %= MOD;
6056 b %= MOD;
6057 }
6058 for (; i < l; i++) {
6059 b += a += data.charCodeAt(i);
6060 }
6061 a %= MOD;
6062 b %= MOD;
6063 return a | b << 16;
6064 }
6065
6066 module.exports = adler32;
6067
6068/***/ }),
6069/* 51 */
6070/***/ (function(module, exports, __webpack_require__) {
6071
6072 /**
6073 * Copyright 2013-2015, Facebook, Inc.
6074 * All rights reserved.
6075 *
6076 * This source code is licensed under the BSD-style license found in the
6077 * LICENSE file in the root directory of this source tree. An additional grant
6078 * of patent rights can be found in the PATENTS file in the same directory.
6079 *
6080 * @providesModule ReactReconciler
6081 */
6082
6083 'use strict';
6084
6085 var ReactRef = __webpack_require__(52);
6086
6087 /**
6088 * Helper to call ReactRef.attachRefs with this composite component, split out
6089 * to avoid allocations in the transaction mount-ready queue.
6090 */
6091 function attachRefs() {
6092 ReactRef.attachRefs(this, this._currentElement);
6093 }
6094
6095 var ReactReconciler = {
6096
6097 /**
6098 * Initializes the component, renders markup, and registers event listeners.
6099 *
6100 * @param {ReactComponent} internalInstance
6101 * @param {string} rootID DOM ID of the root node.
6102 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
6103 * @return {?string} Rendered markup to be inserted into the DOM.
6104 * @final
6105 * @internal
6106 */
6107 mountComponent: function (internalInstance, rootID, transaction, context) {
6108 var markup = internalInstance.mountComponent(rootID, transaction, context);
6109 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
6110 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
6111 }
6112 return markup;
6113 },
6114
6115 /**
6116 * Releases any resources allocated by `mountComponent`.
6117 *
6118 * @final
6119 * @internal
6120 */
6121 unmountComponent: function (internalInstance) {
6122 ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
6123 internalInstance.unmountComponent();
6124 },
6125
6126 /**
6127 * Update a component using a new element.
6128 *
6129 * @param {ReactComponent} internalInstance
6130 * @param {ReactElement} nextElement
6131 * @param {ReactReconcileTransaction} transaction
6132 * @param {object} context
6133 * @internal
6134 */
6135 receiveComponent: function (internalInstance, nextElement, transaction, context) {
6136 var prevElement = internalInstance._currentElement;
6137
6138 if (nextElement === prevElement && context === internalInstance._context) {
6139 // Since elements are immutable after the owner is rendered,
6140 // we can do a cheap identity compare here to determine if this is a
6141 // superfluous reconcile. It's possible for state to be mutable but such
6142 // change should trigger an update of the owner which would recreate
6143 // the element. We explicitly check for the existence of an owner since
6144 // it's possible for an element created outside a composite to be
6145 // deeply mutated and reused.
6146
6147 // TODO: Bailing out early is just a perf optimization right?
6148 // TODO: Removing the return statement should affect correctness?
6149 return;
6150 }
6151
6152 var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
6153
6154 if (refsChanged) {
6155 ReactRef.detachRefs(internalInstance, prevElement);
6156 }
6157
6158 internalInstance.receiveComponent(nextElement, transaction, context);
6159
6160 if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
6161 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
6162 }
6163 },
6164
6165 /**
6166 * Flush any dirty changes in a component.
6167 *
6168 * @param {ReactComponent} internalInstance
6169 * @param {ReactReconcileTransaction} transaction
6170 * @internal
6171 */
6172 performUpdateIfNecessary: function (internalInstance, transaction) {
6173 internalInstance.performUpdateIfNecessary(transaction);
6174 }
6175
6176 };
6177
6178 module.exports = ReactReconciler;
6179
6180/***/ }),
6181/* 52 */
6182/***/ (function(module, exports, __webpack_require__) {
6183
6184 /**
6185 * Copyright 2013-2015, Facebook, Inc.
6186 * All rights reserved.
6187 *
6188 * This source code is licensed under the BSD-style license found in the
6189 * LICENSE file in the root directory of this source tree. An additional grant
6190 * of patent rights can be found in the PATENTS file in the same directory.
6191 *
6192 * @providesModule ReactRef
6193 */
6194
6195 'use strict';
6196
6197 var ReactOwner = __webpack_require__(53);
6198
6199 var ReactRef = {};
6200
6201 function attachRef(ref, component, owner) {
6202 if (typeof ref === 'function') {
6203 ref(component.getPublicInstance());
6204 } else {
6205 // Legacy ref
6206 ReactOwner.addComponentAsRefTo(component, ref, owner);
6207 }
6208 }
6209
6210 function detachRef(ref, component, owner) {
6211 if (typeof ref === 'function') {
6212 ref(null);
6213 } else {
6214 // Legacy ref
6215 ReactOwner.removeComponentAsRefFrom(component, ref, owner);
6216 }
6217 }
6218
6219 ReactRef.attachRefs = function (instance, element) {
6220 if (element === null || element === false) {
6221 return;
6222 }
6223 var ref = element.ref;
6224 if (ref != null) {
6225 attachRef(ref, instance, element._owner);
6226 }
6227 };
6228
6229 ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
6230 // If either the owner or a `ref` has changed, make sure the newest owner
6231 // has stored a reference to `this`, and the previous owner (if different)
6232 // has forgotten the reference to `this`. We use the element instead
6233 // of the public this.props because the post processing cannot determine
6234 // a ref. The ref conceptually lives on the element.
6235
6236 // TODO: Should this even be possible? The owner cannot change because
6237 // it's forbidden by shouldUpdateReactComponent. The ref can change
6238 // if you swap the keys of but not the refs. Reconsider where this check
6239 // is made. It probably belongs where the key checking and
6240 // instantiateReactComponent is done.
6241
6242 var prevEmpty = prevElement === null || prevElement === false;
6243 var nextEmpty = nextElement === null || nextElement === false;
6244
6245 return(
6246 // This has a few false positives w/r/t empty components.
6247 prevEmpty || nextEmpty || nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref
6248 );
6249 };
6250
6251 ReactRef.detachRefs = function (instance, element) {
6252 if (element === null || element === false) {
6253 return;
6254 }
6255 var ref = element.ref;
6256 if (ref != null) {
6257 detachRef(ref, instance, element._owner);
6258 }
6259 };
6260
6261 module.exports = ReactRef;
6262
6263/***/ }),
6264/* 53 */
6265/***/ (function(module, exports, __webpack_require__) {
6266
6267 /* WEBPACK VAR INJECTION */(function(process) {/**
6268 * Copyright 2013-2015, Facebook, Inc.
6269 * All rights reserved.
6270 *
6271 * This source code is licensed under the BSD-style license found in the
6272 * LICENSE file in the root directory of this source tree. An additional grant
6273 * of patent rights can be found in the PATENTS file in the same directory.
6274 *
6275 * @providesModule ReactOwner
6276 */
6277
6278 'use strict';
6279
6280 var invariant = __webpack_require__(14);
6281
6282 /**
6283 * ReactOwners are capable of storing references to owned components.
6284 *
6285 * All components are capable of //being// referenced by owner components, but
6286 * only ReactOwner components are capable of //referencing// owned components.
6287 * The named reference is known as a "ref".
6288 *
6289 * Refs are available when mounted and updated during reconciliation.
6290 *
6291 * var MyComponent = React.createClass({
6292 * render: function() {
6293 * return (
6294 * <div onClick={this.handleClick}>
6295 * <CustomComponent ref="custom" />
6296 * </div>
6297 * );
6298 * },
6299 * handleClick: function() {
6300 * this.refs.custom.handleClick();
6301 * },
6302 * componentDidMount: function() {
6303 * this.refs.custom.initialize();
6304 * }
6305 * });
6306 *
6307 * Refs should rarely be used. When refs are used, they should only be done to
6308 * control data that is not handled by React's data flow.
6309 *
6310 * @class ReactOwner
6311 */
6312 var ReactOwner = {
6313
6314 /**
6315 * @param {?object} object
6316 * @return {boolean} True if `object` is a valid owner.
6317 * @final
6318 */
6319 isValidOwner: function (object) {
6320 return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
6321 },
6322
6323 /**
6324 * Adds a component by ref to an owner component.
6325 *
6326 * @param {ReactComponent} component Component to reference.
6327 * @param {string} ref Name by which to refer to the component.
6328 * @param {ReactOwner} owner Component on which to record the ref.
6329 * @final
6330 * @internal
6331 */
6332 addComponentAsRefTo: function (component, ref, owner) {
6333 !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might ' + 'be adding a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined;
6334 owner.attachRef(ref, component);
6335 },
6336
6337 /**
6338 * Removes a component by ref from an owner component.
6339 *
6340 * @param {ReactComponent} component Component to dereference.
6341 * @param {string} ref Name of the ref to remove.
6342 * @param {ReactOwner} owner Component on which the ref is recorded.
6343 * @final
6344 * @internal
6345 */
6346 removeComponentAsRefFrom: function (component, ref, owner) {
6347 !ReactOwner.isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might ' + 'be removing a ref to a component that was not created inside a component\'s ' + '`render` method, or you have multiple copies of React loaded ' + '(details: https://fb.me/react-refs-must-have-owner).') : invariant(false) : undefined;
6348 // Check that `component` is still the current ref because we do not want to
6349 // detach the ref if another component stole it.
6350 if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) {
6351 owner.detachRef(ref);
6352 }
6353 }
6354
6355 };
6356
6357 module.exports = ReactOwner;
6358 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6359
6360/***/ }),
6361/* 54 */
6362/***/ (function(module, exports, __webpack_require__) {
6363
6364 /* WEBPACK VAR INJECTION */(function(process) {/**
6365 * Copyright 2015, Facebook, Inc.
6366 * All rights reserved.
6367 *
6368 * This source code is licensed under the BSD-style license found in the
6369 * LICENSE file in the root directory of this source tree. An additional grant
6370 * of patent rights can be found in the PATENTS file in the same directory.
6371 *
6372 * @providesModule ReactUpdateQueue
6373 */
6374
6375 'use strict';
6376
6377 var ReactCurrentOwner = __webpack_require__(6);
6378 var ReactElement = __webpack_require__(43);
6379 var ReactInstanceMap = __webpack_require__(48);
6380 var ReactUpdates = __webpack_require__(55);
6381
6382 var assign = __webpack_require__(40);
6383 var invariant = __webpack_require__(14);
6384 var warning = __webpack_require__(26);
6385
6386 function enqueueUpdate(internalInstance) {
6387 ReactUpdates.enqueueUpdate(internalInstance);
6388 }
6389
6390 function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
6391 var internalInstance = ReactInstanceMap.get(publicInstance);
6392 if (!internalInstance) {
6393 if (process.env.NODE_ENV !== 'production') {
6394 // Only warn when we have a callerName. Otherwise we should be silent.
6395 // We're probably calling from enqueueCallback. We don't want to warn
6396 // there because we already warned for the corresponding lifecycle method.
6397 process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor.displayName) : undefined;
6398 }
6399 return null;
6400 }
6401
6402 if (process.env.NODE_ENV !== 'production') {
6403 process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition ' + '(such as within `render`). Render methods should be a pure function ' + 'of props and state.', callerName) : undefined;
6404 }
6405
6406 return internalInstance;
6407 }
6408
6409 /**
6410 * ReactUpdateQueue allows for state updates to be scheduled into a later
6411 * reconciliation step.
6412 */
6413 var ReactUpdateQueue = {
6414
6415 /**
6416 * Checks whether or not this composite component is mounted.
6417 * @param {ReactClass} publicInstance The instance we want to test.
6418 * @return {boolean} True if mounted, false otherwise.
6419 * @protected
6420 * @final
6421 */
6422 isMounted: function (publicInstance) {
6423 if (process.env.NODE_ENV !== 'production') {
6424 var owner = ReactCurrentOwner.current;
6425 if (owner !== null) {
6426 process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : undefined;
6427 owner._warnedAboutRefsInRender = true;
6428 }
6429 }
6430 var internalInstance = ReactInstanceMap.get(publicInstance);
6431 if (internalInstance) {
6432 // During componentWillMount and render this will still be null but after
6433 // that will always render to something. At least for now. So we can use
6434 // this hack.
6435 return !!internalInstance._renderedComponent;
6436 } else {
6437 return false;
6438 }
6439 },
6440
6441 /**
6442 * Enqueue a callback that will be executed after all the pending updates
6443 * have processed.
6444 *
6445 * @param {ReactClass} publicInstance The instance to use as `this` context.
6446 * @param {?function} callback Called after state is updated.
6447 * @internal
6448 */
6449 enqueueCallback: function (publicInstance, callback) {
6450 !(typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(false) : undefined;
6451 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
6452
6453 // Previously we would throw an error if we didn't have an internal
6454 // instance. Since we want to make it a no-op instead, we mirror the same
6455 // behavior we have in other enqueue* methods.
6456 // We also need to ignore callbacks in componentWillMount. See
6457 // enqueueUpdates.
6458 if (!internalInstance) {
6459 return null;
6460 }
6461
6462 if (internalInstance._pendingCallbacks) {
6463 internalInstance._pendingCallbacks.push(callback);
6464 } else {
6465 internalInstance._pendingCallbacks = [callback];
6466 }
6467 // TODO: The callback here is ignored when setState is called from
6468 // componentWillMount. Either fix it or disallow doing so completely in
6469 // favor of getInitialState. Alternatively, we can disallow
6470 // componentWillMount during server-side rendering.
6471 enqueueUpdate(internalInstance);
6472 },
6473
6474 enqueueCallbackInternal: function (internalInstance, callback) {
6475 !(typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + 'isn\'t callable.') : invariant(false) : undefined;
6476 if (internalInstance._pendingCallbacks) {
6477 internalInstance._pendingCallbacks.push(callback);
6478 } else {
6479 internalInstance._pendingCallbacks = [callback];
6480 }
6481 enqueueUpdate(internalInstance);
6482 },
6483
6484 /**
6485 * Forces an update. This should only be invoked when it is known with
6486 * certainty that we are **not** in a DOM transaction.
6487 *
6488 * You may want to call this when you know that some deeper aspect of the
6489 * component's state has changed but `setState` was not called.
6490 *
6491 * This will not invoke `shouldComponentUpdate`, but it will invoke
6492 * `componentWillUpdate` and `componentDidUpdate`.
6493 *
6494 * @param {ReactClass} publicInstance The instance that should rerender.
6495 * @internal
6496 */
6497 enqueueForceUpdate: function (publicInstance) {
6498 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
6499
6500 if (!internalInstance) {
6501 return;
6502 }
6503
6504 internalInstance._pendingForceUpdate = true;
6505
6506 enqueueUpdate(internalInstance);
6507 },
6508
6509 /**
6510 * Replaces all of the state. Always use this or `setState` to mutate state.
6511 * You should treat `this.state` as immutable.
6512 *
6513 * There is no guarantee that `this.state` will be immediately updated, so
6514 * accessing `this.state` after calling this method may return the old value.
6515 *
6516 * @param {ReactClass} publicInstance The instance that should rerender.
6517 * @param {object} completeState Next state.
6518 * @internal
6519 */
6520 enqueueReplaceState: function (publicInstance, completeState) {
6521 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
6522
6523 if (!internalInstance) {
6524 return;
6525 }
6526
6527 internalInstance._pendingStateQueue = [completeState];
6528 internalInstance._pendingReplaceState = true;
6529
6530 enqueueUpdate(internalInstance);
6531 },
6532
6533 /**
6534 * Sets a subset of the state. This only exists because _pendingState is
6535 * internal. This provides a merging strategy that is not available to deep
6536 * properties which is confusing. TODO: Expose pendingState or don't use it
6537 * during the merge.
6538 *
6539 * @param {ReactClass} publicInstance The instance that should rerender.
6540 * @param {object} partialState Next partial state to be merged with state.
6541 * @internal
6542 */
6543 enqueueSetState: function (publicInstance, partialState) {
6544 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
6545
6546 if (!internalInstance) {
6547 return;
6548 }
6549
6550 var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
6551 queue.push(partialState);
6552
6553 enqueueUpdate(internalInstance);
6554 },
6555
6556 /**
6557 * Sets a subset of the props.
6558 *
6559 * @param {ReactClass} publicInstance The instance that should rerender.
6560 * @param {object} partialProps Subset of the next props.
6561 * @internal
6562 */
6563 enqueueSetProps: function (publicInstance, partialProps) {
6564 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setProps');
6565 if (!internalInstance) {
6566 return;
6567 }
6568 ReactUpdateQueue.enqueueSetPropsInternal(internalInstance, partialProps);
6569 },
6570
6571 enqueueSetPropsInternal: function (internalInstance, partialProps) {
6572 var topLevelWrapper = internalInstance._topLevelWrapper;
6573 !topLevelWrapper ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setProps(...): You called `setProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(false) : undefined;
6574
6575 // Merge with the pending element if it exists, otherwise with existing
6576 // element props.
6577 var wrapElement = topLevelWrapper._pendingElement || topLevelWrapper._currentElement;
6578 var element = wrapElement.props;
6579 var props = assign({}, element.props, partialProps);
6580 topLevelWrapper._pendingElement = ReactElement.cloneAndReplaceProps(wrapElement, ReactElement.cloneAndReplaceProps(element, props));
6581
6582 enqueueUpdate(topLevelWrapper);
6583 },
6584
6585 /**
6586 * Replaces all of the props.
6587 *
6588 * @param {ReactClass} publicInstance The instance that should rerender.
6589 * @param {object} props New props.
6590 * @internal
6591 */
6592 enqueueReplaceProps: function (publicInstance, props) {
6593 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceProps');
6594 if (!internalInstance) {
6595 return;
6596 }
6597 ReactUpdateQueue.enqueueReplacePropsInternal(internalInstance, props);
6598 },
6599
6600 enqueueReplacePropsInternal: function (internalInstance, props) {
6601 var topLevelWrapper = internalInstance._topLevelWrapper;
6602 !topLevelWrapper ? process.env.NODE_ENV !== 'production' ? invariant(false, 'replaceProps(...): You called `replaceProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + 'get reactively updated when rendered. Instead, change the owner\'s ' + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(false) : undefined;
6603
6604 // Merge with the pending element if it exists, otherwise with existing
6605 // element props.
6606 var wrapElement = topLevelWrapper._pendingElement || topLevelWrapper._currentElement;
6607 var element = wrapElement.props;
6608 topLevelWrapper._pendingElement = ReactElement.cloneAndReplaceProps(wrapElement, ReactElement.cloneAndReplaceProps(element, props));
6609
6610 enqueueUpdate(topLevelWrapper);
6611 },
6612
6613 enqueueElementInternal: function (internalInstance, newElement) {
6614 internalInstance._pendingElement = newElement;
6615 enqueueUpdate(internalInstance);
6616 }
6617
6618 };
6619
6620 module.exports = ReactUpdateQueue;
6621 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6622
6623/***/ }),
6624/* 55 */
6625/***/ (function(module, exports, __webpack_require__) {
6626
6627 /* WEBPACK VAR INJECTION */(function(process) {/**
6628 * Copyright 2013-2015, Facebook, Inc.
6629 * All rights reserved.
6630 *
6631 * This source code is licensed under the BSD-style license found in the
6632 * LICENSE file in the root directory of this source tree. An additional grant
6633 * of patent rights can be found in the PATENTS file in the same directory.
6634 *
6635 * @providesModule ReactUpdates
6636 */
6637
6638 'use strict';
6639
6640 var CallbackQueue = __webpack_require__(56);
6641 var PooledClass = __webpack_require__(57);
6642 var ReactPerf = __webpack_require__(19);
6643 var ReactReconciler = __webpack_require__(51);
6644 var Transaction = __webpack_require__(58);
6645
6646 var assign = __webpack_require__(40);
6647 var invariant = __webpack_require__(14);
6648
6649 var dirtyComponents = [];
6650 var asapCallbackQueue = CallbackQueue.getPooled();
6651 var asapEnqueued = false;
6652
6653 var batchingStrategy = null;
6654
6655 function ensureInjected() {
6656 !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : undefined;
6657 }
6658
6659 var NESTED_UPDATES = {
6660 initialize: function () {
6661 this.dirtyComponentsLength = dirtyComponents.length;
6662 },
6663 close: function () {
6664 if (this.dirtyComponentsLength !== dirtyComponents.length) {
6665 // Additional updates were enqueued by componentDidUpdate handlers or
6666 // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
6667 // these new updates so that if A's componentDidUpdate calls setState on
6668 // B, B will update before the callback A's updater provided when calling
6669 // setState.
6670 dirtyComponents.splice(0, this.dirtyComponentsLength);
6671 flushBatchedUpdates();
6672 } else {
6673 dirtyComponents.length = 0;
6674 }
6675 }
6676 };
6677
6678 var UPDATE_QUEUEING = {
6679 initialize: function () {
6680 this.callbackQueue.reset();
6681 },
6682 close: function () {
6683 this.callbackQueue.notifyAll();
6684 }
6685 };
6686
6687 var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
6688
6689 function ReactUpdatesFlushTransaction() {
6690 this.reinitializeTransaction();
6691 this.dirtyComponentsLength = null;
6692 this.callbackQueue = CallbackQueue.getPooled();
6693 this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled( /* forceHTML */false);
6694 }
6695
6696 assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, {
6697 getTransactionWrappers: function () {
6698 return TRANSACTION_WRAPPERS;
6699 },
6700
6701 destructor: function () {
6702 this.dirtyComponentsLength = null;
6703 CallbackQueue.release(this.callbackQueue);
6704 this.callbackQueue = null;
6705 ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
6706 this.reconcileTransaction = null;
6707 },
6708
6709 perform: function (method, scope, a) {
6710 // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
6711 // with this transaction's wrappers around it.
6712 return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
6713 }
6714 });
6715
6716 PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
6717
6718 function batchedUpdates(callback, a, b, c, d, e) {
6719 ensureInjected();
6720 batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
6721 }
6722
6723 /**
6724 * Array comparator for ReactComponents by mount ordering.
6725 *
6726 * @param {ReactComponent} c1 first component you're comparing
6727 * @param {ReactComponent} c2 second component you're comparing
6728 * @return {number} Return value usable by Array.prototype.sort().
6729 */
6730 function mountOrderComparator(c1, c2) {
6731 return c1._mountOrder - c2._mountOrder;
6732 }
6733
6734 function runBatchedUpdates(transaction) {
6735 var len = transaction.dirtyComponentsLength;
6736 !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : undefined;
6737
6738 // Since reconciling a component higher in the owner hierarchy usually (not
6739 // always -- see shouldComponentUpdate()) will reconcile children, reconcile
6740 // them before their children by sorting the array.
6741 dirtyComponents.sort(mountOrderComparator);
6742
6743 for (var i = 0; i < len; i++) {
6744 // If a component is unmounted before pending changes apply, it will still
6745 // be here, but we assume that it has cleared its _pendingCallbacks and
6746 // that performUpdateIfNecessary is a noop.
6747 var component = dirtyComponents[i];
6748
6749 // If performUpdateIfNecessary happens to enqueue any new updates, we
6750 // shouldn't execute the callbacks until the next render happens, so
6751 // stash the callbacks first
6752 var callbacks = component._pendingCallbacks;
6753 component._pendingCallbacks = null;
6754
6755 ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction);
6756
6757 if (callbacks) {
6758 for (var j = 0; j < callbacks.length; j++) {
6759 transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
6760 }
6761 }
6762 }
6763 }
6764
6765 var flushBatchedUpdates = function () {
6766 // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
6767 // array and perform any updates enqueued by mount-ready handlers (i.e.,
6768 // componentDidUpdate) but we need to check here too in order to catch
6769 // updates enqueued by setState callbacks and asap calls.
6770 while (dirtyComponents.length || asapEnqueued) {
6771 if (dirtyComponents.length) {
6772 var transaction = ReactUpdatesFlushTransaction.getPooled();
6773 transaction.perform(runBatchedUpdates, null, transaction);
6774 ReactUpdatesFlushTransaction.release(transaction);
6775 }
6776
6777 if (asapEnqueued) {
6778 asapEnqueued = false;
6779 var queue = asapCallbackQueue;
6780 asapCallbackQueue = CallbackQueue.getPooled();
6781 queue.notifyAll();
6782 CallbackQueue.release(queue);
6783 }
6784 }
6785 };
6786 flushBatchedUpdates = ReactPerf.measure('ReactUpdates', 'flushBatchedUpdates', flushBatchedUpdates);
6787
6788 /**
6789 * Mark a component as needing a rerender, adding an optional callback to a
6790 * list of functions which will be executed once the rerender occurs.
6791 */
6792 function enqueueUpdate(component) {
6793 ensureInjected();
6794
6795 // Various parts of our code (such as ReactCompositeComponent's
6796 // _renderValidatedComponent) assume that calls to render aren't nested;
6797 // verify that that's the case. (This is called by each top-level update
6798 // function, like setProps, setState, forceUpdate, etc.; creation and
6799 // destruction of top-level components is guarded in ReactMount.)
6800
6801 if (!batchingStrategy.isBatchingUpdates) {
6802 batchingStrategy.batchedUpdates(enqueueUpdate, component);
6803 return;
6804 }
6805
6806 dirtyComponents.push(component);
6807 }
6808
6809 /**
6810 * Enqueue a callback to be run at the end of the current batching cycle. Throws
6811 * if no updates are currently being performed.
6812 */
6813 function asap(callback, context) {
6814 !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : undefined;
6815 asapCallbackQueue.enqueue(callback, context);
6816 asapEnqueued = true;
6817 }
6818
6819 var ReactUpdatesInjection = {
6820 injectReconcileTransaction: function (ReconcileTransaction) {
6821 !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : undefined;
6822 ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
6823 },
6824
6825 injectBatchingStrategy: function (_batchingStrategy) {
6826 !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : undefined;
6827 !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : undefined;
6828 !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : undefined;
6829 batchingStrategy = _batchingStrategy;
6830 }
6831 };
6832
6833 var ReactUpdates = {
6834 /**
6835 * React references `ReactReconcileTransaction` using this property in order
6836 * to allow dependency injection.
6837 *
6838 * @internal
6839 */
6840 ReactReconcileTransaction: null,
6841
6842 batchedUpdates: batchedUpdates,
6843 enqueueUpdate: enqueueUpdate,
6844 flushBatchedUpdates: flushBatchedUpdates,
6845 injection: ReactUpdatesInjection,
6846 asap: asap
6847 };
6848
6849 module.exports = ReactUpdates;
6850 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6851
6852/***/ }),
6853/* 56 */
6854/***/ (function(module, exports, __webpack_require__) {
6855
6856 /* WEBPACK VAR INJECTION */(function(process) {/**
6857 * Copyright 2013-2015, Facebook, Inc.
6858 * All rights reserved.
6859 *
6860 * This source code is licensed under the BSD-style license found in the
6861 * LICENSE file in the root directory of this source tree. An additional grant
6862 * of patent rights can be found in the PATENTS file in the same directory.
6863 *
6864 * @providesModule CallbackQueue
6865 */
6866
6867 'use strict';
6868
6869 var PooledClass = __webpack_require__(57);
6870
6871 var assign = __webpack_require__(40);
6872 var invariant = __webpack_require__(14);
6873
6874 /**
6875 * A specialized pseudo-event module to help keep track of components waiting to
6876 * be notified when their DOM representations are available for use.
6877 *
6878 * This implements `PooledClass`, so you should never need to instantiate this.
6879 * Instead, use `CallbackQueue.getPooled()`.
6880 *
6881 * @class ReactMountReady
6882 * @implements PooledClass
6883 * @internal
6884 */
6885 function CallbackQueue() {
6886 this._callbacks = null;
6887 this._contexts = null;
6888 }
6889
6890 assign(CallbackQueue.prototype, {
6891
6892 /**
6893 * Enqueues a callback to be invoked when `notifyAll` is invoked.
6894 *
6895 * @param {function} callback Invoked when `notifyAll` is invoked.
6896 * @param {?object} context Context to call `callback` with.
6897 * @internal
6898 */
6899 enqueue: function (callback, context) {
6900 this._callbacks = this._callbacks || [];
6901 this._contexts = this._contexts || [];
6902 this._callbacks.push(callback);
6903 this._contexts.push(context);
6904 },
6905
6906 /**
6907 * Invokes all enqueued callbacks and clears the queue. This is invoked after
6908 * the DOM representation of a component has been created or updated.
6909 *
6910 * @internal
6911 */
6912 notifyAll: function () {
6913 var callbacks = this._callbacks;
6914 var contexts = this._contexts;
6915 if (callbacks) {
6916 !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : undefined;
6917 this._callbacks = null;
6918 this._contexts = null;
6919 for (var i = 0; i < callbacks.length; i++) {
6920 callbacks[i].call(contexts[i]);
6921 }
6922 callbacks.length = 0;
6923 contexts.length = 0;
6924 }
6925 },
6926
6927 /**
6928 * Resets the internal queue.
6929 *
6930 * @internal
6931 */
6932 reset: function () {
6933 this._callbacks = null;
6934 this._contexts = null;
6935 },
6936
6937 /**
6938 * `PooledClass` looks for this.
6939 */
6940 destructor: function () {
6941 this.reset();
6942 }
6943
6944 });
6945
6946 PooledClass.addPoolingTo(CallbackQueue);
6947
6948 module.exports = CallbackQueue;
6949 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
6950
6951/***/ }),
6952/* 57 */
6953/***/ (function(module, exports, __webpack_require__) {
6954
6955 /* WEBPACK VAR INJECTION */(function(process) {/**
6956 * Copyright 2013-2015, Facebook, Inc.
6957 * All rights reserved.
6958 *
6959 * This source code is licensed under the BSD-style license found in the
6960 * LICENSE file in the root directory of this source tree. An additional grant
6961 * of patent rights can be found in the PATENTS file in the same directory.
6962 *
6963 * @providesModule PooledClass
6964 */
6965
6966 'use strict';
6967
6968 var invariant = __webpack_require__(14);
6969
6970 /**
6971 * Static poolers. Several custom versions for each potential number of
6972 * arguments. A completely generic pooler is easy to implement, but would
6973 * require accessing the `arguments` object. In each of these, `this` refers to
6974 * the Class itself, not an instance. If any others are needed, simply add them
6975 * here, or in their own files.
6976 */
6977 var oneArgumentPooler = function (copyFieldsFrom) {
6978 var Klass = this;
6979 if (Klass.instancePool.length) {
6980 var instance = Klass.instancePool.pop();
6981 Klass.call(instance, copyFieldsFrom);
6982 return instance;
6983 } else {
6984 return new Klass(copyFieldsFrom);
6985 }
6986 };
6987
6988 var twoArgumentPooler = function (a1, a2) {
6989 var Klass = this;
6990 if (Klass.instancePool.length) {
6991 var instance = Klass.instancePool.pop();
6992 Klass.call(instance, a1, a2);
6993 return instance;
6994 } else {
6995 return new Klass(a1, a2);
6996 }
6997 };
6998
6999 var threeArgumentPooler = function (a1, a2, a3) {
7000 var Klass = this;
7001 if (Klass.instancePool.length) {
7002 var instance = Klass.instancePool.pop();
7003 Klass.call(instance, a1, a2, a3);
7004 return instance;
7005 } else {
7006 return new Klass(a1, a2, a3);
7007 }
7008 };
7009
7010 var fourArgumentPooler = function (a1, a2, a3, a4) {
7011 var Klass = this;
7012 if (Klass.instancePool.length) {
7013 var instance = Klass.instancePool.pop();
7014 Klass.call(instance, a1, a2, a3, a4);
7015 return instance;
7016 } else {
7017 return new Klass(a1, a2, a3, a4);
7018 }
7019 };
7020
7021 var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
7022 var Klass = this;
7023 if (Klass.instancePool.length) {
7024 var instance = Klass.instancePool.pop();
7025 Klass.call(instance, a1, a2, a3, a4, a5);
7026 return instance;
7027 } else {
7028 return new Klass(a1, a2, a3, a4, a5);
7029 }
7030 };
7031
7032 var standardReleaser = function (instance) {
7033 var Klass = this;
7034 !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : undefined;
7035 instance.destructor();
7036 if (Klass.instancePool.length < Klass.poolSize) {
7037 Klass.instancePool.push(instance);
7038 }
7039 };
7040
7041 var DEFAULT_POOL_SIZE = 10;
7042 var DEFAULT_POOLER = oneArgumentPooler;
7043
7044 /**
7045 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
7046 * itself (statically) not adding any prototypical fields. Any CopyConstructor
7047 * you give this may have a `poolSize` property, and will look for a
7048 * prototypical `destructor` on instances (optional).
7049 *
7050 * @param {Function} CopyConstructor Constructor that can be used to reset.
7051 * @param {Function} pooler Customizable pooler.
7052 */
7053 var addPoolingTo = function (CopyConstructor, pooler) {
7054 var NewKlass = CopyConstructor;
7055 NewKlass.instancePool = [];
7056 NewKlass.getPooled = pooler || DEFAULT_POOLER;
7057 if (!NewKlass.poolSize) {
7058 NewKlass.poolSize = DEFAULT_POOL_SIZE;
7059 }
7060 NewKlass.release = standardReleaser;
7061 return NewKlass;
7062 };
7063
7064 var PooledClass = {
7065 addPoolingTo: addPoolingTo,
7066 oneArgumentPooler: oneArgumentPooler,
7067 twoArgumentPooler: twoArgumentPooler,
7068 threeArgumentPooler: threeArgumentPooler,
7069 fourArgumentPooler: fourArgumentPooler,
7070 fiveArgumentPooler: fiveArgumentPooler
7071 };
7072
7073 module.exports = PooledClass;
7074 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7075
7076/***/ }),
7077/* 58 */
7078/***/ (function(module, exports, __webpack_require__) {
7079
7080 /* WEBPACK VAR INJECTION */(function(process) {/**
7081 * Copyright 2013-2015, Facebook, Inc.
7082 * All rights reserved.
7083 *
7084 * This source code is licensed under the BSD-style license found in the
7085 * LICENSE file in the root directory of this source tree. An additional grant
7086 * of patent rights can be found in the PATENTS file in the same directory.
7087 *
7088 * @providesModule Transaction
7089 */
7090
7091 'use strict';
7092
7093 var invariant = __webpack_require__(14);
7094
7095 /**
7096 * `Transaction` creates a black box that is able to wrap any method such that
7097 * certain invariants are maintained before and after the method is invoked
7098 * (Even if an exception is thrown while invoking the wrapped method). Whoever
7099 * instantiates a transaction can provide enforcers of the invariants at
7100 * creation time. The `Transaction` class itself will supply one additional
7101 * automatic invariant for you - the invariant that any transaction instance
7102 * should not be run while it is already being run. You would typically create a
7103 * single instance of a `Transaction` for reuse multiple times, that potentially
7104 * is used to wrap several different methods. Wrappers are extremely simple -
7105 * they only require implementing two methods.
7106 *
7107 * <pre>
7108 * wrappers (injected at creation time)
7109 * + +
7110 * | |
7111 * +-----------------|--------|--------------+
7112 * | v | |
7113 * | +---------------+ | |
7114 * | +--| wrapper1 |---|----+ |
7115 * | | +---------------+ v | |
7116 * | | +-------------+ | |
7117 * | | +----| wrapper2 |--------+ |
7118 * | | | +-------------+ | | |
7119 * | | | | | |
7120 * | v v v v | wrapper
7121 * | +---+ +---+ +---------+ +---+ +---+ | invariants
7122 * perform(anyMethod) | | | | | | | | | | | | maintained
7123 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
7124 * | | | | | | | | | | | |
7125 * | | | | | | | | | | | |
7126 * | | | | | | | | | | | |
7127 * | +---+ +---+ +---------+ +---+ +---+ |
7128 * | initialize close |
7129 * +-----------------------------------------+
7130 * </pre>
7131 *
7132 * Use cases:
7133 * - Preserving the input selection ranges before/after reconciliation.
7134 * Restoring selection even in the event of an unexpected error.
7135 * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
7136 * while guaranteeing that afterwards, the event system is reactivated.
7137 * - Flushing a queue of collected DOM mutations to the main UI thread after a
7138 * reconciliation takes place in a worker thread.
7139 * - Invoking any collected `componentDidUpdate` callbacks after rendering new
7140 * content.
7141 * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
7142 * to preserve the `scrollTop` (an automatic scroll aware DOM).
7143 * - (Future use case): Layout calculations before and after DOM updates.
7144 *
7145 * Transactional plugin API:
7146 * - A module that has an `initialize` method that returns any precomputation.
7147 * - and a `close` method that accepts the precomputation. `close` is invoked
7148 * when the wrapped process is completed, or has failed.
7149 *
7150 * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
7151 * that implement `initialize` and `close`.
7152 * @return {Transaction} Single transaction for reuse in thread.
7153 *
7154 * @class Transaction
7155 */
7156 var Mixin = {
7157 /**
7158 * Sets up this instance so that it is prepared for collecting metrics. Does
7159 * so such that this setup method may be used on an instance that is already
7160 * initialized, in a way that does not consume additional memory upon reuse.
7161 * That can be useful if you decide to make your subclass of this mixin a
7162 * "PooledClass".
7163 */
7164 reinitializeTransaction: function () {
7165 this.transactionWrappers = this.getTransactionWrappers();
7166 if (this.wrapperInitData) {
7167 this.wrapperInitData.length = 0;
7168 } else {
7169 this.wrapperInitData = [];
7170 }
7171 this._isInTransaction = false;
7172 },
7173
7174 _isInTransaction: false,
7175
7176 /**
7177 * @abstract
7178 * @return {Array<TransactionWrapper>} Array of transaction wrappers.
7179 */
7180 getTransactionWrappers: null,
7181
7182 isInTransaction: function () {
7183 return !!this._isInTransaction;
7184 },
7185
7186 /**
7187 * Executes the function within a safety window. Use this for the top level
7188 * methods that result in large amounts of computation/mutations that would
7189 * need to be safety checked. The optional arguments helps prevent the need
7190 * to bind in many cases.
7191 *
7192 * @param {function} method Member of scope to call.
7193 * @param {Object} scope Scope to invoke from.
7194 * @param {Object?=} a Argument to pass to the method.
7195 * @param {Object?=} b Argument to pass to the method.
7196 * @param {Object?=} c Argument to pass to the method.
7197 * @param {Object?=} d Argument to pass to the method.
7198 * @param {Object?=} e Argument to pass to the method.
7199 * @param {Object?=} f Argument to pass to the method.
7200 *
7201 * @return {*} Return value from `method`.
7202 */
7203 perform: function (method, scope, a, b, c, d, e, f) {
7204 !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : undefined;
7205 var errorThrown;
7206 var ret;
7207 try {
7208 this._isInTransaction = true;
7209 // Catching errors makes debugging more difficult, so we start with
7210 // errorThrown set to true before setting it to false after calling
7211 // close -- if it's still set to true in the finally block, it means
7212 // one of these calls threw.
7213 errorThrown = true;
7214 this.initializeAll(0);
7215 ret = method.call(scope, a, b, c, d, e, f);
7216 errorThrown = false;
7217 } finally {
7218 try {
7219 if (errorThrown) {
7220 // If `method` throws, prefer to show that stack trace over any thrown
7221 // by invoking `closeAll`.
7222 try {
7223 this.closeAll(0);
7224 } catch (err) {}
7225 } else {
7226 // Since `method` didn't throw, we don't want to silence the exception
7227 // here.
7228 this.closeAll(0);
7229 }
7230 } finally {
7231 this._isInTransaction = false;
7232 }
7233 }
7234 return ret;
7235 },
7236
7237 initializeAll: function (startIndex) {
7238 var transactionWrappers = this.transactionWrappers;
7239 for (var i = startIndex; i < transactionWrappers.length; i++) {
7240 var wrapper = transactionWrappers[i];
7241 try {
7242 // Catching errors makes debugging more difficult, so we start with the
7243 // OBSERVED_ERROR state before overwriting it with the real return value
7244 // of initialize -- if it's still set to OBSERVED_ERROR in the finally
7245 // block, it means wrapper.initialize threw.
7246 this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
7247 this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
7248 } finally {
7249 if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {
7250 // The initializer for wrapper i threw an error; initialize the
7251 // remaining wrappers but silence any exceptions from them to ensure
7252 // that the first error is the one to bubble up.
7253 try {
7254 this.initializeAll(i + 1);
7255 } catch (err) {}
7256 }
7257 }
7258 }
7259 },
7260
7261 /**
7262 * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
7263 * them the respective return values of `this.transactionWrappers.init[i]`
7264 * (`close`rs that correspond to initializers that failed will not be
7265 * invoked).
7266 */
7267 closeAll: function (startIndex) {
7268 !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : undefined;
7269 var transactionWrappers = this.transactionWrappers;
7270 for (var i = startIndex; i < transactionWrappers.length; i++) {
7271 var wrapper = transactionWrappers[i];
7272 var initData = this.wrapperInitData[i];
7273 var errorThrown;
7274 try {
7275 // Catching errors makes debugging more difficult, so we start with
7276 // errorThrown set to true before setting it to false after calling
7277 // close -- if it's still set to true in the finally block, it means
7278 // wrapper.close threw.
7279 errorThrown = true;
7280 if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) {
7281 wrapper.close.call(this, initData);
7282 }
7283 errorThrown = false;
7284 } finally {
7285 if (errorThrown) {
7286 // The closer for wrapper i threw an error; close the remaining
7287 // wrappers but silence any exceptions from them to ensure that the
7288 // first error is the one to bubble up.
7289 try {
7290 this.closeAll(i + 1);
7291 } catch (e) {}
7292 }
7293 }
7294 }
7295 this.wrapperInitData.length = 0;
7296 }
7297 };
7298
7299 var Transaction = {
7300
7301 Mixin: Mixin,
7302
7303 /**
7304 * Token to look for to determine if an error occurred.
7305 */
7306 OBSERVED_ERROR: {}
7307
7308 };
7309
7310 module.exports = Transaction;
7311 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7312
7313/***/ }),
7314/* 59 */
7315/***/ (function(module, exports, __webpack_require__) {
7316
7317 /* WEBPACK VAR INJECTION */(function(process) {/**
7318 * Copyright 2013-2015, Facebook, Inc.
7319 * All rights reserved.
7320 *
7321 * This source code is licensed under the BSD-style license found in the
7322 * LICENSE file in the root directory of this source tree. An additional grant
7323 * of patent rights can be found in the PATENTS file in the same directory.
7324 *
7325 * @providesModule emptyObject
7326 */
7327
7328 'use strict';
7329
7330 var emptyObject = {};
7331
7332 if (process.env.NODE_ENV !== 'production') {
7333 Object.freeze(emptyObject);
7334 }
7335
7336 module.exports = emptyObject;
7337 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7338
7339/***/ }),
7340/* 60 */
7341/***/ (function(module, exports, __webpack_require__) {
7342
7343 /**
7344 * Copyright 2013-2015, Facebook, Inc.
7345 * All rights reserved.
7346 *
7347 * This source code is licensed under the BSD-style license found in the
7348 * LICENSE file in the root directory of this source tree. An additional grant
7349 * of patent rights can be found in the PATENTS file in the same directory.
7350 *
7351 * @providesModule containsNode
7352 * @typechecks
7353 */
7354
7355 'use strict';
7356
7357 var isTextNode = __webpack_require__(61);
7358
7359 /*eslint-disable no-bitwise */
7360
7361 /**
7362 * Checks if a given DOM node contains or is another DOM node.
7363 *
7364 * @param {?DOMNode} outerNode Outer DOM node.
7365 * @param {?DOMNode} innerNode Inner DOM node.
7366 * @return {boolean} True if `outerNode` contains or is `innerNode`.
7367 */
7368 function containsNode(_x, _x2) {
7369 var _again = true;
7370
7371 _function: while (_again) {
7372 var outerNode = _x,
7373 innerNode = _x2;
7374 _again = false;
7375
7376 if (!outerNode || !innerNode) {
7377 return false;
7378 } else if (outerNode === innerNode) {
7379 return true;
7380 } else if (isTextNode(outerNode)) {
7381 return false;
7382 } else if (isTextNode(innerNode)) {
7383 _x = outerNode;
7384 _x2 = innerNode.parentNode;
7385 _again = true;
7386 continue _function;
7387 } else if (outerNode.contains) {
7388 return outerNode.contains(innerNode);
7389 } else if (outerNode.compareDocumentPosition) {
7390 return !!(outerNode.compareDocumentPosition(innerNode) & 16);
7391 } else {
7392 return false;
7393 }
7394 }
7395 }
7396
7397 module.exports = containsNode;
7398
7399/***/ }),
7400/* 61 */
7401/***/ (function(module, exports, __webpack_require__) {
7402
7403 /**
7404 * Copyright 2013-2015, Facebook, Inc.
7405 * All rights reserved.
7406 *
7407 * This source code is licensed under the BSD-style license found in the
7408 * LICENSE file in the root directory of this source tree. An additional grant
7409 * of patent rights can be found in the PATENTS file in the same directory.
7410 *
7411 * @providesModule isTextNode
7412 * @typechecks
7413 */
7414
7415 'use strict';
7416
7417 var isNode = __webpack_require__(62);
7418
7419 /**
7420 * @param {*} object The object to check.
7421 * @return {boolean} Whether or not the object is a DOM text node.
7422 */
7423 function isTextNode(object) {
7424 return isNode(object) && object.nodeType == 3;
7425 }
7426
7427 module.exports = isTextNode;
7428
7429/***/ }),
7430/* 62 */
7431/***/ (function(module, exports) {
7432
7433 /**
7434 * Copyright 2013-2015, Facebook, Inc.
7435 * All rights reserved.
7436 *
7437 * This source code is licensed under the BSD-style license found in the
7438 * LICENSE file in the root directory of this source tree. An additional grant
7439 * of patent rights can be found in the PATENTS file in the same directory.
7440 *
7441 * @providesModule isNode
7442 * @typechecks
7443 */
7444
7445 /**
7446 * @param {*} object The object to check.
7447 * @return {boolean} Whether or not the object is a DOM node.
7448 */
7449 'use strict';
7450
7451 function isNode(object) {
7452 return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
7453 }
7454
7455 module.exports = isNode;
7456
7457/***/ }),
7458/* 63 */
7459/***/ (function(module, exports, __webpack_require__) {
7460
7461 /* WEBPACK VAR INJECTION */(function(process) {/**
7462 * Copyright 2013-2015, Facebook, Inc.
7463 * All rights reserved.
7464 *
7465 * This source code is licensed under the BSD-style license found in the
7466 * LICENSE file in the root directory of this source tree. An additional grant
7467 * of patent rights can be found in the PATENTS file in the same directory.
7468 *
7469 * @providesModule instantiateReactComponent
7470 * @typechecks static-only
7471 */
7472
7473 'use strict';
7474
7475 var ReactCompositeComponent = __webpack_require__(64);
7476 var ReactEmptyComponent = __webpack_require__(69);
7477 var ReactNativeComponent = __webpack_require__(70);
7478
7479 var assign = __webpack_require__(40);
7480 var invariant = __webpack_require__(14);
7481 var warning = __webpack_require__(26);
7482
7483 // To avoid a cyclic dependency, we create the final class in this module
7484 var ReactCompositeComponentWrapper = function () {};
7485 assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, {
7486 _instantiateReactComponent: instantiateReactComponent
7487 });
7488
7489 function getDeclarationErrorAddendum(owner) {
7490 if (owner) {
7491 var name = owner.getName();
7492 if (name) {
7493 return ' Check the render method of `' + name + '`.';
7494 }
7495 }
7496 return '';
7497 }
7498
7499 /**
7500 * Check if the type reference is a known internal type. I.e. not a user
7501 * provided composite type.
7502 *
7503 * @param {function} type
7504 * @return {boolean} Returns true if this is a valid internal type.
7505 */
7506 function isInternalComponentType(type) {
7507 return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
7508 }
7509
7510 /**
7511 * Given a ReactNode, create an instance that will actually be mounted.
7512 *
7513 * @param {ReactNode} node
7514 * @return {object} A new instance of the element's constructor.
7515 * @protected
7516 */
7517 function instantiateReactComponent(node) {
7518 var instance;
7519
7520 if (node === null || node === false) {
7521 instance = new ReactEmptyComponent(instantiateReactComponent);
7522 } else if (typeof node === 'object') {
7523 var element = node;
7524 !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) ' + 'or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : invariant(false) : undefined;
7525
7526 // Special case string values
7527 if (typeof element.type === 'string') {
7528 instance = ReactNativeComponent.createInternalComponent(element);
7529 } else if (isInternalComponentType(element.type)) {
7530 // This is temporarily available for custom components that are not string
7531 // representations. I.e. ART. Once those are updated to use the string
7532 // representation, we can drop this code path.
7533 instance = new element.type(element);
7534 } else {
7535 instance = new ReactCompositeComponentWrapper();
7536 }
7537 } else if (typeof node === 'string' || typeof node === 'number') {
7538 instance = ReactNativeComponent.createInstanceForText(node);
7539 } else {
7540 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false) : undefined;
7541 }
7542
7543 if (process.env.NODE_ENV !== 'production') {
7544 process.env.NODE_ENV !== 'production' ? warning(typeof instance.construct === 'function' && typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : undefined;
7545 }
7546
7547 // Sets up the instance. This can probably just move into the constructor now.
7548 instance.construct(node);
7549
7550 // These two fields are used by the DOM and ART diffing algorithms
7551 // respectively. Instead of using expandos on components, we should be
7552 // storing the state needed by the diffing algorithms elsewhere.
7553 instance._mountIndex = 0;
7554 instance._mountImage = null;
7555
7556 if (process.env.NODE_ENV !== 'production') {
7557 instance._isOwnerNecessary = false;
7558 instance._warnedAboutRefsInRender = false;
7559 }
7560
7561 // Internal instances should fully constructed at this point, so they should
7562 // not get any new fields added to them at this point.
7563 if (process.env.NODE_ENV !== 'production') {
7564 if (Object.preventExtensions) {
7565 Object.preventExtensions(instance);
7566 }
7567 }
7568
7569 return instance;
7570 }
7571
7572 module.exports = instantiateReactComponent;
7573 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
7574
7575/***/ }),
7576/* 64 */
7577/***/ (function(module, exports, __webpack_require__) {
7578
7579 /* WEBPACK VAR INJECTION */(function(process) {/**
7580 * Copyright 2013-2015, Facebook, Inc.
7581 * All rights reserved.
7582 *
7583 * This source code is licensed under the BSD-style license found in the
7584 * LICENSE file in the root directory of this source tree. An additional grant
7585 * of patent rights can be found in the PATENTS file in the same directory.
7586 *
7587 * @providesModule ReactCompositeComponent
7588 */
7589
7590 'use strict';
7591
7592 var ReactComponentEnvironment = __webpack_require__(65);
7593 var ReactCurrentOwner = __webpack_require__(6);
7594 var ReactElement = __webpack_require__(43);
7595 var ReactInstanceMap = __webpack_require__(48);
7596 var ReactPerf = __webpack_require__(19);
7597 var ReactPropTypeLocations = __webpack_require__(66);
7598 var ReactPropTypeLocationNames = __webpack_require__(67);
7599 var ReactReconciler = __webpack_require__(51);
7600 var ReactUpdateQueue = __webpack_require__(54);
7601
7602 var assign = __webpack_require__(40);
7603 var emptyObject = __webpack_require__(59);
7604 var invariant = __webpack_require__(14);
7605 var shouldUpdateReactComponent = __webpack_require__(68);
7606 var warning = __webpack_require__(26);
7607
7608 function getDeclarationErrorAddendum(component) {
7609 var owner = component._currentElement._owner || null;
7610 if (owner) {
7611 var name = owner.getName();
7612 if (name) {
7613 return ' Check the render method of `' + name + '`.';
7614 }
7615 }
7616 return '';
7617 }
7618
7619 function StatelessComponent(Component) {}
7620 StatelessComponent.prototype.render = function () {
7621 var Component = ReactInstanceMap.get(this)._currentElement.type;
7622 return Component(this.props, this.context, this.updater);
7623 };
7624
7625 /**
7626 * ------------------ The Life-Cycle of a Composite Component ------------------
7627 *
7628 * - constructor: Initialization of state. The instance is now retained.
7629 * - componentWillMount
7630 * - render
7631 * - [children's constructors]
7632 * - [children's componentWillMount and render]
7633 * - [children's componentDidMount]
7634 * - componentDidMount
7635 *
7636 * Update Phases:
7637 * - componentWillReceiveProps (only called if parent updated)
7638 * - shouldComponentUpdate
7639 * - componentWillUpdate
7640 * - render
7641 * - [children's constructors or receive props phases]
7642 * - componentDidUpdate
7643 *
7644 * - componentWillUnmount
7645 * - [children's componentWillUnmount]
7646 * - [children destroyed]
7647 * - (destroyed): The instance is now blank, released by React and ready for GC.
7648 *
7649 * -----------------------------------------------------------------------------
7650 */
7651
7652 /**
7653 * An incrementing ID assigned to each component when it is mounted. This is
7654 * used to enforce the order in which `ReactUpdates` updates dirty components.
7655 *
7656 * @private
7657 */
7658 var nextMountID = 1;
7659
7660 /**
7661 * @lends {ReactCompositeComponent.prototype}
7662 */
7663 var ReactCompositeComponentMixin = {
7664
7665 /**
7666 * Base constructor for all composite component.
7667 *
7668 * @param {ReactElement} element
7669 * @final
7670 * @internal
7671 */
7672 construct: function (element) {
7673 this._currentElement = element;
7674 this._rootNodeID = null;
7675 this._instance = null;
7676
7677 // See ReactUpdateQueue
7678 this._pendingElement = null;
7679 this._pendingStateQueue = null;
7680 this._pendingReplaceState = false;
7681 this._pendingForceUpdate = false;
7682
7683 this._renderedComponent = null;
7684
7685 this._context = null;
7686 this._mountOrder = 0;
7687 this._topLevelWrapper = null;
7688
7689 // See ReactUpdates and ReactUpdateQueue.
7690 this._pendingCallbacks = null;
7691 },
7692
7693 /**
7694 * Initializes the component, renders markup, and registers event listeners.
7695 *
7696 * @param {string} rootID DOM ID of the root node.
7697 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
7698 * @return {?string} Rendered markup to be inserted into the DOM.
7699 * @final
7700 * @internal
7701 */
7702 mountComponent: function (rootID, transaction, context) {
7703 this._context = context;
7704 this._mountOrder = nextMountID++;
7705 this._rootNodeID = rootID;
7706
7707 var publicProps = this._processProps(this._currentElement.props);
7708 var publicContext = this._processContext(context);
7709
7710 var Component = this._currentElement.type;
7711
7712 // Initialize the public class
7713 var inst;
7714 var renderedElement;
7715
7716 // This is a way to detect if Component is a stateless arrow function
7717 // component, which is not newable. It might not be 100% reliable but is
7718 // something we can do until we start detecting that Component extends
7719 // React.Component. We already assume that typeof Component === 'function'.
7720 var canInstantiate = ('prototype' in Component);
7721
7722 if (canInstantiate) {
7723 if (process.env.NODE_ENV !== 'production') {
7724 ReactCurrentOwner.current = this;
7725 try {
7726 inst = new Component(publicProps, publicContext, ReactUpdateQueue);
7727 } finally {
7728 ReactCurrentOwner.current = null;
7729 }
7730 } else {
7731 inst = new Component(publicProps, publicContext, ReactUpdateQueue);
7732 }
7733 }
7734
7735 if (!canInstantiate || inst === null || inst === false || ReactElement.isValidElement(inst)) {
7736 renderedElement = inst;
7737 inst = new StatelessComponent(Component);
7738 }
7739
7740 if (process.env.NODE_ENV !== 'production') {
7741 // This will throw later in _renderValidatedComponent, but add an early
7742 // warning now to help debugging
7743 if (inst.render == null) {
7744 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`, returned ' + 'null/false from a stateless component, or tried to render an ' + 'element whose type is a function that isn\'t a React component.', Component.displayName || Component.name || 'Component') : undefined;
7745 } else {
7746 // We support ES6 inheriting from React.Component, the module pattern,
7747 // and stateless components, but not ES6 classes that don't extend
7748 process.env.NODE_ENV !== 'production' ? warning(Component.prototype && Component.prototype.isReactComponent || !canInstantiate || !(inst instanceof Component), '%s(...): React component classes must extend React.Component.', Component.displayName || Component.name || 'Component') : undefined;
7749 }
7750 }
7751
7752 // These should be set up in the constructor, but as a convenience for
7753 // simpler class abstractions, we set them up after the fact.
7754 inst.props = publicProps;
7755 inst.context = publicContext;
7756 inst.refs = emptyObject;
7757 inst.updater = ReactUpdateQueue;
7758
7759 this._instance = inst;
7760
7761 // Store a reference from the instance back to the internal representation
7762 ReactInstanceMap.set(inst, this);
7763
7764 if (process.env.NODE_ENV !== 'production') {
7765 // Since plain JS classes are defined without any special initialization
7766 // logic, we can not catch common errors early. Therefore, we have to
7767 // catch them here, at initialization time, instead.
7768 process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, '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') : undefined;
7769 process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : undefined;
7770 process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : undefined;
7771 process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : undefined;
7772 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : undefined;
7773 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : undefined;
7774 process.env.NODE_ENV !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : undefined;
7775 }
7776
7777 var initialState = inst.state;
7778 if (initialState === undefined) {
7779 inst.state = initialState = null;
7780 }
7781 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
7782
7783 this._pendingStateQueue = null;
7784 this._pendingReplaceState = false;
7785 this._pendingForceUpdate = false;
7786
7787 if (inst.componentWillMount) {
7788 inst.componentWillMount();
7789 // When mounting, calls to `setState` by `componentWillMount` will set
7790 // `this._pendingStateQueue` without triggering a re-render.
7791 if (this._pendingStateQueue) {
7792 inst.state = this._processPendingState(inst.props, inst.context);
7793 }
7794 }
7795
7796 // If not a stateless component, we now render
7797 if (renderedElement === undefined) {
7798 renderedElement = this._renderValidatedComponent();
7799 }
7800
7801 this._renderedComponent = this._instantiateReactComponent(renderedElement);
7802
7803 var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._processChildContext(context));
7804 if (inst.componentDidMount) {
7805 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
7806 }
7807
7808 return markup;
7809 },
7810
7811 /**
7812 * Releases any resources allocated by `mountComponent`.
7813 *
7814 * @final
7815 * @internal
7816 */
7817 unmountComponent: function () {
7818 var inst = this._instance;
7819
7820 if (inst.componentWillUnmount) {
7821 inst.componentWillUnmount();
7822 }
7823
7824 ReactReconciler.unmountComponent(this._renderedComponent);
7825 this._renderedComponent = null;
7826 this._instance = null;
7827
7828 // Reset pending fields
7829 // Even if this component is scheduled for another update in ReactUpdates,
7830 // it would still be ignored because these fields are reset.
7831 this._pendingStateQueue = null;
7832 this._pendingReplaceState = false;
7833 this._pendingForceUpdate = false;
7834 this._pendingCallbacks = null;
7835 this._pendingElement = null;
7836
7837 // These fields do not really need to be reset since this object is no
7838 // longer accessible.
7839 this._context = null;
7840 this._rootNodeID = null;
7841 this._topLevelWrapper = null;
7842
7843 // Delete the reference from the instance to this internal representation
7844 // which allow the internals to be properly cleaned up even if the user
7845 // leaks a reference to the public instance.
7846 ReactInstanceMap.remove(inst);
7847
7848 // Some existing components rely on inst.props even after they've been
7849 // destroyed (in event handlers).
7850 // TODO: inst.props = null;
7851 // TODO: inst.state = null;
7852 // TODO: inst.context = null;
7853 },
7854
7855 /**
7856 * Filters the context object to only contain keys specified in
7857 * `contextTypes`
7858 *
7859 * @param {object} context
7860 * @return {?object}
7861 * @private
7862 */
7863 _maskContext: function (context) {
7864 var maskedContext = null;
7865 var Component = this._currentElement.type;
7866 var contextTypes = Component.contextTypes;
7867 if (!contextTypes) {
7868 return emptyObject;
7869 }
7870 maskedContext = {};
7871 for (var contextName in contextTypes) {
7872 maskedContext[contextName] = context[contextName];
7873 }
7874 return maskedContext;
7875 },
7876
7877 /**
7878 * Filters the context object to only contain keys specified in
7879 * `contextTypes`, and asserts that they are valid.
7880 *
7881 * @param {object} context
7882 * @return {?object}
7883 * @private
7884 */
7885 _processContext: function (context) {
7886 var maskedContext = this._maskContext(context);
7887 if (process.env.NODE_ENV !== 'production') {
7888 var Component = this._currentElement.type;
7889 if (Component.contextTypes) {
7890 this._checkPropTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
7891 }
7892 }
7893 return maskedContext;
7894 },
7895
7896 /**
7897 * @param {object} currentContext
7898 * @return {object}
7899 * @private
7900 */
7901 _processChildContext: function (currentContext) {
7902 var Component = this._currentElement.type;
7903 var inst = this._instance;
7904 var childContext = inst.getChildContext && inst.getChildContext();
7905 if (childContext) {
7906 !(typeof Component.childContextTypes === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
7907 if (process.env.NODE_ENV !== 'production') {
7908 this._checkPropTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext);
7909 }
7910 for (var name in childContext) {
7911 !(name in Component.childContextTypes) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(false) : undefined;
7912 }
7913 return assign({}, currentContext, childContext);
7914 }
7915 return currentContext;
7916 },
7917
7918 /**
7919 * Processes props by setting default values for unspecified props and
7920 * asserting that the props are valid. Does not mutate its argument; returns
7921 * a new props object with defaults merged in.
7922 *
7923 * @param {object} newProps
7924 * @return {object}
7925 * @private
7926 */
7927 _processProps: function (newProps) {
7928 if (process.env.NODE_ENV !== 'production') {
7929 var Component = this._currentElement.type;
7930 if (Component.propTypes) {
7931 this._checkPropTypes(Component.propTypes, newProps, ReactPropTypeLocations.prop);
7932 }
7933 }
7934 return newProps;
7935 },
7936
7937 /**
7938 * Assert that the props are valid
7939 *
7940 * @param {object} propTypes Map of prop name to a ReactPropType
7941 * @param {object} props
7942 * @param {string} location e.g. "prop", "context", "child context"
7943 * @private
7944 */
7945 _checkPropTypes: function (propTypes, props, location) {
7946 // TODO: Stop validating prop types here and only use the element
7947 // validation.
7948 var componentName = this.getName();
7949 for (var propName in propTypes) {
7950 if (propTypes.hasOwnProperty(propName)) {
7951 var error;
7952 try {
7953 // This is intentionally an invariant that gets caught. It's the same
7954 // behavior as without this statement except with a better message.
7955 !(typeof propTypes[propName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined;
7956 error = propTypes[propName](props, propName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
7957 } catch (ex) {
7958 error = ex;
7959 }
7960 if (error instanceof Error) {
7961 // We may want to extend this logic for similar errors in
7962 // top-level render calls, so I'm abstracting it away into
7963 // a function to minimize refactoring in the future
7964 var addendum = getDeclarationErrorAddendum(this);
7965
7966 if (location === ReactPropTypeLocations.prop) {
7967 // Preface gives us something to blacklist in warning module
7968 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : undefined;
7969 } else {
7970 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : undefined;
7971 }
7972 }
7973 }
7974 }
7975 },
7976
7977 receiveComponent: function (nextElement, transaction, nextContext) {
7978 var prevElement = this._currentElement;
7979 var prevContext = this._context;
7980
7981 this._pendingElement = null;
7982
7983 this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
7984 },
7985
7986 /**
7987 * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
7988 * is set, update the component.
7989 *
7990 * @param {ReactReconcileTransaction} transaction
7991 * @internal
7992 */
7993 performUpdateIfNecessary: function (transaction) {
7994 if (this._pendingElement != null) {
7995 ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context);
7996 }
7997
7998 if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
7999 this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
8000 }
8001 },
8002
8003 /**
8004 * Perform an update to a mounted component. The componentWillReceiveProps and
8005 * shouldComponentUpdate methods are called, then (assuming the update isn't
8006 * skipped) the remaining update lifecycle methods are called and the DOM
8007 * representation is updated.
8008 *
8009 * By default, this implements React's rendering and reconciliation algorithm.
8010 * Sophisticated clients may wish to override this.
8011 *
8012 * @param {ReactReconcileTransaction} transaction
8013 * @param {ReactElement} prevParentElement
8014 * @param {ReactElement} nextParentElement
8015 * @internal
8016 * @overridable
8017 */
8018 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
8019 var inst = this._instance;
8020
8021 var nextContext = this._context === nextUnmaskedContext ? inst.context : this._processContext(nextUnmaskedContext);
8022 var nextProps;
8023
8024 // Distinguish between a props update versus a simple state update
8025 if (prevParentElement === nextParentElement) {
8026 // Skip checking prop types again -- we don't read inst.props to avoid
8027 // warning for DOM component props in this upgrade
8028 nextProps = nextParentElement.props;
8029 } else {
8030 nextProps = this._processProps(nextParentElement.props);
8031 // An update here will schedule an update but immediately set
8032 // _pendingStateQueue which will ensure that any state updates gets
8033 // immediately reconciled instead of waiting for the next batch.
8034
8035 if (inst.componentWillReceiveProps) {
8036 inst.componentWillReceiveProps(nextProps, nextContext);
8037 }
8038 }
8039
8040 var nextState = this._processPendingState(nextProps, nextContext);
8041
8042 var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext);
8043
8044 if (process.env.NODE_ENV !== 'production') {
8045 process.env.NODE_ENV !== 'production' ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : undefined;
8046 }
8047
8048 if (shouldUpdate) {
8049 this._pendingForceUpdate = false;
8050 // Will set `this.props`, `this.state` and `this.context`.
8051 this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
8052 } else {
8053 // If it's determined that a component should not update, we still want
8054 // to set props and state but we shortcut the rest of the update.
8055 this._currentElement = nextParentElement;
8056 this._context = nextUnmaskedContext;
8057 inst.props = nextProps;
8058 inst.state = nextState;
8059 inst.context = nextContext;
8060 }
8061 },
8062
8063 _processPendingState: function (props, context) {
8064 var inst = this._instance;
8065 var queue = this._pendingStateQueue;
8066 var replace = this._pendingReplaceState;
8067 this._pendingReplaceState = false;
8068 this._pendingStateQueue = null;
8069
8070 if (!queue) {
8071 return inst.state;
8072 }
8073
8074 if (replace && queue.length === 1) {
8075 return queue[0];
8076 }
8077
8078 var nextState = assign({}, replace ? queue[0] : inst.state);
8079 for (var i = replace ? 1 : 0; i < queue.length; i++) {
8080 var partial = queue[i];
8081 assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
8082 }
8083
8084 return nextState;
8085 },
8086
8087 /**
8088 * Merges new props and state, notifies delegate methods of update and
8089 * performs update.
8090 *
8091 * @param {ReactElement} nextElement Next element
8092 * @param {object} nextProps Next public object to set as properties.
8093 * @param {?object} nextState Next object to set as state.
8094 * @param {?object} nextContext Next public object to set as context.
8095 * @param {ReactReconcileTransaction} transaction
8096 * @param {?object} unmaskedContext
8097 * @private
8098 */
8099 _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
8100 var inst = this._instance;
8101
8102 var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
8103 var prevProps;
8104 var prevState;
8105 var prevContext;
8106 if (hasComponentDidUpdate) {
8107 prevProps = inst.props;
8108 prevState = inst.state;
8109 prevContext = inst.context;
8110 }
8111
8112 if (inst.componentWillUpdate) {
8113 inst.componentWillUpdate(nextProps, nextState, nextContext);
8114 }
8115
8116 this._currentElement = nextElement;
8117 this._context = unmaskedContext;
8118 inst.props = nextProps;
8119 inst.state = nextState;
8120 inst.context = nextContext;
8121
8122 this._updateRenderedComponent(transaction, unmaskedContext);
8123
8124 if (hasComponentDidUpdate) {
8125 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
8126 }
8127 },
8128
8129 /**
8130 * Call the component's `render` method and update the DOM accordingly.
8131 *
8132 * @param {ReactReconcileTransaction} transaction
8133 * @internal
8134 */
8135 _updateRenderedComponent: function (transaction, context) {
8136 var prevComponentInstance = this._renderedComponent;
8137 var prevRenderedElement = prevComponentInstance._currentElement;
8138 var nextRenderedElement = this._renderValidatedComponent();
8139 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
8140 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
8141 } else {
8142 // These two IDs are actually the same! But nothing should rely on that.
8143 var thisID = this._rootNodeID;
8144 var prevComponentID = prevComponentInstance._rootNodeID;
8145 ReactReconciler.unmountComponent(prevComponentInstance);
8146
8147 this._renderedComponent = this._instantiateReactComponent(nextRenderedElement);
8148 var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._processChildContext(context));
8149 this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
8150 }
8151 },
8152
8153 /**
8154 * @protected
8155 */
8156 _replaceNodeWithMarkupByID: function (prevComponentID, nextMarkup) {
8157 ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
8158 },
8159
8160 /**
8161 * @protected
8162 */
8163 _renderValidatedComponentWithoutOwnerOrContext: function () {
8164 var inst = this._instance;
8165 var renderedComponent = inst.render();
8166 if (process.env.NODE_ENV !== 'production') {
8167 // We allow auto-mocks to proceed as if they're returning null.
8168 if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) {
8169 // This is probably bad practice. Consider warning here and
8170 // deprecating this convenience.
8171 renderedComponent = null;
8172 }
8173 }
8174
8175 return renderedComponent;
8176 },
8177
8178 /**
8179 * @private
8180 */
8181 _renderValidatedComponent: function () {
8182 var renderedComponent;
8183 ReactCurrentOwner.current = this;
8184 try {
8185 renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
8186 } finally {
8187 ReactCurrentOwner.current = null;
8188 }
8189 !(
8190 // TODO: An `isValidNode` function would probably be more appropriate
8191 renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
8192 return renderedComponent;
8193 },
8194
8195 /**
8196 * Lazily allocates the refs object and stores `component` as `ref`.
8197 *
8198 * @param {string} ref Reference name.
8199 * @param {component} component Component to store as `ref`.
8200 * @final
8201 * @private
8202 */
8203 attachRef: function (ref, component) {
8204 var inst = this.getPublicInstance();
8205 !(inst != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : invariant(false) : undefined;
8206 var publicComponentInstance = component.getPublicInstance();
8207 if (process.env.NODE_ENV !== 'production') {
8208 var componentName = component && component.getName ? component.getName() : 'a component';
8209 process.env.NODE_ENV !== 'production' ? warning(publicComponentInstance != null, '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()) : undefined;
8210 }
8211 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
8212 refs[ref] = publicComponentInstance;
8213 },
8214
8215 /**
8216 * Detaches a reference name.
8217 *
8218 * @param {string} ref Name to dereference.
8219 * @final
8220 * @private
8221 */
8222 detachRef: function (ref) {
8223 var refs = this.getPublicInstance().refs;
8224 delete refs[ref];
8225 },
8226
8227 /**
8228 * Get a text description of the component that can be used to identify it
8229 * in error messages.
8230 * @return {string} The name or null.
8231 * @internal
8232 */
8233 getName: function () {
8234 var type = this._currentElement.type;
8235 var constructor = this._instance && this._instance.constructor;
8236 return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
8237 },
8238
8239 /**
8240 * Get the publicly accessible representation of this component - i.e. what
8241 * is exposed by refs and returned by render. Can be null for stateless
8242 * components.
8243 *
8244 * @return {ReactComponent} the public component instance.
8245 * @internal
8246 */
8247 getPublicInstance: function () {
8248 var inst = this._instance;
8249 if (inst instanceof StatelessComponent) {
8250 return null;
8251 }
8252 return inst;
8253 },
8254
8255 // Stub
8256 _instantiateReactComponent: null
8257
8258 };
8259
8260 ReactPerf.measureMethods(ReactCompositeComponentMixin, 'ReactCompositeComponent', {
8261 mountComponent: 'mountComponent',
8262 updateComponent: 'updateComponent',
8263 _renderValidatedComponent: '_renderValidatedComponent'
8264 });
8265
8266 var ReactCompositeComponent = {
8267
8268 Mixin: ReactCompositeComponentMixin
8269
8270 };
8271
8272 module.exports = ReactCompositeComponent;
8273 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8274
8275/***/ }),
8276/* 65 */
8277/***/ (function(module, exports, __webpack_require__) {
8278
8279 /* WEBPACK VAR INJECTION */(function(process) {/**
8280 * Copyright 2014-2015, Facebook, Inc.
8281 * All rights reserved.
8282 *
8283 * This source code is licensed under the BSD-style license found in the
8284 * LICENSE file in the root directory of this source tree. An additional grant
8285 * of patent rights can be found in the PATENTS file in the same directory.
8286 *
8287 * @providesModule ReactComponentEnvironment
8288 */
8289
8290 'use strict';
8291
8292 var invariant = __webpack_require__(14);
8293
8294 var injected = false;
8295
8296 var ReactComponentEnvironment = {
8297
8298 /**
8299 * Optionally injectable environment dependent cleanup hook. (server vs.
8300 * browser etc). Example: A browser system caches DOM nodes based on component
8301 * ID and must remove that cache entry when this instance is unmounted.
8302 */
8303 unmountIDFromEnvironment: null,
8304
8305 /**
8306 * Optionally injectable hook for swapping out mount images in the middle of
8307 * the tree.
8308 */
8309 replaceNodeWithMarkupByID: null,
8310
8311 /**
8312 * Optionally injectable hook for processing a queue of child updates. Will
8313 * later move into MultiChildComponents.
8314 */
8315 processChildrenUpdates: null,
8316
8317 injection: {
8318 injectEnvironment: function (environment) {
8319 !!injected ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(false) : undefined;
8320 ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment;
8321 ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID;
8322 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
8323 injected = true;
8324 }
8325 }
8326
8327 };
8328
8329 module.exports = ReactComponentEnvironment;
8330 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8331
8332/***/ }),
8333/* 66 */
8334/***/ (function(module, exports, __webpack_require__) {
8335
8336 /**
8337 * Copyright 2013-2015, Facebook, Inc.
8338 * All rights reserved.
8339 *
8340 * This source code is licensed under the BSD-style license found in the
8341 * LICENSE file in the root directory of this source tree. An additional grant
8342 * of patent rights can be found in the PATENTS file in the same directory.
8343 *
8344 * @providesModule ReactPropTypeLocations
8345 */
8346
8347 'use strict';
8348
8349 var keyMirror = __webpack_require__(18);
8350
8351 var ReactPropTypeLocations = keyMirror({
8352 prop: null,
8353 context: null,
8354 childContext: null
8355 });
8356
8357 module.exports = ReactPropTypeLocations;
8358
8359/***/ }),
8360/* 67 */
8361/***/ (function(module, exports, __webpack_require__) {
8362
8363 /* WEBPACK VAR INJECTION */(function(process) {/**
8364 * Copyright 2013-2015, Facebook, Inc.
8365 * All rights reserved.
8366 *
8367 * This source code is licensed under the BSD-style license found in the
8368 * LICENSE file in the root directory of this source tree. An additional grant
8369 * of patent rights can be found in the PATENTS file in the same directory.
8370 *
8371 * @providesModule ReactPropTypeLocationNames
8372 */
8373
8374 'use strict';
8375
8376 var ReactPropTypeLocationNames = {};
8377
8378 if (process.env.NODE_ENV !== 'production') {
8379 ReactPropTypeLocationNames = {
8380 prop: 'prop',
8381 context: 'context',
8382 childContext: 'child context'
8383 };
8384 }
8385
8386 module.exports = ReactPropTypeLocationNames;
8387 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8388
8389/***/ }),
8390/* 68 */
8391/***/ (function(module, exports) {
8392
8393 /**
8394 * Copyright 2013-2015, Facebook, Inc.
8395 * All rights reserved.
8396 *
8397 * This source code is licensed under the BSD-style license found in the
8398 * LICENSE file in the root directory of this source tree. An additional grant
8399 * of patent rights can be found in the PATENTS file in the same directory.
8400 *
8401 * @providesModule shouldUpdateReactComponent
8402 * @typechecks static-only
8403 */
8404
8405 'use strict';
8406
8407 /**
8408 * Given a `prevElement` and `nextElement`, determines if the existing
8409 * instance should be updated as opposed to being destroyed or replaced by a new
8410 * instance. Both arguments are elements. This ensures that this logic can
8411 * operate on stateless trees without any backing instance.
8412 *
8413 * @param {?object} prevElement
8414 * @param {?object} nextElement
8415 * @return {boolean} True if the existing instance should be updated.
8416 * @protected
8417 */
8418 function shouldUpdateReactComponent(prevElement, nextElement) {
8419 var prevEmpty = prevElement === null || prevElement === false;
8420 var nextEmpty = nextElement === null || nextElement === false;
8421 if (prevEmpty || nextEmpty) {
8422 return prevEmpty === nextEmpty;
8423 }
8424
8425 var prevType = typeof prevElement;
8426 var nextType = typeof nextElement;
8427 if (prevType === 'string' || prevType === 'number') {
8428 return nextType === 'string' || nextType === 'number';
8429 } else {
8430 return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
8431 }
8432 return false;
8433 }
8434
8435 module.exports = shouldUpdateReactComponent;
8436
8437/***/ }),
8438/* 69 */
8439/***/ (function(module, exports, __webpack_require__) {
8440
8441 /**
8442 * Copyright 2014-2015, Facebook, Inc.
8443 * All rights reserved.
8444 *
8445 * This source code is licensed under the BSD-style license found in the
8446 * LICENSE file in the root directory of this source tree. An additional grant
8447 * of patent rights can be found in the PATENTS file in the same directory.
8448 *
8449 * @providesModule ReactEmptyComponent
8450 */
8451
8452 'use strict';
8453
8454 var ReactElement = __webpack_require__(43);
8455 var ReactEmptyComponentRegistry = __webpack_require__(45);
8456 var ReactReconciler = __webpack_require__(51);
8457
8458 var assign = __webpack_require__(40);
8459
8460 var placeholderElement;
8461
8462 var ReactEmptyComponentInjection = {
8463 injectEmptyComponent: function (component) {
8464 placeholderElement = ReactElement.createElement(component);
8465 }
8466 };
8467
8468 function registerNullComponentID() {
8469 ReactEmptyComponentRegistry.registerNullComponentID(this._rootNodeID);
8470 }
8471
8472 var ReactEmptyComponent = function (instantiate) {
8473 this._currentElement = null;
8474 this._rootNodeID = null;
8475 this._renderedComponent = instantiate(placeholderElement);
8476 };
8477 assign(ReactEmptyComponent.prototype, {
8478 construct: function (element) {},
8479 mountComponent: function (rootID, transaction, context) {
8480 transaction.getReactMountReady().enqueue(registerNullComponentID, this);
8481 this._rootNodeID = rootID;
8482 return ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, context);
8483 },
8484 receiveComponent: function () {},
8485 unmountComponent: function (rootID, transaction, context) {
8486 ReactReconciler.unmountComponent(this._renderedComponent);
8487 ReactEmptyComponentRegistry.deregisterNullComponentID(this._rootNodeID);
8488 this._rootNodeID = null;
8489 this._renderedComponent = null;
8490 }
8491 });
8492
8493 ReactEmptyComponent.injection = ReactEmptyComponentInjection;
8494
8495 module.exports = ReactEmptyComponent;
8496
8497/***/ }),
8498/* 70 */
8499/***/ (function(module, exports, __webpack_require__) {
8500
8501 /* WEBPACK VAR INJECTION */(function(process) {/**
8502 * Copyright 2014-2015, Facebook, Inc.
8503 * All rights reserved.
8504 *
8505 * This source code is licensed under the BSD-style license found in the
8506 * LICENSE file in the root directory of this source tree. An additional grant
8507 * of patent rights can be found in the PATENTS file in the same directory.
8508 *
8509 * @providesModule ReactNativeComponent
8510 */
8511
8512 'use strict';
8513
8514 var assign = __webpack_require__(40);
8515 var invariant = __webpack_require__(14);
8516
8517 var autoGenerateWrapperClass = null;
8518 var genericComponentClass = null;
8519 // This registry keeps track of wrapper classes around native tags.
8520 var tagToComponentClass = {};
8521 var textComponentClass = null;
8522
8523 var ReactNativeComponentInjection = {
8524 // This accepts a class that receives the tag string. This is a catch all
8525 // that can render any kind of tag.
8526 injectGenericComponentClass: function (componentClass) {
8527 genericComponentClass = componentClass;
8528 },
8529 // This accepts a text component class that takes the text string to be
8530 // rendered as props.
8531 injectTextComponentClass: function (componentClass) {
8532 textComponentClass = componentClass;
8533 },
8534 // This accepts a keyed object with classes as values. Each key represents a
8535 // tag. That particular tag will use this class instead of the generic one.
8536 injectComponentClasses: function (componentClasses) {
8537 assign(tagToComponentClass, componentClasses);
8538 }
8539 };
8540
8541 /**
8542 * Get a composite component wrapper class for a specific tag.
8543 *
8544 * @param {ReactElement} element The tag for which to get the class.
8545 * @return {function} The React class constructor function.
8546 */
8547 function getComponentClassForElement(element) {
8548 if (typeof element.type === 'function') {
8549 return element.type;
8550 }
8551 var tag = element.type;
8552 var componentClass = tagToComponentClass[tag];
8553 if (componentClass == null) {
8554 tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag);
8555 }
8556 return componentClass;
8557 }
8558
8559 /**
8560 * Get a native internal component class for a specific tag.
8561 *
8562 * @param {ReactElement} element The element to create.
8563 * @return {function} The internal class constructor function.
8564 */
8565 function createInternalComponent(element) {
8566 !genericComponentClass ? process.env.NODE_ENV !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : invariant(false) : undefined;
8567 return new genericComponentClass(element.type, element.props);
8568 }
8569
8570 /**
8571 * @param {ReactText} text
8572 * @return {ReactComponent}
8573 */
8574 function createInstanceForText(text) {
8575 return new textComponentClass(text);
8576 }
8577
8578 /**
8579 * @param {ReactComponent} component
8580 * @return {boolean}
8581 */
8582 function isTextComponent(component) {
8583 return component instanceof textComponentClass;
8584 }
8585
8586 var ReactNativeComponent = {
8587 getComponentClassForElement: getComponentClassForElement,
8588 createInternalComponent: createInternalComponent,
8589 createInstanceForText: createInstanceForText,
8590 isTextComponent: isTextComponent,
8591 injection: ReactNativeComponentInjection
8592 };
8593
8594 module.exports = ReactNativeComponent;
8595 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8596
8597/***/ }),
8598/* 71 */
8599/***/ (function(module, exports, __webpack_require__) {
8600
8601 /* WEBPACK VAR INJECTION */(function(process) {/**
8602 * Copyright 2015, Facebook, Inc.
8603 * All rights reserved.
8604 *
8605 * This source code is licensed under the BSD-style license found in the
8606 * LICENSE file in the root directory of this source tree. An additional grant
8607 * of patent rights can be found in the PATENTS file in the same directory.
8608 *
8609 * @providesModule validateDOMNesting
8610 */
8611
8612 'use strict';
8613
8614 var assign = __webpack_require__(40);
8615 var emptyFunction = __webpack_require__(16);
8616 var warning = __webpack_require__(26);
8617
8618 var validateDOMNesting = emptyFunction;
8619
8620 if (process.env.NODE_ENV !== 'production') {
8621 // This validation code was written based on the HTML5 parsing spec:
8622 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
8623 //
8624 // Note: this does not catch all invalid nesting, nor does it try to (as it's
8625 // not clear what practical benefit doing so provides); instead, we warn only
8626 // for cases where the parser will give a parse tree differing from what React
8627 // intended. For example, <b><div></div></b> is invalid but we don't warn
8628 // because it still parses correctly; we do warn for other cases like nested
8629 // <p> tags where the beginning of the second element implicitly closes the
8630 // first, causing a confusing mess.
8631
8632 // https://html.spec.whatwg.org/multipage/syntax.html#special
8633 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'];
8634
8635 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
8636 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
8637
8638 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
8639 // TODO: Distinguish by namespace here -- for <title>, including it here
8640 // errs on the side of fewer warnings
8641 'foreignObject', 'desc', 'title'];
8642
8643 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
8644 var buttonScopeTags = inScopeTags.concat(['button']);
8645
8646 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
8647 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
8648
8649 var emptyAncestorInfo = {
8650 parentTag: null,
8651
8652 formTag: null,
8653 aTagInScope: null,
8654 buttonTagInScope: null,
8655 nobrTagInScope: null,
8656 pTagInButtonScope: null,
8657
8658 listItemTagAutoclosing: null,
8659 dlItemTagAutoclosing: null
8660 };
8661
8662 var updatedAncestorInfo = function (oldInfo, tag, instance) {
8663 var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);
8664 var info = { tag: tag, instance: instance };
8665
8666 if (inScopeTags.indexOf(tag) !== -1) {
8667 ancestorInfo.aTagInScope = null;
8668 ancestorInfo.buttonTagInScope = null;
8669 ancestorInfo.nobrTagInScope = null;
8670 }
8671 if (buttonScopeTags.indexOf(tag) !== -1) {
8672 ancestorInfo.pTagInButtonScope = null;
8673 }
8674
8675 // See rules for 'li', 'dd', 'dt' start tags in
8676 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
8677 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
8678 ancestorInfo.listItemTagAutoclosing = null;
8679 ancestorInfo.dlItemTagAutoclosing = null;
8680 }
8681
8682 ancestorInfo.parentTag = info;
8683
8684 if (tag === 'form') {
8685 ancestorInfo.formTag = info;
8686 }
8687 if (tag === 'a') {
8688 ancestorInfo.aTagInScope = info;
8689 }
8690 if (tag === 'button') {
8691 ancestorInfo.buttonTagInScope = info;
8692 }
8693 if (tag === 'nobr') {
8694 ancestorInfo.nobrTagInScope = info;
8695 }
8696 if (tag === 'p') {
8697 ancestorInfo.pTagInButtonScope = info;
8698 }
8699 if (tag === 'li') {
8700 ancestorInfo.listItemTagAutoclosing = info;
8701 }
8702 if (tag === 'dd' || tag === 'dt') {
8703 ancestorInfo.dlItemTagAutoclosing = info;
8704 }
8705
8706 return ancestorInfo;
8707 };
8708
8709 /**
8710 * Returns whether
8711 */
8712 var isTagValidWithParent = function (tag, parentTag) {
8713 // First, let's check if we're in an unusual parsing mode...
8714 switch (parentTag) {
8715 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
8716 case 'select':
8717 return tag === 'option' || tag === 'optgroup' || tag === '#text';
8718 case 'optgroup':
8719 return tag === 'option' || tag === '#text';
8720 // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
8721 // but
8722 case 'option':
8723 return tag === '#text';
8724
8725 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
8726 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
8727 // No special behavior since these rules fall back to "in body" mode for
8728 // all except special table nodes which cause bad parsing behavior anyway.
8729
8730 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
8731 case 'tr':
8732 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
8733
8734 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
8735 case 'tbody':
8736 case 'thead':
8737 case 'tfoot':
8738 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
8739
8740 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
8741 case 'colgroup':
8742 return tag === 'col' || tag === 'template';
8743
8744 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
8745 case 'table':
8746 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
8747
8748 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
8749 case 'head':
8750 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
8751
8752 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
8753 case 'html':
8754 return tag === 'head' || tag === 'body';
8755 }
8756
8757 // Probably in the "in body" parsing mode, so we outlaw only tag combos
8758 // where the parsing rules cause implicit opens or closes to be added.
8759 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
8760 switch (tag) {
8761 case 'h1':
8762 case 'h2':
8763 case 'h3':
8764 case 'h4':
8765 case 'h5':
8766 case 'h6':
8767 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
8768
8769 case 'rp':
8770 case 'rt':
8771 return impliedEndTags.indexOf(parentTag) === -1;
8772
8773 case 'caption':
8774 case 'col':
8775 case 'colgroup':
8776 case 'frame':
8777 case 'head':
8778 case 'tbody':
8779 case 'td':
8780 case 'tfoot':
8781 case 'th':
8782 case 'thead':
8783 case 'tr':
8784 // These tags are only valid with a few parents that have special child
8785 // parsing rules -- if we're down here, then none of those matched and
8786 // so we allow it only if we don't know what the parent is, as all other
8787 // cases are invalid.
8788 return parentTag == null;
8789 }
8790
8791 return true;
8792 };
8793
8794 /**
8795 * Returns whether
8796 */
8797 var findInvalidAncestorForTag = function (tag, ancestorInfo) {
8798 switch (tag) {
8799 case 'address':
8800 case 'article':
8801 case 'aside':
8802 case 'blockquote':
8803 case 'center':
8804 case 'details':
8805 case 'dialog':
8806 case 'dir':
8807 case 'div':
8808 case 'dl':
8809 case 'fieldset':
8810 case 'figcaption':
8811 case 'figure':
8812 case 'footer':
8813 case 'header':
8814 case 'hgroup':
8815 case 'main':
8816 case 'menu':
8817 case 'nav':
8818 case 'ol':
8819 case 'p':
8820 case 'section':
8821 case 'summary':
8822 case 'ul':
8823
8824 case 'pre':
8825 case 'listing':
8826
8827 case 'table':
8828
8829 case 'hr':
8830
8831 case 'xmp':
8832
8833 case 'h1':
8834 case 'h2':
8835 case 'h3':
8836 case 'h4':
8837 case 'h5':
8838 case 'h6':
8839 return ancestorInfo.pTagInButtonScope;
8840
8841 case 'form':
8842 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
8843
8844 case 'li':
8845 return ancestorInfo.listItemTagAutoclosing;
8846
8847 case 'dd':
8848 case 'dt':
8849 return ancestorInfo.dlItemTagAutoclosing;
8850
8851 case 'button':
8852 return ancestorInfo.buttonTagInScope;
8853
8854 case 'a':
8855 // Spec says something about storing a list of markers, but it sounds
8856 // equivalent to this check.
8857 return ancestorInfo.aTagInScope;
8858
8859 case 'nobr':
8860 return ancestorInfo.nobrTagInScope;
8861 }
8862
8863 return null;
8864 };
8865
8866 /**
8867 * Given a ReactCompositeComponent instance, return a list of its recursive
8868 * owners, starting at the root and ending with the instance itself.
8869 */
8870 var findOwnerStack = function (instance) {
8871 if (!instance) {
8872 return [];
8873 }
8874
8875 var stack = [];
8876 /*eslint-disable space-after-keywords */
8877 do {
8878 /*eslint-enable space-after-keywords */
8879 stack.push(instance);
8880 } while (instance = instance._currentElement._owner);
8881 stack.reverse();
8882 return stack;
8883 };
8884
8885 var didWarn = {};
8886
8887 validateDOMNesting = function (childTag, childInstance, ancestorInfo) {
8888 ancestorInfo = ancestorInfo || emptyAncestorInfo;
8889 var parentInfo = ancestorInfo.parentTag;
8890 var parentTag = parentInfo && parentInfo.tag;
8891
8892 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
8893 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
8894 var problematic = invalidParent || invalidAncestor;
8895
8896 if (problematic) {
8897 var ancestorTag = problematic.tag;
8898 var ancestorInstance = problematic.instance;
8899
8900 var childOwner = childInstance && childInstance._currentElement._owner;
8901 var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
8902
8903 var childOwners = findOwnerStack(childOwner);
8904 var ancestorOwners = findOwnerStack(ancestorOwner);
8905
8906 var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
8907 var i;
8908
8909 var deepestCommon = -1;
8910 for (i = 0; i < minStackLen; i++) {
8911 if (childOwners[i] === ancestorOwners[i]) {
8912 deepestCommon = i;
8913 } else {
8914 break;
8915 }
8916 }
8917
8918 var UNKNOWN = '(unknown)';
8919 var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
8920 return inst.getName() || UNKNOWN;
8921 });
8922 var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
8923 return inst.getName() || UNKNOWN;
8924 });
8925 var ownerInfo = [].concat(
8926 // If the parent and child instances have a common owner ancestor, start
8927 // with that -- otherwise we just start with the parent's owners.
8928 deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
8929 // If we're warning about an invalid (non-parent) ancestry, add '...'
8930 invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
8931
8932 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
8933 if (didWarn[warnKey]) {
8934 return;
8935 }
8936 didWarn[warnKey] = true;
8937
8938 if (invalidParent) {
8939 var info = '';
8940 if (ancestorTag === 'table' && childTag === 'tr') {
8941 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
8942 }
8943 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): <%s> cannot appear as a child of <%s>. ' + 'See %s.%s', childTag, ancestorTag, ownerInfo, info) : undefined;
8944 } else {
8945 process.env.NODE_ENV !== 'production' ? warning(false, 'validateDOMNesting(...): <%s> cannot appear as a descendant of ' + '<%s>. See %s.', childTag, ancestorTag, ownerInfo) : undefined;
8946 }
8947 }
8948 };
8949
8950 validateDOMNesting.ancestorInfoContextKey = '__validateDOMNesting_ancestorInfo$' + Math.random().toString(36).slice(2);
8951
8952 validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
8953
8954 // For testing
8955 validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
8956 ancestorInfo = ancestorInfo || emptyAncestorInfo;
8957 var parentInfo = ancestorInfo.parentTag;
8958 var parentTag = parentInfo && parentInfo.tag;
8959 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
8960 };
8961 }
8962
8963 module.exports = validateDOMNesting;
8964 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
8965
8966/***/ }),
8967/* 72 */
8968/***/ (function(module, exports, __webpack_require__) {
8969
8970 /* WEBPACK VAR INJECTION */(function(process) {/**
8971 * Copyright 2013-2015, Facebook, Inc.
8972 * All rights reserved.
8973 *
8974 * This source code is licensed under the BSD-style license found in the
8975 * LICENSE file in the root directory of this source tree. An additional grant
8976 * of patent rights can be found in the PATENTS file in the same directory.
8977 *
8978 * @providesModule ReactDefaultInjection
8979 */
8980
8981 'use strict';
8982
8983 var BeforeInputEventPlugin = __webpack_require__(73);
8984 var ChangeEventPlugin = __webpack_require__(81);
8985 var ClientReactRootIndex = __webpack_require__(84);
8986 var DefaultEventPluginOrder = __webpack_require__(85);
8987 var EnterLeaveEventPlugin = __webpack_require__(86);
8988 var ExecutionEnvironment = __webpack_require__(10);
8989 var HTMLDOMPropertyConfig = __webpack_require__(90);
8990 var ReactBrowserComponentMixin = __webpack_require__(91);
8991 var ReactComponentBrowserEnvironment = __webpack_require__(27);
8992 var ReactDefaultBatchingStrategy = __webpack_require__(93);
8993 var ReactDOMComponent = __webpack_require__(94);
8994 var ReactDOMTextComponent = __webpack_require__(7);
8995 var ReactEventListener = __webpack_require__(119);
8996 var ReactInjection = __webpack_require__(122);
8997 var ReactInstanceHandles = __webpack_require__(46);
8998 var ReactMount = __webpack_require__(29);
8999 var ReactReconcileTransaction = __webpack_require__(126);
9000 var SelectEventPlugin = __webpack_require__(131);
9001 var ServerReactRootIndex = __webpack_require__(132);
9002 var SimpleEventPlugin = __webpack_require__(133);
9003 var SVGDOMPropertyConfig = __webpack_require__(142);
9004
9005 var alreadyInjected = false;
9006
9007 function inject() {
9008 if (alreadyInjected) {
9009 // TODO: This is currently true because these injections are shared between
9010 // the client and the server package. They should be built independently
9011 // and not share any injection state. Then this problem will be solved.
9012 return;
9013 }
9014 alreadyInjected = true;
9015
9016 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
9017
9018 /**
9019 * Inject modules for resolving DOM hierarchy and plugin ordering.
9020 */
9021 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
9022 ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);
9023 ReactInjection.EventPluginHub.injectMount(ReactMount);
9024
9025 /**
9026 * Some important event plugins included by default (without having to require
9027 * them).
9028 */
9029 ReactInjection.EventPluginHub.injectEventPluginsByName({
9030 SimpleEventPlugin: SimpleEventPlugin,
9031 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
9032 ChangeEventPlugin: ChangeEventPlugin,
9033 SelectEventPlugin: SelectEventPlugin,
9034 BeforeInputEventPlugin: BeforeInputEventPlugin
9035 });
9036
9037 ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);
9038
9039 ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent);
9040
9041 ReactInjection.Class.injectMixin(ReactBrowserComponentMixin);
9042
9043 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
9044 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
9045
9046 ReactInjection.EmptyComponent.injectEmptyComponent('noscript');
9047
9048 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
9049 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
9050
9051 ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex);
9052
9053 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
9054
9055 if (process.env.NODE_ENV !== 'production') {
9056 var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
9057 if (/[?&]react_perf\b/.test(url)) {
9058 var ReactDefaultPerf = __webpack_require__(143);
9059 ReactDefaultPerf.start();
9060 }
9061 }
9062 }
9063
9064 module.exports = {
9065 inject: inject
9066 };
9067 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
9068
9069/***/ }),
9070/* 73 */
9071/***/ (function(module, exports, __webpack_require__) {
9072
9073 /**
9074 * Copyright 2013-2015 Facebook, Inc.
9075 * All rights reserved.
9076 *
9077 * This source code is licensed under the BSD-style license found in the
9078 * LICENSE file in the root directory of this source tree. An additional grant
9079 * of patent rights can be found in the PATENTS file in the same directory.
9080 *
9081 * @providesModule BeforeInputEventPlugin
9082 * @typechecks static-only
9083 */
9084
9085 'use strict';
9086
9087 var EventConstants = __webpack_require__(31);
9088 var EventPropagators = __webpack_require__(74);
9089 var ExecutionEnvironment = __webpack_require__(10);
9090 var FallbackCompositionState = __webpack_require__(75);
9091 var SyntheticCompositionEvent = __webpack_require__(77);
9092 var SyntheticInputEvent = __webpack_require__(79);
9093
9094 var keyOf = __webpack_require__(80);
9095
9096 var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
9097 var START_KEYCODE = 229;
9098
9099 var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
9100
9101 var documentMode = null;
9102 if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
9103 documentMode = document.documentMode;
9104 }
9105
9106 // Webkit offers a very useful `textInput` event that can be used to
9107 // directly represent `beforeInput`. The IE `textinput` event is not as
9108 // useful, so we don't use it.
9109 var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
9110
9111 // In IE9+, we have access to composition events, but the data supplied
9112 // by the native compositionend event may be incorrect. Japanese ideographic
9113 // spaces, for instance (\u3000) are not recorded correctly.
9114 var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
9115
9116 /**
9117 * Opera <= 12 includes TextEvent in window, but does not fire
9118 * text input events. Rely on keypress instead.
9119 */
9120 function isPresto() {
9121 var opera = window.opera;
9122 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
9123 }
9124
9125 var SPACEBAR_CODE = 32;
9126 var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
9127
9128 var topLevelTypes = EventConstants.topLevelTypes;
9129
9130 // Events and their corresponding property names.
9131 var eventTypes = {
9132 beforeInput: {
9133 phasedRegistrationNames: {
9134 bubbled: keyOf({ onBeforeInput: null }),
9135 captured: keyOf({ onBeforeInputCapture: null })
9136 },
9137 dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste]
9138 },
9139 compositionEnd: {
9140 phasedRegistrationNames: {
9141 bubbled: keyOf({ onCompositionEnd: null }),
9142 captured: keyOf({ onCompositionEndCapture: null })
9143 },
9144 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
9145 },
9146 compositionStart: {
9147 phasedRegistrationNames: {
9148 bubbled: keyOf({ onCompositionStart: null }),
9149 captured: keyOf({ onCompositionStartCapture: null })
9150 },
9151 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
9152 },
9153 compositionUpdate: {
9154 phasedRegistrationNames: {
9155 bubbled: keyOf({ onCompositionUpdate: null }),
9156 captured: keyOf({ onCompositionUpdateCapture: null })
9157 },
9158 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
9159 }
9160 };
9161
9162 // Track whether we've ever handled a keypress on the space key.
9163 var hasSpaceKeypress = false;
9164
9165 /**
9166 * Return whether a native keypress event is assumed to be a command.
9167 * This is required because Firefox fires `keypress` events for key commands
9168 * (cut, copy, select-all, etc.) even though no character is inserted.
9169 */
9170 function isKeypressCommand(nativeEvent) {
9171 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
9172 // ctrlKey && altKey is equivalent to AltGr, and is not a command.
9173 !(nativeEvent.ctrlKey && nativeEvent.altKey);
9174 }
9175
9176 /**
9177 * Translate native top level events into event types.
9178 *
9179 * @param {string} topLevelType
9180 * @return {object}
9181 */
9182 function getCompositionEventType(topLevelType) {
9183 switch (topLevelType) {
9184 case topLevelTypes.topCompositionStart:
9185 return eventTypes.compositionStart;
9186 case topLevelTypes.topCompositionEnd:
9187 return eventTypes.compositionEnd;
9188 case topLevelTypes.topCompositionUpdate:
9189 return eventTypes.compositionUpdate;
9190 }
9191 }
9192
9193 /**
9194 * Does our fallback best-guess model think this event signifies that
9195 * composition has begun?
9196 *
9197 * @param {string} topLevelType
9198 * @param {object} nativeEvent
9199 * @return {boolean}
9200 */
9201 function isFallbackCompositionStart(topLevelType, nativeEvent) {
9202 return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
9203 }
9204
9205 /**
9206 * Does our fallback mode think that this event is the end of composition?
9207 *
9208 * @param {string} topLevelType
9209 * @param {object} nativeEvent
9210 * @return {boolean}
9211 */
9212 function isFallbackCompositionEnd(topLevelType, nativeEvent) {
9213 switch (topLevelType) {
9214 case topLevelTypes.topKeyUp:
9215 // Command keys insert or clear IME input.
9216 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
9217 case topLevelTypes.topKeyDown:
9218 // Expect IME keyCode on each keydown. If we get any other
9219 // code we must have exited earlier.
9220 return nativeEvent.keyCode !== START_KEYCODE;
9221 case topLevelTypes.topKeyPress:
9222 case topLevelTypes.topMouseDown:
9223 case topLevelTypes.topBlur:
9224 // Events are not possible without cancelling IME.
9225 return true;
9226 default:
9227 return false;
9228 }
9229 }
9230
9231 /**
9232 * Google Input Tools provides composition data via a CustomEvent,
9233 * with the `data` property populated in the `detail` object. If this
9234 * is available on the event object, use it. If not, this is a plain
9235 * composition event and we have nothing special to extract.
9236 *
9237 * @param {object} nativeEvent
9238 * @return {?string}
9239 */
9240 function getDataFromCustomEvent(nativeEvent) {
9241 var detail = nativeEvent.detail;
9242 if (typeof detail === 'object' && 'data' in detail) {
9243 return detail.data;
9244 }
9245 return null;
9246 }
9247
9248 // Track the current IME composition fallback object, if any.
9249 var currentComposition = null;
9250
9251 /**
9252 * @param {string} topLevelType Record from `EventConstants`.
9253 * @param {DOMEventTarget} topLevelTarget The listening component root node.
9254 * @param {string} topLevelTargetID ID of `topLevelTarget`.
9255 * @param {object} nativeEvent Native browser event.
9256 * @return {?object} A SyntheticCompositionEvent.
9257 */
9258 function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
9259 var eventType;
9260 var fallbackData;
9261
9262 if (canUseCompositionEvent) {
9263 eventType = getCompositionEventType(topLevelType);
9264 } else if (!currentComposition) {
9265 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
9266 eventType = eventTypes.compositionStart;
9267 }
9268 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
9269 eventType = eventTypes.compositionEnd;
9270 }
9271
9272 if (!eventType) {
9273 return null;
9274 }
9275
9276 if (useFallbackCompositionData) {
9277 // The current composition is stored statically and must not be
9278 // overwritten while composition continues.
9279 if (!currentComposition && eventType === eventTypes.compositionStart) {
9280 currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
9281 } else if (eventType === eventTypes.compositionEnd) {
9282 if (currentComposition) {
9283 fallbackData = currentComposition.getData();
9284 }
9285 }
9286 }
9287
9288 var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent, nativeEventTarget);
9289
9290 if (fallbackData) {
9291 // Inject data generated from fallback path into the synthetic event.
9292 // This matches the property of native CompositionEventInterface.
9293 event.data = fallbackData;
9294 } else {
9295 var customData = getDataFromCustomEvent(nativeEvent);
9296 if (customData !== null) {
9297 event.data = customData;
9298 }
9299 }
9300
9301 EventPropagators.accumulateTwoPhaseDispatches(event);
9302 return event;
9303 }
9304
9305 /**
9306 * @param {string} topLevelType Record from `EventConstants`.
9307 * @param {object} nativeEvent Native browser event.
9308 * @return {?string} The string corresponding to this `beforeInput` event.
9309 */
9310 function getNativeBeforeInputChars(topLevelType, nativeEvent) {
9311 switch (topLevelType) {
9312 case topLevelTypes.topCompositionEnd:
9313 return getDataFromCustomEvent(nativeEvent);
9314 case topLevelTypes.topKeyPress:
9315 /**
9316 * If native `textInput` events are available, our goal is to make
9317 * use of them. However, there is a special case: the spacebar key.
9318 * In Webkit, preventing default on a spacebar `textInput` event
9319 * cancels character insertion, but it *also* causes the browser
9320 * to fall back to its default spacebar behavior of scrolling the
9321 * page.
9322 *
9323 * Tracking at:
9324 * https://code.google.com/p/chromium/issues/detail?id=355103
9325 *
9326 * To avoid this issue, use the keypress event as if no `textInput`
9327 * event is available.
9328 */
9329 var which = nativeEvent.which;
9330 if (which !== SPACEBAR_CODE) {
9331 return null;
9332 }
9333
9334 hasSpaceKeypress = true;
9335 return SPACEBAR_CHAR;
9336
9337 case topLevelTypes.topTextInput:
9338 // Record the characters to be added to the DOM.
9339 var chars = nativeEvent.data;
9340
9341 // If it's a spacebar character, assume that we have already handled
9342 // it at the keypress level and bail immediately. Android Chrome
9343 // doesn't give us keycodes, so we need to blacklist it.
9344 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
9345 return null;
9346 }
9347
9348 return chars;
9349
9350 default:
9351 // For other native event types, do nothing.
9352 return null;
9353 }
9354 }
9355
9356 /**
9357 * For browsers that do not provide the `textInput` event, extract the
9358 * appropriate string to use for SyntheticInputEvent.
9359 *
9360 * @param {string} topLevelType Record from `EventConstants`.
9361 * @param {object} nativeEvent Native browser event.
9362 * @return {?string} The fallback string for this `beforeInput` event.
9363 */
9364 function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
9365 // If we are currently composing (IME) and using a fallback to do so,
9366 // try to extract the composed characters from the fallback object.
9367 if (currentComposition) {
9368 if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) {
9369 var chars = currentComposition.getData();
9370 FallbackCompositionState.release(currentComposition);
9371 currentComposition = null;
9372 return chars;
9373 }
9374 return null;
9375 }
9376
9377 switch (topLevelType) {
9378 case topLevelTypes.topPaste:
9379 // If a paste event occurs after a keypress, throw out the input
9380 // chars. Paste events should not lead to BeforeInput events.
9381 return null;
9382 case topLevelTypes.topKeyPress:
9383 /**
9384 * As of v27, Firefox may fire keypress events even when no character
9385 * will be inserted. A few possibilities:
9386 *
9387 * - `which` is `0`. Arrow keys, Esc key, etc.
9388 *
9389 * - `which` is the pressed key code, but no char is available.
9390 * Ex: 'AltGr + d` in Polish. There is no modified character for
9391 * this key combination and no character is inserted into the
9392 * document, but FF fires the keypress for char code `100` anyway.
9393 * No `input` event will occur.
9394 *
9395 * - `which` is the pressed key code, but a command combination is
9396 * being used. Ex: `Cmd+C`. No character is inserted, and no
9397 * `input` event will occur.
9398 */
9399 if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
9400 return String.fromCharCode(nativeEvent.which);
9401 }
9402 return null;
9403 case topLevelTypes.topCompositionEnd:
9404 return useFallbackCompositionData ? null : nativeEvent.data;
9405 default:
9406 return null;
9407 }
9408 }
9409
9410 /**
9411 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
9412 * `textInput` or fallback behavior.
9413 *
9414 * @param {string} topLevelType Record from `EventConstants`.
9415 * @param {DOMEventTarget} topLevelTarget The listening component root node.
9416 * @param {string} topLevelTargetID ID of `topLevelTarget`.
9417 * @param {object} nativeEvent Native browser event.
9418 * @return {?object} A SyntheticInputEvent.
9419 */
9420 function extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
9421 var chars;
9422
9423 if (canUseTextInputEvent) {
9424 chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
9425 } else {
9426 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
9427 }
9428
9429 // If no characters are being inserted, no BeforeInput event should
9430 // be fired.
9431 if (!chars) {
9432 return null;
9433 }
9434
9435 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent, nativeEventTarget);
9436
9437 event.data = chars;
9438 EventPropagators.accumulateTwoPhaseDispatches(event);
9439 return event;
9440 }
9441
9442 /**
9443 * Create an `onBeforeInput` event to match
9444 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
9445 *
9446 * This event plugin is based on the native `textInput` event
9447 * available in Chrome, Safari, Opera, and IE. This event fires after
9448 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
9449 *
9450 * `beforeInput` is spec'd but not implemented in any browsers, and
9451 * the `input` event does not provide any useful information about what has
9452 * actually been added, contrary to the spec. Thus, `textInput` is the best
9453 * available event to identify the characters that have actually been inserted
9454 * into the target node.
9455 *
9456 * This plugin is also responsible for emitting `composition` events, thus
9457 * allowing us to share composition fallback code for both `beforeInput` and
9458 * `composition` event types.
9459 */
9460 var BeforeInputEventPlugin = {
9461
9462 eventTypes: eventTypes,
9463
9464 /**
9465 * @param {string} topLevelType Record from `EventConstants`.
9466 * @param {DOMEventTarget} topLevelTarget The listening component root node.
9467 * @param {string} topLevelTargetID ID of `topLevelTarget`.
9468 * @param {object} nativeEvent Native browser event.
9469 * @return {*} An accumulation of synthetic events.
9470 * @see {EventPluginHub.extractEvents}
9471 */
9472 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
9473 return [extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget)];
9474 }
9475 };
9476
9477 module.exports = BeforeInputEventPlugin;
9478
9479/***/ }),
9480/* 74 */
9481/***/ (function(module, exports, __webpack_require__) {
9482
9483 /* WEBPACK VAR INJECTION */(function(process) {/**
9484 * Copyright 2013-2015, Facebook, Inc.
9485 * All rights reserved.
9486 *
9487 * This source code is licensed under the BSD-style license found in the
9488 * LICENSE file in the root directory of this source tree. An additional grant
9489 * of patent rights can be found in the PATENTS file in the same directory.
9490 *
9491 * @providesModule EventPropagators
9492 */
9493
9494 'use strict';
9495
9496 var EventConstants = __webpack_require__(31);
9497 var EventPluginHub = __webpack_require__(32);
9498
9499 var warning = __webpack_require__(26);
9500
9501 var accumulateInto = __webpack_require__(36);
9502 var forEachAccumulated = __webpack_require__(37);
9503
9504 var PropagationPhases = EventConstants.PropagationPhases;
9505 var getListener = EventPluginHub.getListener;
9506
9507 /**
9508 * Some event types have a notion of different registration names for different
9509 * "phases" of propagation. This finds listeners by a given phase.
9510 */
9511 function listenerAtPhase(id, event, propagationPhase) {
9512 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
9513 return getListener(id, registrationName);
9514 }
9515
9516 /**
9517 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
9518 * here, allows us to not have to bind or create functions for each event.
9519 * Mutating the event's members allows us to not have to create a wrapping
9520 * "dispatch" object that pairs the event with the listener.
9521 */
9522 function accumulateDirectionalDispatches(domID, upwards, event) {
9523 if (process.env.NODE_ENV !== 'production') {
9524 process.env.NODE_ENV !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;
9525 }
9526 var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
9527 var listener = listenerAtPhase(domID, event, phase);
9528 if (listener) {
9529 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
9530 event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);
9531 }
9532 }
9533
9534 /**
9535 * Collect dispatches (must be entirely collected before dispatching - see unit
9536 * tests). Lazily allocate the array to conserve memory. We must loop through
9537 * each event and perform the traversal for each one. We cannot perform a
9538 * single traversal for the entire collection of events because each event may
9539 * have a different target.
9540 */
9541 function accumulateTwoPhaseDispatchesSingle(event) {
9542 if (event && event.dispatchConfig.phasedRegistrationNames) {
9543 EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker, accumulateDirectionalDispatches, event);
9544 }
9545 }
9546
9547 /**
9548 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
9549 */
9550 function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
9551 if (event && event.dispatchConfig.phasedRegistrationNames) {
9552 EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker, accumulateDirectionalDispatches, event);
9553 }
9554 }
9555
9556 /**
9557 * Accumulates without regard to direction, does not look for phased
9558 * registration names. Same as `accumulateDirectDispatchesSingle` but without
9559 * requiring that the `dispatchMarker` be the same as the dispatched ID.
9560 */
9561 function accumulateDispatches(id, ignoredDirection, event) {
9562 if (event && event.dispatchConfig.registrationName) {
9563 var registrationName = event.dispatchConfig.registrationName;
9564 var listener = getListener(id, registrationName);
9565 if (listener) {
9566 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
9567 event._dispatchIDs = accumulateInto(event._dispatchIDs, id);
9568 }
9569 }
9570 }
9571
9572 /**
9573 * Accumulates dispatches on an `SyntheticEvent`, but only for the
9574 * `dispatchMarker`.
9575 * @param {SyntheticEvent} event
9576 */
9577 function accumulateDirectDispatchesSingle(event) {
9578 if (event && event.dispatchConfig.registrationName) {
9579 accumulateDispatches(event.dispatchMarker, null, event);
9580 }
9581 }
9582
9583 function accumulateTwoPhaseDispatches(events) {
9584 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
9585 }
9586
9587 function accumulateTwoPhaseDispatchesSkipTarget(events) {
9588 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
9589 }
9590
9591 function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
9592 EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID, toID, accumulateDispatches, leave, enter);
9593 }
9594
9595 function accumulateDirectDispatches(events) {
9596 forEachAccumulated(events, accumulateDirectDispatchesSingle);
9597 }
9598
9599 /**
9600 * A small set of propagation patterns, each of which will accept a small amount
9601 * of information, and generate a set of "dispatch ready event objects" - which
9602 * are sets of events that have already been annotated with a set of dispatched
9603 * listener functions/ids. The API is designed this way to discourage these
9604 * propagation strategies from actually executing the dispatches, since we
9605 * always want to collect the entire set of dispatches before executing event a
9606 * single one.
9607 *
9608 * @constructor EventPropagators
9609 */
9610 var EventPropagators = {
9611 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
9612 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
9613 accumulateDirectDispatches: accumulateDirectDispatches,
9614 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
9615 };
9616
9617 module.exports = EventPropagators;
9618 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
9619
9620/***/ }),
9621/* 75 */
9622/***/ (function(module, exports, __webpack_require__) {
9623
9624 /**
9625 * Copyright 2013-2015, Facebook, Inc.
9626 * All rights reserved.
9627 *
9628 * This source code is licensed under the BSD-style license found in the
9629 * LICENSE file in the root directory of this source tree. An additional grant
9630 * of patent rights can be found in the PATENTS file in the same directory.
9631 *
9632 * @providesModule FallbackCompositionState
9633 * @typechecks static-only
9634 */
9635
9636 'use strict';
9637
9638 var PooledClass = __webpack_require__(57);
9639
9640 var assign = __webpack_require__(40);
9641 var getTextContentAccessor = __webpack_require__(76);
9642
9643 /**
9644 * This helper class stores information about text content of a target node,
9645 * allowing comparison of content before and after a given event.
9646 *
9647 * Identify the node where selection currently begins, then observe
9648 * both its text content and its current position in the DOM. Since the
9649 * browser may natively replace the target node during composition, we can
9650 * use its position to find its replacement.
9651 *
9652 * @param {DOMEventTarget} root
9653 */
9654 function FallbackCompositionState(root) {
9655 this._root = root;
9656 this._startText = this.getText();
9657 this._fallbackText = null;
9658 }
9659
9660 assign(FallbackCompositionState.prototype, {
9661 destructor: function () {
9662 this._root = null;
9663 this._startText = null;
9664 this._fallbackText = null;
9665 },
9666
9667 /**
9668 * Get current text of input.
9669 *
9670 * @return {string}
9671 */
9672 getText: function () {
9673 if ('value' in this._root) {
9674 return this._root.value;
9675 }
9676 return this._root[getTextContentAccessor()];
9677 },
9678
9679 /**
9680 * Determine the differing substring between the initially stored
9681 * text content and the current content.
9682 *
9683 * @return {string}
9684 */
9685 getData: function () {
9686 if (this._fallbackText) {
9687 return this._fallbackText;
9688 }
9689
9690 var start;
9691 var startValue = this._startText;
9692 var startLength = startValue.length;
9693 var end;
9694 var endValue = this.getText();
9695 var endLength = endValue.length;
9696
9697 for (start = 0; start < startLength; start++) {
9698 if (startValue[start] !== endValue[start]) {
9699 break;
9700 }
9701 }
9702
9703 var minEnd = startLength - start;
9704 for (end = 1; end <= minEnd; end++) {
9705 if (startValue[startLength - end] !== endValue[endLength - end]) {
9706 break;
9707 }
9708 }
9709
9710 var sliceTail = end > 1 ? 1 - end : undefined;
9711 this._fallbackText = endValue.slice(start, sliceTail);
9712 return this._fallbackText;
9713 }
9714 });
9715
9716 PooledClass.addPoolingTo(FallbackCompositionState);
9717
9718 module.exports = FallbackCompositionState;
9719
9720/***/ }),
9721/* 76 */
9722/***/ (function(module, exports, __webpack_require__) {
9723
9724 /**
9725 * Copyright 2013-2015, Facebook, Inc.
9726 * All rights reserved.
9727 *
9728 * This source code is licensed under the BSD-style license found in the
9729 * LICENSE file in the root directory of this source tree. An additional grant
9730 * of patent rights can be found in the PATENTS file in the same directory.
9731 *
9732 * @providesModule getTextContentAccessor
9733 */
9734
9735 'use strict';
9736
9737 var ExecutionEnvironment = __webpack_require__(10);
9738
9739 var contentKey = null;
9740
9741 /**
9742 * Gets the key used to access text content on a DOM node.
9743 *
9744 * @return {?string} Key used to access text content.
9745 * @internal
9746 */
9747 function getTextContentAccessor() {
9748 if (!contentKey && ExecutionEnvironment.canUseDOM) {
9749 // Prefer textContent to innerText because many browsers support both but
9750 // SVG <text> elements don't support innerText even when <div> does.
9751 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
9752 }
9753 return contentKey;
9754 }
9755
9756 module.exports = getTextContentAccessor;
9757
9758/***/ }),
9759/* 77 */
9760/***/ (function(module, exports, __webpack_require__) {
9761
9762 /**
9763 * Copyright 2013-2015, Facebook, Inc.
9764 * All rights reserved.
9765 *
9766 * This source code is licensed under the BSD-style license found in the
9767 * LICENSE file in the root directory of this source tree. An additional grant
9768 * of patent rights can be found in the PATENTS file in the same directory.
9769 *
9770 * @providesModule SyntheticCompositionEvent
9771 * @typechecks static-only
9772 */
9773
9774 'use strict';
9775
9776 var SyntheticEvent = __webpack_require__(78);
9777
9778 /**
9779 * @interface Event
9780 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
9781 */
9782 var CompositionEventInterface = {
9783 data: null
9784 };
9785
9786 /**
9787 * @param {object} dispatchConfig Configuration used to dispatch this event.
9788 * @param {string} dispatchMarker Marker identifying the event target.
9789 * @param {object} nativeEvent Native browser event.
9790 * @extends {SyntheticUIEvent}
9791 */
9792 function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
9793 SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
9794 }
9795
9796 SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
9797
9798 module.exports = SyntheticCompositionEvent;
9799
9800/***/ }),
9801/* 78 */
9802/***/ (function(module, exports, __webpack_require__) {
9803
9804 /* WEBPACK VAR INJECTION */(function(process) {/**
9805 * Copyright 2013-2015, Facebook, Inc.
9806 * All rights reserved.
9807 *
9808 * This source code is licensed under the BSD-style license found in the
9809 * LICENSE file in the root directory of this source tree. An additional grant
9810 * of patent rights can be found in the PATENTS file in the same directory.
9811 *
9812 * @providesModule SyntheticEvent
9813 * @typechecks static-only
9814 */
9815
9816 'use strict';
9817
9818 var PooledClass = __webpack_require__(57);
9819
9820 var assign = __webpack_require__(40);
9821 var emptyFunction = __webpack_require__(16);
9822 var warning = __webpack_require__(26);
9823
9824 /**
9825 * @interface Event
9826 * @see http://www.w3.org/TR/DOM-Level-3-Events/
9827 */
9828 var EventInterface = {
9829 type: null,
9830 target: null,
9831 // currentTarget is set when dispatching; no use in copying it here
9832 currentTarget: emptyFunction.thatReturnsNull,
9833 eventPhase: null,
9834 bubbles: null,
9835 cancelable: null,
9836 timeStamp: function (event) {
9837 return event.timeStamp || Date.now();
9838 },
9839 defaultPrevented: null,
9840 isTrusted: null
9841 };
9842
9843 /**
9844 * Synthetic events are dispatched by event plugins, typically in response to a
9845 * top-level event delegation handler.
9846 *
9847 * These systems should generally use pooling to reduce the frequency of garbage
9848 * collection. The system should check `isPersistent` to determine whether the
9849 * event should be released into the pool after being dispatched. Users that
9850 * need a persisted event should invoke `persist`.
9851 *
9852 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
9853 * normalizing browser quirks. Subclasses do not necessarily have to implement a
9854 * DOM interface; custom application-specific events can also subclass this.
9855 *
9856 * @param {object} dispatchConfig Configuration used to dispatch this event.
9857 * @param {string} dispatchMarker Marker identifying the event target.
9858 * @param {object} nativeEvent Native browser event.
9859 */
9860 function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
9861 this.dispatchConfig = dispatchConfig;
9862 this.dispatchMarker = dispatchMarker;
9863 this.nativeEvent = nativeEvent;
9864
9865 var Interface = this.constructor.Interface;
9866 for (var propName in Interface) {
9867 if (!Interface.hasOwnProperty(propName)) {
9868 continue;
9869 }
9870 var normalize = Interface[propName];
9871 if (normalize) {
9872 this[propName] = normalize(nativeEvent);
9873 } else {
9874 if (propName === 'target') {
9875 this.target = nativeEventTarget;
9876 } else {
9877 this[propName] = nativeEvent[propName];
9878 }
9879 }
9880 }
9881
9882 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
9883 if (defaultPrevented) {
9884 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
9885 } else {
9886 this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
9887 }
9888 this.isPropagationStopped = emptyFunction.thatReturnsFalse;
9889 }
9890
9891 assign(SyntheticEvent.prototype, {
9892
9893 preventDefault: function () {
9894 this.defaultPrevented = true;
9895 var event = this.nativeEvent;
9896 if (process.env.NODE_ENV !== 'production') {
9897 process.env.NODE_ENV !== 'production' ? warning(event, 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re calling `preventDefault` on a ' + 'released/nullified synthetic event. This is a no-op. See ' + 'https://fb.me/react-event-pooling for more information.') : undefined;
9898 }
9899 if (!event) {
9900 return;
9901 }
9902
9903 if (event.preventDefault) {
9904 event.preventDefault();
9905 } else {
9906 event.returnValue = false;
9907 }
9908 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
9909 },
9910
9911 stopPropagation: function () {
9912 var event = this.nativeEvent;
9913 if (process.env.NODE_ENV !== 'production') {
9914 process.env.NODE_ENV !== 'production' ? warning(event, 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re calling `stopPropagation` on a ' + 'released/nullified synthetic event. This is a no-op. See ' + 'https://fb.me/react-event-pooling for more information.') : undefined;
9915 }
9916 if (!event) {
9917 return;
9918 }
9919
9920 if (event.stopPropagation) {
9921 event.stopPropagation();
9922 } else {
9923 event.cancelBubble = true;
9924 }
9925 this.isPropagationStopped = emptyFunction.thatReturnsTrue;
9926 },
9927
9928 /**
9929 * We release all dispatched `SyntheticEvent`s after each event loop, adding
9930 * them back into the pool. This allows a way to hold onto a reference that
9931 * won't be added back into the pool.
9932 */
9933 persist: function () {
9934 this.isPersistent = emptyFunction.thatReturnsTrue;
9935 },
9936
9937 /**
9938 * Checks if this event should be released back into the pool.
9939 *
9940 * @return {boolean} True if this should not be released, false otherwise.
9941 */
9942 isPersistent: emptyFunction.thatReturnsFalse,
9943
9944 /**
9945 * `PooledClass` looks for `destructor` on each instance it releases.
9946 */
9947 destructor: function () {
9948 var Interface = this.constructor.Interface;
9949 for (var propName in Interface) {
9950 this[propName] = null;
9951 }
9952 this.dispatchConfig = null;
9953 this.dispatchMarker = null;
9954 this.nativeEvent = null;
9955 }
9956
9957 });
9958
9959 SyntheticEvent.Interface = EventInterface;
9960
9961 /**
9962 * Helper to reduce boilerplate when creating subclasses.
9963 *
9964 * @param {function} Class
9965 * @param {?object} Interface
9966 */
9967 SyntheticEvent.augmentClass = function (Class, Interface) {
9968 var Super = this;
9969
9970 var prototype = Object.create(Super.prototype);
9971 assign(prototype, Class.prototype);
9972 Class.prototype = prototype;
9973 Class.prototype.constructor = Class;
9974
9975 Class.Interface = assign({}, Super.Interface, Interface);
9976 Class.augmentClass = Super.augmentClass;
9977
9978 PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
9979 };
9980
9981 PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
9982
9983 module.exports = SyntheticEvent;
9984 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
9985
9986/***/ }),
9987/* 79 */
9988/***/ (function(module, exports, __webpack_require__) {
9989
9990 /**
9991 * Copyright 2013-2015, Facebook, Inc.
9992 * All rights reserved.
9993 *
9994 * This source code is licensed under the BSD-style license found in the
9995 * LICENSE file in the root directory of this source tree. An additional grant
9996 * of patent rights can be found in the PATENTS file in the same directory.
9997 *
9998 * @providesModule SyntheticInputEvent
9999 * @typechecks static-only
10000 */
10001
10002 'use strict';
10003
10004 var SyntheticEvent = __webpack_require__(78);
10005
10006 /**
10007 * @interface Event
10008 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
10009 * /#events-inputevents
10010 */
10011 var InputEventInterface = {
10012 data: null
10013 };
10014
10015 /**
10016 * @param {object} dispatchConfig Configuration used to dispatch this event.
10017 * @param {string} dispatchMarker Marker identifying the event target.
10018 * @param {object} nativeEvent Native browser event.
10019 * @extends {SyntheticUIEvent}
10020 */
10021 function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
10022 SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
10023 }
10024
10025 SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
10026
10027 module.exports = SyntheticInputEvent;
10028
10029/***/ }),
10030/* 80 */
10031/***/ (function(module, exports) {
10032
10033 /**
10034 * Copyright 2013-2015, Facebook, Inc.
10035 * All rights reserved.
10036 *
10037 * This source code is licensed under the BSD-style license found in the
10038 * LICENSE file in the root directory of this source tree. An additional grant
10039 * of patent rights can be found in the PATENTS file in the same directory.
10040 *
10041 * @providesModule keyOf
10042 */
10043
10044 /**
10045 * Allows extraction of a minified key. Let's the build system minify keys
10046 * without losing the ability to dynamically use key strings as values
10047 * themselves. Pass in an object with a single key/val pair and it will return
10048 * you the string key of that single record. Suppose you want to grab the
10049 * value for a key 'className' inside of an object. Key/val minification may
10050 * have aliased that key to be 'xa12'. keyOf({className: null}) will return
10051 * 'xa12' in that case. Resolve keys you want to use once at startup time, then
10052 * reuse those resolutions.
10053 */
10054 "use strict";
10055
10056 var keyOf = function (oneKeyObj) {
10057 var key;
10058 for (key in oneKeyObj) {
10059 if (!oneKeyObj.hasOwnProperty(key)) {
10060 continue;
10061 }
10062 return key;
10063 }
10064 return null;
10065 };
10066
10067 module.exports = keyOf;
10068
10069/***/ }),
10070/* 81 */
10071/***/ (function(module, exports, __webpack_require__) {
10072
10073 /**
10074 * Copyright 2013-2015, Facebook, Inc.
10075 * All rights reserved.
10076 *
10077 * This source code is licensed under the BSD-style license found in the
10078 * LICENSE file in the root directory of this source tree. An additional grant
10079 * of patent rights can be found in the PATENTS file in the same directory.
10080 *
10081 * @providesModule ChangeEventPlugin
10082 */
10083
10084 'use strict';
10085
10086 var EventConstants = __webpack_require__(31);
10087 var EventPluginHub = __webpack_require__(32);
10088 var EventPropagators = __webpack_require__(74);
10089 var ExecutionEnvironment = __webpack_require__(10);
10090 var ReactUpdates = __webpack_require__(55);
10091 var SyntheticEvent = __webpack_require__(78);
10092
10093 var getEventTarget = __webpack_require__(82);
10094 var isEventSupported = __webpack_require__(41);
10095 var isTextInputElement = __webpack_require__(83);
10096 var keyOf = __webpack_require__(80);
10097
10098 var topLevelTypes = EventConstants.topLevelTypes;
10099
10100 var eventTypes = {
10101 change: {
10102 phasedRegistrationNames: {
10103 bubbled: keyOf({ onChange: null }),
10104 captured: keyOf({ onChangeCapture: null })
10105 },
10106 dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange]
10107 }
10108 };
10109
10110 /**
10111 * For IE shims
10112 */
10113 var activeElement = null;
10114 var activeElementID = null;
10115 var activeElementValue = null;
10116 var activeElementValueProp = null;
10117
10118 /**
10119 * SECTION: handle `change` event
10120 */
10121 function shouldUseChangeEvent(elem) {
10122 var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
10123 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
10124 }
10125
10126 var doesChangeEventBubble = false;
10127 if (ExecutionEnvironment.canUseDOM) {
10128 // See `handleChange` comment below
10129 doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8);
10130 }
10131
10132 function manualDispatchChangeEvent(nativeEvent) {
10133 var event = SyntheticEvent.getPooled(eventTypes.change, activeElementID, nativeEvent, getEventTarget(nativeEvent));
10134 EventPropagators.accumulateTwoPhaseDispatches(event);
10135
10136 // If change and propertychange bubbled, we'd just bind to it like all the
10137 // other events and have it go through ReactBrowserEventEmitter. Since it
10138 // doesn't, we manually listen for the events and so we have to enqueue and
10139 // process the abstract event manually.
10140 //
10141 // Batching is necessary here in order to ensure that all event handlers run
10142 // before the next rerender (including event handlers attached to ancestor
10143 // elements instead of directly on the input). Without this, controlled
10144 // components don't work properly in conjunction with event bubbling because
10145 // the component is rerendered and the value reverted before all the event
10146 // handlers can run. See https://github.com/facebook/react/issues/708.
10147 ReactUpdates.batchedUpdates(runEventInBatch, event);
10148 }
10149
10150 function runEventInBatch(event) {
10151 EventPluginHub.enqueueEvents(event);
10152 EventPluginHub.processEventQueue(false);
10153 }
10154
10155 function startWatchingForChangeEventIE8(target, targetID) {
10156 activeElement = target;
10157 activeElementID = targetID;
10158 activeElement.attachEvent('onchange', manualDispatchChangeEvent);
10159 }
10160
10161 function stopWatchingForChangeEventIE8() {
10162 if (!activeElement) {
10163 return;
10164 }
10165 activeElement.detachEvent('onchange', manualDispatchChangeEvent);
10166 activeElement = null;
10167 activeElementID = null;
10168 }
10169
10170 function getTargetIDForChangeEvent(topLevelType, topLevelTarget, topLevelTargetID) {
10171 if (topLevelType === topLevelTypes.topChange) {
10172 return topLevelTargetID;
10173 }
10174 }
10175 function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTargetID) {
10176 if (topLevelType === topLevelTypes.topFocus) {
10177 // stopWatching() should be a noop here but we call it just in case we
10178 // missed a blur event somehow.
10179 stopWatchingForChangeEventIE8();
10180 startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
10181 } else if (topLevelType === topLevelTypes.topBlur) {
10182 stopWatchingForChangeEventIE8();
10183 }
10184 }
10185
10186 /**
10187 * SECTION: handle `input` event
10188 */
10189 var isInputEventSupported = false;
10190 if (ExecutionEnvironment.canUseDOM) {
10191 // IE9 claims to support the input event but fails to trigger it when
10192 // deleting text, so we ignore its input events
10193 isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
10194 }
10195
10196 /**
10197 * (For old IE.) Replacement getter/setter for the `value` property that gets
10198 * set on the active element.
10199 */
10200 var newValueProp = {
10201 get: function () {
10202 return activeElementValueProp.get.call(this);
10203 },
10204 set: function (val) {
10205 // Cast to a string so we can do equality checks.
10206 activeElementValue = '' + val;
10207 activeElementValueProp.set.call(this, val);
10208 }
10209 };
10210
10211 /**
10212 * (For old IE.) Starts tracking propertychange events on the passed-in element
10213 * and override the value property so that we can distinguish user events from
10214 * value changes in JS.
10215 */
10216 function startWatchingForValueChange(target, targetID) {
10217 activeElement = target;
10218 activeElementID = targetID;
10219 activeElementValue = target.value;
10220 activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
10221
10222 // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
10223 // on DOM elements
10224 Object.defineProperty(activeElement, 'value', newValueProp);
10225 activeElement.attachEvent('onpropertychange', handlePropertyChange);
10226 }
10227
10228 /**
10229 * (For old IE.) Removes the event listeners from the currently-tracked element,
10230 * if any exists.
10231 */
10232 function stopWatchingForValueChange() {
10233 if (!activeElement) {
10234 return;
10235 }
10236
10237 // delete restores the original property definition
10238 delete activeElement.value;
10239 activeElement.detachEvent('onpropertychange', handlePropertyChange);
10240
10241 activeElement = null;
10242 activeElementID = null;
10243 activeElementValue = null;
10244 activeElementValueProp = null;
10245 }
10246
10247 /**
10248 * (For old IE.) Handles a propertychange event, sending a `change` event if
10249 * the value of the active element has changed.
10250 */
10251 function handlePropertyChange(nativeEvent) {
10252 if (nativeEvent.propertyName !== 'value') {
10253 return;
10254 }
10255 var value = nativeEvent.srcElement.value;
10256 if (value === activeElementValue) {
10257 return;
10258 }
10259 activeElementValue = value;
10260
10261 manualDispatchChangeEvent(nativeEvent);
10262 }
10263
10264 /**
10265 * If a `change` event should be fired, returns the target's ID.
10266 */
10267 function getTargetIDForInputEvent(topLevelType, topLevelTarget, topLevelTargetID) {
10268 if (topLevelType === topLevelTypes.topInput) {
10269 // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
10270 // what we want so fall through here and trigger an abstract event
10271 return topLevelTargetID;
10272 }
10273 }
10274
10275 // For IE8 and IE9.
10276 function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
10277 if (topLevelType === topLevelTypes.topFocus) {
10278 // In IE8, we can capture almost all .value changes by adding a
10279 // propertychange handler and looking for events with propertyName
10280 // equal to 'value'
10281 // In IE9, propertychange fires for most input events but is buggy and
10282 // doesn't fire when text is deleted, but conveniently, selectionchange
10283 // appears to fire in all of the remaining cases so we catch those and
10284 // forward the event if the value has changed
10285 // In either case, we don't want to call the event handler if the value
10286 // is changed from JS so we redefine a setter for `.value` that updates
10287 // our activeElementValue variable, allowing us to ignore those changes
10288 //
10289 // stopWatching() should be a noop here but we call it just in case we
10290 // missed a blur event somehow.
10291 stopWatchingForValueChange();
10292 startWatchingForValueChange(topLevelTarget, topLevelTargetID);
10293 } else if (topLevelType === topLevelTypes.topBlur) {
10294 stopWatchingForValueChange();
10295 }
10296 }
10297
10298 // For IE8 and IE9.
10299 function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
10300 if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
10301 // On the selectionchange event, the target is just document which isn't
10302 // helpful for us so just check activeElement instead.
10303 //
10304 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
10305 // propertychange on the first input event after setting `value` from a
10306 // script and fires only keydown, keypress, keyup. Catching keyup usually
10307 // gets it and catching keydown lets us fire an event for the first
10308 // keystroke if user does a key repeat (it'll be a little delayed: right
10309 // before the second keystroke). Other input methods (e.g., paste) seem to
10310 // fire selectionchange normally.
10311 if (activeElement && activeElement.value !== activeElementValue) {
10312 activeElementValue = activeElement.value;
10313 return activeElementID;
10314 }
10315 }
10316 }
10317
10318 /**
10319 * SECTION: handle `click` event
10320 */
10321 function shouldUseClickEvent(elem) {
10322 // Use the `click` event to detect changes to checkbox and radio inputs.
10323 // This approach works across all browsers, whereas `change` does not fire
10324 // until `blur` in IE8.
10325 return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
10326 }
10327
10328 function getTargetIDForClickEvent(topLevelType, topLevelTarget, topLevelTargetID) {
10329 if (topLevelType === topLevelTypes.topClick) {
10330 return topLevelTargetID;
10331 }
10332 }
10333
10334 /**
10335 * This plugin creates an `onChange` event that normalizes change events
10336 * across form elements. This event fires at a time when it's possible to
10337 * change the element's value without seeing a flicker.
10338 *
10339 * Supported elements are:
10340 * - input (see `isTextInputElement`)
10341 * - textarea
10342 * - select
10343 */
10344 var ChangeEventPlugin = {
10345
10346 eventTypes: eventTypes,
10347
10348 /**
10349 * @param {string} topLevelType Record from `EventConstants`.
10350 * @param {DOMEventTarget} topLevelTarget The listening component root node.
10351 * @param {string} topLevelTargetID ID of `topLevelTarget`.
10352 * @param {object} nativeEvent Native browser event.
10353 * @return {*} An accumulation of synthetic events.
10354 * @see {EventPluginHub.extractEvents}
10355 */
10356 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
10357
10358 var getTargetIDFunc, handleEventFunc;
10359 if (shouldUseChangeEvent(topLevelTarget)) {
10360 if (doesChangeEventBubble) {
10361 getTargetIDFunc = getTargetIDForChangeEvent;
10362 } else {
10363 handleEventFunc = handleEventsForChangeEventIE8;
10364 }
10365 } else if (isTextInputElement(topLevelTarget)) {
10366 if (isInputEventSupported) {
10367 getTargetIDFunc = getTargetIDForInputEvent;
10368 } else {
10369 getTargetIDFunc = getTargetIDForInputEventIE;
10370 handleEventFunc = handleEventsForInputEventIE;
10371 }
10372 } else if (shouldUseClickEvent(topLevelTarget)) {
10373 getTargetIDFunc = getTargetIDForClickEvent;
10374 }
10375
10376 if (getTargetIDFunc) {
10377 var targetID = getTargetIDFunc(topLevelType, topLevelTarget, topLevelTargetID);
10378 if (targetID) {
10379 var event = SyntheticEvent.getPooled(eventTypes.change, targetID, nativeEvent, nativeEventTarget);
10380 event.type = 'change';
10381 EventPropagators.accumulateTwoPhaseDispatches(event);
10382 return event;
10383 }
10384 }
10385
10386 if (handleEventFunc) {
10387 handleEventFunc(topLevelType, topLevelTarget, topLevelTargetID);
10388 }
10389 }
10390
10391 };
10392
10393 module.exports = ChangeEventPlugin;
10394
10395/***/ }),
10396/* 82 */
10397/***/ (function(module, exports) {
10398
10399 /**
10400 * Copyright 2013-2015, Facebook, Inc.
10401 * All rights reserved.
10402 *
10403 * This source code is licensed under the BSD-style license found in the
10404 * LICENSE file in the root directory of this source tree. An additional grant
10405 * of patent rights can be found in the PATENTS file in the same directory.
10406 *
10407 * @providesModule getEventTarget
10408 * @typechecks static-only
10409 */
10410
10411 'use strict';
10412
10413 /**
10414 * Gets the target node from a native browser event by accounting for
10415 * inconsistencies in browser DOM APIs.
10416 *
10417 * @param {object} nativeEvent Native browser event.
10418 * @return {DOMEventTarget} Target node.
10419 */
10420 function getEventTarget(nativeEvent) {
10421 var target = nativeEvent.target || nativeEvent.srcElement || window;
10422 // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
10423 // @see http://www.quirksmode.org/js/events_properties.html
10424 return target.nodeType === 3 ? target.parentNode : target;
10425 }
10426
10427 module.exports = getEventTarget;
10428
10429/***/ }),
10430/* 83 */
10431/***/ (function(module, exports) {
10432
10433 /**
10434 * Copyright 2013-2015, Facebook, Inc.
10435 * All rights reserved.
10436 *
10437 * This source code is licensed under the BSD-style license found in the
10438 * LICENSE file in the root directory of this source tree. An additional grant
10439 * of patent rights can be found in the PATENTS file in the same directory.
10440 *
10441 * @providesModule isTextInputElement
10442 */
10443
10444 'use strict';
10445
10446 /**
10447 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
10448 */
10449 var supportedInputTypes = {
10450 'color': true,
10451 'date': true,
10452 'datetime': true,
10453 'datetime-local': true,
10454 'email': true,
10455 'month': true,
10456 'number': true,
10457 'password': true,
10458 'range': true,
10459 'search': true,
10460 'tel': true,
10461 'text': true,
10462 'time': true,
10463 'url': true,
10464 'week': true
10465 };
10466
10467 function isTextInputElement(elem) {
10468 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
10469 return nodeName && (nodeName === 'input' && supportedInputTypes[elem.type] || nodeName === 'textarea');
10470 }
10471
10472 module.exports = isTextInputElement;
10473
10474/***/ }),
10475/* 84 */
10476/***/ (function(module, exports) {
10477
10478 /**
10479 * Copyright 2013-2015, Facebook, Inc.
10480 * All rights reserved.
10481 *
10482 * This source code is licensed under the BSD-style license found in the
10483 * LICENSE file in the root directory of this source tree. An additional grant
10484 * of patent rights can be found in the PATENTS file in the same directory.
10485 *
10486 * @providesModule ClientReactRootIndex
10487 * @typechecks
10488 */
10489
10490 'use strict';
10491
10492 var nextReactRootIndex = 0;
10493
10494 var ClientReactRootIndex = {
10495 createReactRootIndex: function () {
10496 return nextReactRootIndex++;
10497 }
10498 };
10499
10500 module.exports = ClientReactRootIndex;
10501
10502/***/ }),
10503/* 85 */
10504/***/ (function(module, exports, __webpack_require__) {
10505
10506 /**
10507 * Copyright 2013-2015, Facebook, Inc.
10508 * All rights reserved.
10509 *
10510 * This source code is licensed under the BSD-style license found in the
10511 * LICENSE file in the root directory of this source tree. An additional grant
10512 * of patent rights can be found in the PATENTS file in the same directory.
10513 *
10514 * @providesModule DefaultEventPluginOrder
10515 */
10516
10517 'use strict';
10518
10519 var keyOf = __webpack_require__(80);
10520
10521 /**
10522 * Module that is injectable into `EventPluginHub`, that specifies a
10523 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
10524 * plugins, without having to package every one of them. This is better than
10525 * having plugins be ordered in the same order that they are injected because
10526 * that ordering would be influenced by the packaging order.
10527 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
10528 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
10529 */
10530 var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
10531
10532 module.exports = DefaultEventPluginOrder;
10533
10534/***/ }),
10535/* 86 */
10536/***/ (function(module, exports, __webpack_require__) {
10537
10538 /**
10539 * Copyright 2013-2015, Facebook, Inc.
10540 * All rights reserved.
10541 *
10542 * This source code is licensed under the BSD-style license found in the
10543 * LICENSE file in the root directory of this source tree. An additional grant
10544 * of patent rights can be found in the PATENTS file in the same directory.
10545 *
10546 * @providesModule EnterLeaveEventPlugin
10547 * @typechecks static-only
10548 */
10549
10550 'use strict';
10551
10552 var EventConstants = __webpack_require__(31);
10553 var EventPropagators = __webpack_require__(74);
10554 var SyntheticMouseEvent = __webpack_require__(87);
10555
10556 var ReactMount = __webpack_require__(29);
10557 var keyOf = __webpack_require__(80);
10558
10559 var topLevelTypes = EventConstants.topLevelTypes;
10560 var getFirstReactDOM = ReactMount.getFirstReactDOM;
10561
10562 var eventTypes = {
10563 mouseEnter: {
10564 registrationName: keyOf({ onMouseEnter: null }),
10565 dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
10566 },
10567 mouseLeave: {
10568 registrationName: keyOf({ onMouseLeave: null }),
10569 dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
10570 }
10571 };
10572
10573 var extractedEvents = [null, null];
10574
10575 var EnterLeaveEventPlugin = {
10576
10577 eventTypes: eventTypes,
10578
10579 /**
10580 * For almost every interaction we care about, there will be both a top-level
10581 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
10582 * we do not extract duplicate events. However, moving the mouse into the
10583 * browser from outside will not fire a `mouseout` event. In this case, we use
10584 * the `mouseover` top-level event.
10585 *
10586 * @param {string} topLevelType Record from `EventConstants`.
10587 * @param {DOMEventTarget} topLevelTarget The listening component root node.
10588 * @param {string} topLevelTargetID ID of `topLevelTarget`.
10589 * @param {object} nativeEvent Native browser event.
10590 * @return {*} An accumulation of synthetic events.
10591 * @see {EventPluginHub.extractEvents}
10592 */
10593 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
10594 if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
10595 return null;
10596 }
10597 if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) {
10598 // Must not be a mouse in or mouse out - ignoring.
10599 return null;
10600 }
10601
10602 var win;
10603 if (topLevelTarget.window === topLevelTarget) {
10604 // `topLevelTarget` is probably a window object.
10605 win = topLevelTarget;
10606 } else {
10607 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
10608 var doc = topLevelTarget.ownerDocument;
10609 if (doc) {
10610 win = doc.defaultView || doc.parentWindow;
10611 } else {
10612 win = window;
10613 }
10614 }
10615
10616 var from;
10617 var to;
10618 var fromID = '';
10619 var toID = '';
10620 if (topLevelType === topLevelTypes.topMouseOut) {
10621 from = topLevelTarget;
10622 fromID = topLevelTargetID;
10623 to = getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement);
10624 if (to) {
10625 toID = ReactMount.getID(to);
10626 } else {
10627 to = win;
10628 }
10629 to = to || win;
10630 } else {
10631 from = win;
10632 to = topLevelTarget;
10633 toID = topLevelTargetID;
10634 }
10635
10636 if (from === to) {
10637 // Nothing pertains to our managed components.
10638 return null;
10639 }
10640
10641 var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, fromID, nativeEvent, nativeEventTarget);
10642 leave.type = 'mouseleave';
10643 leave.target = from;
10644 leave.relatedTarget = to;
10645
10646 var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, toID, nativeEvent, nativeEventTarget);
10647 enter.type = 'mouseenter';
10648 enter.target = to;
10649 enter.relatedTarget = from;
10650
10651 EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);
10652
10653 extractedEvents[0] = leave;
10654 extractedEvents[1] = enter;
10655
10656 return extractedEvents;
10657 }
10658
10659 };
10660
10661 module.exports = EnterLeaveEventPlugin;
10662
10663/***/ }),
10664/* 87 */
10665/***/ (function(module, exports, __webpack_require__) {
10666
10667 /**
10668 * Copyright 2013-2015, Facebook, Inc.
10669 * All rights reserved.
10670 *
10671 * This source code is licensed under the BSD-style license found in the
10672 * LICENSE file in the root directory of this source tree. An additional grant
10673 * of patent rights can be found in the PATENTS file in the same directory.
10674 *
10675 * @providesModule SyntheticMouseEvent
10676 * @typechecks static-only
10677 */
10678
10679 'use strict';
10680
10681 var SyntheticUIEvent = __webpack_require__(88);
10682 var ViewportMetrics = __webpack_require__(39);
10683
10684 var getEventModifierState = __webpack_require__(89);
10685
10686 /**
10687 * @interface MouseEvent
10688 * @see http://www.w3.org/TR/DOM-Level-3-Events/
10689 */
10690 var MouseEventInterface = {
10691 screenX: null,
10692 screenY: null,
10693 clientX: null,
10694 clientY: null,
10695 ctrlKey: null,
10696 shiftKey: null,
10697 altKey: null,
10698 metaKey: null,
10699 getModifierState: getEventModifierState,
10700 button: function (event) {
10701 // Webkit, Firefox, IE9+
10702 // which: 1 2 3
10703 // button: 0 1 2 (standard)
10704 var button = event.button;
10705 if ('which' in event) {
10706 return button;
10707 }
10708 // IE<9
10709 // which: undefined
10710 // button: 0 0 0
10711 // button: 1 4 2 (onmouseup)
10712 return button === 2 ? 2 : button === 4 ? 1 : 0;
10713 },
10714 buttons: null,
10715 relatedTarget: function (event) {
10716 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
10717 },
10718 // "Proprietary" Interface.
10719 pageX: function (event) {
10720 return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
10721 },
10722 pageY: function (event) {
10723 return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
10724 }
10725 };
10726
10727 /**
10728 * @param {object} dispatchConfig Configuration used to dispatch this event.
10729 * @param {string} dispatchMarker Marker identifying the event target.
10730 * @param {object} nativeEvent Native browser event.
10731 * @extends {SyntheticUIEvent}
10732 */
10733 function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
10734 SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
10735 }
10736
10737 SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
10738
10739 module.exports = SyntheticMouseEvent;
10740
10741/***/ }),
10742/* 88 */
10743/***/ (function(module, exports, __webpack_require__) {
10744
10745 /**
10746 * Copyright 2013-2015, Facebook, Inc.
10747 * All rights reserved.
10748 *
10749 * This source code is licensed under the BSD-style license found in the
10750 * LICENSE file in the root directory of this source tree. An additional grant
10751 * of patent rights can be found in the PATENTS file in the same directory.
10752 *
10753 * @providesModule SyntheticUIEvent
10754 * @typechecks static-only
10755 */
10756
10757 'use strict';
10758
10759 var SyntheticEvent = __webpack_require__(78);
10760
10761 var getEventTarget = __webpack_require__(82);
10762
10763 /**
10764 * @interface UIEvent
10765 * @see http://www.w3.org/TR/DOM-Level-3-Events/
10766 */
10767 var UIEventInterface = {
10768 view: function (event) {
10769 if (event.view) {
10770 return event.view;
10771 }
10772
10773 var target = getEventTarget(event);
10774 if (target != null && target.window === target) {
10775 // target is a window object
10776 return target;
10777 }
10778
10779 var doc = target.ownerDocument;
10780 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
10781 if (doc) {
10782 return doc.defaultView || doc.parentWindow;
10783 } else {
10784 return window;
10785 }
10786 },
10787 detail: function (event) {
10788 return event.detail || 0;
10789 }
10790 };
10791
10792 /**
10793 * @param {object} dispatchConfig Configuration used to dispatch this event.
10794 * @param {string} dispatchMarker Marker identifying the event target.
10795 * @param {object} nativeEvent Native browser event.
10796 * @extends {SyntheticEvent}
10797 */
10798 function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
10799 SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
10800 }
10801
10802 SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
10803
10804 module.exports = SyntheticUIEvent;
10805
10806/***/ }),
10807/* 89 */
10808/***/ (function(module, exports) {
10809
10810 /**
10811 * Copyright 2013-2015, Facebook, Inc.
10812 * All rights reserved.
10813 *
10814 * This source code is licensed under the BSD-style license found in the
10815 * LICENSE file in the root directory of this source tree. An additional grant
10816 * of patent rights can be found in the PATENTS file in the same directory.
10817 *
10818 * @providesModule getEventModifierState
10819 * @typechecks static-only
10820 */
10821
10822 'use strict';
10823
10824 /**
10825 * Translation from modifier key to the associated property in the event.
10826 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
10827 */
10828
10829 var modifierKeyToProp = {
10830 'Alt': 'altKey',
10831 'Control': 'ctrlKey',
10832 'Meta': 'metaKey',
10833 'Shift': 'shiftKey'
10834 };
10835
10836 // IE8 does not implement getModifierState so we simply map it to the only
10837 // modifier keys exposed by the event itself, does not support Lock-keys.
10838 // Currently, all major browsers except Chrome seems to support Lock-keys.
10839 function modifierStateGetter(keyArg) {
10840 var syntheticEvent = this;
10841 var nativeEvent = syntheticEvent.nativeEvent;
10842 if (nativeEvent.getModifierState) {
10843 return nativeEvent.getModifierState(keyArg);
10844 }
10845 var keyProp = modifierKeyToProp[keyArg];
10846 return keyProp ? !!nativeEvent[keyProp] : false;
10847 }
10848
10849 function getEventModifierState(nativeEvent) {
10850 return modifierStateGetter;
10851 }
10852
10853 module.exports = getEventModifierState;
10854
10855/***/ }),
10856/* 90 */
10857/***/ (function(module, exports, __webpack_require__) {
10858
10859 /**
10860 * Copyright 2013-2015, Facebook, Inc.
10861 * All rights reserved.
10862 *
10863 * This source code is licensed under the BSD-style license found in the
10864 * LICENSE file in the root directory of this source tree. An additional grant
10865 * of patent rights can be found in the PATENTS file in the same directory.
10866 *
10867 * @providesModule HTMLDOMPropertyConfig
10868 */
10869
10870 'use strict';
10871
10872 var DOMProperty = __webpack_require__(24);
10873 var ExecutionEnvironment = __webpack_require__(10);
10874
10875 var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
10876 var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
10877 var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
10878 var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
10879 var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
10880 var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
10881 var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
10882
10883 var hasSVG;
10884 if (ExecutionEnvironment.canUseDOM) {
10885 var implementation = document.implementation;
10886 hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');
10887 }
10888
10889 var HTMLDOMPropertyConfig = {
10890 isCustomAttribute: RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),
10891 Properties: {
10892 /**
10893 * Standard Properties
10894 */
10895 accept: null,
10896 acceptCharset: null,
10897 accessKey: null,
10898 action: null,
10899 allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
10900 allowTransparency: MUST_USE_ATTRIBUTE,
10901 alt: null,
10902 async: HAS_BOOLEAN_VALUE,
10903 autoComplete: null,
10904 // autoFocus is polyfilled/normalized by AutoFocusUtils
10905 // autoFocus: HAS_BOOLEAN_VALUE,
10906 autoPlay: HAS_BOOLEAN_VALUE,
10907 capture: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
10908 cellPadding: null,
10909 cellSpacing: null,
10910 charSet: MUST_USE_ATTRIBUTE,
10911 challenge: MUST_USE_ATTRIBUTE,
10912 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10913 classID: MUST_USE_ATTRIBUTE,
10914 // To set className on SVG elements, it's necessary to use .setAttribute;
10915 // this works on HTML elements too in all browsers except IE8. Conveniently,
10916 // IE8 doesn't support SVG and so we can simply use the attribute in
10917 // browsers that support SVG and the property in browsers that don't,
10918 // regardless of whether the element is HTML or SVG.
10919 className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
10920 cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
10921 colSpan: null,
10922 content: null,
10923 contentEditable: null,
10924 contextMenu: MUST_USE_ATTRIBUTE,
10925 controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10926 coords: null,
10927 crossOrigin: null,
10928 data: null, // For `<object />` acts as `src`.
10929 dateTime: MUST_USE_ATTRIBUTE,
10930 'default': HAS_BOOLEAN_VALUE,
10931 defer: HAS_BOOLEAN_VALUE,
10932 dir: null,
10933 disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
10934 download: HAS_OVERLOADED_BOOLEAN_VALUE,
10935 draggable: null,
10936 encType: null,
10937 form: MUST_USE_ATTRIBUTE,
10938 formAction: MUST_USE_ATTRIBUTE,
10939 formEncType: MUST_USE_ATTRIBUTE,
10940 formMethod: MUST_USE_ATTRIBUTE,
10941 formNoValidate: HAS_BOOLEAN_VALUE,
10942 formTarget: MUST_USE_ATTRIBUTE,
10943 frameBorder: MUST_USE_ATTRIBUTE,
10944 headers: null,
10945 height: MUST_USE_ATTRIBUTE,
10946 hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
10947 high: null,
10948 href: null,
10949 hrefLang: null,
10950 htmlFor: null,
10951 httpEquiv: null,
10952 icon: null,
10953 id: MUST_USE_PROPERTY,
10954 inputMode: MUST_USE_ATTRIBUTE,
10955 integrity: null,
10956 is: MUST_USE_ATTRIBUTE,
10957 keyParams: MUST_USE_ATTRIBUTE,
10958 keyType: MUST_USE_ATTRIBUTE,
10959 kind: null,
10960 label: null,
10961 lang: null,
10962 list: MUST_USE_ATTRIBUTE,
10963 loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10964 low: null,
10965 manifest: MUST_USE_ATTRIBUTE,
10966 marginHeight: null,
10967 marginWidth: null,
10968 max: null,
10969 maxLength: MUST_USE_ATTRIBUTE,
10970 media: MUST_USE_ATTRIBUTE,
10971 mediaGroup: null,
10972 method: null,
10973 min: null,
10974 minLength: MUST_USE_ATTRIBUTE,
10975 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10976 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10977 name: null,
10978 nonce: MUST_USE_ATTRIBUTE,
10979 noValidate: HAS_BOOLEAN_VALUE,
10980 open: HAS_BOOLEAN_VALUE,
10981 optimum: null,
10982 pattern: null,
10983 placeholder: null,
10984 poster: null,
10985 preload: null,
10986 radioGroup: null,
10987 readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
10988 rel: null,
10989 required: HAS_BOOLEAN_VALUE,
10990 reversed: HAS_BOOLEAN_VALUE,
10991 role: MUST_USE_ATTRIBUTE,
10992 rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
10993 rowSpan: null,
10994 sandbox: null,
10995 scope: null,
10996 scoped: HAS_BOOLEAN_VALUE,
10997 scrolling: null,
10998 seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
10999 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
11000 shape: null,
11001 size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
11002 sizes: MUST_USE_ATTRIBUTE,
11003 span: HAS_POSITIVE_NUMERIC_VALUE,
11004 spellCheck: null,
11005 src: null,
11006 srcDoc: MUST_USE_PROPERTY,
11007 srcLang: null,
11008 srcSet: MUST_USE_ATTRIBUTE,
11009 start: HAS_NUMERIC_VALUE,
11010 step: null,
11011 style: null,
11012 summary: null,
11013 tabIndex: null,
11014 target: null,
11015 title: null,
11016 type: null,
11017 useMap: null,
11018 value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
11019 width: MUST_USE_ATTRIBUTE,
11020 wmode: MUST_USE_ATTRIBUTE,
11021 wrap: null,
11022
11023 /**
11024 * RDFa Properties
11025 */
11026 about: MUST_USE_ATTRIBUTE,
11027 datatype: MUST_USE_ATTRIBUTE,
11028 inlist: MUST_USE_ATTRIBUTE,
11029 prefix: MUST_USE_ATTRIBUTE,
11030 // property is also supported for OpenGraph in meta tags.
11031 property: MUST_USE_ATTRIBUTE,
11032 resource: MUST_USE_ATTRIBUTE,
11033 'typeof': MUST_USE_ATTRIBUTE,
11034 vocab: MUST_USE_ATTRIBUTE,
11035
11036 /**
11037 * Non-standard Properties
11038 */
11039 // autoCapitalize and autoCorrect are supported in Mobile Safari for
11040 // keyboard hints.
11041 autoCapitalize: MUST_USE_ATTRIBUTE,
11042 autoCorrect: MUST_USE_ATTRIBUTE,
11043 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
11044 autoSave: null,
11045 // color is for Safari mask-icon link
11046 color: null,
11047 // itemProp, itemScope, itemType are for
11048 // Microdata support. See http://schema.org/docs/gs.html
11049 itemProp: MUST_USE_ATTRIBUTE,
11050 itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
11051 itemType: MUST_USE_ATTRIBUTE,
11052 // itemID and itemRef are for Microdata support as well but
11053 // only specified in the the WHATWG spec document. See
11054 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
11055 itemID: MUST_USE_ATTRIBUTE,
11056 itemRef: MUST_USE_ATTRIBUTE,
11057 // results show looking glass icon and recent searches on input
11058 // search fields in WebKit/Blink
11059 results: null,
11060 // IE-only attribute that specifies security restrictions on an iframe
11061 // as an alternative to the sandbox attribute on IE<10
11062 security: MUST_USE_ATTRIBUTE,
11063 // IE-only attribute that controls focus behavior
11064 unselectable: MUST_USE_ATTRIBUTE
11065 },
11066 DOMAttributeNames: {
11067 acceptCharset: 'accept-charset',
11068 className: 'class',
11069 htmlFor: 'for',
11070 httpEquiv: 'http-equiv'
11071 },
11072 DOMPropertyNames: {
11073 autoComplete: 'autocomplete',
11074 autoFocus: 'autofocus',
11075 autoPlay: 'autoplay',
11076 autoSave: 'autosave',
11077 // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
11078 // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
11079 encType: 'encoding',
11080 hrefLang: 'hreflang',
11081 radioGroup: 'radiogroup',
11082 spellCheck: 'spellcheck',
11083 srcDoc: 'srcdoc',
11084 srcSet: 'srcset'
11085 }
11086 };
11087
11088 module.exports = HTMLDOMPropertyConfig;
11089
11090/***/ }),
11091/* 91 */
11092/***/ (function(module, exports, __webpack_require__) {
11093
11094 /* WEBPACK VAR INJECTION */(function(process) {/**
11095 * Copyright 2013-2015, Facebook, Inc.
11096 * All rights reserved.
11097 *
11098 * This source code is licensed under the BSD-style license found in the
11099 * LICENSE file in the root directory of this source tree. An additional grant
11100 * of patent rights can be found in the PATENTS file in the same directory.
11101 *
11102 * @providesModule ReactBrowserComponentMixin
11103 */
11104
11105 'use strict';
11106
11107 var ReactInstanceMap = __webpack_require__(48);
11108
11109 var findDOMNode = __webpack_require__(92);
11110 var warning = __webpack_require__(26);
11111
11112 var didWarnKey = '_getDOMNodeDidWarn';
11113
11114 var ReactBrowserComponentMixin = {
11115 /**
11116 * Returns the DOM node rendered by this component.
11117 *
11118 * @return {DOMElement} The root node of this component.
11119 * @final
11120 * @protected
11121 */
11122 getDOMNode: function () {
11123 process.env.NODE_ENV !== 'production' ? warning(this.constructor[didWarnKey], '%s.getDOMNode(...) is deprecated. Please use ' + 'ReactDOM.findDOMNode(instance) instead.', ReactInstanceMap.get(this).getName() || this.tagName || 'Unknown') : undefined;
11124 this.constructor[didWarnKey] = true;
11125 return findDOMNode(this);
11126 }
11127 };
11128
11129 module.exports = ReactBrowserComponentMixin;
11130 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
11131
11132/***/ }),
11133/* 92 */
11134/***/ (function(module, exports, __webpack_require__) {
11135
11136 /* WEBPACK VAR INJECTION */(function(process) {/**
11137 * Copyright 2013-2015, Facebook, Inc.
11138 * All rights reserved.
11139 *
11140 * This source code is licensed under the BSD-style license found in the
11141 * LICENSE file in the root directory of this source tree. An additional grant
11142 * of patent rights can be found in the PATENTS file in the same directory.
11143 *
11144 * @providesModule findDOMNode
11145 * @typechecks static-only
11146 */
11147
11148 'use strict';
11149
11150 var ReactCurrentOwner = __webpack_require__(6);
11151 var ReactInstanceMap = __webpack_require__(48);
11152 var ReactMount = __webpack_require__(29);
11153
11154 var invariant = __webpack_require__(14);
11155 var warning = __webpack_require__(26);
11156
11157 /**
11158 * Returns the DOM node rendered by this element.
11159 *
11160 * @param {ReactComponent|DOMElement} componentOrElement
11161 * @return {?DOMElement} The root node of this element.
11162 */
11163 function findDOMNode(componentOrElement) {
11164 if (process.env.NODE_ENV !== 'production') {
11165 var owner = ReactCurrentOwner.current;
11166 if (owner !== null) {
11167 process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing getDOMNode or findDOMNode inside its render(). ' + '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') : undefined;
11168 owner._warnedAboutRefsInRender = true;
11169 }
11170 }
11171 if (componentOrElement == null) {
11172 return null;
11173 }
11174 if (componentOrElement.nodeType === 1) {
11175 return componentOrElement;
11176 }
11177 if (ReactInstanceMap.has(componentOrElement)) {
11178 return ReactMount.getNodeFromInstance(componentOrElement);
11179 }
11180 !(componentOrElement.render == null || typeof componentOrElement.render !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : invariant(false) : undefined;
11181 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : invariant(false) : undefined;
11182 }
11183
11184 module.exports = findDOMNode;
11185 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
11186
11187/***/ }),
11188/* 93 */
11189/***/ (function(module, exports, __webpack_require__) {
11190
11191 /**
11192 * Copyright 2013-2015, Facebook, Inc.
11193 * All rights reserved.
11194 *
11195 * This source code is licensed under the BSD-style license found in the
11196 * LICENSE file in the root directory of this source tree. An additional grant
11197 * of patent rights can be found in the PATENTS file in the same directory.
11198 *
11199 * @providesModule ReactDefaultBatchingStrategy
11200 */
11201
11202 'use strict';
11203
11204 var ReactUpdates = __webpack_require__(55);
11205 var Transaction = __webpack_require__(58);
11206
11207 var assign = __webpack_require__(40);
11208 var emptyFunction = __webpack_require__(16);
11209
11210 var RESET_BATCHED_UPDATES = {
11211 initialize: emptyFunction,
11212 close: function () {
11213 ReactDefaultBatchingStrategy.isBatchingUpdates = false;
11214 }
11215 };
11216
11217 var FLUSH_BATCHED_UPDATES = {
11218 initialize: emptyFunction,
11219 close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
11220 };
11221
11222 var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
11223
11224 function ReactDefaultBatchingStrategyTransaction() {
11225 this.reinitializeTransaction();
11226 }
11227
11228 assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction.Mixin, {
11229 getTransactionWrappers: function () {
11230 return TRANSACTION_WRAPPERS;
11231 }
11232 });
11233
11234 var transaction = new ReactDefaultBatchingStrategyTransaction();
11235
11236 var ReactDefaultBatchingStrategy = {
11237 isBatchingUpdates: false,
11238
11239 /**
11240 * Call the provided function in a context within which calls to `setState`
11241 * and friends are batched such that components aren't updated unnecessarily.
11242 */
11243 batchedUpdates: function (callback, a, b, c, d, e) {
11244 var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
11245
11246 ReactDefaultBatchingStrategy.isBatchingUpdates = true;
11247
11248 // The code is written this way to avoid extra allocations
11249 if (alreadyBatchingUpdates) {
11250 callback(a, b, c, d, e);
11251 } else {
11252 transaction.perform(callback, null, a, b, c, d, e);
11253 }
11254 }
11255 };
11256
11257 module.exports = ReactDefaultBatchingStrategy;
11258
11259/***/ }),
11260/* 94 */
11261/***/ (function(module, exports, __webpack_require__) {
11262
11263 /* WEBPACK VAR INJECTION */(function(process) {/**
11264 * Copyright 2013-2015, Facebook, Inc.
11265 * All rights reserved.
11266 *
11267 * This source code is licensed under the BSD-style license found in the
11268 * LICENSE file in the root directory of this source tree. An additional grant
11269 * of patent rights can be found in the PATENTS file in the same directory.
11270 *
11271 * @providesModule ReactDOMComponent
11272 * @typechecks static-only
11273 */
11274
11275 /* global hasOwnProperty:true */
11276
11277 'use strict';
11278
11279 var AutoFocusUtils = __webpack_require__(95);
11280 var CSSPropertyOperations = __webpack_require__(97);
11281 var DOMProperty = __webpack_require__(24);
11282 var DOMPropertyOperations = __webpack_require__(23);
11283 var EventConstants = __webpack_require__(31);
11284 var ReactBrowserEventEmitter = __webpack_require__(30);
11285 var ReactComponentBrowserEnvironment = __webpack_require__(27);
11286 var ReactDOMButton = __webpack_require__(105);
11287 var ReactDOMInput = __webpack_require__(106);
11288 var ReactDOMOption = __webpack_require__(110);
11289 var ReactDOMSelect = __webpack_require__(113);
11290 var ReactDOMTextarea = __webpack_require__(114);
11291 var ReactMount = __webpack_require__(29);
11292 var ReactMultiChild = __webpack_require__(115);
11293 var ReactPerf = __webpack_require__(19);
11294 var ReactUpdateQueue = __webpack_require__(54);
11295
11296 var assign = __webpack_require__(40);
11297 var canDefineProperty = __webpack_require__(44);
11298 var escapeTextContentForBrowser = __webpack_require__(22);
11299 var invariant = __webpack_require__(14);
11300 var isEventSupported = __webpack_require__(41);
11301 var keyOf = __webpack_require__(80);
11302 var setInnerHTML = __webpack_require__(20);
11303 var setTextContent = __webpack_require__(21);
11304 var shallowEqual = __webpack_require__(118);
11305 var validateDOMNesting = __webpack_require__(71);
11306 var warning = __webpack_require__(26);
11307
11308 var deleteListener = ReactBrowserEventEmitter.deleteListener;
11309 var listenTo = ReactBrowserEventEmitter.listenTo;
11310 var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;
11311
11312 // For quickly matching children type, to test if can be treated as content.
11313 var CONTENT_TYPES = { 'string': true, 'number': true };
11314
11315 var CHILDREN = keyOf({ children: null });
11316 var STYLE = keyOf({ style: null });
11317 var HTML = keyOf({ __html: null });
11318
11319 var ELEMENT_NODE_TYPE = 1;
11320
11321 function getDeclarationErrorAddendum(internalInstance) {
11322 if (internalInstance) {
11323 var owner = internalInstance._currentElement._owner || null;
11324 if (owner) {
11325 var name = owner.getName();
11326 if (name) {
11327 return ' This DOM node was rendered by `' + name + '`.';
11328 }
11329 }
11330 }
11331 return '';
11332 }
11333
11334 var legacyPropsDescriptor;
11335 if (process.env.NODE_ENV !== 'production') {
11336 legacyPropsDescriptor = {
11337 props: {
11338 enumerable: false,
11339 get: function () {
11340 var component = this._reactInternalComponent;
11341 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .props of a DOM node; instead, ' + 'recreate the props as `render` did originally or read the DOM ' + 'properties/attributes directly from this node (e.g., ' + 'this.refs.box.className).%s', getDeclarationErrorAddendum(component)) : undefined;
11342 return component._currentElement.props;
11343 }
11344 }
11345 };
11346 }
11347
11348 function legacyGetDOMNode() {
11349 if (process.env.NODE_ENV !== 'production') {
11350 var component = this._reactInternalComponent;
11351 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .getDOMNode() of a DOM node; ' + 'instead, use the node directly.%s', getDeclarationErrorAddendum(component)) : undefined;
11352 }
11353 return this;
11354 }
11355
11356 function legacyIsMounted() {
11357 var component = this._reactInternalComponent;
11358 if (process.env.NODE_ENV !== 'production') {
11359 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .isMounted() of a DOM node.%s', getDeclarationErrorAddendum(component)) : undefined;
11360 }
11361 return !!component;
11362 }
11363
11364 function legacySetStateEtc() {
11365 if (process.env.NODE_ENV !== 'production') {
11366 var component = this._reactInternalComponent;
11367 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setState(), .replaceState(), or ' + '.forceUpdate() of a DOM node. This is a no-op.%s', getDeclarationErrorAddendum(component)) : undefined;
11368 }
11369 }
11370
11371 function legacySetProps(partialProps, callback) {
11372 var component = this._reactInternalComponent;
11373 if (process.env.NODE_ENV !== 'production') {
11374 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
11375 }
11376 if (!component) {
11377 return;
11378 }
11379 ReactUpdateQueue.enqueueSetPropsInternal(component, partialProps);
11380 if (callback) {
11381 ReactUpdateQueue.enqueueCallbackInternal(component, callback);
11382 }
11383 }
11384
11385 function legacyReplaceProps(partialProps, callback) {
11386 var component = this._reactInternalComponent;
11387 if (process.env.NODE_ENV !== 'production') {
11388 process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .replaceProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
11389 }
11390 if (!component) {
11391 return;
11392 }
11393 ReactUpdateQueue.enqueueReplacePropsInternal(component, partialProps);
11394 if (callback) {
11395 ReactUpdateQueue.enqueueCallbackInternal(component, callback);
11396 }
11397 }
11398
11399 function friendlyStringify(obj) {
11400 if (typeof obj === 'object') {
11401 if (Array.isArray(obj)) {
11402 return '[' + obj.map(friendlyStringify).join(', ') + ']';
11403 } else {
11404 var pairs = [];
11405 for (var key in obj) {
11406 if (Object.prototype.hasOwnProperty.call(obj, key)) {
11407 var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
11408 pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
11409 }
11410 }
11411 return '{' + pairs.join(', ') + '}';
11412 }
11413 } else if (typeof obj === 'string') {
11414 return JSON.stringify(obj);
11415 } else if (typeof obj === 'function') {
11416 return '[function object]';
11417 }
11418 // Differs from JSON.stringify in that undefined becauses undefined and that
11419 // inf and nan don't become null
11420 return String(obj);
11421 }
11422
11423 var styleMutationWarning = {};
11424
11425 function checkAndWarnForMutatedStyle(style1, style2, component) {
11426 if (style1 == null || style2 == null) {
11427 return;
11428 }
11429 if (shallowEqual(style1, style2)) {
11430 return;
11431 }
11432
11433 var componentName = component._tag;
11434 var owner = component._currentElement._owner;
11435 var ownerName;
11436 if (owner) {
11437 ownerName = owner.getName();
11438 }
11439
11440 var hash = ownerName + '|' + componentName;
11441
11442 if (styleMutationWarning.hasOwnProperty(hash)) {
11443 return;
11444 }
11445
11446 styleMutationWarning[hash] = true;
11447
11448 process.env.NODE_ENV !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : undefined;
11449 }
11450
11451 /**
11452 * @param {object} component
11453 * @param {?object} props
11454 */
11455 function assertValidProps(component, props) {
11456 if (!props) {
11457 return;
11458 }
11459 // Note the use of `==` which checks for null or undefined.
11460 if (process.env.NODE_ENV !== 'production') {
11461 if (voidElementTags[component._tag]) {
11462 process.env.NODE_ENV !== 'production' ? warning(props.children == null && props.dangerouslySetInnerHTML == null, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : undefined;
11463 }
11464 }
11465 if (props.dangerouslySetInnerHTML != null) {
11466 !(props.children == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : undefined;
11467 !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : undefined;
11468 }
11469 if (process.env.NODE_ENV !== 'production') {
11470 process.env.NODE_ENV !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : undefined;
11471 process.env.NODE_ENV !== 'production' ? warning(!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.') : undefined;
11472 }
11473 !(props.style == null || typeof props.style === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : undefined;
11474 }
11475
11476 function enqueuePutListener(id, registrationName, listener, transaction) {
11477 if (process.env.NODE_ENV !== 'production') {
11478 // IE8 has no API for event capturing and the `onScroll` event doesn't
11479 // bubble.
11480 process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : undefined;
11481 }
11482 var container = ReactMount.findReactContainerForID(id);
11483 if (container) {
11484 var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container;
11485 listenTo(registrationName, doc);
11486 }
11487 transaction.getReactMountReady().enqueue(putListener, {
11488 id: id,
11489 registrationName: registrationName,
11490 listener: listener
11491 });
11492 }
11493
11494 function putListener() {
11495 var listenerToPut = this;
11496 ReactBrowserEventEmitter.putListener(listenerToPut.id, listenerToPut.registrationName, listenerToPut.listener);
11497 }
11498
11499 // There are so many media events, it makes sense to just
11500 // maintain a list rather than create a `trapBubbledEvent` for each
11501 var mediaEvents = {
11502 topAbort: 'abort',
11503 topCanPlay: 'canplay',
11504 topCanPlayThrough: 'canplaythrough',
11505 topDurationChange: 'durationchange',
11506 topEmptied: 'emptied',
11507 topEncrypted: 'encrypted',
11508 topEnded: 'ended',
11509 topError: 'error',
11510 topLoadedData: 'loadeddata',
11511 topLoadedMetadata: 'loadedmetadata',
11512 topLoadStart: 'loadstart',
11513 topPause: 'pause',
11514 topPlay: 'play',
11515 topPlaying: 'playing',
11516 topProgress: 'progress',
11517 topRateChange: 'ratechange',
11518 topSeeked: 'seeked',
11519 topSeeking: 'seeking',
11520 topStalled: 'stalled',
11521 topSuspend: 'suspend',
11522 topTimeUpdate: 'timeupdate',
11523 topVolumeChange: 'volumechange',
11524 topWaiting: 'waiting'
11525 };
11526
11527 function trapBubbledEventsLocal() {
11528 var inst = this;
11529 // If a component renders to null or if another component fatals and causes
11530 // the state of the tree to be corrupted, `node` here can be null.
11531 !inst._rootNodeID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : undefined;
11532 var node = ReactMount.getNode(inst._rootNodeID);
11533 !node ? process.env.NODE_ENV !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : undefined;
11534
11535 switch (inst._tag) {
11536 case 'iframe':
11537 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
11538 break;
11539 case 'video':
11540 case 'audio':
11541
11542 inst._wrapperState.listeners = [];
11543 // create listener for each media event
11544 for (var event in mediaEvents) {
11545 if (mediaEvents.hasOwnProperty(event)) {
11546 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
11547 }
11548 }
11549
11550 break;
11551 case 'img':
11552 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
11553 break;
11554 case 'form':
11555 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
11556 break;
11557 }
11558 }
11559
11560 function mountReadyInputWrapper() {
11561 ReactDOMInput.mountReadyWrapper(this);
11562 }
11563
11564 function postUpdateSelectWrapper() {
11565 ReactDOMSelect.postUpdateWrapper(this);
11566 }
11567
11568 // For HTML, certain tags should omit their close tag. We keep a whitelist for
11569 // those special cased tags.
11570
11571 var omittedCloseTags = {
11572 'area': true,
11573 'base': true,
11574 'br': true,
11575 'col': true,
11576 'embed': true,
11577 'hr': true,
11578 'img': true,
11579 'input': true,
11580 'keygen': true,
11581 'link': true,
11582 'meta': true,
11583 'param': true,
11584 'source': true,
11585 'track': true,
11586 'wbr': true
11587 };
11588
11589 // NOTE: menuitem's close tag should be omitted, but that causes problems.
11590 var newlineEatingTags = {
11591 'listing': true,
11592 'pre': true,
11593 'textarea': true
11594 };
11595
11596 // For HTML, certain tags cannot have children. This has the same purpose as
11597 // `omittedCloseTags` except that `menuitem` should still have its closing tag.
11598
11599 var voidElementTags = assign({
11600 'menuitem': true
11601 }, omittedCloseTags);
11602
11603 // We accept any tag to be rendered but since this gets injected into arbitrary
11604 // HTML, we want to make sure that it's a safe tag.
11605 // http://www.w3.org/TR/REC-xml/#NT-Name
11606
11607 var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
11608 var validatedTagCache = {};
11609 var hasOwnProperty = ({}).hasOwnProperty;
11610
11611 function validateDangerousTag(tag) {
11612 if (!hasOwnProperty.call(validatedTagCache, tag)) {
11613 !VALID_TAG_REGEX.test(tag) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : undefined;
11614 validatedTagCache[tag] = true;
11615 }
11616 }
11617
11618 function processChildContextDev(context, inst) {
11619 // Pass down our tag name to child components for validation purposes
11620 context = assign({}, context);
11621 var info = context[validateDOMNesting.ancestorInfoContextKey];
11622 context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(info, inst._tag, inst);
11623 return context;
11624 }
11625
11626 function isCustomComponent(tagName, props) {
11627 return tagName.indexOf('-') >= 0 || props.is != null;
11628 }
11629
11630 /**
11631 * Creates a new React class that is idempotent and capable of containing other
11632 * React components. It accepts event listeners and DOM properties that are
11633 * valid according to `DOMProperty`.
11634 *
11635 * - Event listeners: `onClick`, `onMouseDown`, etc.
11636 * - DOM properties: `className`, `name`, `title`, etc.
11637 *
11638 * The `style` property functions differently from the DOM API. It accepts an
11639 * object mapping of style properties to values.
11640 *
11641 * @constructor ReactDOMComponent
11642 * @extends ReactMultiChild
11643 */
11644 function ReactDOMComponent(tag) {
11645 validateDangerousTag(tag);
11646 this._tag = tag.toLowerCase();
11647 this._renderedChildren = null;
11648 this._previousStyle = null;
11649 this._previousStyleCopy = null;
11650 this._rootNodeID = null;
11651 this._wrapperState = null;
11652 this._topLevelWrapper = null;
11653 this._nodeWithLegacyProperties = null;
11654 if (process.env.NODE_ENV !== 'production') {
11655 this._unprocessedContextDev = null;
11656 this._processedContextDev = null;
11657 }
11658 }
11659
11660 ReactDOMComponent.displayName = 'ReactDOMComponent';
11661
11662 ReactDOMComponent.Mixin = {
11663
11664 construct: function (element) {
11665 this._currentElement = element;
11666 },
11667
11668 /**
11669 * Generates root tag markup then recurses. This method has side effects and
11670 * is not idempotent.
11671 *
11672 * @internal
11673 * @param {string} rootID The root DOM ID for this node.
11674 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11675 * @param {object} context
11676 * @return {string} The computed markup.
11677 */
11678 mountComponent: function (rootID, transaction, context) {
11679 this._rootNodeID = rootID;
11680
11681 var props = this._currentElement.props;
11682
11683 switch (this._tag) {
11684 case 'iframe':
11685 case 'img':
11686 case 'form':
11687 case 'video':
11688 case 'audio':
11689 this._wrapperState = {
11690 listeners: null
11691 };
11692 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
11693 break;
11694 case 'button':
11695 props = ReactDOMButton.getNativeProps(this, props, context);
11696 break;
11697 case 'input':
11698 ReactDOMInput.mountWrapper(this, props, context);
11699 props = ReactDOMInput.getNativeProps(this, props, context);
11700 break;
11701 case 'option':
11702 ReactDOMOption.mountWrapper(this, props, context);
11703 props = ReactDOMOption.getNativeProps(this, props, context);
11704 break;
11705 case 'select':
11706 ReactDOMSelect.mountWrapper(this, props, context);
11707 props = ReactDOMSelect.getNativeProps(this, props, context);
11708 context = ReactDOMSelect.processChildContext(this, props, context);
11709 break;
11710 case 'textarea':
11711 ReactDOMTextarea.mountWrapper(this, props, context);
11712 props = ReactDOMTextarea.getNativeProps(this, props, context);
11713 break;
11714 }
11715
11716 assertValidProps(this, props);
11717 if (process.env.NODE_ENV !== 'production') {
11718 if (context[validateDOMNesting.ancestorInfoContextKey]) {
11719 validateDOMNesting(this._tag, this, context[validateDOMNesting.ancestorInfoContextKey]);
11720 }
11721 }
11722
11723 if (process.env.NODE_ENV !== 'production') {
11724 this._unprocessedContextDev = context;
11725 this._processedContextDev = processChildContextDev(context, this);
11726 context = this._processedContextDev;
11727 }
11728
11729 var mountImage;
11730 if (transaction.useCreateElement) {
11731 var ownerDocument = context[ReactMount.ownerDocumentContextKey];
11732 var el = ownerDocument.createElement(this._currentElement.type);
11733 DOMPropertyOperations.setAttributeForID(el, this._rootNodeID);
11734 // Populate node cache
11735 ReactMount.getID(el);
11736 this._updateDOMProperties({}, props, transaction, el);
11737 this._createInitialChildren(transaction, props, context, el);
11738 mountImage = el;
11739 } else {
11740 var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
11741 var tagContent = this._createContentMarkup(transaction, props, context);
11742 if (!tagContent && omittedCloseTags[this._tag]) {
11743 mountImage = tagOpen + '/>';
11744 } else {
11745 mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
11746 }
11747 }
11748
11749 switch (this._tag) {
11750 case 'input':
11751 transaction.getReactMountReady().enqueue(mountReadyInputWrapper, this);
11752 // falls through
11753 case 'button':
11754 case 'select':
11755 case 'textarea':
11756 if (props.autoFocus) {
11757 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
11758 }
11759 break;
11760 }
11761
11762 return mountImage;
11763 },
11764
11765 /**
11766 * Creates markup for the open tag and all attributes.
11767 *
11768 * This method has side effects because events get registered.
11769 *
11770 * Iterating over object properties is faster than iterating over arrays.
11771 * @see http://jsperf.com/obj-vs-arr-iteration
11772 *
11773 * @private
11774 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11775 * @param {object} props
11776 * @return {string} Markup of opening tag.
11777 */
11778 _createOpenTagMarkupAndPutListeners: function (transaction, props) {
11779 var ret = '<' + this._currentElement.type;
11780
11781 for (var propKey in props) {
11782 if (!props.hasOwnProperty(propKey)) {
11783 continue;
11784 }
11785 var propValue = props[propKey];
11786 if (propValue == null) {
11787 continue;
11788 }
11789 if (registrationNameModules.hasOwnProperty(propKey)) {
11790 if (propValue) {
11791 enqueuePutListener(this._rootNodeID, propKey, propValue, transaction);
11792 }
11793 } else {
11794 if (propKey === STYLE) {
11795 if (propValue) {
11796 if (process.env.NODE_ENV !== 'production') {
11797 // See `_updateDOMProperties`. style block
11798 this._previousStyle = propValue;
11799 }
11800 propValue = this._previousStyleCopy = assign({}, props.style);
11801 }
11802 propValue = CSSPropertyOperations.createMarkupForStyles(propValue);
11803 }
11804 var markup = null;
11805 if (this._tag != null && isCustomComponent(this._tag, props)) {
11806 if (propKey !== CHILDREN) {
11807 markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
11808 }
11809 } else {
11810 markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
11811 }
11812 if (markup) {
11813 ret += ' ' + markup;
11814 }
11815 }
11816 }
11817
11818 // For static pages, no need to put React ID and checksum. Saves lots of
11819 // bytes.
11820 if (transaction.renderToStaticMarkup) {
11821 return ret;
11822 }
11823
11824 var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID);
11825 return ret + ' ' + markupForID;
11826 },
11827
11828 /**
11829 * Creates markup for the content between the tags.
11830 *
11831 * @private
11832 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11833 * @param {object} props
11834 * @param {object} context
11835 * @return {string} Content markup.
11836 */
11837 _createContentMarkup: function (transaction, props, context) {
11838 var ret = '';
11839
11840 // Intentional use of != to avoid catching zero/false.
11841 var innerHTML = props.dangerouslySetInnerHTML;
11842 if (innerHTML != null) {
11843 if (innerHTML.__html != null) {
11844 ret = innerHTML.__html;
11845 }
11846 } else {
11847 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11848 var childrenToUse = contentToUse != null ? null : props.children;
11849 if (contentToUse != null) {
11850 // TODO: Validate that text is allowed as a child of this node
11851 ret = escapeTextContentForBrowser(contentToUse);
11852 } else if (childrenToUse != null) {
11853 var mountImages = this.mountChildren(childrenToUse, transaction, context);
11854 ret = mountImages.join('');
11855 }
11856 }
11857 if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
11858 // text/html ignores the first character in these tags if it's a newline
11859 // Prefer to break application/xml over text/html (for now) by adding
11860 // a newline specifically to get eaten by the parser. (Alternately for
11861 // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
11862 // \r is normalized out by HTMLTextAreaElement#value.)
11863 // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
11864 // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
11865 // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
11866 // See: Parsing of "textarea" "listing" and "pre" elements
11867 // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
11868 return '\n' + ret;
11869 } else {
11870 return ret;
11871 }
11872 },
11873
11874 _createInitialChildren: function (transaction, props, context, el) {
11875 // Intentional use of != to avoid catching zero/false.
11876 var innerHTML = props.dangerouslySetInnerHTML;
11877 if (innerHTML != null) {
11878 if (innerHTML.__html != null) {
11879 setInnerHTML(el, innerHTML.__html);
11880 }
11881 } else {
11882 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11883 var childrenToUse = contentToUse != null ? null : props.children;
11884 if (contentToUse != null) {
11885 // TODO: Validate that text is allowed as a child of this node
11886 setTextContent(el, contentToUse);
11887 } else if (childrenToUse != null) {
11888 var mountImages = this.mountChildren(childrenToUse, transaction, context);
11889 for (var i = 0; i < mountImages.length; i++) {
11890 el.appendChild(mountImages[i]);
11891 }
11892 }
11893 }
11894 },
11895
11896 /**
11897 * Receives a next element and updates the component.
11898 *
11899 * @internal
11900 * @param {ReactElement} nextElement
11901 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11902 * @param {object} context
11903 */
11904 receiveComponent: function (nextElement, transaction, context) {
11905 var prevElement = this._currentElement;
11906 this._currentElement = nextElement;
11907 this.updateComponent(transaction, prevElement, nextElement, context);
11908 },
11909
11910 /**
11911 * Updates a native DOM component after it has already been allocated and
11912 * attached to the DOM. Reconciles the root DOM node, then recurses.
11913 *
11914 * @param {ReactReconcileTransaction} transaction
11915 * @param {ReactElement} prevElement
11916 * @param {ReactElement} nextElement
11917 * @internal
11918 * @overridable
11919 */
11920 updateComponent: function (transaction, prevElement, nextElement, context) {
11921 var lastProps = prevElement.props;
11922 var nextProps = this._currentElement.props;
11923
11924 switch (this._tag) {
11925 case 'button':
11926 lastProps = ReactDOMButton.getNativeProps(this, lastProps);
11927 nextProps = ReactDOMButton.getNativeProps(this, nextProps);
11928 break;
11929 case 'input':
11930 ReactDOMInput.updateWrapper(this);
11931 lastProps = ReactDOMInput.getNativeProps(this, lastProps);
11932 nextProps = ReactDOMInput.getNativeProps(this, nextProps);
11933 break;
11934 case 'option':
11935 lastProps = ReactDOMOption.getNativeProps(this, lastProps);
11936 nextProps = ReactDOMOption.getNativeProps(this, nextProps);
11937 break;
11938 case 'select':
11939 lastProps = ReactDOMSelect.getNativeProps(this, lastProps);
11940 nextProps = ReactDOMSelect.getNativeProps(this, nextProps);
11941 break;
11942 case 'textarea':
11943 ReactDOMTextarea.updateWrapper(this);
11944 lastProps = ReactDOMTextarea.getNativeProps(this, lastProps);
11945 nextProps = ReactDOMTextarea.getNativeProps(this, nextProps);
11946 break;
11947 }
11948
11949 if (process.env.NODE_ENV !== 'production') {
11950 // If the context is reference-equal to the old one, pass down the same
11951 // processed object so the update bailout in ReactReconciler behaves
11952 // correctly (and identically in dev and prod). See #5005.
11953 if (this._unprocessedContextDev !== context) {
11954 this._unprocessedContextDev = context;
11955 this._processedContextDev = processChildContextDev(context, this);
11956 }
11957 context = this._processedContextDev;
11958 }
11959
11960 assertValidProps(this, nextProps);
11961 this._updateDOMProperties(lastProps, nextProps, transaction, null);
11962 this._updateDOMChildren(lastProps, nextProps, transaction, context);
11963
11964 if (!canDefineProperty && this._nodeWithLegacyProperties) {
11965 this._nodeWithLegacyProperties.props = nextProps;
11966 }
11967
11968 if (this._tag === 'select') {
11969 // <select> value update needs to occur after <option> children
11970 // reconciliation
11971 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
11972 }
11973 },
11974
11975 /**
11976 * Reconciles the properties by detecting differences in property values and
11977 * updating the DOM as necessary. This function is probably the single most
11978 * critical path for performance optimization.
11979 *
11980 * TODO: Benchmark whether checking for changed values in memory actually
11981 * improves performance (especially statically positioned elements).
11982 * TODO: Benchmark the effects of putting this at the top since 99% of props
11983 * do not change for a given reconciliation.
11984 * TODO: Benchmark areas that can be improved with caching.
11985 *
11986 * @private
11987 * @param {object} lastProps
11988 * @param {object} nextProps
11989 * @param {ReactReconcileTransaction} transaction
11990 * @param {?DOMElement} node
11991 */
11992 _updateDOMProperties: function (lastProps, nextProps, transaction, node) {
11993 var propKey;
11994 var styleName;
11995 var styleUpdates;
11996 for (propKey in lastProps) {
11997 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey)) {
11998 continue;
11999 }
12000 if (propKey === STYLE) {
12001 var lastStyle = this._previousStyleCopy;
12002 for (styleName in lastStyle) {
12003 if (lastStyle.hasOwnProperty(styleName)) {
12004 styleUpdates = styleUpdates || {};
12005 styleUpdates[styleName] = '';
12006 }
12007 }
12008 this._previousStyleCopy = null;
12009 } else if (registrationNameModules.hasOwnProperty(propKey)) {
12010 if (lastProps[propKey]) {
12011 // Only call deleteListener if there was a listener previously or
12012 // else willDeleteListener gets called when there wasn't actually a
12013 // listener (e.g., onClick={null})
12014 deleteListener(this._rootNodeID, propKey);
12015 }
12016 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
12017 if (!node) {
12018 node = ReactMount.getNode(this._rootNodeID);
12019 }
12020 DOMPropertyOperations.deleteValueForProperty(node, propKey);
12021 }
12022 }
12023 for (propKey in nextProps) {
12024 var nextProp = nextProps[propKey];
12025 var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps[propKey];
12026 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) {
12027 continue;
12028 }
12029 if (propKey === STYLE) {
12030 if (nextProp) {
12031 if (process.env.NODE_ENV !== 'production') {
12032 checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
12033 this._previousStyle = nextProp;
12034 }
12035 nextProp = this._previousStyleCopy = assign({}, nextProp);
12036 } else {
12037 this._previousStyleCopy = null;
12038 }
12039 if (lastProp) {
12040 // Unset styles on `lastProp` but not on `nextProp`.
12041 for (styleName in lastProp) {
12042 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
12043 styleUpdates = styleUpdates || {};
12044 styleUpdates[styleName] = '';
12045 }
12046 }
12047 // Update styles that changed since `lastProp`.
12048 for (styleName in nextProp) {
12049 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
12050 styleUpdates = styleUpdates || {};
12051 styleUpdates[styleName] = nextProp[styleName];
12052 }
12053 }
12054 } else {
12055 // Relies on `updateStylesByID` not mutating `styleUpdates`.
12056 styleUpdates = nextProp;
12057 }
12058 } else if (registrationNameModules.hasOwnProperty(propKey)) {
12059 if (nextProp) {
12060 enqueuePutListener(this._rootNodeID, propKey, nextProp, transaction);
12061 } else if (lastProp) {
12062 deleteListener(this._rootNodeID, propKey);
12063 }
12064 } else if (isCustomComponent(this._tag, nextProps)) {
12065 if (!node) {
12066 node = ReactMount.getNode(this._rootNodeID);
12067 }
12068 if (propKey === CHILDREN) {
12069 nextProp = null;
12070 }
12071 DOMPropertyOperations.setValueForAttribute(node, propKey, nextProp);
12072 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
12073 if (!node) {
12074 node = ReactMount.getNode(this._rootNodeID);
12075 }
12076 // If we're updating to null or undefined, we should remove the property
12077 // from the DOM node instead of inadvertantly setting to a string. This
12078 // brings us in line with the same behavior we have on initial render.
12079 if (nextProp != null) {
12080 DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
12081 } else {
12082 DOMPropertyOperations.deleteValueForProperty(node, propKey);
12083 }
12084 }
12085 }
12086 if (styleUpdates) {
12087 if (!node) {
12088 node = ReactMount.getNode(this._rootNodeID);
12089 }
12090 CSSPropertyOperations.setValueForStyles(node, styleUpdates);
12091 }
12092 },
12093
12094 /**
12095 * Reconciles the children with the various properties that affect the
12096 * children content.
12097 *
12098 * @param {object} lastProps
12099 * @param {object} nextProps
12100 * @param {ReactReconcileTransaction} transaction
12101 * @param {object} context
12102 */
12103 _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
12104 var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
12105 var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
12106
12107 var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
12108 var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
12109
12110 // Note the use of `!=` which checks for null or undefined.
12111 var lastChildren = lastContent != null ? null : lastProps.children;
12112 var nextChildren = nextContent != null ? null : nextProps.children;
12113
12114 // If we're switching from children to content/html or vice versa, remove
12115 // the old content
12116 var lastHasContentOrHtml = lastContent != null || lastHtml != null;
12117 var nextHasContentOrHtml = nextContent != null || nextHtml != null;
12118 if (lastChildren != null && nextChildren == null) {
12119 this.updateChildren(null, transaction, context);
12120 } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
12121 this.updateTextContent('');
12122 }
12123
12124 if (nextContent != null) {
12125 if (lastContent !== nextContent) {
12126 this.updateTextContent('' + nextContent);
12127 }
12128 } else if (nextHtml != null) {
12129 if (lastHtml !== nextHtml) {
12130 this.updateMarkup('' + nextHtml);
12131 }
12132 } else if (nextChildren != null) {
12133 this.updateChildren(nextChildren, transaction, context);
12134 }
12135 },
12136
12137 /**
12138 * Destroys all event registrations for this instance. Does not remove from
12139 * the DOM. That must be done by the parent.
12140 *
12141 * @internal
12142 */
12143 unmountComponent: function () {
12144 switch (this._tag) {
12145 case 'iframe':
12146 case 'img':
12147 case 'form':
12148 case 'video':
12149 case 'audio':
12150 var listeners = this._wrapperState.listeners;
12151 if (listeners) {
12152 for (var i = 0; i < listeners.length; i++) {
12153 listeners[i].remove();
12154 }
12155 }
12156 break;
12157 case 'input':
12158 ReactDOMInput.unmountWrapper(this);
12159 break;
12160 case 'html':
12161 case 'head':
12162 case 'body':
12163 /**
12164 * Components like <html> <head> and <body> can't be removed or added
12165 * easily in a cross-browser way, however it's valuable to be able to
12166 * take advantage of React's reconciliation for styling and <title>
12167 * management. So we just document it and throw in dangerous cases.
12168 */
12169 true ? process.env.NODE_ENV !== 'production' ? invariant(false, '<%s> tried to unmount. Because of cross-browser quirks it is ' + 'impossible to unmount some top-level components (eg <html>, ' + '<head>, and <body>) reliably and efficiently. To fix this, have a ' + 'single top-level component that never unmounts render these ' + 'elements.', this._tag) : invariant(false) : undefined;
12170 break;
12171 }
12172
12173 this.unmountChildren();
12174 ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);
12175 ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);
12176 this._rootNodeID = null;
12177 this._wrapperState = null;
12178 if (this._nodeWithLegacyProperties) {
12179 var node = this._nodeWithLegacyProperties;
12180 node._reactInternalComponent = null;
12181 this._nodeWithLegacyProperties = null;
12182 }
12183 },
12184
12185 getPublicInstance: function () {
12186 if (!this._nodeWithLegacyProperties) {
12187 var node = ReactMount.getNode(this._rootNodeID);
12188
12189 node._reactInternalComponent = this;
12190 node.getDOMNode = legacyGetDOMNode;
12191 node.isMounted = legacyIsMounted;
12192 node.setState = legacySetStateEtc;
12193 node.replaceState = legacySetStateEtc;
12194 node.forceUpdate = legacySetStateEtc;
12195 node.setProps = legacySetProps;
12196 node.replaceProps = legacyReplaceProps;
12197
12198 if (process.env.NODE_ENV !== 'production') {
12199 if (canDefineProperty) {
12200 Object.defineProperties(node, legacyPropsDescriptor);
12201 } else {
12202 // updateComponent will update this property on subsequent renders
12203 node.props = this._currentElement.props;
12204 }
12205 } else {
12206 // updateComponent will update this property on subsequent renders
12207 node.props = this._currentElement.props;
12208 }
12209
12210 this._nodeWithLegacyProperties = node;
12211 }
12212 return this._nodeWithLegacyProperties;
12213 }
12214
12215 };
12216
12217 ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', {
12218 mountComponent: 'mountComponent',
12219 updateComponent: 'updateComponent'
12220 });
12221
12222 assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
12223
12224 module.exports = ReactDOMComponent;
12225 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12226
12227/***/ }),
12228/* 95 */
12229/***/ (function(module, exports, __webpack_require__) {
12230
12231 /**
12232 * Copyright 2013-2015, Facebook, Inc.
12233 * All rights reserved.
12234 *
12235 * This source code is licensed under the BSD-style license found in the
12236 * LICENSE file in the root directory of this source tree. An additional grant
12237 * of patent rights can be found in the PATENTS file in the same directory.
12238 *
12239 * @providesModule AutoFocusUtils
12240 * @typechecks static-only
12241 */
12242
12243 'use strict';
12244
12245 var ReactMount = __webpack_require__(29);
12246
12247 var findDOMNode = __webpack_require__(92);
12248 var focusNode = __webpack_require__(96);
12249
12250 var Mixin = {
12251 componentDidMount: function () {
12252 if (this.props.autoFocus) {
12253 focusNode(findDOMNode(this));
12254 }
12255 }
12256 };
12257
12258 var AutoFocusUtils = {
12259 Mixin: Mixin,
12260
12261 focusDOMComponent: function () {
12262 focusNode(ReactMount.getNode(this._rootNodeID));
12263 }
12264 };
12265
12266 module.exports = AutoFocusUtils;
12267
12268/***/ }),
12269/* 96 */
12270/***/ (function(module, exports) {
12271
12272 /**
12273 * Copyright 2013-2015, Facebook, Inc.
12274 * All rights reserved.
12275 *
12276 * This source code is licensed under the BSD-style license found in the
12277 * LICENSE file in the root directory of this source tree. An additional grant
12278 * of patent rights can be found in the PATENTS file in the same directory.
12279 *
12280 * @providesModule focusNode
12281 */
12282
12283 'use strict';
12284
12285 /**
12286 * @param {DOMElement} node input/textarea to focus
12287 */
12288 function focusNode(node) {
12289 // IE8 can throw "Can't move focus to the control because it is invisible,
12290 // not enabled, or of a type that does not accept the focus." for all kinds of
12291 // reasons that are too expensive and fragile to test.
12292 try {
12293 node.focus();
12294 } catch (e) {}
12295 }
12296
12297 module.exports = focusNode;
12298
12299/***/ }),
12300/* 97 */
12301/***/ (function(module, exports, __webpack_require__) {
12302
12303 /* WEBPACK VAR INJECTION */(function(process) {/**
12304 * Copyright 2013-2015, Facebook, Inc.
12305 * All rights reserved.
12306 *
12307 * This source code is licensed under the BSD-style license found in the
12308 * LICENSE file in the root directory of this source tree. An additional grant
12309 * of patent rights can be found in the PATENTS file in the same directory.
12310 *
12311 * @providesModule CSSPropertyOperations
12312 * @typechecks static-only
12313 */
12314
12315 'use strict';
12316
12317 var CSSProperty = __webpack_require__(98);
12318 var ExecutionEnvironment = __webpack_require__(10);
12319 var ReactPerf = __webpack_require__(19);
12320
12321 var camelizeStyleName = __webpack_require__(99);
12322 var dangerousStyleValue = __webpack_require__(101);
12323 var hyphenateStyleName = __webpack_require__(102);
12324 var memoizeStringOnly = __webpack_require__(104);
12325 var warning = __webpack_require__(26);
12326
12327 var processStyleName = memoizeStringOnly(function (styleName) {
12328 return hyphenateStyleName(styleName);
12329 });
12330
12331 var hasShorthandPropertyBug = false;
12332 var styleFloatAccessor = 'cssFloat';
12333 if (ExecutionEnvironment.canUseDOM) {
12334 var tempStyle = document.createElement('div').style;
12335 try {
12336 // IE8 throws "Invalid argument." if resetting shorthand style properties.
12337 tempStyle.font = '';
12338 } catch (e) {
12339 hasShorthandPropertyBug = true;
12340 }
12341 // IE8 only supports accessing cssFloat (standard) as styleFloat
12342 if (document.documentElement.style.cssFloat === undefined) {
12343 styleFloatAccessor = 'styleFloat';
12344 }
12345 }
12346
12347 if (process.env.NODE_ENV !== 'production') {
12348 // 'msTransform' is correct, but the other prefixes should be capitalized
12349 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
12350
12351 // style values shouldn't contain a semicolon
12352 var badStyleValueWithSemicolonPattern = /;\s*$/;
12353
12354 var warnedStyleNames = {};
12355 var warnedStyleValues = {};
12356
12357 var warnHyphenatedStyleName = function (name) {
12358 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
12359 return;
12360 }
12361
12362 warnedStyleNames[name] = true;
12363 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : undefined;
12364 };
12365
12366 var warnBadVendoredStyleName = function (name) {
12367 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
12368 return;
12369 }
12370
12371 warnedStyleNames[name] = true;
12372 process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : undefined;
12373 };
12374
12375 var warnStyleValueWithSemicolon = function (name, value) {
12376 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
12377 return;
12378 }
12379
12380 warnedStyleValues[value] = true;
12381 process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : undefined;
12382 };
12383
12384 /**
12385 * @param {string} name
12386 * @param {*} value
12387 */
12388 var warnValidStyle = function (name, value) {
12389 if (name.indexOf('-') > -1) {
12390 warnHyphenatedStyleName(name);
12391 } else if (badVendoredStyleNamePattern.test(name)) {
12392 warnBadVendoredStyleName(name);
12393 } else if (badStyleValueWithSemicolonPattern.test(value)) {
12394 warnStyleValueWithSemicolon(name, value);
12395 }
12396 };
12397 }
12398
12399 /**
12400 * Operations for dealing with CSS properties.
12401 */
12402 var CSSPropertyOperations = {
12403
12404 /**
12405 * Serializes a mapping of style properties for use as inline styles:
12406 *
12407 * > createMarkupForStyles({width: '200px', height: 0})
12408 * "width:200px;height:0;"
12409 *
12410 * Undefined values are ignored so that declarative programming is easier.
12411 * The result should be HTML-escaped before insertion into the DOM.
12412 *
12413 * @param {object} styles
12414 * @return {?string}
12415 */
12416 createMarkupForStyles: function (styles) {
12417 var serialized = '';
12418 for (var styleName in styles) {
12419 if (!styles.hasOwnProperty(styleName)) {
12420 continue;
12421 }
12422 var styleValue = styles[styleName];
12423 if (process.env.NODE_ENV !== 'production') {
12424 warnValidStyle(styleName, styleValue);
12425 }
12426 if (styleValue != null) {
12427 serialized += processStyleName(styleName) + ':';
12428 serialized += dangerousStyleValue(styleName, styleValue) + ';';
12429 }
12430 }
12431 return serialized || null;
12432 },
12433
12434 /**
12435 * Sets the value for multiple styles on a node. If a value is specified as
12436 * '' (empty string), the corresponding style property will be unset.
12437 *
12438 * @param {DOMElement} node
12439 * @param {object} styles
12440 */
12441 setValueForStyles: function (node, styles) {
12442 var style = node.style;
12443 for (var styleName in styles) {
12444 if (!styles.hasOwnProperty(styleName)) {
12445 continue;
12446 }
12447 if (process.env.NODE_ENV !== 'production') {
12448 warnValidStyle(styleName, styles[styleName]);
12449 }
12450 var styleValue = dangerousStyleValue(styleName, styles[styleName]);
12451 if (styleName === 'float') {
12452 styleName = styleFloatAccessor;
12453 }
12454 if (styleValue) {
12455 style[styleName] = styleValue;
12456 } else {
12457 var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
12458 if (expansion) {
12459 // Shorthand property that IE8 won't like unsetting, so unset each
12460 // component to placate it
12461 for (var individualStyleName in expansion) {
12462 style[individualStyleName] = '';
12463 }
12464 } else {
12465 style[styleName] = '';
12466 }
12467 }
12468 }
12469 }
12470
12471 };
12472
12473 ReactPerf.measureMethods(CSSPropertyOperations, 'CSSPropertyOperations', {
12474 setValueForStyles: 'setValueForStyles'
12475 });
12476
12477 module.exports = CSSPropertyOperations;
12478 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
12479
12480/***/ }),
12481/* 98 */
12482/***/ (function(module, exports) {
12483
12484 /**
12485 * Copyright 2013-2015, Facebook, Inc.
12486 * All rights reserved.
12487 *
12488 * This source code is licensed under the BSD-style license found in the
12489 * LICENSE file in the root directory of this source tree. An additional grant
12490 * of patent rights can be found in the PATENTS file in the same directory.
12491 *
12492 * @providesModule CSSProperty
12493 */
12494
12495 'use strict';
12496
12497 /**
12498 * CSS properties which accept numbers but are not in units of "px".
12499 */
12500 var isUnitlessNumber = {
12501 animationIterationCount: true,
12502 boxFlex: true,
12503 boxFlexGroup: true,
12504 boxOrdinalGroup: true,
12505 columnCount: true,
12506 flex: true,
12507 flexGrow: true,
12508 flexPositive: true,
12509 flexShrink: true,
12510 flexNegative: true,
12511 flexOrder: true,
12512 fontWeight: true,
12513 lineClamp: true,
12514 lineHeight: true,
12515 opacity: true,
12516 order: true,
12517 orphans: true,
12518 tabSize: true,
12519 widows: true,
12520 zIndex: true,
12521 zoom: true,
12522
12523 // SVG-related properties
12524 fillOpacity: true,
12525 stopOpacity: true,
12526 strokeDashoffset: true,
12527 strokeOpacity: true,
12528 strokeWidth: true
12529 };
12530
12531 /**
12532 * @param {string} prefix vendor-specific prefix, eg: Webkit
12533 * @param {string} key style name, eg: transitionDuration
12534 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
12535 * WebkitTransitionDuration
12536 */
12537 function prefixKey(prefix, key) {
12538 return prefix + key.charAt(0).toUpperCase() + key.substring(1);
12539 }
12540
12541 /**
12542 * Support style names that may come passed in prefixed by adding permutations
12543 * of vendor prefixes.
12544 */
12545 var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
12546
12547 // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
12548 // infinite loop, because it iterates over the newly added props too.
12549 Object.keys(isUnitlessNumber).forEach(function (prop) {
12550 prefixes.forEach(function (prefix) {
12551 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
12552 });
12553 });
12554
12555 /**
12556 * Most style properties can be unset by doing .style[prop] = '' but IE8
12557 * doesn't like doing that with shorthand properties so for the properties that
12558 * IE8 breaks on, which are listed here, we instead unset each of the
12559 * individual properties. See http://bugs.jquery.com/ticket/12385.
12560 * The 4-value 'clock' properties like margin, padding, border-width seem to
12561 * behave without any problems. Curiously, list-style works too without any
12562 * special prodding.
12563 */
12564 var shorthandPropertyExpansions = {
12565 background: {
12566 backgroundAttachment: true,
12567 backgroundColor: true,
12568 backgroundImage: true,
12569 backgroundPositionX: true,
12570 backgroundPositionY: true,
12571 backgroundRepeat: true
12572 },
12573 backgroundPosition: {
12574 backgroundPositionX: true,
12575 backgroundPositionY: true
12576 },
12577 border: {
12578 borderWidth: true,
12579 borderStyle: true,
12580 borderColor: true
12581 },
12582 borderBottom: {
12583 borderBottomWidth: true,
12584 borderBottomStyle: true,
12585 borderBottomColor: true
12586 },
12587 borderLeft: {
12588 borderLeftWidth: true,
12589 borderLeftStyle: true,
12590 borderLeftColor: true
12591 },
12592 borderRight: {
12593 borderRightWidth: true,
12594 borderRightStyle: true,
12595 borderRightColor: true
12596 },
12597 borderTop: {
12598 borderTopWidth: true,
12599 borderTopStyle: true,
12600 borderTopColor: true
12601 },
12602 font: {
12603 fontStyle: true,
12604 fontVariant: true,
12605 fontWeight: true,
12606 fontSize: true,
12607 lineHeight: true,
12608 fontFamily: true
12609 },
12610 outline: {
12611 outlineWidth: true,
12612 outlineStyle: true,
12613 outlineColor: true
12614 }
12615 };
12616
12617 var CSSProperty = {
12618 isUnitlessNumber: isUnitlessNumber,
12619 shorthandPropertyExpansions: shorthandPropertyExpansions
12620 };
12621
12622 module.exports = CSSProperty;
12623
12624/***/ }),
12625/* 99 */
12626/***/ (function(module, exports, __webpack_require__) {
12627
12628 /**
12629 * Copyright 2013-2015, Facebook, Inc.
12630 * All rights reserved.
12631 *
12632 * This source code is licensed under the BSD-style license found in the
12633 * LICENSE file in the root directory of this source tree. An additional grant
12634 * of patent rights can be found in the PATENTS file in the same directory.
12635 *
12636 * @providesModule camelizeStyleName
12637 * @typechecks
12638 */
12639
12640 'use strict';
12641
12642 var camelize = __webpack_require__(100);
12643
12644 var msPattern = /^-ms-/;
12645
12646 /**
12647 * Camelcases a hyphenated CSS property name, for example:
12648 *
12649 * > camelizeStyleName('background-color')
12650 * < "backgroundColor"
12651 * > camelizeStyleName('-moz-transition')
12652 * < "MozTransition"
12653 * > camelizeStyleName('-ms-transition')
12654 * < "msTransition"
12655 *
12656 * As Andi Smith suggests
12657 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
12658 * is converted to lowercase `ms`.
12659 *
12660 * @param {string} string
12661 * @return {string}
12662 */
12663 function camelizeStyleName(string) {
12664 return camelize(string.replace(msPattern, 'ms-'));
12665 }
12666
12667 module.exports = camelizeStyleName;
12668
12669/***/ }),
12670/* 100 */
12671/***/ (function(module, exports) {
12672
12673 /**
12674 * Copyright 2013-2015, Facebook, Inc.
12675 * All rights reserved.
12676 *
12677 * This source code is licensed under the BSD-style license found in the
12678 * LICENSE file in the root directory of this source tree. An additional grant
12679 * of patent rights can be found in the PATENTS file in the same directory.
12680 *
12681 * @providesModule camelize
12682 * @typechecks
12683 */
12684
12685 "use strict";
12686
12687 var _hyphenPattern = /-(.)/g;
12688
12689 /**
12690 * Camelcases a hyphenated string, for example:
12691 *
12692 * > camelize('background-color')
12693 * < "backgroundColor"
12694 *
12695 * @param {string} string
12696 * @return {string}
12697 */
12698 function camelize(string) {
12699 return string.replace(_hyphenPattern, function (_, character) {
12700 return character.toUpperCase();
12701 });
12702 }
12703
12704 module.exports = camelize;
12705
12706/***/ }),
12707/* 101 */
12708/***/ (function(module, exports, __webpack_require__) {
12709
12710 /**
12711 * Copyright 2013-2015, Facebook, Inc.
12712 * All rights reserved.
12713 *
12714 * This source code is licensed under the BSD-style license found in the
12715 * LICENSE file in the root directory of this source tree. An additional grant
12716 * of patent rights can be found in the PATENTS file in the same directory.
12717 *
12718 * @providesModule dangerousStyleValue
12719 * @typechecks static-only
12720 */
12721
12722 'use strict';
12723
12724 var CSSProperty = __webpack_require__(98);
12725
12726 var isUnitlessNumber = CSSProperty.isUnitlessNumber;
12727
12728 /**
12729 * Convert a value into the proper css writable value. The style name `name`
12730 * should be logical (no hyphens), as specified
12731 * in `CSSProperty.isUnitlessNumber`.
12732 *
12733 * @param {string} name CSS property name such as `topMargin`.
12734 * @param {*} value CSS property value such as `10px`.
12735 * @return {string} Normalized style value with dimensions applied.
12736 */
12737 function dangerousStyleValue(name, value) {
12738 // Note that we've removed escapeTextForBrowser() calls here since the
12739 // whole string will be escaped when the attribute is injected into
12740 // the markup. If you provide unsafe user data here they can inject
12741 // arbitrary CSS which may be problematic (I couldn't repro this):
12742 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
12743 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
12744 // This is not an XSS hole but instead a potential CSS injection issue
12745 // which has lead to a greater discussion about how we're going to
12746 // trust URLs moving forward. See #2115901
12747
12748 var isEmpty = value == null || typeof value === 'boolean' || value === '';
12749 if (isEmpty) {
12750 return '';
12751 }
12752
12753 var isNonNumeric = isNaN(value);
12754 if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
12755 return '' + value; // cast to string
12756 }
12757
12758 if (typeof value === 'string') {
12759 value = value.trim();
12760 }
12761 return value + 'px';
12762 }
12763
12764 module.exports = dangerousStyleValue;
12765
12766/***/ }),
12767/* 102 */
12768/***/ (function(module, exports, __webpack_require__) {
12769
12770 /**
12771 * Copyright 2013-2015, Facebook, Inc.
12772 * All rights reserved.
12773 *
12774 * This source code is licensed under the BSD-style license found in the
12775 * LICENSE file in the root directory of this source tree. An additional grant
12776 * of patent rights can be found in the PATENTS file in the same directory.
12777 *
12778 * @providesModule hyphenateStyleName
12779 * @typechecks
12780 */
12781
12782 'use strict';
12783
12784 var hyphenate = __webpack_require__(103);
12785
12786 var msPattern = /^ms-/;
12787
12788 /**
12789 * Hyphenates a camelcased CSS property name, for example:
12790 *
12791 * > hyphenateStyleName('backgroundColor')
12792 * < "background-color"
12793 * > hyphenateStyleName('MozTransition')
12794 * < "-moz-transition"
12795 * > hyphenateStyleName('msTransition')
12796 * < "-ms-transition"
12797 *
12798 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
12799 * is converted to `-ms-`.
12800 *
12801 * @param {string} string
12802 * @return {string}
12803 */
12804 function hyphenateStyleName(string) {
12805 return hyphenate(string).replace(msPattern, '-ms-');
12806 }
12807
12808 module.exports = hyphenateStyleName;
12809
12810/***/ }),
12811/* 103 */
12812/***/ (function(module, exports) {
12813
12814 /**
12815 * Copyright 2013-2015, Facebook, Inc.
12816 * All rights reserved.
12817 *
12818 * This source code is licensed under the BSD-style license found in the
12819 * LICENSE file in the root directory of this source tree. An additional grant
12820 * of patent rights can be found in the PATENTS file in the same directory.
12821 *
12822 * @providesModule hyphenate
12823 * @typechecks
12824 */
12825
12826 'use strict';
12827
12828 var _uppercasePattern = /([A-Z])/g;
12829
12830 /**
12831 * Hyphenates a camelcased string, for example:
12832 *
12833 * > hyphenate('backgroundColor')
12834 * < "background-color"
12835 *
12836 * For CSS style names, use `hyphenateStyleName` instead which works properly
12837 * with all vendor prefixes, including `ms`.
12838 *
12839 * @param {string} string
12840 * @return {string}
12841 */
12842 function hyphenate(string) {
12843 return string.replace(_uppercasePattern, '-$1').toLowerCase();
12844 }
12845
12846 module.exports = hyphenate;
12847
12848/***/ }),
12849/* 104 */
12850/***/ (function(module, exports) {
12851
12852 /**
12853 * Copyright 2013-2015, Facebook, Inc.
12854 * All rights reserved.
12855 *
12856 * This source code is licensed under the BSD-style license found in the
12857 * LICENSE file in the root directory of this source tree. An additional grant
12858 * of patent rights can be found in the PATENTS file in the same directory.
12859 *
12860 * @providesModule memoizeStringOnly
12861 * @typechecks static-only
12862 */
12863
12864 'use strict';
12865
12866 /**
12867 * Memoizes the return value of a function that accepts one string argument.
12868 *
12869 * @param {function} callback
12870 * @return {function}
12871 */
12872 function memoizeStringOnly(callback) {
12873 var cache = {};
12874 return function (string) {
12875 if (!cache.hasOwnProperty(string)) {
12876 cache[string] = callback.call(this, string);
12877 }
12878 return cache[string];
12879 };
12880 }
12881
12882 module.exports = memoizeStringOnly;
12883
12884/***/ }),
12885/* 105 */
12886/***/ (function(module, exports) {
12887
12888 /**
12889 * Copyright 2013-2015, Facebook, Inc.
12890 * All rights reserved.
12891 *
12892 * This source code is licensed under the BSD-style license found in the
12893 * LICENSE file in the root directory of this source tree. An additional grant
12894 * of patent rights can be found in the PATENTS file in the same directory.
12895 *
12896 * @providesModule ReactDOMButton
12897 */
12898
12899 'use strict';
12900
12901 var mouseListenerNames = {
12902 onClick: true,
12903 onDoubleClick: true,
12904 onMouseDown: true,
12905 onMouseMove: true,
12906 onMouseUp: true,
12907
12908 onClickCapture: true,
12909 onDoubleClickCapture: true,
12910 onMouseDownCapture: true,
12911 onMouseMoveCapture: true,
12912 onMouseUpCapture: true
12913 };
12914
12915 /**
12916 * Implements a <button> native component that does not receive mouse events
12917 * when `disabled` is set.
12918 */
12919 var ReactDOMButton = {
12920 getNativeProps: function (inst, props, context) {
12921 if (!props.disabled) {
12922 return props;
12923 }
12924
12925 // Copy the props, except the mouse listeners
12926 var nativeProps = {};
12927 for (var key in props) {
12928 if (props.hasOwnProperty(key) && !mouseListenerNames[key]) {
12929 nativeProps[key] = props[key];
12930 }
12931 }
12932
12933 return nativeProps;
12934 }
12935 };
12936
12937 module.exports = ReactDOMButton;
12938
12939/***/ }),
12940/* 106 */
12941/***/ (function(module, exports, __webpack_require__) {
12942
12943 /* WEBPACK VAR INJECTION */(function(process) {/**
12944 * Copyright 2013-2015, Facebook, Inc.
12945 * All rights reserved.
12946 *
12947 * This source code is licensed under the BSD-style license found in the
12948 * LICENSE file in the root directory of this source tree. An additional grant
12949 * of patent rights can be found in the PATENTS file in the same directory.
12950 *
12951 * @providesModule ReactDOMInput
12952 */
12953
12954 'use strict';
12955
12956 var ReactDOMIDOperations = __webpack_require__(28);
12957 var LinkedValueUtils = __webpack_require__(107);
12958 var ReactMount = __webpack_require__(29);
12959 var ReactUpdates = __webpack_require__(55);
12960
12961 var assign = __webpack_require__(40);
12962 var invariant = __webpack_require__(14);
12963
12964 var instancesByReactID = {};
12965
12966 function forceUpdateIfMounted() {
12967 if (this._rootNodeID) {
12968 // DOM component is still mounted; update
12969 ReactDOMInput.updateWrapper(this);
12970 }
12971 }
12972
12973 /**
12974 * Implements an <input> native component that allows setting these optional
12975 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
12976 *
12977 * If `checked` or `value` are not supplied (or null/undefined), user actions
12978 * that affect the checked state or value will trigger updates to the element.
12979 *
12980 * If they are supplied (and not null/undefined), the rendered element will not
12981 * trigger updates to the element. Instead, the props must change in order for
12982 * the rendered element to be updated.
12983 *
12984 * The rendered element will be initialized as unchecked (or `defaultChecked`)
12985 * with an empty value (or `defaultValue`).
12986 *
12987 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
12988 */
12989 var ReactDOMInput = {
12990 getNativeProps: function (inst, props, context) {
12991 var value = LinkedValueUtils.getValue(props);
12992 var checked = LinkedValueUtils.getChecked(props);
12993
12994 var nativeProps = assign({}, props, {
12995 defaultChecked: undefined,
12996 defaultValue: undefined,
12997 value: value != null ? value : inst._wrapperState.initialValue,
12998 checked: checked != null ? checked : inst._wrapperState.initialChecked,
12999 onChange: inst._wrapperState.onChange
13000 });
13001
13002 return nativeProps;
13003 },
13004
13005 mountWrapper: function (inst, props) {
13006 if (process.env.NODE_ENV !== 'production') {
13007 LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
13008 }
13009
13010 var defaultValue = props.defaultValue;
13011 inst._wrapperState = {
13012 initialChecked: props.defaultChecked || false,
13013 initialValue: defaultValue != null ? defaultValue : null,
13014 onChange: _handleChange.bind(inst)
13015 };
13016 },
13017
13018 mountReadyWrapper: function (inst) {
13019 // Can't be in mountWrapper or else server rendering leaks.
13020 instancesByReactID[inst._rootNodeID] = inst;
13021 },
13022
13023 unmountWrapper: function (inst) {
13024 delete instancesByReactID[inst._rootNodeID];
13025 },
13026
13027 updateWrapper: function (inst) {
13028 var props = inst._currentElement.props;
13029
13030 // TODO: Shouldn't this be getChecked(props)?
13031 var checked = props.checked;
13032 if (checked != null) {
13033 ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'checked', checked || false);
13034 }
13035
13036 var value = LinkedValueUtils.getValue(props);
13037 if (value != null) {
13038 // Cast `value` to a string to ensure the value is set correctly. While
13039 // browsers typically do this as necessary, jsdom doesn't.
13040 ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value);
13041 }
13042 }
13043 };
13044
13045 function _handleChange(event) {
13046 var props = this._currentElement.props;
13047
13048 var returnValue = LinkedValueUtils.executeOnChange(props, event);
13049
13050 // Here we use asap to wait until all updates have propagated, which
13051 // is important when using controlled components within layers:
13052 // https://github.com/facebook/react/issues/1698
13053 ReactUpdates.asap(forceUpdateIfMounted, this);
13054
13055 var name = props.name;
13056 if (props.type === 'radio' && name != null) {
13057 var rootNode = ReactMount.getNode(this._rootNodeID);
13058 var queryRoot = rootNode;
13059
13060 while (queryRoot.parentNode) {
13061 queryRoot = queryRoot.parentNode;
13062 }
13063
13064 // If `rootNode.form` was non-null, then we could try `form.elements`,
13065 // but that sometimes behaves strangely in IE8. We could also try using
13066 // `form.getElementsByName`, but that will only return direct children
13067 // and won't include inputs that use the HTML5 `form=` attribute. Since
13068 // the input might not even be in a form, let's just use the global
13069 // `querySelectorAll` to ensure we don't miss anything.
13070 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
13071
13072 for (var i = 0; i < group.length; i++) {
13073 var otherNode = group[i];
13074 if (otherNode === rootNode || otherNode.form !== rootNode.form) {
13075 continue;
13076 }
13077 // This will throw if radio buttons rendered by different copies of React
13078 // and the same name are rendered into the same form (same as #1939).
13079 // That's probably okay; we don't support it just as we don't support
13080 // mixing React with non-React.
13081 var otherID = ReactMount.getID(otherNode);
13082 !otherID ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(false) : undefined;
13083 var otherInstance = instancesByReactID[otherID];
13084 !otherInstance ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(false) : undefined;
13085 // If this is a controlled radio button group, forcing the input that
13086 // was previously checked to update will cause it to be come re-checked
13087 // as appropriate.
13088 ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
13089 }
13090 }
13091
13092 return returnValue;
13093 }
13094
13095 module.exports = ReactDOMInput;
13096 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
13097
13098/***/ }),
13099/* 107 */
13100/***/ (function(module, exports, __webpack_require__) {
13101
13102 /* WEBPACK VAR INJECTION */(function(process) {/**
13103 * Copyright 2013-2015, Facebook, Inc.
13104 * All rights reserved.
13105 *
13106 * This source code is licensed under the BSD-style license found in the
13107 * LICENSE file in the root directory of this source tree. An additional grant
13108 * of patent rights can be found in the PATENTS file in the same directory.
13109 *
13110 * @providesModule LinkedValueUtils
13111 * @typechecks static-only
13112 */
13113
13114 'use strict';
13115
13116 var ReactPropTypes = __webpack_require__(108);
13117 var ReactPropTypeLocations = __webpack_require__(66);
13118
13119 var invariant = __webpack_require__(14);
13120 var warning = __webpack_require__(26);
13121
13122 var hasReadOnlyValue = {
13123 'button': true,
13124 'checkbox': true,
13125 'image': true,
13126 'hidden': true,
13127 'radio': true,
13128 'reset': true,
13129 'submit': true
13130 };
13131
13132 function _assertSingleLink(inputProps) {
13133 !(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : undefined;
13134 }
13135 function _assertValueLink(inputProps) {
13136 _assertSingleLink(inputProps);
13137 !(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : undefined;
13138 }
13139
13140 function _assertCheckedLink(inputProps) {
13141 _assertSingleLink(inputProps);
13142 !(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : undefined;
13143 }
13144
13145 var propTypes = {
13146 value: function (props, propName, componentName) {
13147 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
13148 return null;
13149 }
13150 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`.');
13151 },
13152 checked: function (props, propName, componentName) {
13153 if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
13154 return null;
13155 }
13156 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`.');
13157 },
13158 onChange: ReactPropTypes.func
13159 };
13160
13161 var loggedTypeFailures = {};
13162 function getDeclarationErrorAddendum(owner) {
13163 if (owner) {
13164 var name = owner.getName();
13165 if (name) {
13166 return ' Check the render method of `' + name + '`.';
13167 }
13168 }
13169 return '';
13170 }
13171
13172 /**
13173 * Provide a linked `value` attribute for controlled forms. You should not use
13174 * this outside of the ReactDOM controlled form components.
13175 */
13176 var LinkedValueUtils = {
13177 checkPropTypes: function (tagName, props, owner) {
13178 for (var propName in propTypes) {
13179 if (propTypes.hasOwnProperty(propName)) {
13180 var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
13181 }
13182 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
13183 // Only monitor this failure once because there tends to be a lot of the
13184 // same error.
13185 loggedTypeFailures[error.message] = true;
13186
13187 var addendum = getDeclarationErrorAddendum(owner);
13188 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : undefined;
13189 }
13190 }
13191 },
13192
13193 /**
13194 * @param {object} inputProps Props for form component
13195 * @return {*} current value of the input either from value prop or link.
13196 */
13197 getValue: function (inputProps) {
13198 if (inputProps.valueLink) {
13199 _assertValueLink(inputProps);
13200 return inputProps.valueLink.value;
13201 }
13202 return inputProps.value;
13203 },
13204
13205 /**
13206 * @param {object} inputProps Props for form component
13207 * @return {*} current checked status of the input either from checked prop
13208 * or link.
13209 */
13210 getChecked: function (inputProps) {
13211 if (inputProps.checkedLink) {
13212 _assertCheckedLink(inputProps);
13213 return inputProps.checkedLink.value;
13214 }
13215 return inputProps.checked;
13216 },
13217
13218 /**
13219 * @param {object} inputProps Props for form component
13220 * @param {SyntheticEvent} event change event to handle
13221 */
13222 executeOnChange: function (inputProps, event) {
13223 if (inputProps.valueLink) {
13224 _assertValueLink(inputProps);
13225 return inputProps.valueLink.requestChange(event.target.value);
13226 } else if (inputProps.checkedLink) {
13227 _assertCheckedLink(inputProps);
13228 return inputProps.checkedLink.requestChange(event.target.checked);
13229 } else if (inputProps.onChange) {
13230 return inputProps.onChange.call(undefined, event);
13231 }
13232 }
13233 };
13234
13235 module.exports = LinkedValueUtils;
13236 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
13237
13238/***/ }),
13239/* 108 */
13240/***/ (function(module, exports, __webpack_require__) {
13241
13242 /**
13243 * Copyright 2013-2015, Facebook, Inc.
13244 * All rights reserved.
13245 *
13246 * This source code is licensed under the BSD-style license found in the
13247 * LICENSE file in the root directory of this source tree. An additional grant
13248 * of patent rights can be found in the PATENTS file in the same directory.
13249 *
13250 * @providesModule ReactPropTypes
13251 */
13252
13253 'use strict';
13254
13255 var ReactElement = __webpack_require__(43);
13256 var ReactPropTypeLocationNames = __webpack_require__(67);
13257
13258 var emptyFunction = __webpack_require__(16);
13259 var getIteratorFn = __webpack_require__(109);
13260
13261 /**
13262 * Collection of methods that allow declaration and validation of props that are
13263 * supplied to React components. Example usage:
13264 *
13265 * var Props = require('ReactPropTypes');
13266 * var MyArticle = React.createClass({
13267 * propTypes: {
13268 * // An optional string prop named "description".
13269 * description: Props.string,
13270 *
13271 * // A required enum prop named "category".
13272 * category: Props.oneOf(['News','Photos']).isRequired,
13273 *
13274 * // A prop named "dialog" that requires an instance of Dialog.
13275 * dialog: Props.instanceOf(Dialog).isRequired
13276 * },
13277 * render: function() { ... }
13278 * });
13279 *
13280 * A more formal specification of how these methods are used:
13281 *
13282 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
13283 * decl := ReactPropTypes.{type}(.isRequired)?
13284 *
13285 * Each and every declaration produces a function with the same signature. This
13286 * allows the creation of custom validation functions. For example:
13287 *
13288 * var MyLink = React.createClass({
13289 * propTypes: {
13290 * // An optional string or URI prop named "href".
13291 * href: function(props, propName, componentName) {
13292 * var propValue = props[propName];
13293 * if (propValue != null && typeof propValue !== 'string' &&
13294 * !(propValue instanceof URI)) {
13295 * return new Error(
13296 * 'Expected a string or an URI for ' + propName + ' in ' +
13297 * componentName
13298 * );
13299 * }
13300 * }
13301 * },
13302 * render: function() {...}
13303 * });
13304 *
13305 * @internal
13306 */
13307
13308 var ANONYMOUS = '<<anonymous>>';
13309
13310 var ReactPropTypes = {
13311 array: createPrimitiveTypeChecker('array'),
13312 bool: createPrimitiveTypeChecker('boolean'),
13313 func: createPrimitiveTypeChecker('function'),
13314 number: createPrimitiveTypeChecker('number'),
13315 object: createPrimitiveTypeChecker('object'),
13316 string: createPrimitiveTypeChecker('string'),
13317
13318 any: createAnyTypeChecker(),
13319 arrayOf: createArrayOfTypeChecker,
13320 element: createElementTypeChecker(),
13321 instanceOf: createInstanceTypeChecker,
13322 node: createNodeChecker(),
13323 objectOf: createObjectOfTypeChecker,
13324 oneOf: createEnumTypeChecker,
13325 oneOfType: createUnionTypeChecker,
13326 shape: createShapeTypeChecker
13327 };
13328
13329 function createChainableTypeChecker(validate) {
13330 function checkType(isRequired, props, propName, componentName, location, propFullName) {
13331 componentName = componentName || ANONYMOUS;
13332 propFullName = propFullName || propName;
13333 if (props[propName] == null) {
13334 var locationName = ReactPropTypeLocationNames[location];
13335 if (isRequired) {
13336 return new Error('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.'));
13337 }
13338 return null;
13339 } else {
13340 return validate(props, propName, componentName, location, propFullName);
13341 }
13342 }
13343
13344 var chainedCheckType = checkType.bind(null, false);
13345 chainedCheckType.isRequired = checkType.bind(null, true);
13346
13347 return chainedCheckType;
13348 }
13349
13350 function createPrimitiveTypeChecker(expectedType) {
13351 function validate(props, propName, componentName, location, propFullName) {
13352 var propValue = props[propName];
13353 var propType = getPropType(propValue);
13354 if (propType !== expectedType) {
13355 var locationName = ReactPropTypeLocationNames[location];
13356 // `propValue` being instance of, say, date/regexp, pass the 'object'
13357 // check, but we can offer a more precise error message here rather than
13358 // 'of type `object`'.
13359 var preciseType = getPreciseType(propValue);
13360
13361 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
13362 }
13363 return null;
13364 }
13365 return createChainableTypeChecker(validate);
13366 }
13367
13368 function createAnyTypeChecker() {
13369 return createChainableTypeChecker(emptyFunction.thatReturns(null));
13370 }
13371
13372 function createArrayOfTypeChecker(typeChecker) {
13373 function validate(props, propName, componentName, location, propFullName) {
13374 var propValue = props[propName];
13375 if (!Array.isArray(propValue)) {
13376 var locationName = ReactPropTypeLocationNames[location];
13377 var propType = getPropType(propValue);
13378 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
13379 }
13380 for (var i = 0; i < propValue.length; i++) {
13381 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
13382 if (error instanceof Error) {
13383 return error;
13384 }
13385 }
13386 return null;
13387 }
13388 return createChainableTypeChecker(validate);
13389 }
13390
13391 function createElementTypeChecker() {
13392 function validate(props, propName, componentName, location, propFullName) {
13393 if (!ReactElement.isValidElement(props[propName])) {
13394 var locationName = ReactPropTypeLocationNames[location];
13395 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a single ReactElement.'));
13396 }
13397 return null;
13398 }
13399 return createChainableTypeChecker(validate);
13400 }
13401
13402 function createInstanceTypeChecker(expectedClass) {
13403 function validate(props, propName, componentName, location, propFullName) {
13404 if (!(props[propName] instanceof expectedClass)) {
13405 var locationName = ReactPropTypeLocationNames[location];
13406 var expectedClassName = expectedClass.name || ANONYMOUS;
13407 var actualClassName = getClassName(props[propName]);
13408 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
13409 }
13410 return null;
13411 }
13412 return createChainableTypeChecker(validate);
13413 }
13414
13415 function createEnumTypeChecker(expectedValues) {
13416 if (!Array.isArray(expectedValues)) {
13417 return createChainableTypeChecker(function () {
13418 return new Error('Invalid argument supplied to oneOf, expected an instance of array.');
13419 });
13420 }
13421
13422 function validate(props, propName, componentName, location, propFullName) {
13423 var propValue = props[propName];
13424 for (var i = 0; i < expectedValues.length; i++) {
13425 if (propValue === expectedValues[i]) {
13426 return null;
13427 }
13428 }
13429
13430 var locationName = ReactPropTypeLocationNames[location];
13431 var valuesString = JSON.stringify(expectedValues);
13432 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
13433 }
13434 return createChainableTypeChecker(validate);
13435 }
13436
13437 function createObjectOfTypeChecker(typeChecker) {
13438 function validate(props, propName, componentName, location, propFullName) {
13439 var propValue = props[propName];
13440 var propType = getPropType(propValue);
13441 if (propType !== 'object') {
13442 var locationName = ReactPropTypeLocationNames[location];
13443 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
13444 }
13445 for (var key in propValue) {
13446 if (propValue.hasOwnProperty(key)) {
13447 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
13448 if (error instanceof Error) {
13449 return error;
13450 }
13451 }
13452 }
13453 return null;
13454 }
13455 return createChainableTypeChecker(validate);
13456 }
13457
13458 function createUnionTypeChecker(arrayOfTypeCheckers) {
13459 if (!Array.isArray(arrayOfTypeCheckers)) {
13460 return createChainableTypeChecker(function () {
13461 return new Error('Invalid argument supplied to oneOfType, expected an instance of array.');
13462 });
13463 }
13464
13465 function validate(props, propName, componentName, location, propFullName) {
13466 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
13467 var checker = arrayOfTypeCheckers[i];
13468 if (checker(props, propName, componentName, location, propFullName, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED') == null) {
13469 return null;
13470 }
13471 }
13472
13473 var locationName = ReactPropTypeLocationNames[location];
13474 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
13475 }
13476 return createChainableTypeChecker(validate);
13477 }
13478
13479 function createNodeChecker() {
13480 function validate(props, propName, componentName, location, propFullName) {
13481 if (!isNode(props[propName])) {
13482 var locationName = ReactPropTypeLocationNames[location];
13483 return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
13484 }
13485 return null;
13486 }
13487 return createChainableTypeChecker(validate);
13488 }
13489
13490 function createShapeTypeChecker(shapeTypes) {
13491 function validate(props, propName, componentName, location, propFullName) {
13492 var propValue = props[propName];
13493 var propType = getPropType(propValue);
13494 if (propType !== 'object') {
13495 var locationName = ReactPropTypeLocationNames[location];
13496 return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
13497 }
13498 for (var key in shapeTypes) {
13499 var checker = shapeTypes[key];
13500 if (!checker) {
13501 continue;
13502 }
13503 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
13504 if (error) {
13505 return error;
13506 }
13507 }
13508 return null;
13509 }
13510 return createChainableTypeChecker(validate);
13511 }
13512
13513 function isNode(propValue) {
13514 switch (typeof propValue) {
13515 case 'number':
13516 case 'string':
13517 case 'undefined':
13518 return true;
13519 case 'boolean':
13520 return !propValue;
13521 case 'object':
13522 if (Array.isArray(propValue)) {
13523 return propValue.every(isNode);
13524 }
13525 if (propValue === null || ReactElement.isValidElement(propValue)) {
13526 return true;
13527 }
13528
13529 var iteratorFn = getIteratorFn(propValue);
13530 if (iteratorFn) {
13531 var iterator = iteratorFn.call(propValue);
13532 var step;
13533 if (iteratorFn !== propValue.entries) {
13534 while (!(step = iterator.next()).done) {
13535 if (!isNode(step.value)) {
13536 return false;
13537 }
13538 }
13539 } else {
13540 // Iterator will provide entry [k,v] tuples rather than values.
13541 while (!(step = iterator.next()).done) {
13542 var entry = step.value;
13543 if (entry) {
13544 if (!isNode(entry[1])) {
13545 return false;
13546 }
13547 }
13548 }
13549 }
13550 } else {
13551 return false;
13552 }
13553
13554 return true;
13555 default:
13556 return false;
13557 }
13558 }
13559
13560 // Equivalent of `typeof` but with special handling for array and regexp.
13561 function getPropType(propValue) {
13562 var propType = typeof propValue;
13563 if (Array.isArray(propValue)) {
13564 return 'array';
13565 }
13566 if (propValue instanceof RegExp) {
13567 // Old webkits (at least until Android 4.0) return 'function' rather than
13568 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
13569 // passes PropTypes.object.
13570 return 'object';
13571 }
13572 return propType;
13573 }
13574
13575 // This handles more types than `getPropType`. Only used for error messages.
13576 // See `createPrimitiveTypeChecker`.
13577 function getPreciseType(propValue) {
13578 var propType = getPropType(propValue);
13579 if (propType === 'object') {
13580 if (propValue instanceof Date) {
13581 return 'date';
13582 } else if (propValue instanceof RegExp) {
13583 return 'regexp';
13584 }
13585 }
13586 return propType;
13587 }
13588
13589 // Returns class name of the object, if any.
13590 function getClassName(propValue) {
13591 if (!propValue.constructor || !propValue.constructor.name) {
13592 return '<<anonymous>>';
13593 }
13594 return propValue.constructor.name;
13595 }
13596
13597 module.exports = ReactPropTypes;
13598
13599/***/ }),
13600/* 109 */
13601/***/ (function(module, exports) {
13602
13603 /**
13604 * Copyright 2013-2015, Facebook, Inc.
13605 * All rights reserved.
13606 *
13607 * This source code is licensed under the BSD-style license found in the
13608 * LICENSE file in the root directory of this source tree. An additional grant
13609 * of patent rights can be found in the PATENTS file in the same directory.
13610 *
13611 * @providesModule getIteratorFn
13612 * @typechecks static-only
13613 */
13614
13615 'use strict';
13616
13617 /* global Symbol */
13618 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
13619 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
13620
13621 /**
13622 * Returns the iterator method function contained on the iterable object.
13623 *
13624 * Be sure to invoke the function with the iterable as context:
13625 *
13626 * var iteratorFn = getIteratorFn(myIterable);
13627 * if (iteratorFn) {
13628 * var iterator = iteratorFn.call(myIterable);
13629 * ...
13630 * }
13631 *
13632 * @param {?object} maybeIterable
13633 * @return {?function}
13634 */
13635 function getIteratorFn(maybeIterable) {
13636 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
13637 if (typeof iteratorFn === 'function') {
13638 return iteratorFn;
13639 }
13640 }
13641
13642 module.exports = getIteratorFn;
13643
13644/***/ }),
13645/* 110 */
13646/***/ (function(module, exports, __webpack_require__) {
13647
13648 /* WEBPACK VAR INJECTION */(function(process) {/**
13649 * Copyright 2013-2015, Facebook, Inc.
13650 * All rights reserved.
13651 *
13652 * This source code is licensed under the BSD-style license found in the
13653 * LICENSE file in the root directory of this source tree. An additional grant
13654 * of patent rights can be found in the PATENTS file in the same directory.
13655 *
13656 * @providesModule ReactDOMOption
13657 */
13658
13659 'use strict';
13660
13661 var ReactChildren = __webpack_require__(111);
13662 var ReactDOMSelect = __webpack_require__(113);
13663
13664 var assign = __webpack_require__(40);
13665 var warning = __webpack_require__(26);
13666
13667 var valueContextKey = ReactDOMSelect.valueContextKey;
13668
13669 /**
13670 * Implements an <option> native component that warns when `selected` is set.
13671 */
13672 var ReactDOMOption = {
13673 mountWrapper: function (inst, props, context) {
13674 // TODO (yungsters): Remove support for `selected` in <option>.
13675 if (process.env.NODE_ENV !== 'production') {
13676 process.env.NODE_ENV !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : undefined;
13677 }
13678
13679 // Look up whether this option is 'selected' via context
13680 var selectValue = context[valueContextKey];
13681
13682 // If context key is null (e.g., no specified value or after initial mount)
13683 // or missing (e.g., for <datalist>), we don't change props.selected
13684 var selected = null;
13685 if (selectValue != null) {
13686 selected = false;
13687 if (Array.isArray(selectValue)) {
13688 // multiple
13689 for (var i = 0; i < selectValue.length; i++) {
13690 if ('' + selectValue[i] === '' + props.value) {
13691 selected = true;
13692 break;
13693 }
13694 }
13695 } else {
13696 selected = '' + selectValue === '' + props.value;
13697 }
13698 }
13699
13700 inst._wrapperState = { selected: selected };
13701 },
13702
13703 getNativeProps: function (inst, props, context) {
13704 var nativeProps = assign({ selected: undefined, children: undefined }, props);
13705
13706 // Read state only from initial mount because <select> updates value
13707 // manually; we need the initial state only for server rendering
13708 if (inst._wrapperState.selected != null) {
13709 nativeProps.selected = inst._wrapperState.selected;
13710 }
13711
13712 var content = '';
13713
13714 // Flatten children and warn if they aren't strings or numbers;
13715 // invalid types are ignored.
13716 ReactChildren.forEach(props.children, function (child) {
13717 if (child == null) {
13718 return;
13719 }
13720 if (typeof child === 'string' || typeof child === 'number') {
13721 content += child;
13722 } else {
13723 process.env.NODE_ENV !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : undefined;
13724 }
13725 });
13726
13727 if (content) {
13728 nativeProps.children = content;
13729 }
13730
13731 return nativeProps;
13732 }
13733
13734 };
13735
13736 module.exports = ReactDOMOption;
13737 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
13738
13739/***/ }),
13740/* 111 */
13741/***/ (function(module, exports, __webpack_require__) {
13742
13743 /**
13744 * Copyright 2013-2015, Facebook, Inc.
13745 * All rights reserved.
13746 *
13747 * This source code is licensed under the BSD-style license found in the
13748 * LICENSE file in the root directory of this source tree. An additional grant
13749 * of patent rights can be found in the PATENTS file in the same directory.
13750 *
13751 * @providesModule ReactChildren
13752 */
13753
13754 'use strict';
13755
13756 var PooledClass = __webpack_require__(57);
13757 var ReactElement = __webpack_require__(43);
13758
13759 var emptyFunction = __webpack_require__(16);
13760 var traverseAllChildren = __webpack_require__(112);
13761
13762 var twoArgumentPooler = PooledClass.twoArgumentPooler;
13763 var fourArgumentPooler = PooledClass.fourArgumentPooler;
13764
13765 var userProvidedKeyEscapeRegex = /\/(?!\/)/g;
13766 function escapeUserProvidedKey(text) {
13767 return ('' + text).replace(userProvidedKeyEscapeRegex, '//');
13768 }
13769
13770 /**
13771 * PooledClass representing the bookkeeping associated with performing a child
13772 * traversal. Allows avoiding binding callbacks.
13773 *
13774 * @constructor ForEachBookKeeping
13775 * @param {!function} forEachFunction Function to perform traversal with.
13776 * @param {?*} forEachContext Context to perform context with.
13777 */
13778 function ForEachBookKeeping(forEachFunction, forEachContext) {
13779 this.func = forEachFunction;
13780 this.context = forEachContext;
13781 this.count = 0;
13782 }
13783 ForEachBookKeeping.prototype.destructor = function () {
13784 this.func = null;
13785 this.context = null;
13786 this.count = 0;
13787 };
13788 PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
13789
13790 function forEachSingleChild(bookKeeping, child, name) {
13791 var func = bookKeeping.func;
13792 var context = bookKeeping.context;
13793
13794 func.call(context, child, bookKeeping.count++);
13795 }
13796
13797 /**
13798 * Iterates through children that are typically specified as `props.children`.
13799 *
13800 * The provided forEachFunc(child, index) will be called for each
13801 * leaf child.
13802 *
13803 * @param {?*} children Children tree container.
13804 * @param {function(*, int)} forEachFunc
13805 * @param {*} forEachContext Context for forEachContext.
13806 */
13807 function forEachChildren(children, forEachFunc, forEachContext) {
13808 if (children == null) {
13809 return children;
13810 }
13811 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
13812 traverseAllChildren(children, forEachSingleChild, traverseContext);
13813 ForEachBookKeeping.release(traverseContext);
13814 }
13815
13816 /**
13817 * PooledClass representing the bookkeeping associated with performing a child
13818 * mapping. Allows avoiding binding callbacks.
13819 *
13820 * @constructor MapBookKeeping
13821 * @param {!*} mapResult Object containing the ordered map of results.
13822 * @param {!function} mapFunction Function to perform mapping with.
13823 * @param {?*} mapContext Context to perform mapping with.
13824 */
13825 function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
13826 this.result = mapResult;
13827 this.keyPrefix = keyPrefix;
13828 this.func = mapFunction;
13829 this.context = mapContext;
13830 this.count = 0;
13831 }
13832 MapBookKeeping.prototype.destructor = function () {
13833 this.result = null;
13834 this.keyPrefix = null;
13835 this.func = null;
13836 this.context = null;
13837 this.count = 0;
13838 };
13839 PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
13840
13841 function mapSingleChildIntoContext(bookKeeping, child, childKey) {
13842 var result = bookKeeping.result;
13843 var keyPrefix = bookKeeping.keyPrefix;
13844 var func = bookKeeping.func;
13845 var context = bookKeeping.context;
13846
13847 var mappedChild = func.call(context, child, bookKeeping.count++);
13848 if (Array.isArray(mappedChild)) {
13849 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
13850 } else if (mappedChild != null) {
13851 if (ReactElement.isValidElement(mappedChild)) {
13852 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
13853 // Keep both the (mapped) and old keys if they differ, just as
13854 // traverseAllChildren used to do for objects as children
13855 keyPrefix + (mappedChild !== child ? escapeUserProvidedKey(mappedChild.key || '') + '/' : '') + childKey);
13856 }
13857 result.push(mappedChild);
13858 }
13859 }
13860
13861 function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
13862 var escapedPrefix = '';
13863 if (prefix != null) {
13864 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
13865 }
13866 var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
13867 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
13868 MapBookKeeping.release(traverseContext);
13869 }
13870
13871 /**
13872 * Maps children that are typically specified as `props.children`.
13873 *
13874 * The provided mapFunction(child, key, index) will be called for each
13875 * leaf child.
13876 *
13877 * @param {?*} children Children tree container.
13878 * @param {function(*, int)} func The map function.
13879 * @param {*} context Context for mapFunction.
13880 * @return {object} Object containing the ordered map of results.
13881 */
13882 function mapChildren(children, func, context) {
13883 if (children == null) {
13884 return children;
13885 }
13886 var result = [];
13887 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
13888 return result;
13889 }
13890
13891 function forEachSingleChildDummy(traverseContext, child, name) {
13892 return null;
13893 }
13894
13895 /**
13896 * Count the number of children that are typically specified as
13897 * `props.children`.
13898 *
13899 * @param {?*} children Children tree container.
13900 * @return {number} The number of children.
13901 */
13902 function countChildren(children, context) {
13903 return traverseAllChildren(children, forEachSingleChildDummy, null);
13904 }
13905
13906 /**
13907 * Flatten a children object (typically specified as `props.children`) and
13908 * return an array with appropriately re-keyed children.
13909 */
13910 function toArray(children) {
13911 var result = [];
13912 mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
13913 return result;
13914 }
13915
13916 var ReactChildren = {
13917 forEach: forEachChildren,
13918 map: mapChildren,
13919 mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
13920 count: countChildren,
13921 toArray: toArray
13922 };
13923
13924 module.exports = ReactChildren;
13925
13926/***/ }),
13927/* 112 */
13928/***/ (function(module, exports, __webpack_require__) {
13929
13930 /* WEBPACK VAR INJECTION */(function(process) {/**
13931 * Copyright 2013-2015, Facebook, Inc.
13932 * All rights reserved.
13933 *
13934 * This source code is licensed under the BSD-style license found in the
13935 * LICENSE file in the root directory of this source tree. An additional grant
13936 * of patent rights can be found in the PATENTS file in the same directory.
13937 *
13938 * @providesModule traverseAllChildren
13939 */
13940
13941 'use strict';
13942
13943 var ReactCurrentOwner = __webpack_require__(6);
13944 var ReactElement = __webpack_require__(43);
13945 var ReactInstanceHandles = __webpack_require__(46);
13946
13947 var getIteratorFn = __webpack_require__(109);
13948 var invariant = __webpack_require__(14);
13949 var warning = __webpack_require__(26);
13950
13951 var SEPARATOR = ReactInstanceHandles.SEPARATOR;
13952 var SUBSEPARATOR = ':';
13953
13954 /**
13955 * TODO: Test that a single child and an array with one item have the same key
13956 * pattern.
13957 */
13958
13959 var userProvidedKeyEscaperLookup = {
13960 '=': '=0',
13961 '.': '=1',
13962 ':': '=2'
13963 };
13964
13965 var userProvidedKeyEscapeRegex = /[=.:]/g;
13966
13967 var didWarnAboutMaps = false;
13968
13969 function userProvidedKeyEscaper(match) {
13970 return userProvidedKeyEscaperLookup[match];
13971 }
13972
13973 /**
13974 * Generate a key string that identifies a component within a set.
13975 *
13976 * @param {*} component A component that could contain a manual key.
13977 * @param {number} index Index that is used if a manual key is not provided.
13978 * @return {string}
13979 */
13980 function getComponentKey(component, index) {
13981 if (component && component.key != null) {
13982 // Explicit key
13983 return wrapUserProvidedKey(component.key);
13984 }
13985 // Implicit key determined by the index in the set
13986 return index.toString(36);
13987 }
13988
13989 /**
13990 * Escape a component key so that it is safe to use in a reactid.
13991 *
13992 * @param {*} text Component key to be escaped.
13993 * @return {string} An escaped string.
13994 */
13995 function escapeUserProvidedKey(text) {
13996 return ('' + text).replace(userProvidedKeyEscapeRegex, userProvidedKeyEscaper);
13997 }
13998
13999 /**
14000 * Wrap a `key` value explicitly provided by the user to distinguish it from
14001 * implicitly-generated keys generated by a component's index in its parent.
14002 *
14003 * @param {string} key Value of a user-provided `key` attribute
14004 * @return {string}
14005 */
14006 function wrapUserProvidedKey(key) {
14007 return '$' + escapeUserProvidedKey(key);
14008 }
14009
14010 /**
14011 * @param {?*} children Children tree container.
14012 * @param {!string} nameSoFar Name of the key path so far.
14013 * @param {!function} callback Callback to invoke with each child found.
14014 * @param {?*} traverseContext Used to pass information throughout the traversal
14015 * process.
14016 * @return {!number} The number of children in this subtree.
14017 */
14018 function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
14019 var type = typeof children;
14020
14021 if (type === 'undefined' || type === 'boolean') {
14022 // All of the above are perceived as null.
14023 children = null;
14024 }
14025
14026 if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) {
14027 callback(traverseContext, children,
14028 // If it's the only child, treat the name as if it was wrapped in an array
14029 // so that it's consistent if the number of children grows.
14030 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
14031 return 1;
14032 }
14033
14034 var child;
14035 var nextName;
14036 var subtreeCount = 0; // Count of children found in the current subtree.
14037 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
14038
14039 if (Array.isArray(children)) {
14040 for (var i = 0; i < children.length; i++) {
14041 child = children[i];
14042 nextName = nextNamePrefix + getComponentKey(child, i);
14043 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
14044 }
14045 } else {
14046 var iteratorFn = getIteratorFn(children);
14047 if (iteratorFn) {
14048 var iterator = iteratorFn.call(children);
14049 var step;
14050 if (iteratorFn !== children.entries) {
14051 var ii = 0;
14052 while (!(step = iterator.next()).done) {
14053 child = step.value;
14054 nextName = nextNamePrefix + getComponentKey(child, ii++);
14055 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
14056 }
14057 } else {
14058 if (process.env.NODE_ENV !== 'production') {
14059 process.env.NODE_ENV !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') : undefined;
14060 didWarnAboutMaps = true;
14061 }
14062 // Iterator will provide entry [k,v] tuples rather than values.
14063 while (!(step = iterator.next()).done) {
14064 var entry = step.value;
14065 if (entry) {
14066 child = entry[1];
14067 nextName = nextNamePrefix + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
14068 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
14069 }
14070 }
14071 }
14072 } else if (type === 'object') {
14073 var addendum = '';
14074 if (process.env.NODE_ENV !== 'production') {
14075 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.';
14076 if (children._isReactElement) {
14077 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.';
14078 }
14079 if (ReactCurrentOwner.current) {
14080 var name = ReactCurrentOwner.current.getName();
14081 if (name) {
14082 addendum += ' Check the render method of `' + name + '`.';
14083 }
14084 }
14085 }
14086 var childrenString = String(children);
14087 true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum) : invariant(false) : undefined;
14088 }
14089 }
14090
14091 return subtreeCount;
14092 }
14093
14094 /**
14095 * Traverses children that are typically specified as `props.children`, but
14096 * might also be specified through attributes:
14097 *
14098 * - `traverseAllChildren(this.props.children, ...)`
14099 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
14100 *
14101 * The `traverseContext` is an optional argument that is passed through the
14102 * entire traversal. It can be used to store accumulations or anything else that
14103 * the callback might find relevant.
14104 *
14105 * @param {?*} children Children tree object.
14106 * @param {!function} callback To invoke upon traversing each child.
14107 * @param {?*} traverseContext Context for traversal.
14108 * @return {!number} The number of children in this subtree.
14109 */
14110 function traverseAllChildren(children, callback, traverseContext) {
14111 if (children == null) {
14112 return 0;
14113 }
14114
14115 return traverseAllChildrenImpl(children, '', callback, traverseContext);
14116 }
14117
14118 module.exports = traverseAllChildren;
14119 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14120
14121/***/ }),
14122/* 113 */
14123/***/ (function(module, exports, __webpack_require__) {
14124
14125 /* WEBPACK VAR INJECTION */(function(process) {/**
14126 * Copyright 2013-2015, Facebook, Inc.
14127 * All rights reserved.
14128 *
14129 * This source code is licensed under the BSD-style license found in the
14130 * LICENSE file in the root directory of this source tree. An additional grant
14131 * of patent rights can be found in the PATENTS file in the same directory.
14132 *
14133 * @providesModule ReactDOMSelect
14134 */
14135
14136 'use strict';
14137
14138 var LinkedValueUtils = __webpack_require__(107);
14139 var ReactMount = __webpack_require__(29);
14140 var ReactUpdates = __webpack_require__(55);
14141
14142 var assign = __webpack_require__(40);
14143 var warning = __webpack_require__(26);
14144
14145 var valueContextKey = '__ReactDOMSelect_value$' + Math.random().toString(36).slice(2);
14146
14147 function updateOptionsIfPendingUpdateAndMounted() {
14148 if (this._rootNodeID && this._wrapperState.pendingUpdate) {
14149 this._wrapperState.pendingUpdate = false;
14150
14151 var props = this._currentElement.props;
14152 var value = LinkedValueUtils.getValue(props);
14153
14154 if (value != null) {
14155 updateOptions(this, Boolean(props.multiple), value);
14156 }
14157 }
14158 }
14159
14160 function getDeclarationErrorAddendum(owner) {
14161 if (owner) {
14162 var name = owner.getName();
14163 if (name) {
14164 return ' Check the render method of `' + name + '`.';
14165 }
14166 }
14167 return '';
14168 }
14169
14170 var valuePropNames = ['value', 'defaultValue'];
14171
14172 /**
14173 * Validation function for `value` and `defaultValue`.
14174 * @private
14175 */
14176 function checkSelectPropTypes(inst, props) {
14177 var owner = inst._currentElement._owner;
14178 LinkedValueUtils.checkPropTypes('select', props, owner);
14179
14180 for (var i = 0; i < valuePropNames.length; i++) {
14181 var propName = valuePropNames[i];
14182 if (props[propName] == null) {
14183 continue;
14184 }
14185 if (props.multiple) {
14186 process.env.NODE_ENV !== 'production' ? warning(Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
14187 } else {
14188 process.env.NODE_ENV !== 'production' ? warning(!Array.isArray(props[propName]), 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : undefined;
14189 }
14190 }
14191 }
14192
14193 /**
14194 * @param {ReactDOMComponent} inst
14195 * @param {boolean} multiple
14196 * @param {*} propValue A stringable (with `multiple`, a list of stringables).
14197 * @private
14198 */
14199 function updateOptions(inst, multiple, propValue) {
14200 var selectedValue, i;
14201 var options = ReactMount.getNode(inst._rootNodeID).options;
14202
14203 if (multiple) {
14204 selectedValue = {};
14205 for (i = 0; i < propValue.length; i++) {
14206 selectedValue['' + propValue[i]] = true;
14207 }
14208 for (i = 0; i < options.length; i++) {
14209 var selected = selectedValue.hasOwnProperty(options[i].value);
14210 if (options[i].selected !== selected) {
14211 options[i].selected = selected;
14212 }
14213 }
14214 } else {
14215 // Do not set `select.value` as exact behavior isn't consistent across all
14216 // browsers for all cases.
14217 selectedValue = '' + propValue;
14218 for (i = 0; i < options.length; i++) {
14219 if (options[i].value === selectedValue) {
14220 options[i].selected = true;
14221 return;
14222 }
14223 }
14224 if (options.length) {
14225 options[0].selected = true;
14226 }
14227 }
14228 }
14229
14230 /**
14231 * Implements a <select> native component that allows optionally setting the
14232 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
14233 * stringable. If `multiple` is true, the prop must be an array of stringables.
14234 *
14235 * If `value` is not supplied (or null/undefined), user actions that change the
14236 * selected option will trigger updates to the rendered options.
14237 *
14238 * If it is supplied (and not null/undefined), the rendered options will not
14239 * update in response to user actions. Instead, the `value` prop must change in
14240 * order for the rendered options to update.
14241 *
14242 * If `defaultValue` is provided, any options with the supplied values will be
14243 * selected.
14244 */
14245 var ReactDOMSelect = {
14246 valueContextKey: valueContextKey,
14247
14248 getNativeProps: function (inst, props, context) {
14249 return assign({}, props, {
14250 onChange: inst._wrapperState.onChange,
14251 value: undefined
14252 });
14253 },
14254
14255 mountWrapper: function (inst, props) {
14256 if (process.env.NODE_ENV !== 'production') {
14257 checkSelectPropTypes(inst, props);
14258 }
14259
14260 var value = LinkedValueUtils.getValue(props);
14261 inst._wrapperState = {
14262 pendingUpdate: false,
14263 initialValue: value != null ? value : props.defaultValue,
14264 onChange: _handleChange.bind(inst),
14265 wasMultiple: Boolean(props.multiple)
14266 };
14267 },
14268
14269 processChildContext: function (inst, props, context) {
14270 // Pass down initial value so initial generated markup has correct
14271 // `selected` attributes
14272 var childContext = assign({}, context);
14273 childContext[valueContextKey] = inst._wrapperState.initialValue;
14274 return childContext;
14275 },
14276
14277 postUpdateWrapper: function (inst) {
14278 var props = inst._currentElement.props;
14279
14280 // After the initial mount, we control selected-ness manually so don't pass
14281 // the context value down
14282 inst._wrapperState.initialValue = undefined;
14283
14284 var wasMultiple = inst._wrapperState.wasMultiple;
14285 inst._wrapperState.wasMultiple = Boolean(props.multiple);
14286
14287 var value = LinkedValueUtils.getValue(props);
14288 if (value != null) {
14289 inst._wrapperState.pendingUpdate = false;
14290 updateOptions(inst, Boolean(props.multiple), value);
14291 } else if (wasMultiple !== Boolean(props.multiple)) {
14292 // For simplicity, reapply `defaultValue` if `multiple` is toggled.
14293 if (props.defaultValue != null) {
14294 updateOptions(inst, Boolean(props.multiple), props.defaultValue);
14295 } else {
14296 // Revert the select back to its default unselected state.
14297 updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
14298 }
14299 }
14300 }
14301 };
14302
14303 function _handleChange(event) {
14304 var props = this._currentElement.props;
14305 var returnValue = LinkedValueUtils.executeOnChange(props, event);
14306
14307 this._wrapperState.pendingUpdate = true;
14308 ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
14309 return returnValue;
14310 }
14311
14312 module.exports = ReactDOMSelect;
14313 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14314
14315/***/ }),
14316/* 114 */
14317/***/ (function(module, exports, __webpack_require__) {
14318
14319 /* WEBPACK VAR INJECTION */(function(process) {/**
14320 * Copyright 2013-2015, Facebook, Inc.
14321 * All rights reserved.
14322 *
14323 * This source code is licensed under the BSD-style license found in the
14324 * LICENSE file in the root directory of this source tree. An additional grant
14325 * of patent rights can be found in the PATENTS file in the same directory.
14326 *
14327 * @providesModule ReactDOMTextarea
14328 */
14329
14330 'use strict';
14331
14332 var LinkedValueUtils = __webpack_require__(107);
14333 var ReactDOMIDOperations = __webpack_require__(28);
14334 var ReactUpdates = __webpack_require__(55);
14335
14336 var assign = __webpack_require__(40);
14337 var invariant = __webpack_require__(14);
14338 var warning = __webpack_require__(26);
14339
14340 function forceUpdateIfMounted() {
14341 if (this._rootNodeID) {
14342 // DOM component is still mounted; update
14343 ReactDOMTextarea.updateWrapper(this);
14344 }
14345 }
14346
14347 /**
14348 * Implements a <textarea> native component that allows setting `value`, and
14349 * `defaultValue`. This differs from the traditional DOM API because value is
14350 * usually set as PCDATA children.
14351 *
14352 * If `value` is not supplied (or null/undefined), user actions that affect the
14353 * value will trigger updates to the element.
14354 *
14355 * If `value` is supplied (and not null/undefined), the rendered element will
14356 * not trigger updates to the element. Instead, the `value` prop must change in
14357 * order for the rendered element to be updated.
14358 *
14359 * The rendered element will be initialized with an empty value, the prop
14360 * `defaultValue` if specified, or the children content (deprecated).
14361 */
14362 var ReactDOMTextarea = {
14363 getNativeProps: function (inst, props, context) {
14364 !(props.dangerouslySetInnerHTML == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : invariant(false) : undefined;
14365
14366 // Always set children to the same thing. In IE9, the selection range will
14367 // get reset if `textContent` is mutated.
14368 var nativeProps = assign({}, props, {
14369 defaultValue: undefined,
14370 value: undefined,
14371 children: inst._wrapperState.initialValue,
14372 onChange: inst._wrapperState.onChange
14373 });
14374
14375 return nativeProps;
14376 },
14377
14378 mountWrapper: function (inst, props) {
14379 if (process.env.NODE_ENV !== 'production') {
14380 LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
14381 }
14382
14383 var defaultValue = props.defaultValue;
14384 // TODO (yungsters): Remove support for children content in <textarea>.
14385 var children = props.children;
14386 if (children != null) {
14387 if (process.env.NODE_ENV !== 'production') {
14388 process.env.NODE_ENV !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : undefined;
14389 }
14390 !(defaultValue == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(false) : undefined;
14391 if (Array.isArray(children)) {
14392 !(children.length <= 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : invariant(false) : undefined;
14393 children = children[0];
14394 }
14395
14396 defaultValue = '' + children;
14397 }
14398 if (defaultValue == null) {
14399 defaultValue = '';
14400 }
14401 var value = LinkedValueUtils.getValue(props);
14402
14403 inst._wrapperState = {
14404 // We save the initial value so that `ReactDOMComponent` doesn't update
14405 // `textContent` (unnecessary since we update value).
14406 // The initial value can be a boolean or object so that's why it's
14407 // forced to be a string.
14408 initialValue: '' + (value != null ? value : defaultValue),
14409 onChange: _handleChange.bind(inst)
14410 };
14411 },
14412
14413 updateWrapper: function (inst) {
14414 var props = inst._currentElement.props;
14415 var value = LinkedValueUtils.getValue(props);
14416 if (value != null) {
14417 // Cast `value` to a string to ensure the value is set correctly. While
14418 // browsers typically do this as necessary, jsdom doesn't.
14419 ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID, 'value', '' + value);
14420 }
14421 }
14422 };
14423
14424 function _handleChange(event) {
14425 var props = this._currentElement.props;
14426 var returnValue = LinkedValueUtils.executeOnChange(props, event);
14427 ReactUpdates.asap(forceUpdateIfMounted, this);
14428 return returnValue;
14429 }
14430
14431 module.exports = ReactDOMTextarea;
14432 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14433
14434/***/ }),
14435/* 115 */
14436/***/ (function(module, exports, __webpack_require__) {
14437
14438 /* WEBPACK VAR INJECTION */(function(process) {/**
14439 * Copyright 2013-2015, Facebook, Inc.
14440 * All rights reserved.
14441 *
14442 * This source code is licensed under the BSD-style license found in the
14443 * LICENSE file in the root directory of this source tree. An additional grant
14444 * of patent rights can be found in the PATENTS file in the same directory.
14445 *
14446 * @providesModule ReactMultiChild
14447 * @typechecks static-only
14448 */
14449
14450 'use strict';
14451
14452 var ReactComponentEnvironment = __webpack_require__(65);
14453 var ReactMultiChildUpdateTypes = __webpack_require__(17);
14454
14455 var ReactCurrentOwner = __webpack_require__(6);
14456 var ReactReconciler = __webpack_require__(51);
14457 var ReactChildReconciler = __webpack_require__(116);
14458
14459 var flattenChildren = __webpack_require__(117);
14460
14461 /**
14462 * Updating children of a component may trigger recursive updates. The depth is
14463 * used to batch recursive updates to render markup more efficiently.
14464 *
14465 * @type {number}
14466 * @private
14467 */
14468 var updateDepth = 0;
14469
14470 /**
14471 * Queue of update configuration objects.
14472 *
14473 * Each object has a `type` property that is in `ReactMultiChildUpdateTypes`.
14474 *
14475 * @type {array<object>}
14476 * @private
14477 */
14478 var updateQueue = [];
14479
14480 /**
14481 * Queue of markup to be rendered.
14482 *
14483 * @type {array<string>}
14484 * @private
14485 */
14486 var markupQueue = [];
14487
14488 /**
14489 * Enqueues markup to be rendered and inserted at a supplied index.
14490 *
14491 * @param {string} parentID ID of the parent component.
14492 * @param {string} markup Markup that renders into an element.
14493 * @param {number} toIndex Destination index.
14494 * @private
14495 */
14496 function enqueueInsertMarkup(parentID, markup, toIndex) {
14497 // NOTE: Null values reduce hidden classes.
14498 updateQueue.push({
14499 parentID: parentID,
14500 parentNode: null,
14501 type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
14502 markupIndex: markupQueue.push(markup) - 1,
14503 content: null,
14504 fromIndex: null,
14505 toIndex: toIndex
14506 });
14507 }
14508
14509 /**
14510 * Enqueues moving an existing element to another index.
14511 *
14512 * @param {string} parentID ID of the parent component.
14513 * @param {number} fromIndex Source index of the existing element.
14514 * @param {number} toIndex Destination index of the element.
14515 * @private
14516 */
14517 function enqueueMove(parentID, fromIndex, toIndex) {
14518 // NOTE: Null values reduce hidden classes.
14519 updateQueue.push({
14520 parentID: parentID,
14521 parentNode: null,
14522 type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
14523 markupIndex: null,
14524 content: null,
14525 fromIndex: fromIndex,
14526 toIndex: toIndex
14527 });
14528 }
14529
14530 /**
14531 * Enqueues removing an element at an index.
14532 *
14533 * @param {string} parentID ID of the parent component.
14534 * @param {number} fromIndex Index of the element to remove.
14535 * @private
14536 */
14537 function enqueueRemove(parentID, fromIndex) {
14538 // NOTE: Null values reduce hidden classes.
14539 updateQueue.push({
14540 parentID: parentID,
14541 parentNode: null,
14542 type: ReactMultiChildUpdateTypes.REMOVE_NODE,
14543 markupIndex: null,
14544 content: null,
14545 fromIndex: fromIndex,
14546 toIndex: null
14547 });
14548 }
14549
14550 /**
14551 * Enqueues setting the markup of a node.
14552 *
14553 * @param {string} parentID ID of the parent component.
14554 * @param {string} markup Markup that renders into an element.
14555 * @private
14556 */
14557 function enqueueSetMarkup(parentID, markup) {
14558 // NOTE: Null values reduce hidden classes.
14559 updateQueue.push({
14560 parentID: parentID,
14561 parentNode: null,
14562 type: ReactMultiChildUpdateTypes.SET_MARKUP,
14563 markupIndex: null,
14564 content: markup,
14565 fromIndex: null,
14566 toIndex: null
14567 });
14568 }
14569
14570 /**
14571 * Enqueues setting the text content.
14572 *
14573 * @param {string} parentID ID of the parent component.
14574 * @param {string} textContent Text content to set.
14575 * @private
14576 */
14577 function enqueueTextContent(parentID, textContent) {
14578 // NOTE: Null values reduce hidden classes.
14579 updateQueue.push({
14580 parentID: parentID,
14581 parentNode: null,
14582 type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
14583 markupIndex: null,
14584 content: textContent,
14585 fromIndex: null,
14586 toIndex: null
14587 });
14588 }
14589
14590 /**
14591 * Processes any enqueued updates.
14592 *
14593 * @private
14594 */
14595 function processQueue() {
14596 if (updateQueue.length) {
14597 ReactComponentEnvironment.processChildrenUpdates(updateQueue, markupQueue);
14598 clearQueue();
14599 }
14600 }
14601
14602 /**
14603 * Clears any enqueued updates.
14604 *
14605 * @private
14606 */
14607 function clearQueue() {
14608 updateQueue.length = 0;
14609 markupQueue.length = 0;
14610 }
14611
14612 /**
14613 * ReactMultiChild are capable of reconciling multiple children.
14614 *
14615 * @class ReactMultiChild
14616 * @internal
14617 */
14618 var ReactMultiChild = {
14619
14620 /**
14621 * Provides common functionality for components that must reconcile multiple
14622 * children. This is used by `ReactDOMComponent` to mount, update, and
14623 * unmount child components.
14624 *
14625 * @lends {ReactMultiChild.prototype}
14626 */
14627 Mixin: {
14628
14629 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
14630 if (process.env.NODE_ENV !== 'production') {
14631 if (this._currentElement) {
14632 try {
14633 ReactCurrentOwner.current = this._currentElement._owner;
14634 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
14635 } finally {
14636 ReactCurrentOwner.current = null;
14637 }
14638 }
14639 }
14640 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
14641 },
14642
14643 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, transaction, context) {
14644 var nextChildren;
14645 if (process.env.NODE_ENV !== 'production') {
14646 if (this._currentElement) {
14647 try {
14648 ReactCurrentOwner.current = this._currentElement._owner;
14649 nextChildren = flattenChildren(nextNestedChildrenElements);
14650 } finally {
14651 ReactCurrentOwner.current = null;
14652 }
14653 return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context);
14654 }
14655 }
14656 nextChildren = flattenChildren(nextNestedChildrenElements);
14657 return ReactChildReconciler.updateChildren(prevChildren, nextChildren, transaction, context);
14658 },
14659
14660 /**
14661 * Generates a "mount image" for each of the supplied children. In the case
14662 * of `ReactDOMComponent`, a mount image is a string of markup.
14663 *
14664 * @param {?object} nestedChildren Nested child maps.
14665 * @return {array} An array of mounted representations.
14666 * @internal
14667 */
14668 mountChildren: function (nestedChildren, transaction, context) {
14669 var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
14670 this._renderedChildren = children;
14671 var mountImages = [];
14672 var index = 0;
14673 for (var name in children) {
14674 if (children.hasOwnProperty(name)) {
14675 var child = children[name];
14676 // Inlined for performance, see `ReactInstanceHandles.createReactID`.
14677 var rootID = this._rootNodeID + name;
14678 var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context);
14679 child._mountIndex = index++;
14680 mountImages.push(mountImage);
14681 }
14682 }
14683 return mountImages;
14684 },
14685
14686 /**
14687 * Replaces any rendered children with a text content string.
14688 *
14689 * @param {string} nextContent String of content.
14690 * @internal
14691 */
14692 updateTextContent: function (nextContent) {
14693 updateDepth++;
14694 var errorThrown = true;
14695 try {
14696 var prevChildren = this._renderedChildren;
14697 // Remove any rendered children.
14698 ReactChildReconciler.unmountChildren(prevChildren);
14699 // TODO: The setTextContent operation should be enough
14700 for (var name in prevChildren) {
14701 if (prevChildren.hasOwnProperty(name)) {
14702 this._unmountChild(prevChildren[name]);
14703 }
14704 }
14705 // Set new text content.
14706 this.setTextContent(nextContent);
14707 errorThrown = false;
14708 } finally {
14709 updateDepth--;
14710 if (!updateDepth) {
14711 if (errorThrown) {
14712 clearQueue();
14713 } else {
14714 processQueue();
14715 }
14716 }
14717 }
14718 },
14719
14720 /**
14721 * Replaces any rendered children with a markup string.
14722 *
14723 * @param {string} nextMarkup String of markup.
14724 * @internal
14725 */
14726 updateMarkup: function (nextMarkup) {
14727 updateDepth++;
14728 var errorThrown = true;
14729 try {
14730 var prevChildren = this._renderedChildren;
14731 // Remove any rendered children.
14732 ReactChildReconciler.unmountChildren(prevChildren);
14733 for (var name in prevChildren) {
14734 if (prevChildren.hasOwnProperty(name)) {
14735 this._unmountChildByName(prevChildren[name], name);
14736 }
14737 }
14738 this.setMarkup(nextMarkup);
14739 errorThrown = false;
14740 } finally {
14741 updateDepth--;
14742 if (!updateDepth) {
14743 if (errorThrown) {
14744 clearQueue();
14745 } else {
14746 processQueue();
14747 }
14748 }
14749 }
14750 },
14751
14752 /**
14753 * Updates the rendered children with new children.
14754 *
14755 * @param {?object} nextNestedChildrenElements Nested child element maps.
14756 * @param {ReactReconcileTransaction} transaction
14757 * @internal
14758 */
14759 updateChildren: function (nextNestedChildrenElements, transaction, context) {
14760 updateDepth++;
14761 var errorThrown = true;
14762 try {
14763 this._updateChildren(nextNestedChildrenElements, transaction, context);
14764 errorThrown = false;
14765 } finally {
14766 updateDepth--;
14767 if (!updateDepth) {
14768 if (errorThrown) {
14769 clearQueue();
14770 } else {
14771 processQueue();
14772 }
14773 }
14774 }
14775 },
14776
14777 /**
14778 * Improve performance by isolating this hot code path from the try/catch
14779 * block in `updateChildren`.
14780 *
14781 * @param {?object} nextNestedChildrenElements Nested child element maps.
14782 * @param {ReactReconcileTransaction} transaction
14783 * @final
14784 * @protected
14785 */
14786 _updateChildren: function (nextNestedChildrenElements, transaction, context) {
14787 var prevChildren = this._renderedChildren;
14788 var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, transaction, context);
14789 this._renderedChildren = nextChildren;
14790 if (!nextChildren && !prevChildren) {
14791 return;
14792 }
14793 var name;
14794 // `nextIndex` will increment for each child in `nextChildren`, but
14795 // `lastIndex` will be the last index visited in `prevChildren`.
14796 var lastIndex = 0;
14797 var nextIndex = 0;
14798 for (name in nextChildren) {
14799 if (!nextChildren.hasOwnProperty(name)) {
14800 continue;
14801 }
14802 var prevChild = prevChildren && prevChildren[name];
14803 var nextChild = nextChildren[name];
14804 if (prevChild === nextChild) {
14805 this.moveChild(prevChild, nextIndex, lastIndex);
14806 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
14807 prevChild._mountIndex = nextIndex;
14808 } else {
14809 if (prevChild) {
14810 // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
14811 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
14812 this._unmountChild(prevChild);
14813 }
14814 // The child must be instantiated before it's mounted.
14815 this._mountChildByNameAtIndex(nextChild, name, nextIndex, transaction, context);
14816 }
14817 nextIndex++;
14818 }
14819 // Remove children that are no longer present.
14820 for (name in prevChildren) {
14821 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
14822 this._unmountChild(prevChildren[name]);
14823 }
14824 }
14825 },
14826
14827 /**
14828 * Unmounts all rendered children. This should be used to clean up children
14829 * when this component is unmounted.
14830 *
14831 * @internal
14832 */
14833 unmountChildren: function () {
14834 var renderedChildren = this._renderedChildren;
14835 ReactChildReconciler.unmountChildren(renderedChildren);
14836 this._renderedChildren = null;
14837 },
14838
14839 /**
14840 * Moves a child component to the supplied index.
14841 *
14842 * @param {ReactComponent} child Component to move.
14843 * @param {number} toIndex Destination index of the element.
14844 * @param {number} lastIndex Last index visited of the siblings of `child`.
14845 * @protected
14846 */
14847 moveChild: function (child, toIndex, lastIndex) {
14848 // If the index of `child` is less than `lastIndex`, then it needs to
14849 // be moved. Otherwise, we do not need to move it because a child will be
14850 // inserted or moved before `child`.
14851 if (child._mountIndex < lastIndex) {
14852 enqueueMove(this._rootNodeID, child._mountIndex, toIndex);
14853 }
14854 },
14855
14856 /**
14857 * Creates a child component.
14858 *
14859 * @param {ReactComponent} child Component to create.
14860 * @param {string} mountImage Markup to insert.
14861 * @protected
14862 */
14863 createChild: function (child, mountImage) {
14864 enqueueInsertMarkup(this._rootNodeID, mountImage, child._mountIndex);
14865 },
14866
14867 /**
14868 * Removes a child component.
14869 *
14870 * @param {ReactComponent} child Child to remove.
14871 * @protected
14872 */
14873 removeChild: function (child) {
14874 enqueueRemove(this._rootNodeID, child._mountIndex);
14875 },
14876
14877 /**
14878 * Sets this text content string.
14879 *
14880 * @param {string} textContent Text content to set.
14881 * @protected
14882 */
14883 setTextContent: function (textContent) {
14884 enqueueTextContent(this._rootNodeID, textContent);
14885 },
14886
14887 /**
14888 * Sets this markup string.
14889 *
14890 * @param {string} markup Markup to set.
14891 * @protected
14892 */
14893 setMarkup: function (markup) {
14894 enqueueSetMarkup(this._rootNodeID, markup);
14895 },
14896
14897 /**
14898 * Mounts a child with the supplied name.
14899 *
14900 * NOTE: This is part of `updateChildren` and is here for readability.
14901 *
14902 * @param {ReactComponent} child Component to mount.
14903 * @param {string} name Name of the child.
14904 * @param {number} index Index at which to insert the child.
14905 * @param {ReactReconcileTransaction} transaction
14906 * @private
14907 */
14908 _mountChildByNameAtIndex: function (child, name, index, transaction, context) {
14909 // Inlined for performance, see `ReactInstanceHandles.createReactID`.
14910 var rootID = this._rootNodeID + name;
14911 var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context);
14912 child._mountIndex = index;
14913 this.createChild(child, mountImage);
14914 },
14915
14916 /**
14917 * Unmounts a rendered child.
14918 *
14919 * NOTE: This is part of `updateChildren` and is here for readability.
14920 *
14921 * @param {ReactComponent} child Component to unmount.
14922 * @private
14923 */
14924 _unmountChild: function (child) {
14925 this.removeChild(child);
14926 child._mountIndex = null;
14927 }
14928
14929 }
14930
14931 };
14932
14933 module.exports = ReactMultiChild;
14934 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
14935
14936/***/ }),
14937/* 116 */
14938/***/ (function(module, exports, __webpack_require__) {
14939
14940 /* WEBPACK VAR INJECTION */(function(process) {/**
14941 * Copyright 2014-2015, Facebook, Inc.
14942 * All rights reserved.
14943 *
14944 * This source code is licensed under the BSD-style license found in the
14945 * LICENSE file in the root directory of this source tree. An additional grant
14946 * of patent rights can be found in the PATENTS file in the same directory.
14947 *
14948 * @providesModule ReactChildReconciler
14949 * @typechecks static-only
14950 */
14951
14952 'use strict';
14953
14954 var ReactReconciler = __webpack_require__(51);
14955
14956 var instantiateReactComponent = __webpack_require__(63);
14957 var shouldUpdateReactComponent = __webpack_require__(68);
14958 var traverseAllChildren = __webpack_require__(112);
14959 var warning = __webpack_require__(26);
14960
14961 function instantiateChild(childInstances, child, name) {
14962 // We found a component instance.
14963 var keyUnique = childInstances[name] === undefined;
14964 if (process.env.NODE_ENV !== 'production') {
14965 process.env.NODE_ENV !== 'production' ? warning(keyUnique, '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.', name) : undefined;
14966 }
14967 if (child != null && keyUnique) {
14968 childInstances[name] = instantiateReactComponent(child, null);
14969 }
14970 }
14971
14972 /**
14973 * ReactChildReconciler provides helpers for initializing or updating a set of
14974 * children. Its output is suitable for passing it onto ReactMultiChild which
14975 * does diffed reordering and insertion.
14976 */
14977 var ReactChildReconciler = {
14978 /**
14979 * Generates a "mount image" for each of the supplied children. In the case
14980 * of `ReactDOMComponent`, a mount image is a string of markup.
14981 *
14982 * @param {?object} nestedChildNodes Nested child maps.
14983 * @return {?object} A set of child instances.
14984 * @internal
14985 */
14986 instantiateChildren: function (nestedChildNodes, transaction, context) {
14987 if (nestedChildNodes == null) {
14988 return null;
14989 }
14990 var childInstances = {};
14991 traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
14992 return childInstances;
14993 },
14994
14995 /**
14996 * Updates the rendered children and returns a new set of children.
14997 *
14998 * @param {?object} prevChildren Previously initialized set of children.
14999 * @param {?object} nextChildren Flat child element maps.
15000 * @param {ReactReconcileTransaction} transaction
15001 * @param {object} context
15002 * @return {?object} A new set of child instances.
15003 * @internal
15004 */
15005 updateChildren: function (prevChildren, nextChildren, transaction, context) {
15006 // We currently don't have a way to track moves here but if we use iterators
15007 // instead of for..in we can zip the iterators and check if an item has
15008 // moved.
15009 // TODO: If nothing has changed, return the prevChildren object so that we
15010 // can quickly bailout if nothing has changed.
15011 if (!nextChildren && !prevChildren) {
15012 return null;
15013 }
15014 var name;
15015 for (name in nextChildren) {
15016 if (!nextChildren.hasOwnProperty(name)) {
15017 continue;
15018 }
15019 var prevChild = prevChildren && prevChildren[name];
15020 var prevElement = prevChild && prevChild._currentElement;
15021 var nextElement = nextChildren[name];
15022 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
15023 ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
15024 nextChildren[name] = prevChild;
15025 } else {
15026 if (prevChild) {
15027 ReactReconciler.unmountComponent(prevChild, name);
15028 }
15029 // The child must be instantiated before it's mounted.
15030 var nextChildInstance = instantiateReactComponent(nextElement, null);
15031 nextChildren[name] = nextChildInstance;
15032 }
15033 }
15034 // Unmount children that are no longer present.
15035 for (name in prevChildren) {
15036 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
15037 ReactReconciler.unmountComponent(prevChildren[name]);
15038 }
15039 }
15040 return nextChildren;
15041 },
15042
15043 /**
15044 * Unmounts all rendered children. This should be used to clean up children
15045 * when this component is unmounted.
15046 *
15047 * @param {?object} renderedChildren Previously initialized set of children.
15048 * @internal
15049 */
15050 unmountChildren: function (renderedChildren) {
15051 for (var name in renderedChildren) {
15052 if (renderedChildren.hasOwnProperty(name)) {
15053 var renderedChild = renderedChildren[name];
15054 ReactReconciler.unmountComponent(renderedChild);
15055 }
15056 }
15057 }
15058
15059 };
15060
15061 module.exports = ReactChildReconciler;
15062 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
15063
15064/***/ }),
15065/* 117 */
15066/***/ (function(module, exports, __webpack_require__) {
15067
15068 /* WEBPACK VAR INJECTION */(function(process) {/**
15069 * Copyright 2013-2015, Facebook, Inc.
15070 * All rights reserved.
15071 *
15072 * This source code is licensed under the BSD-style license found in the
15073 * LICENSE file in the root directory of this source tree. An additional grant
15074 * of patent rights can be found in the PATENTS file in the same directory.
15075 *
15076 * @providesModule flattenChildren
15077 */
15078
15079 'use strict';
15080
15081 var traverseAllChildren = __webpack_require__(112);
15082 var warning = __webpack_require__(26);
15083
15084 /**
15085 * @param {function} traverseContext Context passed through traversal.
15086 * @param {?ReactComponent} child React child component.
15087 * @param {!string} name String name of key path to child.
15088 */
15089 function flattenSingleChildIntoContext(traverseContext, child, name) {
15090 // We found a component instance.
15091 var result = traverseContext;
15092 var keyUnique = result[name] === undefined;
15093 if (process.env.NODE_ENV !== 'production') {
15094 process.env.NODE_ENV !== 'production' ? warning(keyUnique, '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.', name) : undefined;
15095 }
15096 if (keyUnique && child != null) {
15097 result[name] = child;
15098 }
15099 }
15100
15101 /**
15102 * Flattens children that are typically specified as `props.children`. Any null
15103 * children will not be included in the resulting object.
15104 * @return {!object} flattened children keyed by name.
15105 */
15106 function flattenChildren(children) {
15107 if (children == null) {
15108 return children;
15109 }
15110 var result = {};
15111 traverseAllChildren(children, flattenSingleChildIntoContext, result);
15112 return result;
15113 }
15114
15115 module.exports = flattenChildren;
15116 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
15117
15118/***/ }),
15119/* 118 */
15120/***/ (function(module, exports) {
15121
15122 /**
15123 * Copyright 2013-2015, Facebook, Inc.
15124 * All rights reserved.
15125 *
15126 * This source code is licensed under the BSD-style license found in the
15127 * LICENSE file in the root directory of this source tree. An additional grant
15128 * of patent rights can be found in the PATENTS file in the same directory.
15129 *
15130 * @providesModule shallowEqual
15131 * @typechecks
15132 *
15133 */
15134
15135 'use strict';
15136
15137 var hasOwnProperty = Object.prototype.hasOwnProperty;
15138
15139 /**
15140 * Performs equality by iterating through keys on an object and returning false
15141 * when any key has values which are not strictly equal between the arguments.
15142 * Returns true when the values of all keys are strictly equal.
15143 */
15144 function shallowEqual(objA, objB) {
15145 if (objA === objB) {
15146 return true;
15147 }
15148
15149 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
15150 return false;
15151 }
15152
15153 var keysA = Object.keys(objA);
15154 var keysB = Object.keys(objB);
15155
15156 if (keysA.length !== keysB.length) {
15157 return false;
15158 }
15159
15160 // Test for A's keys different from B.
15161 var bHasOwnProperty = hasOwnProperty.bind(objB);
15162 for (var i = 0; i < keysA.length; i++) {
15163 if (!bHasOwnProperty(keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
15164 return false;
15165 }
15166 }
15167
15168 return true;
15169 }
15170
15171 module.exports = shallowEqual;
15172
15173/***/ }),
15174/* 119 */
15175/***/ (function(module, exports, __webpack_require__) {
15176
15177 /**
15178 * Copyright 2013-2015, Facebook, Inc.
15179 * All rights reserved.
15180 *
15181 * This source code is licensed under the BSD-style license found in the
15182 * LICENSE file in the root directory of this source tree. An additional grant
15183 * of patent rights can be found in the PATENTS file in the same directory.
15184 *
15185 * @providesModule ReactEventListener
15186 * @typechecks static-only
15187 */
15188
15189 'use strict';
15190
15191 var EventListener = __webpack_require__(120);
15192 var ExecutionEnvironment = __webpack_require__(10);
15193 var PooledClass = __webpack_require__(57);
15194 var ReactInstanceHandles = __webpack_require__(46);
15195 var ReactMount = __webpack_require__(29);
15196 var ReactUpdates = __webpack_require__(55);
15197
15198 var assign = __webpack_require__(40);
15199 var getEventTarget = __webpack_require__(82);
15200 var getUnboundedScrollPosition = __webpack_require__(121);
15201
15202 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
15203
15204 /**
15205 * Finds the parent React component of `node`.
15206 *
15207 * @param {*} node
15208 * @return {?DOMEventTarget} Parent container, or `null` if the specified node
15209 * is not nested.
15210 */
15211 function findParent(node) {
15212 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
15213 // traversal, but caching is difficult to do correctly without using a
15214 // mutation observer to listen for all DOM changes.
15215 var nodeID = ReactMount.getID(node);
15216 var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);
15217 var container = ReactMount.findReactContainerForID(rootID);
15218 var parent = ReactMount.getFirstReactDOM(container);
15219 return parent;
15220 }
15221
15222 // Used to store ancestor hierarchy in top level callback
15223 function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
15224 this.topLevelType = topLevelType;
15225 this.nativeEvent = nativeEvent;
15226 this.ancestors = [];
15227 }
15228 assign(TopLevelCallbackBookKeeping.prototype, {
15229 destructor: function () {
15230 this.topLevelType = null;
15231 this.nativeEvent = null;
15232 this.ancestors.length = 0;
15233 }
15234 });
15235 PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
15236
15237 function handleTopLevelImpl(bookKeeping) {
15238 // TODO: Re-enable event.path handling
15239 //
15240 // if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) {
15241 // // New browsers have a path attribute on native events
15242 // handleTopLevelWithPath(bookKeeping);
15243 // } else {
15244 // // Legacy browsers don't have a path attribute on native events
15245 // handleTopLevelWithoutPath(bookKeeping);
15246 // }
15247
15248 void handleTopLevelWithPath; // temporarily unused
15249 handleTopLevelWithoutPath(bookKeeping);
15250 }
15251
15252 // Legacy browsers don't have a path attribute on native events
15253 function handleTopLevelWithoutPath(bookKeeping) {
15254 var topLevelTarget = ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent)) || window;
15255
15256 // Loop through the hierarchy, in case there's any nested components.
15257 // It's important that we build the array of ancestors before calling any
15258 // event handlers, because event handlers can modify the DOM, leading to
15259 // inconsistencies with ReactMount's node cache. See #1105.
15260 var ancestor = topLevelTarget;
15261 while (ancestor) {
15262 bookKeeping.ancestors.push(ancestor);
15263 ancestor = findParent(ancestor);
15264 }
15265
15266 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
15267 topLevelTarget = bookKeeping.ancestors[i];
15268 var topLevelTargetID = ReactMount.getID(topLevelTarget) || '';
15269 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, topLevelTarget, topLevelTargetID, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
15270 }
15271 }
15272
15273 // New browsers have a path attribute on native events
15274 function handleTopLevelWithPath(bookKeeping) {
15275 var path = bookKeeping.nativeEvent.path;
15276 var currentNativeTarget = path[0];
15277 var eventsFired = 0;
15278 for (var i = 0; i < path.length; i++) {
15279 var currentPathElement = path[i];
15280 if (currentPathElement.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE) {
15281 currentNativeTarget = path[i + 1];
15282 }
15283 // TODO: slow
15284 var reactParent = ReactMount.getFirstReactDOM(currentPathElement);
15285 if (reactParent === currentPathElement) {
15286 var currentPathElementID = ReactMount.getID(currentPathElement);
15287 var newRootID = ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);
15288 bookKeeping.ancestors.push(currentPathElement);
15289
15290 var topLevelTargetID = ReactMount.getID(currentPathElement) || '';
15291 eventsFired++;
15292 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, currentPathElement, topLevelTargetID, bookKeeping.nativeEvent, currentNativeTarget);
15293
15294 // Jump to the root of this React render tree
15295 while (currentPathElementID !== newRootID) {
15296 i++;
15297 currentPathElement = path[i];
15298 currentPathElementID = ReactMount.getID(currentPathElement);
15299 }
15300 }
15301 }
15302 if (eventsFired === 0) {
15303 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, window, '', bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
15304 }
15305 }
15306
15307 function scrollValueMonitor(cb) {
15308 var scrollPosition = getUnboundedScrollPosition(window);
15309 cb(scrollPosition);
15310 }
15311
15312 var ReactEventListener = {
15313 _enabled: true,
15314 _handleTopLevel: null,
15315
15316 WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
15317
15318 setHandleTopLevel: function (handleTopLevel) {
15319 ReactEventListener._handleTopLevel = handleTopLevel;
15320 },
15321
15322 setEnabled: function (enabled) {
15323 ReactEventListener._enabled = !!enabled;
15324 },
15325
15326 isEnabled: function () {
15327 return ReactEventListener._enabled;
15328 },
15329
15330 /**
15331 * Traps top-level events by using event bubbling.
15332 *
15333 * @param {string} topLevelType Record from `EventConstants`.
15334 * @param {string} handlerBaseName Event name (e.g. "click").
15335 * @param {object} handle Element on which to attach listener.
15336 * @return {?object} An object with a remove function which will forcefully
15337 * remove the listener.
15338 * @internal
15339 */
15340 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
15341 var element = handle;
15342 if (!element) {
15343 return null;
15344 }
15345 return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
15346 },
15347
15348 /**
15349 * Traps a top-level event by using event capturing.
15350 *
15351 * @param {string} topLevelType Record from `EventConstants`.
15352 * @param {string} handlerBaseName Event name (e.g. "click").
15353 * @param {object} handle Element on which to attach listener.
15354 * @return {?object} An object with a remove function which will forcefully
15355 * remove the listener.
15356 * @internal
15357 */
15358 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
15359 var element = handle;
15360 if (!element) {
15361 return null;
15362 }
15363 return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
15364 },
15365
15366 monitorScrollValue: function (refresh) {
15367 var callback = scrollValueMonitor.bind(null, refresh);
15368 EventListener.listen(window, 'scroll', callback);
15369 },
15370
15371 dispatchEvent: function (topLevelType, nativeEvent) {
15372 if (!ReactEventListener._enabled) {
15373 return;
15374 }
15375
15376 var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
15377 try {
15378 // Event queue being processed in the same cycle allows
15379 // `preventDefault`.
15380 ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
15381 } finally {
15382 TopLevelCallbackBookKeeping.release(bookKeeping);
15383 }
15384 }
15385 };
15386
15387 module.exports = ReactEventListener;
15388
15389/***/ }),
15390/* 120 */
15391/***/ (function(module, exports, __webpack_require__) {
15392
15393 /* WEBPACK VAR INJECTION */(function(process) {/**
15394 * Copyright 2013-2015, Facebook, Inc.
15395 *
15396 * Licensed under the Apache License, Version 2.0 (the "License");
15397 * you may not use this file except in compliance with the License.
15398 * You may obtain a copy of the License at
15399 *
15400 * http://www.apache.org/licenses/LICENSE-2.0
15401 *
15402 * Unless required by applicable law or agreed to in writing, software
15403 * distributed under the License is distributed on an "AS IS" BASIS,
15404 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15405 * See the License for the specific language governing permissions and
15406 * limitations under the License.
15407 *
15408 * @providesModule EventListener
15409 * @typechecks
15410 */
15411
15412 'use strict';
15413
15414 var emptyFunction = __webpack_require__(16);
15415
15416 /**
15417 * Upstream version of event listener. Does not take into account specific
15418 * nature of platform.
15419 */
15420 var EventListener = {
15421 /**
15422 * Listen to DOM events during the bubble phase.
15423 *
15424 * @param {DOMEventTarget} target DOM element to register listener on.
15425 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
15426 * @param {function} callback Callback function.
15427 * @return {object} Object with a `remove` method.
15428 */
15429 listen: function (target, eventType, callback) {
15430 if (target.addEventListener) {
15431 target.addEventListener(eventType, callback, false);
15432 return {
15433 remove: function () {
15434 target.removeEventListener(eventType, callback, false);
15435 }
15436 };
15437 } else if (target.attachEvent) {
15438 target.attachEvent('on' + eventType, callback);
15439 return {
15440 remove: function () {
15441 target.detachEvent('on' + eventType, callback);
15442 }
15443 };
15444 }
15445 },
15446
15447 /**
15448 * Listen to DOM events during the capture phase.
15449 *
15450 * @param {DOMEventTarget} target DOM element to register listener on.
15451 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
15452 * @param {function} callback Callback function.
15453 * @return {object} Object with a `remove` method.
15454 */
15455 capture: function (target, eventType, callback) {
15456 if (target.addEventListener) {
15457 target.addEventListener(eventType, callback, true);
15458 return {
15459 remove: function () {
15460 target.removeEventListener(eventType, callback, true);
15461 }
15462 };
15463 } else {
15464 if (process.env.NODE_ENV !== 'production') {
15465 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.');
15466 }
15467 return {
15468 remove: emptyFunction
15469 };
15470 }
15471 },
15472
15473 registerDefault: function () {}
15474 };
15475
15476 module.exports = EventListener;
15477 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
15478
15479/***/ }),
15480/* 121 */
15481/***/ (function(module, exports) {
15482
15483 /**
15484 * Copyright 2013-2015, Facebook, Inc.
15485 * All rights reserved.
15486 *
15487 * This source code is licensed under the BSD-style license found in the
15488 * LICENSE file in the root directory of this source tree. An additional grant
15489 * of patent rights can be found in the PATENTS file in the same directory.
15490 *
15491 * @providesModule getUnboundedScrollPosition
15492 * @typechecks
15493 */
15494
15495 'use strict';
15496
15497 /**
15498 * Gets the scroll position of the supplied element or window.
15499 *
15500 * The return values are unbounded, unlike `getScrollPosition`. This means they
15501 * may be negative or exceed the element boundaries (which is possible using
15502 * inertial scrolling).
15503 *
15504 * @param {DOMWindow|DOMElement} scrollable
15505 * @return {object} Map with `x` and `y` keys.
15506 */
15507 function getUnboundedScrollPosition(scrollable) {
15508 if (scrollable === window) {
15509 return {
15510 x: window.pageXOffset || document.documentElement.scrollLeft,
15511 y: window.pageYOffset || document.documentElement.scrollTop
15512 };
15513 }
15514 return {
15515 x: scrollable.scrollLeft,
15516 y: scrollable.scrollTop
15517 };
15518 }
15519
15520 module.exports = getUnboundedScrollPosition;
15521
15522/***/ }),
15523/* 122 */
15524/***/ (function(module, exports, __webpack_require__) {
15525
15526 /**
15527 * Copyright 2013-2015, Facebook, Inc.
15528 * All rights reserved.
15529 *
15530 * This source code is licensed under the BSD-style license found in the
15531 * LICENSE file in the root directory of this source tree. An additional grant
15532 * of patent rights can be found in the PATENTS file in the same directory.
15533 *
15534 * @providesModule ReactInjection
15535 */
15536
15537 'use strict';
15538
15539 var DOMProperty = __webpack_require__(24);
15540 var EventPluginHub = __webpack_require__(32);
15541 var ReactComponentEnvironment = __webpack_require__(65);
15542 var ReactClass = __webpack_require__(123);
15543 var ReactEmptyComponent = __webpack_require__(69);
15544 var ReactBrowserEventEmitter = __webpack_require__(30);
15545 var ReactNativeComponent = __webpack_require__(70);
15546 var ReactPerf = __webpack_require__(19);
15547 var ReactRootIndex = __webpack_require__(47);
15548 var ReactUpdates = __webpack_require__(55);
15549
15550 var ReactInjection = {
15551 Component: ReactComponentEnvironment.injection,
15552 Class: ReactClass.injection,
15553 DOMProperty: DOMProperty.injection,
15554 EmptyComponent: ReactEmptyComponent.injection,
15555 EventPluginHub: EventPluginHub.injection,
15556 EventEmitter: ReactBrowserEventEmitter.injection,
15557 NativeComponent: ReactNativeComponent.injection,
15558 Perf: ReactPerf.injection,
15559 RootIndex: ReactRootIndex.injection,
15560 Updates: ReactUpdates.injection
15561 };
15562
15563 module.exports = ReactInjection;
15564
15565/***/ }),
15566/* 123 */
15567/***/ (function(module, exports, __webpack_require__) {
15568
15569 /* WEBPACK VAR INJECTION */(function(process) {/**
15570 * Copyright 2013-2015, Facebook, Inc.
15571 * All rights reserved.
15572 *
15573 * This source code is licensed under the BSD-style license found in the
15574 * LICENSE file in the root directory of this source tree. An additional grant
15575 * of patent rights can be found in the PATENTS file in the same directory.
15576 *
15577 * @providesModule ReactClass
15578 */
15579
15580 'use strict';
15581
15582 var ReactComponent = __webpack_require__(124);
15583 var ReactElement = __webpack_require__(43);
15584 var ReactPropTypeLocations = __webpack_require__(66);
15585 var ReactPropTypeLocationNames = __webpack_require__(67);
15586 var ReactNoopUpdateQueue = __webpack_require__(125);
15587
15588 var assign = __webpack_require__(40);
15589 var emptyObject = __webpack_require__(59);
15590 var invariant = __webpack_require__(14);
15591 var keyMirror = __webpack_require__(18);
15592 var keyOf = __webpack_require__(80);
15593 var warning = __webpack_require__(26);
15594
15595 var MIXINS_KEY = keyOf({ mixins: null });
15596
15597 /**
15598 * Policies that describe methods in `ReactClassInterface`.
15599 */
15600 var SpecPolicy = keyMirror({
15601 /**
15602 * These methods may be defined only once by the class specification or mixin.
15603 */
15604 DEFINE_ONCE: null,
15605 /**
15606 * These methods may be defined by both the class specification and mixins.
15607 * Subsequent definitions will be chained. These methods must return void.
15608 */
15609 DEFINE_MANY: null,
15610 /**
15611 * These methods are overriding the base class.
15612 */
15613 OVERRIDE_BASE: null,
15614 /**
15615 * These methods are similar to DEFINE_MANY, except we assume they return
15616 * objects. We try to merge the keys of the return values of all the mixed in
15617 * functions. If there is a key conflict we throw.
15618 */
15619 DEFINE_MANY_MERGED: null
15620 });
15621
15622 var injectedMixins = [];
15623
15624 var warnedSetProps = false;
15625 function warnSetProps() {
15626 if (!warnedSetProps) {
15627 warnedSetProps = true;
15628 process.env.NODE_ENV !== 'production' ? warning(false, 'setProps(...) and replaceProps(...) are deprecated. ' + 'Instead, call render again at the top level.') : undefined;
15629 }
15630 }
15631
15632 /**
15633 * Composite components are higher-level components that compose other composite
15634 * or native components.
15635 *
15636 * To create a new type of `ReactClass`, pass a specification of
15637 * your new class to `React.createClass`. The only requirement of your class
15638 * specification is that you implement a `render` method.
15639 *
15640 * var MyComponent = React.createClass({
15641 * render: function() {
15642 * return <div>Hello World</div>;
15643 * }
15644 * });
15645 *
15646 * The class specification supports a specific protocol of methods that have
15647 * special meaning (e.g. `render`). See `ReactClassInterface` for
15648 * more the comprehensive protocol. Any other properties and methods in the
15649 * class specification will be available on the prototype.
15650 *
15651 * @interface ReactClassInterface
15652 * @internal
15653 */
15654 var ReactClassInterface = {
15655
15656 /**
15657 * An array of Mixin objects to include when defining your component.
15658 *
15659 * @type {array}
15660 * @optional
15661 */
15662 mixins: SpecPolicy.DEFINE_MANY,
15663
15664 /**
15665 * An object containing properties and methods that should be defined on
15666 * the component's constructor instead of its prototype (static methods).
15667 *
15668 * @type {object}
15669 * @optional
15670 */
15671 statics: SpecPolicy.DEFINE_MANY,
15672
15673 /**
15674 * Definition of prop types for this component.
15675 *
15676 * @type {object}
15677 * @optional
15678 */
15679 propTypes: SpecPolicy.DEFINE_MANY,
15680
15681 /**
15682 * Definition of context types for this component.
15683 *
15684 * @type {object}
15685 * @optional
15686 */
15687 contextTypes: SpecPolicy.DEFINE_MANY,
15688
15689 /**
15690 * Definition of context types this component sets for its children.
15691 *
15692 * @type {object}
15693 * @optional
15694 */
15695 childContextTypes: SpecPolicy.DEFINE_MANY,
15696
15697 // ==== Definition methods ====
15698
15699 /**
15700 * Invoked when the component is mounted. Values in the mapping will be set on
15701 * `this.props` if that prop is not specified (i.e. using an `in` check).
15702 *
15703 * This method is invoked before `getInitialState` and therefore cannot rely
15704 * on `this.state` or use `this.setState`.
15705 *
15706 * @return {object}
15707 * @optional
15708 */
15709 getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
15710
15711 /**
15712 * Invoked once before the component is mounted. The return value will be used
15713 * as the initial value of `this.state`.
15714 *
15715 * getInitialState: function() {
15716 * return {
15717 * isOn: false,
15718 * fooBaz: new BazFoo()
15719 * }
15720 * }
15721 *
15722 * @return {object}
15723 * @optional
15724 */
15725 getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
15726
15727 /**
15728 * @return {object}
15729 * @optional
15730 */
15731 getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
15732
15733 /**
15734 * Uses props from `this.props` and state from `this.state` to render the
15735 * structure of the component.
15736 *
15737 * No guarantees are made about when or how often this method is invoked, so
15738 * it must not have side effects.
15739 *
15740 * render: function() {
15741 * var name = this.props.name;
15742 * return <div>Hello, {name}!</div>;
15743 * }
15744 *
15745 * @return {ReactComponent}
15746 * @nosideeffects
15747 * @required
15748 */
15749 render: SpecPolicy.DEFINE_ONCE,
15750
15751 // ==== Delegate methods ====
15752
15753 /**
15754 * Invoked when the component is initially created and about to be mounted.
15755 * This may have side effects, but any external subscriptions or data created
15756 * by this method must be cleaned up in `componentWillUnmount`.
15757 *
15758 * @optional
15759 */
15760 componentWillMount: SpecPolicy.DEFINE_MANY,
15761
15762 /**
15763 * Invoked when the component has been mounted and has a DOM representation.
15764 * However, there is no guarantee that the DOM node is in the document.
15765 *
15766 * Use this as an opportunity to operate on the DOM when the component has
15767 * been mounted (initialized and rendered) for the first time.
15768 *
15769 * @param {DOMElement} rootNode DOM element representing the component.
15770 * @optional
15771 */
15772 componentDidMount: SpecPolicy.DEFINE_MANY,
15773
15774 /**
15775 * Invoked before the component receives new props.
15776 *
15777 * Use this as an opportunity to react to a prop transition by updating the
15778 * state using `this.setState`. Current props are accessed via `this.props`.
15779 *
15780 * componentWillReceiveProps: function(nextProps, nextContext) {
15781 * this.setState({
15782 * likesIncreasing: nextProps.likeCount > this.props.likeCount
15783 * });
15784 * }
15785 *
15786 * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
15787 * transition may cause a state change, but the opposite is not true. If you
15788 * need it, you are probably looking for `componentWillUpdate`.
15789 *
15790 * @param {object} nextProps
15791 * @optional
15792 */
15793 componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
15794
15795 /**
15796 * Invoked while deciding if the component should be updated as a result of
15797 * receiving new props, state and/or context.
15798 *
15799 * Use this as an opportunity to `return false` when you're certain that the
15800 * transition to the new props/state/context will not require a component
15801 * update.
15802 *
15803 * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
15804 * return !equal(nextProps, this.props) ||
15805 * !equal(nextState, this.state) ||
15806 * !equal(nextContext, this.context);
15807 * }
15808 *
15809 * @param {object} nextProps
15810 * @param {?object} nextState
15811 * @param {?object} nextContext
15812 * @return {boolean} True if the component should update.
15813 * @optional
15814 */
15815 shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
15816
15817 /**
15818 * Invoked when the component is about to update due to a transition from
15819 * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
15820 * and `nextContext`.
15821 *
15822 * Use this as an opportunity to perform preparation before an update occurs.
15823 *
15824 * NOTE: You **cannot** use `this.setState()` in this method.
15825 *
15826 * @param {object} nextProps
15827 * @param {?object} nextState
15828 * @param {?object} nextContext
15829 * @param {ReactReconcileTransaction} transaction
15830 * @optional
15831 */
15832 componentWillUpdate: SpecPolicy.DEFINE_MANY,
15833
15834 /**
15835 * Invoked when the component's DOM representation has been updated.
15836 *
15837 * Use this as an opportunity to operate on the DOM when the component has
15838 * been updated.
15839 *
15840 * @param {object} prevProps
15841 * @param {?object} prevState
15842 * @param {?object} prevContext
15843 * @param {DOMElement} rootNode DOM element representing the component.
15844 * @optional
15845 */
15846 componentDidUpdate: SpecPolicy.DEFINE_MANY,
15847
15848 /**
15849 * Invoked when the component is about to be removed from its parent and have
15850 * its DOM representation destroyed.
15851 *
15852 * Use this as an opportunity to deallocate any external resources.
15853 *
15854 * NOTE: There is no `componentDidUnmount` since your component will have been
15855 * destroyed by that point.
15856 *
15857 * @optional
15858 */
15859 componentWillUnmount: SpecPolicy.DEFINE_MANY,
15860
15861 // ==== Advanced methods ====
15862
15863 /**
15864 * Updates the component's currently mounted DOM representation.
15865 *
15866 * By default, this implements React's rendering and reconciliation algorithm.
15867 * Sophisticated clients may wish to override this.
15868 *
15869 * @param {ReactReconcileTransaction} transaction
15870 * @internal
15871 * @overridable
15872 */
15873 updateComponent: SpecPolicy.OVERRIDE_BASE
15874
15875 };
15876
15877 /**
15878 * Mapping from class specification keys to special processing functions.
15879 *
15880 * Although these are declared like instance properties in the specification
15881 * when defining classes using `React.createClass`, they are actually static
15882 * and are accessible on the constructor instead of the prototype. Despite
15883 * being static, they must be defined outside of the "statics" key under
15884 * which all other static methods are defined.
15885 */
15886 var RESERVED_SPEC_KEYS = {
15887 displayName: function (Constructor, displayName) {
15888 Constructor.displayName = displayName;
15889 },
15890 mixins: function (Constructor, mixins) {
15891 if (mixins) {
15892 for (var i = 0; i < mixins.length; i++) {
15893 mixSpecIntoComponent(Constructor, mixins[i]);
15894 }
15895 }
15896 },
15897 childContextTypes: function (Constructor, childContextTypes) {
15898 if (process.env.NODE_ENV !== 'production') {
15899 validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
15900 }
15901 Constructor.childContextTypes = assign({}, Constructor.childContextTypes, childContextTypes);
15902 },
15903 contextTypes: function (Constructor, contextTypes) {
15904 if (process.env.NODE_ENV !== 'production') {
15905 validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
15906 }
15907 Constructor.contextTypes = assign({}, Constructor.contextTypes, contextTypes);
15908 },
15909 /**
15910 * Special case getDefaultProps which should move into statics but requires
15911 * automatic merging.
15912 */
15913 getDefaultProps: function (Constructor, getDefaultProps) {
15914 if (Constructor.getDefaultProps) {
15915 Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
15916 } else {
15917 Constructor.getDefaultProps = getDefaultProps;
15918 }
15919 },
15920 propTypes: function (Constructor, propTypes) {
15921 if (process.env.NODE_ENV !== 'production') {
15922 validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
15923 }
15924 Constructor.propTypes = assign({}, Constructor.propTypes, propTypes);
15925 },
15926 statics: function (Constructor, statics) {
15927 mixStaticSpecIntoComponent(Constructor, statics);
15928 },
15929 autobind: function () {} };
15930
15931 // noop
15932 function validateTypeDef(Constructor, typeDef, location) {
15933 for (var propName in typeDef) {
15934 if (typeDef.hasOwnProperty(propName)) {
15935 // use a warning instead of an invariant so components
15936 // don't show up in prod but not in __DEV__
15937 process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : undefined;
15938 }
15939 }
15940 }
15941
15942 function validateMethodOverride(proto, name) {
15943 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
15944
15945 // Disallow overriding of base class methods unless explicitly allowed.
15946 if (ReactClassMixin.hasOwnProperty(name)) {
15947 !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : undefined;
15948 }
15949
15950 // Disallow defining methods more than once unless explicitly allowed.
15951 if (proto.hasOwnProperty(name)) {
15952 !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : undefined;
15953 }
15954 }
15955
15956 /**
15957 * Mixin helper which handles policy validation and reserved
15958 * specification keys when building React classses.
15959 */
15960 function mixSpecIntoComponent(Constructor, spec) {
15961 if (!spec) {
15962 return;
15963 }
15964
15965 !(typeof spec !== 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
15966 !!ReactElement.isValidElement(spec) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
15967
15968 var proto = Constructor.prototype;
15969
15970 // By handling mixins before any other properties, we ensure the same
15971 // chaining order is applied to methods with DEFINE_MANY policy, whether
15972 // mixins are listed before or after these methods in the spec.
15973 if (spec.hasOwnProperty(MIXINS_KEY)) {
15974 RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
15975 }
15976
15977 for (var name in spec) {
15978 if (!spec.hasOwnProperty(name)) {
15979 continue;
15980 }
15981
15982 if (name === MIXINS_KEY) {
15983 // We have already handled mixins in a special case above.
15984 continue;
15985 }
15986
15987 var property = spec[name];
15988 validateMethodOverride(proto, name);
15989
15990 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
15991 RESERVED_SPEC_KEYS[name](Constructor, property);
15992 } else {
15993 // Setup methods on prototype:
15994 // The following member methods should not be automatically bound:
15995 // 1. Expected ReactClass methods (in the "interface").
15996 // 2. Overridden methods (that were mixed in).
15997 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
15998 var isAlreadyDefined = proto.hasOwnProperty(name);
15999 var isFunction = typeof property === 'function';
16000 var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
16001
16002 if (shouldAutoBind) {
16003 if (!proto.__reactAutoBindMap) {
16004 proto.__reactAutoBindMap = {};
16005 }
16006 proto.__reactAutoBindMap[name] = property;
16007 proto[name] = property;
16008 } else {
16009 if (isAlreadyDefined) {
16010 var specPolicy = ReactClassInterface[name];
16011
16012 // These cases should already be caught by validateMethodOverride.
16013 !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : undefined;
16014
16015 // For methods which are defined more than once, call the existing
16016 // methods before calling the new property, merging if appropriate.
16017 if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {
16018 proto[name] = createMergedResultFunction(proto[name], property);
16019 } else if (specPolicy === SpecPolicy.DEFINE_MANY) {
16020 proto[name] = createChainedFunction(proto[name], property);
16021 }
16022 } else {
16023 proto[name] = property;
16024 if (process.env.NODE_ENV !== 'production') {
16025 // Add verbose displayName to the function, which helps when looking
16026 // at profiling tools.
16027 if (typeof property === 'function' && spec.displayName) {
16028 proto[name].displayName = spec.displayName + '_' + name;
16029 }
16030 }
16031 }
16032 }
16033 }
16034 }
16035 }
16036
16037 function mixStaticSpecIntoComponent(Constructor, statics) {
16038 if (!statics) {
16039 return;
16040 }
16041 for (var name in statics) {
16042 var property = statics[name];
16043 if (!statics.hasOwnProperty(name)) {
16044 continue;
16045 }
16046
16047 var isReserved = (name in RESERVED_SPEC_KEYS);
16048 !!isReserved ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : undefined;
16049
16050 var isInherited = (name in Constructor);
16051 !!isInherited ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : undefined;
16052 Constructor[name] = property;
16053 }
16054 }
16055
16056 /**
16057 * Merge two objects, but throw if both contain the same key.
16058 *
16059 * @param {object} one The first object, which is mutated.
16060 * @param {object} two The second object
16061 * @return {object} one after it has been mutated to contain everything in two.
16062 */
16063 function mergeIntoWithNoDuplicateKeys(one, two) {
16064 !(one && two && typeof one === 'object' && typeof two === 'object') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : undefined;
16065
16066 for (var key in two) {
16067 if (two.hasOwnProperty(key)) {
16068 !(one[key] === undefined) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : undefined;
16069 one[key] = two[key];
16070 }
16071 }
16072 return one;
16073 }
16074
16075 /**
16076 * Creates a function that invokes two functions and merges their return values.
16077 *
16078 * @param {function} one Function to invoke first.
16079 * @param {function} two Function to invoke second.
16080 * @return {function} Function that invokes the two argument functions.
16081 * @private
16082 */
16083 function createMergedResultFunction(one, two) {
16084 return function mergedResult() {
16085 var a = one.apply(this, arguments);
16086 var b = two.apply(this, arguments);
16087 if (a == null) {
16088 return b;
16089 } else if (b == null) {
16090 return a;
16091 }
16092 var c = {};
16093 mergeIntoWithNoDuplicateKeys(c, a);
16094 mergeIntoWithNoDuplicateKeys(c, b);
16095 return c;
16096 };
16097 }
16098
16099 /**
16100 * Creates a function that invokes two functions and ignores their return vales.
16101 *
16102 * @param {function} one Function to invoke first.
16103 * @param {function} two Function to invoke second.
16104 * @return {function} Function that invokes the two argument functions.
16105 * @private
16106 */
16107 function createChainedFunction(one, two) {
16108 return function chainedFunction() {
16109 one.apply(this, arguments);
16110 two.apply(this, arguments);
16111 };
16112 }
16113
16114 /**
16115 * Binds a method to the component.
16116 *
16117 * @param {object} component Component whose method is going to be bound.
16118 * @param {function} method Method to be bound.
16119 * @return {function} The bound method.
16120 */
16121 function bindAutoBindMethod(component, method) {
16122 var boundMethod = method.bind(component);
16123 if (process.env.NODE_ENV !== 'production') {
16124 boundMethod.__reactBoundContext = component;
16125 boundMethod.__reactBoundMethod = method;
16126 boundMethod.__reactBoundArguments = null;
16127 var componentName = component.constructor.displayName;
16128 var _bind = boundMethod.bind;
16129 /* eslint-disable block-scoped-var, no-undef */
16130 boundMethod.bind = function (newThis) {
16131 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
16132 args[_key - 1] = arguments[_key];
16133 }
16134
16135 // User is trying to bind() an autobound method; we effectively will
16136 // ignore the value of "this" that the user is trying to use, so
16137 // let's warn.
16138 if (newThis !== component && newThis !== null) {
16139 process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : undefined;
16140 } else if (!args.length) {
16141 process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : undefined;
16142 return boundMethod;
16143 }
16144 var reboundMethod = _bind.apply(boundMethod, arguments);
16145 reboundMethod.__reactBoundContext = component;
16146 reboundMethod.__reactBoundMethod = method;
16147 reboundMethod.__reactBoundArguments = args;
16148 return reboundMethod;
16149 /* eslint-enable */
16150 };
16151 }
16152 return boundMethod;
16153 }
16154
16155 /**
16156 * Binds all auto-bound methods in a component.
16157 *
16158 * @param {object} component Component whose method is going to be bound.
16159 */
16160 function bindAutoBindMethods(component) {
16161 for (var autoBindKey in component.__reactAutoBindMap) {
16162 if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
16163 var method = component.__reactAutoBindMap[autoBindKey];
16164 component[autoBindKey] = bindAutoBindMethod(component, method);
16165 }
16166 }
16167 }
16168
16169 /**
16170 * Add more to the ReactClass base class. These are all legacy features and
16171 * therefore not already part of the modern ReactComponent.
16172 */
16173 var ReactClassMixin = {
16174
16175 /**
16176 * TODO: This will be deprecated because state should always keep a consistent
16177 * type signature and the only use case for this, is to avoid that.
16178 */
16179 replaceState: function (newState, callback) {
16180 this.updater.enqueueReplaceState(this, newState);
16181 if (callback) {
16182 this.updater.enqueueCallback(this, callback);
16183 }
16184 },
16185
16186 /**
16187 * Checks whether or not this composite component is mounted.
16188 * @return {boolean} True if mounted, false otherwise.
16189 * @protected
16190 * @final
16191 */
16192 isMounted: function () {
16193 return this.updater.isMounted(this);
16194 },
16195
16196 /**
16197 * Sets a subset of the props.
16198 *
16199 * @param {object} partialProps Subset of the next props.
16200 * @param {?function} callback Called after props are updated.
16201 * @final
16202 * @public
16203 * @deprecated
16204 */
16205 setProps: function (partialProps, callback) {
16206 if (process.env.NODE_ENV !== 'production') {
16207 warnSetProps();
16208 }
16209 this.updater.enqueueSetProps(this, partialProps);
16210 if (callback) {
16211 this.updater.enqueueCallback(this, callback);
16212 }
16213 },
16214
16215 /**
16216 * Replace all the props.
16217 *
16218 * @param {object} newProps Subset of the next props.
16219 * @param {?function} callback Called after props are updated.
16220 * @final
16221 * @public
16222 * @deprecated
16223 */
16224 replaceProps: function (newProps, callback) {
16225 if (process.env.NODE_ENV !== 'production') {
16226 warnSetProps();
16227 }
16228 this.updater.enqueueReplaceProps(this, newProps);
16229 if (callback) {
16230 this.updater.enqueueCallback(this, callback);
16231 }
16232 }
16233 };
16234
16235 var ReactClassComponent = function () {};
16236 assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
16237
16238 /**
16239 * Module for creating composite components.
16240 *
16241 * @class ReactClass
16242 */
16243 var ReactClass = {
16244
16245 /**
16246 * Creates a composite component class given a class specification.
16247 *
16248 * @param {object} spec Class specification (which must define `render`).
16249 * @return {function} Component constructor function.
16250 * @public
16251 */
16252 createClass: function (spec) {
16253 var Constructor = function (props, context, updater) {
16254 // This constructor is overridden by mocks. The argument is used
16255 // by mocks to assert on what gets mounted.
16256
16257 if (process.env.NODE_ENV !== 'production') {
16258 process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : undefined;
16259 }
16260
16261 // Wire up auto-binding
16262 if (this.__reactAutoBindMap) {
16263 bindAutoBindMethods(this);
16264 }
16265
16266 this.props = props;
16267 this.context = context;
16268 this.refs = emptyObject;
16269 this.updater = updater || ReactNoopUpdateQueue;
16270
16271 this.state = null;
16272
16273 // ReactClasses doesn't have constructors. Instead, they use the
16274 // getInitialState and componentWillMount methods for initialization.
16275
16276 var initialState = this.getInitialState ? this.getInitialState() : null;
16277 if (process.env.NODE_ENV !== 'production') {
16278 // We allow auto-mocks to proceed as if they're returning null.
16279 if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) {
16280 // This is probably bad practice. Consider warning here and
16281 // deprecating this convenience.
16282 initialState = null;
16283 }
16284 }
16285 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : undefined;
16286
16287 this.state = initialState;
16288 };
16289 Constructor.prototype = new ReactClassComponent();
16290 Constructor.prototype.constructor = Constructor;
16291
16292 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
16293
16294 mixSpecIntoComponent(Constructor, spec);
16295
16296 // Initialize the defaultProps property after all mixins have been merged.
16297 if (Constructor.getDefaultProps) {
16298 Constructor.defaultProps = Constructor.getDefaultProps();
16299 }
16300
16301 if (process.env.NODE_ENV !== 'production') {
16302 // This is a tag to indicate that the use of these method names is ok,
16303 // since it's used with createClass. If it's not, then it's likely a
16304 // mistake so we'll warn you to use the static property, property
16305 // initializer or constructor respectively.
16306 if (Constructor.getDefaultProps) {
16307 Constructor.getDefaultProps.isReactClassApproved = {};
16308 }
16309 if (Constructor.prototype.getInitialState) {
16310 Constructor.prototype.getInitialState.isReactClassApproved = {};
16311 }
16312 }
16313
16314 !Constructor.prototype.render ? process.env.NODE_ENV !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : undefined;
16315
16316 if (process.env.NODE_ENV !== 'production') {
16317 process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%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.', spec.displayName || 'A component') : undefined;
16318 process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : undefined;
16319 }
16320
16321 // Reduce time spent doing lookups by setting these on the prototype.
16322 for (var methodName in ReactClassInterface) {
16323 if (!Constructor.prototype[methodName]) {
16324 Constructor.prototype[methodName] = null;
16325 }
16326 }
16327
16328 return Constructor;
16329 },
16330
16331 injection: {
16332 injectMixin: function (mixin) {
16333 injectedMixins.push(mixin);
16334 }
16335 }
16336
16337 };
16338
16339 module.exports = ReactClass;
16340 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16341
16342/***/ }),
16343/* 124 */
16344/***/ (function(module, exports, __webpack_require__) {
16345
16346 /* WEBPACK VAR INJECTION */(function(process) {/**
16347 * Copyright 2013-2015, Facebook, Inc.
16348 * All rights reserved.
16349 *
16350 * This source code is licensed under the BSD-style license found in the
16351 * LICENSE file in the root directory of this source tree. An additional grant
16352 * of patent rights can be found in the PATENTS file in the same directory.
16353 *
16354 * @providesModule ReactComponent
16355 */
16356
16357 'use strict';
16358
16359 var ReactNoopUpdateQueue = __webpack_require__(125);
16360
16361 var canDefineProperty = __webpack_require__(44);
16362 var emptyObject = __webpack_require__(59);
16363 var invariant = __webpack_require__(14);
16364 var warning = __webpack_require__(26);
16365
16366 /**
16367 * Base class helpers for the updating state of a component.
16368 */
16369 function ReactComponent(props, context, updater) {
16370 this.props = props;
16371 this.context = context;
16372 this.refs = emptyObject;
16373 // We initialize the default updater but the real one gets injected by the
16374 // renderer.
16375 this.updater = updater || ReactNoopUpdateQueue;
16376 }
16377
16378 ReactComponent.prototype.isReactComponent = {};
16379
16380 /**
16381 * Sets a subset of the state. Always use this to mutate
16382 * state. You should treat `this.state` as immutable.
16383 *
16384 * There is no guarantee that `this.state` will be immediately updated, so
16385 * accessing `this.state` after calling this method may return the old value.
16386 *
16387 * There is no guarantee that calls to `setState` will run synchronously,
16388 * as they may eventually be batched together. You can provide an optional
16389 * callback that will be executed when the call to setState is actually
16390 * completed.
16391 *
16392 * When a function is provided to setState, it will be called at some point in
16393 * the future (not synchronously). It will be called with the up to date
16394 * component arguments (state, props, context). These values can be different
16395 * from this.* because your function may be called after receiveProps but before
16396 * shouldComponentUpdate, and this new state, props, and context will not yet be
16397 * assigned to this.
16398 *
16399 * @param {object|function} partialState Next partial state or function to
16400 * produce next partial state to be merged with current state.
16401 * @param {?function} callback Called after state is updated.
16402 * @final
16403 * @protected
16404 */
16405 ReactComponent.prototype.setState = function (partialState, callback) {
16406 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : undefined;
16407 if (process.env.NODE_ENV !== 'production') {
16408 process.env.NODE_ENV !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : undefined;
16409 }
16410 this.updater.enqueueSetState(this, partialState);
16411 if (callback) {
16412 this.updater.enqueueCallback(this, callback);
16413 }
16414 };
16415
16416 /**
16417 * Forces an update. This should only be invoked when it is known with
16418 * certainty that we are **not** in a DOM transaction.
16419 *
16420 * You may want to call this when you know that some deeper aspect of the
16421 * component's state has changed but `setState` was not called.
16422 *
16423 * This will not invoke `shouldComponentUpdate`, but it will invoke
16424 * `componentWillUpdate` and `componentDidUpdate`.
16425 *
16426 * @param {?function} callback Called after update is complete.
16427 * @final
16428 * @protected
16429 */
16430 ReactComponent.prototype.forceUpdate = function (callback) {
16431 this.updater.enqueueForceUpdate(this);
16432 if (callback) {
16433 this.updater.enqueueCallback(this, callback);
16434 }
16435 };
16436
16437 /**
16438 * Deprecated APIs. These APIs used to exist on classic React classes but since
16439 * we would like to deprecate them, we're not going to move them over to this
16440 * modern base class. Instead, we define a getter that warns if it's accessed.
16441 */
16442 if (process.env.NODE_ENV !== 'production') {
16443 var deprecatedAPIs = {
16444 getDOMNode: ['getDOMNode', 'Use ReactDOM.findDOMNode(component) instead.'],
16445 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
16446 replaceProps: ['replaceProps', 'Instead, call render again at the top level.'],
16447 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'],
16448 setProps: ['setProps', 'Instead, call render again at the top level.']
16449 };
16450 var defineDeprecationWarning = function (methodName, info) {
16451 if (canDefineProperty) {
16452 Object.defineProperty(ReactComponent.prototype, methodName, {
16453 get: function () {
16454 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : undefined;
16455 return undefined;
16456 }
16457 });
16458 }
16459 };
16460 for (var fnName in deprecatedAPIs) {
16461 if (deprecatedAPIs.hasOwnProperty(fnName)) {
16462 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
16463 }
16464 }
16465 }
16466
16467 module.exports = ReactComponent;
16468 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16469
16470/***/ }),
16471/* 125 */
16472/***/ (function(module, exports, __webpack_require__) {
16473
16474 /* WEBPACK VAR INJECTION */(function(process) {/**
16475 * Copyright 2015, Facebook, Inc.
16476 * All rights reserved.
16477 *
16478 * This source code is licensed under the BSD-style license found in the
16479 * LICENSE file in the root directory of this source tree. An additional grant
16480 * of patent rights can be found in the PATENTS file in the same directory.
16481 *
16482 * @providesModule ReactNoopUpdateQueue
16483 */
16484
16485 'use strict';
16486
16487 var warning = __webpack_require__(26);
16488
16489 function warnTDZ(publicInstance, callerName) {
16490 if (process.env.NODE_ENV !== 'production') {
16491 process.env.NODE_ENV !== 'production' ? warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor && publicInstance.constructor.displayName || '') : undefined;
16492 }
16493 }
16494
16495 /**
16496 * This is the abstract API for an update queue.
16497 */
16498 var ReactNoopUpdateQueue = {
16499
16500 /**
16501 * Checks whether or not this composite component is mounted.
16502 * @param {ReactClass} publicInstance The instance we want to test.
16503 * @return {boolean} True if mounted, false otherwise.
16504 * @protected
16505 * @final
16506 */
16507 isMounted: function (publicInstance) {
16508 return false;
16509 },
16510
16511 /**
16512 * Enqueue a callback that will be executed after all the pending updates
16513 * have processed.
16514 *
16515 * @param {ReactClass} publicInstance The instance to use as `this` context.
16516 * @param {?function} callback Called after state is updated.
16517 * @internal
16518 */
16519 enqueueCallback: function (publicInstance, callback) {},
16520
16521 /**
16522 * Forces an update. This should only be invoked when it is known with
16523 * certainty that we are **not** in a DOM transaction.
16524 *
16525 * You may want to call this when you know that some deeper aspect of the
16526 * component's state has changed but `setState` was not called.
16527 *
16528 * This will not invoke `shouldComponentUpdate`, but it will invoke
16529 * `componentWillUpdate` and `componentDidUpdate`.
16530 *
16531 * @param {ReactClass} publicInstance The instance that should rerender.
16532 * @internal
16533 */
16534 enqueueForceUpdate: function (publicInstance) {
16535 warnTDZ(publicInstance, 'forceUpdate');
16536 },
16537
16538 /**
16539 * Replaces all of the state. Always use this or `setState` to mutate state.
16540 * You should treat `this.state` as immutable.
16541 *
16542 * There is no guarantee that `this.state` will be immediately updated, so
16543 * accessing `this.state` after calling this method may return the old value.
16544 *
16545 * @param {ReactClass} publicInstance The instance that should rerender.
16546 * @param {object} completeState Next state.
16547 * @internal
16548 */
16549 enqueueReplaceState: function (publicInstance, completeState) {
16550 warnTDZ(publicInstance, 'replaceState');
16551 },
16552
16553 /**
16554 * Sets a subset of the state. This only exists because _pendingState is
16555 * internal. This provides a merging strategy that is not available to deep
16556 * properties which is confusing. TODO: Expose pendingState or don't use it
16557 * during the merge.
16558 *
16559 * @param {ReactClass} publicInstance The instance that should rerender.
16560 * @param {object} partialState Next partial state to be merged with state.
16561 * @internal
16562 */
16563 enqueueSetState: function (publicInstance, partialState) {
16564 warnTDZ(publicInstance, 'setState');
16565 },
16566
16567 /**
16568 * Sets a subset of the props.
16569 *
16570 * @param {ReactClass} publicInstance The instance that should rerender.
16571 * @param {object} partialProps Subset of the next props.
16572 * @internal
16573 */
16574 enqueueSetProps: function (publicInstance, partialProps) {
16575 warnTDZ(publicInstance, 'setProps');
16576 },
16577
16578 /**
16579 * Replaces all of the props.
16580 *
16581 * @param {ReactClass} publicInstance The instance that should rerender.
16582 * @param {object} props New props.
16583 * @internal
16584 */
16585 enqueueReplaceProps: function (publicInstance, props) {
16586 warnTDZ(publicInstance, 'replaceProps');
16587 }
16588
16589 };
16590
16591 module.exports = ReactNoopUpdateQueue;
16592 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
16593
16594/***/ }),
16595/* 126 */
16596/***/ (function(module, exports, __webpack_require__) {
16597
16598 /**
16599 * Copyright 2013-2015, Facebook, Inc.
16600 * All rights reserved.
16601 *
16602 * This source code is licensed under the BSD-style license found in the
16603 * LICENSE file in the root directory of this source tree. An additional grant
16604 * of patent rights can be found in the PATENTS file in the same directory.
16605 *
16606 * @providesModule ReactReconcileTransaction
16607 * @typechecks static-only
16608 */
16609
16610 'use strict';
16611
16612 var CallbackQueue = __webpack_require__(56);
16613 var PooledClass = __webpack_require__(57);
16614 var ReactBrowserEventEmitter = __webpack_require__(30);
16615 var ReactDOMFeatureFlags = __webpack_require__(42);
16616 var ReactInputSelection = __webpack_require__(127);
16617 var Transaction = __webpack_require__(58);
16618
16619 var assign = __webpack_require__(40);
16620
16621 /**
16622 * Ensures that, when possible, the selection range (currently selected text
16623 * input) is not disturbed by performing the transaction.
16624 */
16625 var SELECTION_RESTORATION = {
16626 /**
16627 * @return {Selection} Selection information.
16628 */
16629 initialize: ReactInputSelection.getSelectionInformation,
16630 /**
16631 * @param {Selection} sel Selection information returned from `initialize`.
16632 */
16633 close: ReactInputSelection.restoreSelection
16634 };
16635
16636 /**
16637 * Suppresses events (blur/focus) that could be inadvertently dispatched due to
16638 * high level DOM manipulations (like temporarily removing a text input from the
16639 * DOM).
16640 */
16641 var EVENT_SUPPRESSION = {
16642 /**
16643 * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
16644 * the reconciliation.
16645 */
16646 initialize: function () {
16647 var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
16648 ReactBrowserEventEmitter.setEnabled(false);
16649 return currentlyEnabled;
16650 },
16651
16652 /**
16653 * @param {boolean} previouslyEnabled Enabled status of
16654 * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
16655 * restores the previous value.
16656 */
16657 close: function (previouslyEnabled) {
16658 ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
16659 }
16660 };
16661
16662 /**
16663 * Provides a queue for collecting `componentDidMount` and
16664 * `componentDidUpdate` callbacks during the the transaction.
16665 */
16666 var ON_DOM_READY_QUEUEING = {
16667 /**
16668 * Initializes the internal `onDOMReady` queue.
16669 */
16670 initialize: function () {
16671 this.reactMountReady.reset();
16672 },
16673
16674 /**
16675 * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
16676 */
16677 close: function () {
16678 this.reactMountReady.notifyAll();
16679 }
16680 };
16681
16682 /**
16683 * Executed within the scope of the `Transaction` instance. Consider these as
16684 * being member methods, but with an implied ordering while being isolated from
16685 * each other.
16686 */
16687 var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
16688
16689 /**
16690 * Currently:
16691 * - The order that these are listed in the transaction is critical:
16692 * - Suppresses events.
16693 * - Restores selection range.
16694 *
16695 * Future:
16696 * - Restore document/overflow scroll positions that were unintentionally
16697 * modified via DOM insertions above the top viewport boundary.
16698 * - Implement/integrate with customized constraint based layout system and keep
16699 * track of which dimensions must be remeasured.
16700 *
16701 * @class ReactReconcileTransaction
16702 */
16703 function ReactReconcileTransaction(forceHTML) {
16704 this.reinitializeTransaction();
16705 // Only server-side rendering really needs this option (see
16706 // `ReactServerRendering`), but server-side uses
16707 // `ReactServerRenderingTransaction` instead. This option is here so that it's
16708 // accessible and defaults to false when `ReactDOMComponent` and
16709 // `ReactTextComponent` checks it in `mountComponent`.`
16710 this.renderToStaticMarkup = false;
16711 this.reactMountReady = CallbackQueue.getPooled(null);
16712 this.useCreateElement = !forceHTML && ReactDOMFeatureFlags.useCreateElement;
16713 }
16714
16715 var Mixin = {
16716 /**
16717 * @see Transaction
16718 * @abstract
16719 * @final
16720 * @return {array<object>} List of operation wrap procedures.
16721 * TODO: convert to array<TransactionWrapper>
16722 */
16723 getTransactionWrappers: function () {
16724 return TRANSACTION_WRAPPERS;
16725 },
16726
16727 /**
16728 * @return {object} The queue to collect `onDOMReady` callbacks with.
16729 */
16730 getReactMountReady: function () {
16731 return this.reactMountReady;
16732 },
16733
16734 /**
16735 * `PooledClass` looks for this, and will invoke this before allowing this
16736 * instance to be reused.
16737 */
16738 destructor: function () {
16739 CallbackQueue.release(this.reactMountReady);
16740 this.reactMountReady = null;
16741 }
16742 };
16743
16744 assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin);
16745
16746 PooledClass.addPoolingTo(ReactReconcileTransaction);
16747
16748 module.exports = ReactReconcileTransaction;
16749
16750/***/ }),
16751/* 127 */
16752/***/ (function(module, exports, __webpack_require__) {
16753
16754 /**
16755 * Copyright 2013-2015, Facebook, Inc.
16756 * All rights reserved.
16757 *
16758 * This source code is licensed under the BSD-style license found in the
16759 * LICENSE file in the root directory of this source tree. An additional grant
16760 * of patent rights can be found in the PATENTS file in the same directory.
16761 *
16762 * @providesModule ReactInputSelection
16763 */
16764
16765 'use strict';
16766
16767 var ReactDOMSelection = __webpack_require__(128);
16768
16769 var containsNode = __webpack_require__(60);
16770 var focusNode = __webpack_require__(96);
16771 var getActiveElement = __webpack_require__(130);
16772
16773 function isInDocument(node) {
16774 return containsNode(document.documentElement, node);
16775 }
16776
16777 /**
16778 * @ReactInputSelection: React input selection module. Based on Selection.js,
16779 * but modified to be suitable for react and has a couple of bug fixes (doesn't
16780 * assume buttons have range selections allowed).
16781 * Input selection module for React.
16782 */
16783 var ReactInputSelection = {
16784
16785 hasSelectionCapabilities: function (elem) {
16786 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
16787 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
16788 },
16789
16790 getSelectionInformation: function () {
16791 var focusedElem = getActiveElement();
16792 return {
16793 focusedElem: focusedElem,
16794 selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
16795 };
16796 },
16797
16798 /**
16799 * @restoreSelection: If any selection information was potentially lost,
16800 * restore it. This is useful when performing operations that could remove dom
16801 * nodes and place them back in, resulting in focus being lost.
16802 */
16803 restoreSelection: function (priorSelectionInformation) {
16804 var curFocusedElem = getActiveElement();
16805 var priorFocusedElem = priorSelectionInformation.focusedElem;
16806 var priorSelectionRange = priorSelectionInformation.selectionRange;
16807 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
16808 if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
16809 ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
16810 }
16811 focusNode(priorFocusedElem);
16812 }
16813 },
16814
16815 /**
16816 * @getSelection: Gets the selection bounds of a focused textarea, input or
16817 * contentEditable node.
16818 * -@input: Look up selection bounds of this input
16819 * -@return {start: selectionStart, end: selectionEnd}
16820 */
16821 getSelection: function (input) {
16822 var selection;
16823
16824 if ('selectionStart' in input) {
16825 // Modern browser with input or textarea.
16826 selection = {
16827 start: input.selectionStart,
16828 end: input.selectionEnd
16829 };
16830 } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) {
16831 // IE8 input.
16832 var range = document.selection.createRange();
16833 // There can only be one selection per document in IE, so it must
16834 // be in our element.
16835 if (range.parentElement() === input) {
16836 selection = {
16837 start: -range.moveStart('character', -input.value.length),
16838 end: -range.moveEnd('character', -input.value.length)
16839 };
16840 }
16841 } else {
16842 // Content editable or old IE textarea.
16843 selection = ReactDOMSelection.getOffsets(input);
16844 }
16845
16846 return selection || { start: 0, end: 0 };
16847 },
16848
16849 /**
16850 * @setSelection: Sets the selection bounds of a textarea or input and focuses
16851 * the input.
16852 * -@input Set selection bounds of this input or textarea
16853 * -@offsets Object of same form that is returned from get*
16854 */
16855 setSelection: function (input, offsets) {
16856 var start = offsets.start;
16857 var end = offsets.end;
16858 if (typeof end === 'undefined') {
16859 end = start;
16860 }
16861
16862 if ('selectionStart' in input) {
16863 input.selectionStart = start;
16864 input.selectionEnd = Math.min(end, input.value.length);
16865 } else if (document.selection && (input.nodeName && input.nodeName.toLowerCase() === 'input')) {
16866 var range = input.createTextRange();
16867 range.collapse(true);
16868 range.moveStart('character', start);
16869 range.moveEnd('character', end - start);
16870 range.select();
16871 } else {
16872 ReactDOMSelection.setOffsets(input, offsets);
16873 }
16874 }
16875 };
16876
16877 module.exports = ReactInputSelection;
16878
16879/***/ }),
16880/* 128 */
16881/***/ (function(module, exports, __webpack_require__) {
16882
16883 /**
16884 * Copyright 2013-2015, Facebook, Inc.
16885 * All rights reserved.
16886 *
16887 * This source code is licensed under the BSD-style license found in the
16888 * LICENSE file in the root directory of this source tree. An additional grant
16889 * of patent rights can be found in the PATENTS file in the same directory.
16890 *
16891 * @providesModule ReactDOMSelection
16892 */
16893
16894 'use strict';
16895
16896 var ExecutionEnvironment = __webpack_require__(10);
16897
16898 var getNodeForCharacterOffset = __webpack_require__(129);
16899 var getTextContentAccessor = __webpack_require__(76);
16900
16901 /**
16902 * While `isCollapsed` is available on the Selection object and `collapsed`
16903 * is available on the Range object, IE11 sometimes gets them wrong.
16904 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
16905 */
16906 function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
16907 return anchorNode === focusNode && anchorOffset === focusOffset;
16908 }
16909
16910 /**
16911 * Get the appropriate anchor and focus node/offset pairs for IE.
16912 *
16913 * The catch here is that IE's selection API doesn't provide information
16914 * about whether the selection is forward or backward, so we have to
16915 * behave as though it's always forward.
16916 *
16917 * IE text differs from modern selection in that it behaves as though
16918 * block elements end with a new line. This means character offsets will
16919 * differ between the two APIs.
16920 *
16921 * @param {DOMElement} node
16922 * @return {object}
16923 */
16924 function getIEOffsets(node) {
16925 var selection = document.selection;
16926 var selectedRange = selection.createRange();
16927 var selectedLength = selectedRange.text.length;
16928
16929 // Duplicate selection so we can move range without breaking user selection.
16930 var fromStart = selectedRange.duplicate();
16931 fromStart.moveToElementText(node);
16932 fromStart.setEndPoint('EndToStart', selectedRange);
16933
16934 var startOffset = fromStart.text.length;
16935 var endOffset = startOffset + selectedLength;
16936
16937 return {
16938 start: startOffset,
16939 end: endOffset
16940 };
16941 }
16942
16943 /**
16944 * @param {DOMElement} node
16945 * @return {?object}
16946 */
16947 function getModernOffsets(node) {
16948 var selection = window.getSelection && window.getSelection();
16949
16950 if (!selection || selection.rangeCount === 0) {
16951 return null;
16952 }
16953
16954 var anchorNode = selection.anchorNode;
16955 var anchorOffset = selection.anchorOffset;
16956 var focusNode = selection.focusNode;
16957 var focusOffset = selection.focusOffset;
16958
16959 var currentRange = selection.getRangeAt(0);
16960
16961 // In Firefox, range.startContainer and range.endContainer can be "anonymous
16962 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
16963 // divs do not seem to expose properties, triggering a "Permission denied
16964 // error" if any of its properties are accessed. The only seemingly possible
16965 // way to avoid erroring is to access a property that typically works for
16966 // non-anonymous divs and catch any error that may otherwise arise. See
16967 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
16968 try {
16969 /* eslint-disable no-unused-expressions */
16970 currentRange.startContainer.nodeType;
16971 currentRange.endContainer.nodeType;
16972 /* eslint-enable no-unused-expressions */
16973 } catch (e) {
16974 return null;
16975 }
16976
16977 // If the node and offset values are the same, the selection is collapsed.
16978 // `Selection.isCollapsed` is available natively, but IE sometimes gets
16979 // this value wrong.
16980 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
16981
16982 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
16983
16984 var tempRange = currentRange.cloneRange();
16985 tempRange.selectNodeContents(node);
16986 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
16987
16988 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
16989
16990 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
16991 var end = start + rangeLength;
16992
16993 // Detect whether the selection is backward.
16994 var detectionRange = document.createRange();
16995 detectionRange.setStart(anchorNode, anchorOffset);
16996 detectionRange.setEnd(focusNode, focusOffset);
16997 var isBackward = detectionRange.collapsed;
16998
16999 return {
17000 start: isBackward ? end : start,
17001 end: isBackward ? start : end
17002 };
17003 }
17004
17005 /**
17006 * @param {DOMElement|DOMTextNode} node
17007 * @param {object} offsets
17008 */
17009 function setIEOffsets(node, offsets) {
17010 var range = document.selection.createRange().duplicate();
17011 var start, end;
17012
17013 if (typeof offsets.end === 'undefined') {
17014 start = offsets.start;
17015 end = start;
17016 } else if (offsets.start > offsets.end) {
17017 start = offsets.end;
17018 end = offsets.start;
17019 } else {
17020 start = offsets.start;
17021 end = offsets.end;
17022 }
17023
17024 range.moveToElementText(node);
17025 range.moveStart('character', start);
17026 range.setEndPoint('EndToStart', range);
17027 range.moveEnd('character', end - start);
17028 range.select();
17029 }
17030
17031 /**
17032 * In modern non-IE browsers, we can support both forward and backward
17033 * selections.
17034 *
17035 * Note: IE10+ supports the Selection object, but it does not support
17036 * the `extend` method, which means that even in modern IE, it's not possible
17037 * to programatically create a backward selection. Thus, for all IE
17038 * versions, we use the old IE API to create our selections.
17039 *
17040 * @param {DOMElement|DOMTextNode} node
17041 * @param {object} offsets
17042 */
17043 function setModernOffsets(node, offsets) {
17044 if (!window.getSelection) {
17045 return;
17046 }
17047
17048 var selection = window.getSelection();
17049 var length = node[getTextContentAccessor()].length;
17050 var start = Math.min(offsets.start, length);
17051 var end = typeof offsets.end === 'undefined' ? start : Math.min(offsets.end, length);
17052
17053 // IE 11 uses modern selection, but doesn't support the extend method.
17054 // Flip backward selections, so we can set with a single range.
17055 if (!selection.extend && start > end) {
17056 var temp = end;
17057 end = start;
17058 start = temp;
17059 }
17060
17061 var startMarker = getNodeForCharacterOffset(node, start);
17062 var endMarker = getNodeForCharacterOffset(node, end);
17063
17064 if (startMarker && endMarker) {
17065 var range = document.createRange();
17066 range.setStart(startMarker.node, startMarker.offset);
17067 selection.removeAllRanges();
17068
17069 if (start > end) {
17070 selection.addRange(range);
17071 selection.extend(endMarker.node, endMarker.offset);
17072 } else {
17073 range.setEnd(endMarker.node, endMarker.offset);
17074 selection.addRange(range);
17075 }
17076 }
17077 }
17078
17079 var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
17080
17081 var ReactDOMSelection = {
17082 /**
17083 * @param {DOMElement} node
17084 */
17085 getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
17086
17087 /**
17088 * @param {DOMElement|DOMTextNode} node
17089 * @param {object} offsets
17090 */
17091 setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
17092 };
17093
17094 module.exports = ReactDOMSelection;
17095
17096/***/ }),
17097/* 129 */
17098/***/ (function(module, exports) {
17099
17100 /**
17101 * Copyright 2013-2015, Facebook, Inc.
17102 * All rights reserved.
17103 *
17104 * This source code is licensed under the BSD-style license found in the
17105 * LICENSE file in the root directory of this source tree. An additional grant
17106 * of patent rights can be found in the PATENTS file in the same directory.
17107 *
17108 * @providesModule getNodeForCharacterOffset
17109 */
17110
17111 'use strict';
17112
17113 /**
17114 * Given any node return the first leaf node without children.
17115 *
17116 * @param {DOMElement|DOMTextNode} node
17117 * @return {DOMElement|DOMTextNode}
17118 */
17119 function getLeafNode(node) {
17120 while (node && node.firstChild) {
17121 node = node.firstChild;
17122 }
17123 return node;
17124 }
17125
17126 /**
17127 * Get the next sibling within a container. This will walk up the
17128 * DOM if a node's siblings have been exhausted.
17129 *
17130 * @param {DOMElement|DOMTextNode} node
17131 * @return {?DOMElement|DOMTextNode}
17132 */
17133 function getSiblingNode(node) {
17134 while (node) {
17135 if (node.nextSibling) {
17136 return node.nextSibling;
17137 }
17138 node = node.parentNode;
17139 }
17140 }
17141
17142 /**
17143 * Get object describing the nodes which contain characters at offset.
17144 *
17145 * @param {DOMElement|DOMTextNode} root
17146 * @param {number} offset
17147 * @return {?object}
17148 */
17149 function getNodeForCharacterOffset(root, offset) {
17150 var node = getLeafNode(root);
17151 var nodeStart = 0;
17152 var nodeEnd = 0;
17153
17154 while (node) {
17155 if (node.nodeType === 3) {
17156 nodeEnd = nodeStart + node.textContent.length;
17157
17158 if (nodeStart <= offset && nodeEnd >= offset) {
17159 return {
17160 node: node,
17161 offset: offset - nodeStart
17162 };
17163 }
17164
17165 nodeStart = nodeEnd;
17166 }
17167
17168 node = getLeafNode(getSiblingNode(node));
17169 }
17170 }
17171
17172 module.exports = getNodeForCharacterOffset;
17173
17174/***/ }),
17175/* 130 */
17176/***/ (function(module, exports) {
17177
17178 /**
17179 * Copyright 2013-2015, Facebook, Inc.
17180 * All rights reserved.
17181 *
17182 * This source code is licensed under the BSD-style license found in the
17183 * LICENSE file in the root directory of this source tree. An additional grant
17184 * of patent rights can be found in the PATENTS file in the same directory.
17185 *
17186 * @providesModule getActiveElement
17187 * @typechecks
17188 */
17189
17190 /* eslint-disable fb-www/typeof-undefined */
17191
17192 /**
17193 * Same as document.activeElement but wraps in a try-catch block. In IE it is
17194 * not safe to call document.activeElement if there is nothing focused.
17195 *
17196 * The activeElement will be null only if the document or document body is not
17197 * yet defined.
17198 */
17199 'use strict';
17200
17201 function getActiveElement() /*?DOMElement*/{
17202 if (typeof document === 'undefined') {
17203 return null;
17204 }
17205 try {
17206 return document.activeElement || document.body;
17207 } catch (e) {
17208 return document.body;
17209 }
17210 }
17211
17212 module.exports = getActiveElement;
17213
17214/***/ }),
17215/* 131 */
17216/***/ (function(module, exports, __webpack_require__) {
17217
17218 /**
17219 * Copyright 2013-2015, Facebook, Inc.
17220 * All rights reserved.
17221 *
17222 * This source code is licensed under the BSD-style license found in the
17223 * LICENSE file in the root directory of this source tree. An additional grant
17224 * of patent rights can be found in the PATENTS file in the same directory.
17225 *
17226 * @providesModule SelectEventPlugin
17227 */
17228
17229 'use strict';
17230
17231 var EventConstants = __webpack_require__(31);
17232 var EventPropagators = __webpack_require__(74);
17233 var ExecutionEnvironment = __webpack_require__(10);
17234 var ReactInputSelection = __webpack_require__(127);
17235 var SyntheticEvent = __webpack_require__(78);
17236
17237 var getActiveElement = __webpack_require__(130);
17238 var isTextInputElement = __webpack_require__(83);
17239 var keyOf = __webpack_require__(80);
17240 var shallowEqual = __webpack_require__(118);
17241
17242 var topLevelTypes = EventConstants.topLevelTypes;
17243
17244 var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
17245
17246 var eventTypes = {
17247 select: {
17248 phasedRegistrationNames: {
17249 bubbled: keyOf({ onSelect: null }),
17250 captured: keyOf({ onSelectCapture: null })
17251 },
17252 dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
17253 }
17254 };
17255
17256 var activeElement = null;
17257 var activeElementID = null;
17258 var lastSelection = null;
17259 var mouseDown = false;
17260
17261 // Track whether a listener exists for this plugin. If none exist, we do
17262 // not extract events.
17263 var hasListener = false;
17264 var ON_SELECT_KEY = keyOf({ onSelect: null });
17265
17266 /**
17267 * Get an object which is a unique representation of the current selection.
17268 *
17269 * The return value will not be consistent across nodes or browsers, but
17270 * two identical selections on the same node will return identical objects.
17271 *
17272 * @param {DOMElement} node
17273 * @return {object}
17274 */
17275 function getSelection(node) {
17276 if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
17277 return {
17278 start: node.selectionStart,
17279 end: node.selectionEnd
17280 };
17281 } else if (window.getSelection) {
17282 var selection = window.getSelection();
17283 return {
17284 anchorNode: selection.anchorNode,
17285 anchorOffset: selection.anchorOffset,
17286 focusNode: selection.focusNode,
17287 focusOffset: selection.focusOffset
17288 };
17289 } else if (document.selection) {
17290 var range = document.selection.createRange();
17291 return {
17292 parentElement: range.parentElement(),
17293 text: range.text,
17294 top: range.boundingTop,
17295 left: range.boundingLeft
17296 };
17297 }
17298 }
17299
17300 /**
17301 * Poll selection to see whether it's changed.
17302 *
17303 * @param {object} nativeEvent
17304 * @return {?SyntheticEvent}
17305 */
17306 function constructSelectEvent(nativeEvent, nativeEventTarget) {
17307 // Ensure we have the right element, and that the user is not dragging a
17308 // selection (this matches native `select` event behavior). In HTML5, select
17309 // fires only on input and textarea thus if there's no focused element we
17310 // won't dispatch.
17311 if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
17312 return null;
17313 }
17314
17315 // Only fire when selection has actually changed.
17316 var currentSelection = getSelection(activeElement);
17317 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
17318 lastSelection = currentSelection;
17319
17320 var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementID, nativeEvent, nativeEventTarget);
17321
17322 syntheticEvent.type = 'select';
17323 syntheticEvent.target = activeElement;
17324
17325 EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
17326
17327 return syntheticEvent;
17328 }
17329
17330 return null;
17331 }
17332
17333 /**
17334 * This plugin creates an `onSelect` event that normalizes select events
17335 * across form elements.
17336 *
17337 * Supported elements are:
17338 * - input (see `isTextInputElement`)
17339 * - textarea
17340 * - contentEditable
17341 *
17342 * This differs from native browser implementations in the following ways:
17343 * - Fires on contentEditable fields as well as inputs.
17344 * - Fires for collapsed selection.
17345 * - Fires after user input.
17346 */
17347 var SelectEventPlugin = {
17348
17349 eventTypes: eventTypes,
17350
17351 /**
17352 * @param {string} topLevelType Record from `EventConstants`.
17353 * @param {DOMEventTarget} topLevelTarget The listening component root node.
17354 * @param {string} topLevelTargetID ID of `topLevelTarget`.
17355 * @param {object} nativeEvent Native browser event.
17356 * @return {*} An accumulation of synthetic events.
17357 * @see {EventPluginHub.extractEvents}
17358 */
17359 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
17360 if (!hasListener) {
17361 return null;
17362 }
17363
17364 switch (topLevelType) {
17365 // Track the input node that has focus.
17366 case topLevelTypes.topFocus:
17367 if (isTextInputElement(topLevelTarget) || topLevelTarget.contentEditable === 'true') {
17368 activeElement = topLevelTarget;
17369 activeElementID = topLevelTargetID;
17370 lastSelection = null;
17371 }
17372 break;
17373 case topLevelTypes.topBlur:
17374 activeElement = null;
17375 activeElementID = null;
17376 lastSelection = null;
17377 break;
17378
17379 // Don't fire the event while the user is dragging. This matches the
17380 // semantics of the native select event.
17381 case topLevelTypes.topMouseDown:
17382 mouseDown = true;
17383 break;
17384 case topLevelTypes.topContextMenu:
17385 case topLevelTypes.topMouseUp:
17386 mouseDown = false;
17387 return constructSelectEvent(nativeEvent, nativeEventTarget);
17388
17389 // Chrome and IE fire non-standard event when selection is changed (and
17390 // sometimes when it hasn't). IE's event fires out of order with respect
17391 // to key and input events on deletion, so we discard it.
17392 //
17393 // Firefox doesn't support selectionchange, so check selection status
17394 // after each key entry. The selection changes after keydown and before
17395 // keyup, but we check on keydown as well in the case of holding down a
17396 // key, when multiple keydown events are fired but only one keyup is.
17397 // This is also our approach for IE handling, for the reason above.
17398 case topLevelTypes.topSelectionChange:
17399 if (skipSelectionChangeEvent) {
17400 break;
17401 }
17402 // falls through
17403 case topLevelTypes.topKeyDown:
17404 case topLevelTypes.topKeyUp:
17405 return constructSelectEvent(nativeEvent, nativeEventTarget);
17406 }
17407
17408 return null;
17409 },
17410
17411 didPutListener: function (id, registrationName, listener) {
17412 if (registrationName === ON_SELECT_KEY) {
17413 hasListener = true;
17414 }
17415 }
17416 };
17417
17418 module.exports = SelectEventPlugin;
17419
17420/***/ }),
17421/* 132 */
17422/***/ (function(module, exports) {
17423
17424 /**
17425 * Copyright 2013-2015, Facebook, Inc.
17426 * All rights reserved.
17427 *
17428 * This source code is licensed under the BSD-style license found in the
17429 * LICENSE file in the root directory of this source tree. An additional grant
17430 * of patent rights can be found in the PATENTS file in the same directory.
17431 *
17432 * @providesModule ServerReactRootIndex
17433 * @typechecks
17434 */
17435
17436 'use strict';
17437
17438 /**
17439 * Size of the reactRoot ID space. We generate random numbers for React root
17440 * IDs and if there's a collision the events and DOM update system will
17441 * get confused. In the future we need a way to generate GUIDs but for
17442 * now this will work on a smaller scale.
17443 */
17444 var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53);
17445
17446 var ServerReactRootIndex = {
17447 createReactRootIndex: function () {
17448 return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX);
17449 }
17450 };
17451
17452 module.exports = ServerReactRootIndex;
17453
17454/***/ }),
17455/* 133 */
17456/***/ (function(module, exports, __webpack_require__) {
17457
17458 /* WEBPACK VAR INJECTION */(function(process) {/**
17459 * Copyright 2013-2015, Facebook, Inc.
17460 * All rights reserved.
17461 *
17462 * This source code is licensed under the BSD-style license found in the
17463 * LICENSE file in the root directory of this source tree. An additional grant
17464 * of patent rights can be found in the PATENTS file in the same directory.
17465 *
17466 * @providesModule SimpleEventPlugin
17467 */
17468
17469 'use strict';
17470
17471 var EventConstants = __webpack_require__(31);
17472 var EventListener = __webpack_require__(120);
17473 var EventPropagators = __webpack_require__(74);
17474 var ReactMount = __webpack_require__(29);
17475 var SyntheticClipboardEvent = __webpack_require__(134);
17476 var SyntheticEvent = __webpack_require__(78);
17477 var SyntheticFocusEvent = __webpack_require__(135);
17478 var SyntheticKeyboardEvent = __webpack_require__(136);
17479 var SyntheticMouseEvent = __webpack_require__(87);
17480 var SyntheticDragEvent = __webpack_require__(139);
17481 var SyntheticTouchEvent = __webpack_require__(140);
17482 var SyntheticUIEvent = __webpack_require__(88);
17483 var SyntheticWheelEvent = __webpack_require__(141);
17484
17485 var emptyFunction = __webpack_require__(16);
17486 var getEventCharCode = __webpack_require__(137);
17487 var invariant = __webpack_require__(14);
17488 var keyOf = __webpack_require__(80);
17489
17490 var topLevelTypes = EventConstants.topLevelTypes;
17491
17492 var eventTypes = {
17493 abort: {
17494 phasedRegistrationNames: {
17495 bubbled: keyOf({ onAbort: true }),
17496 captured: keyOf({ onAbortCapture: true })
17497 }
17498 },
17499 blur: {
17500 phasedRegistrationNames: {
17501 bubbled: keyOf({ onBlur: true }),
17502 captured: keyOf({ onBlurCapture: true })
17503 }
17504 },
17505 canPlay: {
17506 phasedRegistrationNames: {
17507 bubbled: keyOf({ onCanPlay: true }),
17508 captured: keyOf({ onCanPlayCapture: true })
17509 }
17510 },
17511 canPlayThrough: {
17512 phasedRegistrationNames: {
17513 bubbled: keyOf({ onCanPlayThrough: true }),
17514 captured: keyOf({ onCanPlayThroughCapture: true })
17515 }
17516 },
17517 click: {
17518 phasedRegistrationNames: {
17519 bubbled: keyOf({ onClick: true }),
17520 captured: keyOf({ onClickCapture: true })
17521 }
17522 },
17523 contextMenu: {
17524 phasedRegistrationNames: {
17525 bubbled: keyOf({ onContextMenu: true }),
17526 captured: keyOf({ onContextMenuCapture: true })
17527 }
17528 },
17529 copy: {
17530 phasedRegistrationNames: {
17531 bubbled: keyOf({ onCopy: true }),
17532 captured: keyOf({ onCopyCapture: true })
17533 }
17534 },
17535 cut: {
17536 phasedRegistrationNames: {
17537 bubbled: keyOf({ onCut: true }),
17538 captured: keyOf({ onCutCapture: true })
17539 }
17540 },
17541 doubleClick: {
17542 phasedRegistrationNames: {
17543 bubbled: keyOf({ onDoubleClick: true }),
17544 captured: keyOf({ onDoubleClickCapture: true })
17545 }
17546 },
17547 drag: {
17548 phasedRegistrationNames: {
17549 bubbled: keyOf({ onDrag: true }),
17550 captured: keyOf({ onDragCapture: true })
17551 }
17552 },
17553 dragEnd: {
17554 phasedRegistrationNames: {
17555 bubbled: keyOf({ onDragEnd: true }),
17556 captured: keyOf({ onDragEndCapture: true })
17557 }
17558 },
17559 dragEnter: {
17560 phasedRegistrationNames: {
17561 bubbled: keyOf({ onDragEnter: true }),
17562 captured: keyOf({ onDragEnterCapture: true })
17563 }
17564 },
17565 dragExit: {
17566 phasedRegistrationNames: {
17567 bubbled: keyOf({ onDragExit: true }),
17568 captured: keyOf({ onDragExitCapture: true })
17569 }
17570 },
17571 dragLeave: {
17572 phasedRegistrationNames: {
17573 bubbled: keyOf({ onDragLeave: true }),
17574 captured: keyOf({ onDragLeaveCapture: true })
17575 }
17576 },
17577 dragOver: {
17578 phasedRegistrationNames: {
17579 bubbled: keyOf({ onDragOver: true }),
17580 captured: keyOf({ onDragOverCapture: true })
17581 }
17582 },
17583 dragStart: {
17584 phasedRegistrationNames: {
17585 bubbled: keyOf({ onDragStart: true }),
17586 captured: keyOf({ onDragStartCapture: true })
17587 }
17588 },
17589 drop: {
17590 phasedRegistrationNames: {
17591 bubbled: keyOf({ onDrop: true }),
17592 captured: keyOf({ onDropCapture: true })
17593 }
17594 },
17595 durationChange: {
17596 phasedRegistrationNames: {
17597 bubbled: keyOf({ onDurationChange: true }),
17598 captured: keyOf({ onDurationChangeCapture: true })
17599 }
17600 },
17601 emptied: {
17602 phasedRegistrationNames: {
17603 bubbled: keyOf({ onEmptied: true }),
17604 captured: keyOf({ onEmptiedCapture: true })
17605 }
17606 },
17607 encrypted: {
17608 phasedRegistrationNames: {
17609 bubbled: keyOf({ onEncrypted: true }),
17610 captured: keyOf({ onEncryptedCapture: true })
17611 }
17612 },
17613 ended: {
17614 phasedRegistrationNames: {
17615 bubbled: keyOf({ onEnded: true }),
17616 captured: keyOf({ onEndedCapture: true })
17617 }
17618 },
17619 error: {
17620 phasedRegistrationNames: {
17621 bubbled: keyOf({ onError: true }),
17622 captured: keyOf({ onErrorCapture: true })
17623 }
17624 },
17625 focus: {
17626 phasedRegistrationNames: {
17627 bubbled: keyOf({ onFocus: true }),
17628 captured: keyOf({ onFocusCapture: true })
17629 }
17630 },
17631 input: {
17632 phasedRegistrationNames: {
17633 bubbled: keyOf({ onInput: true }),
17634 captured: keyOf({ onInputCapture: true })
17635 }
17636 },
17637 keyDown: {
17638 phasedRegistrationNames: {
17639 bubbled: keyOf({ onKeyDown: true }),
17640 captured: keyOf({ onKeyDownCapture: true })
17641 }
17642 },
17643 keyPress: {
17644 phasedRegistrationNames: {
17645 bubbled: keyOf({ onKeyPress: true }),
17646 captured: keyOf({ onKeyPressCapture: true })
17647 }
17648 },
17649 keyUp: {
17650 phasedRegistrationNames: {
17651 bubbled: keyOf({ onKeyUp: true }),
17652 captured: keyOf({ onKeyUpCapture: true })
17653 }
17654 },
17655 load: {
17656 phasedRegistrationNames: {
17657 bubbled: keyOf({ onLoad: true }),
17658 captured: keyOf({ onLoadCapture: true })
17659 }
17660 },
17661 loadedData: {
17662 phasedRegistrationNames: {
17663 bubbled: keyOf({ onLoadedData: true }),
17664 captured: keyOf({ onLoadedDataCapture: true })
17665 }
17666 },
17667 loadedMetadata: {
17668 phasedRegistrationNames: {
17669 bubbled: keyOf({ onLoadedMetadata: true }),
17670 captured: keyOf({ onLoadedMetadataCapture: true })
17671 }
17672 },
17673 loadStart: {
17674 phasedRegistrationNames: {
17675 bubbled: keyOf({ onLoadStart: true }),
17676 captured: keyOf({ onLoadStartCapture: true })
17677 }
17678 },
17679 // Note: We do not allow listening to mouseOver events. Instead, use the
17680 // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`.
17681 mouseDown: {
17682 phasedRegistrationNames: {
17683 bubbled: keyOf({ onMouseDown: true }),
17684 captured: keyOf({ onMouseDownCapture: true })
17685 }
17686 },
17687 mouseMove: {
17688 phasedRegistrationNames: {
17689 bubbled: keyOf({ onMouseMove: true }),
17690 captured: keyOf({ onMouseMoveCapture: true })
17691 }
17692 },
17693 mouseOut: {
17694 phasedRegistrationNames: {
17695 bubbled: keyOf({ onMouseOut: true }),
17696 captured: keyOf({ onMouseOutCapture: true })
17697 }
17698 },
17699 mouseOver: {
17700 phasedRegistrationNames: {
17701 bubbled: keyOf({ onMouseOver: true }),
17702 captured: keyOf({ onMouseOverCapture: true })
17703 }
17704 },
17705 mouseUp: {
17706 phasedRegistrationNames: {
17707 bubbled: keyOf({ onMouseUp: true }),
17708 captured: keyOf({ onMouseUpCapture: true })
17709 }
17710 },
17711 paste: {
17712 phasedRegistrationNames: {
17713 bubbled: keyOf({ onPaste: true }),
17714 captured: keyOf({ onPasteCapture: true })
17715 }
17716 },
17717 pause: {
17718 phasedRegistrationNames: {
17719 bubbled: keyOf({ onPause: true }),
17720 captured: keyOf({ onPauseCapture: true })
17721 }
17722 },
17723 play: {
17724 phasedRegistrationNames: {
17725 bubbled: keyOf({ onPlay: true }),
17726 captured: keyOf({ onPlayCapture: true })
17727 }
17728 },
17729 playing: {
17730 phasedRegistrationNames: {
17731 bubbled: keyOf({ onPlaying: true }),
17732 captured: keyOf({ onPlayingCapture: true })
17733 }
17734 },
17735 progress: {
17736 phasedRegistrationNames: {
17737 bubbled: keyOf({ onProgress: true }),
17738 captured: keyOf({ onProgressCapture: true })
17739 }
17740 },
17741 rateChange: {
17742 phasedRegistrationNames: {
17743 bubbled: keyOf({ onRateChange: true }),
17744 captured: keyOf({ onRateChangeCapture: true })
17745 }
17746 },
17747 reset: {
17748 phasedRegistrationNames: {
17749 bubbled: keyOf({ onReset: true }),
17750 captured: keyOf({ onResetCapture: true })
17751 }
17752 },
17753 scroll: {
17754 phasedRegistrationNames: {
17755 bubbled: keyOf({ onScroll: true }),
17756 captured: keyOf({ onScrollCapture: true })
17757 }
17758 },
17759 seeked: {
17760 phasedRegistrationNames: {
17761 bubbled: keyOf({ onSeeked: true }),
17762 captured: keyOf({ onSeekedCapture: true })
17763 }
17764 },
17765 seeking: {
17766 phasedRegistrationNames: {
17767 bubbled: keyOf({ onSeeking: true }),
17768 captured: keyOf({ onSeekingCapture: true })
17769 }
17770 },
17771 stalled: {
17772 phasedRegistrationNames: {
17773 bubbled: keyOf({ onStalled: true }),
17774 captured: keyOf({ onStalledCapture: true })
17775 }
17776 },
17777 submit: {
17778 phasedRegistrationNames: {
17779 bubbled: keyOf({ onSubmit: true }),
17780 captured: keyOf({ onSubmitCapture: true })
17781 }
17782 },
17783 suspend: {
17784 phasedRegistrationNames: {
17785 bubbled: keyOf({ onSuspend: true }),
17786 captured: keyOf({ onSuspendCapture: true })
17787 }
17788 },
17789 timeUpdate: {
17790 phasedRegistrationNames: {
17791 bubbled: keyOf({ onTimeUpdate: true }),
17792 captured: keyOf({ onTimeUpdateCapture: true })
17793 }
17794 },
17795 touchCancel: {
17796 phasedRegistrationNames: {
17797 bubbled: keyOf({ onTouchCancel: true }),
17798 captured: keyOf({ onTouchCancelCapture: true })
17799 }
17800 },
17801 touchEnd: {
17802 phasedRegistrationNames: {
17803 bubbled: keyOf({ onTouchEnd: true }),
17804 captured: keyOf({ onTouchEndCapture: true })
17805 }
17806 },
17807 touchMove: {
17808 phasedRegistrationNames: {
17809 bubbled: keyOf({ onTouchMove: true }),
17810 captured: keyOf({ onTouchMoveCapture: true })
17811 }
17812 },
17813 touchStart: {
17814 phasedRegistrationNames: {
17815 bubbled: keyOf({ onTouchStart: true }),
17816 captured: keyOf({ onTouchStartCapture: true })
17817 }
17818 },
17819 volumeChange: {
17820 phasedRegistrationNames: {
17821 bubbled: keyOf({ onVolumeChange: true }),
17822 captured: keyOf({ onVolumeChangeCapture: true })
17823 }
17824 },
17825 waiting: {
17826 phasedRegistrationNames: {
17827 bubbled: keyOf({ onWaiting: true }),
17828 captured: keyOf({ onWaitingCapture: true })
17829 }
17830 },
17831 wheel: {
17832 phasedRegistrationNames: {
17833 bubbled: keyOf({ onWheel: true }),
17834 captured: keyOf({ onWheelCapture: true })
17835 }
17836 }
17837 };
17838
17839 var topLevelEventsToDispatchConfig = {
17840 topAbort: eventTypes.abort,
17841 topBlur: eventTypes.blur,
17842 topCanPlay: eventTypes.canPlay,
17843 topCanPlayThrough: eventTypes.canPlayThrough,
17844 topClick: eventTypes.click,
17845 topContextMenu: eventTypes.contextMenu,
17846 topCopy: eventTypes.copy,
17847 topCut: eventTypes.cut,
17848 topDoubleClick: eventTypes.doubleClick,
17849 topDrag: eventTypes.drag,
17850 topDragEnd: eventTypes.dragEnd,
17851 topDragEnter: eventTypes.dragEnter,
17852 topDragExit: eventTypes.dragExit,
17853 topDragLeave: eventTypes.dragLeave,
17854 topDragOver: eventTypes.dragOver,
17855 topDragStart: eventTypes.dragStart,
17856 topDrop: eventTypes.drop,
17857 topDurationChange: eventTypes.durationChange,
17858 topEmptied: eventTypes.emptied,
17859 topEncrypted: eventTypes.encrypted,
17860 topEnded: eventTypes.ended,
17861 topError: eventTypes.error,
17862 topFocus: eventTypes.focus,
17863 topInput: eventTypes.input,
17864 topKeyDown: eventTypes.keyDown,
17865 topKeyPress: eventTypes.keyPress,
17866 topKeyUp: eventTypes.keyUp,
17867 topLoad: eventTypes.load,
17868 topLoadedData: eventTypes.loadedData,
17869 topLoadedMetadata: eventTypes.loadedMetadata,
17870 topLoadStart: eventTypes.loadStart,
17871 topMouseDown: eventTypes.mouseDown,
17872 topMouseMove: eventTypes.mouseMove,
17873 topMouseOut: eventTypes.mouseOut,
17874 topMouseOver: eventTypes.mouseOver,
17875 topMouseUp: eventTypes.mouseUp,
17876 topPaste: eventTypes.paste,
17877 topPause: eventTypes.pause,
17878 topPlay: eventTypes.play,
17879 topPlaying: eventTypes.playing,
17880 topProgress: eventTypes.progress,
17881 topRateChange: eventTypes.rateChange,
17882 topReset: eventTypes.reset,
17883 topScroll: eventTypes.scroll,
17884 topSeeked: eventTypes.seeked,
17885 topSeeking: eventTypes.seeking,
17886 topStalled: eventTypes.stalled,
17887 topSubmit: eventTypes.submit,
17888 topSuspend: eventTypes.suspend,
17889 topTimeUpdate: eventTypes.timeUpdate,
17890 topTouchCancel: eventTypes.touchCancel,
17891 topTouchEnd: eventTypes.touchEnd,
17892 topTouchMove: eventTypes.touchMove,
17893 topTouchStart: eventTypes.touchStart,
17894 topVolumeChange: eventTypes.volumeChange,
17895 topWaiting: eventTypes.waiting,
17896 topWheel: eventTypes.wheel
17897 };
17898
17899 for (var type in topLevelEventsToDispatchConfig) {
17900 topLevelEventsToDispatchConfig[type].dependencies = [type];
17901 }
17902
17903 var ON_CLICK_KEY = keyOf({ onClick: null });
17904 var onClickListeners = {};
17905
17906 var SimpleEventPlugin = {
17907
17908 eventTypes: eventTypes,
17909
17910 /**
17911 * @param {string} topLevelType Record from `EventConstants`.
17912 * @param {DOMEventTarget} topLevelTarget The listening component root node.
17913 * @param {string} topLevelTargetID ID of `topLevelTarget`.
17914 * @param {object} nativeEvent Native browser event.
17915 * @return {*} An accumulation of synthetic events.
17916 * @see {EventPluginHub.extractEvents}
17917 */
17918 extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
17919 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
17920 if (!dispatchConfig) {
17921 return null;
17922 }
17923 var EventConstructor;
17924 switch (topLevelType) {
17925 case topLevelTypes.topAbort:
17926 case topLevelTypes.topCanPlay:
17927 case topLevelTypes.topCanPlayThrough:
17928 case topLevelTypes.topDurationChange:
17929 case topLevelTypes.topEmptied:
17930 case topLevelTypes.topEncrypted:
17931 case topLevelTypes.topEnded:
17932 case topLevelTypes.topError:
17933 case topLevelTypes.topInput:
17934 case topLevelTypes.topLoad:
17935 case topLevelTypes.topLoadedData:
17936 case topLevelTypes.topLoadedMetadata:
17937 case topLevelTypes.topLoadStart:
17938 case topLevelTypes.topPause:
17939 case topLevelTypes.topPlay:
17940 case topLevelTypes.topPlaying:
17941 case topLevelTypes.topProgress:
17942 case topLevelTypes.topRateChange:
17943 case topLevelTypes.topReset:
17944 case topLevelTypes.topSeeked:
17945 case topLevelTypes.topSeeking:
17946 case topLevelTypes.topStalled:
17947 case topLevelTypes.topSubmit:
17948 case topLevelTypes.topSuspend:
17949 case topLevelTypes.topTimeUpdate:
17950 case topLevelTypes.topVolumeChange:
17951 case topLevelTypes.topWaiting:
17952 // HTML Events
17953 // @see http://www.w3.org/TR/html5/index.html#events-0
17954 EventConstructor = SyntheticEvent;
17955 break;
17956 case topLevelTypes.topKeyPress:
17957 // FireFox creates a keypress event for function keys too. This removes
17958 // the unwanted keypress events. Enter is however both printable and
17959 // non-printable. One would expect Tab to be as well (but it isn't).
17960 if (getEventCharCode(nativeEvent) === 0) {
17961 return null;
17962 }
17963 /* falls through */
17964 case topLevelTypes.topKeyDown:
17965 case topLevelTypes.topKeyUp:
17966 EventConstructor = SyntheticKeyboardEvent;
17967 break;
17968 case topLevelTypes.topBlur:
17969 case topLevelTypes.topFocus:
17970 EventConstructor = SyntheticFocusEvent;
17971 break;
17972 case topLevelTypes.topClick:
17973 // Firefox creates a click event on right mouse clicks. This removes the
17974 // unwanted click events.
17975 if (nativeEvent.button === 2) {
17976 return null;
17977 }
17978 /* falls through */
17979 case topLevelTypes.topContextMenu:
17980 case topLevelTypes.topDoubleClick:
17981 case topLevelTypes.topMouseDown:
17982 case topLevelTypes.topMouseMove:
17983 case topLevelTypes.topMouseOut:
17984 case topLevelTypes.topMouseOver:
17985 case topLevelTypes.topMouseUp:
17986 EventConstructor = SyntheticMouseEvent;
17987 break;
17988 case topLevelTypes.topDrag:
17989 case topLevelTypes.topDragEnd:
17990 case topLevelTypes.topDragEnter:
17991 case topLevelTypes.topDragExit:
17992 case topLevelTypes.topDragLeave:
17993 case topLevelTypes.topDragOver:
17994 case topLevelTypes.topDragStart:
17995 case topLevelTypes.topDrop:
17996 EventConstructor = SyntheticDragEvent;
17997 break;
17998 case topLevelTypes.topTouchCancel:
17999 case topLevelTypes.topTouchEnd:
18000 case topLevelTypes.topTouchMove:
18001 case topLevelTypes.topTouchStart:
18002 EventConstructor = SyntheticTouchEvent;
18003 break;
18004 case topLevelTypes.topScroll:
18005 EventConstructor = SyntheticUIEvent;
18006 break;
18007 case topLevelTypes.topWheel:
18008 EventConstructor = SyntheticWheelEvent;
18009 break;
18010 case topLevelTypes.topCopy:
18011 case topLevelTypes.topCut:
18012 case topLevelTypes.topPaste:
18013 EventConstructor = SyntheticClipboardEvent;
18014 break;
18015 }
18016 !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : invariant(false) : undefined;
18017 var event = EventConstructor.getPooled(dispatchConfig, topLevelTargetID, nativeEvent, nativeEventTarget);
18018 EventPropagators.accumulateTwoPhaseDispatches(event);
18019 return event;
18020 },
18021
18022 didPutListener: function (id, registrationName, listener) {
18023 // Mobile Safari does not fire properly bubble click events on
18024 // non-interactive elements, which means delegated click listeners do not
18025 // fire. The workaround for this bug involves attaching an empty click
18026 // listener on the target node.
18027 if (registrationName === ON_CLICK_KEY) {
18028 var node = ReactMount.getNode(id);
18029 if (!onClickListeners[id]) {
18030 onClickListeners[id] = EventListener.listen(node, 'click', emptyFunction);
18031 }
18032 }
18033 },
18034
18035 willDeleteListener: function (id, registrationName) {
18036 if (registrationName === ON_CLICK_KEY) {
18037 onClickListeners[id].remove();
18038 delete onClickListeners[id];
18039 }
18040 }
18041
18042 };
18043
18044 module.exports = SimpleEventPlugin;
18045 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
18046
18047/***/ }),
18048/* 134 */
18049/***/ (function(module, exports, __webpack_require__) {
18050
18051 /**
18052 * Copyright 2013-2015, Facebook, Inc.
18053 * All rights reserved.
18054 *
18055 * This source code is licensed under the BSD-style license found in the
18056 * LICENSE file in the root directory of this source tree. An additional grant
18057 * of patent rights can be found in the PATENTS file in the same directory.
18058 *
18059 * @providesModule SyntheticClipboardEvent
18060 * @typechecks static-only
18061 */
18062
18063 'use strict';
18064
18065 var SyntheticEvent = __webpack_require__(78);
18066
18067 /**
18068 * @interface Event
18069 * @see http://www.w3.org/TR/clipboard-apis/
18070 */
18071 var ClipboardEventInterface = {
18072 clipboardData: function (event) {
18073 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
18074 }
18075 };
18076
18077 /**
18078 * @param {object} dispatchConfig Configuration used to dispatch this event.
18079 * @param {string} dispatchMarker Marker identifying the event target.
18080 * @param {object} nativeEvent Native browser event.
18081 * @extends {SyntheticUIEvent}
18082 */
18083 function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18084 SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18085 }
18086
18087 SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
18088
18089 module.exports = SyntheticClipboardEvent;
18090
18091/***/ }),
18092/* 135 */
18093/***/ (function(module, exports, __webpack_require__) {
18094
18095 /**
18096 * Copyright 2013-2015, Facebook, Inc.
18097 * All rights reserved.
18098 *
18099 * This source code is licensed under the BSD-style license found in the
18100 * LICENSE file in the root directory of this source tree. An additional grant
18101 * of patent rights can be found in the PATENTS file in the same directory.
18102 *
18103 * @providesModule SyntheticFocusEvent
18104 * @typechecks static-only
18105 */
18106
18107 'use strict';
18108
18109 var SyntheticUIEvent = __webpack_require__(88);
18110
18111 /**
18112 * @interface FocusEvent
18113 * @see http://www.w3.org/TR/DOM-Level-3-Events/
18114 */
18115 var FocusEventInterface = {
18116 relatedTarget: null
18117 };
18118
18119 /**
18120 * @param {object} dispatchConfig Configuration used to dispatch this event.
18121 * @param {string} dispatchMarker Marker identifying the event target.
18122 * @param {object} nativeEvent Native browser event.
18123 * @extends {SyntheticUIEvent}
18124 */
18125 function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18126 SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18127 }
18128
18129 SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
18130
18131 module.exports = SyntheticFocusEvent;
18132
18133/***/ }),
18134/* 136 */
18135/***/ (function(module, exports, __webpack_require__) {
18136
18137 /**
18138 * Copyright 2013-2015, Facebook, Inc.
18139 * All rights reserved.
18140 *
18141 * This source code is licensed under the BSD-style license found in the
18142 * LICENSE file in the root directory of this source tree. An additional grant
18143 * of patent rights can be found in the PATENTS file in the same directory.
18144 *
18145 * @providesModule SyntheticKeyboardEvent
18146 * @typechecks static-only
18147 */
18148
18149 'use strict';
18150
18151 var SyntheticUIEvent = __webpack_require__(88);
18152
18153 var getEventCharCode = __webpack_require__(137);
18154 var getEventKey = __webpack_require__(138);
18155 var getEventModifierState = __webpack_require__(89);
18156
18157 /**
18158 * @interface KeyboardEvent
18159 * @see http://www.w3.org/TR/DOM-Level-3-Events/
18160 */
18161 var KeyboardEventInterface = {
18162 key: getEventKey,
18163 location: null,
18164 ctrlKey: null,
18165 shiftKey: null,
18166 altKey: null,
18167 metaKey: null,
18168 repeat: null,
18169 locale: null,
18170 getModifierState: getEventModifierState,
18171 // Legacy Interface
18172 charCode: function (event) {
18173 // `charCode` is the result of a KeyPress event and represents the value of
18174 // the actual printable character.
18175
18176 // KeyPress is deprecated, but its replacement is not yet final and not
18177 // implemented in any major browser. Only KeyPress has charCode.
18178 if (event.type === 'keypress') {
18179 return getEventCharCode(event);
18180 }
18181 return 0;
18182 },
18183 keyCode: function (event) {
18184 // `keyCode` is the result of a KeyDown/Up event and represents the value of
18185 // physical keyboard key.
18186
18187 // The actual meaning of the value depends on the users' keyboard layout
18188 // which cannot be detected. Assuming that it is a US keyboard layout
18189 // provides a surprisingly accurate mapping for US and European users.
18190 // Due to this, it is left to the user to implement at this time.
18191 if (event.type === 'keydown' || event.type === 'keyup') {
18192 return event.keyCode;
18193 }
18194 return 0;
18195 },
18196 which: function (event) {
18197 // `which` is an alias for either `keyCode` or `charCode` depending on the
18198 // type of the event.
18199 if (event.type === 'keypress') {
18200 return getEventCharCode(event);
18201 }
18202 if (event.type === 'keydown' || event.type === 'keyup') {
18203 return event.keyCode;
18204 }
18205 return 0;
18206 }
18207 };
18208
18209 /**
18210 * @param {object} dispatchConfig Configuration used to dispatch this event.
18211 * @param {string} dispatchMarker Marker identifying the event target.
18212 * @param {object} nativeEvent Native browser event.
18213 * @extends {SyntheticUIEvent}
18214 */
18215 function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18216 SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18217 }
18218
18219 SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
18220
18221 module.exports = SyntheticKeyboardEvent;
18222
18223/***/ }),
18224/* 137 */
18225/***/ (function(module, exports) {
18226
18227 /**
18228 * Copyright 2013-2015, Facebook, Inc.
18229 * All rights reserved.
18230 *
18231 * This source code is licensed under the BSD-style license found in the
18232 * LICENSE file in the root directory of this source tree. An additional grant
18233 * of patent rights can be found in the PATENTS file in the same directory.
18234 *
18235 * @providesModule getEventCharCode
18236 * @typechecks static-only
18237 */
18238
18239 'use strict';
18240
18241 /**
18242 * `charCode` represents the actual "character code" and is safe to use with
18243 * `String.fromCharCode`. As such, only keys that correspond to printable
18244 * characters produce a valid `charCode`, the only exception to this is Enter.
18245 * The Tab-key is considered non-printable and does not have a `charCode`,
18246 * presumably because it does not produce a tab-character in browsers.
18247 *
18248 * @param {object} nativeEvent Native browser event.
18249 * @return {number} Normalized `charCode` property.
18250 */
18251 function getEventCharCode(nativeEvent) {
18252 var charCode;
18253 var keyCode = nativeEvent.keyCode;
18254
18255 if ('charCode' in nativeEvent) {
18256 charCode = nativeEvent.charCode;
18257
18258 // FF does not set `charCode` for the Enter-key, check against `keyCode`.
18259 if (charCode === 0 && keyCode === 13) {
18260 charCode = 13;
18261 }
18262 } else {
18263 // IE8 does not implement `charCode`, but `keyCode` has the correct value.
18264 charCode = keyCode;
18265 }
18266
18267 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
18268 // Must not discard the (non-)printable Enter-key.
18269 if (charCode >= 32 || charCode === 13) {
18270 return charCode;
18271 }
18272
18273 return 0;
18274 }
18275
18276 module.exports = getEventCharCode;
18277
18278/***/ }),
18279/* 138 */
18280/***/ (function(module, exports, __webpack_require__) {
18281
18282 /**
18283 * Copyright 2013-2015, Facebook, Inc.
18284 * All rights reserved.
18285 *
18286 * This source code is licensed under the BSD-style license found in the
18287 * LICENSE file in the root directory of this source tree. An additional grant
18288 * of patent rights can be found in the PATENTS file in the same directory.
18289 *
18290 * @providesModule getEventKey
18291 * @typechecks static-only
18292 */
18293
18294 'use strict';
18295
18296 var getEventCharCode = __webpack_require__(137);
18297
18298 /**
18299 * Normalization of deprecated HTML5 `key` values
18300 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
18301 */
18302 var normalizeKey = {
18303 'Esc': 'Escape',
18304 'Spacebar': ' ',
18305 'Left': 'ArrowLeft',
18306 'Up': 'ArrowUp',
18307 'Right': 'ArrowRight',
18308 'Down': 'ArrowDown',
18309 'Del': 'Delete',
18310 'Win': 'OS',
18311 'Menu': 'ContextMenu',
18312 'Apps': 'ContextMenu',
18313 'Scroll': 'ScrollLock',
18314 'MozPrintableKey': 'Unidentified'
18315 };
18316
18317 /**
18318 * Translation from legacy `keyCode` to HTML5 `key`
18319 * Only special keys supported, all others depend on keyboard layout or browser
18320 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
18321 */
18322 var translateToKey = {
18323 8: 'Backspace',
18324 9: 'Tab',
18325 12: 'Clear',
18326 13: 'Enter',
18327 16: 'Shift',
18328 17: 'Control',
18329 18: 'Alt',
18330 19: 'Pause',
18331 20: 'CapsLock',
18332 27: 'Escape',
18333 32: ' ',
18334 33: 'PageUp',
18335 34: 'PageDown',
18336 35: 'End',
18337 36: 'Home',
18338 37: 'ArrowLeft',
18339 38: 'ArrowUp',
18340 39: 'ArrowRight',
18341 40: 'ArrowDown',
18342 45: 'Insert',
18343 46: 'Delete',
18344 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
18345 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
18346 144: 'NumLock',
18347 145: 'ScrollLock',
18348 224: 'Meta'
18349 };
18350
18351 /**
18352 * @param {object} nativeEvent Native browser event.
18353 * @return {string} Normalized `key` property.
18354 */
18355 function getEventKey(nativeEvent) {
18356 if (nativeEvent.key) {
18357 // Normalize inconsistent values reported by browsers due to
18358 // implementations of a working draft specification.
18359
18360 // FireFox implements `key` but returns `MozPrintableKey` for all
18361 // printable characters (normalized to `Unidentified`), ignore it.
18362 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
18363 if (key !== 'Unidentified') {
18364 return key;
18365 }
18366 }
18367
18368 // Browser does not implement `key`, polyfill as much of it as we can.
18369 if (nativeEvent.type === 'keypress') {
18370 var charCode = getEventCharCode(nativeEvent);
18371
18372 // The enter-key is technically both printable and non-printable and can
18373 // thus be captured by `keypress`, no other non-printable key should.
18374 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
18375 }
18376 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
18377 // While user keyboard layout determines the actual meaning of each
18378 // `keyCode` value, almost all function keys have a universal value.
18379 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
18380 }
18381 return '';
18382 }
18383
18384 module.exports = getEventKey;
18385
18386/***/ }),
18387/* 139 */
18388/***/ (function(module, exports, __webpack_require__) {
18389
18390 /**
18391 * Copyright 2013-2015, Facebook, Inc.
18392 * All rights reserved.
18393 *
18394 * This source code is licensed under the BSD-style license found in the
18395 * LICENSE file in the root directory of this source tree. An additional grant
18396 * of patent rights can be found in the PATENTS file in the same directory.
18397 *
18398 * @providesModule SyntheticDragEvent
18399 * @typechecks static-only
18400 */
18401
18402 'use strict';
18403
18404 var SyntheticMouseEvent = __webpack_require__(87);
18405
18406 /**
18407 * @interface DragEvent
18408 * @see http://www.w3.org/TR/DOM-Level-3-Events/
18409 */
18410 var DragEventInterface = {
18411 dataTransfer: null
18412 };
18413
18414 /**
18415 * @param {object} dispatchConfig Configuration used to dispatch this event.
18416 * @param {string} dispatchMarker Marker identifying the event target.
18417 * @param {object} nativeEvent Native browser event.
18418 * @extends {SyntheticUIEvent}
18419 */
18420 function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18421 SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18422 }
18423
18424 SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
18425
18426 module.exports = SyntheticDragEvent;
18427
18428/***/ }),
18429/* 140 */
18430/***/ (function(module, exports, __webpack_require__) {
18431
18432 /**
18433 * Copyright 2013-2015, Facebook, Inc.
18434 * All rights reserved.
18435 *
18436 * This source code is licensed under the BSD-style license found in the
18437 * LICENSE file in the root directory of this source tree. An additional grant
18438 * of patent rights can be found in the PATENTS file in the same directory.
18439 *
18440 * @providesModule SyntheticTouchEvent
18441 * @typechecks static-only
18442 */
18443
18444 'use strict';
18445
18446 var SyntheticUIEvent = __webpack_require__(88);
18447
18448 var getEventModifierState = __webpack_require__(89);
18449
18450 /**
18451 * @interface TouchEvent
18452 * @see http://www.w3.org/TR/touch-events/
18453 */
18454 var TouchEventInterface = {
18455 touches: null,
18456 targetTouches: null,
18457 changedTouches: null,
18458 altKey: null,
18459 metaKey: null,
18460 ctrlKey: null,
18461 shiftKey: null,
18462 getModifierState: getEventModifierState
18463 };
18464
18465 /**
18466 * @param {object} dispatchConfig Configuration used to dispatch this event.
18467 * @param {string} dispatchMarker Marker identifying the event target.
18468 * @param {object} nativeEvent Native browser event.
18469 * @extends {SyntheticUIEvent}
18470 */
18471 function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18472 SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18473 }
18474
18475 SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
18476
18477 module.exports = SyntheticTouchEvent;
18478
18479/***/ }),
18480/* 141 */
18481/***/ (function(module, exports, __webpack_require__) {
18482
18483 /**
18484 * Copyright 2013-2015, Facebook, Inc.
18485 * All rights reserved.
18486 *
18487 * This source code is licensed under the BSD-style license found in the
18488 * LICENSE file in the root directory of this source tree. An additional grant
18489 * of patent rights can be found in the PATENTS file in the same directory.
18490 *
18491 * @providesModule SyntheticWheelEvent
18492 * @typechecks static-only
18493 */
18494
18495 'use strict';
18496
18497 var SyntheticMouseEvent = __webpack_require__(87);
18498
18499 /**
18500 * @interface WheelEvent
18501 * @see http://www.w3.org/TR/DOM-Level-3-Events/
18502 */
18503 var WheelEventInterface = {
18504 deltaX: function (event) {
18505 return 'deltaX' in event ? event.deltaX :
18506 // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
18507 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
18508 },
18509 deltaY: function (event) {
18510 return 'deltaY' in event ? event.deltaY :
18511 // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
18512 'wheelDeltaY' in event ? -event.wheelDeltaY :
18513 // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
18514 'wheelDelta' in event ? -event.wheelDelta : 0;
18515 },
18516 deltaZ: null,
18517
18518 // Browsers without "deltaMode" is reporting in raw wheel delta where one
18519 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
18520 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
18521 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
18522 deltaMode: null
18523 };
18524
18525 /**
18526 * @param {object} dispatchConfig Configuration used to dispatch this event.
18527 * @param {string} dispatchMarker Marker identifying the event target.
18528 * @param {object} nativeEvent Native browser event.
18529 * @extends {SyntheticMouseEvent}
18530 */
18531 function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
18532 SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
18533 }
18534
18535 SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
18536
18537 module.exports = SyntheticWheelEvent;
18538
18539/***/ }),
18540/* 142 */
18541/***/ (function(module, exports, __webpack_require__) {
18542
18543 /**
18544 * Copyright 2013-2015, Facebook, Inc.
18545 * All rights reserved.
18546 *
18547 * This source code is licensed under the BSD-style license found in the
18548 * LICENSE file in the root directory of this source tree. An additional grant
18549 * of patent rights can be found in the PATENTS file in the same directory.
18550 *
18551 * @providesModule SVGDOMPropertyConfig
18552 */
18553
18554 'use strict';
18555
18556 var DOMProperty = __webpack_require__(24);
18557
18558 var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
18559
18560 var NS = {
18561 xlink: 'http://www.w3.org/1999/xlink',
18562 xml: 'http://www.w3.org/XML/1998/namespace'
18563 };
18564
18565 var SVGDOMPropertyConfig = {
18566 Properties: {
18567 clipPath: MUST_USE_ATTRIBUTE,
18568 cx: MUST_USE_ATTRIBUTE,
18569 cy: MUST_USE_ATTRIBUTE,
18570 d: MUST_USE_ATTRIBUTE,
18571 dx: MUST_USE_ATTRIBUTE,
18572 dy: MUST_USE_ATTRIBUTE,
18573 fill: MUST_USE_ATTRIBUTE,
18574 fillOpacity: MUST_USE_ATTRIBUTE,
18575 fontFamily: MUST_USE_ATTRIBUTE,
18576 fontSize: MUST_USE_ATTRIBUTE,
18577 fx: MUST_USE_ATTRIBUTE,
18578 fy: MUST_USE_ATTRIBUTE,
18579 gradientTransform: MUST_USE_ATTRIBUTE,
18580 gradientUnits: MUST_USE_ATTRIBUTE,
18581 markerEnd: MUST_USE_ATTRIBUTE,
18582 markerMid: MUST_USE_ATTRIBUTE,
18583 markerStart: MUST_USE_ATTRIBUTE,
18584 offset: MUST_USE_ATTRIBUTE,
18585 opacity: MUST_USE_ATTRIBUTE,
18586 patternContentUnits: MUST_USE_ATTRIBUTE,
18587 patternUnits: MUST_USE_ATTRIBUTE,
18588 points: MUST_USE_ATTRIBUTE,
18589 preserveAspectRatio: MUST_USE_ATTRIBUTE,
18590 r: MUST_USE_ATTRIBUTE,
18591 rx: MUST_USE_ATTRIBUTE,
18592 ry: MUST_USE_ATTRIBUTE,
18593 spreadMethod: MUST_USE_ATTRIBUTE,
18594 stopColor: MUST_USE_ATTRIBUTE,
18595 stopOpacity: MUST_USE_ATTRIBUTE,
18596 stroke: MUST_USE_ATTRIBUTE,
18597 strokeDasharray: MUST_USE_ATTRIBUTE,
18598 strokeLinecap: MUST_USE_ATTRIBUTE,
18599 strokeOpacity: MUST_USE_ATTRIBUTE,
18600 strokeWidth: MUST_USE_ATTRIBUTE,
18601 textAnchor: MUST_USE_ATTRIBUTE,
18602 transform: MUST_USE_ATTRIBUTE,
18603 version: MUST_USE_ATTRIBUTE,
18604 viewBox: MUST_USE_ATTRIBUTE,
18605 x1: MUST_USE_ATTRIBUTE,
18606 x2: MUST_USE_ATTRIBUTE,
18607 x: MUST_USE_ATTRIBUTE,
18608 xlinkActuate: MUST_USE_ATTRIBUTE,
18609 xlinkArcrole: MUST_USE_ATTRIBUTE,
18610 xlinkHref: MUST_USE_ATTRIBUTE,
18611 xlinkRole: MUST_USE_ATTRIBUTE,
18612 xlinkShow: MUST_USE_ATTRIBUTE,
18613 xlinkTitle: MUST_USE_ATTRIBUTE,
18614 xlinkType: MUST_USE_ATTRIBUTE,
18615 xmlBase: MUST_USE_ATTRIBUTE,
18616 xmlLang: MUST_USE_ATTRIBUTE,
18617 xmlSpace: MUST_USE_ATTRIBUTE,
18618 y1: MUST_USE_ATTRIBUTE,
18619 y2: MUST_USE_ATTRIBUTE,
18620 y: MUST_USE_ATTRIBUTE
18621 },
18622 DOMAttributeNamespaces: {
18623 xlinkActuate: NS.xlink,
18624 xlinkArcrole: NS.xlink,
18625 xlinkHref: NS.xlink,
18626 xlinkRole: NS.xlink,
18627 xlinkShow: NS.xlink,
18628 xlinkTitle: NS.xlink,
18629 xlinkType: NS.xlink,
18630 xmlBase: NS.xml,
18631 xmlLang: NS.xml,
18632 xmlSpace: NS.xml
18633 },
18634 DOMAttributeNames: {
18635 clipPath: 'clip-path',
18636 fillOpacity: 'fill-opacity',
18637 fontFamily: 'font-family',
18638 fontSize: 'font-size',
18639 gradientTransform: 'gradientTransform',
18640 gradientUnits: 'gradientUnits',
18641 markerEnd: 'marker-end',
18642 markerMid: 'marker-mid',
18643 markerStart: 'marker-start',
18644 patternContentUnits: 'patternContentUnits',
18645 patternUnits: 'patternUnits',
18646 preserveAspectRatio: 'preserveAspectRatio',
18647 spreadMethod: 'spreadMethod',
18648 stopColor: 'stop-color',
18649 stopOpacity: 'stop-opacity',
18650 strokeDasharray: 'stroke-dasharray',
18651 strokeLinecap: 'stroke-linecap',
18652 strokeOpacity: 'stroke-opacity',
18653 strokeWidth: 'stroke-width',
18654 textAnchor: 'text-anchor',
18655 viewBox: 'viewBox',
18656 xlinkActuate: 'xlink:actuate',
18657 xlinkArcrole: 'xlink:arcrole',
18658 xlinkHref: 'xlink:href',
18659 xlinkRole: 'xlink:role',
18660 xlinkShow: 'xlink:show',
18661 xlinkTitle: 'xlink:title',
18662 xlinkType: 'xlink:type',
18663 xmlBase: 'xml:base',
18664 xmlLang: 'xml:lang',
18665 xmlSpace: 'xml:space'
18666 }
18667 };
18668
18669 module.exports = SVGDOMPropertyConfig;
18670
18671/***/ }),
18672/* 143 */
18673/***/ (function(module, exports, __webpack_require__) {
18674
18675 /**
18676 * Copyright 2013-2015, Facebook, Inc.
18677 * All rights reserved.
18678 *
18679 * This source code is licensed under the BSD-style license found in the
18680 * LICENSE file in the root directory of this source tree. An additional grant
18681 * of patent rights can be found in the PATENTS file in the same directory.
18682 *
18683 * @providesModule ReactDefaultPerf
18684 * @typechecks static-only
18685 */
18686
18687 'use strict';
18688
18689 var DOMProperty = __webpack_require__(24);
18690 var ReactDefaultPerfAnalysis = __webpack_require__(144);
18691 var ReactMount = __webpack_require__(29);
18692 var ReactPerf = __webpack_require__(19);
18693
18694 var performanceNow = __webpack_require__(145);
18695
18696 function roundFloat(val) {
18697 return Math.floor(val * 100) / 100;
18698 }
18699
18700 function addValue(obj, key, val) {
18701 obj[key] = (obj[key] || 0) + val;
18702 }
18703
18704 var ReactDefaultPerf = {
18705 _allMeasurements: [], // last item in the list is the current one
18706 _mountStack: [0],
18707 _injected: false,
18708
18709 start: function () {
18710 if (!ReactDefaultPerf._injected) {
18711 ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);
18712 }
18713
18714 ReactDefaultPerf._allMeasurements.length = 0;
18715 ReactPerf.enableMeasure = true;
18716 },
18717
18718 stop: function () {
18719 ReactPerf.enableMeasure = false;
18720 },
18721
18722 getLastMeasurements: function () {
18723 return ReactDefaultPerf._allMeasurements;
18724 },
18725
18726 printExclusive: function (measurements) {
18727 measurements = measurements || ReactDefaultPerf._allMeasurements;
18728 var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);
18729 console.table(summary.map(function (item) {
18730 return {
18731 'Component class name': item.componentName,
18732 'Total inclusive time (ms)': roundFloat(item.inclusive),
18733 'Exclusive mount time (ms)': roundFloat(item.exclusive),
18734 'Exclusive render time (ms)': roundFloat(item.render),
18735 'Mount time per instance (ms)': roundFloat(item.exclusive / item.count),
18736 'Render time per instance (ms)': roundFloat(item.render / item.count),
18737 'Instances': item.count
18738 };
18739 }));
18740 // TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct
18741 // number.
18742 },
18743
18744 printInclusive: function (measurements) {
18745 measurements = measurements || ReactDefaultPerf._allMeasurements;
18746 var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);
18747 console.table(summary.map(function (item) {
18748 return {
18749 'Owner > component': item.componentName,
18750 'Inclusive time (ms)': roundFloat(item.time),
18751 'Instances': item.count
18752 };
18753 }));
18754 console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
18755 },
18756
18757 getMeasurementsSummaryMap: function (measurements) {
18758 var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements, true);
18759 return summary.map(function (item) {
18760 return {
18761 'Owner > component': item.componentName,
18762 'Wasted time (ms)': item.time,
18763 'Instances': item.count
18764 };
18765 });
18766 },
18767
18768 printWasted: function (measurements) {
18769 measurements = measurements || ReactDefaultPerf._allMeasurements;
18770 console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));
18771 console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
18772 },
18773
18774 printDOM: function (measurements) {
18775 measurements = measurements || ReactDefaultPerf._allMeasurements;
18776 var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements);
18777 console.table(summary.map(function (item) {
18778 var result = {};
18779 result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id;
18780 result.type = item.type;
18781 result.args = JSON.stringify(item.args);
18782 return result;
18783 }));
18784 console.log('Total time:', ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms');
18785 },
18786
18787 _recordWrite: function (id, fnName, totalTime, args) {
18788 // TODO: totalTime isn't that useful since it doesn't count paints/reflows
18789 var writes = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].writes;
18790 writes[id] = writes[id] || [];
18791 writes[id].push({
18792 type: fnName,
18793 time: totalTime,
18794 args: args
18795 });
18796 },
18797
18798 measure: function (moduleName, fnName, func) {
18799 return function () {
18800 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
18801 args[_key] = arguments[_key];
18802 }
18803
18804 var totalTime;
18805 var rv;
18806 var start;
18807
18808 if (fnName === '_renderNewRootComponent' || fnName === 'flushBatchedUpdates') {
18809 // A "measurement" is a set of metrics recorded for each flush. We want
18810 // to group the metrics for a given flush together so we can look at the
18811 // components that rendered and the DOM operations that actually
18812 // happened to determine the amount of "wasted work" performed.
18813 ReactDefaultPerf._allMeasurements.push({
18814 exclusive: {},
18815 inclusive: {},
18816 render: {},
18817 counts: {},
18818 writes: {},
18819 displayNames: {},
18820 totalTime: 0,
18821 created: {}
18822 });
18823 start = performanceNow();
18824 rv = func.apply(this, args);
18825 ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1].totalTime = performanceNow() - start;
18826 return rv;
18827 } else if (fnName === '_mountImageIntoNode' || moduleName === 'ReactBrowserEventEmitter' || moduleName === 'ReactDOMIDOperations' || moduleName === 'CSSPropertyOperations' || moduleName === 'DOMChildrenOperations' || moduleName === 'DOMPropertyOperations') {
18828 start = performanceNow();
18829 rv = func.apply(this, args);
18830 totalTime = performanceNow() - start;
18831
18832 if (fnName === '_mountImageIntoNode') {
18833 var mountID = ReactMount.getID(args[1]);
18834 ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]);
18835 } else if (fnName === 'dangerouslyProcessChildrenUpdates') {
18836 // special format
18837 args[0].forEach(function (update) {
18838 var writeArgs = {};
18839 if (update.fromIndex !== null) {
18840 writeArgs.fromIndex = update.fromIndex;
18841 }
18842 if (update.toIndex !== null) {
18843 writeArgs.toIndex = update.toIndex;
18844 }
18845 if (update.textContent !== null) {
18846 writeArgs.textContent = update.textContent;
18847 }
18848 if (update.markupIndex !== null) {
18849 writeArgs.markup = args[1][update.markupIndex];
18850 }
18851 ReactDefaultPerf._recordWrite(update.parentID, update.type, totalTime, writeArgs);
18852 });
18853 } else {
18854 // basic format
18855 var id = args[0];
18856 if (typeof id === 'object') {
18857 id = ReactMount.getID(args[0]);
18858 }
18859 ReactDefaultPerf._recordWrite(id, fnName, totalTime, Array.prototype.slice.call(args, 1));
18860 }
18861 return rv;
18862 } else if (moduleName === 'ReactCompositeComponent' && (fnName === 'mountComponent' || fnName === 'updateComponent' || // TODO: receiveComponent()?
18863 fnName === '_renderValidatedComponent')) {
18864
18865 if (this._currentElement.type === ReactMount.TopLevelWrapper) {
18866 return func.apply(this, args);
18867 }
18868
18869 var rootNodeID = fnName === 'mountComponent' ? args[0] : this._rootNodeID;
18870 var isRender = fnName === '_renderValidatedComponent';
18871 var isMount = fnName === 'mountComponent';
18872
18873 var mountStack = ReactDefaultPerf._mountStack;
18874 var entry = ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1];
18875
18876 if (isRender) {
18877 addValue(entry.counts, rootNodeID, 1);
18878 } else if (isMount) {
18879 entry.created[rootNodeID] = true;
18880 mountStack.push(0);
18881 }
18882
18883 start = performanceNow();
18884 rv = func.apply(this, args);
18885 totalTime = performanceNow() - start;
18886
18887 if (isRender) {
18888 addValue(entry.render, rootNodeID, totalTime);
18889 } else if (isMount) {
18890 var subMountTime = mountStack.pop();
18891 mountStack[mountStack.length - 1] += totalTime;
18892 addValue(entry.exclusive, rootNodeID, totalTime - subMountTime);
18893 addValue(entry.inclusive, rootNodeID, totalTime);
18894 } else {
18895 addValue(entry.inclusive, rootNodeID, totalTime);
18896 }
18897
18898 entry.displayNames[rootNodeID] = {
18899 current: this.getName(),
18900 owner: this._currentElement._owner ? this._currentElement._owner.getName() : '<root>'
18901 };
18902
18903 return rv;
18904 } else {
18905 return func.apply(this, args);
18906 }
18907 };
18908 }
18909 };
18910
18911 module.exports = ReactDefaultPerf;
18912
18913/***/ }),
18914/* 144 */
18915/***/ (function(module, exports, __webpack_require__) {
18916
18917 /**
18918 * Copyright 2013-2015, Facebook, Inc.
18919 * All rights reserved.
18920 *
18921 * This source code is licensed under the BSD-style license found in the
18922 * LICENSE file in the root directory of this source tree. An additional grant
18923 * of patent rights can be found in the PATENTS file in the same directory.
18924 *
18925 * @providesModule ReactDefaultPerfAnalysis
18926 */
18927
18928 'use strict';
18929
18930 var assign = __webpack_require__(40);
18931
18932 // Don't try to save users less than 1.2ms (a number I made up)
18933 var DONT_CARE_THRESHOLD = 1.2;
18934 var DOM_OPERATION_TYPES = {
18935 '_mountImageIntoNode': 'set innerHTML',
18936 INSERT_MARKUP: 'set innerHTML',
18937 MOVE_EXISTING: 'move',
18938 REMOVE_NODE: 'remove',
18939 SET_MARKUP: 'set innerHTML',
18940 TEXT_CONTENT: 'set textContent',
18941 'setValueForProperty': 'update attribute',
18942 'setValueForAttribute': 'update attribute',
18943 'deleteValueForProperty': 'remove attribute',
18944 'setValueForStyles': 'update styles',
18945 'replaceNodeWithMarkup': 'replace',
18946 'updateTextContent': 'set textContent'
18947 };
18948
18949 function getTotalTime(measurements) {
18950 // TODO: return number of DOM ops? could be misleading.
18951 // TODO: measure dropped frames after reconcile?
18952 // TODO: log total time of each reconcile and the top-level component
18953 // class that triggered it.
18954 var totalTime = 0;
18955 for (var i = 0; i < measurements.length; i++) {
18956 var measurement = measurements[i];
18957 totalTime += measurement.totalTime;
18958 }
18959 return totalTime;
18960 }
18961
18962 function getDOMSummary(measurements) {
18963 var items = [];
18964 measurements.forEach(function (measurement) {
18965 Object.keys(measurement.writes).forEach(function (id) {
18966 measurement.writes[id].forEach(function (write) {
18967 items.push({
18968 id: id,
18969 type: DOM_OPERATION_TYPES[write.type] || write.type,
18970 args: write.args
18971 });
18972 });
18973 });
18974 });
18975 return items;
18976 }
18977
18978 function getExclusiveSummary(measurements) {
18979 var candidates = {};
18980 var displayName;
18981
18982 for (var i = 0; i < measurements.length; i++) {
18983 var measurement = measurements[i];
18984 var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
18985
18986 for (var id in allIDs) {
18987 displayName = measurement.displayNames[id].current;
18988
18989 candidates[displayName] = candidates[displayName] || {
18990 componentName: displayName,
18991 inclusive: 0,
18992 exclusive: 0,
18993 render: 0,
18994 count: 0
18995 };
18996 if (measurement.render[id]) {
18997 candidates[displayName].render += measurement.render[id];
18998 }
18999 if (measurement.exclusive[id]) {
19000 candidates[displayName].exclusive += measurement.exclusive[id];
19001 }
19002 if (measurement.inclusive[id]) {
19003 candidates[displayName].inclusive += measurement.inclusive[id];
19004 }
19005 if (measurement.counts[id]) {
19006 candidates[displayName].count += measurement.counts[id];
19007 }
19008 }
19009 }
19010
19011 // Now make a sorted array with the results.
19012 var arr = [];
19013 for (displayName in candidates) {
19014 if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) {
19015 arr.push(candidates[displayName]);
19016 }
19017 }
19018
19019 arr.sort(function (a, b) {
19020 return b.exclusive - a.exclusive;
19021 });
19022
19023 return arr;
19024 }
19025
19026 function getInclusiveSummary(measurements, onlyClean) {
19027 var candidates = {};
19028 var inclusiveKey;
19029
19030 for (var i = 0; i < measurements.length; i++) {
19031 var measurement = measurements[i];
19032 var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
19033 var cleanComponents;
19034
19035 if (onlyClean) {
19036 cleanComponents = getUnchangedComponents(measurement);
19037 }
19038
19039 for (var id in allIDs) {
19040 if (onlyClean && !cleanComponents[id]) {
19041 continue;
19042 }
19043
19044 var displayName = measurement.displayNames[id];
19045
19046 // Inclusive time is not useful for many components without knowing where
19047 // they are instantiated. So we aggregate inclusive time with both the
19048 // owner and current displayName as the key.
19049 inclusiveKey = displayName.owner + ' > ' + displayName.current;
19050
19051 candidates[inclusiveKey] = candidates[inclusiveKey] || {
19052 componentName: inclusiveKey,
19053 time: 0,
19054 count: 0
19055 };
19056
19057 if (measurement.inclusive[id]) {
19058 candidates[inclusiveKey].time += measurement.inclusive[id];
19059 }
19060 if (measurement.counts[id]) {
19061 candidates[inclusiveKey].count += measurement.counts[id];
19062 }
19063 }
19064 }
19065
19066 // Now make a sorted array with the results.
19067 var arr = [];
19068 for (inclusiveKey in candidates) {
19069 if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) {
19070 arr.push(candidates[inclusiveKey]);
19071 }
19072 }
19073
19074 arr.sort(function (a, b) {
19075 return b.time - a.time;
19076 });
19077
19078 return arr;
19079 }
19080
19081 function getUnchangedComponents(measurement) {
19082 // For a given reconcile, look at which components did not actually
19083 // render anything to the DOM and return a mapping of their ID to
19084 // the amount of time it took to render the entire subtree.
19085 var cleanComponents = {};
19086 var dirtyLeafIDs = Object.keys(measurement.writes);
19087 var allIDs = assign({}, measurement.exclusive, measurement.inclusive);
19088
19089 for (var id in allIDs) {
19090 var isDirty = false;
19091 // For each component that rendered, see if a component that triggered
19092 // a DOM op is in its subtree.
19093 for (var i = 0; i < dirtyLeafIDs.length; i++) {
19094 if (dirtyLeafIDs[i].indexOf(id) === 0) {
19095 isDirty = true;
19096 break;
19097 }
19098 }
19099 // check if component newly created
19100 if (measurement.created[id]) {
19101 isDirty = true;
19102 }
19103 if (!isDirty && measurement.counts[id] > 0) {
19104 cleanComponents[id] = true;
19105 }
19106 }
19107 return cleanComponents;
19108 }
19109
19110 var ReactDefaultPerfAnalysis = {
19111 getExclusiveSummary: getExclusiveSummary,
19112 getInclusiveSummary: getInclusiveSummary,
19113 getDOMSummary: getDOMSummary,
19114 getTotalTime: getTotalTime
19115 };
19116
19117 module.exports = ReactDefaultPerfAnalysis;
19118
19119/***/ }),
19120/* 145 */
19121/***/ (function(module, exports, __webpack_require__) {
19122
19123 /**
19124 * Copyright 2013-2015, Facebook, Inc.
19125 * All rights reserved.
19126 *
19127 * This source code is licensed under the BSD-style license found in the
19128 * LICENSE file in the root directory of this source tree. An additional grant
19129 * of patent rights can be found in the PATENTS file in the same directory.
19130 *
19131 * @providesModule performanceNow
19132 * @typechecks
19133 */
19134
19135 'use strict';
19136
19137 var performance = __webpack_require__(146);
19138
19139 var performanceNow;
19140
19141 /**
19142 * Detect if we can use `window.performance.now()` and gracefully fallback to
19143 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
19144 * because of Facebook's testing infrastructure.
19145 */
19146 if (performance.now) {
19147 performanceNow = function () {
19148 return performance.now();
19149 };
19150 } else {
19151 performanceNow = function () {
19152 return Date.now();
19153 };
19154 }
19155
19156 module.exports = performanceNow;
19157
19158/***/ }),
19159/* 146 */
19160/***/ (function(module, exports, __webpack_require__) {
19161
19162 /**
19163 * Copyright 2013-2015, Facebook, Inc.
19164 * All rights reserved.
19165 *
19166 * This source code is licensed under the BSD-style license found in the
19167 * LICENSE file in the root directory of this source tree. An additional grant
19168 * of patent rights can be found in the PATENTS file in the same directory.
19169 *
19170 * @providesModule performance
19171 * @typechecks
19172 */
19173
19174 'use strict';
19175
19176 var ExecutionEnvironment = __webpack_require__(10);
19177
19178 var performance;
19179
19180 if (ExecutionEnvironment.canUseDOM) {
19181 performance = window.performance || window.msPerformance || window.webkitPerformance;
19182 }
19183
19184 module.exports = performance || {};
19185
19186/***/ }),
19187/* 147 */
19188/***/ (function(module, exports) {
19189
19190 /**
19191 * Copyright 2013-2015, Facebook, Inc.
19192 * All rights reserved.
19193 *
19194 * This source code is licensed under the BSD-style license found in the
19195 * LICENSE file in the root directory of this source tree. An additional grant
19196 * of patent rights can be found in the PATENTS file in the same directory.
19197 *
19198 * @providesModule ReactVersion
19199 */
19200
19201 'use strict';
19202
19203 module.exports = '0.14.9';
19204
19205/***/ }),
19206/* 148 */
19207/***/ (function(module, exports, __webpack_require__) {
19208
19209 /**
19210 * Copyright 2013-2015, Facebook, Inc.
19211 * All rights reserved.
19212 *
19213 * This source code is licensed under the BSD-style license found in the
19214 * LICENSE file in the root directory of this source tree. An additional grant
19215 * of patent rights can be found in the PATENTS file in the same directory.
19216 *
19217 * @providesModule renderSubtreeIntoContainer
19218 */
19219
19220 'use strict';
19221
19222 var ReactMount = __webpack_require__(29);
19223
19224 module.exports = ReactMount.renderSubtreeIntoContainer;
19225
19226/***/ }),
19227/* 149 */
19228/***/ (function(module, exports, __webpack_require__) {
19229
19230 /**
19231 * Copyright 2013-2015, Facebook, Inc.
19232 * All rights reserved.
19233 *
19234 * This source code is licensed under the BSD-style license found in the
19235 * LICENSE file in the root directory of this source tree. An additional grant
19236 * of patent rights can be found in the PATENTS file in the same directory.
19237 *
19238 * @providesModule ReactDOMServer
19239 */
19240
19241 'use strict';
19242
19243 var ReactDefaultInjection = __webpack_require__(72);
19244 var ReactServerRendering = __webpack_require__(150);
19245 var ReactVersion = __webpack_require__(147);
19246
19247 ReactDefaultInjection.inject();
19248
19249 var ReactDOMServer = {
19250 renderToString: ReactServerRendering.renderToString,
19251 renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
19252 version: ReactVersion
19253 };
19254
19255 module.exports = ReactDOMServer;
19256
19257/***/ }),
19258/* 150 */
19259/***/ (function(module, exports, __webpack_require__) {
19260
19261 /* WEBPACK VAR INJECTION */(function(process) {/**
19262 * Copyright 2013-2015, Facebook, Inc.
19263 * All rights reserved.
19264 *
19265 * This source code is licensed under the BSD-style license found in the
19266 * LICENSE file in the root directory of this source tree. An additional grant
19267 * of patent rights can be found in the PATENTS file in the same directory.
19268 *
19269 * @typechecks static-only
19270 * @providesModule ReactServerRendering
19271 */
19272 'use strict';
19273
19274 var ReactDefaultBatchingStrategy = __webpack_require__(93);
19275 var ReactElement = __webpack_require__(43);
19276 var ReactInstanceHandles = __webpack_require__(46);
19277 var ReactMarkupChecksum = __webpack_require__(49);
19278 var ReactServerBatchingStrategy = __webpack_require__(151);
19279 var ReactServerRenderingTransaction = __webpack_require__(152);
19280 var ReactUpdates = __webpack_require__(55);
19281
19282 var emptyObject = __webpack_require__(59);
19283 var instantiateReactComponent = __webpack_require__(63);
19284 var invariant = __webpack_require__(14);
19285
19286 /**
19287 * @param {ReactElement} element
19288 * @return {string} the HTML markup
19289 */
19290 function renderToString(element) {
19291 !ReactElement.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToString(): You must pass a valid ReactElement.') : invariant(false) : undefined;
19292
19293 var transaction;
19294 try {
19295 ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
19296
19297 var id = ReactInstanceHandles.createReactRootID();
19298 transaction = ReactServerRenderingTransaction.getPooled(false);
19299
19300 return transaction.perform(function () {
19301 var componentInstance = instantiateReactComponent(element, null);
19302 var markup = componentInstance.mountComponent(id, transaction, emptyObject);
19303 return ReactMarkupChecksum.addChecksumToMarkup(markup);
19304 }, null);
19305 } finally {
19306 ReactServerRenderingTransaction.release(transaction);
19307 // Revert to the DOM batching strategy since these two renderers
19308 // currently share these stateful modules.
19309 ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
19310 }
19311 }
19312
19313 /**
19314 * @param {ReactElement} element
19315 * @return {string} the HTML markup, without the extra React ID and checksum
19316 * (for generating static pages)
19317 */
19318 function renderToStaticMarkup(element) {
19319 !ReactElement.isValidElement(element) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'renderToStaticMarkup(): You must pass a valid ReactElement.') : invariant(false) : undefined;
19320
19321 var transaction;
19322 try {
19323 ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);
19324
19325 var id = ReactInstanceHandles.createReactRootID();
19326 transaction = ReactServerRenderingTransaction.getPooled(true);
19327
19328 return transaction.perform(function () {
19329 var componentInstance = instantiateReactComponent(element, null);
19330 return componentInstance.mountComponent(id, transaction, emptyObject);
19331 }, null);
19332 } finally {
19333 ReactServerRenderingTransaction.release(transaction);
19334 // Revert to the DOM batching strategy since these two renderers
19335 // currently share these stateful modules.
19336 ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy);
19337 }
19338 }
19339
19340 module.exports = {
19341 renderToString: renderToString,
19342 renderToStaticMarkup: renderToStaticMarkup
19343 };
19344 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
19345
19346/***/ }),
19347/* 151 */
19348/***/ (function(module, exports) {
19349
19350 /**
19351 * Copyright 2014-2015, Facebook, Inc.
19352 * All rights reserved.
19353 *
19354 * This source code is licensed under the BSD-style license found in the
19355 * LICENSE file in the root directory of this source tree. An additional grant
19356 * of patent rights can be found in the PATENTS file in the same directory.
19357 *
19358 * @providesModule ReactServerBatchingStrategy
19359 * @typechecks
19360 */
19361
19362 'use strict';
19363
19364 var ReactServerBatchingStrategy = {
19365 isBatchingUpdates: false,
19366 batchedUpdates: function (callback) {
19367 // Don't do anything here. During the server rendering we don't want to
19368 // schedule any updates. We will simply ignore them.
19369 }
19370 };
19371
19372 module.exports = ReactServerBatchingStrategy;
19373
19374/***/ }),
19375/* 152 */
19376/***/ (function(module, exports, __webpack_require__) {
19377
19378 /**
19379 * Copyright 2014-2015, Facebook, Inc.
19380 * All rights reserved.
19381 *
19382 * This source code is licensed under the BSD-style license found in the
19383 * LICENSE file in the root directory of this source tree. An additional grant
19384 * of patent rights can be found in the PATENTS file in the same directory.
19385 *
19386 * @providesModule ReactServerRenderingTransaction
19387 * @typechecks
19388 */
19389
19390 'use strict';
19391
19392 var PooledClass = __webpack_require__(57);
19393 var CallbackQueue = __webpack_require__(56);
19394 var Transaction = __webpack_require__(58);
19395
19396 var assign = __webpack_require__(40);
19397 var emptyFunction = __webpack_require__(16);
19398
19399 /**
19400 * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks
19401 * during the performing of the transaction.
19402 */
19403 var ON_DOM_READY_QUEUEING = {
19404 /**
19405 * Initializes the internal `onDOMReady` queue.
19406 */
19407 initialize: function () {
19408 this.reactMountReady.reset();
19409 },
19410
19411 close: emptyFunction
19412 };
19413
19414 /**
19415 * Executed within the scope of the `Transaction` instance. Consider these as
19416 * being member methods, but with an implied ordering while being isolated from
19417 * each other.
19418 */
19419 var TRANSACTION_WRAPPERS = [ON_DOM_READY_QUEUEING];
19420
19421 /**
19422 * @class ReactServerRenderingTransaction
19423 * @param {boolean} renderToStaticMarkup
19424 */
19425 function ReactServerRenderingTransaction(renderToStaticMarkup) {
19426 this.reinitializeTransaction();
19427 this.renderToStaticMarkup = renderToStaticMarkup;
19428 this.reactMountReady = CallbackQueue.getPooled(null);
19429 this.useCreateElement = false;
19430 }
19431
19432 var Mixin = {
19433 /**
19434 * @see Transaction
19435 * @abstract
19436 * @final
19437 * @return {array} Empty list of operation wrap procedures.
19438 */
19439 getTransactionWrappers: function () {
19440 return TRANSACTION_WRAPPERS;
19441 },
19442
19443 /**
19444 * @return {object} The queue to collect `onDOMReady` callbacks with.
19445 */
19446 getReactMountReady: function () {
19447 return this.reactMountReady;
19448 },
19449
19450 /**
19451 * `PooledClass` looks for this, and will invoke this before allowing this
19452 * instance to be reused.
19453 */
19454 destructor: function () {
19455 CallbackQueue.release(this.reactMountReady);
19456 this.reactMountReady = null;
19457 }
19458 };
19459
19460 assign(ReactServerRenderingTransaction.prototype, Transaction.Mixin, Mixin);
19461
19462 PooledClass.addPoolingTo(ReactServerRenderingTransaction);
19463
19464 module.exports = ReactServerRenderingTransaction;
19465
19466/***/ }),
19467/* 153 */
19468/***/ (function(module, exports, __webpack_require__) {
19469
19470 /* WEBPACK VAR INJECTION */(function(process) {/**
19471 * Copyright 2013-2015, Facebook, Inc.
19472 * All rights reserved.
19473 *
19474 * This source code is licensed under the BSD-style license found in the
19475 * LICENSE file in the root directory of this source tree. An additional grant
19476 * of patent rights can be found in the PATENTS file in the same directory.
19477 *
19478 * @providesModule ReactIsomorphic
19479 */
19480
19481 'use strict';
19482
19483 var ReactChildren = __webpack_require__(111);
19484 var ReactComponent = __webpack_require__(124);
19485 var ReactClass = __webpack_require__(123);
19486 var ReactDOMFactories = __webpack_require__(154);
19487 var ReactElement = __webpack_require__(43);
19488 var ReactElementValidator = __webpack_require__(155);
19489 var ReactPropTypes = __webpack_require__(108);
19490 var ReactVersion = __webpack_require__(147);
19491
19492 var assign = __webpack_require__(40);
19493 var onlyChild = __webpack_require__(157);
19494
19495 var createElement = ReactElement.createElement;
19496 var createFactory = ReactElement.createFactory;
19497 var cloneElement = ReactElement.cloneElement;
19498
19499 if (process.env.NODE_ENV !== 'production') {
19500 createElement = ReactElementValidator.createElement;
19501 createFactory = ReactElementValidator.createFactory;
19502 cloneElement = ReactElementValidator.cloneElement;
19503 }
19504
19505 var React = {
19506
19507 // Modern
19508
19509 Children: {
19510 map: ReactChildren.map,
19511 forEach: ReactChildren.forEach,
19512 count: ReactChildren.count,
19513 toArray: ReactChildren.toArray,
19514 only: onlyChild
19515 },
19516
19517 Component: ReactComponent,
19518
19519 createElement: createElement,
19520 cloneElement: cloneElement,
19521 isValidElement: ReactElement.isValidElement,
19522
19523 // Classic
19524
19525 PropTypes: ReactPropTypes,
19526 createClass: ReactClass.createClass,
19527 createFactory: createFactory,
19528 createMixin: function (mixin) {
19529 // Currently a noop. Will be used to validate and trace mixins.
19530 return mixin;
19531 },
19532
19533 // This looks DOM specific but these are actually isomorphic helpers
19534 // since they are just generating DOM strings.
19535 DOM: ReactDOMFactories,
19536
19537 version: ReactVersion,
19538
19539 // Hook for JSX spread, don't use this for anything else.
19540 __spread: assign
19541 };
19542
19543 module.exports = React;
19544 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
19545
19546/***/ }),
19547/* 154 */
19548/***/ (function(module, exports, __webpack_require__) {
19549
19550 /* WEBPACK VAR INJECTION */(function(process) {/**
19551 * Copyright 2013-2015, Facebook, Inc.
19552 * All rights reserved.
19553 *
19554 * This source code is licensed under the BSD-style license found in the
19555 * LICENSE file in the root directory of this source tree. An additional grant
19556 * of patent rights can be found in the PATENTS file in the same directory.
19557 *
19558 * @providesModule ReactDOMFactories
19559 * @typechecks static-only
19560 */
19561
19562 'use strict';
19563
19564 var ReactElement = __webpack_require__(43);
19565 var ReactElementValidator = __webpack_require__(155);
19566
19567 var mapObject = __webpack_require__(156);
19568
19569 /**
19570 * Create a factory that creates HTML tag elements.
19571 *
19572 * @param {string} tag Tag name (e.g. `div`).
19573 * @private
19574 */
19575 function createDOMFactory(tag) {
19576 if (process.env.NODE_ENV !== 'production') {
19577 return ReactElementValidator.createFactory(tag);
19578 }
19579 return ReactElement.createFactory(tag);
19580 }
19581
19582 /**
19583 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
19584 * This is also accessible via `React.DOM`.
19585 *
19586 * @public
19587 */
19588 var ReactDOMFactories = mapObject({
19589 a: 'a',
19590 abbr: 'abbr',
19591 address: 'address',
19592 area: 'area',
19593 article: 'article',
19594 aside: 'aside',
19595 audio: 'audio',
19596 b: 'b',
19597 base: 'base',
19598 bdi: 'bdi',
19599 bdo: 'bdo',
19600 big: 'big',
19601 blockquote: 'blockquote',
19602 body: 'body',
19603 br: 'br',
19604 button: 'button',
19605 canvas: 'canvas',
19606 caption: 'caption',
19607 cite: 'cite',
19608 code: 'code',
19609 col: 'col',
19610 colgroup: 'colgroup',
19611 data: 'data',
19612 datalist: 'datalist',
19613 dd: 'dd',
19614 del: 'del',
19615 details: 'details',
19616 dfn: 'dfn',
19617 dialog: 'dialog',
19618 div: 'div',
19619 dl: 'dl',
19620 dt: 'dt',
19621 em: 'em',
19622 embed: 'embed',
19623 fieldset: 'fieldset',
19624 figcaption: 'figcaption',
19625 figure: 'figure',
19626 footer: 'footer',
19627 form: 'form',
19628 h1: 'h1',
19629 h2: 'h2',
19630 h3: 'h3',
19631 h4: 'h4',
19632 h5: 'h5',
19633 h6: 'h6',
19634 head: 'head',
19635 header: 'header',
19636 hgroup: 'hgroup',
19637 hr: 'hr',
19638 html: 'html',
19639 i: 'i',
19640 iframe: 'iframe',
19641 img: 'img',
19642 input: 'input',
19643 ins: 'ins',
19644 kbd: 'kbd',
19645 keygen: 'keygen',
19646 label: 'label',
19647 legend: 'legend',
19648 li: 'li',
19649 link: 'link',
19650 main: 'main',
19651 map: 'map',
19652 mark: 'mark',
19653 menu: 'menu',
19654 menuitem: 'menuitem',
19655 meta: 'meta',
19656 meter: 'meter',
19657 nav: 'nav',
19658 noscript: 'noscript',
19659 object: 'object',
19660 ol: 'ol',
19661 optgroup: 'optgroup',
19662 option: 'option',
19663 output: 'output',
19664 p: 'p',
19665 param: 'param',
19666 picture: 'picture',
19667 pre: 'pre',
19668 progress: 'progress',
19669 q: 'q',
19670 rp: 'rp',
19671 rt: 'rt',
19672 ruby: 'ruby',
19673 s: 's',
19674 samp: 'samp',
19675 script: 'script',
19676 section: 'section',
19677 select: 'select',
19678 small: 'small',
19679 source: 'source',
19680 span: 'span',
19681 strong: 'strong',
19682 style: 'style',
19683 sub: 'sub',
19684 summary: 'summary',
19685 sup: 'sup',
19686 table: 'table',
19687 tbody: 'tbody',
19688 td: 'td',
19689 textarea: 'textarea',
19690 tfoot: 'tfoot',
19691 th: 'th',
19692 thead: 'thead',
19693 time: 'time',
19694 title: 'title',
19695 tr: 'tr',
19696 track: 'track',
19697 u: 'u',
19698 ul: 'ul',
19699 'var': 'var',
19700 video: 'video',
19701 wbr: 'wbr',
19702
19703 // SVG
19704 circle: 'circle',
19705 clipPath: 'clipPath',
19706 defs: 'defs',
19707 ellipse: 'ellipse',
19708 g: 'g',
19709 image: 'image',
19710 line: 'line',
19711 linearGradient: 'linearGradient',
19712 mask: 'mask',
19713 path: 'path',
19714 pattern: 'pattern',
19715 polygon: 'polygon',
19716 polyline: 'polyline',
19717 radialGradient: 'radialGradient',
19718 rect: 'rect',
19719 stop: 'stop',
19720 svg: 'svg',
19721 text: 'text',
19722 tspan: 'tspan'
19723
19724 }, createDOMFactory);
19725
19726 module.exports = ReactDOMFactories;
19727 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
19728
19729/***/ }),
19730/* 155 */
19731/***/ (function(module, exports, __webpack_require__) {
19732
19733 /* WEBPACK VAR INJECTION */(function(process) {/**
19734 * Copyright 2014-2015, Facebook, Inc.
19735 * All rights reserved.
19736 *
19737 * This source code is licensed under the BSD-style license found in the
19738 * LICENSE file in the root directory of this source tree. An additional grant
19739 * of patent rights can be found in the PATENTS file in the same directory.
19740 *
19741 * @providesModule ReactElementValidator
19742 */
19743
19744 /**
19745 * ReactElementValidator provides a wrapper around a element factory
19746 * which validates the props passed to the element. This is intended to be
19747 * used only in DEV and could be replaced by a static type checker for languages
19748 * that support it.
19749 */
19750
19751 'use strict';
19752
19753 var ReactElement = __webpack_require__(43);
19754 var ReactPropTypeLocations = __webpack_require__(66);
19755 var ReactPropTypeLocationNames = __webpack_require__(67);
19756 var ReactCurrentOwner = __webpack_require__(6);
19757
19758 var canDefineProperty = __webpack_require__(44);
19759 var getIteratorFn = __webpack_require__(109);
19760 var invariant = __webpack_require__(14);
19761 var warning = __webpack_require__(26);
19762
19763 function getDeclarationErrorAddendum() {
19764 if (ReactCurrentOwner.current) {
19765 var name = ReactCurrentOwner.current.getName();
19766 if (name) {
19767 return ' Check the render method of `' + name + '`.';
19768 }
19769 }
19770 return '';
19771 }
19772
19773 /**
19774 * Warn if there's no key explicitly set on dynamic arrays of children or
19775 * object keys are not valid. This allows us to keep track of children between
19776 * updates.
19777 */
19778 var ownerHasKeyUseWarning = {};
19779
19780 var loggedTypeFailures = {};
19781
19782 /**
19783 * Warn if the element doesn't have an explicit key assigned to it.
19784 * This element is in an array. The array could grow and shrink or be
19785 * reordered. All children that haven't already been validated are required to
19786 * have a "key" property assigned to it.
19787 *
19788 * @internal
19789 * @param {ReactElement} element Element that requires a key.
19790 * @param {*} parentType element's parent's type.
19791 */
19792 function validateExplicitKey(element, parentType) {
19793 if (!element._store || element._store.validated || element.key != null) {
19794 return;
19795 }
19796 element._store.validated = true;
19797
19798 var addenda = getAddendaForKeyUse('uniqueKey', element, parentType);
19799 if (addenda === null) {
19800 // we already showed the warning
19801 return;
19802 }
19803 process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s%s', addenda.parentOrOwner || '', addenda.childOwner || '', addenda.url || '') : undefined;
19804 }
19805
19806 /**
19807 * Shared warning and monitoring code for the key warnings.
19808 *
19809 * @internal
19810 * @param {string} messageType A key used for de-duping warnings.
19811 * @param {ReactElement} element Component that requires a key.
19812 * @param {*} parentType element's parent's type.
19813 * @returns {?object} A set of addenda to use in the warning message, or null
19814 * if the warning has already been shown before (and shouldn't be shown again).
19815 */
19816 function getAddendaForKeyUse(messageType, element, parentType) {
19817 var addendum = getDeclarationErrorAddendum();
19818 if (!addendum) {
19819 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
19820 if (parentName) {
19821 addendum = ' Check the top-level render call using <' + parentName + '>.';
19822 }
19823 }
19824
19825 var memoizer = ownerHasKeyUseWarning[messageType] || (ownerHasKeyUseWarning[messageType] = {});
19826 if (memoizer[addendum]) {
19827 return null;
19828 }
19829 memoizer[addendum] = true;
19830
19831 var addenda = {
19832 parentOrOwner: addendum,
19833 url: ' See https://fb.me/react-warning-keys for more information.',
19834 childOwner: null
19835 };
19836
19837 // Usually the current owner is the offender, but if it accepts children as a
19838 // property, it may be the creator of the child that's responsible for
19839 // assigning it a key.
19840 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
19841 // Give the component that originally created this child.
19842 addenda.childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
19843 }
19844
19845 return addenda;
19846 }
19847
19848 /**
19849 * Ensure that every element either is passed in a static location, in an
19850 * array with an explicit keys property defined, or in an object literal
19851 * with valid key property.
19852 *
19853 * @internal
19854 * @param {ReactNode} node Statically passed child of any type.
19855 * @param {*} parentType node's parent's type.
19856 */
19857 function validateChildKeys(node, parentType) {
19858 if (typeof node !== 'object') {
19859 return;
19860 }
19861 if (Array.isArray(node)) {
19862 for (var i = 0; i < node.length; i++) {
19863 var child = node[i];
19864 if (ReactElement.isValidElement(child)) {
19865 validateExplicitKey(child, parentType);
19866 }
19867 }
19868 } else if (ReactElement.isValidElement(node)) {
19869 // This element was passed in a valid location.
19870 if (node._store) {
19871 node._store.validated = true;
19872 }
19873 } else if (node) {
19874 var iteratorFn = getIteratorFn(node);
19875 // Entry iterators provide implicit keys.
19876 if (iteratorFn) {
19877 if (iteratorFn !== node.entries) {
19878 var iterator = iteratorFn.call(node);
19879 var step;
19880 while (!(step = iterator.next()).done) {
19881 if (ReactElement.isValidElement(step.value)) {
19882 validateExplicitKey(step.value, parentType);
19883 }
19884 }
19885 }
19886 }
19887 }
19888 }
19889
19890 /**
19891 * Assert that the props are valid
19892 *
19893 * @param {string} componentName Name of the component for error messages.
19894 * @param {object} propTypes Map of prop name to a ReactPropType
19895 * @param {object} props
19896 * @param {string} location e.g. "prop", "context", "child context"
19897 * @private
19898 */
19899 function checkPropTypes(componentName, propTypes, props, location) {
19900 for (var propName in propTypes) {
19901 if (propTypes.hasOwnProperty(propName)) {
19902 var error;
19903 // Prop type validation may throw. In case they do, we don't want to
19904 // fail the render phase where it didn't fail before. So we log it.
19905 // After these have been cleaned up, we'll let them throw.
19906 try {
19907 // This is intentionally an invariant that gets caught. It's the same
19908 // behavior as without this statement except with a better message.
19909 !(typeof propTypes[propName] === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined;
19910 error = propTypes[propName](props, propName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
19911 } catch (ex) {
19912 error = ex;
19913 }
19914 process.env.NODE_ENV !== 'production' ? warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', ReactPropTypeLocationNames[location], propName, typeof error) : undefined;
19915 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
19916 // Only monitor this failure once because there tends to be a lot of the
19917 // same error.
19918 loggedTypeFailures[error.message] = true;
19919
19920 var addendum = getDeclarationErrorAddendum();
19921 process.env.NODE_ENV !== 'production' ? warning(false, 'Failed propType: %s%s', error.message, addendum) : undefined;
19922 }
19923 }
19924 }
19925 }
19926
19927 /**
19928 * Given an element, validate that its props follow the propTypes definition,
19929 * provided by the type.
19930 *
19931 * @param {ReactElement} element
19932 */
19933 function validatePropTypes(element) {
19934 var componentClass = element.type;
19935 if (typeof componentClass !== 'function') {
19936 return;
19937 }
19938 var name = componentClass.displayName || componentClass.name;
19939 if (componentClass.propTypes) {
19940 checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop);
19941 }
19942 if (typeof componentClass.getDefaultProps === 'function') {
19943 process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : undefined;
19944 }
19945 }
19946
19947 var ReactElementValidator = {
19948
19949 createElement: function (type, props, children) {
19950 var validType = typeof type === 'string' || typeof type === 'function';
19951 // We warn in this case but don't throw. We expect the element creation to
19952 // succeed and there will likely be errors in render.
19953 process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : undefined;
19954
19955 var element = ReactElement.createElement.apply(this, arguments);
19956
19957 // The result can be nullish if a mock or a custom function is used.
19958 // TODO: Drop this when these are no longer allowed as the type argument.
19959 if (element == null) {
19960 return element;
19961 }
19962
19963 // Skip key warning if the type isn't valid since our key validation logic
19964 // doesn't expect a non-string/function type and can throw confusing errors.
19965 // We don't want exception behavior to differ between dev and prod.
19966 // (Rendering will throw with a helpful message and as soon as the type is
19967 // fixed, the key warnings will appear.)
19968 if (validType) {
19969 for (var i = 2; i < arguments.length; i++) {
19970 validateChildKeys(arguments[i], type);
19971 }
19972 }
19973
19974 validatePropTypes(element);
19975
19976 return element;
19977 },
19978
19979 createFactory: function (type) {
19980 var validatedFactory = ReactElementValidator.createElement.bind(null, type);
19981 // Legacy hook TODO: Warn if this is accessed
19982 validatedFactory.type = type;
19983
19984 if (process.env.NODE_ENV !== 'production') {
19985 if (canDefineProperty) {
19986 Object.defineProperty(validatedFactory, 'type', {
19987 enumerable: false,
19988 get: function () {
19989 process.env.NODE_ENV !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : undefined;
19990 Object.defineProperty(this, 'type', {
19991 value: type
19992 });
19993 return type;
19994 }
19995 });
19996 }
19997 }
19998
19999 return validatedFactory;
20000 },
20001
20002 cloneElement: function (element, props, children) {
20003 var newElement = ReactElement.cloneElement.apply(this, arguments);
20004 for (var i = 2; i < arguments.length; i++) {
20005 validateChildKeys(arguments[i], newElement.type);
20006 }
20007 validatePropTypes(newElement);
20008 return newElement;
20009 }
20010
20011 };
20012
20013 module.exports = ReactElementValidator;
20014 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
20015
20016/***/ }),
20017/* 156 */
20018/***/ (function(module, exports) {
20019
20020 /**
20021 * Copyright 2013-2015, Facebook, Inc.
20022 * All rights reserved.
20023 *
20024 * This source code is licensed under the BSD-style license found in the
20025 * LICENSE file in the root directory of this source tree. An additional grant
20026 * of patent rights can be found in the PATENTS file in the same directory.
20027 *
20028 * @providesModule mapObject
20029 */
20030
20031 'use strict';
20032
20033 var hasOwnProperty = Object.prototype.hasOwnProperty;
20034
20035 /**
20036 * Executes the provided `callback` once for each enumerable own property in the
20037 * object and constructs a new object from the results. The `callback` is
20038 * invoked with three arguments:
20039 *
20040 * - the property value
20041 * - the property name
20042 * - the object being traversed
20043 *
20044 * Properties that are added after the call to `mapObject` will not be visited
20045 * by `callback`. If the values of existing properties are changed, the value
20046 * passed to `callback` will be the value at the time `mapObject` visits them.
20047 * Properties that are deleted before being visited are not visited.
20048 *
20049 * @grep function objectMap()
20050 * @grep function objMap()
20051 *
20052 * @param {?object} object
20053 * @param {function} callback
20054 * @param {*} context
20055 * @return {?object}
20056 */
20057 function mapObject(object, callback, context) {
20058 if (!object) {
20059 return null;
20060 }
20061 var result = {};
20062 for (var name in object) {
20063 if (hasOwnProperty.call(object, name)) {
20064 result[name] = callback.call(context, object[name], name, object);
20065 }
20066 }
20067 return result;
20068 }
20069
20070 module.exports = mapObject;
20071
20072/***/ }),
20073/* 157 */
20074/***/ (function(module, exports, __webpack_require__) {
20075
20076 /* WEBPACK VAR INJECTION */(function(process) {/**
20077 * Copyright 2013-2015, Facebook, Inc.
20078 * All rights reserved.
20079 *
20080 * This source code is licensed under the BSD-style license found in the
20081 * LICENSE file in the root directory of this source tree. An additional grant
20082 * of patent rights can be found in the PATENTS file in the same directory.
20083 *
20084 * @providesModule onlyChild
20085 */
20086 'use strict';
20087
20088 var ReactElement = __webpack_require__(43);
20089
20090 var invariant = __webpack_require__(14);
20091
20092 /**
20093 * Returns the first child in a collection of children and verifies that there
20094 * is only one child in the collection. The current implementation of this
20095 * function assumes that a single child gets passed without a wrapper, but the
20096 * purpose of this helper function is to abstract away the particular structure
20097 * of children.
20098 *
20099 * @param {?object} children Child collection structure.
20100 * @return {ReactComponent} The first and only `ReactComponent` contained in the
20101 * structure.
20102 */
20103 function onlyChild(children) {
20104 !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : invariant(false) : undefined;
20105 return children;
20106 }
20107
20108 module.exports = onlyChild;
20109 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
20110
20111/***/ }),
20112/* 158 */
20113/***/ (function(module, exports, __webpack_require__) {
20114
20115 /* WEBPACK VAR INJECTION */(function(process) {/**
20116 * Copyright 2013-2015, Facebook, Inc.
20117 * All rights reserved.
20118 *
20119 * This source code is licensed under the BSD-style license found in the
20120 * LICENSE file in the root directory of this source tree. An additional grant
20121 * of patent rights can be found in the PATENTS file in the same directory.
20122 *
20123 * @providesModule deprecated
20124 */
20125
20126 'use strict';
20127
20128 var assign = __webpack_require__(40);
20129 var warning = __webpack_require__(26);
20130
20131 /**
20132 * This will log a single deprecation notice per function and forward the call
20133 * on to the new API.
20134 *
20135 * @param {string} fnName The name of the function
20136 * @param {string} newModule The module that fn will exist in
20137 * @param {string} newPackage The module that fn will exist in
20138 * @param {*} ctx The context this forwarded call should run in
20139 * @param {function} fn The function to forward on to
20140 * @return {function} The function that will warn once and then call fn
20141 */
20142 function deprecated(fnName, newModule, newPackage, ctx, fn) {
20143 var warned = false;
20144 if (process.env.NODE_ENV !== 'production') {
20145 var newFn = function () {
20146 process.env.NODE_ENV !== 'production' ? warning(warned,
20147 // Require examples in this string must be split to prevent React's
20148 // build tools from mistaking them for real requires.
20149 // Otherwise the build tools will attempt to build a '%s' module.
20150 'React.%s is deprecated. Please use %s.%s from require' + '(\'%s\') ' + 'instead.', fnName, newModule, fnName, newPackage) : undefined;
20151 warned = true;
20152 return fn.apply(ctx, arguments);
20153 };
20154 // We need to make sure all properties of the original fn are copied over.
20155 // In particular, this is needed to support PropTypes
20156 return assign(newFn, fn);
20157 }
20158
20159 return fn;
20160 }
20161
20162 module.exports = deprecated;
20163 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5)))
20164
20165/***/ })
20166/******/ ])
20167});
20168;
\No newline at end of file