*/;var invariant=function invariant(condition,format,a,b,c,d,e,f){if(process.env.NODE_ENV!=='production'){if(format===undefined){throw new Error('invariant requires an error message argument');}}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('Invariant Violation: '+format.replace(/%s/g,function(){returnargs[argIndex++];}));}error.framesToPop=1;// we don't care about invariant's own frame
!(!Array.isArray(obj)&&((typeofobj==="undefined"?"undefined":_typeof(obj))==='object'||typeofobj==='function'))?process.env.NODE_ENV!=='production'?invariant(false,'toArray: Array-like object expected'):invariant(false):undefined;!(typeoflength==='number')?process.env.NODE_ENV!=='production'?invariant(false,'toArray: Object needs a length property'):invariant(false):undefined;!(length===0||length-1inobj)?process.env.NODE_ENV!=='production'?invariant(false,'toArray: Object should have keys for indices'):invariant(false):undefined;// Old IE doesn't give collections access to hasOwnProperty. Assume inputs
// without method will throw during the slice call and skip straight to the
// fallback.
if(obj.hasOwnProperty){try{returnArray.prototype.slice.call(obj);}catch(e){// IE < 9 does not support Array#slice on collections objects
}}// Fall back to copying key by key. This assumes all keys have a value,
// so will not preserve sparsely populated inputs.
*/var warning=emptyFunction;if(process.env.NODE_ENV!=='production'){warning=function(condition,format){for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];}if(format===undefined){throw new Error('`warning(condition, format, ...args)` requires a warning '+'message argument');}if(format.indexOf('Failed Composite propType: ')===0){return; //IgnoreCompositeComponentproptypecheck.
}if(!condition){varargIndex=0;varmessage='Warning: '+format.replace(/%s/g,function(){returnargs[argIndex++];});if(typeofconsole!=='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.
thrownewError(message);}catch(x){}}};}module.exports=warning;}).call(this,require('_process'));},{"./emptyFunction":8,"_process":28}],28:[function(require,module,exports){// shim for using process in browser
functionItem(fun,array){this.fun=fun;this.array=array;}Item.prototype.run=function(){this.fun.apply(null,this.array);};process.title='browser';process.browser=true;process.env={};process.argv=[];process.version='';// empty string to avoid regexp issues
process.versions={};functionnoop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){thrownewError('process.binding is not supported');};process.cwd=function(){return'/';};process.chdir=function(dir){thrownewError('process.chdir is not supported');};process.umask=function(){return0;};},{}],29:[function(require,module,exports){'use strict';module.exports=require('react/lib/ReactDOM');},{"react/lib/ReactDOM":64}],30:[function(require,module,exports){/**
varSTART_KEYCODE=229;varcanUseCompositionEvent=ExecutionEnvironment.canUseDOM&&'CompositionEvent'inwindow;vardocumentMode=null;if(ExecutionEnvironment.canUseDOM&&'documentMode'indocument){documentMode=document.documentMode;}// Webkit offers a very useful `textInput` event that can be used to
// directly represent `beforeInput`. The IE `textinput` event is not as
// useful, so we don't use it.
varcanUseTextInputEvent=ExecutionEnvironment.canUseDOM&&'TextEvent'inwindow&&!documentMode&&!isPresto();// In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. Japanese ideographic
// spaces, for instance (\u3000) are not recorded correctly.
vareventTypes={beforeInput:{phasedRegistrationNames:{bubbled:keyOf({onBeforeInput:null}),captured:keyOf({onBeforeInputCapture:null})},dependencies:[topLevelTypes.topCompositionEnd,topLevelTypes.topKeyPress,topLevelTypes.topTextInput,topLevelTypes.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:keyOf({onCompositionEnd:null}),captured:keyOf({onCompositionEndCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionEnd,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:keyOf({onCompositionStart:null}),captured:keyOf({onCompositionStartCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionStart,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:keyOf({onCompositionUpdate:null}),captured:keyOf({onCompositionUpdateCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionUpdate,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]}};// Track whether we've ever handled a keypress on the space key.
returnEND_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;casetopLevelTypes.topKeyDown:// Expect IME keyCode on each keydown. If we get any other
// code we must have exited earlier.
returnnativeEvent.keyCode!==START_KEYCODE;casetopLevelTypes.topKeyPress:casetopLevelTypes.topMouseDown:casetopLevelTypes.topBlur:// Events are not possible without cancelling IME.
if(!currentComposition&&eventType===eventTypes.compositionStart){currentComposition=FallbackCompositionState.getPooled(topLevelTarget);}elseif(eventType===eventTypes.compositionEnd){if(currentComposition){fallbackData=currentComposition.getData();}}}varevent=SyntheticCompositionEvent.getPooled(eventType,topLevelTargetID,nativeEvent,nativeEventTarget);if(fallbackData){// Inject data generated from fallback path into the synthetic event.
// This matches the property of native CompositionEventInterface.
// try to extract the composed characters from the fallback object.
if(currentComposition){if(topLevelType===topLevelTypes.topCompositionEnd||isFallbackCompositionEnd(topLevelType,nativeEvent)){varchars=currentComposition.getData();FallbackCompositionState.release(currentComposition);currentComposition=null;returnchars;}returnnull;}switch(topLevelType){casetopLevelTypes.topPaste:// If a paste event occurs after a keypress, throw out the input
// chars. Paste events should not lead to BeforeInput events.
tempStyle.font='';}catch(e){hasShorthandPropertyBug=true;}// IE8 only supports accessing cssFloat (standard) as styleFloat
if(document.documentElement.style.cssFloat===undefined){styleFloatAccessor='styleFloat';}}if(process.env.NODE_ENV!=='production'){// 'msTransform' is correct, but the other prefixes should be capitalized
varbadVendoredStyleNamePattern=/^(?:webkit|moz|o)[A-Z]/;// style values shouldn't contain a semicolon
varbadStyleValueWithSemicolonPattern=/;\s*$/;varwarnedStyleNames={};varwarnedStyleValues={};varwarnHyphenatedStyleName=functionwarnHyphenatedStyleName(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;process.env.NODE_ENV!=='production'?warning(false,'Unsupported style property %s. Did you mean %s?',name,camelizeStyleName(name)):undefined;};varwarnBadVendoredStyleName=functionwarnBadVendoredStyleName(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return;}warnedStyleNames[name]=true;process.env.NODE_ENV!=='production'?warning(false,'Unsupported vendor-prefixed style property %s. Did you mean %s?',name,name.charAt(0).toUpperCase()+name.slice(1)):undefined;};varwarnStyleValueWithSemicolon=functionwarnStyleValueWithSemicolon(name,value){if(warnedStyleValues.hasOwnProperty(value)&&warnedStyleValues[value]){return;}warnedStyleValues[value]=true;process.env.NODE_ENV!=='production'?warning(false,'Style property values shouldn\'t contain a semicolon. '+'Try "%s: %s" instead.',name,value.replace(badStyleValueWithSemicolonPattern,'')):undefined;};/**
*/notifyAll:function notifyAll(){var callbacks=this._callbacks;var contexts=this._contexts;if(callbacks){!(callbacks.length===contexts.length)?process.env.NODE_ENV!=='production'?invariant(false,'Mismatched list of contexts in callback queue'):invariant(false):undefined;this._callbacks=null;this._contexts=null;for(var i=0;i<callbacks.length;i++){callbacks[i].call(contexts[i]);}callbacks.length=0;contexts.length=0;}}, /**
doesChangeEventBubble=isEventSupported('change')&&(!('documentMode'indocument)||document.documentMode>8);}functionmanualDispatchChangeEvent(nativeEvent){varevent=SyntheticEvent.getPooled(eventTypes.change,activeElementID,nativeEvent,getEventTarget(nativeEvent));EventPropagators.accumulateTwoPhaseDispatches(event);// If change and propertychange bubbled, we'd just bind to it like all the
// other events and have it go through ReactBrowserEventEmitter. Since it
// doesn't, we manually listen for the events and so we have to enqueue and
// process the abstract event manually.
//
// Batching is necessary here in order to ensure that all event handlers run
// before the next rerender (including event handlers attached to ancestor
// elements instead of directly on the input). Without this, controlled
// components don't work properly in conjunction with event bubbling because
// the component is rerendered and the value reverted before all the event
// handlers can run. See https://github.com/facebook/react/issues/708.
ReactUpdates.batchedUpdates(runEventInBatch,event);}functionrunEventInBatch(event){EventPluginHub.enqueueEvents(event);EventPluginHub.processEventQueue(false);}functionstartWatchingForChangeEventIE8(target,targetID){activeElement=target;activeElementID=targetID;activeElement.attachEvent('onchange',manualDispatchChangeEvent);}functionstopWatchingForChangeEventIE8(){if(!activeElement){return;}activeElement.detachEvent('onchange',manualDispatchChangeEvent);activeElement=null;activeElementID=null;}functiongetTargetIDForChangeEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topChange){returntopLevelTargetID;}}functionhandleEventsForChangeEventIE8(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){// stopWatching() should be a noop here but we call it just in case we
// what we want so fall through here and trigger an abstract event
returntopLevelTargetID;}}// For IE8 and IE9.
functionhandleEventsForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){// In IE8, we can capture almost all .value changes by adding a
// propertychange handler and looking for events with propertyName
// equal to 'value'
// In IE9, propertychange fires for most input events but is buggy and
// doesn't fire when text is deleted, but conveniently, selectionchange
// appears to fire in all of the remaining cases so we catch those and
// forward the event if the value has changed
// In either case, we don't want to call the event handler if the value
// is changed from JS so we redefine a setter for `.value` that updates
// our activeElementValue variable, allowing us to ignore those changes
//
// stopWatching() should be a noop here but we call it just in case we
// missed a blur event somehow.
stopWatchingForValueChange();startWatchingForValueChange(topLevelTarget,topLevelTargetID);}elseif(topLevelType===topLevelTypes.topBlur){stopWatchingForValueChange();}}// For IE8 and IE9.
functiongetTargetIDForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topSelectionChange||topLevelType===topLevelTypes.topKeyUp||topLevelType===topLevelTypes.topKeyDown){// On the selectionchange event, the target is just document which isn't
// helpful for us so just check activeElement instead.
//
// 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
// propertychange on the first input event after setting `value` from a
// script and fires only keydown, keypress, keyup. Catching keyup usually
// gets it and catching keydown lets us fire an event for the first
// keystroke if user does a key repeat (it'll be a little delayed: right
// before the second keystroke). Other input methods (e.g., paste) seem to
varinitialChildren=null;// List of children that will be moved or removed.
varupdatedChildren=null;for(vari=0;i<updates.length;i++){update=updates[i];if(update.type===ReactMultiChildUpdateTypes.MOVE_EXISTING||update.type===ReactMultiChildUpdateTypes.REMOVE_NODE){varupdatedIndex=update.fromIndex;varupdatedChild=update.parentNode.childNodes[updatedIndex];varparentID=update.parentID;!updatedChild?process.env.NODE_ENV!=='production'?invariant(false,'processUpdates(): Unable to find child %s of element. This '+'probably means the DOM was unexpectedly mutated (e.g., by the '+'browser), usually due to forgetting a <tbody> when using tables, '+'nesting tags like <form>, <p>, or <a>, or using non-SVG elements '+'in an <svg> parent. Try inspecting the child nodes of the element '+'with React ID `%s`.',updatedIndex,parentID):invariant(false):undefined;initialChildren=initialChildren||{};initialChildren[parentID]=initialChildren[parentID]||[];initialChildren[parentID][updatedIndex]=updatedChild;updatedChildren=updatedChildren||[];updatedChildren.push(updatedChild);}}varrenderedMarkup;// markupList is either a list of markup or just a list of elements
if(markupList.length&&typeofmarkupList[0]==='string'){renderedMarkup=Danger.dangerouslyRenderMarkup(markupList);}else{renderedMarkup=markupList;}// Remove updated children first so that `toIndex` is consistent.
if(updatedChildren){for(varj=0;j<updatedChildren.length;j++){updatedChildren[j].parentNode.removeChild(updatedChildren[j]);}}for(vark=0;k<updates.length;k++){update=updates[k];switch(update.type){caseReactMultiChildUpdateTypes.INSERT_MARKUP:insertChildAt(update.parentNode,renderedMarkup[update.markupIndex],update.toIndex);break;caseReactMultiChildUpdateTypes.MOVE_EXISTING:insertChildAt(update.parentNode,initialChildren[update.parentID][update.fromIndex],update.toIndex);break;caseReactMultiChildUpdateTypes.SET_MARKUP:setInnerHTML(update.parentNode,update.content);break;caseReactMultiChildUpdateTypes.TEXT_CONTENT:setTextContent(update.parentNode,update.content);break;caseReactMultiChildUpdateTypes.REMOVE_NODE:// Already removed by the for-loop above.
*/injectDOMPropertyConfig:function injectDOMPropertyConfig(domPropertyConfig){var Injection=DOMPropertyInjection;var Properties=domPropertyConfig.Properties||{};var DOMAttributeNamespaces=domPropertyConfig.DOMAttributeNamespaces||{};var DOMAttributeNames=domPropertyConfig.DOMAttributeNames||{};var DOMPropertyNames=domPropertyConfig.DOMPropertyNames||{};var DOMMutationMethods=domPropertyConfig.DOMMutationMethods||{};if(domPropertyConfig.isCustomAttribute){DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);}for(var propName in Properties){!!DOMProperty.properties.hasOwnProperty(propName)?process.env.NODE_ENV!=='production'?invariant(false,'injectDOMPropertyConfig(...): You\'re trying to inject DOM property '+'\'%s\' which has already been injected. You may be accidentally '+'injecting the same DOM property config twice, or you may be '+'injecting two configs that have conflicting property names.',propName):invariant(false):undefined;var lowerCased=propName.toLowerCase();var propConfig=Properties[propName];var propertyInfo={attributeName:lowerCased,attributeNamespace:null,propertyName:propName,mutationMethod:null,mustUseAttribute:checkMask(propConfig,Injection.MUST_USE_ATTRIBUTE),mustUseProperty:checkMask(propConfig,Injection.MUST_USE_PROPERTY),hasSideEffects:checkMask(propConfig,Injection.HAS_SIDE_EFFECTS),hasBooleanValue:checkMask(propConfig,Injection.HAS_BOOLEAN_VALUE),hasNumericValue:checkMask(propConfig,Injection.HAS_NUMERIC_VALUE),hasPositiveNumericValue:checkMask(propConfig,Injection.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:checkMask(propConfig,Injection.HAS_OVERLOADED_BOOLEAN_VALUE)};!(!propertyInfo.mustUseAttribute||!propertyInfo.mustUseProperty)?process.env.NODE_ENV!=='production'?invariant(false,'DOMProperty: Cannot require using both attribute and property: %s',propName):invariant(false):undefined;!(propertyInfo.mustUseProperty||!propertyInfo.hasSideEffects)?process.env.NODE_ENV!=='production'?invariant(false,'DOMProperty: Properties that have side effects must use property: %s',propName):invariant(false):undefined;!(propertyInfo.hasBooleanValue+propertyInfo.hasNumericValue+propertyInfo.hasOverloadedBooleanValue<=1)?process.env.NODE_ENV!=='production'?invariant(false,'DOMProperty: Value can be one of boolean, overloaded boolean, or '+'numeric value, but not a combination: %s',propName):invariant(false):undefined;if(process.env.NODE_ENV!=='production'){DOMProperty.getPossibleStandardName[lowerCased]=propName;}if(DOMAttributeNames.hasOwnProperty(propName)){var attributeName=DOMAttributeNames[propName];propertyInfo.attributeName=attributeName;if(process.env.NODE_ENV!=='production'){DOMProperty.getPossibleStandardName[attributeName]=propName;}}if(DOMAttributeNamespaces.hasOwnProperty(propName)){propertyInfo.attributeNamespace=DOMAttributeNamespaces[propName];}if(DOMPropertyNames.hasOwnProperty(propName)){propertyInfo.propertyName=DOMPropertyNames[propName];}if(DOMMutationMethods.hasOwnProperty(propName)){propertyInfo.mutationMethod=DOMMutationMethods[propName];}DOMProperty.properties[propName]=propertyInfo;}}};var defaultValueCache={}; /**
varVALID_ATTRIBUTE_NAME_REGEX=/^[a-zA-Z_][\w\.\-]*$/;varillegalAttributeNameCache={};varvalidatedAttributeNameCache={};functionisAttributeNameSafe(attributeName){if(validatedAttributeNameCache.hasOwnProperty(attributeName)){returntrue;}if(illegalAttributeNameCache.hasOwnProperty(attributeName)){returnfalse;}if(VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)){validatedAttributeNameCache[attributeName]=true;returntrue;}illegalAttributeNameCache[attributeName]=true;process.env.NODE_ENV!=='production'?warning(false,'Invalid attribute name: `%s`',attributeName):undefined;returnfalse;}functionshouldIgnoreValue(propertyInfo,value){returnvalue==null||propertyInfo.hasBooleanValue&&!value||propertyInfo.hasNumericValue&&isNaN(value)||propertyInfo.hasPositiveNumericValue&&value<1||propertyInfo.hasOverloadedBooleanValue&&value===false;}if(process.env.NODE_ENV!=='production'){varreactProps={children:true,dangerouslySetInnerHTML:true,key:true,ref:true};varwarnedProperties={};varwarnUnknownProperty=functionwarnUnknownProperty(name){if(reactProps.hasOwnProperty(name)&&reactProps[name]||warnedProperties.hasOwnProperty(name)&&warnedProperties[name]){return;}warnedProperties[name]=true;varlowerCasedName=name.toLowerCase();// data-* attributes should be lowercase; suggest the lowercase version
varstandardName=DOMProperty.isCustomAttribute(lowerCasedName)?lowerCasedName:DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName)?DOMProperty.getPossibleStandardName[lowerCasedName]:null;// For now, only warn when we have a suggested correction. This prevents
// logging too much when using transferPropsTo.
process.env.NODE_ENV!=='production'?warning(standardName==null,'Unknown DOM property %s. Did you mean %s?',name,standardName):undefined;};}/**
// ('' + value) makes it output the correct toString()-value.
if(namespace){node.setAttributeNS(namespace,attributeName,''+value);}elseif(propertyInfo.hasBooleanValue||propertyInfo.hasOverloadedBooleanValue&&value===true){node.setAttribute(attributeName,'');}else{node.setAttribute(attributeName,''+value);}}else{varpropName=propertyInfo.propertyName;// Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
// property type before comparing; only `value` does and is string.
if(!propertyInfo.hasSideEffects||''+node[propName]!==''+value){// Contrary to `setAttribute`, object properties are properly
*/dangerouslyRenderMarkup:function dangerouslyRenderMarkup(markupList){!ExecutionEnvironment.canUseDOM?process.env.NODE_ENV!=='production'?invariant(false,'dangerouslyRenderMarkup(...): Cannot render markup in a worker '+'thread. Make sure `window` and `document` are available globally '+'before requiring React when unit testing or use '+'ReactDOMServer.renderToString for server rendering.'):invariant(false):undefined;var nodeName;var markupByNodeName={}; //Groupmarkupby`nodeName`ifawrapisnecessary,elseby'*'.
for(vari=0;i<markupList.length;i++){!markupList[i]?process.env.NODE_ENV!=='production'?invariant(false,'dangerouslyRenderMarkup(...): Missing markup.'):invariant(false):undefined;nodeName=getNodeName(markupList[i]);nodeName=getMarkupWrap(nodeName)?nodeName:'*';markupByNodeName[nodeName]=markupByNodeName[nodeName]||[];markupByNodeName[nodeName][i]=markupList[i];}varresultList=[];varresultListAssignmentCount=0;for(nodeNameinmarkupByNodeName){if(!markupByNodeName.hasOwnProperty(nodeName)){continue;}varmarkupListByNodeName=markupByNodeName[nodeName];// This for-in loop skips the holes of the sparse array. The order of
// iteration should follow the order of assignment, which happens to match
// numerical index order, but we don't rely on that.
varresultIndex;for(resultIndexinmarkupListByNodeName){if(markupListByNodeName.hasOwnProperty(resultIndex)){varmarkup=markupListByNodeName[resultIndex];// Push the requested markup with an additional RESULT_INDEX_ATTR
// attribute. If the markup does not start with a < character, it
// will be discarded below (with an appropriate console.error).
markupListByNodeName[resultIndex]=markup.replace(OPEN_TAG_NAME_EXP,// This index will be parsed back out below.
'$1 '+RESULT_INDEX_ATTR+'="'+resultIndex+'" ');}}// Render each group of markup with similar wrapping `nodeName`.
varrenderNodes=createNodesFromMarkup(markupListByNodeName.join(''),emptyFunction// Do nothing special with <script> tags.
);for(varj=0;j<renderNodes.length;++j){varrenderNode=renderNodes[j];if(renderNode.hasAttribute&&renderNode.hasAttribute(RESULT_INDEX_ATTR)){resultIndex=+renderNode.getAttribute(RESULT_INDEX_ATTR);renderNode.removeAttribute(RESULT_INDEX_ATTR);!!resultList.hasOwnProperty(resultIndex)?process.env.NODE_ENV!=='production'?invariant(false,'Danger: Assigning to an already-occupied result index.'):invariant(false):undefined;resultList[resultIndex]=renderNode;// This should match resultList.length and markupList.length when
// we're done.
resultListAssignmentCount+=1;}elseif(process.env.NODE_ENV!=='production'){console.error('Danger: Discarding unexpected node:',renderNode);}}}// Although resultList was populated out of order, it should now be a dense
// array.
!(resultListAssignmentCount===resultList.length)?process.env.NODE_ENV!=='production'?invariant(false,'Danger: Did not assign to every index of resultList.'):invariant(false):undefined;!(resultList.length===markupList.length)?process.env.NODE_ENV!=='production'?invariant(false,'Danger: Expected markup to render %s nodes, but rendered %s.',markupList.length,resultList.length):invariant(false):undefined;returnresultList;},/**
*/var InstanceHandle=null;function validateInstanceHandle(){var valid=InstanceHandle&&InstanceHandle.traverseTwoPhase&&InstanceHandle.traverseEnterLeave;process.env.NODE_ENV!=='production'?warning(valid,'InstanceHandle not injected before use!'):undefined;} /**
*/putListener:function putListener(id,registrationName,listener){!(typeof listener==='function')?process.env.NODE_ENV!=='production'?invariant(false,'Expected %s listener to be a function, instead got type %s',registrationName,typeof listener==="undefined"?"undefined":_typeof(listener)):invariant(false):undefined;var bankForRegistrationName=listenerBank[registrationName]||(listenerBank[registrationName]={});bankForRegistrationName[id]=listener;var PluginModule=EventPluginRegistry.registrationNameModules[registrationName];if(PluginModule&&PluginModule.didPutListener){PluginModule.didPutListener(id,registrationName,listener);}}, /**
varprocessingEventQueue=eventQueue;eventQueue=null;if(simulated){forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseSimulated);}else{forEachAccumulated(processingEventQueue,executeDispatchesAndReleaseTopLevel);}!!eventQueue?process.env.NODE_ENV!=='production'?invariant(false,'processEventQueue(): Additional events were enqueued while processing '+'an event queue. Support for this has not yet been implemented.'):invariant(false):undefined;// This would be a good time to rethrow if any of the event handlers threw.
return;}for(varpluginNameinnamesToPlugins){varPluginModule=namesToPlugins[pluginName];varpluginIndex=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):invariant(false):undefined;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):invariant(false):undefined;EventPluginRegistry.plugins[pluginIndex]=PluginModule;varpublishedEvents=PluginModule.eventTypes;for(vareventNameinpublishedEvents){!publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName)?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):invariant(false):undefined;}}}/**
*/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):invariant(false):undefined;EventPluginRegistry.eventNameDispatchConfigs[eventName]=dispatchConfig;var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames;if(phasedRegistrationNames){for(var phaseName in phasedRegistrationNames){if(phasedRegistrationNames.hasOwnProperty(phaseName)){var phasedRegistrationName=phasedRegistrationNames[phaseName];publishRegistrationName(phasedRegistrationName,PluginModule,eventName);}}return true;}else if(dispatchConfig.registrationName){publishRegistrationName(dispatchConfig.registrationName,PluginModule,eventName);return true;}return false;} /**
*/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):invariant(false):undefined;EventPluginRegistry.registrationNameModules[registrationName]=PluginModule;EventPluginRegistry.registrationNameDependencies[registrationName]=PluginModule.eventTypes[eventName].dependencies;} /**
*/injectEventPluginOrder:function injectEventPluginOrder(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.'):invariant(false):undefined; //Clonetheorderingsoitcannotbedynamicallymutated.
*/injectEventPluginsByName:function injectEventPluginsByName(injectedNamesToPlugins){var isOrderingDirty=false;for(var pluginName in injectedNamesToPlugins){if(!injectedNamesToPlugins.hasOwnProperty(pluginName)){continue;}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):invariant(false):undefined;namesToPlugins[pluginName]=PluginModule;isOrderingDirty=true;}}if(isOrderingDirty){recomputePluginOrdering();}}, /**
*/function accumulateDirectionalDispatches(domID,upwards,event){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(domID,'Dispatching id must not be null'):undefined;}var phase=upwards?PropagationPhases.bubbled:PropagationPhases.captured;var listener=listenerAtPhase(domID,event,phase);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,domID);}} /**
autoPlay:HAS_BOOLEAN_VALUE,capture:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,cellPadding:null,cellSpacing:null,charSet:MUST_USE_ATTRIBUTE,challenge:MUST_USE_ATTRIBUTE,checked:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,classID:MUST_USE_ATTRIBUTE,// To set className on SVG elements, it's necessary to use .setAttribute;
// this works on HTML elements too in all browsers except IE8. Conveniently,
// IE8 doesn't support SVG and so we can simply use the attribute in
// browsers that support SVG and the property in browsers that don't,
// regardless of whether the element is HTML or SVG.
className:hasSVG?MUST_USE_ATTRIBUTE:MUST_USE_PROPERTY,cols:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,colSpan:null,content:null,contentEditable:null,contextMenu:MUST_USE_ATTRIBUTE,controls:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,coords:null,crossOrigin:null,data:null,// For `<object />` acts as `src`.
autoCapitalize:null,autoCorrect:null,// autoSave allows WebKit/Blink to persist values of input fields on page reloads
autoSave:null,// color is for Safari mask-icon link
color:null,// itemProp, itemScope, itemType are for
// Microdata support. See http://schema.org/docs/gs.html
itemProp:MUST_USE_ATTRIBUTE,itemScope:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,itemType:MUST_USE_ATTRIBUTE,// itemID and itemRef are for Microdata support as well but
// only specified in the the WHATWG spec document. See
itemID:MUST_USE_ATTRIBUTE,itemRef:MUST_USE_ATTRIBUTE,// results show looking glass icon and recent searches on input
// search fields in WebKit/Blink
results:null,// IE-only attribute that specifies security restrictions on an iframe
// as an alternative to the sandbox attribute on IE<10
security:MUST_USE_ATTRIBUTE,// IE-only attribute that controls focus behavior
unselectable:MUST_USE_ATTRIBUTE},DOMAttributeNames:{acceptCharset:'accept-charset',className:'class',htmlFor:'for',httpEquiv:'http-equiv'},DOMPropertyNames:{autoCapitalize:'autocapitalize',autoComplete:'autocomplete',autoCorrect:'autocorrect',autoFocus:'autofocus',autoPlay:'autoplay',autoSave:'autosave',// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
*/var LinkedValueUtils={checkPropTypes:function checkPropTypes(tagName,props,owner){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error=propTypes[propName](props,propName,tagName,ReactPropTypeLocations.prop);}if(error instanceof Error&&!(error.message in loggedTypeFailures)){ //Onlymonitorthisfailureoncebecausetheretendstobealotofthe
// same error.
loggedTypeFailures[error.message]=true;varaddendum=getDeclarationErrorAddendum(owner);process.env.NODE_ENV!=='production'?warning(false,'Failed form propType: %s%s',error.message,addendum):undefined;}}},/**
'use strict';functionassign(target,sources){if(target==null){thrownewTypeError('Object.assign target cannot be null or undefined');}varto=Object(target);varhasOwnProperty=Object.prototype.hasOwnProperty;for(varnextIndex=1;nextIndex<arguments.length;nextIndex++){varnextSource=arguments[nextIndex];if(nextSource==null){continue;}varfrom=Object(nextSource);// We don't currently support accessors nor proxies. Therefore this
// copy cannot throw. If we ever supported this then we must handle
// exceptions and side-effects. We don't support symbols so they won't
*/var oneArgumentPooler=function oneArgumentPooler(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 twoArgumentPooler(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 threeArgumentPooler(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 fourArgumentPooler(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 fiveArgumentPooler(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 standardReleaser(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.'):invariant(false):undefined;instance.destructor();if(Klass.instancePool.length<Klass.poolSize){Klass.instancePool.push(instance);}};var DEFAULT_POOL_SIZE=10;var DEFAULT_POOLER=oneArgumentPooler; /**
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,'DOMMouseScroll',mountAt);}}elseif(dependency===topLevelTypes.topScroll){if(isEventSupported('scroll',true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll,'scroll',mountAt);}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll,'scroll',ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);}}elseif(dependency===topLevelTypes.topFocus||dependency===topLevelTypes.topBlur){if(isEventSupported('focus',true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus,'focus',mountAt);ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur,'blur',mountAt);}elseif(isEventSupported('focusin')){// IE has `focusin` and `focusout` events which bubble.
ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus,'focusin',mountAt);ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur,'focusout',mountAt);}// to make sure blur and focus event listeners are only attached once
varkeyUnique=childInstances[name]===undefined;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(keyUnique,'flattenChildren(...): Encountered two children with the same key, '+'`%s`. Child keys must be unique; when two children share a key, only '+'the first child will be used.',name):undefined;}if(child!=null&&keyUnique){childInstances[name]=instantiateReactComponent(child,null);}}/**
// instead of for..in we can zip the iterators and check if an item has
// moved.
// TODO: If nothing has changed, return the prevChildren object so that we
// can quickly bailout if nothing has changed.
if(!nextChildren&&!prevChildren){returnnull;}varname;for(nameinnextChildren){if(!nextChildren.hasOwnProperty(name)){continue;}varprevChild=prevChildren&&prevChildren[name];varprevElement=prevChild&&prevChild._currentElement;varnextElement=nextChildren[name];if(prevChild!=null&&shouldUpdateReactComponent(prevElement,nextElement)){ReactReconciler.receiveComponent(prevChild,nextElement,transaction,context);nextChildren[name]=prevChild;}else{if(prevChild){ReactReconciler.unmountComponent(prevChild,name);}// The child must be instantiated before it's mounted.
varnextChildInstance=instantiateReactComponent(nextElement,null);nextChildren[name]=nextChildInstance;}}// Unmount children that are no longer present.
*/DEFINE_MANY_MERGED:null});var injectedMixins=[];var warnedSetProps=false;function warnSetProps(){if(!warnedSetProps){warnedSetProps=true;process.env.NODE_ENV!=='production'?warning(false,'setProps(...) and replaceProps(...) are deprecated. '+'Instead, call render again at the top level.'):undefined;}} /**
functionvalidateTypeDef(Constructor,typeDef,location){for(varpropNameintypeDef){if(typeDef.hasOwnProperty(propName)){// use a warning instead of an invariant so components
// don't show up in prod but not in __DEV__
process.env.NODE_ENV!=='production'?warning(typeoftypeDef[propName]==='function','%s: %s type `%s` is invalid; it must be a function, usually from '+'React.PropTypes.',Constructor.displayName||'ReactClass',ReactPropTypeLocationNames[location],propName):undefined;}}}functionvalidateMethodOverride(proto,name){varspecPolicy=ReactClassInterface.hasOwnProperty(name)?ReactClassInterface[name]:null;// Disallow overriding of base class methods unless explicitly allowed.
if(ReactClassMixin.hasOwnProperty(name)){!(specPolicy===SpecPolicy.OVERRIDE_BASE)?process.env.NODE_ENV!=='production'?invariant(false,'ReactClassInterface: You are attempting to override '+'`%s` from your class specification. Ensure that your method names '+'do not overlap with React methods.',name):invariant(false):undefined;}// Disallow defining methods more than once unless explicitly allowed.
if(proto.hasOwnProperty(name)){!(specPolicy===SpecPolicy.DEFINE_MANY||specPolicy===SpecPolicy.DEFINE_MANY_MERGED)?process.env.NODE_ENV!=='production'?invariant(false,'ReactClassInterface: You are attempting to define '+'`%s` on your component more than once. This conflict may be due '+'to a mixin.',name):invariant(false):undefined;}}/**
*/function mixSpecIntoComponent(Constructor,spec){if(!spec){return;}!(typeof spec!=='function')?process.env.NODE_ENV!=='production'?invariant(false,'ReactClass: You\'re attempting to '+'use a component class as a mixin. Instead, just use a regular object.'):invariant(false):undefined;!!ReactElement.isValidElement(spec)?process.env.NODE_ENV!=='production'?invariant(false,'ReactClass: You\'re attempting to '+'use a component as a mixin. Instead, just use a regular object.'):invariant(false):undefined;var proto=Constructor.prototype; //Byhandlingmixinsbeforeanyotherproperties,weensurethesame
// chaining order is applied to methods with DEFINE_MANY policy, whether
// mixins are listed before or after these methods in the spec.
if(spec.hasOwnProperty(MIXINS_KEY)){RESERVED_SPEC_KEYS.mixins(Constructor,spec.mixins);}for(varnameinspec){if(!spec.hasOwnProperty(name)){continue;}if(name===MIXINS_KEY){// We have already handled mixins in a special case above.
continue;}varproperty=spec[name];validateMethodOverride(proto,name);if(RESERVED_SPEC_KEYS.hasOwnProperty(name)){RESERVED_SPEC_KEYS[name](Constructor,property);}else{// Setup methods on prototype:
// The following member methods should not be automatically bound:
// 1. Expected ReactClass methods (in the "interface").
// 2. Overridden methods (that were mixed in).
varisReactClassMethod=ReactClassInterface.hasOwnProperty(name);varisAlreadyDefined=proto.hasOwnProperty(name);varisFunction=typeofproperty==='function';varshouldAutoBind=isFunction&&!isReactClassMethod&&!isAlreadyDefined&&spec.autobind!==false;if(shouldAutoBind){if(!proto.__reactAutoBindMap){proto.__reactAutoBindMap={};}proto.__reactAutoBindMap[name]=property;proto[name]=property;}else{if(isAlreadyDefined){varspecPolicy=ReactClassInterface[name];// These cases should already be caught by validateMethodOverride.
!(isReactClassMethod&&(specPolicy===SpecPolicy.DEFINE_MANY_MERGED||specPolicy===SpecPolicy.DEFINE_MANY))?process.env.NODE_ENV!=='production'?invariant(false,'ReactClass: Unexpected spec policy %s for key %s '+'when mixing in component specs.',specPolicy,name):invariant(false):undefined;// For methods which are defined more than once, call the existing
// methods before calling the new property, merging if appropriate.
if(specPolicy===SpecPolicy.DEFINE_MANY_MERGED){proto[name]=createMergedResultFunction(proto[name],property);}elseif(specPolicy===SpecPolicy.DEFINE_MANY){proto[name]=createChainedFunction(proto[name],property);}}else{proto[name]=property;if(process.env.NODE_ENV!=='production'){// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if(typeofproperty==='function'&&spec.displayName){proto[name].displayName=spec.displayName+'_'+name;}}}}}}}functionmixStaticSpecIntoComponent(Constructor,statics){if(!statics){return;}for(varnameinstatics){varproperty=statics[name];if(!statics.hasOwnProperty(name)){continue;}varisReserved=nameinRESERVED_SPEC_KEYS;!!isReserved?process.env.NODE_ENV!=='production'?invariant(false,'ReactClass: You are attempting to define a reserved '+'property, `%s`, that shouldn\'t be on the "statics" key. Define it '+'as an instance property instead; it will still be accessible on the '+'constructor.',name):invariant(false):undefined;varisInherited=nameinConstructor;!!isInherited?process.env.NODE_ENV!=='production'?invariant(false,'ReactClass: You are attempting to define '+'`%s` on your component more than once. This conflict may be '+'due to a mixin.',name):invariant(false):undefined;Constructor[name]=property;}}/**
*/function mergeIntoWithNoDuplicateKeys(one,two){!(one&&two&&(typeof one==="undefined"?"undefined":_typeof(one))==='object'&&(typeof two==="undefined"?"undefined":_typeof(two))==='object')?process.env.NODE_ENV!=='production'?invariant(false,'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'):invariant(false):undefined;for(var key in two){if(two.hasOwnProperty(key)){!(one[key]===undefined)?process.env.NODE_ENV!=='production'?invariant(false,'mergeIntoWithNoDuplicateKeys(): '+'Tried to merge two objects with the same key: `%s`. This conflict '+'may be due to a mixin; in particular, this may be caused by two '+'getInitialState() or getDefaultProps() methods returning objects '+'with clashing keys.',key):invariant(false):undefined;one[key]=two[key];}}return one;} /**
// ignore the value of "this" that the user is trying to use, so
// let's warn.
if(newThis!==component&&newThis!==null){process.env.NODE_ENV!=='production'?warning(false,'bind(): React component methods may only be bound to the '+'component instance. See %s',componentName):undefined;}elseif(!args.length){process.env.NODE_ENV!=='production'?warning(false,'bind(): You are binding a component method to the component. '+'React does this for you automatically in a high-performance '+'way, so you can safely remove this call. See %s',componentName):undefined;returnboundMethod;}varreboundMethod=_bind.apply(boundMethod,arguments);reboundMethod.__reactBoundContext=component;reboundMethod.__reactBoundMethod=method;reboundMethod.__reactBoundArguments=args;returnreboundMethod;/* eslint-enable */};}returnboundMethod;}/**
if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(thisinstanceofConstructor,'Something is calling a React component directly. Use a factory or '+'JSX instead. See: https://fb.me/react-legacyfactory'):undefined;}// Wire up auto-binding
if(this.__reactAutoBindMap){bindAutoBindMethods(this);}this.props=props;this.context=context;this.refs=emptyObject;this.updater=updater||ReactNoopUpdateQueue;this.state=null;// ReactClasses doesn't have constructors. Instead, they use the
// getInitialState and componentWillMount methods for initialization.
varinitialState=this.getInitialState?this.getInitialState():null;if(process.env.NODE_ENV!=='production'){// We allow auto-mocks to proceed as if they're returning null.
if(typeofinitialState==='undefined'&&this.getInitialState._isMockFunction){// This is probably bad practice. Consider warning here and
// deprecating this convenience.
initialState=null;}}!((typeofinitialState==="undefined"?"undefined":_typeof(initialState))==='object'&&!Array.isArray(initialState))?process.env.NODE_ENV!=='production'?invariant(false,'%s.getInitialState(): must return an object or null',Constructor.displayName||'ReactCompositeComponent'):invariant(false):undefined;this.state=initialState;};Constructor.prototype=newReactClassComponent();Constructor.prototype.constructor=Constructor;injectedMixins.forEach(mixSpecIntoComponent.bind(null,Constructor));mixSpecIntoComponent(Constructor,spec);// Initialize the defaultProps property after all mixins have been merged.
if(Constructor.getDefaultProps){Constructor.defaultProps=Constructor.getDefaultProps();}if(process.env.NODE_ENV!=='production'){// This is a tag to indicate that the use of these method names is ok,
// since it's used with createClass. If it's not, then it's likely a
// mistake so we'll warn you to use the static property, property
// initializer or constructor respectively.
if(Constructor.getDefaultProps){Constructor.getDefaultProps.isReactClassApproved={};}if(Constructor.prototype.getInitialState){Constructor.prototype.getInitialState.isReactClassApproved={};}}!Constructor.prototype.render?process.env.NODE_ENV!=='production'?invariant(false,'createClass(...): Class specification must implement a `render` method.'):invariant(false):undefined;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(!Constructor.prototype.componentShouldUpdate,'%s has a method called '+'componentShouldUpdate(). Did you mean shouldComponentUpdate()? '+'The name is phrased as a question because the function is '+'expected to return a value.',spec.displayName||'A component'):undefined;process.env.NODE_ENV!=='production'?warning(!Constructor.prototype.componentWillRecieveProps,'%s has a method called '+'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',spec.displayName||'A component'):undefined;}// Reduce time spent doing lookups by setting these on the prototype.
*/ReactComponent.prototype.setState=function(partialState,callback){!((typeof partialState==="undefined"?"undefined":_typeof(partialState))==='object'||typeof partialState==='function'||partialState==null)?process.env.NODE_ENV!=='production'?invariant(false,'setState(...): takes an object of state variables to update or a '+'function which returns an object of state variables.'):invariant(false):undefined;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(partialState!=null,'setState(...): You passed an undefined or null state object; '+'instead, use forceUpdate().'):undefined;}this.updater.enqueueSetState(this,partialState);if(callback){this.updater.enqueueCallback(this,callback);}}; /**
this._pendingElement=null;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;this._renderedComponent=null;this._context=null;this._mountOrder=0;this._topLevelWrapper=null;// See ReactUpdates and ReactUpdateQueue.
varinst;varrenderedElement;// This is a way to detect if Component is a stateless arrow function
// component, which is not newable. It might not be 100% reliable but is
// something we can do until we start detecting that Component extends
// React.Component. We already assume that typeof Component === 'function'.
varcanInstantiate='prototype'inComponent;if(canInstantiate){if(process.env.NODE_ENV!=='production'){ReactCurrentOwner.current=this;try{inst=newComponent(publicProps,publicContext,ReactUpdateQueue);}finally{ReactCurrentOwner.current=null;}}else{inst=newComponent(publicProps,publicContext,ReactUpdateQueue);}}if(!canInstantiate||inst===null||inst===false||ReactElement.isValidElement(inst)){renderedElement=inst;inst=newStatelessComponent(Component);}if(process.env.NODE_ENV!=='production'){// This will throw later in _renderValidatedComponent, but add an early
// warning now to help debugging
if(inst.render==null){process.env.NODE_ENV!=='production'?warning(false,'%s(...): No `render` method found on the returned component '+'instance: you may have forgotten to define `render`, returned '+'null/false from a stateless component, or tried to render an '+'element whose type is a function that isn\'t a React component.',Component.displayName||Component.name||'Component'):undefined;}else{// We support ES6 inheriting from React.Component, the module pattern,
// and stateless components, but not ES6 classes that don't extend
process.env.NODE_ENV!=='production'?warning(Component.prototype&&Component.prototype.isReactComponent||!canInstantiate||!(instinstanceofComponent),'%s(...): React component classes must extend React.Component.',Component.displayName||Component.name||'Component'):undefined;}}// These should be set up in the constructor, but as a convenience for
// simpler class abstractions, we set them up after the fact.
inst.props=publicProps;inst.context=publicContext;inst.refs=emptyObject;inst.updater=ReactUpdateQueue;this._instance=inst;// Store a reference from the instance back to the internal representation
ReactInstanceMap.set(inst,this);if(process.env.NODE_ENV!=='production'){// Since plain JS classes are defined without any special initialization
// logic, we can not catch common errors early. Therefore, we have to
// catch them here, at initialization time, instead.
process.env.NODE_ENV!=='production'?warning(!inst.getInitialState||inst.getInitialState.isReactClassApproved,'getInitialState was defined on %s, a plain JavaScript class. '+'This is only supported for classes created using React.createClass. '+'Did you mean to define a state property instead?',this.getName()||'a component'):undefined;process.env.NODE_ENV!=='production'?warning(!inst.getDefaultProps||inst.getDefaultProps.isReactClassApproved,'getDefaultProps was defined on %s, a plain JavaScript class. '+'This is only supported for classes created using React.createClass. '+'Use a static property to define defaultProps instead.',this.getName()||'a component'):undefined;process.env.NODE_ENV!=='production'?warning(!inst.propTypes,'propTypes was defined as an instance property on %s. Use a static '+'property to define propTypes instead.',this.getName()||'a component'):undefined;process.env.NODE_ENV!=='production'?warning(!inst.contextTypes,'contextTypes was defined as an instance property on %s. Use a '+'static property to define contextTypes instead.',this.getName()||'a component'):undefined;process.env.NODE_ENV!=='production'?warning(typeofinst.componentShouldUpdate!=='function','%s has a method called '+'componentShouldUpdate(). Did you mean shouldComponentUpdate()? '+'The name is phrased as a question because the function is '+'expected to return a value.',this.getName()||'A component'):undefined;process.env.NODE_ENV!=='production'?warning(typeofinst.componentDidUnmount!=='function','%s has a method called '+'componentDidUnmount(). But there is no such lifecycle method. '+'Did you mean componentWillUnmount()?',this.getName()||'A component'):undefined;process.env.NODE_ENV!=='production'?warning(typeofinst.componentWillRecieveProps!=='function','%s has a method called '+'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',this.getName()||'A component'):undefined;}varinitialState=inst.state;if(initialState===undefined){inst.state=initialState=null;}!((typeofinitialState==="undefined"?"undefined":_typeof(initialState))==='object'&&!Array.isArray(initialState))?process.env.NODE_ENV!=='production'?invariant(false,'%s.state: must be set to an object or null',this.getName()||'ReactCompositeComponent'):invariant(false):undefined;this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;if(inst.componentWillMount){inst.componentWillMount();// When mounting, calls to `setState` by `componentWillMount` will set
// `this._pendingStateQueue` without triggering a re-render.
if(this._pendingStateQueue){inst.state=this._processPendingState(inst.props,inst.context);}}// If not a stateless component, we now render
// Even if this component is scheduled for another update in ReactUpdates,
// it would still be ignored because these fields are reset.
this._pendingStateQueue=null;this._pendingReplaceState=false;this._pendingForceUpdate=false;this._pendingCallbacks=null;this._pendingElement=null;// These fields do not really need to be reset since this object is no
// longer accessible.
this._context=null;this._rootNodeID=null;this._topLevelWrapper=null;// Delete the reference from the instance to this internal representation
// which allow the internals to be properly cleaned up even if the user
// leaks a reference to the public instance.
ReactInstanceMap.remove(inst);// Some existing components rely on inst.props even after they've been
*/_processChildContext:function _processChildContext(currentContext){var Component=this._currentElement.type;var inst=this._instance;var childContext=inst.getChildContext&&inst.getChildContext();if(childContext){!(_typeof(Component.childContextTypes)==='object')?process.env.NODE_ENV!=='production'?invariant(false,'%s.getChildContext(): childContextTypes must be defined in order to '+'use getChildContext().',this.getName()||'ReactCompositeComponent'):invariant(false):undefined;if(process.env.NODE_ENV!=='production'){this._checkPropTypes(Component.childContextTypes,childContext,ReactPropTypeLocations.childContext);}for(var name in childContext){!(name in Component.childContextTypes)?process.env.NODE_ENV!=='production'?invariant(false,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||'ReactCompositeComponent',name):invariant(false):undefined;}return assign({},currentContext,childContext);}return currentContext;}, /**
varcomponentName=this.getName();for(varpropNameinpropTypes){if(propTypes.hasOwnProperty(propName)){varerror;try{// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
!(typeofpropTypes[propName]==='function')?process.env.NODE_ENV!=='production'?invariant(false,'%s: %s type `%s` is invalid; it must be a function, usually '+'from React.PropTypes.',componentName||'React class',ReactPropTypeLocationNames[location],propName):invariant(false):undefined;error=propTypes[propName](props,propName,componentName,location);}catch(ex){error=ex;}if(errorinstanceofError){// We may want to extend this logic for similar errors in
// top-level render calls, so I'm abstracting it away into
// a function to minimize refactoring in the future
varaddendum=getDeclarationErrorAddendum(this);if(location===ReactPropTypeLocations.prop){// Preface gives us something to blacklist in warning module
if(prevParentElement===nextParentElement){// Skip checking prop types again -- we don't read inst.props to avoid
// warning for DOM component props in this upgrade
nextProps=nextParentElement.props;}else{nextProps=this._processProps(nextParentElement.props);// An update here will schedule an update but immediately set
// _pendingStateQueue which will ensure that any state updates gets
// immediately reconciled instead of waiting for the next batch.
if(inst.componentWillReceiveProps){inst.componentWillReceiveProps(nextProps,nextContext);}}varnextState=this._processPendingState(nextProps,nextContext);varshouldUpdate=this._pendingForceUpdate||!inst.shouldComponentUpdate||inst.shouldComponentUpdate(nextProps,nextState,nextContext);if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(typeofshouldUpdate!=='undefined','%s.shouldComponentUpdate(): Returned undefined instead of a '+'boolean value. Make sure to return true or false.',this.getName()||'ReactCompositeComponent'):undefined;}if(shouldUpdate){this._pendingForceUpdate=false;// Will set `this.props`, `this.state` and `this.context`.
this._performComponentUpdate(nextParentElement,nextProps,nextState,nextContext,transaction,nextUnmaskedContext);}else{// If it's determined that a component should not update, we still want
// to set props and state but we shortcut the rest of the update.
renderedComponent===null||renderedComponent===false||ReactElement.isValidElement(renderedComponent))?process.env.NODE_ENV!=='production'?invariant(false,'%s.render(): A valid ReactComponent must be returned. You may have '+'returned undefined, an array or some other invalid object.',this.getName()||'ReactCompositeComponent'):invariant(false):undefined;returnrenderedComponent;},/**
*/attachRef:function attachRef(ref,component){var inst=this.getPublicInstance();!(inst!=null)?process.env.NODE_ENV!=='production'?invariant(false,'Stateless function components cannot have refs.'):invariant(false):undefined;var publicComponentInstance=component.getPublicInstance();if(process.env.NODE_ENV!=='production'){var componentName=component&&component.getName?component.getName():'a component';process.env.NODE_ENV!=='production'?warning(publicComponentInstance!=null,'Stateless function components cannot be given refs '+'(See ref "%s" in %s created by %s). '+'Attempts to access this ref will fail.',ref,componentName,this.getName()):undefined;}var refs=inst.refs===emptyObject?inst.refs={}:inst.refs;refs[ref]=publicComponentInstance;}, /**
// 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({CurrentOwner:ReactCurrentOwner,InstanceHandles:ReactInstanceHandles,Mount:ReactMount,Reconciler:ReactReconciler,TextComponent:ReactDOMTextComponent});}if(process.env.NODE_ENV!=='production'){varExecutionEnvironment=require('fbjs/lib/ExecutionEnvironment');if(ExecutionEnvironment.canUseDOM&&window.top===window.self){// First check if devtools is not installed
if(typeof__REACT_DEVTOOLS_GLOBAL_HOOK__==='undefined'){// If we're in Chrome or Firefox, provide a download link if not installed.
if(navigator.userAgent.indexOf('Chrome')>-1&&navigator.userAgent.indexOf('Edge')===-1||navigator.userAgent.indexOf('Firefox')>-1){console.debug('Download the React DevTools for a better development experience: '+'https://fb.me/react-devtools');}}// If we're in IE8, check to see if we are in compatibility mode and provide
// information on preventing compatibility mode
varieCompatibilityMode=document.documentMode&&document.documentMode<8;process.env.NODE_ENV!=='production'?warning(!ieCompatibilityMode,'Internet Explorer is running in compatibility mode; please add the '+'following tag to your HTML to prevent this from happening: '+'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'):undefined;varexpectedFeatures=[// shims
Object.create,Object.freeze];for(vari=0;i<expectedFeatures.length;i++){if(!expectedFeatures[i]){console.error('One or more ES5 shim/shams expected by React are not available: '+'https://fb.me/react-warning-polyfills');break;}}}}module.exports=React;}).call(this,require('_process'));},{"./ReactCurrentOwner":63,"./ReactDOMTextComponent":75,"./ReactDefaultInjection":78,"./ReactInstanceHandles":90,"./ReactMount":94,"./ReactPerf":100,"./ReactReconciler":105,"./ReactUpdates":112,"./ReactVersion":113,"./findDOMNode":137,"./renderSubtreeIntoContainer":152,"_process":28,"fbjs/lib/ExecutionEnvironment":2,"fbjs/lib/warning":27}],65:[function(require,module,exports){/**
varCONTENT_TYPES={'string':true,'number':true};varCHILDREN=keyOf({children:null});varSTYLE=keyOf({style:null});varHTML=keyOf({__html:null});varELEMENT_NODE_TYPE=1;functiongetDeclarationErrorAddendum(internalInstance){if(internalInstance){varowner=internalInstance._currentElement._owner||null;if(owner){varname=owner.getName();if(name){return' This DOM node was rendered by `'+name+'`.';}}}return'';}varlegacyPropsDescriptor;if(process.env.NODE_ENV!=='production'){legacyPropsDescriptor={props:{enumerable:false,get:functionget(){varcomponent=this._reactInternalComponent;process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .props of a DOM node; instead, '+'recreate the props as `render` did originally or read the DOM '+'properties/attributes directly from this node (e.g., '+'this.refs.box.className).%s',getDeclarationErrorAddendum(component)):undefined;returncomponent._currentElement.props;}}};}functionlegacyGetDOMNode(){if(process.env.NODE_ENV!=='production'){varcomponent=this._reactInternalComponent;process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .getDOMNode() of a DOM node; '+'instead, use the node directly.%s',getDeclarationErrorAddendum(component)):undefined;}returnthis;}functionlegacyIsMounted(){varcomponent=this._reactInternalComponent;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .isMounted() of a DOM node.%s',getDeclarationErrorAddendum(component)):undefined;}return!!component;}functionlegacySetStateEtc(){if(process.env.NODE_ENV!=='production'){varcomponent=this._reactInternalComponent;process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .setState(), .replaceState(), or '+'.forceUpdate() of a DOM node. This is a no-op.%s',getDeclarationErrorAddendum(component)):undefined;}}functionlegacySetProps(partialProps,callback){varcomponent=this._reactInternalComponent;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .setProps() of a DOM node. '+'Instead, call ReactDOM.render again at the top level.%s',getDeclarationErrorAddendum(component)):undefined;}if(!component){return;}ReactUpdateQueue.enqueueSetPropsInternal(component,partialProps);if(callback){ReactUpdateQueue.enqueueCallbackInternal(component,callback);}}functionlegacyReplaceProps(partialProps,callback){varcomponent=this._reactInternalComponent;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(false,'ReactDOMComponent: Do not access .replaceProps() of a DOM node. '+'Instead, call ReactDOM.render again at the top level.%s',getDeclarationErrorAddendum(component)):undefined;}if(!component){return;}ReactUpdateQueue.enqueueReplacePropsInternal(component,partialProps);if(callback){ReactUpdateQueue.enqueueCallbackInternal(component,callback);}}functionfriendlyStringify(obj){if((typeofobj==="undefined"?"undefined":_typeof(obj))==='object'){if(Array.isArray(obj)){return'['+obj.map(friendlyStringify).join(', ')+']';}else{varpairs=[];for(varkeyinobj){if(Object.prototype.hasOwnProperty.call(obj,key)){varkeyEscaped=/^[a-z$_][\w$_]*$/i.test(key)?key:JSON.stringify(key);pairs.push(keyEscaped+': '+friendlyStringify(obj[key]));}}return'{'+pairs.join(', ')+'}';}}elseif(typeofobj==='string'){returnJSON.stringify(obj);}elseif(typeofobj==='function'){return'[function object]';}// Differs from JSON.stringify in that undefined becauses undefined and that
// inf and nan don't become null
returnString(obj);}varstyleMutationWarning={};functioncheckAndWarnForMutatedStyle(style1,style2,component){if(style1==null||style2==null){return;}if(shallowEqual(style1,style2)){return;}varcomponentName=component._tag;varowner=component._currentElement._owner;varownerName;if(owner){ownerName=owner.getName();}varhash=ownerName+'|'+componentName;if(styleMutationWarning.hasOwnProperty(hash)){return;}styleMutationWarning[hash]=true;process.env.NODE_ENV!=='production'?warning(false,'`%s` was passed a style object that has previously been mutated. '+'Mutating `style` is deprecated. Consider cloning it beforehand. Check '+'the `render` %s. Previous style: %s. Mutated style: %s.',componentName,owner?'of `'+ownerName+'`':'using <'+componentName+'>',friendlyStringify(style1),friendlyStringify(style2)):undefined;}/**
if(process.env.NODE_ENV!=='production'){if(voidElementTags[component._tag]){process.env.NODE_ENV!=='production'?warning(props.children==null&&props.dangerouslySetInnerHTML==null,'%s is a void element tag and must not have `children` or '+'use `props.dangerouslySetInnerHTML`.%s',component._tag,component._currentElement._owner?' Check the render method of '+component._currentElement._owner.getName()+'.':''):undefined;}}if(props.dangerouslySetInnerHTML!=null){!(props.children==null)?process.env.NODE_ENV!=='production'?invariant(false,'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'):invariant(false):undefined;!(_typeof(props.dangerouslySetInnerHTML)==='object'&&HTMLinprops.dangerouslySetInnerHTML)?process.env.NODE_ENV!=='production'?invariant(false,'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. '+'Please visit https://fb.me/react-invariant-dangerously-set-inner-html '+'for more information.'):invariant(false):undefined;}if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(props.innerHTML==null,'Directly setting property `innerHTML` is not permitted. '+'For more information, lookup documentation on `dangerouslySetInnerHTML`.'):undefined;process.env.NODE_ENV!=='production'?warning(!props.contentEditable||props.children==null,'A component is `contentEditable` and contains `children` managed by '+'React. It is now your responsibility to guarantee that none of '+'those nodes are unexpectedly modified or duplicated. This is '+'probably not intentional.'):undefined;}!(props.style==null||_typeof(props.style)==='object')?process.env.NODE_ENV!=='production'?invariant(false,'The `style` prop expects a mapping from style properties to values, '+'not a string. For example, style={{marginRight: spacing + \'em\'}} when '+'using JSX.%s',getDeclarationErrorAddendum(component)):invariant(false):undefined;}functionenqueuePutListener(id,registrationName,listener,transaction){if(process.env.NODE_ENV!=='production'){// IE8 has no API for event capturing and the `onScroll` event doesn't
// bubble.
process.env.NODE_ENV!=='production'?warning(registrationName!=='onScroll'||isEventSupported('scroll',true),'This browser doesn\'t support the `onScroll` event'):undefined;}varcontainer=ReactMount.findReactContainerForID(id);if(container){vardoc=container.nodeType===ELEMENT_NODE_TYPE?container.ownerDocument:container;listenTo(registrationName,doc);}transaction.getReactMountReady().enqueue(putListener,{id:id,registrationName:registrationName,listener:listener});}functionputListener(){varlistenerToPut=this;ReactBrowserEventEmitter.putListener(listenerToPut.id,listenerToPut.registrationName,listenerToPut.listener);}// There are so many media events, it makes sense to just
// maintain a list rather than create a `trapBubbledEvent` for each
varmediaEvents={topAbort:'abort',topCanPlay:'canplay',topCanPlayThrough:'canplaythrough',topDurationChange:'durationchange',topEmptied:'emptied',topEncrypted:'encrypted',topEnded:'ended',topError:'error',topLoadedData:'loadeddata',topLoadedMetadata:'loadedmetadata',topLoadStart:'loadstart',topPause:'pause',topPlay:'play',topPlaying:'playing',topProgress:'progress',topRateChange:'ratechange',topSeeked:'seeked',topSeeking:'seeking',topStalled:'stalled',topSuspend:'suspend',topTimeUpdate:'timeupdate',topVolumeChange:'volumechange',topWaiting:'waiting'};functiontrapBubbledEventsLocal(){varinst=this;// If a component renders to null or if another component fatals and causes
// the state of the tree to be corrupted, `node` here can be null.
!inst._rootNodeID?process.env.NODE_ENV!=='production'?invariant(false,'Must be mounted to trap events'):invariant(false):undefined;varnode=ReactMount.getNode(inst._rootNodeID);!node?process.env.NODE_ENV!=='production'?invariant(false,'trapBubbledEvent(...): Requires node to be rendered.'):invariant(false):undefined;switch(inst._tag){case'iframe':inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad,'load',node)];break;case'video':case'audio':inst._wrapperState.listeners=[];// create listener for each media event
for(vareventinmediaEvents){if(mediaEvents.hasOwnProperty(event)){inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event],mediaEvents[event],node));}}break;case'img':inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError,'error',node),ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad,'load',node)];break;case'form':inst._wrapperState.listeners=[ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset,'reset',node),ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit,'submit',node)];break;}}functionmountReadyInputWrapper(){ReactDOMInput.mountReadyWrapper(this);}functionpostUpdateSelectWrapper(){ReactDOMSelect.postUpdateWrapper(this);}// For HTML, certain tags should omit their close tag. We keep a whitelist for
// those special cased tags.
varomittedCloseTags={'area':true,'base':true,'br':true,'col':true,'embed':true,'hr':true,'img':true,'input':true,'keygen':true,'link':true,'meta':true,'param':true,'source':true,'track':true,'wbr':true};// NOTE: menuitem's close tag should be omitted, but that causes problems.
varnewlineEatingTags={'listing':true,'pre':true,'textarea':true};// For HTML, certain tags cannot have children. This has the same purpose as
// `omittedCloseTags` except that `menuitem` should still have its closing tag.
varvoidElementTags=assign({'menuitem':true},omittedCloseTags);// We accept any tag to be rendered but since this gets injected into arbitrary
// HTML, we want to make sure that it's a safe tag.
varvalidatedTagCache={};varhasOwnProperty=({}).hasOwnProperty;functionvalidateDangerousTag(tag){if(!hasOwnProperty.call(validatedTagCache,tag)){!VALID_TAG_REGEX.test(tag)?process.env.NODE_ENV!=='production'?invariant(false,'Invalid tag: %s',tag):invariant(false):undefined;validatedTagCache[tag]=true;}}functionprocessChildContextDev(context,inst){// Pass down our tag name to child components for validation purposes
ReactMount.getID(el);this._updateDOMProperties({},props,transaction,el);this._createInitialChildren(transaction,props,context,el);mountImage=el;}else{vartagOpen=this._createOpenTagMarkupAndPutListeners(transaction,props);vartagContent=this._createContentMarkup(transaction,props,context);if(!tagContent&&omittedCloseTags[this._tag]){mountImage=tagOpen+'/>';}else{mountImage=tagOpen+'>'+tagContent+'</'+this._currentElement.type+'>';}}switch(this._tag){case'input':transaction.getReactMountReady().enqueue(mountReadyInputWrapper,this);// falls through
*/_createOpenTagMarkupAndPutListeners:function _createOpenTagMarkupAndPutListeners(transaction,props){var ret='<'+this._currentElement.type;for(var propKey in props){if(!props.hasOwnProperty(propKey)){continue;}var propValue=props[propKey];if(propValue==null){continue;}if(registrationNameModules.hasOwnProperty(propKey)){if(propValue){enqueuePutListener(this._rootNodeID,propKey,propValue,transaction);}}else {if(propKey===STYLE){if(propValue){if(process.env.NODE_ENV!=='production'){ //See`_updateDOMProperties`.styleblock
this._previousStyle=propValue;}propValue=this._previousStyleCopy=assign({},props.style);}propValue=CSSPropertyOperations.createMarkupForStyles(propValue);}varmarkup=null;if(this._tag!=null&&isCustomComponent(this._tag,props)){if(propKey!==CHILDREN){markup=DOMPropertyOperations.createMarkupForCustomAttribute(propKey,propValue);}}else{markup=DOMPropertyOperations.createMarkupForProperty(propKey,propValue);}if(markup){ret+=' '+markup;}}}// For static pages, no need to put React ID and checksum. Saves lots of
varinnerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){ret=innerHTML.__html;}}else{varcontentToUse=CONTENT_TYPES[_typeof(props.children)]?props.children:null;varchildrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){// TODO: Validate that text is allowed as a child of this node
ret=escapeTextContentForBrowser(contentToUse);}elseif(childrenToUse!=null){varmountImages=this.mountChildren(childrenToUse,transaction,context);ret=mountImages.join('');}}if(newlineEatingTags[this._tag]&&ret.charAt(0)==='\n'){// text/html ignores the first character in these tags if it's a newline
// Prefer to break application/xml over text/html (for now) by adding
// a newline specifically to get eaten by the parser. (Alternately for
// textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
// \r is normalized out by HTMLTextAreaElement#value.)
// See: Parsing of "textarea" "listing" and "pre" elements
// from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
return'\n'+ret;}else{returnret;}},_createInitialChildren:function_createInitialChildren(transaction,props,context,el){// Intentional use of != to avoid catching zero/false.
varinnerHTML=props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){setInnerHTML(el,innerHTML.__html);}}else{varcontentToUse=CONTENT_TYPES[_typeof(props.children)]?props.children:null;varchildrenToUse=contentToUse!=null?null:props.children;if(contentToUse!=null){// TODO: Validate that text is allowed as a child of this node
// processed object so the update bailout in ReactReconciler behaves
// correctly (and identically in dev and prod). See #5005.
if(this._unprocessedContextDev!==context){this._unprocessedContextDev=context;this._processedContextDev=processChildContextDev(context,this);}context=this._processedContextDev;}assertValidProps(this,nextProps);this._updateDOMProperties(lastProps,nextProps,transaction,null);this._updateDOMChildren(lastProps,nextProps,transaction,context);if(!canDefineProperty&&this._nodeWithLegacyProperties){this._nodeWithLegacyProperties.props=nextProps;}if(this._tag==='select'){// <select> value update needs to occur after <option> children
*/_updateDOMProperties:function _updateDOMProperties(lastProps,nextProps,transaction,node){var propKey;var styleName;var styleUpdates;for(propKey in lastProps){if(nextProps.hasOwnProperty(propKey)||!lastProps.hasOwnProperty(propKey)){continue;}if(propKey===STYLE){var lastStyle=this._previousStyleCopy;for(styleName in lastStyle){if(lastStyle.hasOwnProperty(styleName)){styleUpdates=styleUpdates||{};styleUpdates[styleName]='';}}this._previousStyleCopy=null;}else if(registrationNameModules.hasOwnProperty(propKey)){if(lastProps[propKey]){ //OnlycalldeleteListeneriftherewasalistenerpreviouslyor
// else willDeleteListener gets called when there wasn't actually a
// listener (e.g., onClick={null})
deleteListener(this._rootNodeID,propKey);}}elseif(DOMProperty.properties[propKey]||DOMProperty.isCustomAttribute(propKey)){if(!node){node=ReactMount.getNode(this._rootNodeID);}DOMPropertyOperations.deleteValueForProperty(node,propKey);}}for(propKeyinnextProps){varnextProp=nextProps[propKey];varlastProp=propKey===STYLE?this._previousStyleCopy:lastProps[propKey];if(!nextProps.hasOwnProperty(propKey)||nextProp===lastProp){continue;}if(propKey===STYLE){if(nextProp){if(process.env.NODE_ENV!=='production'){checkAndWarnForMutatedStyle(this._previousStyleCopy,this._previousStyle,this);this._previousStyle=nextProp;}nextProp=this._previousStyleCopy=assign({},nextProp);}else{this._previousStyleCopy=null;}if(lastProp){// Unset styles on `lastProp` but not on `nextProp`.
for(styleNameinlastProp){if(lastProp.hasOwnProperty(styleName)&&(!nextProp||!nextProp.hasOwnProperty(styleName))){styleUpdates=styleUpdates||{};styleUpdates[styleName]='';}}// Update styles that changed since `lastProp`.
for(styleNameinnextProp){if(nextProp.hasOwnProperty(styleName)&&lastProp[styleName]!==nextProp[styleName]){styleUpdates=styleUpdates||{};styleUpdates[styleName]=nextProp[styleName];}}}else{// Relies on `updateStylesByID` not mutating `styleUpdates`.
styleUpdates=nextProp;}}elseif(registrationNameModules.hasOwnProperty(propKey)){if(nextProp){enqueuePutListener(this._rootNodeID,propKey,nextProp,transaction);}elseif(lastProp){deleteListener(this._rootNodeID,propKey);}}elseif(isCustomComponent(this._tag,nextProps)){if(!node){node=ReactMount.getNode(this._rootNodeID);}if(propKey===CHILDREN){nextProp=null;}DOMPropertyOperations.setValueForAttribute(node,propKey,nextProp);}elseif(DOMProperty.properties[propKey]||DOMProperty.isCustomAttribute(propKey)){if(!node){node=ReactMount.getNode(this._rootNodeID);}// If we're updating to null or undefined, we should remove the property
// from the DOM node instead of inadvertantly setting to a string. This
// brings us in line with the same behavior we have on initial render.
varlastChildren=lastContent!=null?null:lastProps.children;varnextChildren=nextContent!=null?null:nextProps.children;// If we're switching from children to content/html or vice versa, remove
*/!false?process.env.NODE_ENV!=='production'?invariant(false,'<%s> tried to unmount. Because of cross-browser quirks it is '+'impossible to unmount some top-level components (eg <html>, '+'<head>, and <body>) reliably and efficiently. To fix this, have a '+'single top-level component that never unmounts render these '+'elements.',this._tag):invariant(false):undefined;break;}this.unmountChildren();ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID);this._rootNodeID=null;this._wrapperState=null;if(this._nodeWithLegacyProperties){var node=this._nodeWithLegacyProperties;node._reactInternalComponent=null;this._nodeWithLegacyProperties=null;}},getPublicInstance:function getPublicInstance(){if(!this._nodeWithLegacyProperties){var node=ReactMount.getNode(this._rootNodeID);node._reactInternalComponent=this;node.getDOMNode=legacyGetDOMNode;node.isMounted=legacyIsMounted;node.setState=legacySetStateEtc;node.replaceState=legacySetStateEtc;node.forceUpdate=legacySetStateEtc;node.setProps=legacySetProps;node.replaceProps=legacyReplaceProps;if(process.env.NODE_ENV!=='production'){if(canDefineProperty){Object.defineProperties(node,legacyPropsDescriptor);}else { //updateComponentwillupdatethispropertyonsubsequentrenders
node.props=this._currentElement.props;}}else{// updateComponent will update this property on subsequent renders
*/var INVALID_PROPERTY_ERRORS={dangerouslySetInnerHTML:'`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.',style:'`style` must be set using `updateStylesByID()`.'}; /**
instancesByReactID[inst._rootNodeID]=inst;},unmountWrapper:functionunmountWrapper(inst){deleteinstancesByReactID[inst._rootNodeID];},updateWrapper:functionupdateWrapper(inst){varprops=inst._currentElement.props;// TODO: Shouldn't this be getChecked(props)?
varchecked=props.checked;if(checked!=null){ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,'checked',checked||false);}varvalue=LinkedValueUtils.getValue(props);if(value!=null){// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
ReactDOMIDOperations.updatePropertyByID(inst._rootNodeID,'value',''+value);}}};function_handleChange(event){varprops=this._currentElement.props;varreturnValue=LinkedValueUtils.executeOnChange(props,event);// Here we use asap to wait until all updates have propagated, which
// is important when using controlled components within layers:
// https://github.com/facebook/react/issues/1698
ReactUpdates.asap(forceUpdateIfMounted,this);varname=props.name;if(props.type==='radio'&&name!=null){varrootNode=ReactMount.getNode(this._rootNodeID);varqueryRoot=rootNode;while(queryRoot.parentNode){queryRoot=queryRoot.parentNode;}// If `rootNode.form` was non-null, then we could try `form.elements`,
// but that sometimes behaves strangely in IE8. We could also try using
// `form.getElementsByName`, but that will only return direct children
// and won't include inputs that use the HTML5 `form=` attribute. Since
// the input might not even be in a form, let's just use the global
// `querySelectorAll` to ensure we don't miss anything.
vargroup=queryRoot.querySelectorAll('input[name='+JSON.stringify(''+name)+'][type="radio"]');for(vari=0;i<group.length;i++){varotherNode=group[i];if(otherNode===rootNode||otherNode.form!==rootNode.form){continue;}// This will throw if radio buttons rendered by different copies of React
// and the same name are rendered into the same form (same as #1939).
// That's probably okay; we don't support it just as we don't support
// mixing React with non-React.
varotherID=ReactMount.getID(otherNode);!otherID?process.env.NODE_ENV!=='production'?invariant(false,'ReactDOMInput: Mixing React and non-React radio inputs with the '+'same `name` is not supported.'):invariant(false):undefined;varotherInstance=instancesByReactID[otherID];!otherInstance?process.env.NODE_ENV!=='production'?invariant(false,'ReactDOMInput: Unknown radio button ID %s.',otherID):invariant(false):undefined;// If this is a controlled radio button group, forcing the input that
// was previously checked to update will cause it to be come re-checked
if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(props.selected==null,'Use the `defaultValue` or `value` props on <select> instead of '+'setting `selected` on <option>.'):undefined;}// Look up whether this option is 'selected' via context
varselectValue=context[valueContextKey];// If context key is null (e.g., no specified value or after initial mount)
// or missing (e.g., for <datalist>), we don't change props.selected
for(vari=0;i<selectValue.length;i++){if(''+selectValue[i]===''+props.value){selected=true;break;}}}else{selected=''+selectValue===''+props.value;}}inst._wrapperState={selected:selected};},getNativeProps:functiongetNativeProps(inst,props,context){varnativeProps=assign({selected:undefined,children:undefined},props);// Read state only from initial mount because <select> updates value
// manually; we need the initial state only for server rendering
if(inst._wrapperState.selected!=null){nativeProps.selected=inst._wrapperState.selected;}varcontent='';// Flatten children and warn if they aren't strings or numbers;
// invalid types are ignored.
ReactChildren.forEach(props.children,function(child){if(child==null){return;}if(typeofchild==='string'||typeofchild==='number'){content+=child;}else{process.env.NODE_ENV!=='production'?warning(false,'Only strings and numbers are supported as <option> children.'):undefined;}});nativeProps.children=content;returnnativeProps;}};module.exports=ReactDOMOption;}).call(this,require('_process'));},{"./Object.assign":51,"./ReactChildren":57,"./ReactDOMSelect":72,"_process":28,"fbjs/lib/warning":27}],72:[function(require,module,exports){(function(process){/**
*/function checkSelectPropTypes(inst,props){var owner=inst._currentElement._owner;LinkedValueUtils.checkPropTypes('select',props,owner);for(var i=0;i<valuePropNames.length;i++){var propName=valuePropNames[i];if(props[propName]==null){continue;}if(props.multiple){process.env.NODE_ENV!=='production'?warning(Array.isArray(props[propName]),'The `%s` prop supplied to <select> must be an array if '+'`multiple` is true.%s',propName,getDeclarationErrorAddendum(owner)):undefined;}else {process.env.NODE_ENV!=='production'?warning(!Array.isArray(props[propName]),'The `%s` prop supplied to <select> must be a scalar '+'value if `multiple` is false.%s',propName,getDeclarationErrorAddendum(owner)):undefined;}}} /**
varchildContext=assign({},context);childContext[valueContextKey]=inst._wrapperState.initialValue;returnchildContext;},postUpdateWrapper:functionpostUpdateWrapper(inst){varprops=inst._currentElement.props;// After the initial mount, we control selected-ness manually so don't pass
// the context value down
inst._wrapperState.initialValue=undefined;varwasMultiple=inst._wrapperState.wasMultiple;inst._wrapperState.wasMultiple=Boolean(props.multiple);varvalue=LinkedValueUtils.getValue(props);if(value!=null){inst._wrapperState.pendingUpdate=false;updateOptions(inst,Boolean(props.multiple),value);}elseif(wasMultiple!==Boolean(props.multiple)){// For simplicity, reapply `defaultValue` if `multiple` is toggled.
if(props.defaultValue!=null){updateOptions(inst,Boolean(props.multiple),props.defaultValue);}else{// Revert the select back to its default unselected state.
try{/* eslint-disable no-unused-expressions */currentRange.startContainer.nodeType;currentRange.endContainer.nodeType;/* eslint-enable no-unused-expressions */}catch(e){returnnull;}// If the node and offset values are the same, the selection is collapsed.
// `Selection.isCollapsed` is available natively, but IE sometimes gets
// this value wrong.
varisSelectionCollapsed=isCollapsed(selection.anchorNode,selection.anchorOffset,selection.focusNode,selection.focusOffset);varrangeLength=isSelectionCollapsed?0:currentRange.toString().length;vartempRange=currentRange.cloneRange();tempRange.selectNodeContents(node);tempRange.setEnd(currentRange.startContainer,currentRange.startOffset);varisTempRangeCollapsed=isCollapsed(tempRange.startContainer,tempRange.startOffset,tempRange.endContainer,tempRange.endOffset);varstart=isTempRangeCollapsed?0:tempRange.toString().length;varend=start+rangeLength;// Detect whether the selection is backward.
ReactMount.getID(el);setTextContent(el,this._stringText);returnel;}else{varescapedText=escapeTextContentForBrowser(this._stringText);if(transaction.renderToStaticMarkup){// Normally we'd wrap this in a `span` for the reasons stated above, but
// since this is a situation where React won't take over (static pages),
*/var ReactDOMTextarea={getNativeProps:function getNativeProps(inst,props,context){!(props.dangerouslySetInnerHTML==null)?process.env.NODE_ENV!=='production'?invariant(false,'`dangerouslySetInnerHTML` does not make sense on <textarea>.'):invariant(false):undefined; //Alwayssetchildrentothesamething.InIE9,theselectionrangewill
// get reset if `textContent` is mutated.
varnativeProps=assign({},props,{defaultValue:undefined,value:undefined,children:inst._wrapperState.initialValue,onChange:inst._wrapperState.onChange});returnnativeProps;},mountWrapper:functionmountWrapper(inst,props){if(process.env.NODE_ENV!=='production'){LinkedValueUtils.checkPropTypes('textarea',props,inst._currentElement._owner);}vardefaultValue=props.defaultValue;// TODO (yungsters): Remove support for children content in <textarea>.
varchildren=props.children;if(children!=null){if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(false,'Use the `defaultValue` or `value` props instead of setting '+'children on <textarea>.'):undefined;}!(defaultValue==null)?process.env.NODE_ENV!=='production'?invariant(false,'If you supply `defaultValue` on a <textarea>, do not pass children.'):invariant(false):undefined;if(Array.isArray(children)){!(children.length<=1)?process.env.NODE_ENV!=='production'?invariant(false,'<textarea> can only have at most one child.'):invariant(false):undefined;children=children[0];}defaultValue=''+children;}if(defaultValue==null){defaultValue='';}varvalue=LinkedValueUtils.getValue(props);inst._wrapperState={// We save the initial value so that `ReactDOMComponent` doesn't update
// `textContent` (unnecessary since we update value).
// The initial value can be a boolean or object so that's why it's
// forced to be a string.
initialValue:''+(value!=null?value:defaultValue),onChange:_handleChange.bind(inst)};},updateWrapper:functionupdateWrapper(inst){varprops=inst._currentElement.props;varvalue=LinkedValueUtils.getValue(props);if(value!=null){// Cast `value` to a string to ensure the value is set correctly. While
// browsers typically do this as necessary, jsdom doesn't.
_mountStack:[0],_injected:false,start:functionstart(){if(!ReactDefaultPerf._injected){ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure);}ReactDefaultPerf._allMeasurements.length=0;ReactPerf.enableMeasure=true;},stop:functionstop(){ReactPerf.enableMeasure=false;},getLastMeasurements:functiongetLastMeasurements(){returnReactDefaultPerf._allMeasurements;},printExclusive:functionprintExclusive(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;varsummary=ReactDefaultPerfAnalysis.getExclusiveSummary(measurements);console.table(summary.map(function(item){return{'Component class name':item.componentName,'Total inclusive time (ms)':roundFloat(item.inclusive),'Exclusive mount time (ms)':roundFloat(item.exclusive),'Exclusive render time (ms)':roundFloat(item.render),'Mount time per instance (ms)':roundFloat(item.exclusive/item.count),'Render time per instance (ms)':roundFloat(item.render/item.count),'Instances':item.count};}));// TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct
// number.
},printInclusive:functionprintInclusive(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;varsummary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements);console.table(summary.map(function(item){return{'Owner > component':item.componentName,'Inclusive time (ms)':roundFloat(item.time),'Instances':item.count};}));console.log('Total time:',ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+' ms');},getMeasurementsSummaryMap:functiongetMeasurementsSummaryMap(measurements){varsummary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements,true);returnsummary.map(function(item){return{'Owner > component':item.componentName,'Wasted time (ms)':item.time,'Instances':item.count};});},printWasted:functionprintWasted(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));console.log('Total time:',ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+' ms');},printDOM:functionprintDOM(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;varsummary=ReactDefaultPerfAnalysis.getDOMSummary(measurements);console.table(summary.map(function(item){varresult={};result[DOMProperty.ID_ATTRIBUTE_NAME]=item.id;result.type=item.type;result.args=JSON.stringify(item.args);returnresult;}));console.log('Total time:',ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+' ms');},_recordWrite:function_recordWrite(id,fnName,totalTime,args){// TODO: totalTime isn't that useful since it doesn't count paints/reflows
varwrites=ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].writes;writes[id]=writes[id]||[];writes[id].push({type:fnName,time:totalTime,args:args});},measure:functionmeasure(moduleName,fnName,func){returnfunction(){for(var_len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}vartotalTime;varrv;varstart;if(fnName==='_renderNewRootComponent'||fnName==='flushBatchedUpdates'){// A "measurement" is a set of metrics recorded for each flush. We want
// to group the metrics for a given flush together so we can look at the
// components that rendered and the DOM operations that actually
// happened to determine the amount of "wasted work" performed.
ReactDefaultPerf._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0,created:{}});start=performanceNow();rv=func.apply(this,args);ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].totalTime=performanceNow()-start;returnrv;}elseif(fnName==='_mountImageIntoNode'||moduleName==='ReactBrowserEventEmitter'||moduleName==='ReactDOMIDOperations'||moduleName==='CSSPropertyOperations'||moduleName==='DOMChildrenOperations'||moduleName==='DOMPropertyOperations'){start=performanceNow();rv=func.apply(this,args);totalTime=performanceNow()-start;if(fnName==='_mountImageIntoNode'){varmountID=ReactMount.getID(args[1]);ReactDefaultPerf._recordWrite(mountID,fnName,totalTime,args[0]);}elseif(fnName==='dangerouslyProcessChildrenUpdates'){// special format
args[0].forEach(function(update){varwriteArgs={};if(update.fromIndex!==null){writeArgs.fromIndex=update.fromIndex;}if(update.toIndex!==null){writeArgs.toIndex=update.toIndex;}if(update.textContent!==null){writeArgs.textContent=update.textContent;}if(update.markupIndex!==null){writeArgs.markup=args[1][update.markupIndex];}ReactDefaultPerf._recordWrite(update.parentID,update.type,totalTime,writeArgs);});}else{// basic format
varDONT_CARE_THRESHOLD=1.2;varDOM_OPERATION_TYPES={'_mountImageIntoNode':'set innerHTML',INSERT_MARKUP:'set innerHTML',MOVE_EXISTING:'move',REMOVE_NODE:'remove',SET_MARKUP:'set innerHTML',TEXT_CONTENT:'set textContent','setValueForProperty':'update attribute','setValueForAttribute':'update attribute','deleteValueForProperty':'remove attribute','dangerouslyReplaceNodeWithMarkupByID':'replace'};functiongetTotalTime(measurements){// TODO: return number of DOM ops? could be misleading.
// TODO: measure dropped frames after reconcile?
// TODO: log total time of each reconcile and the top-level component
// class that triggered it.
vartotalTime=0;for(vari=0;i<measurements.length;i++){varmeasurement=measurements[i];totalTime+=measurement.totalTime;}returntotalTime;}functiongetDOMSummary(measurements){varitems=[];measurements.forEach(function(measurement){Object.keys(measurement.writes).forEach(function(id){measurement.writes[id].forEach(function(write){items.push({id:id,type:DOM_OPERATION_TYPES[write.type]||write.type,args:write.args});});});});returnitems;}functiongetExclusiveSummary(measurements){varcandidates={};vardisplayName;for(vari=0;i<measurements.length;i++){varmeasurement=measurements[i];varallIDs=assign({},measurement.exclusive,measurement.inclusive);for(varidinallIDs){displayName=measurement.displayNames[id].current;candidates[displayName]=candidates[displayName]||{componentName:displayName,inclusive:0,exclusive:0,render:0,count:0};if(measurement.render[id]){candidates[displayName].render+=measurement.render[id];}if(measurement.exclusive[id]){candidates[displayName].exclusive+=measurement.exclusive[id];}if(measurement.inclusive[id]){candidates[displayName].inclusive+=measurement.inclusive[id];}if(measurement.counts[id]){candidates[displayName].count+=measurement.counts[id];}}}// Now make a sorted array with the results.
vararr=[];for(displayNameincandidates){if(candidates[displayName].exclusive>=DONT_CARE_THRESHOLD){arr.push(candidates[displayName]);}}arr.sort(function(a,b){returnb.exclusive-a.exclusive;});returnarr;}functiongetInclusiveSummary(measurements,onlyClean){varcandidates={};varinclusiveKey;for(vari=0;i<measurements.length;i++){varmeasurement=measurements[i];varallIDs=assign({},measurement.exclusive,measurement.inclusive);varcleanComponents;if(onlyClean){cleanComponents=getUnchangedComponents(measurement);}for(varidinallIDs){if(onlyClean&&!cleanComponents[id]){continue;}vardisplayName=measurement.displayNames[id];// Inclusive time is not useful for many components without knowing where
// they are instantiated. So we aggregate inclusive time with both the
// owner and current displayName as the key.
inclusiveKey=displayName.owner+' > '+displayName.current;candidates[inclusiveKey]=candidates[inclusiveKey]||{componentName:inclusiveKey,time:0,count:0};if(measurement.inclusive[id]){candidates[inclusiveKey].time+=measurement.inclusive[id];}if(measurement.counts[id]){candidates[inclusiveKey].count+=measurement.counts[id];}}}// Now make a sorted array with the results.
vararr=[];for(inclusiveKeyincandidates){if(candidates[inclusiveKey].time>=DONT_CARE_THRESHOLD){arr.push(candidates[inclusiveKey]);}}arr.sort(function(a,b){returnb.time-a.time;});returnarr;}functiongetUnchangedComponents(measurement){// For a given reconcile, look at which components did not actually
// render anything to the DOM and return a mapping of their ID to
// the amount of time it took to render the entire subtree.
varcleanComponents={};vardirtyLeafIDs=Object.keys(measurement.writes);varallIDs=assign({},measurement.exclusive,measurement.inclusive);for(varidinallIDs){varisDirty=false;// For each component that rendered, see if a component that triggered
// a DOM op is in its subtree.
for(vari=0;i<dirtyLeafIDs.length;i++){if(dirtyLeafIDs[i].indexOf(id)===0){isDirty=true;break;}}// check if component newly created
$$typeof:REACT_ELEMENT_TYPE,// Built-in properties that belong on the element
type:type,key:key,ref:ref,props:props,// Record the component responsible for creating this element.
_owner:owner};if(process.env.NODE_ENV!=='production'){// The validation flag is currently mutative. We put it on
// an external backing store so that we can freeze the whole object.
// This can be replaced with a WeakMap once they are implemented in
// commonly used development environments.
element._store={};// To make comparing ReactElements easier for testing purposes, we make
// the validation flag non-enumerable (where possible, which should
// include every environment we run tests in), so the test framework
// ignores it.
if(canDefineProperty){Object.defineProperty(element._store,'validated',{configurable:false,enumerable:false,writable:true,value:false});// self and source are DEV only properties.
Object.defineProperty(element,'_self',{configurable:false,enumerable:false,writable:false,value:self});// Two elements created in two different places should be considered
// equal for testing purposes and therefore we hide it from enumeration.
Object.defineProperty(element,'_source',{configurable:false,enumerable:false,writable:false,value:source});}else{element._store.validated=false;element._self=self;element._source=source;}Object.freeze(element.props);Object.freeze(element);}returnelement;};ReactElement.createElement=function(type,config,children){varpropName;// Reserved names are extracted
varprops={};varkey=null;varref=null;varself=null;varsource=null;if(config!=null){ref=config.ref===undefined?null:config.ref;key=config.key===undefined?null:''+config.key;self=config.__self===undefined?null:config.__self;source=config.__source===undefined?null:config.__source;// Remaining properties are added to a new props object
for(propNameinconfig){if(config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto
if(type&&type.defaultProps){vardefaultProps=type.defaultProps;for(propNameindefaultProps){if(typeofprops[propName]==='undefined'){props[propName]=defaultProps[propName];}}}returnReactElement(type,key,ref,self,source,ReactCurrentOwner.current,props);};ReactElement.createFactory=function(type){varfactory=ReactElement.createElement.bind(null,type);// Expose the type on the factory and the prototype so that it can be
// easily accessed on elements. E.g. `<Foo />.type === Foo`.
// This should not be named `constructor` since this may not be the function
// that created the element, and it may not even be a constructor.
// Legacy hook TODO: Warn if this is accessed
factory.type=type;returnfactory;};ReactElement.cloneAndReplaceKey=function(oldElement,newKey){varnewElement=ReactElement(oldElement.type,newKey,oldElement.ref,oldElement._self,oldElement._source,oldElement._owner,oldElement.props);returnnewElement;};ReactElement.cloneAndReplaceProps=function(oldElement,newProps){varnewElement=ReactElement(oldElement.type,oldElement.key,oldElement.ref,oldElement._self,oldElement._source,oldElement._owner,newProps);if(process.env.NODE_ENV!=='production'){// If the key on the original is valid, then the clone is valid
newElement._store.validated=oldElement._store.validated;}returnnewElement;};ReactElement.cloneElement=function(element,config,children){varpropName;// Original props are copied
varprops=assign({},element.props);// Reserved names are extracted
varkey=element.key;varref=element.ref;// Self is preserved since the owner is preserved.
varself=element._self;// Source is preserved since cloneElement is unlikely to be targeted by a
// transpiler, and the original source is probably a better indicator of the
// true owner.
varsource=element._source;// Owner will be preserved, unless ref is overridden
varowner=element._owner;if(config!=null){if(config.ref!==undefined){// Silently steal the ref from the parent.
for(propNameinconfig){if(config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName];}}}// Children can be more than one argument, and those are transferred onto
return;}process.env.NODE_ENV!=='production'?warning(false,'Each child in an array or iterator should have a unique "key" prop.'+'%s%s%s',addenda.parentOrOwner||'',addenda.childOwner||'',addenda.url||''):undefined;}/**
*/function getAddendaForKeyUse(messageType,element,parentType){var addendum=getDeclarationErrorAddendum();if(!addendum){var parentName=typeof parentType==='string'?parentType:parentType.displayName||parentType.name;if(parentName){addendum=' Check the top-level render call using <'+parentName+'>.';}}var memoizer=ownerHasKeyUseWarning[messageType]||(ownerHasKeyUseWarning[messageType]={});if(memoizer[addendum]){return null;}memoizer[addendum]=true;var addenda={parentOrOwner:addendum,url:' See https://fb.me/react-warning-keysformoreinformation.',childOwner:null};// Usually the current owner is the offender, but if it accepts children as a
// property, it may be the creator of the child that's responsible for
// assigning it a key.
if(element&&element._owner&&element._owner!==ReactCurrentOwner.current){// Give the component that originally created this child.
addenda.childOwner=' It was passed a child from '+element._owner.getName()+'.';}returnaddenda;}/**
*/function checkPropTypes(componentName,propTypes,props,location){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error; //Proptypevalidationmaythrow.Incasetheydo,wedon'twantto
// fail the render phase where it didn't fail before. So we log it.
// After these have been cleaned up, we'll let them throw.
try{// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
!(typeofpropTypes[propName]==='function')?process.env.NODE_ENV!=='production'?invariant(false,'%s: %s type `%s` is invalid; it must be a function, usually from '+'React.PropTypes.',componentName||'React class',ReactPropTypeLocationNames[location],propName):invariant(false):undefined;error=propTypes[propName](props,propName,componentName,location);}catch(ex){error=ex;}process.env.NODE_ENV!=='production'?warning(!error||errorinstanceofError,'%s: type specification of %s `%s` is invalid; the type checker '+'function must return `null` or an `Error` but returned a %s. '+'You may have forgotten to pass an argument to the type checker '+'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and '+'shape all require an argument).',componentName||'React class',ReactPropTypeLocationNames[location],propName,typeoferror==="undefined"?"undefined":_typeof(error)):undefined;if(errorinstanceofError&&!(error.messageinloggedTypeFailures)){// Only monitor this failure once because there tends to be a lot of the
*/function validatePropTypes(element){var componentClass=element.type;if(typeof componentClass!=='function'){return;}var name=componentClass.displayName||componentClass.name;if(componentClass.propTypes){checkPropTypes(name,componentClass.propTypes,element.props,ReactPropTypeLocations.prop);}if(typeof componentClass.getDefaultProps==='function'){process.env.NODE_ENV!=='production'?warning(componentClass.getDefaultProps.isReactClassApproved,'getDefaultProps is only used on classic React.createClass '+'definitions. Use a static property named `defaultProps` instead.'):undefined;}}var ReactElementValidator={createElement:function createElement(type,props,children){var validType=typeof type==='string'||typeof type==='function'; //Wewarninthiscasebutdon'tthrow.Weexpecttheelementcreationto
// succeed and there will likely be errors in render.
process.env.NODE_ENV!=='production'?warning(validType,'React.createElement: type should not be null, undefined, boolean, or '+'number. It should be a string (for DOM elements) or a ReactClass '+'(for composite components).%s',getDeclarationErrorAddendum()):undefined;varelement=ReactElement.createElement.apply(this,arguments);// The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.
if(element==null){returnelement;}// Skip key warning if the type isn't valid since our key validation logic
// doesn't expect a non-string/function type and can throw confusing errors.
// We don't want exception behavior to differ between dev and prod.
// (Rendering will throw with a helpful message and as soon as the type is
// fixed, the key warnings will appear.)
if(validType){for(vari=2;i<arguments.length;i++){validateChildKeys(arguments[i],type);}}validatePropTypes(element);returnelement;},createFactory:functioncreateFactory(type){varvalidatedFactory=ReactElementValidator.createElement.bind(null,type);// Legacy hook TODO: Warn if this is accessed
validatedFactory.type=type;if(process.env.NODE_ENV!=='production'){if(canDefineProperty){Object.defineProperty(validatedFactory,'type',{enumerable:false,get:functionget(){process.env.NODE_ENV!=='production'?warning(false,'Factory.type is deprecated. Access the class directly '+'before passing it to createFactory.'):undefined;Object.defineProperty(this,'type',{value:type});returntype;}});}}returnvalidatedFactory;},cloneElement:functioncloneElement(element,props,children){varnewElement=ReactElement.cloneElement.apply(this,arguments);for(vari=2;i<arguments.length;i++){validateChildKeys(arguments[i],newElement.type);}validatePropTypes(newElement);returnnewElement;}};module.exports=ReactElementValidator;}).call(this,require('_process'));},{"./ReactCurrentOwner":63,"./ReactElement":81,"./ReactPropTypeLocationNames":101,"./ReactPropTypeLocations":102,"./canDefineProperty":133,"./getIteratorFn":144,"_process":28,"fbjs/lib/invariant":16,"fbjs/lib/warning":27}],83:[function(require,module,exports){/**
// traversal, but caching is difficult to do correctly without using a
// mutation observer to listen for all DOM changes.
varnodeID=ReactMount.getID(node);varrootID=ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);varcontainer=ReactMount.findReactContainerForID(rootID);varparent=ReactMount.getFirstReactDOM(container);returnparent;}// Used to store ancestor hierarchy in top level callback
// if (bookKeeping.nativeEvent.path && bookKeeping.nativeEvent.path.length > 1) {
// // New browsers have a path attribute on native events
// handleTopLevelWithPath(bookKeeping);
// } else {
// // Legacy browsers don't have a path attribute on native events
// handleTopLevelWithoutPath(bookKeeping);
// }
voidhandleTopLevelWithPath;// temporarily unused
handleTopLevelWithoutPath(bookKeeping);}// Legacy browsers don't have a path attribute on native events
functionhandleTopLevelWithoutPath(bookKeeping){vartopLevelTarget=ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent))||window;// Loop through the hierarchy, in case there's any nested components.
// It's important that we build the array of ancestors before calling any
// event handlers, because event handlers can modify the DOM, leading to
// inconsistencies with ReactMount's node cache. See #1105.
varancestor=topLevelTarget;while(ancestor){bookKeeping.ancestors.push(ancestor);ancestor=findParent(ancestor);}for(vari=0;i<bookKeeping.ancestors.length;i++){topLevelTarget=bookKeeping.ancestors[i];vartopLevelTargetID=ReactMount.getID(topLevelTarget)||'';ReactEventListener._handleTopLevel(bookKeeping.topLevelType,topLevelTarget,topLevelTargetID,bookKeeping.nativeEvent,getEventTarget(bookKeeping.nativeEvent));}}// New browsers have a path attribute on native events
varreactParent=ReactMount.getFirstReactDOM(currentPathElement);if(reactParent===currentPathElement){varcurrentPathElementID=ReactMount.getID(currentPathElement);varnewRootID=ReactInstanceHandles.getReactRootIDFromNodeID(currentPathElementID);bookKeeping.ancestors.push(currentPathElement);vartopLevelTargetID=ReactMount.getID(currentPathElement)||'';eventsFired++;ReactEventListener._handleTopLevel(bookKeeping.topLevelType,currentPathElement,topLevelTargetID,bookKeeping.nativeEvent,currentNativeTarget);// Jump to the root of this React render tree
varrange=document.selection.createRange();// There can only be one selection per document in IE, so it must
// be in our element.
if(range.parentElement()===input){selection={start:-range.moveStart('character',-input.value.length),end:-range.moveEnd('character',-input.value.length)};}}else{// Content editable or old IE textarea.
*/function getNextDescendantID(ancestorID,destinationID){!(isValidID(ancestorID)&&isValidID(destinationID))?process.env.NODE_ENV!=='production'?invariant(false,'getNextDescendantID(%s, %s): Received an invalid React DOM ID.',ancestorID,destinationID):invariant(false):undefined;!isAncestorIDOf(ancestorID,destinationID)?process.env.NODE_ENV!=='production'?invariant(false,'getNextDescendantID(...): React has made an invalid assumption about '+'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.',ancestorID,destinationID):invariant(false):undefined;if(ancestorID===destinationID){return ancestorID;} //Skipovertheancestorandtheimmediateseparator.Traverseuntilwehit
// another separator or we reach the end of `destinationID`.
for(vari=0;i<=minLength;i++){if(isBoundary(oneID,i)&&isBoundary(twoID,i)){lastCommonMarkerIndex=i;}elseif(oneID.charAt(i)!==twoID.charAt(i)){break;}}varlongestCommonID=oneID.substr(0,lastCommonMarkerIndex);!isValidID(longestCommonID)?process.env.NODE_ENV!=='production'?invariant(false,'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s',oneID,twoID,longestCommonID):invariant(false):undefined;returnlongestCommonID;}/**
*/function traverseParentPath(start,stop,cb,arg,skipFirst,skipLast){start=start||'';stop=stop||'';!(start!==stop)?process.env.NODE_ENV!=='production'?invariant(false,'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.',start):invariant(false):undefined;var traverseUp=isAncestorIDOf(stop,start);!(traverseUp||isAncestorIDOf(start,stop))?process.env.NODE_ENV!=='production'?invariant(false,'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do '+'not have a parent path.',start,stop):invariant(false):undefined; //Traversefrom`start`to`stop`onedepthatatime.
vardepth=0;vartraverse=traverseUp?getParentID:getNextDescendantID;for(varid=start;;/* until break */id=traverse(id,stop)){varret;if((!skipFirst||id!==start)&&(!skipLast||id!==stop)){ret=cb(id,traverseUp,arg);}if(ret===false||id===stop){// Only break //after// visiting `stop`.
break;}!(depth++<MAX_TREE_DEPTH)?process.env.NODE_ENV!=='production'?invariant(false,'traverseParentPath(%s, %s, ...): Detected an infinite loop while '+'traversing the React DOM ID tree. This may be due to malformed IDs: %s',start,stop,id):invariant(false):undefined;}}/**
PropTypes:ReactPropTypes,createClass:ReactClass.createClass,createFactory:createFactory,createMixin:functioncreateMixin(mixin){// Currently a noop. Will be used to validate and trace mixins.
returnmixin;},// This looks DOM specific but these are actually isomorphic helpers
// since they are just generating DOM strings.
DOM:ReactDOMFactories,version:ReactVersion,// Hook for JSX spread, don't use this for anything else.
*/function getID(node){var id=internalGetID(node);if(id){if(nodeCache.hasOwnProperty(id)){var cached=nodeCache[id];if(cached!==node){!!isValid(cached,id)?process.env.NODE_ENV!=='production'?invariant(false,'ReactMount: Two valid but unequal nodes with the same `%s`: %s',ATTR_NAME,id):invariant(false):undefined;nodeCache[id]=node;}}else {nodeCache[id]=node;}}return id;}function internalGetID(node){ //Ifnodeissomethinglikeawindow,document,ortextnode,noneof
// which support attributes or a .getAttribute method, gracefully return
// the empty string, as if the attribute were missing.
for(;node&&node.parentNode!==node;node=node.parentNode){if(node.nodeType!==1){// Not a DOMElement, therefore not a React component
continue;}varnodeID=internalGetID(node);if(!nodeID){continue;}varreactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);// If containersByReactRootID contains the container we find by crawling up
// the tree, we know that this instance of React rendered the node.
// nb. isValid's strategy (with containsNode) does not work because render
// trees may be nested and we don't want a false positive in that case.
varcurrent=node;varlastID;do{lastID=internalGetID(current);current=current.parentNode;if(current==null){// The passed-in node has been detached from the container it was
*/_registerComponent:function _registerComponent(nextComponent,container){!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=='production'?invariant(false,'_registerComponent(...): Target container is not a DOM element.'):invariant(false):undefined;ReactBrowserEventEmitter.ensureScrollValueMonitoring();var reactRootID=ReactMount.registerContainer(container);instancesByReactRootID[reactRootID]=nextComponent;return reactRootID;}, /**
// _renderValidatedComponent) assume that calls to render aren't nested;
// verify that that's the case.
process.env.NODE_ENV!=='production'?warning(ReactCurrentOwner.current==null,'_renderNewRootComponent(): Render methods should be a pure function '+'of props and state; triggering nested component updates from '+'render is not allowed. If necessary, trigger nested updates in '+'componentDidUpdate. Check the render method of %s.',ReactCurrentOwner.current&&ReactCurrentOwner.current.getName()||'ReactCompositeComponent'):undefined;varcomponentInstance=instantiateReactComponent(nextElement,null);varreactRootID=ReactMount._registerComponent(componentInstance,container);// The initial render is synchronous but any updates that happen during
// rendering, in componentWillMount or componentDidMount, will be batched
// according to the current batching strategy.
ReactUpdates.batchedUpdates(batchedMountComponentIntoNode,componentInstance,reactRootID,container,shouldReuseMarkup,context);if(process.env.NODE_ENV!=='production'){// Record the root element in case it later gets transplanted.
*/renderSubtreeIntoContainer:function renderSubtreeIntoContainer(parentComponent,nextElement,container,callback){!(parentComponent!=null&&parentComponent._reactInternalInstance!=null)?process.env.NODE_ENV!=='production'?invariant(false,'parentComponent must be a valid React Component'):invariant(false):undefined;return ReactMount._renderSubtreeIntoContainer(parentComponent,nextElement,container,callback);},_renderSubtreeIntoContainer:function _renderSubtreeIntoContainer(parentComponent,nextElement,container,callback){!ReactElement.isValidElement(nextElement)?process.env.NODE_ENV!=='production'?invariant(false,'ReactDOM.render(): Invalid component element.%s',typeof nextElement==='string'?' Instead of passing an element string, make sure to instantiate '+'it by passing it to React.createElement.':typeof nextElement==='function'?' Instead of passing a component class, make sure to instantiate '+'it by passing it to React.createElement.': //Checkifitquackslikeanelement
nextElement!=null&&nextElement.props!==undefined?' This may be caused by unintentionally loading two independent '+'copies of React.':''):invariant(false):undefined;process.env.NODE_ENV!=='production'?warning(!container||!container.tagName||container.tagName.toUpperCase()!=='BODY','render(): Rendering components directly into document.body is '+'discouraged, since its children are often manipulated by third-party '+'scripts and browser extensions. This may lead to subtle '+'reconciliation issues. Try rendering into a container element created '+'for your app.'):undefined;varnextWrappedElement=newReactElement(TopLevelWrapper,null,null,null,null,null,nextElement);varprevComponent=instancesByReactRootID[getReactRootID(container)];if(prevComponent){varprevWrappedElement=prevComponent._currentElement;varprevElement=prevWrappedElement.props;if(shouldUpdateReactComponent(prevElement,nextElement)){varpublicInst=prevComponent._renderedComponent.getPublicInstance();varupdatedCallback=callback&&function(){callback.call(publicInst);};ReactMount._updateRootComponent(prevComponent,nextWrappedElement,container,updatedCallback);returnpublicInst;}else{ReactMount.unmountComponentAtNode(container);}}varreactRootElement=getReactRootElementInContainer(container);varcontainerHasReactMarkup=reactRootElement&&!!internalGetID(reactRootElement);varcontainerHasNonRootReactChild=hasNonRootReactChild(container);if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(!containerHasNonRootReactChild,'render(...): Replacing React-rendered children with a new root '+'component. If you intended to update the children of this node, '+'you should instead have the existing children update their state '+'and render the new components instead of calling ReactDOM.render.'):undefined;if(!containerHasReactMarkup||reactRootElement.nextSibling){varrootElementSibling=reactRootElement;while(rootElementSibling){if(internalGetID(rootElementSibling)){process.env.NODE_ENV!=='production'?warning(false,'render(): Target node has markup rendered by React, but there '+'are unrelated nodes as well. This is most commonly caused by '+'white-space inserted around server-rendered markup.'):undefined;break;}rootElementSibling=rootElementSibling.nextSibling;}}}varshouldReuseMarkup=containerHasReactMarkup&&!prevComponent&&!containerHasNonRootReactChild;varcomponent=ReactMount._renderNewRootComponent(nextWrappedElement,container,shouldReuseMarkup,parentComponent!=null?parentComponent._reactInternalInstance._processChildContext(parentComponent._reactInternalInstance._context):emptyObject)._renderedComponent.getPublicInstance();if(callback){callback.call(component);}returncomponent;},/**
// _renderValidatedComponent) assume that calls to render aren't nested;
// verify that that's the case. (Strictly speaking, unmounting won't cause a
// render but we still don't expect to be in a render call here.)
process.env.NODE_ENV!=='production'?warning(ReactCurrentOwner.current==null,'unmountComponentAtNode(): Render methods should be a pure function '+'of props and state; triggering nested component updates from render '+'is not allowed. If necessary, trigger nested updates in '+'componentDidUpdate. Check the render method of %s.',ReactCurrentOwner.current&&ReactCurrentOwner.current.getName()||'ReactCompositeComponent'):undefined;!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=='production'?invariant(false,'unmountComponentAtNode(...): Target container is not a DOM element.'):invariant(false):undefined;varreactRootID=getReactRootID(container);varcomponent=instancesByReactRootID[reactRootID];if(!component){// Check if the node being unmounted was rendered by React, but isn't a
// root node.
varcontainerHasNonRootReactChild=hasNonRootReactChild(container);// Check if the container itself is a React root node.
varcontainerID=internalGetID(container);varisContainerReactRoot=containerID&&containerID===ReactInstanceHandles.getReactRootIDFromNodeID(containerID);if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(!containerHasNonRootReactChild,'unmountComponentAtNode(): The node you\'re attempting to unmount '+'was rendered by React and is not a top-level container. %s',isContainerReactRoot?'You may have accidentally passed in a React root node instead '+'of its container.':'Instead, have the parent component update its state and '+'rerender in order to remove this component.'):undefined;}returnfalse;}ReactUpdates.batchedUpdates(unmountComponentFromNode,component,container);deleteinstancesByReactRootID[reactRootID];deletecontainersByReactRootID[reactRootID];if(process.env.NODE_ENV!=='production'){deleterootElementsByReactRootID[reactRootID];}returntrue;},/**
internalGetID(rootElement)===reactRootID,'ReactMount: Root element ID differed from reactRootID.'):undefined;varcontainerChild=container.firstChild;if(containerChild&&reactRootID===internalGetID(containerChild)){// If the container has a new child with the same ID as the old
// root element, then rootElementsByReactRootID[reactRootID] is
// just stale and needs to be updated. The case that deserves a
// warning is when the container is empty.
rootElementsByReactRootID[reactRootID]=containerChild;}else{process.env.NODE_ENV!=='production'?warning(false,'ReactMount: Root element has been removed from its original '+'container. New container: %s',rootElement.parentNode):undefined;}}}returncontainer;},/**
process.env.NODE_ENV!=='production'?warning(deepestAncestor!=null,'React can\'t find the root component node for data-reactid value '+'`%s`. If you\'re seeing this message, it probably means that '+'you\'ve loaded two copies of React on the page. At this time, only '+'a single copy of React can be loaded at a time.',targetID):undefined;}firstChildren[0]=deepestAncestor.firstChild;firstChildren.length=1;while(childIndex<firstChildren.length){varchild=firstChildren[childIndex++];vartargetChild;while(child){varchildID=ReactMount.getID(child);if(childID){// Even if we find the node we're looking for, we finish looping
// through its siblings to ensure they're cached so that we don't have
// to revisit this node again. Otherwise, we make n^2 calls to getID
// when visiting the many children of a single node in order.
if(targetID===childID){targetChild=child;}elseif(ReactInstanceHandles.isAncestorIDOf(childID,targetID)){// If we find a child whose ID is an ancestor of the given ID,
// then we can be sure that we only want to search the subtree
// rooted at this child, so we can throw out the rest of the
// search state.
firstChildren.length=childIndex=0;firstChildren.push(child.firstChild);}}else{// If this child had no ID, then there's a chance that it was
// injected automatically by the browser, as when a `<table>`
// element sprouts an extra `<tbody>` child as a side effect of
// `.innerHTML` parsing. Optimistically continue down this
// branch, but not before examining the other siblings.
firstChildren.push(child.firstChild);}child=child.nextSibling;}if(targetChild){// Emptying firstChildren/findComponentRootReusableArray is
// not necessary for correctness, but it helps the GC reclaim
// any nodes that were left at the end of the search.
firstChildren.length=0;returntargetChild;}}firstChildren.length=0;!false?process.env.NODE_ENV!=='production'?invariant(false,'findComponentRoot(..., %s): Unable to find element. This probably '+'means the DOM was unexpectedly mutated (e.g., by the browser), '+'usually due to forgetting a <tbody> when using tables, nesting tags '+'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> '+'parent. '+'Try inspecting the child nodes of the element with React ID `%s`.',targetID,ReactMount.getID(ancestorNode)):invariant(false):undefined;},_mountImageIntoNode:function_mountImageIntoNode(markup,container,shouldReuseMarkup,transaction){!(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE||container.nodeType===DOCUMENT_FRAGMENT_NODE_TYPE))?process.env.NODE_ENV!=='production'?invariant(false,'mountComponentIntoNode(...): Target container is not valid.'):invariant(false):undefined;if(shouldReuseMarkup){varrootElement=getReactRootElementInContainer(container);if(ReactMarkupChecksum.canReuseMarkup(markup,rootElement)){return;}else{varchecksum=rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);varrootMarkup=rootElement.outerHTML;rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME,checksum);varnormalizedMarkup=markup;if(process.env.NODE_ENV!=='production'){// because rootMarkup is retrieved from the DOM, various normalizations
// will have occurred which will not be present in `markup`. Here,
// insert markup into a <div> or <iframe> depending on the container
// type to perform the same normalizations before comparing.
varnormalizer;if(container.nodeType===ELEMENT_NODE_TYPE){normalizer=document.createElement('div');normalizer.innerHTML=markup;normalizedMarkup=normalizer.innerHTML;}else{normalizer=document.createElement('iframe');document.body.appendChild(normalizer);normalizer.contentDocument.write(markup);normalizedMarkup=normalizer.contentDocument.documentElement.outerHTML;document.body.removeChild(normalizer);}}vardiffIndex=firstDifferenceIndex(normalizedMarkup,rootMarkup);vardifference=' (client) '+normalizedMarkup.substring(diffIndex-20,diffIndex+20)+'\n (server) '+rootMarkup.substring(diffIndex-20,diffIndex+20);!(container.nodeType!==DOC_NODE_TYPE)?process.env.NODE_ENV!=='production'?invariant(false,'You\'re trying to render a component to the document using '+'server rendering but the checksum was invalid. This usually '+'means you rendered a different component type or props on '+'the client from the one on the server, or your render() '+'methods are impure. React cannot handle this case due to '+'cross-browser quirks by rendering at the document root. You '+'should look for environment dependent code in your components '+'and ensure the props are the same client and server side:\n%s',difference):invariant(false):undefined;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(false,'React attempted to reuse markup in a container but the '+'checksum was invalid. This generally means that you are '+'using server rendering and the markup generated on the '+'server was not what the client was expecting. React injected '+'new markup to compensate which works but you have lost many '+'of the benefits of server rendering. Instead, figure out '+'why the markup being generated is different on the client '+'or server:\n%s',difference):undefined;}}}!(container.nodeType!==DOC_NODE_TYPE)?process.env.NODE_ENV!=='production'?invariant(false,'You\'re trying to render a component to the document but '+'you didn\'t use server rendering. We can\'t do this '+'without using server rendering due to cross-browser quirks. '+'See ReactDOMServer.renderToString() for server rendering.'):invariant(false):undefined;if(transaction.useCreateElement){while(container.lastChild){container.removeChild(container.lastChild);}container.appendChild(markup);}else{setInnerHTML(container,markup);}},ownerDocumentContextKey:ownerDocumentContextKey,/**
*/mountChildren:function mountChildren(nestedChildren,transaction,context){var children=this._reconcilerInstantiateChildren(nestedChildren,transaction,context);this._renderedChildren=children;var mountImages=[];var index=0;for(var name in children){if(children.hasOwnProperty(name)){var child=children[name]; //Inlinedforperformance,see`ReactInstanceHandles.createReactID`.
// `lastIndex` will be the last index visited in `prevChildren`.
varlastIndex=0;varnextIndex=0;for(nameinnextChildren){if(!nextChildren.hasOwnProperty(name)){continue;}varprevChild=prevChildren&&prevChildren[name];varnextChild=nextChildren[name];if(prevChild===nextChild){this.moveChild(prevChild,nextIndex,lastIndex);lastIndex=Math.max(prevChild._mountIndex,lastIndex);prevChild._mountIndex=nextIndex;}else{if(prevChild){// Update `lastIndex` before `_mountIndex` gets unset by unmounting.
lastIndex=Math.max(prevChild._mountIndex,lastIndex);this._unmountChild(prevChild);}// The child must be instantiated before it's mounted.
this._mountChildByNameAtIndex(nextChild,name,nextIndex,transaction,context);}nextIndex++;}// Remove children that are no longer present.
vartagToComponentClass={};vartextComponentClass=null;varReactNativeComponentInjection={// This accepts a class that receives the tag string. This is a catch all
// that can render any kind of tag.
injectGenericComponentClass:functioninjectGenericComponentClass(componentClass){genericComponentClass=componentClass;},// This accepts a text component class that takes the text string to be
// rendered as props.
injectTextComponentClass:functioninjectTextComponentClass(componentClass){textComponentClass=componentClass;},// This accepts a keyed object with classes as values. Each key represents a
// tag. That particular tag will use this class instead of the generic one.
*/function createInternalComponent(element){!genericComponentClass?process.env.NODE_ENV!=='production'?invariant(false,'There is no registered component for the tag %s',element.type):invariant(false):undefined;return new genericComponentClass(element.type,element.props);} /**
*@param{ReactText}text
*@return{ReactComponent}
*/function createInstanceForText(text){return new textComponentClass(text);} /**
*/addComponentAsRefTo:function addComponentAsRefTo(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).'):invariant(false):undefined;owner.attachRef(ref,component);},/**
*/removeComponentAsRefFrom:function removeComponentAsRefFrom(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).'):invariant(false):undefined;// Check that `component` is still the current ref because we do not want to
*'Expected a string or an URI for '+propName+' in '+
*componentName
*);
*}
*}
*},
*render:function(){...}
*});
*
*@internal
*/var ANONYMOUS='<<anonymous>>';var ReactPropTypes={array:createPrimitiveTypeChecker('array'),bool:createPrimitiveTypeChecker('boolean'),func:createPrimitiveTypeChecker('function'),number:createPrimitiveTypeChecker('number'),object:createPrimitiveTypeChecker('object'),string:createPrimitiveTypeChecker('string'),any:createAnyTypeChecker(),arrayOf:createArrayOfTypeChecker,element:createElementTypeChecker(),instanceOf:createInstanceTypeChecker,node:createNodeChecker(),objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker};function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName,location,propFullName){componentName=componentName||ANONYMOUS;propFullName=propFullName||propName;if(props[propName]==null){var locationName=ReactPropTypeLocationNames[location];if(isRequired){return new Error('Required '+locationName+' `'+propFullName+'` was not specified in '+('`'+componentName+'`.'));}return null;}else {return validate(props,propName,componentName,location,propFullName);}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType;}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location,propFullName){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){var locationName=ReactPropTypeLocationNames[location]; //`propValue`beinginstanceof,say,date/regexp,passthe'object'
// check, but we can offer a more precise error message here rather than
// 'of type `object`'.
varpreciseType=getPreciseType(propValue);returnnewError('Invalid '+locationName+' `'+propFullName+'` of type '+('`'+preciseType+'` supplied to `'+componentName+'`, expected ')+('`'+expectedType+'`.'));}returnnull;}returncreateChainableTypeChecker(validate);}functioncreateAnyTypeChecker(){returncreateChainableTypeChecker(emptyFunction.thatReturns(null));}functioncreateArrayOfTypeChecker(typeChecker){functionvalidate(props,propName,componentName,location,propFullName){varpropValue=props[propName];if(!Array.isArray(propValue)){varlocationName=ReactPropTypeLocationNames[location];varpropType=getPropType(propValue);returnnewError('Invalid '+locationName+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected an array.'));}for(vari=0;i<propValue.length;i++){varerror=typeChecker(propValue,i,componentName,location,propFullName+'['+i+']');if(errorinstanceofError){returnerror;}}returnnull;}returncreateChainableTypeChecker(validate);}functioncreateElementTypeChecker(){functionvalidate(props,propName,componentName,location,propFullName){if(!ReactElement.isValidElement(props[propName])){varlocationName=ReactPropTypeLocationNames[location];returnnewError('Invalid '+locationName+' `'+propFullName+'` supplied to '+('`'+componentName+'`, expected a single ReactElement.'));}returnnull;}returncreateChainableTypeChecker(validate);}functioncreateInstanceTypeChecker(expectedClass){functionvalidate(props,propName,componentName,location,propFullName){if(!(props[propName]instanceofexpectedClass)){varlocationName=ReactPropTypeLocationNames[location];varexpectedClassName=expectedClass.name||ANONYMOUS;varactualClassName=getClassName(props[propName]);returnnewError('Invalid '+locationName+' `'+propFullName+'` of type '+('`'+actualClassName+'` supplied to `'+componentName+'`, expected ')+('instance of `'+expectedClassName+'`.'));}returnnull;}returncreateChainableTypeChecker(validate);}functioncreateEnumTypeChecker(expectedValues){if(!Array.isArray(expectedValues)){returncreateChainableTypeChecker(function(){returnnewError('Invalid argument supplied to oneOf, expected an instance of array.');});}functionvalidate(props,propName,componentName,location,propFullName){varpropValue=props[propName];for(vari=0;i<expectedValues.length;i++){if(propValue===expectedValues[i]){returnnull;}}varlocationName=ReactPropTypeLocationNames[location];varvaluesString=JSON.stringify(expectedValues);returnnewError('Invalid '+locationName+' `'+propFullName+'` of value `'+propValue+'` '+('supplied to `'+componentName+'`, expected one of '+valuesString+'.'));}returncreateChainableTypeChecker(validate);}functioncreateObjectOfTypeChecker(typeChecker){functionvalidate(props,propName,componentName,location,propFullName){varpropValue=props[propName];varpropType=getPropType(propValue);if(propType!=='object'){varlocationName=ReactPropTypeLocationNames[location];returnnewError('Invalid '+locationName+' `'+propFullName+'` of type '+('`'+propType+'` supplied to `'+componentName+'`, expected an object.'));}for(varkeyinpropValue){if(propValue.hasOwnProperty(key)){varerror=typeChecker(propValue,key,componentName,location,propFullName+'.'+key);if(errorinstanceofError){returnerror;}}}returnnull;}returncreateChainableTypeChecker(validate);}functioncreateUnionTypeChecker(arrayOfTypeCheckers){if(!Array.isArray(arrayOfTypeCheckers)){returncreateChainableTypeChecker(function(){returnnewError('Invalid argument supplied to oneOfType, expected an instance of array.');});}functionvalidate(props,propName,componentName,location,propFullName){for(vari=0;i<arrayOfTypeCheckers.length;i++){varchecker=arrayOfTypeCheckers[i];if(checker(props,propName,componentName,location,propFullName)==null){returnnull;}}varlocationName=ReactPropTypeLocationNames[location];returnnewError('Invalid '+locationName+' `'+propFullName+'` supplied to '+('`'+componentName+'`.'));}returncreateChainableTypeChecker(validate);}functioncreateNodeChecker(){functionvalidate(props,propName,componentName,location,propFullName)
while(!(step=iterator.next()).done){varentry=step.value;if(entry){if(!isNode(entry[1])){returnfalse;}}}}}else{returnfalse;}returntrue;default:returnfalse;}}// Equivalent of `typeof` but with special handling for array and regexp.
functiongetPropType(propValue){varpropType=typeofpropValue==="undefined"?"undefined":_typeof(propValue);if(Array.isArray(propValue)){return'array';}if(propValueinstanceofRegExp){// Old webkits (at least until Android 4.0) return 'function' rather than
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
// passes PropTypes.object.
return'object';}returnpropType;}// This handles more types than `getPropType`. Only used for error messages.
// See `createPrimitiveTypeChecker`.
functiongetPreciseType(propValue){varpropType=getPropType(propValue);if(propType==='object'){if(propValueinstanceofDate){return'date';}elseif(propValueinstanceofRegExp){return'regexp';}}returnpropType;}// Returns class name of the object, if any.
ReactOwner.removeComponentAsRefFrom(component,ref,owner);}}ReactRef.attachRefs=function(instance,element){if(element===null||element===false){return;}varref=element.ref;if(ref!=null){attachRef(ref,instance,element._owner);}};ReactRef.shouldUpdateRefs=function(prevElement,nextElement){// If either the owner or a `ref` has changed, make sure the newest owner
// has stored a reference to `this`, and the previous owner (if different)
// has forgotten the reference to `this`. We use the element instead
// of the public this.props because the post processing cannot determine
// a ref. The ref conceptually lives on the element.
// TODO: Should this even be possible? The owner cannot change because
// it's forbidden by shouldUpdateReactComponent. The ref can change
// if you swap the keys of but not the refs. Reconsider where this check
// is made. It probably belongs where the key checking and
// instantiateReactComponent is done.
varprevEmpty=prevElement===null||prevElement===false;varnextEmpty=nextElement===null||nextElement===false;return(// This has a few false positives w/r/t empty components.
*/'use strict';var ReactServerBatchingStrategy={isBatchingUpdates:false,batchedUpdates:function batchedUpdates(callback){ //Don't do anything here. During the server rendering we don'twantto
// schedule any updates. We will simply ignore them.
*/function renderToStaticMarkup(element){!ReactElement.isValidElement(element)?process.env.NODE_ENV!=='production'?invariant(false,'renderToStaticMarkup(): You must pass a valid ReactElement.'):invariant(false):undefined;var transaction;try{ReactUpdates.injection.injectBatchingStrategy(ReactServerBatchingStrategy);var id=ReactInstanceHandles.createReactRootID();transaction=ReactServerRenderingTransaction.getPooled(true);return transaction.perform(function(){var componentInstance=instantiateReactComponent(element,null);return componentInstance.mountComponent(id,transaction,emptyObject);},null);}finally {ReactServerRenderingTransaction.release(transaction); //ReverttotheDOMbatchingstrategysincethesetworenderers
// We're probably calling from enqueueCallback. We don't want to warn
// there because we already warned for the corresponding lifecycle method.
process.env.NODE_ENV!=='production'?warning(!callerName,'%s(...): Can only update a mounted or mounting component. '+'This usually means you called %s() on an unmounted component. '+'This is a no-op. Please check the code for the %s component.',callerName,callerName,publicInstance.constructor.displayName):undefined;}returnnull;}if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(ReactCurrentOwner.current==null,'%s(...): Cannot update during an existing state transition '+'(such as within `render`). Render methods should be a pure function '+'of props and state.',callerName):undefined;}returninternalInstance;}/**
*/isMounted:function isMounted(publicInstance){if(process.env.NODE_ENV!=='production'){var owner=ReactCurrentOwner.current;if(owner!==null){process.env.NODE_ENV!=='production'?warning(owner._warnedAboutRefsInRender,'%s is accessing isMounted inside its render() function. '+'render() should be a pure function of props and state. It should '+'never access something that requires stale data from the previous '+'render, such as refs. Move this logic to componentDidMount and '+'componentDidUpdate instead.',owner.getName()||'A component'):undefined;owner._warnedAboutRefsInRender=true;}}var internalInstance=ReactInstanceMap.get(publicInstance);if(internalInstance){ //DuringcomponentWillMountandrenderthiswillstillbenullbutafter
// that will always render to something. At least for now. So we can use
*/enqueueCallback:function enqueueCallback(publicInstance,callback){!(typeof callback==='function')?process.env.NODE_ENV!=='production'?invariant(false,'enqueueCallback(...): You called `setProps`, `replaceProps`, '+'`setState`, `replaceState`, or `forceUpdate` with a callback that '+'isn\'t callable.'):invariant(false):undefined;var internalInstance=getInternalInstanceReadyForUpdate(publicInstance); //Previouslywewouldthrowanerrorifwedidn'thaveaninternal
// instance. Since we want to make it a no-op instead, we mirror the same
// behavior we have in other enqueue* methods.
// We also need to ignore callbacks in componentWillMount. See
// enqueueUpdates.
if(!internalInstance){returnnull;}if(internalInstance._pendingCallbacks){internalInstance._pendingCallbacks.push(callback);}else{internalInstance._pendingCallbacks=[callback];}// TODO: The callback here is ignored when setState is called from
// componentWillMount. Either fix it or disallow doing so completely in
// favor of getInitialState. Alternatively, we can disallow
// componentWillMount during server-side rendering.
enqueueUpdate(internalInstance);},enqueueCallbackInternal:functionenqueueCallbackInternal(internalInstance,callback){!(typeofcallback==='function')?process.env.NODE_ENV!=='production'?invariant(false,'enqueueCallback(...): You called `setProps`, `replaceProps`, '+'`setState`, `replaceState`, or `forceUpdate` with a callback that '+'isn\'t callable.'):invariant(false):undefined;if(internalInstance._pendingCallbacks){internalInstance._pendingCallbacks.push(callback);}else{internalInstance._pendingCallbacks=[callback];}enqueueUpdate(internalInstance);},/**
*/enqueueSetProps:function enqueueSetProps(publicInstance,partialProps){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,'setProps');if(!internalInstance){return;}ReactUpdateQueue.enqueueSetPropsInternal(internalInstance,partialProps);},enqueueSetPropsInternal:function enqueueSetPropsInternal(internalInstance,partialProps){var topLevelWrapper=internalInstance._topLevelWrapper;!topLevelWrapper?process.env.NODE_ENV!=='production'?invariant(false,'setProps(...): You called `setProps` on a '+'component with a parent. This is an anti-pattern since props will '+'get reactively updated when rendered. Instead, change the owner\'s '+'`render` method to pass the correct value as props to the component '+'where it is created.'):invariant(false):undefined; //Mergewiththependingelementifitexists,otherwisewithexisting
*/enqueueReplaceProps:function enqueueReplaceProps(publicInstance,props){var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,'replaceProps');if(!internalInstance){return;}ReactUpdateQueue.enqueueReplacePropsInternal(internalInstance,props);},enqueueReplacePropsInternal:function enqueueReplacePropsInternal(internalInstance,props){var topLevelWrapper=internalInstance._topLevelWrapper;!topLevelWrapper?process.env.NODE_ENV!=='production'?invariant(false,'replaceProps(...): You called `replaceProps` on a '+'component with a parent. This is an anti-pattern since props will '+'get reactively updated when rendered. Instead, change the owner\'s '+'`render` method to pass the correct value as props to the component '+'where it is created.'):invariant(false):undefined; //Mergewiththependingelementifitexists,otherwisewithexisting
// always -- see shouldComponentUpdate()) will reconcile children, reconcile
// them before their children by sorting the array.
dirtyComponents.sort(mountOrderComparator);for(vari=0;i<len;i++){// If a component is unmounted before pending changes apply, it will still
// be here, but we assume that it has cleared its _pendingCallbacks and
// that performUpdateIfNecessary is a noop.
varcomponent=dirtyComponents[i];// If performUpdateIfNecessary happens to enqueue any new updates, we
// shouldn't execute the callbacks until the next render happens, so
// stash the callbacks first
varcallbacks=component._pendingCallbacks;component._pendingCallbacks=null;ReactReconciler.performUpdateIfNecessary(component,transaction.reconcileTransaction);if(callbacks){for(varj=0;j<callbacks.length;j++){transaction.callbackQueue.enqueue(callbacks[j],component.getPublicInstance());}}}}varflushBatchedUpdates=functionflushBatchedUpdates(){// ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
// array and perform any updates enqueued by mount-ready handlers (i.e.,
// componentDidUpdate) but we need to check here too in order to catch
// updates enqueued by setState callbacks and asap calls.
*/function asap(callback,context){!batchingStrategy.isBatchingUpdates?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where'+'updates are not being batched.'):invariant(false):undefined;asapCallbackQueue.enqueue(callback,context);asapEnqueued=true;}var ReactUpdatesInjection={injectReconcileTransaction:function injectReconcileTransaction(ReconcileTransaction){!ReconcileTransaction?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates: must provide a reconcile transaction class'):invariant(false):undefined;ReactUpdates.ReactReconcileTransaction=ReconcileTransaction;},injectBatchingStrategy:function injectBatchingStrategy(_batchingStrategy){!_batchingStrategy?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates: must provide a batching strategy'):invariant(false):undefined;!(typeof _batchingStrategy.batchedUpdates==='function')?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates: must provide a batchedUpdates() function'):invariant(false):undefined;!(typeof _batchingStrategy.isBatchingUpdates==='boolean')?process.env.NODE_ENV!=='production'?invariant(false,'ReactUpdates: must provide an isBatchingUpdates boolean attribute'):invariant(false):undefined;batchingStrategy=_batchingStrategy;}};var ReactUpdates={ /**
casetopLevelTypes.topFocus:if(isTextInputElement(topLevelTarget)||topLevelTarget.contentEditable==='true'){activeElement=topLevelTarget;activeElementID=topLevelTargetID;lastSelection=null;}break;casetopLevelTypes.topBlur:activeElement=null;activeElementID=null;lastSelection=null;break;// Don't fire the event while the user is dragging. This matches the
// semantics of the native select event.
casetopLevelTypes.topMouseDown:mouseDown=true;break;casetopLevelTypes.topContextMenu:casetopLevelTypes.topMouseUp:mouseDown=false;returnconstructSelectEvent(nativeEvent,nativeEventTarget);// Chrome and IE fire non-standard event when selection is changed (and
// sometimes when it hasn't). IE's event fires out of order with respect
// to key and input events on deletion, so we discard it.
//
// Firefox doesn't support selectionchange, so check selection status
// after each key entry. The selection changes after keydown and before
// keyup, but we check on keydown as well in the case of holding down a
// key, when multiple keydown events are fired but only one keyup is.
// This is also our approach for IE handling, for the reason above.
casetopLevelTypes.topSelectionChange:if(skipSelectionChangeEvent){break;}// falls through
EventConstructor=SyntheticEvent;break;casetopLevelTypes.topKeyPress:// FireFox creates a keypress event for function keys too. This removes
// the unwanted keypress events. Enter is however both printable and
// non-printable. One would expect Tab to be as well (but it isn't).
if(getEventCharCode(nativeEvent)===0){returnnull;}/* falls through */casetopLevelTypes.topKeyDown:casetopLevelTypes.topKeyUp:EventConstructor=SyntheticKeyboardEvent;break;casetopLevelTypes.topBlur:casetopLevelTypes.topFocus:EventConstructor=SyntheticFocusEvent;break;casetopLevelTypes.topClick:// Firefox creates a click event on right mouse clicks. This removes the
// unwanted click events.
if(nativeEvent.button===2){returnnull;}/* falls through */casetopLevelTypes.topContextMenu:casetopLevelTypes.topDoubleClick:casetopLevelTypes.topMouseDown:casetopLevelTypes.topMouseMove:casetopLevelTypes.topMouseOut:casetopLevelTypes.topMouseOver:casetopLevelTypes.topMouseUp:EventConstructor=SyntheticMouseEvent;break;casetopLevelTypes.topDrag:casetopLevelTypes.topDragEnd:casetopLevelTypes.topDragEnter:casetopLevelTypes.topDragExit:casetopLevelTypes.topDragLeave:casetopLevelTypes.topDragOver:casetopLevelTypes.topDragStart:casetopLevelTypes.topDrop:EventConstructor=SyntheticDragEvent;break;casetopLevelTypes.topTouchCancel:casetopLevelTypes.topTouchEnd:casetopLevelTypes.topTouchMove:casetopLevelTypes.topTouchStart:EventConstructor=SyntheticTouchEvent;break;casetopLevelTypes.topScroll:EventConstructor=SyntheticUIEvent;break;casetopLevelTypes.topWheel:EventConstructor=SyntheticWheelEvent;break;casetopLevelTypes.topCopy:casetopLevelTypes.topCut:casetopLevelTypes.topPaste:EventConstructor=SyntheticClipboardEvent;break;}!EventConstructor?process.env.NODE_ENV!=='production'?invariant(false,'SimpleEventPlugin: Unhandled event type, `%s`.',topLevelType):invariant(false):undefined;varevent=EventConstructor.getPooled(dispatchConfig,topLevelTargetID,nativeEvent,nativeEventTarget);EventPropagators.accumulateTwoPhaseDispatches(event);returnevent;},didPutListener:functiondidPutListener(id,registrationName,listener){// Mobile Safari does not fire properly bubble click events on
// non-interactive elements, which means delegated click listeners do not
// fire. The workaround for this bug involves attaching an empty click
charCode:functioncharCode(event){// `charCode` is the result of a KeyPress event and represents the value of
// the actual printable character.
// KeyPress is deprecated, but its replacement is not yet final and not
// implemented in any major browser. Only KeyPress has charCode.
if(event.type==='keypress'){returngetEventCharCode(event);}return0;},keyCode:functionkeyCode(event){// `keyCode` is the result of a KeyDown/Up event and represents the value of
// physical keyboard key.
// The actual meaning of the value depends on the users' keyboard layout
// which cannot be detected. Assuming that it is a US keyboard layout
// provides a surprisingly accurate mapping for US and European users.
// Due to this, it is left to the user to implement at this time.
if(event.type==='keydown'||event.type==='keyup'){returnevent.keyCode;}return0;},which:functionwhich(event){// `which` is an alias for either `keyCode` or `charCode` depending on the
*/var WheelEventInterface={deltaX:function deltaX(event){return 'deltaX' in event?event.deltaX: //Fallbackto`wheelDeltaX`forWebkitandnormalize(rightispositive).
'wheelDeltaX'inevent?-event.wheelDeltaX:0;},deltaY:functiondeltaY(event){return'deltaY'inevent?event.deltaY:// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
'wheelDeltaY'inevent?-event.wheelDeltaY:// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
'wheelDelta'inevent?-event.wheelDelta:0;},deltaZ:null,// Browsers without "deltaMode" is reporting in raw wheel delta where one
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
*/perform:function perform(method,scope,a,b,c,d,e,f){!!this.isInTransaction()?process.env.NODE_ENV!=='production'?invariant(false,'Transaction.perform(...): Cannot initialize a transaction when there '+'is already an outstanding transaction.'):invariant(false):undefined;var errorThrown;var ret;try{this._isInTransaction=true; //Catchingerrorsmakesdebuggingmoredifficult,sowestartwith
// errorThrown set to true before setting it to false after calling
// close -- if it's still set to true in the finally block, it means
// one of these calls threw.
errorThrown=true;this.initializeAll(0);ret=method.call(scope,a,b,c,d,e,f);errorThrown=false;}finally{try{if(errorThrown){// If `method` throws, prefer to show that stack trace over any thrown
// by invoking `closeAll`.
try{this.closeAll(0);}catch(err){}}else{// Since `method` didn't throw, we don't want to silence the exception
// here.
this.closeAll(0);}}finally{this._isInTransaction=false;}}returnret;},initializeAll:functioninitializeAll(startIndex){vartransactionWrappers=this.transactionWrappers;for(vari=startIndex;i<transactionWrappers.length;i++){varwrapper=transactionWrappers[i];try{// Catching errors makes debugging more difficult, so we start with the
// 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]=wrapper.initialize?wrapper.initialize.call(this):null;}finally{if(this.wrapperInitData[i]===Transaction.OBSERVED_ERROR){// The initializer for wrapper i threw an error; initialize the
// remaining wrappers but silence any exceptions from them to ensure
*/closeAll:function closeAll(startIndex){!this.isInTransaction()?process.env.NODE_ENV!=='production'?invariant(false,'Transaction.closeAll(): Cannot close transaction when none are open.'):invariant(false):undefined;var transactionWrappers=this.transactionWrappers;for(var i=startIndex;i<transactionWrappers.length;i++){var wrapper=transactionWrappers[i];var initData=this.wrapperInitData[i];var errorThrown;try{ //Catchingerrorsmakesdebuggingmoredifficult,sowestartwith
// errorThrown set to true before setting it to false after calling
// 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){wrapper.close.call(this,initData);}errorThrown=false;}finally{if(errorThrown){// The closer for wrapper i threw an error; close the remaining
// wrappers but silence any exceptions from them to ensure that the
*/function accumulateInto(current,next){!(next!=null)?process.env.NODE_ENV!=='production'?invariant(false,'accumulateInto(...): Accumulated items must not be null or undefined.'):invariant(false):undefined;if(current==null){return next;} //Botharenotempty.Warning:Nevercallx.concat(y)whenyouarenot
// certain that x is an Array (x could be a string with concat method).
varcurrentIsArray=Array.isArray(current);varnextIsArray=Array.isArray(next);if(currentIsArray&&nextIsArray){current.push.apply(current,next);returncurrent;}if(currentIsArray){current.push(next);returncurrent;}if(nextIsArray){// A bit too dangerous to mutate `next`.
// This is not an XSS hole but instead a potential CSS injection issue
// which has lead to a greater discussion about how we're going to
// trust URLs moving forward. See #2115901
varisEmpty=value==null||typeofvalue==='boolean'||value==='';if(isEmpty){return'';}varisNonNumeric=isNaN(value);if(isNonNumeric||value===0||isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name]){return''+value;// cast to string
// build tools from mistaking them for real requires.
// Otherwise the build tools will attempt to build a '%s' module.
'React.%s is deprecated. Please use %s.%s from require'+'(\'%s\') '+'instead.',fnName,newModule,fnName,newPackage):undefined;warned=true;returnfn.apply(ctx,arguments);};// We need to make sure all properties of the original fn are copied over.
// In particular, this is needed to support PropTypes
varresult=traverseContext;varkeyUnique=result[name]===undefined;if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(keyUnique,'flattenChildren(...): Encountered two children with the same key, '+'`%s`. Child keys must be unique; when two children share a key, only '+'the first child will be used.',name):undefined;}if(keyUnique&&child!=null){result[name]=child;}}/**
// implementations of a working draft specification.
// FireFox implements `key` but returns `MozPrintableKey` for all
// printable characters (normalized to `Unidentified`), ignore it.
varkey=normalizeKey[nativeEvent.key]||nativeEvent.key;if(key!=='Unidentified'){returnkey;}}// Browser does not implement `key`, polyfill as much of it as we can.
if(nativeEvent.type==='keypress'){varcharCode=getEventCharCode(nativeEvent);// The enter-key is technically both printable and non-printable and can
// thus be captured by `keypress`, no other non-printable key should.
returncharCode===13?'Enter':String.fromCharCode(charCode);}if(nativeEvent.type==='keydown'||nativeEvent.type==='keyup'){// While user keyboard layout determines the actual meaning of each
// `keyCode` value, almost all function keys have a universal value.
varReactCompositeComponentWrapper=functionReactCompositeComponentWrapper(){};assign(ReactCompositeComponentWrapper.prototype,ReactCompositeComponent.Mixin,{_instantiateReactComponent:instantiateReactComponent});functiongetDeclarationErrorAddendum(owner){if(owner){varname=owner.getName();if(name){return' Check the render method of `'+name+'`.';}}return'';}/**
if(typeofelement.type==='string'){instance=ReactNativeComponent.createInternalComponent(element);}elseif(isInternalComponentType(element.type)){// This is temporarily available for custom components that are not string
// representations. I.e. ART. Once those are updated to use the string
// representation, we can drop this code path.
instance=newelement.type(element);}else{instance=newReactCompositeComponentWrapper();}}elseif(typeofnode==='string'||typeofnode==='number'){instance=ReactNativeComponent.createInstanceForText(node);}else{!false?process.env.NODE_ENV!=='production'?invariant(false,'Encountered invalid React node of type %s',typeofnode==="undefined"?"undefined":_typeof(node)):invariant(false):undefined;}if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(typeofinstance.construct==='function'&&typeofinstance.mountComponent==='function'&&typeofinstance.receiveComponent==='function'&&typeofinstance.unmountComponent==='function','Only React Components can be mounted.'):undefined;}// Sets up the instance. This can probably just move into the constructor now.
instance.construct(node);// These two fields are used by the DOM and ART diffing algorithms
// respectively. Instead of using expandos on components, we should be
// storing the state needed by the diffing algorithms elsewhere.
instance._mountIndex=0;instance._mountImage=null;if(process.env.NODE_ENV!=='production'){instance._isOwnerNecessary=false;instance._warnedAboutRefsInRender=false;}// Internal instances should fully constructed at this point, so they should
// not get any new fields added to them at this point.
if(typeofMSApp!=='undefined'&&MSApp.execUnsafeLocalFunction){setInnerHTML=function(node,html){MSApp.execUnsafeLocalFunction(function(){node.innerHTML=html;});};}if(ExecutionEnvironment.canUseDOM){// IE8: When updating a just created node with innerHTML only leading
// whitespace is removed. When updating an existing node with innerHTML
// whitespace in root TextNodes is also collapsed.
children=null;}if(children===null||type==='string'||type==='number'||ReactElement.isValidElement(children)){callback(traverseContext,children,// If it's the only child, treat the name as if it was wrapped in an array
// so that it's consistent if the number of children grows.
nameSoFar===''?SEPARATOR+getComponentKey(children,0):nameSoFar);return1;}varchild;varnextName;varsubtreeCount=0;// Count of children found in the current subtree.
varnextNamePrefix=nameSoFar===''?SEPARATOR:nameSoFar+SUBSEPARATOR;if(Array.isArray(children)){for(vari=0;i<children.length;i++){child=children[i];nextName=nextNamePrefix+getComponentKey(child,i);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext);}}else{variteratorFn=getIteratorFn(children);if(iteratorFn){variterator=iteratorFn.call(children);varstep;if(iteratorFn!==children.entries){varii=0;while(!(step=iterator.next()).done){child=step.value;nextName=nextNamePrefix+getComponentKey(child,ii++);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext);}}else{if(process.env.NODE_ENV!=='production'){process.env.NODE_ENV!=='production'?warning(didWarnAboutMaps,'Using Maps as children is not yet fully supported. It is an '+'experimental feature that might be removed. Convert it to a '+'sequence / iterable of keyed ReactElements instead.'):undefined;didWarnAboutMaps=true;}// Iterator will provide entry [k,v] tuples rather than values.
while(!(step=iterator.next()).done){varentry=step.value;if(entry){child=entry[1];nextName=nextNamePrefix+wrapUserProvidedKey(entry[0])+SUBSEPARATOR+getComponentKey(child,0);subtreeCount+=traverseAllChildrenImpl(child,nextName,callback,traverseContext);}}}}elseif(type==='object'){varaddendum='';if(process.env.NODE_ENV!=='production'){addendum=' If you meant to render a collection of children, use an array '+'instead or wrap the object using createFragment(object) from the '+'React add-ons.';if(children._isReactElement){addendum=' It looks like you\'re using an element created by a different '+'version of React. Make sure to use only one copy of React.';}if(ReactCurrentOwner.current){varname=ReactCurrentOwner.current.getName();if(name){addendum+=' Check the render method of `'+name+'`.';}}}varchildrenString=String(children);!false?process.env.NODE_ENV!=='production'?invariant(false,'Objects are not valid as a React child (found: %s).%s',childrenString==='[object Object]'?'object with keys {'+Object.keys(children).join(', ')+'}':childrenString,addendum):invariant(false):undefined;}}returnsubtreeCount;}/**
varimpliedEndTags=['dd','dt','li','option','optgroup','p','rp','rt'];varemptyAncestorInfo={parentTag:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};varupdatedAncestorInfo=functionupdatedAncestorInfo(oldInfo,tag,instance){varancestorInfo=assign({},oldInfo||emptyAncestorInfo);varinfo={tag:tag,instance:instance};if(inScopeTags.indexOf(tag)!==-1){ancestorInfo.aTagInScope=null;ancestorInfo.buttonTagInScope=null;ancestorInfo.nobrTagInScope=null;}if(buttonScopeTags.indexOf(tag)!==-1){ancestorInfo.pTagInButtonScope=null;}// See rules for 'li', 'dd', 'dt' start tags in
case'select':returntag==='option'||tag==='optgroup'||tag==='#text';case'optgroup':returntag==='option'||tag==='#text';// Strictly speaking, seeing an <option> doesn't mean we're in a <select>
switch(tag){case'h1':case'h2':case'h3':case'h4':case'h5':case'h6':returnparentTag!=='h1'&&parentTag!=='h2'&&parentTag!=='h3'&&parentTag!=='h4'&&parentTag!=='h5'&&parentTag!=='h6';case'rp':case'rt':returnimpliedEndTags.indexOf(parentTag)===-1;case'caption':case'col':case'colgroup':case'frame':case'head':case'tbody':case'td':case'tfoot':case'th':case'thead':case'tr':// These tags are only valid with a few parents that have special child
// parsing rules -- if we're down here, then none of those matched and
// so we allow it only if we don't know what the parent is, as all other
// with that -- otherwise we just start with the parent's owners.
deepestCommon!==-1?childOwners[deepestCommon].getName()||UNKNOWN:[],ancestorOwnerNames,ancestorTag,// If we're warning about an invalid (non-parent) ancestry, add '...'
invalidAncestor?['...']:[],childOwnerNames,childTag).join(' > ');varwarnKey=!!invalidParent+'|'+childTag+'|'+ancestorTag+'|'+ownerInfo;if(didWarn[warnKey]){return;}didWarn[warnKey]=true;if(invalidParent){varinfo='';if(ancestorTag==='table'&&childTag==='tr'){info+=' Add a <tbody> to your code to match the DOM tree generated by '+'the browser.';}process.env.NODE_ENV!=='production'?warning(false,'validateDOMNesting(...): <%s> cannot appear as a child of <%s>. '+'See %s.%s',childTag,ancestorTag,ownerInfo,info):undefined;}else{process.env.NODE_ENV!=='production'?warning(false,'validateDOMNesting(...): <%s> cannot appear as a descendant of '+'<%s>. See %s.',childTag,ancestorTag,ownerInfo):undefined;}}};validateDOMNesting.ancestorInfoContextKey='__validateDOMNesting_ancestorInfo$'+Math.random().toString(36).slice(2);validateDOMNesting.updatedAncestorInfo=updatedAncestorInfo;// For testing
varmouse=[(event.nativeEvent.offsetX-center[0])/zoom,(height-event.nativeEvent.offsetY-center[1])/zoom];// we need to set the center so that `mouse` stays at
// the same position on screen, i.e (vectorially):
this.setState({zoom:newZoom,center:[mouse[0]*zoom-mouse[0]*newZoom+center[0],mouse[1]*zoom-mouse[1]*newZoom+center[1]]},this.draw);event.preventDefault();}},{key:'mouseDown',value:functionmouseDown(event){this.setState({dragging:[event.nativeEvent.offsetX,event.nativeEvent.offsetY]});}},{key:'mouseUp',value:functionmouseUp(){this.setState({dragging:false});}},{key:'mouseMove',value:functionmouseMove(event){vardragging=this.state.dragging;varcenter=this.state.center;if(dragging!==false){varnewMouse=[event.nativeEvent.offsetX,event.nativeEvent.offsetY];varmovement=[newMouse[0]-dragging[0],newMouse[1]-dragging[1]];this.setState({dragging:newMouse,center:[center[0]+movement[0],center[1]-movement[1]]},this.draw);event.preventDefault();}}},{key:'draw',value:functiondraw(){varwidth=this.ctx.canvas.width;varheight=this.ctx.canvas.height;varzoom=this.state.zoom;varcenter=this.state.center;varpoints=this.state.points;// do not plot (very) small sizes
if(width<1){return;}this.ctx.clearRect(0,0,width,height);// do the chaos game
varimage=this.ctx.getImageData(0,0,width,height);varlength=points.length;varcolor=[0,0,0];for(vari=50;i<length;i+=1){varx=Math.floor(points[i][0]*zoom+center[0]);vary=height-Math.floor(points[i][1]*zoom+center[1]);if(x>=0&&x<width&&y>=0&&y<height){varindex=(y*width+x)*4;image.data[index]=color[0];image.data[index+1]=color[1];image.data[index+2]=color[2];image.data[index+3]=255;}}this.ctx.putImageData(image,0,0);}// this is dirty. TODO: make it less coupled