diff --git a/.gitignore b/.gitignore index 4bce00cd..15529a9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ npm-debug.log +.vs/ .vscode/ \ No newline at end of file diff --git a/dist/bundle.js b/dist/bundle.js index d29e4b08..fcbc2596 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -58,15 +58,15 @@ var _reactDom2 = _interopRequireDefault(_reactDom); - var _Router = __webpack_require__(177); + var _Router = __webpack_require__(186); var _Router2 = _interopRequireDefault(_Router); - var _WebAPIUtils = __webpack_require__(360); + var _WebAPIUtils = __webpack_require__(369); var _WebAPIUtils2 = _interopRequireDefault(_WebAPIUtils); - __webpack_require__(501); + __webpack_require__(511); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4478,7 +4478,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDOM */ /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ @@ -4486,16 +4485,16 @@ 'use strict'; var ReactDOMComponentTree = __webpack_require__(38); - var ReactDefaultInjection = __webpack_require__(41); - var ReactMount = __webpack_require__(167); - var ReactReconciler = __webpack_require__(63); - var ReactUpdates = __webpack_require__(60); - var ReactVersion = __webpack_require__(34); + var ReactDefaultInjection = __webpack_require__(43); + var ReactMount = __webpack_require__(174); + var ReactReconciler = __webpack_require__(66); + var ReactUpdates = __webpack_require__(63); + var ReactVersion = __webpack_require__(179); - var findDOMNode = __webpack_require__(172); - var getHostComponentFromComposite = __webpack_require__(173); - var renderSubtreeIntoContainer = __webpack_require__(174); - var warning = __webpack_require__(15); + var findDOMNode = __webpack_require__(180); + var getHostComponentFromComposite = __webpack_require__(181); + var renderSubtreeIntoContainer = __webpack_require__(182); + var warning = __webpack_require__(51); ReactDefaultInjection.inject(); @@ -4512,7 +4511,6 @@ // Inject the runtime into a devtools global hook regardless of browser. // Allows for debugging when the hook is injected on the page. - /* eslint-enable camelcase */ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ ComponentTree: { @@ -4535,7 +4533,7 @@ } if (process.env.NODE_ENV !== 'production') { - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { // First check if devtools is not installed @@ -4559,7 +4557,7 @@ var expectedFeatures = [ // shims - 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]; + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.trim]; for (var i = 0; i < expectedFeatures.length; i++) { if (!expectedFeatures[i]) { @@ -4571,12 +4569,14 @@ } if (process.env.NODE_ENV !== 'production') { - var ReactInstrumentation = __webpack_require__(66); - var ReactDOMUnknownPropertyHook = __webpack_require__(175); - var ReactDOMNullInputValuePropHook = __webpack_require__(176); + var ReactInstrumentation = __webpack_require__(69); + var ReactDOMUnknownPropertyHook = __webpack_require__(183); + var ReactDOMNullInputValuePropHook = __webpack_require__(184); + var ReactDOMInvalidARIAHook = __webpack_require__(185); ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + ReactInstrumentation.debugTool.addHook(ReactDOMInvalidARIAHook); } module.exports = ReactDOM; @@ -4594,17 +4594,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDOMComponentTree */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var DOMProperty = __webpack_require__(39); - var ReactDOMComponentFlags = __webpack_require__(40); + var DOMProperty = __webpack_require__(40); + var ReactDOMComponentFlags = __webpack_require__(42); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; var Flags = ReactDOMComponentFlags; @@ -4778,6 +4777,49 @@ /***/ }, /* 39 */ +/***/ function(module, exports) { + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + 'use strict'; + + /** + * WARNING: DO NOT manually require this module. + * This is a replacement for `invariant(...)` used by the error code system + * and will _only_ be required by the corresponding babel pass. + * It always throws. + */ + + function reactProdInvariant(code) { + var argCount = arguments.length - 1; + + var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code; + + for (var argIdx = 0; argIdx < argCount; argIdx++) { + message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]); + } + + message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.'; + + var error = new Error(message); + error.name = 'Invariant Violation'; + error.framesToPop = 1; // we don't care about reactProdInvariant's own frame + + throw error; + } + + module.exports = reactProdInvariant; + +/***/ }, +/* 40 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -4788,14 +4830,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DOMProperty */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); function checkMask(value, bitmask) { return (value & bitmask) === bitmask; @@ -4959,9 +5000,13 @@ /** * Mapping from lowercase property names to the properly cased version, used * to warn in the case of missing properties. Available only in __DEV__. + * + * autofocus is predefined, because adding it to the property whitelist + * causes unintended side effects. + * * @type {Object} */ - getPossibleStandardName: process.env.NODE_ENV !== 'production' ? {} : null, + getPossibleStandardName: process.env.NODE_ENV !== 'production' ? { autofocus: 'autoFocus' } : null, /** * All of the isCustomAttribute() functions that have been injected. @@ -4989,7 +5034,68 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 40 */ +/* 41 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + + var validateFormat = function validateFormat(format) {}; + + if (process.env.NODE_ENV !== 'production') { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + }; + } + + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } + + module.exports = invariant; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }, +/* 42 */ /***/ function(module, exports) { /** @@ -5000,7 +5106,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDOMComponentFlags */ 'use strict'; @@ -5012,7 +5117,7 @@ module.exports = ReactDOMComponentFlags; /***/ }, -/* 41 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5023,29 +5128,29 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDefaultInjection */ 'use strict'; - var BeforeInputEventPlugin = __webpack_require__(42); - var ChangeEventPlugin = __webpack_require__(59); - var DefaultEventPluginOrder = __webpack_require__(77); - var EnterLeaveEventPlugin = __webpack_require__(78); - var HTMLDOMPropertyConfig = __webpack_require__(83); - var ReactComponentBrowserEnvironment = __webpack_require__(84); - var ReactDOMComponent = __webpack_require__(98); + var ARIADOMPropertyConfig = __webpack_require__(44); + var BeforeInputEventPlugin = __webpack_require__(45); + var ChangeEventPlugin = __webpack_require__(62); + var DefaultEventPluginOrder = __webpack_require__(79); + var EnterLeaveEventPlugin = __webpack_require__(80); + var HTMLDOMPropertyConfig = __webpack_require__(85); + var ReactComponentBrowserEnvironment = __webpack_require__(86); + var ReactDOMComponent = __webpack_require__(99); var ReactDOMComponentTree = __webpack_require__(38); - var ReactDOMEmptyComponent = __webpack_require__(138); - var ReactDOMTreeTraversal = __webpack_require__(139); - var ReactDOMTextComponent = __webpack_require__(140); - var ReactDefaultBatchingStrategy = __webpack_require__(141); - var ReactEventListener = __webpack_require__(142); - var ReactInjection = __webpack_require__(145); - var ReactReconcileTransaction = __webpack_require__(146); - var SVGDOMPropertyConfig = __webpack_require__(154); - var SelectEventPlugin = __webpack_require__(155); - var SimpleEventPlugin = __webpack_require__(156); + var ReactDOMEmptyComponent = __webpack_require__(145); + var ReactDOMTreeTraversal = __webpack_require__(146); + var ReactDOMTextComponent = __webpack_require__(147); + var ReactDefaultBatchingStrategy = __webpack_require__(148); + var ReactEventListener = __webpack_require__(149); + var ReactInjection = __webpack_require__(152); + var ReactReconcileTransaction = __webpack_require__(153); + var SVGDOMPropertyConfig = __webpack_require__(161); + var SelectEventPlugin = __webpack_require__(162); + var SimpleEventPlugin = __webpack_require__(163); var alreadyInjected = false; @@ -5083,6 +5188,7 @@ ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); + ReactInjection.DOMProperty.injectDOMPropertyConfig(ARIADOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); @@ -5101,7 +5207,85 @@ }; /***/ }, -/* 42 */ +/* 44 */ +/***/ function(module, exports) { + + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var ARIADOMPropertyConfig = { + Properties: { + // Global States and Properties + 'aria-current': 0, // state + 'aria-details': 0, + 'aria-disabled': 0, // state + 'aria-hidden': 0, // state + 'aria-invalid': 0, // state + 'aria-keyshortcuts': 0, + 'aria-label': 0, + 'aria-roledescription': 0, + // Widget Attributes + 'aria-autocomplete': 0, + 'aria-checked': 0, + 'aria-expanded': 0, + 'aria-haspopup': 0, + 'aria-level': 0, + 'aria-modal': 0, + 'aria-multiline': 0, + 'aria-multiselectable': 0, + 'aria-orientation': 0, + 'aria-placeholder': 0, + 'aria-pressed': 0, + 'aria-readonly': 0, + 'aria-required': 0, + 'aria-selected': 0, + 'aria-sort': 0, + 'aria-valuemax': 0, + 'aria-valuemin': 0, + 'aria-valuenow': 0, + 'aria-valuetext': 0, + // Live Region Attributes + 'aria-atomic': 0, + 'aria-busy': 0, + 'aria-live': 0, + 'aria-relevant': 0, + // Drag-and-Drop Attributes + 'aria-dropeffect': 0, + 'aria-grabbed': 0, + // Relationship Attributes + 'aria-activedescendant': 0, + 'aria-colcount': 0, + 'aria-colindex': 0, + 'aria-colspan': 0, + 'aria-controls': 0, + 'aria-describedby': 0, + 'aria-errormessage': 0, + 'aria-flowto': 0, + 'aria-labelledby': 0, + 'aria-owns': 0, + 'aria-posinset': 0, + 'aria-rowcount': 0, + 'aria-rowindex': 0, + 'aria-rowspan': 0, + 'aria-setsize': 0 + }, + DOMAttributeNames: {}, + DOMPropertyNames: {} + }; + + module.exports = ARIADOMPropertyConfig; + +/***/ }, +/* 45 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5112,19 +5296,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule BeforeInputEventPlugin */ 'use strict'; - var EventConstants = __webpack_require__(43); - var EventPropagators = __webpack_require__(45); - var ExecutionEnvironment = __webpack_require__(52); - var FallbackCompositionState = __webpack_require__(53); - var SyntheticCompositionEvent = __webpack_require__(55); - var SyntheticInputEvent = __webpack_require__(57); - - var keyOf = __webpack_require__(58); + var EventPropagators = __webpack_require__(46); + var ExecutionEnvironment = __webpack_require__(55); + var FallbackCompositionState = __webpack_require__(56); + var SyntheticCompositionEvent = __webpack_require__(59); + var SyntheticInputEvent = __webpack_require__(61); var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space var START_KEYCODE = 229; @@ -5158,37 +5338,35 @@ var SPACEBAR_CODE = 32; var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); - var topLevelTypes = EventConstants.topLevelTypes; - // Events and their corresponding property names. var eventTypes = { beforeInput: { phasedRegistrationNames: { - bubbled: keyOf({ onBeforeInput: null }), - captured: keyOf({ onBeforeInputCapture: null }) + bubbled: 'onBeforeInput', + captured: 'onBeforeInputCapture' }, - dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste] + dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste'] }, compositionEnd: { phasedRegistrationNames: { - bubbled: keyOf({ onCompositionEnd: null }), - captured: keyOf({ onCompositionEndCapture: null }) + bubbled: 'onCompositionEnd', + captured: 'onCompositionEndCapture' }, - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] + dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] }, compositionStart: { phasedRegistrationNames: { - bubbled: keyOf({ onCompositionStart: null }), - captured: keyOf({ onCompositionStartCapture: null }) + bubbled: 'onCompositionStart', + captured: 'onCompositionStartCapture' }, - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] + dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] }, compositionUpdate: { phasedRegistrationNames: { - bubbled: keyOf({ onCompositionUpdate: null }), - captured: keyOf({ onCompositionUpdateCapture: null }) + bubbled: 'onCompositionUpdate', + captured: 'onCompositionUpdateCapture' }, - dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown] + dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown'] } }; @@ -5214,11 +5392,11 @@ */ function getCompositionEventType(topLevelType) { switch (topLevelType) { - case topLevelTypes.topCompositionStart: + case 'topCompositionStart': return eventTypes.compositionStart; - case topLevelTypes.topCompositionEnd: + case 'topCompositionEnd': return eventTypes.compositionEnd; - case topLevelTypes.topCompositionUpdate: + case 'topCompositionUpdate': return eventTypes.compositionUpdate; } } @@ -5232,7 +5410,7 @@ * @return {boolean} */ function isFallbackCompositionStart(topLevelType, nativeEvent) { - return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE; + return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE; } /** @@ -5244,16 +5422,16 @@ */ function isFallbackCompositionEnd(topLevelType, nativeEvent) { switch (topLevelType) { - case topLevelTypes.topKeyUp: + case 'topKeyUp': // Command keys insert or clear IME input. return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1; - case topLevelTypes.topKeyDown: + case 'topKeyDown': // Expect IME keyCode on each keydown. If we get any other // code we must have exited earlier. return nativeEvent.keyCode !== START_KEYCODE; - case topLevelTypes.topKeyPress: - case topLevelTypes.topMouseDown: - case topLevelTypes.topBlur: + case 'topKeyPress': + case 'topMouseDown': + case 'topBlur': // Events are not possible without cancelling IME. return true; default: @@ -5338,9 +5516,9 @@ */ function getNativeBeforeInputChars(topLevelType, nativeEvent) { switch (topLevelType) { - case topLevelTypes.topCompositionEnd: + case 'topCompositionEnd': return getDataFromCustomEvent(nativeEvent); - case topLevelTypes.topKeyPress: + case 'topKeyPress': /** * If native `textInput` events are available, our goal is to make * use of them. However, there is a special case: the spacebar key. @@ -5363,7 +5541,7 @@ hasSpaceKeypress = true; return SPACEBAR_CHAR; - case topLevelTypes.topTextInput: + case 'topTextInput': // Record the characters to be added to the DOM. var chars = nativeEvent.data; @@ -5396,7 +5574,7 @@ // If composition event is available, we extract a string only at // compositionevent, otherwise extract it at fallback events. if (currentComposition) { - if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { + if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) { var chars = currentComposition.getData(); FallbackCompositionState.release(currentComposition); currentComposition = null; @@ -5406,11 +5584,11 @@ } switch (topLevelType) { - case topLevelTypes.topPaste: + case 'topPaste': // If a paste event occurs after a keypress, throw out the input // chars. Paste events should not lead to BeforeInput events. return null; - case topLevelTypes.topKeyPress: + case 'topKeyPress': /** * As of v27, Firefox may fire keypress events even when no character * will be inserted. A few possibilities: @@ -5431,7 +5609,7 @@ return String.fromCharCode(nativeEvent.which); } return null; - case topLevelTypes.topCompositionEnd: + case 'topCompositionEnd': return useFallbackCompositionData ? null : nativeEvent.data; default: return null; @@ -5496,162 +5674,7 @@ module.exports = BeforeInputEventPlugin; /***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule EventConstants - */ - - 'use strict'; - - var keyMirror = __webpack_require__(44); - - var PropagationPhases = keyMirror({ bubbled: null, captured: null }); - - /** - * Types of raw signals from the browser caught at the top level. - */ - var topLevelTypes = keyMirror({ - topAbort: null, - topAnimationEnd: null, - topAnimationIteration: null, - topAnimationStart: null, - topBlur: null, - topCanPlay: null, - topCanPlayThrough: null, - topChange: null, - topClick: null, - topCompositionEnd: null, - topCompositionStart: null, - topCompositionUpdate: null, - topContextMenu: null, - topCopy: null, - topCut: null, - topDoubleClick: null, - topDrag: null, - topDragEnd: null, - topDragEnter: null, - topDragExit: null, - topDragLeave: null, - topDragOver: null, - topDragStart: null, - topDrop: null, - topDurationChange: null, - topEmptied: null, - topEncrypted: null, - topEnded: null, - topError: null, - topFocus: null, - topInput: null, - topInvalid: null, - topKeyDown: null, - topKeyPress: null, - topKeyUp: null, - topLoad: null, - topLoadedData: null, - topLoadedMetadata: null, - topLoadStart: null, - topMouseDown: null, - topMouseMove: null, - topMouseOut: null, - topMouseOver: null, - topMouseUp: null, - topPaste: null, - topPause: null, - topPlay: null, - topPlaying: null, - topProgress: null, - topRateChange: null, - topReset: null, - topScroll: null, - topSeeked: null, - topSeeking: null, - topSelectionChange: null, - topStalled: null, - topSubmit: null, - topSuspend: null, - topTextInput: null, - topTimeUpdate: null, - topTouchCancel: null, - topTouchEnd: null, - topTouchMove: null, - topTouchStart: null, - topTransitionEnd: null, - topVolumeChange: null, - topWaiting: null, - topWheel: null - }); - - var EventConstants = { - topLevelTypes: topLevelTypes, - PropagationPhases: PropagationPhases - }; - - module.exports = EventConstants; - -/***/ }, -/* 44 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @typechecks static-only - */ - - 'use strict'; - - var invariant = __webpack_require__(12); - - /** - * Constructs an enumeration with keys equal to their value. - * - * For example: - * - * var COLORS = keyMirror({blue: null, red: null}); - * var myColor = COLORS.blue; - * var isColorValid = !!COLORS[myColor]; - * - * The last line could not be performed if the values of the generated enum were - * not equal to their keys. - * - * Input: {key1: val1, key2: val2} - * Output: {key1: key1, key2: key2} - * - * @param {object} obj - * @return {object} - */ - var keyMirror = function keyMirror(obj) { - var ret = {}; - var key; - !(obj instanceof Object && !Array.isArray(obj)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : void 0; - for (key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; - } - ret[key] = key; - } - return ret; - }; - - module.exports = keyMirror; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) - -/***/ }, -/* 45 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5662,20 +5685,17 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule EventPropagators */ 'use strict'; - var EventConstants = __webpack_require__(43); - var EventPluginHub = __webpack_require__(46); - var EventPluginUtils = __webpack_require__(48); + var EventPluginHub = __webpack_require__(47); + var EventPluginUtils = __webpack_require__(49); - var accumulateInto = __webpack_require__(50); - var forEachAccumulated = __webpack_require__(51); - var warning = __webpack_require__(15); + var accumulateInto = __webpack_require__(53); + var forEachAccumulated = __webpack_require__(54); + var warning = __webpack_require__(51); - var PropagationPhases = EventConstants.PropagationPhases; var getListener = EventPluginHub.getListener; /** @@ -5693,11 +5713,10 @@ * Mutating the event's members allows us to not have to create a wrapping * "dispatch" object that pairs the event with the listener. */ - function accumulateDirectionalDispatches(inst, upwards, event) { + function accumulateDirectionalDispatches(inst, phase, event) { if (process.env.NODE_ENV !== 'production') { process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0; } - var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; var listener = listenerAtPhase(inst, event, phase); if (listener) { event._dispatchListeners = accumulateInto(event._dispatchListeners, listener); @@ -5794,7 +5813,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 46 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5805,20 +5824,19 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule EventPluginHub */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var EventPluginRegistry = __webpack_require__(47); - var EventPluginUtils = __webpack_require__(48); - var ReactErrorUtils = __webpack_require__(49); + var EventPluginRegistry = __webpack_require__(48); + var EventPluginUtils = __webpack_require__(49); + var ReactErrorUtils = __webpack_require__(50); - var accumulateInto = __webpack_require__(50); - var forEachAccumulated = __webpack_require__(51); - var invariant = __webpack_require__(12); + var accumulateInto = __webpack_require__(53); + var forEachAccumulated = __webpack_require__(54); + var invariant = __webpack_require__(41); /** * Internal store for event listeners @@ -5860,6 +5878,28 @@ return '.' + inst._rootNodeID; }; + function isInteractive(tag) { + return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea'; + } + + function shouldPreventMouseEvent(name, type, props) { + switch (name) { + case 'onClick': + case 'onClickCapture': + case 'onDoubleClick': + case 'onDoubleClickCapture': + case 'onMouseDown': + case 'onMouseDownCapture': + case 'onMouseMove': + case 'onMouseMoveCapture': + case 'onMouseUp': + case 'onMouseUpCapture': + return !!(props.disabled && isInteractive(type)); + default: + return false; + } + } + /** * This is a unified interface for event plugins to be installed and configured. * @@ -5928,7 +5968,12 @@ * @return {?function} The stored callback. */ getListener: function (inst, registrationName) { + // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not + // live here; needs to be moved to a better place soon var bankForRegistrationName = listenerBank[registrationName]; + if (shouldPreventMouseEvent(registrationName, inst._currentElement.type, inst._currentElement.props)) { + return null; + } var key = getDictionaryKey(inst); return bankForRegistrationName && bankForRegistrationName[key]; }, @@ -6051,7 +6096,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 47 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6062,19 +6107,19 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule EventPluginRegistry + * */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); /** * Injectable ordering of event plugins. */ - var EventPluginOrder = null; + var eventPluginOrder = null; /** * Injectable mapping from names to event plugin modules. @@ -6087,22 +6132,22 @@ * @private */ function recomputePluginOrdering() { - if (!EventPluginOrder) { - // Wait until an `EventPluginOrder` is injected. + if (!eventPluginOrder) { + // Wait until an `eventPluginOrder` is injected. return; } for (var pluginName in namesToPlugins) { - var PluginModule = namesToPlugins[pluginName]; - var pluginIndex = EventPluginOrder.indexOf(pluginName); + var pluginModule = namesToPlugins[pluginName]; + var pluginIndex = eventPluginOrder.indexOf(pluginName); !(pluginIndex > -1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0; if (EventPluginRegistry.plugins[pluginIndex]) { continue; } - !PluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; - EventPluginRegistry.plugins[pluginIndex] = PluginModule; - var publishedEvents = PluginModule.eventTypes; + !pluginModule.extractEvents ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0; + EventPluginRegistry.plugins[pluginIndex] = pluginModule; + var publishedEvents = pluginModule.eventTypes; for (var eventName in publishedEvents) { - !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; + !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0; } } } @@ -6115,7 +6160,7 @@ * @return {boolean} True if the event was successfully published. * @private */ - function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { + function publishEventForPlugin(dispatchConfig, pluginModule, eventName) { !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0; EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; @@ -6124,12 +6169,12 @@ for (var phaseName in phasedRegistrationNames) { if (phasedRegistrationNames.hasOwnProperty(phaseName)) { var phasedRegistrationName = phasedRegistrationNames[phaseName]; - publishRegistrationName(phasedRegistrationName, PluginModule, eventName); + publishRegistrationName(phasedRegistrationName, pluginModule, eventName); } } return true; } else if (dispatchConfig.registrationName) { - publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName); + publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName); return true; } return false; @@ -6143,10 +6188,10 @@ * @param {object} PluginModule Plugin publishing the event. * @private */ - function publishRegistrationName(registrationName, PluginModule, eventName) { + function publishRegistrationName(registrationName, pluginModule, eventName) { !!EventPluginRegistry.registrationNameModules[registrationName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0; - EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; - EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies; + EventPluginRegistry.registrationNameModules[registrationName] = pluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies; if (process.env.NODE_ENV !== 'production') { var lowerCasedName = registrationName.toLowerCase(); @@ -6192,6 +6237,7 @@ * @type {Object} */ possibleRegistrationNames: process.env.NODE_ENV !== 'production' ? {} : null, + // Trust the developer to only use possibleRegistrationNames in __DEV__ /** * Injects an ordering of plugins (by plugin name). This allows the ordering @@ -6202,10 +6248,10 @@ * @internal * @see {EventPluginHub.injection.injectEventPluginOrder} */ - injectEventPluginOrder: function (InjectedEventPluginOrder) { - !!EventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; + injectEventPluginOrder: function (injectedEventPluginOrder) { + !!eventPluginOrder ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : _prodInvariant('101') : void 0; // Clone the ordering so it cannot be dynamically mutated. - EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); + eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder); recomputePluginOrdering(); }, @@ -6225,10 +6271,10 @@ if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { continue; } - var PluginModule = injectedNamesToPlugins[pluginName]; - if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) { + var pluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) { !!namesToPlugins[pluginName] ? process.env.NODE_ENV !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0; - namesToPlugins[pluginName] = PluginModule; + namesToPlugins[pluginName] = pluginModule; isOrderingDirty = true; } } @@ -6249,13 +6295,19 @@ if (dispatchConfig.registrationName) { return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null; } - for (var phase in dispatchConfig.phasedRegistrationNames) { - if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { - continue; - } - var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]]; - if (PluginModule) { - return PluginModule; + if (dispatchConfig.phasedRegistrationNames !== undefined) { + // pulling phasedRegistrationNames out of dispatchConfig helps Flow see + // that it is not undefined. + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + + for (var phase in phasedRegistrationNames) { + if (!phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var pluginModule = EventPluginRegistry.registrationNameModules[phasedRegistrationNames[phase]]; + if (pluginModule) { + return pluginModule; + } } } return null; @@ -6266,7 +6318,7 @@ * @private */ _resetEventPlugins: function () { - EventPluginOrder = null; + eventPluginOrder = null; for (var pluginName in namesToPlugins) { if (namesToPlugins.hasOwnProperty(pluginName)) { delete namesToPlugins[pluginName]; @@ -6304,7 +6356,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 48 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6315,18 +6367,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule EventPluginUtils */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var EventConstants = __webpack_require__(43); - var ReactErrorUtils = __webpack_require__(49); + var ReactErrorUtils = __webpack_require__(50); - var invariant = __webpack_require__(12); - var warning = __webpack_require__(15); + var invariant = __webpack_require__(41); + var warning = __webpack_require__(51); /** * Injected dependencies: @@ -6353,17 +6403,15 @@ } }; - var topLevelTypes = EventConstants.topLevelTypes; - function isEndish(topLevelType) { - return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel; + return topLevelType === 'topMouseUp' || topLevelType === 'topTouchEnd' || topLevelType === 'topTouchCancel'; } function isMoveish(topLevelType) { - return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove; + return topLevelType === 'topMouseMove' || topLevelType === 'topTouchMove'; } function isStartish(topLevelType) { - return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart; + return topLevelType === 'topMouseDown' || topLevelType === 'topTouchStart'; } var validateEventDispatches; @@ -6539,7 +6587,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 49 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6550,7 +6598,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactErrorUtils + * */ 'use strict'; @@ -6560,19 +6608,18 @@ /** * Call a function while guarding against errors that happens within it. * - * @param {?String} name of the guard to use for logging or debugging + * @param {String} name of the guard to use for logging or debugging * @param {Function} func The function to invoke * @param {*} a First argument * @param {*} b Second argument */ - function invokeGuardedCallback(name, func, a, b) { + function invokeGuardedCallback(name, func, a) { try { - return func(a, b); + func(a); } catch (x) { if (caughtError === null) { caughtError = x; } - return undefined; } } @@ -6605,11 +6652,12 @@ */ if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') { var fakeNode = document.createElement('react'); - ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) { - var boundFunc = func.bind(null, a, b); + ReactErrorUtils.invokeGuardedCallback = function (name, func, a) { + var boundFunc = func.bind(null, a); var evtType = 'react-' + name; fakeNode.addEventListener(evtType, boundFunc, false); var evt = document.createEvent('Event'); + // $FlowFixMe https://github.com/facebook/flow/issues/2336 evt.initEvent(evtType, false, false); fakeNode.dispatchEvent(evt); fakeNode.removeEventListener(evtType, boundFunc, false); @@ -6621,7 +6669,122 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 50 */ +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ + + 'use strict'; + + var emptyFunction = __webpack_require__(52); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if (process.env.NODE_ENV !== 'production') { + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function () { + return args[argIndex++]; + }); + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); + } + + module.exports = warning; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }, +/* 52 */ +/***/ function(module, exports) { + + "use strict"; + + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; + + module.exports = emptyFunction; + +/***/ }, +/* 53 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6632,15 +6795,14 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule accumulateInto * */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); /** * Accumulates items that must not be null or undefined into the first one. This @@ -6685,7 +6847,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 51 */ +/* 54 */ /***/ function(module, exports) { /** @@ -6696,7 +6858,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule forEachAccumulated * */ @@ -6721,7 +6882,7 @@ module.exports = forEachAccumulated; /***/ }, -/* 52 */ +/* 55 */ /***/ function(module, exports) { /** @@ -6761,7 +6922,7 @@ module.exports = ExecutionEnvironment; /***/ }, -/* 53 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6772,16 +6933,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule FallbackCompositionState */ 'use strict'; var _assign = __webpack_require__(8); - var PooledClass = __webpack_require__(10); + var PooledClass = __webpack_require__(57); - var getTextContentAccessor = __webpack_require__(54); + var getTextContentAccessor = __webpack_require__(58); /** * This helper class stores information about text content of a target node, @@ -6861,7 +7021,136 @@ module.exports = FallbackCompositionState; /***/ }, -/* 54 */ +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ + + 'use strict'; + + var _prodInvariant = __webpack_require__(39); + + var invariant = __webpack_require__(41); + + /** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ + var oneArgumentPooler = function (copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } + }; + + var twoArgumentPooler = function (a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } + }; + + var threeArgumentPooler = function (a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } + }; + + var fourArgumentPooler = function (a1, a2, a3, a4) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4); + return instance; + } else { + return new Klass(a1, a2, a3, a4); + } + }; + + var fiveArgumentPooler = function (a1, a2, a3, a4, a5) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4, a5); + return instance; + } else { + return new Klass(a1, a2, a3, a4, a5); + } + }; + + var standardReleaser = function (instance) { + var Klass = this; + !(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0; + instance.destructor(); + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } + }; + + var DEFAULT_POOL_SIZE = 10; + var DEFAULT_POOLER = oneArgumentPooler; + + /** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances. + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ + var addPoolingTo = function (CopyConstructor, pooler) { + // Casting as any so that flow ignores the actual implementation and trusts + // it to match the type we declared + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; + }; + + var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fourArgumentPooler: fourArgumentPooler, + fiveArgumentPooler: fiveArgumentPooler + }; + + module.exports = PooledClass; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) + +/***/ }, +/* 58 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6872,12 +7161,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule getTextContentAccessor */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); var contentKey = null; @@ -6899,7 +7187,7 @@ module.exports = getTextContentAccessor; /***/ }, -/* 55 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6910,12 +7198,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule SyntheticCompositionEvent */ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(60); /** * @interface Event @@ -6940,7 +7227,7 @@ module.exports = SyntheticCompositionEvent; /***/ }, -/* 56 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6951,17 +7238,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule SyntheticEvent */ 'use strict'; var _assign = __webpack_require__(8); - var PooledClass = __webpack_require__(10); + var PooledClass = __webpack_require__(57); - var emptyFunction = __webpack_require__(16); - var warning = __webpack_require__(15); + var emptyFunction = __webpack_require__(52); + var warning = __webpack_require__(51); var didWarnForAddedNewProperty = false; var isProxySupported = typeof Proxy === 'function'; @@ -7214,7 +7500,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 57 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /** @@ -7225,12 +7511,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule SyntheticInputEvent */ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(60); /** * @interface Event @@ -7256,46 +7541,7 @@ module.exports = SyntheticInputEvent; /***/ }, -/* 58 */ -/***/ function(module, exports) { - - "use strict"; - - /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - /** - * Allows extraction of a minified key. Let's the build system minify keys - * without losing the ability to dynamically use key strings as values - * themselves. Pass in an object with a single key/val pair and it will return - * you the string key of that single record. Suppose you want to grab the - * value for a key 'className' inside of an object. Key/val minification may - * have aliased that key to be 'xa12'. keyOf({className: null}) will return - * 'xa12' in that case. Resolve keys you want to use once at startup time, then - * reuse those resolutions. - */ - var keyOf = function keyOf(oneKeyObj) { - var key; - for (key in oneKeyObj) { - if (!oneKeyObj.hasOwnProperty(key)) { - continue; - } - return key; - } - return null; - }; - - module.exports = keyOf; - -/***/ }, -/* 59 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { /** @@ -7306,33 +7552,28 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ChangeEventPlugin */ 'use strict'; - var EventConstants = __webpack_require__(43); - var EventPluginHub = __webpack_require__(46); - var EventPropagators = __webpack_require__(45); - var ExecutionEnvironment = __webpack_require__(52); + var EventPluginHub = __webpack_require__(47); + var EventPropagators = __webpack_require__(46); + var ExecutionEnvironment = __webpack_require__(55); var ReactDOMComponentTree = __webpack_require__(38); - var ReactUpdates = __webpack_require__(60); - var SyntheticEvent = __webpack_require__(56); + var ReactUpdates = __webpack_require__(63); + var SyntheticEvent = __webpack_require__(60); - var getEventTarget = __webpack_require__(74); - var isEventSupported = __webpack_require__(75); - var isTextInputElement = __webpack_require__(76); - var keyOf = __webpack_require__(58); - - var topLevelTypes = EventConstants.topLevelTypes; + var getEventTarget = __webpack_require__(76); + var isEventSupported = __webpack_require__(77); + var isTextInputElement = __webpack_require__(78); var eventTypes = { change: { phasedRegistrationNames: { - bubbled: keyOf({ onChange: null }), - captured: keyOf({ onChangeCapture: null }) + bubbled: 'onChange', + captured: 'onChangeCapture' }, - dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange] + dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange'] } }; @@ -7397,17 +7638,17 @@ } function getTargetInstForChangeEvent(topLevelType, targetInst) { - if (topLevelType === topLevelTypes.topChange) { + if (topLevelType === 'topChange') { return targetInst; } } function handleEventsForChangeEventIE8(topLevelType, target, targetInst) { - if (topLevelType === topLevelTypes.topFocus) { + if (topLevelType === 'topFocus') { // stopWatching() should be a noop here but we call it just in case we // missed a blur event somehow. stopWatchingForChangeEventIE8(); startWatchingForChangeEventIE8(target, targetInst); - } else if (topLevelType === topLevelTypes.topBlur) { + } else if (topLevelType === 'topBlur') { stopWatchingForChangeEventIE8(); } } @@ -7505,7 +7746,7 @@ * If a `change` event should be fired, returns the target's ID. */ function getTargetInstForInputEvent(topLevelType, targetInst) { - if (topLevelType === topLevelTypes.topInput) { + if (topLevelType === 'topInput') { // In modern browsers (i.e., not IE8 or IE9), the input event is exactly // what we want so fall through here and trigger an abstract event return targetInst; @@ -7513,7 +7754,7 @@ } function handleEventsForInputEventIE(topLevelType, target, targetInst) { - if (topLevelType === topLevelTypes.topFocus) { + if (topLevelType === 'topFocus') { // In IE8, we can capture almost all .value changes by adding a // propertychange handler and looking for events with propertyName // equal to 'value' @@ -7529,14 +7770,14 @@ // missed a blur event somehow. stopWatchingForValueChange(); startWatchingForValueChange(target, targetInst); - } else if (topLevelType === topLevelTypes.topBlur) { + } else if (topLevelType === 'topBlur') { stopWatchingForValueChange(); } } // For IE8 and IE9. function getTargetInstForInputEventIE(topLevelType, targetInst) { - if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) { + if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') { // On the selectionchange event, the target is just document which isn't // helpful for us so just check activeElement instead. // @@ -7565,7 +7806,7 @@ } function getTargetInstForClickEvent(topLevelType, targetInst) { - if (topLevelType === topLevelTypes.topClick) { + if (topLevelType === 'topClick') { return targetInst; } } @@ -7625,7 +7866,7 @@ module.exports = ChangeEventPlugin; /***/ }, -/* 60 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7636,21 +7877,20 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactUpdates */ 'use strict'; - var _prodInvariant = __webpack_require__(11), + var _prodInvariant = __webpack_require__(39), _assign = __webpack_require__(8); - var CallbackQueue = __webpack_require__(61); - var PooledClass = __webpack_require__(10); - var ReactFeatureFlags = __webpack_require__(62); - var ReactReconciler = __webpack_require__(63); - var Transaction = __webpack_require__(73); + var CallbackQueue = __webpack_require__(64); + var PooledClass = __webpack_require__(57); + var ReactFeatureFlags = __webpack_require__(65); + var ReactReconciler = __webpack_require__(66); + var Transaction = __webpack_require__(75); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); var dirtyComponents = []; var updateBatchNumber = 0; @@ -7701,7 +7941,7 @@ /* useCreateElement */true); } - _assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, { + _assign(ReactUpdatesFlushTransaction.prototype, Transaction, { getTransactionWrappers: function () { return TRANSACTION_WRAPPERS; }, @@ -7717,7 +7957,7 @@ perform: function (method, scope, a) { // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` // with this transaction's wrappers around it. - return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); + return Transaction.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a); } }); @@ -7725,7 +7965,7 @@ function batchedUpdates(callback, a, b, c, d, e) { ensureInjected(); - batchingStrategy.batchedUpdates(callback, a, b, c, d, e); + return batchingStrategy.batchedUpdates(callback, a, b, c, d, e); } /** @@ -7771,7 +8011,7 @@ if (ReactFeatureFlags.logTopLevelRenders) { var namedComponent = component; // Duck type TopLevelWrapper. This is probably always true. - if (component._currentElement.props === component._renderedComponent._currentElement) { + if (component._currentElement.type.isReactTopLevelWrapper) { namedComponent = component._renderedComponent; } markerName = 'React update: ' + namedComponent.getName(); @@ -7882,7 +8122,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 61 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7893,17 +8133,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule CallbackQueue + * */ 'use strict'; - var _prodInvariant = __webpack_require__(11), - _assign = __webpack_require__(8); + var _prodInvariant = __webpack_require__(39); - var PooledClass = __webpack_require__(10); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var invariant = __webpack_require__(12); + var PooledClass = __webpack_require__(57); + + var invariant = __webpack_require__(41); /** * A specialized pseudo-event module to help keep track of components waiting to @@ -7916,12 +8157,15 @@ * @implements PooledClass * @internal */ - function CallbackQueue() { - this._callbacks = null; - this._contexts = null; - } - _assign(CallbackQueue.prototype, { + var CallbackQueue = function () { + function CallbackQueue(arg) { + _classCallCheck(this, CallbackQueue); + + this._callbacks = null; + this._contexts = null; + this._arg = arg; + } /** * Enqueues a callback to be invoked when `notifyAll` is invoked. @@ -7930,12 +8174,14 @@ * @param {?object} context Context to call `callback` with. * @internal */ - enqueue: function (callback, context) { + + + CallbackQueue.prototype.enqueue = function enqueue(callback, context) { this._callbacks = this._callbacks || []; - this._contexts = this._contexts || []; this._callbacks.push(callback); + this._contexts = this._contexts || []; this._contexts.push(context); - }, + }; /** * Invokes all enqueued callbacks and clears the queue. This is invoked after @@ -7943,58 +8189,64 @@ * * @internal */ - notifyAll: function () { + + + CallbackQueue.prototype.notifyAll = function notifyAll() { var callbacks = this._callbacks; var contexts = this._contexts; - if (callbacks) { + var arg = this._arg; + if (callbacks && contexts) { !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0; this._callbacks = null; this._contexts = null; for (var i = 0; i < callbacks.length; i++) { - callbacks[i].call(contexts[i]); + callbacks[i].call(contexts[i], arg); } callbacks.length = 0; contexts.length = 0; } - }, + }; - checkpoint: function () { + CallbackQueue.prototype.checkpoint = function checkpoint() { return this._callbacks ? this._callbacks.length : 0; - }, + }; - rollback: function (len) { - if (this._callbacks) { + CallbackQueue.prototype.rollback = function rollback(len) { + if (this._callbacks && this._contexts) { this._callbacks.length = len; this._contexts.length = len; } - }, + }; /** * Resets the internal queue. * * @internal */ - reset: function () { + + + CallbackQueue.prototype.reset = function reset() { this._callbacks = null; this._contexts = null; - }, + }; /** * `PooledClass` looks for this. */ - destructor: function () { + + + CallbackQueue.prototype.destructor = function destructor() { this.reset(); - } + }; - }); + return CallbackQueue; + }(); - PooledClass.addPoolingTo(CallbackQueue); - - module.exports = CallbackQueue; + module.exports = PooledClass.addPoolingTo(CallbackQueue); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 62 */ +/* 65 */ /***/ function(module, exports) { /** @@ -8005,7 +8257,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactFeatureFlags * */ @@ -8021,7 +8272,7 @@ module.exports = ReactFeatureFlags; /***/ }, -/* 63 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8032,15 +8283,14 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactReconciler */ 'use strict'; - var ReactRef = __webpack_require__(64); - var ReactInstrumentation = __webpack_require__(66); + var ReactRef = __webpack_require__(67); + var ReactInstrumentation = __webpack_require__(69); - var warning = __webpack_require__(15); + var warning = __webpack_require__(51); /** * Helper to call ReactRef.attachRefs with this composite component, split out @@ -8195,7 +8445,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 64 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8206,12 +8456,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactRef + * */ 'use strict'; - var ReactOwner = __webpack_require__(65); + var ReactOwner = __webpack_require__(68); var ReactRef = {}; @@ -8234,7 +8484,7 @@ } ReactRef.attachRefs = function (instance, element) { - if (element === null || element === false) { + if (element === null || typeof element !== 'object') { return; } var ref = element.ref; @@ -8256,19 +8506,27 @@ // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - var prevEmpty = prevElement === null || prevElement === false; - var nextEmpty = nextElement === null || nextElement === false; + var prevRef = null; + var prevOwner = null; + if (prevElement !== null && typeof prevElement === 'object') { + prevRef = prevElement.ref; + prevOwner = prevElement._owner; + } - return ( - // This has a few false positives w/r/t empty components. - prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref || - // If owner changes but we have an unchanged function ref, don't update refs - typeof nextElement.ref === 'string' && nextElement._owner !== prevElement._owner - ); + var nextRef = null; + var nextOwner = null; + if (nextElement !== null && typeof nextElement === 'object') { + nextRef = nextElement.ref; + nextOwner = nextElement._owner; + } + + return prevRef !== nextRef || + // If owner changes but we have an unchanged function ref, don't update refs + typeof nextRef === 'string' && nextOwner !== prevOwner; }; ReactRef.detachRefs = function (instance, element) { - if (element === null || element === false) { + if (element === null || typeof element !== 'object') { return; } var ref = element.ref; @@ -8280,7 +8538,7 @@ module.exports = ReactRef; /***/ }, -/* 65 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8291,14 +8549,23 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactOwner + * */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + function isValidOwner(object) { + return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); + } /** * ReactOwners are capable of storing references to owned components. @@ -8331,16 +8598,6 @@ * @class ReactOwner */ var ReactOwner = { - - /** - * @param {?object} object - * @return {boolean} True if `object` is a valid owner. - * @final - */ - isValidOwner: function (object) { - return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function'); - }, - /** * Adds a component by ref to an owner component. * @@ -8351,7 +8608,7 @@ * @internal */ addComponentAsRefTo: function (component, ref, owner) { - !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).') : _prodInvariant('119') : void 0; + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('119') : void 0; owner.attachRef(ref, component); }, @@ -8365,7 +8622,7 @@ * @internal */ removeComponentAsRefFrom: function (component, ref, owner) { - !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).') : _prodInvariant('120') : void 0; + !isValidOwner(owner) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. You might be removing a ref to a component that was not created inside a component\'s `render` method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).') : _prodInvariant('120') : void 0; var ownerPublicInstance = owner.getPublicInstance(); // Check that `component`'s owner is still alive and that `component` is still the current ref // because we do not want to detach the ref if another component stole it. @@ -8380,7 +8637,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 66 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8391,15 +8648,17 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactInstrumentation + * */ 'use strict'; + // Trust the developer to only use ReactInstrumentation with a __DEV__ check + var debugTool = null; if (process.env.NODE_ENV !== 'production') { - var ReactDebugTool = __webpack_require__(67); + var ReactDebugTool = __webpack_require__(70); debugTool = ReactDebugTool; } @@ -8407,7 +8666,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 67 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8418,19 +8677,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDebugTool + * */ 'use strict'; - var ReactInvalidSetStateWarningHook = __webpack_require__(68); - var ReactHostOperationHistoryHook = __webpack_require__(69); + var ReactInvalidSetStateWarningHook = __webpack_require__(71); + var ReactHostOperationHistoryHook = __webpack_require__(72); var ReactComponentTreeHook = __webpack_require__(30); - var ReactChildrenMutationWarningHook = __webpack_require__(70); - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); - var performanceNow = __webpack_require__(71); - var warning = __webpack_require__(15); + var performanceNow = __webpack_require__(73); + var warning = __webpack_require__(51); var hooks = []; var didHookThrowForEvent = {}; @@ -8458,11 +8716,11 @@ var flushHistory = []; var lifeCycleTimerStack = []; var currentFlushNesting = 0; - var currentFlushMeasurements = null; - var currentFlushStartTime = null; + var currentFlushMeasurements = []; + var currentFlushStartTime = 0; var currentTimerDebugID = null; - var currentTimerStartTime = null; - var currentTimerNestedFlushDuration = null; + var currentTimerStartTime = 0; + var currentTimerNestedFlushDuration = 0; var currentTimerType = null; var lifeCycleTimerHasWarned = false; @@ -8482,7 +8740,7 @@ updateCount: ReactComponentTreeHook.getUpdateCount(id), childIDs: ReactComponentTreeHook.getChildIDs(id), // Text nodes don't have owners but this is close enough. - ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID), + ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0, parentID: parentID }; return tree; @@ -8491,12 +8749,12 @@ function resetMeasurements() { var previousStartTime = currentFlushStartTime; - var previousMeasurements = currentFlushMeasurements || []; + var previousMeasurements = currentFlushMeasurements; var previousOperations = ReactHostOperationHistoryHook.getHistory(); if (currentFlushNesting === 0) { - currentFlushStartTime = null; - currentFlushMeasurements = null; + currentFlushStartTime = 0; + currentFlushMeasurements = []; clearHistory(); return; } @@ -8517,7 +8775,7 @@ } function checkDebugID(debugID) { - var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var allowRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (allowRoot && debugID === 0) { return; @@ -8556,8 +8814,8 @@ duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration }); } - currentTimerStartTime = null; - currentTimerNestedFlushDuration = null; + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; currentTimerDebugID = null; currentTimerType = null; } @@ -8570,19 +8828,18 @@ timerType: currentTimerType }; lifeCycleTimerStack.push(currentTimer); - currentTimerStartTime = null; - currentTimerNestedFlushDuration = null; + currentTimerStartTime = 0; + currentTimerNestedFlushDuration = 0; currentTimerDebugID = null; currentTimerType = null; } function resumeCurrentLifeCycleTimer() { - var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(); - - var startTime = _lifeCycleTimerStack$.startTime; - var nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime; - var debugID = _lifeCycleTimerStack$.debugID; - var timerType = _lifeCycleTimerStack$.timerType; + var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), + startTime = _lifeCycleTimerStack$.startTime, + nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, + debugID = _lifeCycleTimerStack$.debugID, + timerType = _lifeCycleTimerStack$.timerType; var nestedFlushDuration = performanceNow() - nestedFlushStartTime; currentTimerStartTime = startTime; @@ -8591,6 +8848,60 @@ currentTimerType = timerType; } + var lastMarkTimeStamp = 0; + var canUsePerformanceMeasure = + // $FlowFixMe https://github.com/facebook/flow/issues/2345 + typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; + + function shouldMark(debugID) { + if (!isProfiling || !canUsePerformanceMeasure) { + return false; + } + var element = ReactComponentTreeHook.getElement(debugID); + if (element == null || typeof element !== 'object') { + return false; + } + var isHostElement = typeof element.type === 'string'; + if (isHostElement) { + return false; + } + return true; + } + + function markBegin(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + lastMarkTimeStamp = performanceNow(); + performance.mark(markName); + } + + function markEnd(debugID, markType) { + if (!shouldMark(debugID)) { + return; + } + + var markName = debugID + '::' + markType; + var displayName = ReactComponentTreeHook.getDisplayName(debugID) || 'Unknown'; + + // Chrome has an issue of dropping markers recorded too fast: + // https://bugs.chromium.org/p/chromium/issues/detail?id=640652 + // To work around this, we will not report very small measurements. + // I determined the magic number by tweaking it back and forth. + // 0.05ms was enough to prevent the issue, but I set it to 0.1ms to be safe. + // When the bug is fixed, we can `measure()` unconditionally if we want to. + var timeStamp = performanceNow(); + if (timeStamp - lastMarkTimeStamp > 0.1) { + var measurementName = displayName + ' [' + markType + ']'; + performance.measure(measurementName, markName); + } + + performance.clearMarks(markName); + performance.clearMeasures(measurementName); + } + var ReactDebugTool = { addHook: function (hook) { hooks.push(hook); @@ -8643,11 +8954,13 @@ onBeginLifeCycleTimer: function (debugID, timerType) { checkDebugID(debugID); emitEvent('onBeginLifeCycleTimer', debugID, timerType); + markBegin(debugID, timerType); beginLifeCycleTimer(debugID, timerType); }, onEndLifeCycleTimer: function (debugID, timerType) { checkDebugID(debugID); endLifeCycleTimer(debugID, timerType); + markEnd(debugID, timerType); emitEvent('onEndLifeCycleTimer', debugID, timerType); }, onBeginProcessingChildContext: function () { @@ -8656,9 +8969,9 @@ onEndProcessingChildContext: function () { emitEvent('onEndProcessingChildContext'); }, - onHostOperation: function (debugID, type, payload) { - checkDebugID(debugID); - emitEvent('onHostOperation', debugID, type, payload); + onHostOperation: function (operation) { + checkDebugID(operation.instanceID); + emitEvent('onHostOperation', operation); }, onSetState: function () { emitEvent('onSetState'); @@ -8672,25 +8985,31 @@ checkDebugID(debugID); checkDebugID(parentDebugID, true); emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); + markBegin(debugID, 'mount'); }, onMountComponent: function (debugID) { checkDebugID(debugID); + markEnd(debugID, 'mount'); emitEvent('onMountComponent', debugID); }, onBeforeUpdateComponent: function (debugID, element) { checkDebugID(debugID); emitEvent('onBeforeUpdateComponent', debugID, element); + markBegin(debugID, 'update'); }, onUpdateComponent: function (debugID) { checkDebugID(debugID); + markEnd(debugID, 'update'); emitEvent('onUpdateComponent', debugID); }, onBeforeUnmountComponent: function (debugID) { checkDebugID(debugID); emitEvent('onBeforeUnmountComponent', debugID); + markBegin(debugID, 'unmount'); }, onUnmountComponent: function (debugID) { checkDebugID(debugID); + markEnd(debugID, 'unmount'); emitEvent('onUnmountComponent', debugID); }, onTestEvent: function () { @@ -8704,7 +9023,6 @@ ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); ReactDebugTool.addHook(ReactComponentTreeHook); - ReactDebugTool.addHook(ReactChildrenMutationWarningHook); var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; if (/[?&]react_perf\b/.test(url)) { ReactDebugTool.beginProfiling(); @@ -8714,7 +9032,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 68 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8725,12 +9043,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactInvalidSetStateWarningHook + * */ 'use strict'; - var warning = __webpack_require__(15); + var warning = __webpack_require__(51); if (process.env.NODE_ENV !== 'production') { var processingChildContext = false; @@ -8756,7 +9074,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 69 */ +/* 72 */ /***/ function(module, exports) { /** @@ -8767,7 +9085,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactHostOperationHistoryHook + * */ 'use strict'; @@ -8775,12 +9093,8 @@ var history = []; var ReactHostOperationHistoryHook = { - onHostOperation: function (debugID, type, payload) { - history.push({ - instanceID: debugID, - type: type, - payload: payload - }); + onHostOperation: function (operation) { + history.push(operation); }, clearHistory: function () { if (ReactHostOperationHistoryHook._preventClearing) { @@ -8798,67 +9112,7 @@ module.exports = ReactHostOperationHistoryHook; /***/ }, -/* 70 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactChildrenMutationWarningHook - */ - - 'use strict'; - - var ReactComponentTreeHook = __webpack_require__(30); - - var warning = __webpack_require__(15); - - function handleElement(debugID, element) { - if (element == null) { - return; - } - if (element._shadowChildren === undefined) { - return; - } - if (element._shadowChildren === element.props.children) { - return; - } - var isMutated = false; - if (Array.isArray(element._shadowChildren)) { - if (element._shadowChildren.length === element.props.children.length) { - for (var i = 0; i < element._shadowChildren.length; i++) { - if (element._shadowChildren[i] !== element.props.children[i]) { - isMutated = true; - } - } - } else { - isMutated = true; - } - } - if (!Array.isArray(element._shadowChildren) || isMutated) { - process.env.NODE_ENV !== 'production' ? warning(false, 'Component\'s children should not be mutated.%s', ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; - } - } - - var ReactChildrenMutationWarningHook = { - onMountComponent: function (debugID) { - handleElement(debugID, ReactComponentTreeHook.getElement(debugID)); - }, - onUpdateComponent: function (debugID) { - handleElement(debugID, ReactComponentTreeHook.getElement(debugID)); - } - }; - - module.exports = ReactChildrenMutationWarningHook; - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) - -/***/ }, -/* 71 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -8874,7 +9128,7 @@ * @typechecks */ - var performance = __webpack_require__(72); + var performance = __webpack_require__(74); var performanceNow; @@ -8896,7 +9150,7 @@ module.exports = performanceNow; /***/ }, -/* 72 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8912,7 +9166,7 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); var performance; @@ -8923,7 +9177,7 @@ module.exports = performance || {}; /***/ }, -/* 73 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8934,14 +9188,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule Transaction + * */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); + + var OBSERVED_ERROR = {}; /** * `Transaction` creates a black box that is able to wrap any method such that @@ -9004,7 +9260,7 @@ * * @class Transaction */ - var Mixin = { + var TransactionImpl = { /** * Sets up this instance so that it is prepared for collecting metrics. Does * so such that this setup method may be used on an instance that is already @@ -9094,10 +9350,10 @@ // OBSERVED_ERROR state before overwriting it with the real return value // of initialize -- if it's still set to OBSERVED_ERROR in the finally // block, it means wrapper.initialize threw. - this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; + this.wrapperInitData[i] = OBSERVED_ERROR; this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null; } finally { - if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { + if (this.wrapperInitData[i] === OBSERVED_ERROR) { // The initializer for wrapper i threw an error; initialize the // remaining wrappers but silence any exceptions from them to ensure // that the first error is the one to bubble up. @@ -9128,7 +9384,7 @@ // close -- if it's still set to true in the finally block, it means // wrapper.close threw. errorThrown = true; - if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) { + if (initData !== OBSERVED_ERROR && wrapper.close) { wrapper.close.call(this, initData); } errorThrown = false; @@ -9147,22 +9403,11 @@ } }; - var Transaction = { - - Mixin: Mixin, - - /** - * Token to look for to determine if an error occurred. - */ - OBSERVED_ERROR: {} - - }; - - module.exports = Transaction; + module.exports = TransactionImpl; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 74 */ +/* 76 */ /***/ function(module, exports) { /** @@ -9173,7 +9418,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule getEventTarget */ 'use strict'; @@ -9202,7 +9446,7 @@ module.exports = getEventTarget; /***/ }, -/* 75 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9213,12 +9457,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule isEventSupported */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -9267,7 +9510,7 @@ module.exports = isEventSupported; /***/ }, -/* 76 */ +/* 78 */ /***/ function(module, exports) { /** @@ -9278,7 +9521,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule isTextInputElement * */ @@ -9323,8 +9565,8 @@ module.exports = isTextInputElement; /***/ }, -/* 77 */ -/***/ function(module, exports, __webpack_require__) { +/* 79 */ +/***/ function(module, exports) { /** * Copyright 2013-present, Facebook, Inc. @@ -9334,13 +9576,10 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DefaultEventPluginOrder */ 'use strict'; - var keyOf = __webpack_require__(58); - /** * Module that is injectable into `EventPluginHub`, that specifies a * deterministic ordering of `EventPlugin`s. A convenient way to reason about @@ -9350,12 +9589,13 @@ * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that * preventing default on events is convenient in `SimpleEventPlugin` handlers. */ - var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })]; + + var DefaultEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin']; module.exports = DefaultEventPluginOrder; /***/ }, -/* 78 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9366,28 +9606,22 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule EnterLeaveEventPlugin */ 'use strict'; - var EventConstants = __webpack_require__(43); - var EventPropagators = __webpack_require__(45); + var EventPropagators = __webpack_require__(46); var ReactDOMComponentTree = __webpack_require__(38); - var SyntheticMouseEvent = __webpack_require__(79); - - var keyOf = __webpack_require__(58); - - var topLevelTypes = EventConstants.topLevelTypes; + var SyntheticMouseEvent = __webpack_require__(81); var eventTypes = { mouseEnter: { - registrationName: keyOf({ onMouseEnter: null }), - dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] + registrationName: 'onMouseEnter', + dependencies: ['topMouseOut', 'topMouseOver'] }, mouseLeave: { - registrationName: keyOf({ onMouseLeave: null }), - dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver] + registrationName: 'onMouseLeave', + dependencies: ['topMouseOut', 'topMouseOver'] } }; @@ -9403,10 +9637,10 @@ * the `mouseover` top-level event. */ extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) { - if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) { return null; } - if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) { + if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') { // Must not be a mouse in or mouse out - ignoring. return null; } @@ -9427,7 +9661,7 @@ var from; var to; - if (topLevelType === topLevelTypes.topMouseOut) { + if (topLevelType === 'topMouseOut') { from = targetInst; var related = nativeEvent.relatedTarget || nativeEvent.toElement; to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null; @@ -9465,7 +9699,7 @@ module.exports = EnterLeaveEventPlugin; /***/ }, -/* 79 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9476,15 +9710,14 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule SyntheticMouseEvent */ 'use strict'; - var SyntheticUIEvent = __webpack_require__(80); - var ViewportMetrics = __webpack_require__(81); + var SyntheticUIEvent = __webpack_require__(82); + var ViewportMetrics = __webpack_require__(83); - var getEventModifierState = __webpack_require__(82); + var getEventModifierState = __webpack_require__(84); /** * @interface MouseEvent @@ -9542,7 +9775,7 @@ module.exports = SyntheticMouseEvent; /***/ }, -/* 80 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9553,14 +9786,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule SyntheticUIEvent */ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(60); - var getEventTarget = __webpack_require__(74); + var getEventTarget = __webpack_require__(76); /** * @interface UIEvent @@ -9606,7 +9838,7 @@ module.exports = SyntheticUIEvent; /***/ }, -/* 81 */ +/* 83 */ /***/ function(module, exports) { /** @@ -9617,7 +9849,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ViewportMetrics */ 'use strict'; @@ -9638,7 +9869,7 @@ module.exports = ViewportMetrics; /***/ }, -/* 82 */ +/* 84 */ /***/ function(module, exports) { /** @@ -9649,7 +9880,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule getEventModifierState */ 'use strict'; @@ -9686,7 +9916,7 @@ module.exports = getEventModifierState; /***/ }, -/* 83 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9697,12 +9927,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule HTMLDOMPropertyConfig */ 'use strict'; - var DOMProperty = __webpack_require__(39); + var DOMProperty = __webpack_require__(40); var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; @@ -9903,7 +10132,7 @@ module.exports = HTMLDOMPropertyConfig; /***/ }, -/* 84 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9914,13 +10143,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactComponentBrowserEnvironment */ 'use strict'; - var DOMChildrenOperations = __webpack_require__(85); - var ReactDOMIDOperations = __webpack_require__(97); + var DOMChildrenOperations = __webpack_require__(87); + var ReactDOMIDOperations = __webpack_require__(98); /** * Abstracts away all functionality of the reconciler that requires knowledge of @@ -9938,7 +10166,7 @@ module.exports = ReactComponentBrowserEnvironment; /***/ }, -/* 85 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9949,20 +10177,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DOMChildrenOperations */ 'use strict'; - var DOMLazyTree = __webpack_require__(86); - var Danger = __webpack_require__(92); - var ReactMultiChildUpdateTypes = __webpack_require__(96); + var DOMLazyTree = __webpack_require__(88); + var Danger = __webpack_require__(94); var ReactDOMComponentTree = __webpack_require__(38); - var ReactInstrumentation = __webpack_require__(66); + var ReactInstrumentation = __webpack_require__(69); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(89); - var setInnerHTML = __webpack_require__(88); - var setTextContent = __webpack_require__(90); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(91); + var setInnerHTML = __webpack_require__(90); + var setTextContent = __webpack_require__(92); function getNodeAfter(parentNode, node) { // Special case for text components, which return [open, close] comments @@ -10055,7 +10281,11 @@ } if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, + type: 'replace text', + payload: stringText + }); } } @@ -10064,11 +10294,19 @@ dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) { Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup); if (prevInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onHostOperation(prevInstance._debugID, 'replace with', markup.toString()); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: prevInstance._debugID, + type: 'replace with', + payload: markup.toString() + }); } else { var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node); if (nextInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onHostOperation(nextInstance._debugID, 'mount', markup.toString()); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: nextInstance._debugID, + type: 'mount', + payload: markup.toString() + }); } } }; @@ -10098,34 +10336,54 @@ for (var k = 0; k < updates.length; k++) { var update = updates[k]; switch (update.type) { - case ReactMultiChildUpdateTypes.INSERT_MARKUP: + case 'INSERT_MARKUP': insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode)); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() }); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'insert child', + payload: { toIndex: update.toIndex, content: update.content.toString() } + }); } break; - case ReactMultiChildUpdateTypes.MOVE_EXISTING: + case 'MOVE_EXISTING': moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode)); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex }); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'move child', + payload: { fromIndex: update.fromIndex, toIndex: update.toIndex } + }); } break; - case ReactMultiChildUpdateTypes.SET_MARKUP: + case 'SET_MARKUP': setInnerHTML(parentNode, update.content); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace children', update.content.toString()); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace children', + payload: update.content.toString() + }); } break; - case ReactMultiChildUpdateTypes.TEXT_CONTENT: + case 'TEXT_CONTENT': setTextContent(parentNode, update.content); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace text', update.content.toString()); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'replace text', + payload: update.content.toString() + }); } break; - case ReactMultiChildUpdateTypes.REMOVE_NODE: + case 'REMOVE_NODE': removeChild(parentNode, update.fromNode); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex }); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: parentNodeDebugID, + type: 'remove child', + payload: { fromIndex: update.fromIndex } + }); } break; } @@ -10138,7 +10396,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 86 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10149,16 +10407,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DOMLazyTree */ 'use strict'; - var DOMNamespaces = __webpack_require__(87); - var setInnerHTML = __webpack_require__(88); + var DOMNamespaces = __webpack_require__(89); + var setInnerHTML = __webpack_require__(90); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(89); - var setTextContent = __webpack_require__(90); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(91); + var setTextContent = __webpack_require__(92); var ELEMENT_NODE_TYPE = 1; var DOCUMENT_FRAGMENT_NODE_TYPE = 11; @@ -10261,7 +10518,7 @@ module.exports = DOMLazyTree; /***/ }, -/* 87 */ +/* 89 */ /***/ function(module, exports) { /** @@ -10272,7 +10529,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DOMNamespaces */ 'use strict'; @@ -10286,7 +10542,7 @@ module.exports = DOMNamespaces; /***/ }, -/* 88 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10297,18 +10553,17 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule setInnerHTML */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); - var DOMNamespaces = __webpack_require__(87); + var ExecutionEnvironment = __webpack_require__(55); + var DOMNamespaces = __webpack_require__(89); var WHITESPACE_TEST = /^[ \r\n\t\f]/; var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; - var createMicrosoftUnsafeLocalFunction = __webpack_require__(89); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(91); // SVG temp container for IE lacking innerHTML var reusableSVGContainer; @@ -10389,7 +10644,7 @@ module.exports = setInnerHTML; /***/ }, -/* 89 */ +/* 91 */ /***/ function(module, exports) { /** @@ -10400,7 +10655,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule createMicrosoftUnsafeLocalFunction */ /* globals MSApp */ @@ -10426,7 +10680,7 @@ module.exports = createMicrosoftUnsafeLocalFunction; /***/ }, -/* 90 */ +/* 92 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10437,14 +10691,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule setTextContent */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); - var escapeTextContentForBrowser = __webpack_require__(91); - var setInnerHTML = __webpack_require__(88); + var ExecutionEnvironment = __webpack_require__(55); + var escapeTextContentForBrowser = __webpack_require__(93); + var setInnerHTML = __webpack_require__(90); /** * Set the textContent property of a node, ensuring that whitespace is preserved @@ -10471,6 +10724,10 @@ if (ExecutionEnvironment.canUseDOM) { if (!('textContent' in document.documentElement)) { setTextContent = function (node, text) { + if (node.nodeType === 3) { + node.nodeValue = text; + return; + } setInnerHTML(node, escapeTextContentForBrowser(text)); }; } @@ -10479,7 +10736,7 @@ module.exports = setTextContent; /***/ }, -/* 91 */ +/* 93 */ /***/ function(module, exports) { /** @@ -10515,7 +10772,6 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - * @providesModule escapeTextContentForBrowser */ 'use strict'; @@ -10607,7 +10863,7 @@ module.exports = escapeTextContentForBrowser; /***/ }, -/* 92 */ +/* 94 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -10618,19 +10874,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule Danger */ 'use strict'; - var _prodInvariant = __webpack_require__(11); + var _prodInvariant = __webpack_require__(39); - var DOMLazyTree = __webpack_require__(86); - var ExecutionEnvironment = __webpack_require__(52); + var DOMLazyTree = __webpack_require__(88); + var ExecutionEnvironment = __webpack_require__(55); - var createNodesFromMarkup = __webpack_require__(93); - var emptyFunction = __webpack_require__(16); - var invariant = __webpack_require__(12); + var createNodesFromMarkup = __webpack_require__(95); + var emptyFunction = __webpack_require__(52); + var invariant = __webpack_require__(41); var Danger = { @@ -10661,7 +10916,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 93 */ +/* 95 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10679,11 +10934,11 @@ /*eslint-disable fb-www/unsafe-html*/ - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); - var createArrayFromMixed = __webpack_require__(94); - var getMarkupWrap = __webpack_require__(95); - var invariant = __webpack_require__(12); + var createArrayFromMixed = __webpack_require__(96); + var getMarkupWrap = __webpack_require__(97); + var invariant = __webpack_require__(41); /** * Dummy container used to render all markup. @@ -10750,7 +11005,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 94 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10766,7 +11021,7 @@ * @typechecks */ - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); /** * Convert array-like objects to arrays. @@ -10882,7 +11137,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 95 */ +/* 97 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10899,9 +11154,9 @@ /*eslint-disable fb-www/unsafe-html */ - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); - var invariant = __webpack_require__(12); + var invariant = __webpack_require__(41); /** * Dummy container used to detect which wraps are necessary. @@ -10982,7 +11237,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 96 */ +/* 98 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10993,49 +11248,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactMultiChildUpdateTypes */ 'use strict'; - var keyMirror = __webpack_require__(44); - - /** - * When a component's children are updated, a series of update configuration - * objects are created in order to batch and serialize the required changes. - * - * Enumerates all the possible types of update configurations. - * - * @internal - */ - var ReactMultiChildUpdateTypes = keyMirror({ - INSERT_MARKUP: null, - MOVE_EXISTING: null, - REMOVE_NODE: null, - SET_MARKUP: null, - TEXT_CONTENT: null - }); - - module.exports = ReactMultiChildUpdateTypes; - -/***/ }, -/* 97 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactDOMIDOperations - */ - - 'use strict'; - - var DOMChildrenOperations = __webpack_require__(85); + var DOMChildrenOperations = __webpack_require__(87); var ReactDOMComponentTree = __webpack_require__(38); /** @@ -11058,7 +11275,7 @@ module.exports = ReactDOMIDOperations; /***/ }, -/* 98 */ +/* 99 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -11069,45 +11286,41 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactDOMComponent */ /* global hasOwnProperty:true */ 'use strict'; - var _prodInvariant = __webpack_require__(11), + var _prodInvariant = __webpack_require__(39), _assign = __webpack_require__(8); - var AutoFocusUtils = __webpack_require__(99); - var CSSPropertyOperations = __webpack_require__(101); - var DOMLazyTree = __webpack_require__(86); - var DOMNamespaces = __webpack_require__(87); - var DOMProperty = __webpack_require__(39); - var DOMPropertyOperations = __webpack_require__(109); - var EventConstants = __webpack_require__(43); - var EventPluginHub = __webpack_require__(46); - var EventPluginRegistry = __webpack_require__(47); - var ReactBrowserEventEmitter = __webpack_require__(111); - var ReactDOMButton = __webpack_require__(114); - var ReactDOMComponentFlags = __webpack_require__(40); + var AutoFocusUtils = __webpack_require__(100); + var CSSPropertyOperations = __webpack_require__(102); + var DOMLazyTree = __webpack_require__(88); + var DOMNamespaces = __webpack_require__(89); + var DOMProperty = __webpack_require__(40); + var DOMPropertyOperations = __webpack_require__(110); + var EventPluginHub = __webpack_require__(47); + var EventPluginRegistry = __webpack_require__(48); + var ReactBrowserEventEmitter = __webpack_require__(112); + var ReactDOMComponentFlags = __webpack_require__(42); var ReactDOMComponentTree = __webpack_require__(38); - var ReactDOMInput = __webpack_require__(116); - var ReactDOMOption = __webpack_require__(119); - var ReactDOMSelect = __webpack_require__(120); - var ReactDOMTextarea = __webpack_require__(121); - var ReactInstrumentation = __webpack_require__(66); - var ReactMultiChild = __webpack_require__(122); - var ReactServerRenderingTransaction = __webpack_require__(134); + var ReactDOMInput = __webpack_require__(115); + var ReactDOMOption = __webpack_require__(118); + var ReactDOMSelect = __webpack_require__(119); + var ReactDOMTextarea = __webpack_require__(120); + var ReactInstrumentation = __webpack_require__(69); + var ReactMultiChild = __webpack_require__(121); + var ReactServerRenderingTransaction = __webpack_require__(141); - var emptyFunction = __webpack_require__(16); - var escapeTextContentForBrowser = __webpack_require__(91); - var invariant = __webpack_require__(12); - var isEventSupported = __webpack_require__(75); - var keyOf = __webpack_require__(58); - var shallowEqual = __webpack_require__(129); - var validateDOMNesting = __webpack_require__(137); - var warning = __webpack_require__(15); + var emptyFunction = __webpack_require__(52); + var escapeTextContentForBrowser = __webpack_require__(93); + var invariant = __webpack_require__(41); + var isEventSupported = __webpack_require__(77); + var shallowEqual = __webpack_require__(131); + var validateDOMNesting = __webpack_require__(144); + var warning = __webpack_require__(51); var Flags = ReactDOMComponentFlags; var deleteListener = EventPluginHub.deleteListener; @@ -11118,8 +11331,8 @@ // For quickly matching children type, to test if can be treated as content. var CONTENT_TYPES = { 'string': true, 'number': true }; - var STYLE = keyOf({ style: null }); - var HTML = keyOf({ __html: null }); + var STYLE = 'style'; + var HTML = '__html'; var RESERVED_PROPS = { children: null, dangerouslySetInnerHTML: null, @@ -11326,7 +11539,7 @@ switch (inst._tag) { case 'iframe': case 'object': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)]; + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; break; case 'video': case 'audio': @@ -11335,23 +11548,23 @@ // Create listener for each media event for (var event in mediaEvents) { if (mediaEvents.hasOwnProperty(event)) { - inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node)); + inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(event, mediaEvents[event], node)); } } break; case 'source': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node)]; + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node)]; break; case 'img': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)]; + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topError', 'error', node), ReactBrowserEventEmitter.trapBubbledEvent('topLoad', 'load', node)]; break; case 'form': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)]; + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topReset', 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent('topSubmit', 'submit', node)]; break; case 'input': case 'select': case 'textarea': - inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topInvalid, 'invalid', node)]; + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent('topInvalid', 'invalid', node)]; break; } } @@ -11381,7 +11594,6 @@ 'wbr': true }; - // NOTE: menuitem's close tag should be omitted, but that causes problems. var newlineEatingTags = { 'listing': true, 'pre': true, @@ -11490,9 +11702,6 @@ }; transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this); break; - case 'button': - props = ReactDOMButton.getHostProps(this, props, hostParent); - break; case 'input': ReactDOMInput.mountWrapper(this, props, hostParent); props = ReactDOMInput.getHostProps(this, props); @@ -11796,10 +12005,6 @@ var nextProps = this._currentElement.props; switch (this._tag) { - case 'button': - lastProps = ReactDOMButton.getHostProps(this, lastProps); - nextProps = ReactDOMButton.getHostProps(this, nextProps); - break; case 'input': lastProps = ReactDOMInput.getHostProps(this, lastProps); nextProps = ReactDOMInput.getHostProps(this, nextProps); @@ -12070,7 +12275,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 99 */ +/* 100 */ /***/ function(module, exports, __webpack_require__) { /** @@ -12081,14 +12286,13 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule AutoFocusUtils */ 'use strict'; var ReactDOMComponentTree = __webpack_require__(38); - var focusNode = __webpack_require__(100); + var focusNode = __webpack_require__(101); var AutoFocusUtils = { focusDOMComponent: function () { @@ -12099,7 +12303,7 @@ module.exports = AutoFocusUtils; /***/ }, -/* 100 */ +/* 101 */ /***/ function(module, exports) { /** @@ -12130,7 +12334,7 @@ module.exports = focusNode; /***/ }, -/* 101 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -12141,20 +12345,19 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule CSSPropertyOperations */ 'use strict'; - var CSSProperty = __webpack_require__(102); - var ExecutionEnvironment = __webpack_require__(52); - var ReactInstrumentation = __webpack_require__(66); + var CSSProperty = __webpack_require__(103); + var ExecutionEnvironment = __webpack_require__(55); + var ReactInstrumentation = __webpack_require__(69); - var camelizeStyleName = __webpack_require__(103); - var dangerousStyleValue = __webpack_require__(105); - var hyphenateStyleName = __webpack_require__(106); - var memoizeStringOnly = __webpack_require__(108); - var warning = __webpack_require__(15); + var camelizeStyleName = __webpack_require__(104); + var dangerousStyleValue = __webpack_require__(106); + var hyphenateStyleName = __webpack_require__(107); + var memoizeStringOnly = __webpack_require__(109); + var warning = __webpack_require__(51); var processStyleName = memoizeStringOnly(function (styleName) { return hyphenateStyleName(styleName); @@ -12303,7 +12506,11 @@ */ setValueForStyles: function (node, styles, component) { if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: component._debugID, + type: 'update styles', + payload: styles + }); } var style = node.style; @@ -12341,7 +12548,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 102 */ +/* 103 */ /***/ function(module, exports) { /** @@ -12352,7 +12559,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule CSSProperty */ 'use strict'; @@ -12494,7 +12700,7 @@ module.exports = CSSProperty; /***/ }, -/* 103 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { /** @@ -12510,7 +12716,7 @@ 'use strict'; - var camelize = __webpack_require__(104); + var camelize = __webpack_require__(105); var msPattern = /^-ms-/; @@ -12538,7 +12744,7 @@ module.exports = camelizeStyleName; /***/ }, -/* 104 */ +/* 105 */ /***/ function(module, exports) { "use strict"; @@ -12574,7 +12780,7 @@ module.exports = camelize; /***/ }, -/* 105 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -12585,13 +12791,12 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule dangerousStyleValue */ 'use strict'; - var CSSProperty = __webpack_require__(102); - var warning = __webpack_require__(15); + var CSSProperty = __webpack_require__(103); + var warning = __webpack_require__(51); var isUnitlessNumber = CSSProperty.isUnitlessNumber; var styleWarnings = {}; @@ -12659,7 +12864,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 106 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { /** @@ -12675,7 +12880,7 @@ 'use strict'; - var hyphenate = __webpack_require__(107); + var hyphenate = __webpack_require__(108); var msPattern = /^ms-/; @@ -12702,7 +12907,7 @@ module.exports = hyphenateStyleName; /***/ }, -/* 107 */ +/* 108 */ /***/ function(module, exports) { 'use strict'; @@ -12739,7 +12944,7 @@ module.exports = hyphenate; /***/ }, -/* 108 */ +/* 109 */ /***/ function(module, exports) { /** @@ -12773,7 +12978,7 @@ module.exports = memoizeStringOnly; /***/ }, -/* 109 */ +/* 110 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -12784,17 +12989,16 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule DOMPropertyOperations */ 'use strict'; - var DOMProperty = __webpack_require__(39); + var DOMProperty = __webpack_require__(40); var ReactDOMComponentTree = __webpack_require__(38); - var ReactInstrumentation = __webpack_require__(66); + var ReactInstrumentation = __webpack_require__(69); - var quoteAttributeValueForBrowser = __webpack_require__(110); - var warning = __webpack_require__(15); + var quoteAttributeValueForBrowser = __webpack_require__(111); + var warning = __webpack_require__(51); var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$'); var illegalAttributeNameCache = {}; @@ -12929,7 +13133,11 @@ if (process.env.NODE_ENV !== 'production') { var payload = {}; payload[name] = value; - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); } }, @@ -12946,7 +13154,11 @@ if (process.env.NODE_ENV !== 'production') { var payload = {}; payload[name] = value; - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'update attribute', + payload: payload + }); } }, @@ -12959,7 +13171,11 @@ deleteValueForAttribute: function (node, name) { node.removeAttribute(name); if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); } }, @@ -12990,7 +13206,11 @@ } if (process.env.NODE_ENV !== 'production') { - ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name); + ReactInstrumentation.debugTool.onHostOperation({ + instanceID: ReactDOMComponentTree.getInstanceFromNode(node)._debugID, + type: 'remove attribute', + payload: name + }); } } @@ -13000,7 +13220,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4))) /***/ }, -/* 110 */ +/* 111 */ /***/ function(module, exports, __webpack_require__) { /** @@ -13011,12 +13231,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule quoteAttributeValueForBrowser */ 'use strict'; - var escapeTextContentForBrowser = __webpack_require__(91); + var escapeTextContentForBrowser = __webpack_require__(93); /** * Escapes attribute value to prevent scripting attacks. @@ -13031,7 +13250,7 @@ module.exports = quoteAttributeValueForBrowser; /***/ }, -/* 111 */ +/* 112 */ /***/ function(module, exports, __webpack_require__) { /** @@ -13042,20 +13261,18 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactBrowserEventEmitter */ 'use strict'; var _assign = __webpack_require__(8); - var EventConstants = __webpack_require__(43); - var EventPluginRegistry = __webpack_require__(47); - var ReactEventEmitterMixin = __webpack_require__(112); - var ViewportMetrics = __webpack_require__(81); + var EventPluginRegistry = __webpack_require__(48); + var ReactEventEmitterMixin = __webpack_require__(113); + var ViewportMetrics = __webpack_require__(83); - var getVendorPrefixedEventName = __webpack_require__(113); - var isEventSupported = __webpack_require__(75); + var getVendorPrefixedEventName = __webpack_require__(114); + var isEventSupported = __webpack_require__(77); /** * Summary of `ReactBrowserEventEmitter` event handling: @@ -13273,42 +13490,41 @@ var isListening = getListeningForDocument(mountAt); var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName]; - var topLevelTypes = EventConstants.topLevelTypes; for (var i = 0; i < dependencies.length; i++) { var dependency = dependencies[i]; if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) { - if (dependency === topLevelTypes.topWheel) { + if (dependency === 'topWheel') { if (isEventSupported('wheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'wheel', mountAt); } else if (isEventSupported('mousewheel')) { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'mousewheel', mountAt); } else { // Firefox needs to capture a different mouse scroll event. // @see http://www.quirksmode.org/dom/events/tests/scroll.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt); } - } else if (dependency === topLevelTypes.topScroll) { + } else if (dependency === 'topScroll') { if (isEventSupported('scroll', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt); } else { - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE); } - } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) { + } else if (dependency === 'topFocus' || dependency === 'topBlur') { if (isEventSupported('focus', true)) { - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt); } else if (isEventSupported('focusin')) { // IE has `focusin` and `focusout` events which bubble. // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt); - ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topFocus', 'focusin', mountAt); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topBlur', 'focusout', mountAt); } // to make sure blur and focus event listeners are only attached once - isListening[topLevelTypes.topBlur] = true; - isListening[topLevelTypes.topFocus] = true; + isListening.topBlur = true; + isListening.topFocus = true; } else if (topEventMapping.hasOwnProperty(dependency)) { ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt); } @@ -13366,7 +13582,7 @@ module.exports = ReactBrowserEventEmitter; /***/ }, -/* 112 */ +/* 113 */ /***/ function(module, exports, __webpack_require__) { /** @@ -13377,12 +13593,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactEventEmitterMixin */ 'use strict'; - var EventPluginHub = __webpack_require__(46); + var EventPluginHub = __webpack_require__(47); function runEventQueueInBatch(events) { EventPluginHub.enqueueEvents(events); @@ -13404,7 +13619,7 @@ module.exports = ReactEventEmitterMixin; /***/ }, -/* 113 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { /** @@ -13415,12 +13630,11 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule getVendorPrefixedEventName */ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(55); /** * Generate a mapping of standard vendor prefixes using the defined style property and event name. @@ -13509,92 +13723,8 @@ module.exports = getVendorPrefixedEventName; -/***/ }, -/* 114 */ -/***/ function(module, exports, __webpack_require__) { - - /** - * Copyright 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * @providesModule ReactDOMButton - */ - - 'use strict'; - - var DisabledInputUtils = __webpack_require__(115); - - /** - * Implements a