made with requirebin
Last active
August 29, 2015 14:16
-
-
Save aldendaniels/643dbb03eaeeb51f5791 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://stackoverflow.com/questions/27446960/immutable-js-relationships?nah=1#28730230 | |
var Immutable = require('immutable'); | |
var React = require('react/addons'); | |
var emitter = require('event-emitter'); | |
var store = (function() { | |
// John has two children named Alice and Bob. | |
// John's child Bob has a cat named Orion. | |
var state = new Immutable.fromJS({ | |
people: [ | |
{ id: 1, name: 'John' }, | |
{ id: 2, name: 'Alice', parentId: 1 }, | |
{ id: 3, name: 'Bob', parentId: 1 } | |
], | |
cat: { | |
name: 'Orion', | |
ownerId: 3 | |
} | |
}); | |
var store = emitter({ | |
getState: function() { | |
return state; | |
}, | |
renameJohn: function() { | |
var curName = state.getIn(['people', 0, 'name']); | |
state = state.setIn(['people', 0, 'name'], curName === 'John' ? 'Jane' : 'John'); | |
store._emitChange(); | |
}, | |
_emitChange: function() { | |
store.emit('change'); | |
} | |
}); | |
return store; | |
})(); | |
function findById(list, id) { | |
return list.find(function(item) { | |
return item.get('id') === id; | |
}); | |
} | |
var Person = React.createClass({ | |
mixins: [React.addons.PureRenderMixin], | |
props: { | |
person: React.PropTypes.instanceOf(Immutable.Map), | |
parent: React.PropTypes.instanceOf(Immutable.Map) | |
}, | |
render: function() { | |
return React.createElement('li', null, | |
this.props.person.get('name') + | |
(this.props.parent ? ' is a child of ' + this.props.parent.get('name') : '') | |
); | |
} | |
}); | |
var App = React.createClass({ | |
getInitialState: function() { | |
return store.getState(); | |
}, | |
componentDidMount: function() { | |
store.on('change', this.onStoreChange); | |
}, | |
componentWillUnmount: function() { | |
store.off('change', this.onStoreChange); | |
}, | |
onStoreChange: function() { | |
this.replaceState(store.getState()); | |
}, | |
changeName: function() { | |
store.renameJohn(); | |
}, | |
renderPerson: function(person) { | |
var parent = findById(this.state.get('people'), person.get('parentId')); | |
return React.createElement(Person, {person: person, parent: parent}); | |
}, | |
renderCat: function() { | |
var people = this.state.get('people'); | |
var cat = this.state.get('cat'); | |
var catOwner = findById(people, cat.get('ownerId')); | |
var catOwnerParent = findById(people, catOwner.get('parentId')); | |
return React.createElement('div', null, | |
cat.get('name') + ' is owned by ' + catOwner.get('name') + ', child of ' + catOwnerParent.get('name') | |
); | |
}, | |
render: function() { | |
var peopleElems = this.state.get('people').toArray().map(this.renderPerson); | |
var catElem = this.renderCat(); | |
return React.createElement('div', {style: {fontFamily: 'arial', padding: '30px'}}, [ | |
React.createElement('h4', null, 'People'), | |
React.createElement('ul', null, peopleElems), | |
React.createElement('h4', null, 'The Cat'), | |
React.createElement('div', null, catElem), | |
React.createElement('br'), | |
React.createElement('button', {onClick: this.changeName}, 'Toggle Name') | |
]); | |
} | |
}); | |
React.render(React.createElement(App), document.body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({immutable:[function(require,module,exports){(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):global.Immutable=factory()})(this,function(){"use strict";var SLICE$0=Array.prototype.slice;function createClass(ctor,superClass){if(superClass){ctor.prototype=Object.create(superClass.prototype)}ctor.prototype.constructor=ctor}var DELETE="delete";var SHIFT=5;var SIZE=1<<SHIFT;var MASK=SIZE-1;var NOT_SET={};var CHANGE_LENGTH={value:false};var DID_ALTER={value:false};function MakeRef(ref){ref.value=false;return ref}function SetRef(ref){ref&&(ref.value=true)}function OwnerID(){}function arrCopy(arr,offset){offset=offset||0;var len=Math.max(0,arr.length-offset);var newArr=new Array(len);for(var ii=0;ii<len;ii++){newArr[ii]=arr[ii+offset]}return newArr}function ensureSize(iter){if(iter.size===undefined){iter.size=iter.__iterate(returnTrue)}return iter.size}function wrapIndex(iter,index){return index>=0?+index:ensureSize(iter)+ +index}function returnTrue(){return true}function wholeSlice(begin,end,size){return(begin===0||size!==undefined&&begin<=-size)&&(end===undefined||size!==undefined&&end>=size)}function resolveBegin(begin,size){return resolveIndex(begin,size,0)}function resolveEnd(end,size){return resolveIndex(end,size,size)}function resolveIndex(index,size,defaultIndex){return index===undefined?defaultIndex:index<0?Math.max(0,size+index):size===undefined?index:Math.min(size,index)}function Iterable(value){return isIterable(value)?value:Seq(value)}createClass(KeyedIterable,Iterable);function KeyedIterable(value){return isKeyed(value)?value:KeyedSeq(value)}createClass(IndexedIterable,Iterable);function IndexedIterable(value){return isIndexed(value)?value:IndexedSeq(value)}createClass(SetIterable,Iterable);function SetIterable(value){return isIterable(value)&&!isAssociative(value)?value:SetSeq(value)}function isIterable(maybeIterable){return!!(maybeIterable&&maybeIterable[IS_ITERABLE_SENTINEL])}function isKeyed(maybeKeyed){return!!(maybeKeyed&&maybeKeyed[IS_KEYED_SENTINEL])}function isIndexed(maybeIndexed){return!!(maybeIndexed&&maybeIndexed[IS_INDEXED_SENTINEL])}function isAssociative(maybeAssociative){return isKeyed(maybeAssociative)||isIndexed(maybeAssociative)}function isOrdered(maybeOrdered){return!!(maybeOrdered&&maybeOrdered[IS_ORDERED_SENTINEL])}Iterable.isIterable=isIterable;Iterable.isKeyed=isKeyed;Iterable.isIndexed=isIndexed;Iterable.isAssociative=isAssociative;Iterable.isOrdered=isOrdered;Iterable.Keyed=KeyedIterable;Iterable.Indexed=IndexedIterable;Iterable.Set=SetIterable;var IS_ITERABLE_SENTINEL="@@__IMMUTABLE_ITERABLE__@@";var IS_KEYED_SENTINEL="@@__IMMUTABLE_KEYED__@@";var IS_INDEXED_SENTINEL="@@__IMMUTABLE_INDEXED__@@";var IS_ORDERED_SENTINEL="@@__IMMUTABLE_ORDERED__@@";var ITERATE_KEYS=0;var ITERATE_VALUES=1;var ITERATE_ENTRIES=2;var REAL_ITERATOR_SYMBOL=typeof Symbol==="function"&&Symbol.iterator;var FAUX_ITERATOR_SYMBOL="@@iterator";var ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||FAUX_ITERATOR_SYMBOL;function Iterator(next){this.next=next}Iterator.prototype.toString=function(){return"[Iterator]"};Iterator.KEYS=ITERATE_KEYS;Iterator.VALUES=ITERATE_VALUES;Iterator.ENTRIES=ITERATE_ENTRIES;Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()};Iterator.prototype[ITERATOR_SYMBOL]=function(){return this};function iteratorValue(type,k,v,iteratorResult){var value=type===0?k:type===1?v:[k,v];iteratorResult?iteratorResult.value=value:iteratorResult={value:value,done:false};return iteratorResult}function iteratorDone(){return{value:undefined,done:true}}function hasIterator(maybeIterable){return!!getIteratorFn(maybeIterable)}function isIterator(maybeIterator){return maybeIterator&&typeof maybeIterator.next==="function"}function getIterator(iterable){var iteratorFn=getIteratorFn(iterable);return iteratorFn&&iteratorFn.call(iterable)}function getIteratorFn(iterable){var iteratorFn=iterable&&(REAL_ITERATOR_SYMBOL&&iterable[REAL_ITERATOR_SYMBOL]||iterable[FAUX_ITERATOR_SYMBOL]);if(typeof iteratorFn==="function"){return iteratorFn}}function isArrayLike(value){return value&&typeof value.length==="number"}createClass(Seq,Iterable);function Seq(value){return value===null||value===undefined?emptySequence():isIterable(value)?value.toSeq():seqFromValue(value)}Seq.of=function(){return Seq(arguments)};Seq.prototype.toSeq=function(){return this};Seq.prototype.toString=function(){return this.__toString("Seq {","}")};Seq.prototype.cacheResult=function(){if(!this._cache&&this.__iterateUncached){this._cache=this.entrySeq().toArray();this.size=this._cache.length}return this};Seq.prototype.__iterate=function(fn,reverse){return seqIterate(this,fn,reverse,true)};Seq.prototype.__iterator=function(type,reverse){return seqIterator(this,type,reverse,true)};createClass(KeyedSeq,Seq);function KeyedSeq(value){return value===null||value===undefined?emptySequence().toKeyedSeq():isIterable(value)?isKeyed(value)?value.toSeq():value.fromEntrySeq():keyedSeqFromValue(value)}KeyedSeq.of=function(){return KeyedSeq(arguments)};KeyedSeq.prototype.toKeyedSeq=function(){return this};KeyedSeq.prototype.toSeq=function(){return this};createClass(IndexedSeq,Seq);function IndexedSeq(value){return value===null||value===undefined?emptySequence():!isIterable(value)?indexedSeqFromValue(value):isKeyed(value)?value.entrySeq():value.toIndexedSeq()}IndexedSeq.of=function(){return IndexedSeq(arguments)};IndexedSeq.prototype.toIndexedSeq=function(){return this};IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")};IndexedSeq.prototype.__iterate=function(fn,reverse){return seqIterate(this,fn,reverse,false)};IndexedSeq.prototype.__iterator=function(type,reverse){return seqIterator(this,type,reverse,false)};createClass(SetSeq,Seq);function SetSeq(value){return(value===null||value===undefined?emptySequence():!isIterable(value)?indexedSeqFromValue(value):isKeyed(value)?value.entrySeq():value).toSetSeq()}SetSeq.of=function(){return SetSeq(arguments)};SetSeq.prototype.toSetSeq=function(){return this};Seq.isSeq=isSeq;Seq.Keyed=KeyedSeq;Seq.Set=SetSeq;Seq.Indexed=IndexedSeq;var IS_SEQ_SENTINEL="@@__IMMUTABLE_SEQ__@@";Seq.prototype[IS_SEQ_SENTINEL]=true;createClass(ArraySeq,IndexedSeq);function ArraySeq(array){this._array=array;this.size=array.length}ArraySeq.prototype.get=function(index,notSetValue){return this.has(index)?this._array[wrapIndex(this,index)]:notSetValue};ArraySeq.prototype.__iterate=function(fn,reverse){var array=this._array;var maxIndex=array.length-1;for(var ii=0;ii<=maxIndex;ii++){if(fn(array[reverse?maxIndex-ii:ii],ii,this)===false){return ii+1}}return ii};ArraySeq.prototype.__iterator=function(type,reverse){var array=this._array;var maxIndex=array.length-1;var ii=0;return new Iterator(function(){return ii>maxIndex?iteratorDone():iteratorValue(type,ii,array[reverse?maxIndex-ii++:ii++])})};createClass(ObjectSeq,KeyedSeq);function ObjectSeq(object){var keys=Object.keys(object);this._object=object;this._keys=keys;this.size=keys.length}ObjectSeq.prototype.get=function(key,notSetValue){if(notSetValue!==undefined&&!this.has(key)){return notSetValue}return this._object[key]};ObjectSeq.prototype.has=function(key){return this._object.hasOwnProperty(key)};ObjectSeq.prototype.__iterate=function(fn,reverse){var object=this._object;var keys=this._keys;var maxIndex=keys.length-1;for(var ii=0;ii<=maxIndex;ii++){var key=keys[reverse?maxIndex-ii:ii];if(fn(object[key],key,this)===false){return ii+1}}return ii};ObjectSeq.prototype.__iterator=function(type,reverse){var object=this._object;var keys=this._keys;var maxIndex=keys.length-1;var ii=0;return new Iterator(function(){var key=keys[reverse?maxIndex-ii:ii];return ii++>maxIndex?iteratorDone():iteratorValue(type,key,object[key])})};ObjectSeq.prototype[IS_ORDERED_SENTINEL]=true;createClass(IterableSeq,IndexedSeq);function IterableSeq(iterable){this._iterable=iterable;this.size=iterable.length||iterable.size}IterableSeq.prototype.__iterateUncached=function(fn,reverse){if(reverse){return this.cacheResult().__iterate(fn,reverse)}var iterable=this._iterable;var iterator=getIterator(iterable);var iterations=0;if(isIterator(iterator)){var step;while(!(step=iterator.next()).done){if(fn(step.value,iterations++,this)===false){break}}}return iterations};IterableSeq.prototype.__iteratorUncached=function(type,reverse){if(reverse){return this.cacheResult().__iterator(type,reverse)}var iterable=this._iterable;var iterator=getIterator(iterable);if(!isIterator(iterator)){return new Iterator(iteratorDone)}var iterations=0;return new Iterator(function(){var step=iterator.next();return step.done?step:iteratorValue(type,iterations++,step.value)})};createClass(IteratorSeq,IndexedSeq);function IteratorSeq(iterator){this._iterator=iterator;this._iteratorCache=[]}IteratorSeq.prototype.__iterateUncached=function(fn,reverse){if(reverse){return this.cacheResult().__iterate(fn,reverse)}var iterator=this._iterator;var cache=this._iteratorCache;var iterations=0;while(iterations<cache.length){if(fn(cache[iterations],iterations++,this)===false){return iterations}}var step;while(!(step=iterator.next()).done){var val=step.value;cache[iterations]=val;if(fn(val,iterations++,this)===false){break}}return iterations};IteratorSeq.prototype.__iteratorUncached=function(type,reverse){if(reverse){return this.cacheResult().__iterator(type,reverse)}var iterator=this._iterator;var cache=this._iteratorCache;var iterations=0;return new Iterator(function(){if(iterations>=cache.length){var step=iterator.next();if(step.done){return step}cache[iterations]=step.value}return iteratorValue(type,iterations,cache[iterations++])})};function isSeq(maybeSeq){return!!(maybeSeq&&maybeSeq[IS_SEQ_SENTINEL])}var EMPTY_SEQ;function emptySequence(){return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([]))}function keyedSeqFromValue(value){var seq=Array.isArray(value)?new ArraySeq(value).fromEntrySeq():isIterator(value)?new IteratorSeq(value).fromEntrySeq():hasIterator(value)?new IterableSeq(value).fromEntrySeq():typeof value==="object"?new ObjectSeq(value):undefined;if(!seq){throw new TypeError("Expected Array or iterable object of [k, v] entries, "+"or keyed object: "+value)}return seq}function indexedSeqFromValue(value){var seq=maybeIndexedSeqFromValue(value);if(!seq){throw new TypeError("Expected Array or iterable object of values: "+value)}return seq}function seqFromValue(value){var seq=maybeIndexedSeqFromValue(value)||typeof value==="object"&&new ObjectSeq(value);if(!seq){throw new TypeError("Expected Array or iterable object of values, or keyed object: "+value)}return seq}function maybeIndexedSeqFromValue(value){return isArrayLike(value)?new ArraySeq(value):isIterator(value)?new IteratorSeq(value):hasIterator(value)?new IterableSeq(value):undefined}function seqIterate(seq,fn,reverse,useKeys){var cache=seq._cache;if(cache){var maxIndex=cache.length-1;for(var ii=0;ii<=maxIndex;ii++){var entry=cache[reverse?maxIndex-ii:ii];if(fn(entry[1],useKeys?entry[0]:ii,seq)===false){return ii+1}}return ii}return seq.__iterateUncached(fn,reverse)}function seqIterator(seq,type,reverse,useKeys){var cache=seq._cache;if(cache){var maxIndex=cache.length-1;var ii=0;return new Iterator(function(){var entry=cache[reverse?maxIndex-ii:ii];return ii++>maxIndex?iteratorDone():iteratorValue(type,useKeys?entry[0]:ii-1,entry[1])})}return seq.__iteratorUncached(type,reverse)}createClass(Collection,Iterable);function Collection(){throw TypeError("Abstract")}createClass(KeyedCollection,Collection);function KeyedCollection(){}createClass(IndexedCollection,Collection);function IndexedCollection(){}createClass(SetCollection,Collection);function SetCollection(){}Collection.Keyed=KeyedCollection;Collection.Indexed=IndexedCollection;Collection.Set=SetCollection;function is(valueA,valueB){if(valueA===valueB||valueA!==valueA&&valueB!==valueB){return true}if(!valueA||!valueB){return false}if(typeof valueA.valueOf==="function"&&typeof valueB.valueOf==="function"){valueA=valueA.valueOf();valueB=valueB.valueOf()}return typeof valueA.equals==="function"&&typeof valueB.equals==="function"?valueA.equals(valueB):valueA===valueB||valueA!==valueA&&valueB!==valueB}function fromJS(json,converter){return converter?fromJSWith(converter,json,"",{"":json}):fromJSDefault(json)}function fromJSWith(converter,json,key,parentJSON){if(Array.isArray(json)){return converter.call(parentJSON,key,IndexedSeq(json).map(function(v,k){return fromJSWith(converter,v,k,json)}))}if(isPlainObj(json)){return converter.call(parentJSON,key,KeyedSeq(json).map(function(v,k){return fromJSWith(converter,v,k,json)}))}return json}function fromJSDefault(json){if(Array.isArray(json)){return IndexedSeq(json).map(fromJSDefault).toList()}if(isPlainObj(json)){return KeyedSeq(json).map(fromJSDefault).toMap()}return json}function isPlainObj(value){return value&&value.constructor===Object}var Math__imul=typeof Math.imul==="function"&&Math.imul(4294967295,2)===-2?Math.imul:function Math__imul(a,b){a=a|0;b=b|0;var c=a&65535;var d=b&65535;return c*d+((a>>>16)*d+c*(b>>>16)<<16>>>0)|0};function smi(i32){return i32>>>1&1073741824|i32&3221225471}function hash(o){if(o===false||o===null||o===undefined){return 0}if(typeof o.valueOf==="function"){o=o.valueOf();if(o===false||o===null||o===undefined){return 0}}if(o===true){return 1}var type=typeof o;if(type==="number"){var h=o|0;if(h!==o){h^=o*4294967295}while(o>4294967295){o/=4294967295;h^=o}return smi(h)}if(type==="string"){return o.length>STRING_HASH_CACHE_MIN_STRLEN?cachedHashString(o):hashString(o)}if(typeof o.hashCode==="function"){return o.hashCode()}return hashJSObj(o)}function cachedHashString(string){var hash=stringHashCache[string];if(hash===undefined){hash=hashString(string);if(STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE){STRING_HASH_CACHE_SIZE=0;stringHashCache={}}STRING_HASH_CACHE_SIZE++;stringHashCache[string]=hash}return hash}function hashString(string){var hash=0;for(var ii=0;ii<string.length;ii++){hash=31*hash+string.charCodeAt(ii)|0}return smi(hash)}function hashJSObj(obj){var hash=weakMap&&weakMap.get(obj);if(hash)return hash;hash=obj[UID_HASH_KEY];if(hash)return hash;if(!canDefineProperty){hash=obj.propertyIsEnumerable&&obj.propertyIsEnumerable[UID_HASH_KEY];if(hash)return hash;hash=getIENodeHash(obj);if(hash)return hash}if(Object.isExtensible&&!Object.isExtensible(obj)){throw new Error("Non-extensible objects are not allowed as keys.")}hash=++objHashUID;if(objHashUID&1073741824){objHashUID=0}if(weakMap){weakMap.set(obj,hash)}else if(canDefineProperty){Object.defineProperty(obj,UID_HASH_KEY,{enumerable:false,configurable:false,writable:false,value:hash})}else if(obj.propertyIsEnumerable&&obj.propertyIsEnumerable===obj.constructor.prototype.propertyIsEnumerable){obj.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)};obj.propertyIsEnumerable[UID_HASH_KEY]=hash}else if(obj.nodeType){obj[UID_HASH_KEY]=hash}else{throw new Error("Unable to set a non-enumerable property on object.")}return hash}var canDefineProperty=function(){try{Object.defineProperty({},"x",{});return true}catch(e){return false}}();function getIENodeHash(node){if(node&&node.nodeType>0){switch(node.nodeType){case 1:return node.uniqueID;case 9:return node.documentElement&&node.documentElement.uniqueID}}}var weakMap=typeof WeakMap==="function"&&new WeakMap;var objHashUID=0;var UID_HASH_KEY="__immutablehash__";if(typeof Symbol==="function"){UID_HASH_KEY=Symbol(UID_HASH_KEY)}var STRING_HASH_CACHE_MIN_STRLEN=16;var STRING_HASH_CACHE_MAX_SIZE=255;var STRING_HASH_CACHE_SIZE=0;var stringHashCache={};function invariant(condition,error){if(!condition)throw new Error(error)}function assertNotInfinite(size){invariant(size!==Infinity,"Cannot perform this action with an infinite size.")}createClass(ToKeyedSequence,KeyedSeq);function ToKeyedSequence(indexed,useKeys){this._iter=indexed;this._useKeys=useKeys;this.size=indexed.size}ToKeyedSequence.prototype.get=function(key,notSetValue){return this._iter.get(key,notSetValue)};ToKeyedSequence.prototype.has=function(key){return this._iter.has(key)};ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()};ToKeyedSequence.prototype.reverse=function(){var this$0=this;var reversedSequence=reverseFactory(this,true);if(!this._useKeys){reversedSequence.valueSeq=function(){return this$0._iter.toSeq().reverse()}}return reversedSequence};ToKeyedSequence.prototype.map=function(mapper,context){var this$0=this;var mappedSequence=mapFactory(this,mapper,context);if(!this._useKeys){mappedSequence.valueSeq=function(){return this$0._iter.toSeq().map(mapper,context)}}return mappedSequence};ToKeyedSequence.prototype.__iterate=function(fn,reverse){var this$0=this;var ii;return this._iter.__iterate(this._useKeys?function(v,k){return fn(v,k,this$0)}:(ii=reverse?resolveSize(this):0,function(v){return fn(v,reverse?--ii:ii++,this$0)}),reverse)};ToKeyedSequence.prototype.__iterator=function(type,reverse){if(this._useKeys){return this._iter.__iterator(type,reverse)}var iterator=this._iter.__iterator(ITERATE_VALUES,reverse);var ii=reverse?resolveSize(this):0;return new Iterator(function(){var step=iterator.next();return step.done?step:iteratorValue(type,reverse?--ii:ii++,step.value,step)})};ToKeyedSequence.prototype[IS_ORDERED_SENTINEL]=true;createClass(ToIndexedSequence,IndexedSeq);function ToIndexedSequence(iter){this._iter=iter;this.size=iter.size}ToIndexedSequence.prototype.contains=function(value){return this._iter.contains(value)};ToIndexedSequence.prototype.__iterate=function(fn,reverse){var this$0=this;var iterations=0;return this._iter.__iterate(function(v){return fn(v,iterations++,this$0)},reverse)};ToIndexedSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(ITERATE_VALUES,reverse);var iterations=0;return new Iterator(function(){var step=iterator.next();return step.done?step:iteratorValue(type,iterations++,step.value,step)})};createClass(ToSetSequence,SetSeq);function ToSetSequence(iter){this._iter=iter;this.size=iter.size}ToSetSequence.prototype.has=function(key){return this._iter.contains(key)};ToSetSequence.prototype.__iterate=function(fn,reverse){var this$0=this;return this._iter.__iterate(function(v){return fn(v,v,this$0)},reverse)};ToSetSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(ITERATE_VALUES,reverse);return new Iterator(function(){var step=iterator.next();return step.done?step:iteratorValue(type,step.value,step.value,step)})};createClass(FromEntriesSequence,KeyedSeq);function FromEntriesSequence(entries){this._iter=entries;this.size=entries.size}FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()};FromEntriesSequence.prototype.__iterate=function(fn,reverse){var this$0=this;return this._iter.__iterate(function(entry){if(entry){validateEntry(entry);return fn(entry[1],entry[0],this$0)}},reverse)};FromEntriesSequence.prototype.__iterator=function(type,reverse){var iterator=this._iter.__iterator(ITERATE_VALUES,reverse);return new Iterator(function(){while(true){var step=iterator.next();if(step.done){return step}var entry=step.value;if(entry){validateEntry(entry);return type===ITERATE_ENTRIES?step:iteratorValue(type,entry[0],entry[1],step)}}})};ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough;function flipFactory(iterable){var flipSequence=makeSequence(iterable);flipSequence._iter=iterable;flipSequence.size=iterable.size;flipSequence.flip=function(){return iterable};flipSequence.reverse=function(){var reversedSequence=iterable.reverse.apply(this);reversedSequence.flip=function(){return iterable.reverse()};return reversedSequence};flipSequence.has=function(key){return iterable.contains(key)};flipSequence.contains=function(key){return iterable.has(key)};flipSequence.cacheResult=cacheResultThrough;flipSequence.__iterateUncached=function(fn,reverse){var this$0=this;return iterable.__iterate(function(v,k){return fn(k,v,this$0)!==false},reverse)};flipSequence.__iteratorUncached=function(type,reverse){if(type===ITERATE_ENTRIES){var iterator=iterable.__iterator(type,reverse);return new Iterator(function(){var step=iterator.next();if(!step.done){var k=step.value[0];step.value[0]=step.value[1];step.value[1]=k}return step})}return iterable.__iterator(type===ITERATE_VALUES?ITERATE_KEYS:ITERATE_VALUES,reverse)};return flipSequence}function mapFactory(iterable,mapper,context){var mappedSequence=makeSequence(iterable);mappedSequence.size=iterable.size;mappedSequence.has=function(key){return iterable.has(key)};mappedSequence.get=function(key,notSetValue){var v=iterable.get(key,NOT_SET);return v===NOT_SET?notSetValue:mapper.call(context,v,key,iterable)};mappedSequence.__iterateUncached=function(fn,reverse){var this$0=this;return iterable.__iterate(function(v,k,c){return fn(mapper.call(context,v,k,c),k,this$0)!==false},reverse)};mappedSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse);return new Iterator(function(){var step=iterator.next();if(step.done){return step}var entry=step.value;var key=entry[0];return iteratorValue(type,key,mapper.call(context,entry[1],key,iterable),step)})};return mappedSequence}function reverseFactory(iterable,useKeys){var reversedSequence=makeSequence(iterable);reversedSequence._iter=iterable;reversedSequence.size=iterable.size;reversedSequence.reverse=function(){return iterable};if(iterable.flip){reversedSequence.flip=function(){var flipSequence=flipFactory(iterable);flipSequence.reverse=function(){return iterable.flip()};return flipSequence}}reversedSequence.get=function(key,notSetValue){return iterable.get(useKeys?key:-1-key,notSetValue)};reversedSequence.has=function(key){return iterable.has(useKeys?key:-1-key)};reversedSequence.contains=function(value){return iterable.contains(value)};reversedSequence.cacheResult=cacheResultThrough;reversedSequence.__iterate=function(fn,reverse){var this$0=this;return iterable.__iterate(function(v,k){return fn(v,k,this$0)},!reverse)};reversedSequence.__iterator=function(type,reverse){return iterable.__iterator(type,!reverse)};return reversedSequence}function filterFactory(iterable,predicate,context,useKeys){var filterSequence=makeSequence(iterable);if(useKeys){filterSequence.has=function(key){var v=iterable.get(key,NOT_SET);return v!==NOT_SET&&!!predicate.call(context,v,key,iterable)};filterSequence.get=function(key,notSetValue){var v=iterable.get(key,NOT_SET);return v!==NOT_SET&&predicate.call(context,v,key,iterable)?v:notSetValue}}filterSequence.__iterateUncached=function(fn,reverse){var this$0=this;var iterations=0;iterable.__iterate(function(v,k,c){if(predicate.call(context,v,k,c)){iterations++;return fn(v,useKeys?k:iterations-1,this$0)}},reverse);return iterations};filterSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse);var iterations=0;return new Iterator(function(){while(true){var step=iterator.next();if(step.done){return step}var entry=step.value;var key=entry[0];var value=entry[1];if(predicate.call(context,value,key,iterable)){return iteratorValue(type,useKeys?key:iterations++,value,step)}}})};return filterSequence}function countByFactory(iterable,grouper,context){var groups=Map().asMutable();iterable.__iterate(function(v,k){groups.update(grouper.call(context,v,k,iterable),0,function(a){return a+1})});return groups.asImmutable()}function groupByFactory(iterable,grouper,context){var isKeyedIter=isKeyed(iterable);var groups=(isOrdered(iterable)?OrderedMap():Map()).asMutable();iterable.__iterate(function(v,k){groups.update(grouper.call(context,v,k,iterable),function(a){return a=a||[],a.push(isKeyedIter?[k,v]:v),a})});var coerce=iterableClass(iterable);return groups.map(function(arr){return reify(iterable,coerce(arr))})}function sliceFactory(iterable,begin,end,useKeys){var originalSize=iterable.size;if(wholeSlice(begin,end,originalSize)){return iterable}var resolvedBegin=resolveBegin(begin,originalSize);var resolvedEnd=resolveEnd(end,originalSize);if(resolvedBegin!==resolvedBegin||resolvedEnd!==resolvedEnd){return sliceFactory(iterable.toSeq().cacheResult(),begin,end,useKeys)}var sliceSize=resolvedEnd-resolvedBegin;if(sliceSize<0){sliceSize=0}var sliceSeq=makeSequence(iterable);sliceSeq.size=sliceSize===0?sliceSize:iterable.size&&sliceSize||undefined;if(!useKeys&&isSeq(iterable)&&sliceSize>=0){sliceSeq.get=function(index,notSetValue){index=wrapIndex(this,index);return index>=0&&index<sliceSize?iterable.get(index+resolvedBegin,notSetValue):notSetValue}}sliceSeq.__iterateUncached=function(fn,reverse){var this$0=this;if(sliceSize===0){return 0}if(reverse){return this.cacheResult().__iterate(fn,reverse)}var skipped=0;var isSkipping=true;var iterations=0;iterable.__iterate(function(v,k){if(!(isSkipping&&(isSkipping=skipped++<resolvedBegin))){iterations++;return fn(v,useKeys?k:iterations-1,this$0)!==false&&iterations!==sliceSize}});return iterations};sliceSeq.__iteratorUncached=function(type,reverse){if(sliceSize&&reverse){return this.cacheResult().__iterator(type,reverse)}var iterator=sliceSize&&iterable.__iterator(type,reverse);var skipped=0;var iterations=0;return new Iterator(function(){while(skipped++!==resolvedBegin){iterator.next()}if(++iterations>sliceSize){return iteratorDone()}var step=iterator.next();if(useKeys||type===ITERATE_VALUES){return step}else if(type===ITERATE_KEYS){return iteratorValue(type,iterations-1,undefined,step)}else{return iteratorValue(type,iterations-1,step.value[1],step)}})};return sliceSeq}function takeWhileFactory(iterable,predicate,context){var takeSequence=makeSequence(iterable);takeSequence.__iterateUncached=function(fn,reverse){var this$0=this;if(reverse){return this.cacheResult().__iterate(fn,reverse)}var iterations=0;iterable.__iterate(function(v,k,c){return predicate.call(context,v,k,c)&&++iterations&&fn(v,k,this$0)});return iterations};takeSequence.__iteratorUncached=function(type,reverse){var this$0=this;if(reverse){return this.cacheResult().__iterator(type,reverse)}var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse);var iterating=true;return new Iterator(function(){if(!iterating){return iteratorDone()}var step=iterator.next();if(step.done){return step}var entry=step.value;var k=entry[0];var v=entry[1];if(!predicate.call(context,v,k,this$0)){iterating=false;return iteratorDone()}return type===ITERATE_ENTRIES?step:iteratorValue(type,k,v,step)})};return takeSequence}function skipWhileFactory(iterable,predicate,context,useKeys){var skipSequence=makeSequence(iterable);skipSequence.__iterateUncached=function(fn,reverse){var this$0=this;if(reverse){return this.cacheResult().__iterate(fn,reverse)}var isSkipping=true;var iterations=0;iterable.__iterate(function(v,k,c){if(!(isSkipping&&(isSkipping=predicate.call(context,v,k,c)))){iterations++;return fn(v,useKeys?k:iterations-1,this$0)}});return iterations};skipSequence.__iteratorUncached=function(type,reverse){var this$0=this;if(reverse){return this.cacheResult().__iterator(type,reverse)}var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse);var skipping=true;var iterations=0;return new Iterator(function(){var step,k,v;do{step=iterator.next();if(step.done){if(useKeys||type===ITERATE_VALUES){return step}else if(type===ITERATE_KEYS){return iteratorValue(type,iterations++,undefined,step)}else{return iteratorValue(type,iterations++,step.value[1],step)}}var entry=step.value;k=entry[0];v=entry[1];skipping&&(skipping=predicate.call(context,v,k,this$0))}while(skipping);return type===ITERATE_ENTRIES?step:iteratorValue(type,k,v,step)})};return skipSequence}function concatFactory(iterable,values){var isKeyedIterable=isKeyed(iterable);var iters=[iterable].concat(values).map(function(v){if(!isIterable(v)){v=isKeyedIterable?keyedSeqFromValue(v):indexedSeqFromValue(Array.isArray(v)?v:[v])}else if(isKeyedIterable){v=KeyedIterable(v)}return v}).filter(function(v){return v.size!==0});if(iters.length===0){return iterable}if(iters.length===1){var singleton=iters[0];if(singleton===iterable||isKeyedIterable&&isKeyed(singleton)||isIndexed(iterable)&&isIndexed(singleton)){return singleton}}var concatSeq=new ArraySeq(iters);if(isKeyedIterable){concatSeq=concatSeq.toKeyedSeq()}else if(!isIndexed(iterable)){concatSeq=concatSeq.toSetSeq()}concatSeq=concatSeq.flatten(true);concatSeq.size=iters.reduce(function(sum,seq){if(sum!==undefined){var size=seq.size;if(size!==undefined){return sum+size}}},0);return concatSeq}function flattenFactory(iterable,depth,useKeys){var flatSequence=makeSequence(iterable);flatSequence.__iterateUncached=function(fn,reverse){var iterations=0;var stopped=false;function flatDeep(iter,currentDepth){var this$0=this;iter.__iterate(function(v,k){if((!depth||currentDepth<depth)&&isIterable(v)){flatDeep(v,currentDepth+1)}else if(fn(v,useKeys?k:iterations++,this$0)===false){stopped=true}return!stopped},reverse)}flatDeep(iterable,0);return iterations};flatSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(type,reverse);var stack=[];var iterations=0;return new Iterator(function(){while(iterator){var step=iterator.next();if(step.done!==false){iterator=stack.pop();continue}var v=step.value;if(type===ITERATE_ENTRIES){v=v[1]}if((!depth||stack.length<depth)&&isIterable(v)){stack.push(iterator);iterator=v.__iterator(type,reverse)}else{return useKeys?step:iteratorValue(type,iterations++,v,step)}}return iteratorDone()})};return flatSequence}function flatMapFactory(iterable,mapper,context){var coerce=iterableClass(iterable);return iterable.toSeq().map(function(v,k){return coerce(mapper.call(context,v,k,iterable))}).flatten(true)}function interposeFactory(iterable,separator){var interposedSequence=makeSequence(iterable);interposedSequence.size=iterable.size&&iterable.size*2-1;interposedSequence.__iterateUncached=function(fn,reverse){var this$0=this;var iterations=0;iterable.__iterate(function(v,k){return(!iterations||fn(separator,iterations++,this$0)!==false)&&fn(v,iterations++,this$0)!==false},reverse);return iterations};interposedSequence.__iteratorUncached=function(type,reverse){var iterator=iterable.__iterator(ITERATE_VALUES,reverse);var iterations=0;var step;return new Iterator(function(){if(!step||iterations%2){step=iterator.next();if(step.done){return step}}return iterations%2?iteratorValue(type,iterations++,separator):iteratorValue(type,iterations++,step.value,step)})};return interposedSequence}function sortFactory(iterable,comparator,mapper){if(!comparator){comparator=defaultComparator}var isKeyedIterable=isKeyed(iterable);var index=0;var entries=iterable.toSeq().map(function(v,k){return[k,v,index++,mapper?mapper(v,k,iterable):v]}).toArray();entries.sort(function(a,b){return comparator(a[3],b[3])||a[2]-b[2]}).forEach(isKeyedIterable?function(v,i){entries[i].length=2}:function(v,i){entries[i]=v[1]});return isKeyedIterable?KeyedSeq(entries):isIndexed(iterable)?IndexedSeq(entries):SetSeq(entries)}function maxFactory(iterable,comparator,mapper){if(!comparator){comparator=defaultComparator}if(mapper){var entry=iterable.toSeq().map(function(v,k){return[v,mapper(v,k,iterable)]}).reduce(function(a,b){return maxCompare(comparator,a[1],b[1])?b:a});return entry&&entry[0]}else{return iterable.reduce(function(a,b){return maxCompare(comparator,a,b)?b:a})}}function maxCompare(comparator,a,b){var comp=comparator(b,a);return comp===0&&b!==a&&(b===undefined||b===null||b!==b)||comp>0 | |
}function zipWithFactory(keyIter,zipper,iters){var zipSequence=makeSequence(keyIter);zipSequence.size=new ArraySeq(iters).map(function(i){return i.size}).min();zipSequence.__iterate=function(fn,reverse){var iterator=this.__iterator(ITERATE_VALUES,reverse);var step;var iterations=0;while(!(step=iterator.next()).done){if(fn(step.value,iterations++,this)===false){break}}return iterations};zipSequence.__iteratorUncached=function(type,reverse){var iterators=iters.map(function(i){return i=Iterable(i),getIterator(reverse?i.reverse():i)});var iterations=0;var isDone=false;return new Iterator(function(){var steps;if(!isDone){steps=iterators.map(function(i){return i.next()});isDone=steps.some(function(s){return s.done})}if(isDone){return iteratorDone()}return iteratorValue(type,iterations++,zipper.apply(null,steps.map(function(s){return s.value})))})};return zipSequence}function reify(iter,seq){return isSeq(iter)?seq:iter.constructor(seq)}function validateEntry(entry){if(entry!==Object(entry)){throw new TypeError("Expected [K, V] tuple: "+entry)}}function resolveSize(iter){assertNotInfinite(iter.size);return ensureSize(iter)}function iterableClass(iterable){return isKeyed(iterable)?KeyedIterable:isIndexed(iterable)?IndexedIterable:SetIterable}function makeSequence(iterable){return Object.create((isKeyed(iterable)?KeyedSeq:isIndexed(iterable)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){if(this._iter.cacheResult){this._iter.cacheResult();this.size=this._iter.size;return this}else{return Seq.prototype.cacheResult.call(this)}}function defaultComparator(a,b){return a>b?1:a<b?-1:0}function forceIterator(keyPath){var iter=getIterator(keyPath);if(!iter){if(!isArrayLike(keyPath)){throw new TypeError("Expected iterable or array-like: "+keyPath)}iter=getIterator(Iterable(keyPath))}return iter}createClass(Map,KeyedCollection);function Map(value){return value===null||value===undefined?emptyMap():isMap(value)?value:emptyMap().withMutations(function(map){var iter=KeyedIterable(value);assertNotInfinite(iter.size);iter.forEach(function(v,k){return map.set(k,v)})})}Map.prototype.toString=function(){return this.__toString("Map {","}")};Map.prototype.get=function(k,notSetValue){return this._root?this._root.get(0,undefined,k,notSetValue):notSetValue};Map.prototype.set=function(k,v){return updateMap(this,k,v)};Map.prototype.setIn=function(keyPath,v){return this.updateIn(keyPath,NOT_SET,function(){return v})};Map.prototype.remove=function(k){return updateMap(this,k,NOT_SET)};Map.prototype.deleteIn=function(keyPath){return this.updateIn(keyPath,function(){return NOT_SET})};Map.prototype.update=function(k,notSetValue,updater){return arguments.length===1?k(this):this.updateIn([k],notSetValue,updater)};Map.prototype.updateIn=function(keyPath,notSetValue,updater){if(!updater){updater=notSetValue;notSetValue=undefined}var updatedValue=updateInDeepMap(this,forceIterator(keyPath),notSetValue,updater);return updatedValue===NOT_SET?undefined:updatedValue};Map.prototype.clear=function(){if(this.size===0){return this}if(this.__ownerID){this.size=0;this._root=null;this.__hash=undefined;this.__altered=true;return this}return emptyMap()};Map.prototype.merge=function(){return mergeIntoMapWith(this,undefined,arguments)};Map.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoMapWith(this,merger,iters)};Map.prototype.mergeIn=function(keyPath){var iters=SLICE$0.call(arguments,1);return this.updateIn(keyPath,emptyMap(),function(m){return m.merge.apply(m,iters)})};Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger(undefined),arguments)};Map.prototype.mergeDeepWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoMapWith(this,deepMerger(merger),iters)};Map.prototype.mergeDeepIn=function(keyPath){var iters=SLICE$0.call(arguments,1);return this.updateIn(keyPath,emptyMap(),function(m){return m.mergeDeep.apply(m,iters)})};Map.prototype.sort=function(comparator){return OrderedMap(sortFactory(this,comparator))};Map.prototype.sortBy=function(mapper,comparator){return OrderedMap(sortFactory(this,comparator,mapper))};Map.prototype.withMutations=function(fn){var mutable=this.asMutable();fn(mutable);return mutable.wasAltered()?mutable.__ensureOwner(this.__ownerID):this};Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)};Map.prototype.asImmutable=function(){return this.__ensureOwner()};Map.prototype.wasAltered=function(){return this.__altered};Map.prototype.__iterator=function(type,reverse){return new MapIterator(this,type,reverse)};Map.prototype.__iterate=function(fn,reverse){var this$0=this;var iterations=0;this._root&&this._root.iterate(function(entry){iterations++;return fn(entry[1],entry[0],this$0)},reverse);return iterations};Map.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}if(!ownerID){this.__ownerID=ownerID;this.__altered=false;return this}return makeMap(this.size,this._root,ownerID,this.__hash)};function isMap(maybeMap){return!!(maybeMap&&maybeMap[IS_MAP_SENTINEL])}Map.isMap=isMap;var IS_MAP_SENTINEL="@@__IMMUTABLE_MAP__@@";var MapPrototype=Map.prototype;MapPrototype[IS_MAP_SENTINEL]=true;MapPrototype[DELETE]=MapPrototype.remove;MapPrototype.removeIn=MapPrototype.deleteIn;function ArrayMapNode(ownerID,entries){this.ownerID=ownerID;this.entries=entries}ArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){var entries=this.entries;for(var ii=0,len=entries.length;ii<len;ii++){if(is(key,entries[ii][0])){return entries[ii][1]}}return notSetValue};ArrayMapNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){var removed=value===NOT_SET;var entries=this.entries;var idx=0;for(var len=entries.length;idx<len;idx++){if(is(key,entries[idx][0])){break}}var exists=idx<len;if(exists?entries[idx][1]===value:removed){return this}SetRef(didAlter);(removed||!exists)&&SetRef(didChangeSize);if(removed&&entries.length===1){return}if(!exists&&!removed&&entries.length>=MAX_ARRAY_MAP_SIZE){return createNodes(ownerID,entries,key,value)}var isEditable=ownerID&&ownerID===this.ownerID;var newEntries=isEditable?entries:arrCopy(entries);if(exists){if(removed){idx===len-1?newEntries.pop():newEntries[idx]=newEntries.pop()}else{newEntries[idx]=[key,value]}}else{newEntries.push([key,value])}if(isEditable){this.entries=newEntries;return this}return new ArrayMapNode(ownerID,newEntries)};function BitmapIndexedNode(ownerID,bitmap,nodes){this.ownerID=ownerID;this.bitmap=bitmap;this.nodes=nodes}BitmapIndexedNode.prototype.get=function(shift,keyHash,key,notSetValue){if(keyHash===undefined){keyHash=hash(key)}var bit=1<<((shift===0?keyHash:keyHash>>>shift)&MASK);var bitmap=this.bitmap;return(bitmap&bit)===0?notSetValue:this.nodes[popCount(bitmap&bit-1)].get(shift+SHIFT,keyHash,key,notSetValue)};BitmapIndexedNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){if(keyHash===undefined){keyHash=hash(key)}var keyHashFrag=(shift===0?keyHash:keyHash>>>shift)&MASK;var bit=1<<keyHashFrag;var bitmap=this.bitmap;var exists=(bitmap&bit)!==0;if(!exists&&value===NOT_SET){return this}var idx=popCount(bitmap&bit-1);var nodes=this.nodes;var node=exists?nodes[idx]:undefined;var newNode=updateNode(node,ownerID,shift+SHIFT,keyHash,key,value,didChangeSize,didAlter);if(newNode===node){return this}if(!exists&&newNode&&nodes.length>=MAX_BITMAP_INDEXED_SIZE){return expandNodes(ownerID,nodes,bitmap,keyHashFrag,newNode)}if(exists&&!newNode&&nodes.length===2&&isLeafNode(nodes[idx^1])){return nodes[idx^1]}if(exists&&newNode&&nodes.length===1&&isLeafNode(newNode)){return newNode}var isEditable=ownerID&&ownerID===this.ownerID;var newBitmap=exists?newNode?bitmap:bitmap^bit:bitmap|bit;var newNodes=exists?newNode?setIn(nodes,idx,newNode,isEditable):spliceOut(nodes,idx,isEditable):spliceIn(nodes,idx,newNode,isEditable);if(isEditable){this.bitmap=newBitmap;this.nodes=newNodes;return this}return new BitmapIndexedNode(ownerID,newBitmap,newNodes)};function HashArrayMapNode(ownerID,count,nodes){this.ownerID=ownerID;this.count=count;this.nodes=nodes}HashArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){if(keyHash===undefined){keyHash=hash(key)}var idx=(shift===0?keyHash:keyHash>>>shift)&MASK;var node=this.nodes[idx];return node?node.get(shift+SHIFT,keyHash,key,notSetValue):notSetValue};HashArrayMapNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){if(keyHash===undefined){keyHash=hash(key)}var idx=(shift===0?keyHash:keyHash>>>shift)&MASK;var removed=value===NOT_SET;var nodes=this.nodes;var node=nodes[idx];if(removed&&!node){return this}var newNode=updateNode(node,ownerID,shift+SHIFT,keyHash,key,value,didChangeSize,didAlter);if(newNode===node){return this}var newCount=this.count;if(!node){newCount++}else if(!newNode){newCount--;if(newCount<MIN_HASH_ARRAY_MAP_SIZE){return packNodes(ownerID,nodes,newCount,idx)}}var isEditable=ownerID&&ownerID===this.ownerID;var newNodes=setIn(nodes,idx,newNode,isEditable);if(isEditable){this.count=newCount;this.nodes=newNodes;return this}return new HashArrayMapNode(ownerID,newCount,newNodes)};function HashCollisionNode(ownerID,keyHash,entries){this.ownerID=ownerID;this.keyHash=keyHash;this.entries=entries}HashCollisionNode.prototype.get=function(shift,keyHash,key,notSetValue){var entries=this.entries;for(var ii=0,len=entries.length;ii<len;ii++){if(is(key,entries[ii][0])){return entries[ii][1]}}return notSetValue};HashCollisionNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){if(keyHash===undefined){keyHash=hash(key)}var removed=value===NOT_SET;if(keyHash!==this.keyHash){if(removed){return this}SetRef(didAlter);SetRef(didChangeSize);return mergeIntoNode(this,ownerID,shift,keyHash,[key,value])}var entries=this.entries;var idx=0;for(var len=entries.length;idx<len;idx++){if(is(key,entries[idx][0])){break}}var exists=idx<len;if(exists?entries[idx][1]===value:removed){return this}SetRef(didAlter);(removed||!exists)&&SetRef(didChangeSize);if(removed&&len===2){return new ValueNode(ownerID,this.keyHash,entries[idx^1])}var isEditable=ownerID&&ownerID===this.ownerID;var newEntries=isEditable?entries:arrCopy(entries);if(exists){if(removed){idx===len-1?newEntries.pop():newEntries[idx]=newEntries.pop()}else{newEntries[idx]=[key,value]}}else{newEntries.push([key,value])}if(isEditable){this.entries=newEntries;return this}return new HashCollisionNode(ownerID,this.keyHash,newEntries)};function ValueNode(ownerID,keyHash,entry){this.ownerID=ownerID;this.keyHash=keyHash;this.entry=entry}ValueNode.prototype.get=function(shift,keyHash,key,notSetValue){return is(key,this.entry[0])?this.entry[1]:notSetValue};ValueNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){var removed=value===NOT_SET;var keyMatch=is(key,this.entry[0]);if(keyMatch?value===this.entry[1]:removed){return this}SetRef(didAlter);if(removed){SetRef(didChangeSize);return}if(keyMatch){if(ownerID&&ownerID===this.ownerID){this.entry[1]=value;return this}return new ValueNode(ownerID,this.keyHash,[key,value])}SetRef(didChangeSize);return mergeIntoNode(this,ownerID,shift,hash(key),[key,value])};ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(fn,reverse){var entries=this.entries;for(var ii=0,maxIndex=entries.length-1;ii<=maxIndex;ii++){if(fn(entries[reverse?maxIndex-ii:ii])===false){return false}}};BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(fn,reverse){var nodes=this.nodes;for(var ii=0,maxIndex=nodes.length-1;ii<=maxIndex;ii++){var node=nodes[reverse?maxIndex-ii:ii];if(node&&node.iterate(fn,reverse)===false){return false}}};ValueNode.prototype.iterate=function(fn,reverse){return fn(this.entry)};createClass(MapIterator,Iterator);function MapIterator(map,type,reverse){this._type=type;this._reverse=reverse;this._stack=map._root&&mapIteratorFrame(map._root)}MapIterator.prototype.next=function(){var type=this._type;var stack=this._stack;while(stack){var node=stack.node;var index=stack.index++;var maxIndex;if(node.entry){if(index===0){return mapIteratorValue(type,node.entry)}}else if(node.entries){maxIndex=node.entries.length-1;if(index<=maxIndex){return mapIteratorValue(type,node.entries[this._reverse?maxIndex-index:index])}}else{maxIndex=node.nodes.length-1;if(index<=maxIndex){var subNode=node.nodes[this._reverse?maxIndex-index:index];if(subNode){if(subNode.entry){return mapIteratorValue(type,subNode.entry)}stack=this._stack=mapIteratorFrame(subNode,stack)}continue}}stack=this._stack=this._stack.__prev}return iteratorDone()};function mapIteratorValue(type,entry){return iteratorValue(type,entry[0],entry[1])}function mapIteratorFrame(node,prev){return{node:node,index:0,__prev:prev}}function makeMap(size,root,ownerID,hash){var map=Object.create(MapPrototype);map.size=size;map._root=root;map.__ownerID=ownerID;map.__hash=hash;map.__altered=false;return map}var EMPTY_MAP;function emptyMap(){return EMPTY_MAP||(EMPTY_MAP=makeMap(0))}function updateMap(map,k,v){var newRoot;var newSize;if(!map._root){if(v===NOT_SET){return map}newSize=1;newRoot=new ArrayMapNode(map.__ownerID,[[k,v]])}else{var didChangeSize=MakeRef(CHANGE_LENGTH);var didAlter=MakeRef(DID_ALTER);newRoot=updateNode(map._root,map.__ownerID,0,undefined,k,v,didChangeSize,didAlter);if(!didAlter.value){return map}newSize=map.size+(didChangeSize.value?v===NOT_SET?-1:1:0)}if(map.__ownerID){map.size=newSize;map._root=newRoot;map.__hash=undefined;map.__altered=true;return map}return newRoot?makeMap(newSize,newRoot):emptyMap()}function updateNode(node,ownerID,shift,keyHash,key,value,didChangeSize,didAlter){if(!node){if(value===NOT_SET){return node}SetRef(didAlter);SetRef(didChangeSize);return new ValueNode(ownerID,keyHash,[key,value])}return node.update(ownerID,shift,keyHash,key,value,didChangeSize,didAlter)}function isLeafNode(node){return node.constructor===ValueNode||node.constructor===HashCollisionNode}function mergeIntoNode(node,ownerID,shift,keyHash,entry){if(node.keyHash===keyHash){return new HashCollisionNode(ownerID,keyHash,[node.entry,entry])}var idx1=(shift===0?node.keyHash:node.keyHash>>>shift)&MASK;var idx2=(shift===0?keyHash:keyHash>>>shift)&MASK;var newNode;var nodes=idx1===idx2?[mergeIntoNode(node,ownerID,shift+SHIFT,keyHash,entry)]:(newNode=new ValueNode(ownerID,keyHash,entry),idx1<idx2?[node,newNode]:[newNode,node]);return new BitmapIndexedNode(ownerID,1<<idx1|1<<idx2,nodes)}function createNodes(ownerID,entries,key,value){if(!ownerID){ownerID=new OwnerID}var node=new ValueNode(ownerID,hash(key),[key,value]);for(var ii=0;ii<entries.length;ii++){var entry=entries[ii];node=node.update(ownerID,0,undefined,entry[0],entry[1])}return node}function packNodes(ownerID,nodes,count,excluding){var bitmap=0;var packedII=0;var packedNodes=new Array(count);for(var ii=0,bit=1,len=nodes.length;ii<len;ii++,bit<<=1){var node=nodes[ii];if(node!==undefined&&ii!==excluding){bitmap|=bit;packedNodes[packedII++]=node}}return new BitmapIndexedNode(ownerID,bitmap,packedNodes)}function expandNodes(ownerID,nodes,bitmap,including,node){var count=0;var expandedNodes=new Array(SIZE);for(var ii=0;bitmap!==0;ii++,bitmap>>>=1){expandedNodes[ii]=bitmap&1?nodes[count++]:undefined}expandedNodes[including]=node;return new HashArrayMapNode(ownerID,count+1,expandedNodes)}function mergeIntoMapWith(map,merger,iterables){var iters=[];for(var ii=0;ii<iterables.length;ii++){var value=iterables[ii];var iter=KeyedIterable(value);if(!isIterable(value)){iter=iter.map(function(v){return fromJS(v)})}iters.push(iter)}return mergeIntoCollectionWith(map,merger,iters)}function deepMerger(merger){return function(existing,value){return existing&&existing.mergeDeepWith&&isIterable(value)?existing.mergeDeepWith(merger,value):merger?merger(existing,value):value}}function mergeIntoCollectionWith(collection,merger,iters){iters=iters.filter(function(x){return x.size!==0});if(iters.length===0){return collection}if(collection.size===0&&iters.length===1){return collection.constructor(iters[0])}return collection.withMutations(function(collection){var mergeIntoMap=merger?function(value,key){collection.update(key,NOT_SET,function(existing){return existing===NOT_SET?value:merger(existing,value)})}:function(value,key){collection.set(key,value)};for(var ii=0;ii<iters.length;ii++){iters[ii].forEach(mergeIntoMap)}})}function updateInDeepMap(existing,keyPathIter,notSetValue,updater){var isNotSet=existing===NOT_SET;var step=keyPathIter.next();if(step.done){var existingValue=isNotSet?notSetValue:existing;var newValue=updater(existingValue);return newValue===existingValue?existing:newValue}invariant(isNotSet||existing&&existing.set,"invalid keyPath");var key=step.value;var nextExisting=isNotSet?NOT_SET:existing.get(key,NOT_SET);var nextUpdated=updateInDeepMap(nextExisting,keyPathIter,notSetValue,updater);return nextUpdated===nextExisting?existing:nextUpdated===NOT_SET?existing.remove(key):(isNotSet?emptyMap():existing).set(key,nextUpdated)}function popCount(x){x=x-(x>>1&1431655765);x=(x&858993459)+(x>>2&858993459);x=x+(x>>4)&252645135;x=x+(x>>8);x=x+(x>>16);return x&127}function setIn(array,idx,val,canEdit){var newArray=canEdit?array:arrCopy(array);newArray[idx]=val;return newArray}function spliceIn(array,idx,val,canEdit){var newLen=array.length+1;if(canEdit&&idx+1===newLen){array[idx]=val;return array}var newArray=new Array(newLen);var after=0;for(var ii=0;ii<newLen;ii++){if(ii===idx){newArray[ii]=val;after=-1}else{newArray[ii]=array[ii+after]}}return newArray}function spliceOut(array,idx,canEdit){var newLen=array.length-1;if(canEdit&&idx===newLen){array.pop();return array}var newArray=new Array(newLen);var after=0;for(var ii=0;ii<newLen;ii++){if(ii===idx){after=1}newArray[ii]=array[ii+after]}return newArray}var MAX_ARRAY_MAP_SIZE=SIZE/4;var MAX_BITMAP_INDEXED_SIZE=SIZE/2;var MIN_HASH_ARRAY_MAP_SIZE=SIZE/4;createClass(List,IndexedCollection);function List(value){var empty=emptyList();if(value===null||value===undefined){return empty}if(isList(value)){return value}var iter=IndexedIterable(value);var size=iter.size;if(size===0){return empty}assertNotInfinite(size);if(size>0&&size<SIZE){return makeList(0,size,SHIFT,null,new VNode(iter.toArray()))}return empty.withMutations(function(list){list.setSize(size);iter.forEach(function(v,i){return list.set(i,v)})})}List.of=function(){return this(arguments)};List.prototype.toString=function(){return this.__toString("List [","]")};List.prototype.get=function(index,notSetValue){index=wrapIndex(this,index);if(index<0||index>=this.size){return notSetValue}index+=this._origin;var node=listNodeFor(this,index);return node&&node.array[index&MASK]};List.prototype.set=function(index,value){return updateList(this,index,value)};List.prototype.remove=function(index){return!this.has(index)?this:index===0?this.shift():index===this.size-1?this.pop():this.splice(index,1)};List.prototype.clear=function(){if(this.size===0){return this}if(this.__ownerID){this.size=this._origin=this._capacity=0;this._level=SHIFT;this._root=this._tail=null;this.__hash=undefined;this.__altered=true;return this}return emptyList()};List.prototype.push=function(){var values=arguments;var oldSize=this.size;return this.withMutations(function(list){setListBounds(list,0,oldSize+values.length);for(var ii=0;ii<values.length;ii++){list.set(oldSize+ii,values[ii])}})};List.prototype.pop=function(){return setListBounds(this,0,-1)};List.prototype.unshift=function(){var values=arguments;return this.withMutations(function(list){setListBounds(list,-values.length);for(var ii=0;ii<values.length;ii++){list.set(ii,values[ii])}})};List.prototype.shift=function(){return setListBounds(this,1)};List.prototype.merge=function(){return mergeIntoListWith(this,undefined,arguments)};List.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoListWith(this,merger,iters)};List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger(undefined),arguments)};List.prototype.mergeDeepWith=function(merger){var iters=SLICE$0.call(arguments,1);return mergeIntoListWith(this,deepMerger(merger),iters)};List.prototype.setSize=function(size){return setListBounds(this,0,size)};List.prototype.slice=function(begin,end){var size=this.size;if(wholeSlice(begin,end,size)){return this}return setListBounds(this,resolveBegin(begin,size),resolveEnd(end,size))};List.prototype.__iterator=function(type,reverse){var index=0;var values=iterateList(this,reverse);return new Iterator(function(){var value=values();return value===DONE?iteratorDone():iteratorValue(type,index++,value)})};List.prototype.__iterate=function(fn,reverse){var index=0;var values=iterateList(this,reverse);var value;while((value=values())!==DONE){if(fn(value,index++,this)===false){break}}return index};List.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}if(!ownerID){this.__ownerID=ownerID;return this}return makeList(this._origin,this._capacity,this._level,this._root,this._tail,ownerID,this.__hash)};function isList(maybeList){return!!(maybeList&&maybeList[IS_LIST_SENTINEL])}List.isList=isList;var IS_LIST_SENTINEL="@@__IMMUTABLE_LIST__@@";var ListPrototype=List.prototype;ListPrototype[IS_LIST_SENTINEL]=true;ListPrototype[DELETE]=ListPrototype.remove;ListPrototype.setIn=MapPrototype.setIn;ListPrototype.deleteIn=ListPrototype.removeIn=MapPrototype.removeIn;ListPrototype.update=MapPrototype.update;ListPrototype.updateIn=MapPrototype.updateIn;ListPrototype.mergeIn=MapPrototype.mergeIn;ListPrototype.mergeDeepIn=MapPrototype.mergeDeepIn;ListPrototype.withMutations=MapPrototype.withMutations;ListPrototype.asMutable=MapPrototype.asMutable;ListPrototype.asImmutable=MapPrototype.asImmutable;ListPrototype.wasAltered=MapPrototype.wasAltered;function VNode(array,ownerID){this.array=array;this.ownerID=ownerID}VNode.prototype.removeBefore=function(ownerID,level,index){if(index===level?1<<level:0||this.array.length===0){return this}var originIndex=index>>>level&MASK;if(originIndex>=this.array.length){return new VNode([],ownerID)}var removingFirst=originIndex===0;var newChild;if(level>0){var oldChild=this.array[originIndex];newChild=oldChild&&oldChild.removeBefore(ownerID,level-SHIFT,index);if(newChild===oldChild&&removingFirst){return this}}if(removingFirst&&!newChild){return this}var editable=editableVNode(this,ownerID);if(!removingFirst){for(var ii=0;ii<originIndex;ii++){editable.array[ii]=undefined}}if(newChild){editable.array[originIndex]=newChild}return editable};VNode.prototype.removeAfter=function(ownerID,level,index){if(index===level?1<<level:0||this.array.length===0){return this}var sizeIndex=index-1>>>level&MASK;if(sizeIndex>=this.array.length){return this}var removingLast=sizeIndex===this.array.length-1;var newChild;if(level>0){var oldChild=this.array[sizeIndex];newChild=oldChild&&oldChild.removeAfter(ownerID,level-SHIFT,index);if(newChild===oldChild&&removingLast){return this}}if(removingLast&&!newChild){return this}var editable=editableVNode(this,ownerID);if(!removingLast){editable.array.pop()}if(newChild){editable.array[sizeIndex]=newChild}return editable};var DONE={};function iterateList(list,reverse){var left=list._origin;var right=list._capacity;var tailPos=getTailOffset(right);var tail=list._tail;return iterateNodeOrLeaf(list._root,list._level,0);function iterateNodeOrLeaf(node,level,offset){return level===0?iterateLeaf(node,offset):iterateNode(node,level,offset)}function iterateLeaf(node,offset){var array=offset===tailPos?tail&&tail.array:node&&node.array;var from=offset>left?0:left-offset;var to=right-offset;if(to>SIZE){to=SIZE}return function(){if(from===to){return DONE}var idx=reverse?--to:from++;return array&&array[idx]}}function iterateNode(node,level,offset){var values;var array=node&&node.array;var from=offset>left?0:left-offset>>level;var to=(right-offset>>level)+1;if(to>SIZE){to=SIZE}return function(){do{if(values){var value=values();if(value!==DONE){return value}values=null}if(from===to){return DONE}var idx=reverse?--to:from++;values=iterateNodeOrLeaf(array&&array[idx],level-SHIFT,offset+(idx<<level))}while(true)}}}function makeList(origin,capacity,level,root,tail,ownerID,hash){var list=Object.create(ListPrototype);list.size=capacity-origin;list._origin=origin;list._capacity=capacity;list._level=level;list._root=root;list._tail=tail;list.__ownerID=ownerID;list.__hash=hash;list.__altered=false;return list}var EMPTY_LIST;function emptyList(){return EMPTY_LIST||(EMPTY_LIST=makeList(0,0,SHIFT))}function updateList(list,index,value){index=wrapIndex(list,index);if(index>=list.size||index<0){return list.withMutations(function(list){index<0?setListBounds(list,index).set(0,value):setListBounds(list,0,index+1).set(index,value)})}index+=list._origin;var newTail=list._tail;var newRoot=list._root;var didAlter=MakeRef(DID_ALTER);if(index>=getTailOffset(list._capacity)){newTail=updateVNode(newTail,list.__ownerID,0,index,value,didAlter)}else{newRoot=updateVNode(newRoot,list.__ownerID,list._level,index,value,didAlter)}if(!didAlter.value){return list}if(list.__ownerID){list._root=newRoot;list._tail=newTail;list.__hash=undefined;list.__altered=true;return list}return makeList(list._origin,list._capacity,list._level,newRoot,newTail)}function updateVNode(node,ownerID,level,index,value,didAlter){var idx=index>>>level&MASK;var nodeHas=node&&idx<node.array.length;if(!nodeHas&&value===undefined){return node}var newNode;if(level>0){var lowerNode=node&&node.array[idx];var newLowerNode=updateVNode(lowerNode,ownerID,level-SHIFT,index,value,didAlter);if(newLowerNode===lowerNode){return node}newNode=editableVNode(node,ownerID);newNode.array[idx]=newLowerNode;return newNode}if(nodeHas&&node.array[idx]===value){return node}SetRef(didAlter);newNode=editableVNode(node,ownerID);if(value===undefined&&idx===newNode.array.length-1){newNode.array.pop()}else{newNode.array[idx]=value}return newNode}function editableVNode(node,ownerID){if(ownerID&&node&&ownerID===node.ownerID){return node}return new VNode(node?node.array.slice():[],ownerID)}function listNodeFor(list,rawIndex){if(rawIndex>=getTailOffset(list._capacity)){return list._tail}if(rawIndex<1<<list._level+SHIFT){var node=list._root;var level=list._level;while(node&&level>0){node=node.array[rawIndex>>>level&MASK];level-=SHIFT}return node}}function setListBounds(list,begin,end){var owner=list.__ownerID||new OwnerID;var oldOrigin=list._origin;var oldCapacity=list._capacity;var newOrigin=oldOrigin+begin;var newCapacity=end===undefined?oldCapacity:end<0?oldCapacity+end:oldOrigin+end;if(newOrigin===oldOrigin&&newCapacity===oldCapacity){return list}if(newOrigin>=newCapacity){return list.clear()}var newLevel=list._level;var newRoot=list._root;var offsetShift=0;while(newOrigin+offsetShift<0){newRoot=new VNode(newRoot&&newRoot.array.length?[undefined,newRoot]:[],owner);newLevel+=SHIFT;offsetShift+=1<<newLevel}if(offsetShift){newOrigin+=offsetShift;oldOrigin+=offsetShift;newCapacity+=offsetShift;oldCapacity+=offsetShift}var oldTailOffset=getTailOffset(oldCapacity);var newTailOffset=getTailOffset(newCapacity);while(newTailOffset>=1<<newLevel+SHIFT){newRoot=new VNode(newRoot&&newRoot.array.length?[newRoot]:[],owner);newLevel+=SHIFT}var oldTail=list._tail;var newTail=newTailOffset<oldTailOffset?listNodeFor(list,newCapacity-1):newTailOffset>oldTailOffset?new VNode([],owner):oldTail;if(oldTail&&newTailOffset>oldTailOffset&&newOrigin<oldCapacity&&oldTail.array.length){newRoot=editableVNode(newRoot,owner);var node=newRoot;for(var level=newLevel;level>SHIFT;level-=SHIFT){var idx=oldTailOffset>>>level&MASK;node=node.array[idx]=editableVNode(node.array[idx],owner)}node.array[oldTailOffset>>>SHIFT&MASK]=oldTail}if(newCapacity<oldCapacity){newTail=newTail&&newTail.removeAfter(owner,0,newCapacity)}if(newOrigin>=newTailOffset){newOrigin-=newTailOffset;newCapacity-=newTailOffset;newLevel=SHIFT;newRoot=null;newTail=newTail&&newTail.removeBefore(owner,0,newOrigin)}else if(newOrigin>oldOrigin||newTailOffset<oldTailOffset){offsetShift=0;while(newRoot){var beginIndex=newOrigin>>>newLevel&MASK;if(beginIndex!==newTailOffset>>>newLevel&MASK){break}if(beginIndex){offsetShift+=(1<<newLevel)*beginIndex}newLevel-=SHIFT;newRoot=newRoot.array[beginIndex]}if(newRoot&&newOrigin>oldOrigin){newRoot=newRoot.removeBefore(owner,newLevel,newOrigin-offsetShift)}if(newRoot&&newTailOffset<oldTailOffset){newRoot=newRoot.removeAfter(owner,newLevel,newTailOffset-offsetShift)}if(offsetShift){newOrigin-=offsetShift;newCapacity-=offsetShift}}if(list.__ownerID){list.size=newCapacity-newOrigin;list._origin=newOrigin;list._capacity=newCapacity;list._level=newLevel;list._root=newRoot;list._tail=newTail;list.__hash=undefined;list.__altered=true;return list}return makeList(newOrigin,newCapacity,newLevel,newRoot,newTail)}function mergeIntoListWith(list,merger,iterables){var iters=[];var maxSize=0;for(var ii=0;ii<iterables.length;ii++){var value=iterables[ii];var iter=IndexedIterable(value);if(iter.size>maxSize){maxSize=iter.size}if(!isIterable(value)){iter=iter.map(function(v){return fromJS(v)})}iters.push(iter)}if(maxSize>list.size){list=list.setSize(maxSize)}return mergeIntoCollectionWith(list,merger,iters)}function getTailOffset(size){return size<SIZE?0:size-1>>>SHIFT<<SHIFT}createClass(OrderedMap,Map);function OrderedMap(value){return value===null||value===undefined?emptyOrderedMap():isOrderedMap(value)?value:emptyOrderedMap().withMutations(function(map){var iter=KeyedIterable(value);assertNotInfinite(iter.size);iter.forEach(function(v,k){return map.set(k,v)})})}OrderedMap.of=function(){return this(arguments)};OrderedMap.prototype.toString=function(){return this.__toString("OrderedMap {","}")};OrderedMap.prototype.get=function(k,notSetValue){var index=this._map.get(k);return index!==undefined?this._list.get(index)[1]:notSetValue};OrderedMap.prototype.clear=function(){if(this.size===0){return this}if(this.__ownerID){this.size=0;this._map.clear();this._list.clear();return this}return emptyOrderedMap()};OrderedMap.prototype.set=function(k,v){return updateOrderedMap(this,k,v)};OrderedMap.prototype.remove=function(k){return updateOrderedMap(this,k,NOT_SET)};OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()};OrderedMap.prototype.__iterate=function(fn,reverse){var this$0=this;return this._list.__iterate(function(entry){return entry&&fn(entry[1],entry[0],this$0)},reverse)};OrderedMap.prototype.__iterator=function(type,reverse){return this._list.fromEntrySeq().__iterator(type,reverse)};OrderedMap.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}var newMap=this._map.__ensureOwner(ownerID);var newList=this._list.__ensureOwner(ownerID);if(!ownerID){this.__ownerID=ownerID;this._map=newMap;this._list=newList;return this}return makeOrderedMap(newMap,newList,ownerID,this.__hash)};function isOrderedMap(maybeOrderedMap){return isMap(maybeOrderedMap)&&isOrdered(maybeOrderedMap)}OrderedMap.isOrderedMap=isOrderedMap;OrderedMap.prototype[IS_ORDERED_SENTINEL]=true;OrderedMap.prototype[DELETE]=OrderedMap.prototype.remove;function makeOrderedMap(map,list,ownerID,hash){var omap=Object.create(OrderedMap.prototype);omap.size=map?map.size:0;omap._map=map;omap._list=list;omap.__ownerID=ownerID;omap.__hash=hash;return omap}var EMPTY_ORDERED_MAP;function emptyOrderedMap(){return EMPTY_ORDERED_MAP||(EMPTY_ORDERED_MAP=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(omap,k,v){var map=omap._map;var list=omap._list;var i=map.get(k);var has=i!==undefined;var newMap;var newList;if(v===NOT_SET){if(!has){return omap}if(list.size>=SIZE&&list.size>=map.size*2){newList=list.filter(function(entry,idx){return entry!==undefined&&i!==idx});newMap=newList.toKeyedSeq().map(function(entry){return entry[0]}).flip().toMap();if(omap.__ownerID){newMap.__ownerID=newList.__ownerID=omap.__ownerID}}else{newMap=map.remove(k);newList=i===list.size-1?list.pop():list.set(i,undefined)}}else{if(has){if(v===list.get(i)[1]){return omap}newMap=map; | |
newList=list.set(i,[k,v])}else{newMap=map.set(k,list.size);newList=list.set(list.size,[k,v])}}if(omap.__ownerID){omap.size=newMap.size;omap._map=newMap;omap._list=newList;omap.__hash=undefined;return omap}return makeOrderedMap(newMap,newList)}createClass(Stack,IndexedCollection);function Stack(value){return value===null||value===undefined?emptyStack():isStack(value)?value:emptyStack().unshiftAll(value)}Stack.of=function(){return this(arguments)};Stack.prototype.toString=function(){return this.__toString("Stack [","]")};Stack.prototype.get=function(index,notSetValue){var head=this._head;while(head&&index--){head=head.next}return head?head.value:notSetValue};Stack.prototype.peek=function(){return this._head&&this._head.value};Stack.prototype.push=function(){if(arguments.length===0){return this}var newSize=this.size+arguments.length;var head=this._head;for(var ii=arguments.length-1;ii>=0;ii--){head={value:arguments[ii],next:head}}if(this.__ownerID){this.size=newSize;this._head=head;this.__hash=undefined;this.__altered=true;return this}return makeStack(newSize,head)};Stack.prototype.pushAll=function(iter){iter=IndexedIterable(iter);if(iter.size===0){return this}assertNotInfinite(iter.size);var newSize=this.size;var head=this._head;iter.reverse().forEach(function(value){newSize++;head={value:value,next:head}});if(this.__ownerID){this.size=newSize;this._head=head;this.__hash=undefined;this.__altered=true;return this}return makeStack(newSize,head)};Stack.prototype.pop=function(){return this.slice(1)};Stack.prototype.unshift=function(){return this.push.apply(this,arguments)};Stack.prototype.unshiftAll=function(iter){return this.pushAll(iter)};Stack.prototype.shift=function(){return this.pop.apply(this,arguments)};Stack.prototype.clear=function(){if(this.size===0){return this}if(this.__ownerID){this.size=0;this._head=undefined;this.__hash=undefined;this.__altered=true;return this}return emptyStack()};Stack.prototype.slice=function(begin,end){if(wholeSlice(begin,end,this.size)){return this}var resolvedBegin=resolveBegin(begin,this.size);var resolvedEnd=resolveEnd(end,this.size);if(resolvedEnd!==this.size){return IndexedCollection.prototype.slice.call(this,begin,end)}var newSize=this.size-resolvedBegin;var head=this._head;while(resolvedBegin--){head=head.next}if(this.__ownerID){this.size=newSize;this._head=head;this.__hash=undefined;this.__altered=true;return this}return makeStack(newSize,head)};Stack.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}if(!ownerID){this.__ownerID=ownerID;this.__altered=false;return this}return makeStack(this.size,this._head,ownerID,this.__hash)};Stack.prototype.__iterate=function(fn,reverse){if(reverse){return this.toSeq().cacheResult.__iterate(fn,reverse)}var iterations=0;var node=this._head;while(node){if(fn(node.value,iterations++,this)===false){break}node=node.next}return iterations};Stack.prototype.__iterator=function(type,reverse){if(reverse){return this.toSeq().cacheResult().__iterator(type,reverse)}var iterations=0;var node=this._head;return new Iterator(function(){if(node){var value=node.value;node=node.next;return iteratorValue(type,iterations++,value)}return iteratorDone()})};function isStack(maybeStack){return!!(maybeStack&&maybeStack[IS_STACK_SENTINEL])}Stack.isStack=isStack;var IS_STACK_SENTINEL="@@__IMMUTABLE_STACK__@@";var StackPrototype=Stack.prototype;StackPrototype[IS_STACK_SENTINEL]=true;StackPrototype.withMutations=MapPrototype.withMutations;StackPrototype.asMutable=MapPrototype.asMutable;StackPrototype.asImmutable=MapPrototype.asImmutable;StackPrototype.wasAltered=MapPrototype.wasAltered;function makeStack(size,head,ownerID,hash){var map=Object.create(StackPrototype);map.size=size;map._head=head;map.__ownerID=ownerID;map.__hash=hash;map.__altered=false;return map}var EMPTY_STACK;function emptyStack(){return EMPTY_STACK||(EMPTY_STACK=makeStack(0))}createClass(Set,SetCollection);function Set(value){return value===null||value===undefined?emptySet():isSet(value)?value:emptySet().withMutations(function(set){var iter=SetIterable(value);assertNotInfinite(iter.size);iter.forEach(function(v){return set.add(v)})})}Set.of=function(){return this(arguments)};Set.fromKeys=function(value){return this(KeyedIterable(value).keySeq())};Set.prototype.toString=function(){return this.__toString("Set {","}")};Set.prototype.has=function(value){return this._map.has(value)};Set.prototype.add=function(value){return updateSet(this,this._map.set(value,true))};Set.prototype.remove=function(value){return updateSet(this,this._map.remove(value))};Set.prototype.clear=function(){return updateSet(this,this._map.clear())};Set.prototype.union=function(){var iters=SLICE$0.call(arguments,0);iters=iters.filter(function(x){return x.size!==0});if(iters.length===0){return this}if(this.size===0&&iters.length===1){return this.constructor(iters[0])}return this.withMutations(function(set){for(var ii=0;ii<iters.length;ii++){SetIterable(iters[ii]).forEach(function(value){return set.add(value)})}})};Set.prototype.intersect=function(){var iters=SLICE$0.call(arguments,0);if(iters.length===0){return this}iters=iters.map(function(iter){return SetIterable(iter)});var originalSet=this;return this.withMutations(function(set){originalSet.forEach(function(value){if(!iters.every(function(iter){return iter.contains(value)})){set.remove(value)}})})};Set.prototype.subtract=function(){var iters=SLICE$0.call(arguments,0);if(iters.length===0){return this}iters=iters.map(function(iter){return SetIterable(iter)});var originalSet=this;return this.withMutations(function(set){originalSet.forEach(function(value){if(iters.some(function(iter){return iter.contains(value)})){set.remove(value)}})})};Set.prototype.merge=function(){return this.union.apply(this,arguments)};Set.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1);return this.union.apply(this,iters)};Set.prototype.sort=function(comparator){return OrderedSet(sortFactory(this,comparator))};Set.prototype.sortBy=function(mapper,comparator){return OrderedSet(sortFactory(this,comparator,mapper))};Set.prototype.wasAltered=function(){return this._map.wasAltered()};Set.prototype.__iterate=function(fn,reverse){var this$0=this;return this._map.__iterate(function(_,k){return fn(k,k,this$0)},reverse)};Set.prototype.__iterator=function(type,reverse){return this._map.map(function(_,k){return k}).__iterator(type,reverse)};Set.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}var newMap=this._map.__ensureOwner(ownerID);if(!ownerID){this.__ownerID=ownerID;this._map=newMap;return this}return this.__make(newMap,ownerID)};function isSet(maybeSet){return!!(maybeSet&&maybeSet[IS_SET_SENTINEL])}Set.isSet=isSet;var IS_SET_SENTINEL="@@__IMMUTABLE_SET__@@";var SetPrototype=Set.prototype;SetPrototype[IS_SET_SENTINEL]=true;SetPrototype[DELETE]=SetPrototype.remove;SetPrototype.mergeDeep=SetPrototype.merge;SetPrototype.mergeDeepWith=SetPrototype.mergeWith;SetPrototype.withMutations=MapPrototype.withMutations;SetPrototype.asMutable=MapPrototype.asMutable;SetPrototype.asImmutable=MapPrototype.asImmutable;SetPrototype.__empty=emptySet;SetPrototype.__make=makeSet;function updateSet(set,newMap){if(set.__ownerID){set.size=newMap.size;set._map=newMap;return set}return newMap===set._map?set:newMap.size===0?set.__empty():set.__make(newMap)}function makeSet(map,ownerID){var set=Object.create(SetPrototype);set.size=map?map.size:0;set._map=map;set.__ownerID=ownerID;return set}var EMPTY_SET;function emptySet(){return EMPTY_SET||(EMPTY_SET=makeSet(emptyMap()))}createClass(OrderedSet,Set);function OrderedSet(value){return value===null||value===undefined?emptyOrderedSet():isOrderedSet(value)?value:emptyOrderedSet().withMutations(function(set){var iter=SetIterable(value);assertNotInfinite(iter.size);iter.forEach(function(v){return set.add(v)})})}OrderedSet.of=function(){return this(arguments)};OrderedSet.fromKeys=function(value){return this(KeyedIterable(value).keySeq())};OrderedSet.prototype.toString=function(){return this.__toString("OrderedSet {","}")};function isOrderedSet(maybeOrderedSet){return isSet(maybeOrderedSet)&&isOrdered(maybeOrderedSet)}OrderedSet.isOrderedSet=isOrderedSet;var OrderedSetPrototype=OrderedSet.prototype;OrderedSetPrototype[IS_ORDERED_SENTINEL]=true;OrderedSetPrototype.__empty=emptyOrderedSet;OrderedSetPrototype.__make=makeOrderedSet;function makeOrderedSet(map,ownerID){var set=Object.create(OrderedSetPrototype);set.size=map?map.size:0;set._map=map;set.__ownerID=ownerID;return set}var EMPTY_ORDERED_SET;function emptyOrderedSet(){return EMPTY_ORDERED_SET||(EMPTY_ORDERED_SET=makeOrderedSet(emptyOrderedMap()))}createClass(Record,KeyedCollection);function Record(defaultValues,name){var RecordType=function Record(values){if(!(this instanceof RecordType)){return new RecordType(values)}this._map=Map(values)};var keys=Object.keys(defaultValues);var RecordTypePrototype=RecordType.prototype=Object.create(RecordPrototype);RecordTypePrototype.constructor=RecordType;name&&(RecordTypePrototype._name=name);RecordTypePrototype._defaultValues=defaultValues;RecordTypePrototype._keys=keys;RecordTypePrototype.size=keys.length;try{keys.forEach(function(key){Object.defineProperty(RecordType.prototype,key,{get:function(){return this.get(key)},set:function(value){invariant(this.__ownerID,"Cannot set on an immutable record.");this.set(key,value)}})})}catch(error){}return RecordType}Record.prototype.toString=function(){return this.__toString(recordName(this)+" {","}")};Record.prototype.has=function(k){return this._defaultValues.hasOwnProperty(k)};Record.prototype.get=function(k,notSetValue){if(!this.has(k)){return notSetValue}var defaultVal=this._defaultValues[k];return this._map?this._map.get(k,defaultVal):defaultVal};Record.prototype.clear=function(){if(this.__ownerID){this._map&&this._map.clear();return this}var SuperRecord=Object.getPrototypeOf(this).constructor;return SuperRecord._empty||(SuperRecord._empty=makeRecord(this,emptyMap()))};Record.prototype.set=function(k,v){if(!this.has(k)){throw new Error('Cannot set unknown key "'+k+'" on '+recordName(this))}var newMap=this._map&&this._map.set(k,v);if(this.__ownerID||newMap===this._map){return this}return makeRecord(this,newMap)};Record.prototype.remove=function(k){if(!this.has(k)){return this}var newMap=this._map&&this._map.remove(k);if(this.__ownerID||newMap===this._map){return this}return makeRecord(this,newMap)};Record.prototype.wasAltered=function(){return this._map.wasAltered()};Record.prototype.__iterator=function(type,reverse){var this$0=this;return KeyedIterable(this._defaultValues).map(function(_,k){return this$0.get(k)}).__iterator(type,reverse)};Record.prototype.__iterate=function(fn,reverse){var this$0=this;return KeyedIterable(this._defaultValues).map(function(_,k){return this$0.get(k)}).__iterate(fn,reverse)};Record.prototype.__ensureOwner=function(ownerID){if(ownerID===this.__ownerID){return this}var newMap=this._map&&this._map.__ensureOwner(ownerID);if(!ownerID){this.__ownerID=ownerID;this._map=newMap;return this}return makeRecord(this,newMap,ownerID)};var RecordPrototype=Record.prototype;RecordPrototype[DELETE]=RecordPrototype.remove;RecordPrototype.deleteIn=RecordPrototype.removeIn=MapPrototype.removeIn;RecordPrototype.merge=MapPrototype.merge;RecordPrototype.mergeWith=MapPrototype.mergeWith;RecordPrototype.mergeIn=MapPrototype.mergeIn;RecordPrototype.mergeDeep=MapPrototype.mergeDeep;RecordPrototype.mergeDeepWith=MapPrototype.mergeDeepWith;RecordPrototype.mergeDeepIn=MapPrototype.mergeDeepIn;RecordPrototype.setIn=MapPrototype.setIn;RecordPrototype.update=MapPrototype.update;RecordPrototype.updateIn=MapPrototype.updateIn;RecordPrototype.withMutations=MapPrototype.withMutations;RecordPrototype.asMutable=MapPrototype.asMutable;RecordPrototype.asImmutable=MapPrototype.asImmutable;function makeRecord(likeRecord,map,ownerID){var record=Object.create(Object.getPrototypeOf(likeRecord));record._map=map;record.__ownerID=ownerID;return record}function recordName(record){return record._name||record.constructor.name}function deepEqual(a,b){if(a===b){return true}if(!isIterable(b)||a.size!==undefined&&b.size!==undefined&&a.size!==b.size||a.__hash!==undefined&&b.__hash!==undefined&&a.__hash!==b.__hash||isKeyed(a)!==isKeyed(b)||isIndexed(a)!==isIndexed(b)||isOrdered(a)!==isOrdered(b)){return false}if(a.size===0&&b.size===0){return true}var notAssociative=!isAssociative(a);if(isOrdered(a)){var entries=a.entries();return b.every(function(v,k){var entry=entries.next().value;return entry&&is(entry[1],v)&&(notAssociative||is(entry[0],k))})&&entries.next().done}var flipped=false;if(a.size===undefined){if(b.size===undefined){a.cacheResult()}else{flipped=true;var _=a;a=b;b=_}}var allEqual=true;var bSize=b.__iterate(function(v,k){if(notAssociative?!a.has(v):flipped?!is(v,a.get(k,NOT_SET)):!is(a.get(k,NOT_SET),v)){allEqual=false;return false}});return allEqual&&a.size===bSize}createClass(Range,IndexedSeq);function Range(start,end,step){if(!(this instanceof Range)){return new Range(start,end,step)}invariant(step!==0,"Cannot step a Range by 0");start=start||0;if(end===undefined){end=Infinity}step=step===undefined?1:Math.abs(step);if(end<start){step=-step}this._start=start;this._end=end;this._step=step;this.size=Math.max(0,Math.ceil((end-start)/step-1)+1);if(this.size===0){if(EMPTY_RANGE){return EMPTY_RANGE}EMPTY_RANGE=this}}Range.prototype.toString=function(){if(this.size===0){return"Range []"}return"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"};Range.prototype.get=function(index,notSetValue){return this.has(index)?this._start+wrapIndex(this,index)*this._step:notSetValue};Range.prototype.contains=function(searchValue){var possibleIndex=(searchValue-this._start)/this._step;return possibleIndex>=0&&possibleIndex<this.size&&possibleIndex===Math.floor(possibleIndex)};Range.prototype.slice=function(begin,end){if(wholeSlice(begin,end,this.size)){return this}begin=resolveBegin(begin,this.size);end=resolveEnd(end,this.size);if(end<=begin){return new Range(0,0)}return new Range(this.get(begin,this._end),this.get(end,this._end),this._step)};Range.prototype.indexOf=function(searchValue){var offsetValue=searchValue-this._start;if(offsetValue%this._step===0){var index=offsetValue/this._step;if(index>=0&&index<this.size){return index}}return-1};Range.prototype.lastIndexOf=function(searchValue){return this.indexOf(searchValue)};Range.prototype.__iterate=function(fn,reverse){var maxIndex=this.size-1;var step=this._step;var value=reverse?this._start+maxIndex*step:this._start;for(var ii=0;ii<=maxIndex;ii++){if(fn(value,ii,this)===false){return ii+1}value+=reverse?-step:step}return ii};Range.prototype.__iterator=function(type,reverse){var maxIndex=this.size-1;var step=this._step;var value=reverse?this._start+maxIndex*step:this._start;var ii=0;return new Iterator(function(){var v=value;value+=reverse?-step:step;return ii>maxIndex?iteratorDone():iteratorValue(type,ii++,v)})};Range.prototype.equals=function(other){return other instanceof Range?this._start===other._start&&this._end===other._end&&this._step===other._step:deepEqual(this,other)};var EMPTY_RANGE;createClass(Repeat,IndexedSeq);function Repeat(value,times){if(!(this instanceof Repeat)){return new Repeat(value,times)}this._value=value;this.size=times===undefined?Infinity:Math.max(0,times);if(this.size===0){if(EMPTY_REPEAT){return EMPTY_REPEAT}EMPTY_REPEAT=this}}Repeat.prototype.toString=function(){if(this.size===0){return"Repeat []"}return"Repeat [ "+this._value+" "+this.size+" times ]"};Repeat.prototype.get=function(index,notSetValue){return this.has(index)?this._value:notSetValue};Repeat.prototype.contains=function(searchValue){return is(this._value,searchValue)};Repeat.prototype.slice=function(begin,end){var size=this.size;return wholeSlice(begin,end,size)?this:new Repeat(this._value,resolveEnd(end,size)-resolveBegin(begin,size))};Repeat.prototype.reverse=function(){return this};Repeat.prototype.indexOf=function(searchValue){if(is(this._value,searchValue)){return 0}return-1};Repeat.prototype.lastIndexOf=function(searchValue){if(is(this._value,searchValue)){return this.size}return-1};Repeat.prototype.__iterate=function(fn,reverse){for(var ii=0;ii<this.size;ii++){if(fn(this._value,ii,this)===false){return ii+1}}return ii};Repeat.prototype.__iterator=function(type,reverse){var this$0=this;var ii=0;return new Iterator(function(){return ii<this$0.size?iteratorValue(type,ii++,this$0._value):iteratorDone()})};Repeat.prototype.equals=function(other){return other instanceof Repeat?is(this._value,other._value):deepEqual(other)};var EMPTY_REPEAT;function mixin(ctor,methods){var keyCopier=function(key){ctor.prototype[key]=methods[key]};Object.keys(methods).forEach(keyCopier);Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(methods).forEach(keyCopier);return ctor}Iterable.Iterator=Iterator;mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var array=new Array(this.size||0);this.valueSeq().__iterate(function(v,i){array[i]=v});return array},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map(function(value){return value&&typeof value.toJS==="function"?value.toJS():value}).__toJS()},toJSON:function(){return this.toSeq().map(function(value){return value&&typeof value.toJSON==="function"?value.toJSON():value}).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,true)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var object={};this.__iterate(function(v,k){object[k]=v});return object},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(head,tail){if(this.size===0){return head+tail}return head+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+tail},concat:function(){var values=SLICE$0.call(arguments,0);return reify(this,concatFactory(this,values))},contains:function(searchValue){return this.some(function(value){return is(value,searchValue)})},entries:function(){return this.__iterator(ITERATE_ENTRIES)},every:function(predicate,context){assertNotInfinite(this.size);var returnValue=true;this.__iterate(function(v,k,c){if(!predicate.call(context,v,k,c)){returnValue=false;return false}});return returnValue},filter:function(predicate,context){return reify(this,filterFactory(this,predicate,context,true))},find:function(predicate,context,notSetValue){var entry=this.findEntry(predicate,context);return entry?entry[1]:notSetValue},findEntry:function(predicate,context){var found;this.__iterate(function(v,k,c){if(predicate.call(context,v,k,c)){found=[k,v];return false}});return found},findLastEntry:function(predicate,context){return this.toSeq().reverse().findEntry(predicate,context)},forEach:function(sideEffect,context){assertNotInfinite(this.size);return this.__iterate(context?sideEffect.bind(context):sideEffect)},join:function(separator){assertNotInfinite(this.size);separator=separator!==undefined?""+separator:",";var joined="";var isFirst=true;this.__iterate(function(v){isFirst?isFirst=false:joined+=separator;joined+=v!==null&&v!==undefined?v:""});return joined},keys:function(){return this.__iterator(ITERATE_KEYS)},map:function(mapper,context){return reify(this,mapFactory(this,mapper,context))},reduce:function(reducer,initialReduction,context){assertNotInfinite(this.size);var reduction;var useFirst;if(arguments.length<2){useFirst=true}else{reduction=initialReduction}this.__iterate(function(v,k,c){if(useFirst){useFirst=false;reduction=v}else{reduction=reducer.call(context,reduction,v,k,c)}});return reduction},reduceRight:function(reducer,initialReduction,context){var reversed=this.toKeyedSeq().reverse();return reversed.reduce.apply(reversed,arguments)},reverse:function(){return reify(this,reverseFactory(this,true))},slice:function(begin,end){return reify(this,sliceFactory(this,begin,end,true))},some:function(predicate,context){return!this.every(not(predicate),context)},sort:function(comparator){return reify(this,sortFactory(this,comparator))},values:function(){return this.__iterator(ITERATE_VALUES)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==undefined?this.size===0:!this.some(function(){return true})},count:function(predicate,context){return ensureSize(predicate?this.toSeq().filter(predicate,context):this)},countBy:function(grouper,context){return countByFactory(this,grouper,context)},equals:function(other){return deepEqual(this,other)},entrySeq:function(){var iterable=this;if(iterable._cache){return new ArraySeq(iterable._cache)}var entriesSequence=iterable.toSeq().map(entryMapper).toIndexedSeq();entriesSequence.fromEntrySeq=function(){return iterable.toSeq()};return entriesSequence},filterNot:function(predicate,context){return this.filter(not(predicate),context)},findLast:function(predicate,context,notSetValue){return this.toKeyedSeq().reverse().find(predicate,context,notSetValue)},first:function(){return this.find(returnTrue)},flatMap:function(mapper,context){return reify(this,flatMapFactory(this,mapper,context))},flatten:function(depth){return reify(this,flattenFactory(this,depth,true))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(searchKey,notSetValue){return this.find(function(_,key){return is(key,searchKey)},undefined,notSetValue)},getIn:function(searchKeyPath,notSetValue){var nested=this;var iter=forceIterator(searchKeyPath);var step;while(!(step=iter.next()).done){var key=step.value;nested=nested&&nested.get?nested.get(key,NOT_SET):NOT_SET;if(nested===NOT_SET){return notSetValue}}return nested},groupBy:function(grouper,context){return groupByFactory(this,grouper,context)},has:function(searchKey){return this.get(searchKey,NOT_SET)!==NOT_SET},hasIn:function(searchKeyPath){return this.getIn(searchKeyPath,NOT_SET)!==NOT_SET},isSubset:function(iter){iter=typeof iter.contains==="function"?iter:Iterable(iter);return this.every(function(value){return iter.contains(value)})},isSuperset:function(iter){return iter.isSubset(this)},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(comparator){return maxFactory(this,comparator)},maxBy:function(mapper,comparator){return maxFactory(this,comparator,mapper)},min:function(comparator){return maxFactory(this,comparator?neg(comparator):defaultNegComparator)},minBy:function(mapper,comparator){return maxFactory(this,comparator?neg(comparator):defaultNegComparator,mapper)},rest:function(){return this.slice(1)},skip:function(amount){return this.slice(Math.max(0,amount))},skipLast:function(amount){return reify(this,this.toSeq().reverse().skip(amount).reverse())},skipWhile:function(predicate,context){return reify(this,skipWhileFactory(this,predicate,context,true))},skipUntil:function(predicate,context){return this.skipWhile(not(predicate),context)},sortBy:function(mapper,comparator){return reify(this,sortFactory(this,comparator,mapper))},take:function(amount){return this.slice(0,Math.max(0,amount))},takeLast:function(amount){return reify(this,this.toSeq().reverse().take(amount).reverse())},takeWhile:function(predicate,context){return reify(this,takeWhileFactory(this,predicate,context))},takeUntil:function(predicate,context){return this.takeWhile(not(predicate),context)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var IterablePrototype=Iterable.prototype;IterablePrototype[IS_ITERABLE_SENTINEL]=true;IterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.values;IterablePrototype.__toJS=IterablePrototype.toArray;IterablePrototype.__toStringMapper=quoteString;IterablePrototype.inspect=IterablePrototype.toSource=function(){return this.toString()};IterablePrototype.chain=IterablePrototype.flatMap;(function(){try{Object.defineProperty(IterablePrototype,"length",{get:function(){if(!Iterable.noLengthWarning){var stack;try{throw new Error}catch(error){stack=error.stack}if(stack.indexOf("_wrapObject")===-1){console&&console.warn&&console.warn("iterable.length has been deprecated, "+"use iterable.size or iterable.count(). "+"This warning will become a silent error in a future version. "+stack);return this.size}}}})}catch(e){}})();mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},findKey:function(predicate,context){var entry=this.findEntry(predicate,context);return entry&&entry[0]},findLastKey:function(predicate,context){return this.toSeq().reverse().findKey(predicate,context)},keyOf:function(searchValue){return this.findKey(function(value){return is(value,searchValue)})},lastKeyOf:function(searchValue){return this.findLastKey(function(value){return is(value,searchValue)})},mapEntries:function(mapper,context){var this$0=this;var iterations=0;return reify(this,this.toSeq().map(function(v,k){return mapper.call(context,[k,v],iterations++,this$0)}).fromEntrySeq())},mapKeys:function(mapper,context){var this$0=this;return reify(this,this.toSeq().flip().map(function(k,v){return mapper.call(context,k,v,this$0)}).flip())}});var KeyedIterablePrototype=KeyedIterable.prototype;KeyedIterablePrototype[IS_KEYED_SENTINEL]=true;KeyedIterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.entries;KeyedIterablePrototype.__toJS=IterablePrototype.toObject;KeyedIterablePrototype.__toStringMapper=function(v,k){return k+": "+quoteString(v)};mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,false)},filter:function(predicate,context){return reify(this,filterFactory(this,predicate,context,false))},findIndex:function(predicate,context){var entry=this.findEntry(predicate,context);return entry?entry[0]:-1},indexOf:function(searchValue){var key=this.toKeyedSeq().keyOf(searchValue);return key===undefined?-1:key},lastIndexOf:function(searchValue){return this.toSeq().reverse().indexOf(searchValue)},reverse:function(){return reify(this,reverseFactory(this,false))},slice:function(begin,end){return reify(this,sliceFactory(this,begin,end,false))},splice:function(index,removeNum){var numArgs=arguments.length;removeNum=Math.max(removeNum|0,0);if(numArgs===0||numArgs===2&&!removeNum){return this}index=resolveBegin(index,this.size);var spliced=this.slice(0,index);return reify(this,numArgs===1?spliced:spliced.concat(arrCopy(arguments,2),this.slice(index+removeNum)))},findLastIndex:function(predicate,context){var key=this.toKeyedSeq().findLastKey(predicate,context);return key===undefined?-1:key},first:function(){return this.get(0)},flatten:function(depth){return reify(this,flattenFactory(this,depth,false))},get:function(index,notSetValue){index=wrapIndex(this,index);return index<0||(this.size===Infinity||this.size!==undefined&&index>this.size)?notSetValue:this.find(function(_,key){return key===index},undefined,notSetValue)},has:function(index){index=wrapIndex(this,index);return index>=0&&(this.size!==undefined?this.size===Infinity||index<this.size:this.indexOf(index)!==-1)},interpose:function(separator){return reify(this,interposeFactory(this,separator))},interleave:function(){var iterables=[this].concat(arrCopy(arguments));var zipped=zipWithFactory(this.toSeq(),IndexedSeq.of,iterables);var interleaved=zipped.flatten(true);if(zipped.size){interleaved.size=zipped.size*iterables.length}return reify(this,interleaved)},last:function(){return this.get(-1)},skipWhile:function(predicate,context){return reify(this,skipWhileFactory(this,predicate,context,false))},zip:function(){var iterables=[this].concat(arrCopy(arguments));return reify(this,zipWithFactory(this,defaultZipper,iterables))},zipWith:function(zipper){var iterables=arrCopy(arguments);iterables[0]=this;return reify(this,zipWithFactory(this,zipper,iterables))}});IndexedIterable.prototype[IS_INDEXED_SENTINEL]=true;IndexedIterable.prototype[IS_ORDERED_SENTINEL]=true;mixin(SetIterable,{get:function(value,notSetValue){return this.has(value)?value:notSetValue},contains:function(value){return this.has(value)},keySeq:function(){return this.valueSeq()}});SetIterable.prototype.has=IterablePrototype.contains;mixin(KeyedSeq,KeyedIterable.prototype);mixin(IndexedSeq,IndexedIterable.prototype);mixin(SetSeq,SetIterable.prototype);mixin(KeyedCollection,KeyedIterable.prototype);mixin(IndexedCollection,IndexedIterable.prototype);mixin(SetCollection,SetIterable.prototype);function keyMapper(v,k){return k}function entryMapper(v,k){return[k,v]}function not(predicate){return function(){return!predicate.apply(this,arguments)}}function neg(predicate){return function(){return-predicate.apply(this,arguments)}}function quoteString(value){return typeof value==="string"?JSON.stringify(value):value}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(a,b){return a<b?1:a>b?-1:0}function hashIterable(iterable){if(iterable.size===Infinity){return 0}var ordered=isOrdered(iterable);var keyed=isKeyed(iterable);var h=ordered?1:0;var size=iterable.__iterate(keyed?ordered?function(v,k){h=31*h+hashMerge(hash(v),hash(k))|0}:function(v,k){h=h+hashMerge(hash(v),hash(k))|0}:ordered?function(v){h=31*h+hash(v)|0}:function(v){h=h+hash(v)|0});return murmurHashOfSize(size,h)}function murmurHashOfSize(size,h){h=Math__imul(h,3432918353);h=Math__imul(h<<15|h>>>-15,461845907);h=Math__imul(h<<13|h>>>-13,5);h=(h+3864292196|0)^size;h=Math__imul(h^h>>>16,2246822507);h=Math__imul(h^h>>>13,3266489909);h=smi(h^h>>>16);return h}function hashMerge(a,b){return a^b+2654435769+(a<<6)+(a>>2)|0}var Immutable={Iterable:Iterable,Seq:Seq,Collection:Collection,Map:Map,OrderedMap:OrderedMap,List:List,Stack:Stack,Set:Set,OrderedSet:OrderedSet,Record:Record,Range:Range,Repeat:Repeat,is:is,fromJS:fromJS};return Immutable})},{}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var process=module.exports={};process.nextTick=function(){var canSetImmediate=typeof window!=="undefined"&&window.setImmediate;var canMutationObserver=typeof window!=="undefined"&&window.MutationObserver;var canPost=typeof window!=="undefined"&&window.postMessage&&window.addEventListener;if(canSetImmediate){return function(f){return window.setImmediate(f)}}var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div");var observer=new MutationObserver(function(){var queueList=queue.slice();queue.length=0;queueList.forEach(function(fn){fn()})});observer.observe(hiddenDiv,{attributes:true});return function nextTick(fn){if(!queue.length){hiddenDiv.setAttribute("yes","no")}queue.push(fn)}}if(canPost){window.addEventListener("message",function(ev){var source=ev.source;if((source===window||source===null)&&ev.data==="process-tick"){ev.stopPropagation();if(queue.length>0){var fn=queue.shift();fn()}}},true);return function nextTick(fn){queue.push(fn);window.postMessage("process-tick","*")}}return function nextTick(fn){setTimeout(fn,0)}}();process.title="browser";process.browser=true;process.env={};process.argv=[];function noop(){}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){throw new Error("process.binding is not supported") | |
};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")}},{}],2:[function(require,module,exports){"use strict";var focusNode=require("./focusNode");var AutoFocusMixin={componentDidMount:function(){if(this.props.autoFocus){focusNode(this.getDOMNode())}}};module.exports=AutoFocusMixin},{"./focusNode":126}],3:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPropagators=require("./EventPropagators");var ExecutionEnvironment=require("./ExecutionEnvironment");var SyntheticInputEvent=require("./SyntheticInputEvent");var keyOf=require("./keyOf");var canUseTextInputEvent=ExecutionEnvironment.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||isPresto());function isPresto(){var opera=window.opera;return typeof opera==="object"&&typeof opera.version==="function"&&parseInt(opera.version(),10)<=12}var SPACEBAR_CODE=32;var SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE);var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={beforeInput:{phasedRegistrationNames:{bubbled:keyOf({onBeforeInput:null}),captured:keyOf({onBeforeInputCapture:null})},dependencies:[topLevelTypes.topCompositionEnd,topLevelTypes.topKeyPress,topLevelTypes.topTextInput,topLevelTypes.topPaste]}};var fallbackChars=null;var hasSpaceKeypress=false;function isKeypressCommand(nativeEvent){return(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&&!(nativeEvent.ctrlKey&&nativeEvent.altKey)}var BeforeInputEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var chars;if(canUseTextInputEvent){switch(topLevelType){case topLevelTypes.topKeyPress:var which=nativeEvent.which;if(which!==SPACEBAR_CODE){return}hasSpaceKeypress=true;chars=SPACEBAR_CHAR;break;case topLevelTypes.topTextInput:chars=nativeEvent.data;if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){return}break;default:return}}else{switch(topLevelType){case topLevelTypes.topPaste:fallbackChars=null;break;case topLevelTypes.topKeyPress:if(nativeEvent.which&&!isKeypressCommand(nativeEvent)){fallbackChars=String.fromCharCode(nativeEvent.which)}break;case topLevelTypes.topCompositionEnd:fallbackChars=nativeEvent.data;break}if(fallbackChars===null){return}chars=fallbackChars}if(!chars){return}var event=SyntheticInputEvent.getPooled(eventTypes.beforeInput,topLevelTargetID,nativeEvent);event.data=chars;fallbackChars=null;EventPropagators.accumulateTwoPhaseDispatches(event);return event}};module.exports=BeforeInputEventPlugin},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./SyntheticInputEvent":102,"./keyOf":148}],4:[function(require,module,exports){(function(process){var invariant=require("./invariant");var CSSCore={addClass:function(element,className){"production"!==process.env.NODE_ENV?invariant(!/\s/.test(className),'CSSCore.addClass takes only a single class name. "%s" contains '+"multiple classes.",className):invariant(!/\s/.test(className));if(className){if(element.classList){element.classList.add(className)}else if(!CSSCore.hasClass(element,className)){element.className=element.className+" "+className}}return element},removeClass:function(element,className){"production"!==process.env.NODE_ENV?invariant(!/\s/.test(className),'CSSCore.removeClass takes only a single class name. "%s" contains '+"multiple classes.",className):invariant(!/\s/.test(className));if(className){if(element.classList){element.classList.remove(className)}else if(CSSCore.hasClass(element,className)){element.className=element.className.replace(new RegExp("(^|\\s)"+className+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}}return element},conditionClass:function(element,className,bool){return(bool?CSSCore.addClass:CSSCore.removeClass)(element,className)},hasClass:function(element,className){"production"!==process.env.NODE_ENV?invariant(!/\s/.test(className),"CSS.hasClass takes only a single class name."):invariant(!/\s/.test(className));if(element.classList){return!!className&&element.classList.contains(className)}return(" "+element.className+" ").indexOf(" "+className+" ")>-1}};module.exports=CSSCore}).call(this,require("_process"))},{"./invariant":141,_process:1}],5:[function(require,module,exports){"use strict";var isUnitlessNumber={columnCount:true,flex:true,flexGrow:true,flexShrink:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true,fillOpacity:true,strokeOpacity:true};function prefixKey(prefix,key){return prefix+key.charAt(0).toUpperCase()+key.substring(1)}var prefixes=["Webkit","ms","Moz","O"];Object.keys(isUnitlessNumber).forEach(function(prop){prefixes.forEach(function(prefix){isUnitlessNumber[prefixKey(prefix,prop)]=isUnitlessNumber[prop]})});var shorthandPropertyExpansions={background:{backgroundImage:true,backgroundPosition:true,backgroundRepeat:true,backgroundColor:true},border:{borderWidth:true,borderStyle:true,borderColor:true},borderBottom:{borderBottomWidth:true,borderBottomStyle:true,borderBottomColor:true},borderLeft:{borderLeftWidth:true,borderLeftStyle:true,borderLeftColor:true},borderRight:{borderRightWidth:true,borderRightStyle:true,borderRightColor:true},borderTop:{borderTopWidth:true,borderTopStyle:true,borderTopColor:true},font:{fontStyle:true,fontVariant:true,fontWeight:true,fontSize:true,lineHeight:true,fontFamily:true}};var CSSProperty={isUnitlessNumber:isUnitlessNumber,shorthandPropertyExpansions:shorthandPropertyExpansions};module.exports=CSSProperty},{}],6:[function(require,module,exports){(function(process){"use strict";var CSSProperty=require("./CSSProperty");var ExecutionEnvironment=require("./ExecutionEnvironment");var camelizeStyleName=require("./camelizeStyleName");var dangerousStyleValue=require("./dangerousStyleValue");var hyphenateStyleName=require("./hyphenateStyleName");var memoizeStringOnly=require("./memoizeStringOnly");var warning=require("./warning");var processStyleName=memoizeStringOnly(function(styleName){return hyphenateStyleName(styleName)});var styleFloatAccessor="cssFloat";if(ExecutionEnvironment.canUseDOM){if(document.documentElement.style.cssFloat===undefined){styleFloatAccessor="styleFloat"}}if("production"!==process.env.NODE_ENV){var warnedStyleNames={};var warnHyphenatedStyleName=function(name){if(warnedStyleNames.hasOwnProperty(name)&&warnedStyleNames[name]){return}warnedStyleNames[name]=true;"production"!==process.env.NODE_ENV?warning(false,"Unsupported style property "+name+". Did you mean "+camelizeStyleName(name)+"?"):null}}var CSSPropertyOperations={createMarkupForStyles:function(styles){var serialized="";for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}if("production"!==process.env.NODE_ENV){if(styleName.indexOf("-")>-1){warnHyphenatedStyleName(styleName)}}var styleValue=styles[styleName];if(styleValue!=null){serialized+=processStyleName(styleName)+":";serialized+=dangerousStyleValue(styleName,styleValue)+";"}}return serialized||null},setValueForStyles:function(node,styles){var style=node.style;for(var styleName in styles){if(!styles.hasOwnProperty(styleName)){continue}if("production"!==process.env.NODE_ENV){if(styleName.indexOf("-")>-1){warnHyphenatedStyleName(styleName)}}var styleValue=dangerousStyleValue(styleName,styles[styleName]);if(styleName==="float"){styleName=styleFloatAccessor}if(styleValue){style[styleName]=styleValue}else{var expansion=CSSProperty.shorthandPropertyExpansions[styleName];if(expansion){for(var individualStyleName in expansion){style[individualStyleName]=""}}else{style[styleName]=""}}}}};module.exports=CSSPropertyOperations}).call(this,require("_process"))},{"./CSSProperty":5,"./ExecutionEnvironment":23,"./camelizeStyleName":113,"./dangerousStyleValue":120,"./hyphenateStyleName":139,"./memoizeStringOnly":150,"./warning":161,_process:1}],7:[function(require,module,exports){(function(process){"use strict";var PooledClass=require("./PooledClass");var assign=require("./Object.assign");var invariant=require("./invariant");function CallbackQueue(){this._callbacks=null;this._contexts=null}assign(CallbackQueue.prototype,{enqueue:function(callback,context){this._callbacks=this._callbacks||[];this._contexts=this._contexts||[];this._callbacks.push(callback);this._contexts.push(context)},notifyAll:function(){var callbacks=this._callbacks;var contexts=this._contexts;if(callbacks){"production"!==process.env.NODE_ENV?invariant(callbacks.length===contexts.length,"Mismatched list of contexts in callback queue"):invariant(callbacks.length===contexts.length);this._callbacks=null;this._contexts=null;for(var i=0,l=callbacks.length;i<l;i++){callbacks[i].call(contexts[i])}callbacks.length=0;contexts.length=0}},reset:function(){this._callbacks=null;this._contexts=null},destructor:function(){this.reset()}});PooledClass.addPoolingTo(CallbackQueue);module.exports=CallbackQueue}).call(this,require("_process"))},{"./Object.assign":29,"./PooledClass":30,"./invariant":141,_process:1}],8:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPluginHub=require("./EventPluginHub");var EventPropagators=require("./EventPropagators");var ExecutionEnvironment=require("./ExecutionEnvironment");var ReactUpdates=require("./ReactUpdates");var SyntheticEvent=require("./SyntheticEvent");var isEventSupported=require("./isEventSupported");var isTextInputElement=require("./isTextInputElement");var keyOf=require("./keyOf");var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={change:{phasedRegistrationNames:{bubbled:keyOf({onChange:null}),captured:keyOf({onChangeCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topChange,topLevelTypes.topClick,topLevelTypes.topFocus,topLevelTypes.topInput,topLevelTypes.topKeyDown,topLevelTypes.topKeyUp,topLevelTypes.topSelectionChange]}};var activeElement=null;var activeElementID=null;var activeElementValue=null;var activeElementValueProp=null;function shouldUseChangeEvent(elem){return elem.nodeName==="SELECT"||elem.nodeName==="INPUT"&&elem.type==="file"}var doesChangeEventBubble=false;if(ExecutionEnvironment.canUseDOM){doesChangeEventBubble=isEventSupported("change")&&(!("documentMode"in document)||document.documentMode>8)}function manualDispatchChangeEvent(nativeEvent){var event=SyntheticEvent.getPooled(eventTypes.change,activeElementID,nativeEvent);EventPropagators.accumulateTwoPhaseDispatches(event);ReactUpdates.batchedUpdates(runEventInBatch,event)}function runEventInBatch(event){EventPluginHub.enqueueEvents(event);EventPluginHub.processEventQueue()}function startWatchingForChangeEventIE8(target,targetID){activeElement=target;activeElementID=targetID;activeElement.attachEvent("onchange",manualDispatchChangeEvent)}function stopWatchingForChangeEventIE8(){if(!activeElement){return}activeElement.detachEvent("onchange",manualDispatchChangeEvent);activeElement=null;activeElementID=null}function getTargetIDForChangeEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topChange){return topLevelTargetID}}function handleEventsForChangeEventIE8(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){stopWatchingForChangeEventIE8();startWatchingForChangeEventIE8(topLevelTarget,topLevelTargetID)}else if(topLevelType===topLevelTypes.topBlur){stopWatchingForChangeEventIE8()}}var isInputEventSupported=false;if(ExecutionEnvironment.canUseDOM){isInputEventSupported=isEventSupported("input")&&(!("documentMode"in document)||document.documentMode>9)}var newValueProp={get:function(){return activeElementValueProp.get.call(this)},set:function(val){activeElementValue=""+val;activeElementValueProp.set.call(this,val)}};function startWatchingForValueChange(target,targetID){activeElement=target;activeElementID=targetID;activeElementValue=target.value;activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,"value");Object.defineProperty(activeElement,"value",newValueProp);activeElement.attachEvent("onpropertychange",handlePropertyChange)}function stopWatchingForValueChange(){if(!activeElement){return}delete activeElement.value;activeElement.detachEvent("onpropertychange",handlePropertyChange);activeElement=null;activeElementID=null;activeElementValue=null;activeElementValueProp=null}function handlePropertyChange(nativeEvent){if(nativeEvent.propertyName!=="value"){return}var value=nativeEvent.srcElement.value;if(value===activeElementValue){return}activeElementValue=value;manualDispatchChangeEvent(nativeEvent)}function getTargetIDForInputEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topInput){return topLevelTargetID}}function handleEventsForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topFocus){stopWatchingForValueChange();startWatchingForValueChange(topLevelTarget,topLevelTargetID)}else if(topLevelType===topLevelTypes.topBlur){stopWatchingForValueChange()}}function getTargetIDForInputEventIE(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topSelectionChange||topLevelType===topLevelTypes.topKeyUp||topLevelType===topLevelTypes.topKeyDown){if(activeElement&&activeElement.value!==activeElementValue){activeElementValue=activeElement.value;return activeElementID}}}function shouldUseClickEvent(elem){return elem.nodeName==="INPUT"&&(elem.type==="checkbox"||elem.type==="radio")}function getTargetIDForClickEvent(topLevelType,topLevelTarget,topLevelTargetID){if(topLevelType===topLevelTypes.topClick){return topLevelTargetID}}var ChangeEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var getTargetIDFunc,handleEventFunc;if(shouldUseChangeEvent(topLevelTarget)){if(doesChangeEventBubble){getTargetIDFunc=getTargetIDForChangeEvent}else{handleEventFunc=handleEventsForChangeEventIE8}}else if(isTextInputElement(topLevelTarget)){if(isInputEventSupported){getTargetIDFunc=getTargetIDForInputEvent}else{getTargetIDFunc=getTargetIDForInputEventIE;handleEventFunc=handleEventsForInputEventIE}}else if(shouldUseClickEvent(topLevelTarget)){getTargetIDFunc=getTargetIDForClickEvent}if(getTargetIDFunc){var targetID=getTargetIDFunc(topLevelType,topLevelTarget,topLevelTargetID);if(targetID){var event=SyntheticEvent.getPooled(eventTypes.change,targetID,nativeEvent);EventPropagators.accumulateTwoPhaseDispatches(event);return event}}if(handleEventFunc){handleEventFunc(topLevelType,topLevelTarget,topLevelTargetID)}}};module.exports=ChangeEventPlugin},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactUpdates":91,"./SyntheticEvent":100,"./isEventSupported":142,"./isTextInputElement":144,"./keyOf":148}],9:[function(require,module,exports){"use strict";var nextReactRootIndex=0;var ClientReactRootIndex={createReactRootIndex:function(){return nextReactRootIndex++}};module.exports=ClientReactRootIndex},{}],10:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPropagators=require("./EventPropagators");var ExecutionEnvironment=require("./ExecutionEnvironment");var ReactInputSelection=require("./ReactInputSelection");var SyntheticCompositionEvent=require("./SyntheticCompositionEvent");var getTextContentAccessor=require("./getTextContentAccessor");var keyOf=require("./keyOf");var END_KEYCODES=[9,13,27,32];var START_KEYCODE=229;var useCompositionEvent=ExecutionEnvironment.canUseDOM&&"CompositionEvent"in window;var useFallbackData=!useCompositionEvent||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11;var topLevelTypes=EventConstants.topLevelTypes;var currentComposition=null;var eventTypes={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]}};function getCompositionEventType(topLevelType){switch(topLevelType){case topLevelTypes.topCompositionStart:return eventTypes.compositionStart;case topLevelTypes.topCompositionEnd:return eventTypes.compositionEnd;case topLevelTypes.topCompositionUpdate:return eventTypes.compositionUpdate}}function isFallbackStart(topLevelType,nativeEvent){return topLevelType===topLevelTypes.topKeyDown&&nativeEvent.keyCode===START_KEYCODE}function isFallbackEnd(topLevelType,nativeEvent){switch(topLevelType){case topLevelTypes.topKeyUp:return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1;case topLevelTypes.topKeyDown:return nativeEvent.keyCode!==START_KEYCODE;case topLevelTypes.topKeyPress:case topLevelTypes.topMouseDown:case topLevelTypes.topBlur:return true;default:return false}}function FallbackCompositionState(root){this.root=root;this.startSelection=ReactInputSelection.getSelection(root);this.startValue=this.getText()}FallbackCompositionState.prototype.getText=function(){return this.root.value||this.root[getTextContentAccessor()]};FallbackCompositionState.prototype.getData=function(){var endValue=this.getText();var prefixLength=this.startSelection.start;var suffixLength=this.startValue.length-this.startSelection.end;return endValue.substr(prefixLength,endValue.length-suffixLength-prefixLength)};var CompositionEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var eventType;var data;if(useCompositionEvent){eventType=getCompositionEventType(topLevelType)}else if(!currentComposition){if(isFallbackStart(topLevelType,nativeEvent)){eventType=eventTypes.compositionStart}}else if(isFallbackEnd(topLevelType,nativeEvent)){eventType=eventTypes.compositionEnd}if(useFallbackData){if(!currentComposition&&eventType===eventTypes.compositionStart){currentComposition=new FallbackCompositionState(topLevelTarget)}else if(eventType===eventTypes.compositionEnd){if(currentComposition){data=currentComposition.getData();currentComposition=null}}}if(eventType){var event=SyntheticCompositionEvent.getPooled(eventType,topLevelTargetID,nativeEvent);if(data){event.data=data}EventPropagators.accumulateTwoPhaseDispatches(event);return event}}};module.exports=CompositionEventPlugin},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactInputSelection":65,"./SyntheticCompositionEvent":98,"./getTextContentAccessor":136,"./keyOf":148}],11:[function(require,module,exports){(function(process){"use strict";var Danger=require("./Danger");var ReactMultiChildUpdateTypes=require("./ReactMultiChildUpdateTypes");var getTextContentAccessor=require("./getTextContentAccessor");var invariant=require("./invariant");var textContentAccessor=getTextContentAccessor();function insertChildAt(parentNode,childNode,index){parentNode.insertBefore(childNode,parentNode.childNodes[index]||null)}var updateTextContent;if(textContentAccessor==="textContent"){updateTextContent=function(node,text){node.textContent=text}}else{updateTextContent=function(node,text){while(node.firstChild){node.removeChild(node.firstChild)}if(text){var doc=node.ownerDocument||document;node.appendChild(doc.createTextNode(text))}}}var DOMChildrenOperations={dangerouslyReplaceNodeWithMarkup:Danger.dangerouslyReplaceNodeWithMarkup,updateTextContent:updateTextContent,processUpdates:function(updates,markupList){var update;var initialChildren=null;var updatedChildren=null;for(var i=0;update=updates[i];i++){if(update.type===ReactMultiChildUpdateTypes.MOVE_EXISTING||update.type===ReactMultiChildUpdateTypes.REMOVE_NODE){var updatedIndex=update.fromIndex;var updatedChild=update.parentNode.childNodes[updatedIndex];var parentID=update.parentID;"production"!==process.env.NODE_ENV?invariant(updatedChild,"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(updatedChild);initialChildren=initialChildren||{};initialChildren[parentID]=initialChildren[parentID]||[];initialChildren[parentID][updatedIndex]=updatedChild;updatedChildren=updatedChildren||[];updatedChildren.push(updatedChild)}}var renderedMarkup=Danger.dangerouslyRenderMarkup(markupList);if(updatedChildren){for(var j=0;j<updatedChildren.length;j++){updatedChildren[j].parentNode.removeChild(updatedChildren[j])}}for(var k=0;update=updates[k];k++){switch(update.type){case ReactMultiChildUpdateTypes.INSERT_MARKUP:insertChildAt(update.parentNode,renderedMarkup[update.markupIndex],update.toIndex);break;case ReactMultiChildUpdateTypes.MOVE_EXISTING:insertChildAt(update.parentNode,initialChildren[update.parentID][update.fromIndex],update.toIndex);break;case ReactMultiChildUpdateTypes.TEXT_CONTENT:updateTextContent(update.parentNode,update.textContent);break;case ReactMultiChildUpdateTypes.REMOVE_NODE:break}}}};module.exports=DOMChildrenOperations}).call(this,require("_process"))},{"./Danger":14,"./ReactMultiChildUpdateTypes":72,"./getTextContentAccessor":136,"./invariant":141,_process:1}],12:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");function checkMask(value,bitmask){return(value&bitmask)===bitmask}var DOMPropertyInjection={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:32|16,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(domPropertyConfig){var Properties=domPropertyConfig.Properties||{};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){"production"!==process.env.NODE_ENV?invariant(!DOMProperty.isStandardName.hasOwnProperty(propName),"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(!DOMProperty.isStandardName.hasOwnProperty(propName));DOMProperty.isStandardName[propName]=true;var lowerCased=propName.toLowerCase();DOMProperty.getPossibleStandardName[lowerCased]=propName;if(DOMAttributeNames.hasOwnProperty(propName)){var attributeName=DOMAttributeNames[propName];DOMProperty.getPossibleStandardName[attributeName]=propName;DOMProperty.getAttributeName[propName]=attributeName}else{DOMProperty.getAttributeName[propName]=lowerCased}DOMProperty.getPropertyName[propName]=DOMPropertyNames.hasOwnProperty(propName)?DOMPropertyNames[propName]:propName;if(DOMMutationMethods.hasOwnProperty(propName)){DOMProperty.getMutationMethod[propName]=DOMMutationMethods[propName]}else{DOMProperty.getMutationMethod[propName]=null}var propConfig=Properties[propName];DOMProperty.mustUseAttribute[propName]=checkMask(propConfig,DOMPropertyInjection.MUST_USE_ATTRIBUTE);DOMProperty.mustUseProperty[propName]=checkMask(propConfig,DOMPropertyInjection.MUST_USE_PROPERTY);DOMProperty.hasSideEffects[propName]=checkMask(propConfig,DOMPropertyInjection.HAS_SIDE_EFFECTS);DOMProperty.hasBooleanValue[propName]=checkMask(propConfig,DOMPropertyInjection.HAS_BOOLEAN_VALUE);DOMProperty.hasNumericValue[propName]=checkMask(propConfig,DOMPropertyInjection.HAS_NUMERIC_VALUE);DOMProperty.hasPositiveNumericValue[propName]=checkMask(propConfig,DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE);DOMProperty.hasOverloadedBooleanValue[propName]=checkMask(propConfig,DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE);"production"!==process.env.NODE_ENV?invariant(!DOMProperty.mustUseAttribute[propName]||!DOMProperty.mustUseProperty[propName],"DOMProperty: Cannot require using both attribute and property: %s",propName):invariant(!DOMProperty.mustUseAttribute[propName]||!DOMProperty.mustUseProperty[propName]);"production"!==process.env.NODE_ENV?invariant(DOMProperty.mustUseProperty[propName]||!DOMProperty.hasSideEffects[propName],"DOMProperty: Properties that have side effects must use property: %s",propName):invariant(DOMProperty.mustUseProperty[propName]||!DOMProperty.hasSideEffects[propName]);"production"!==process.env.NODE_ENV?invariant(!!DOMProperty.hasBooleanValue[propName]+!!DOMProperty.hasNumericValue[propName]+!!DOMProperty.hasOverloadedBooleanValue[propName]<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or "+"numeric value, but not a combination: %s",propName):invariant(!!DOMProperty.hasBooleanValue[propName]+!!DOMProperty.hasNumericValue[propName]+!!DOMProperty.hasOverloadedBooleanValue[propName]<=1)}}};var defaultValueCache={};var DOMProperty={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(attributeName){for(var i=0;i<DOMProperty._isCustomAttributeFunctions.length;i++){var isCustomAttributeFn=DOMProperty._isCustomAttributeFunctions[i];if(isCustomAttributeFn(attributeName)){return true}}return false},getDefaultValueForProperty:function(nodeName,prop){var nodeDefaults=defaultValueCache[nodeName];var testElement;if(!nodeDefaults){defaultValueCache[nodeName]=nodeDefaults={}}if(!(prop in nodeDefaults)){testElement=document.createElement(nodeName);nodeDefaults[prop]=testElement[prop]}return nodeDefaults[prop]},injection:DOMPropertyInjection};module.exports=DOMProperty}).call(this,require("_process"))},{"./invariant":141,_process:1}],13:[function(require,module,exports){(function(process){"use strict";var DOMProperty=require("./DOMProperty");var escapeTextForBrowser=require("./escapeTextForBrowser");var memoizeStringOnly=require("./memoizeStringOnly");var warning=require("./warning");function shouldIgnoreValue(name,value){return value==null||DOMProperty.hasBooleanValue[name]&&!value||DOMProperty.hasNumericValue[name]&&isNaN(value)||DOMProperty.hasPositiveNumericValue[name]&&value<1||DOMProperty.hasOverloadedBooleanValue[name]&&value===false}var processAttributeNameAndPrefix=memoizeStringOnly(function(name){return escapeTextForBrowser(name)+'="'});if("production"!==process.env.NODE_ENV){var reactProps={children:true,dangerouslySetInnerHTML:true,key:true,ref:true};var warnedProperties={};var warnUnknownProperty=function(name){if(reactProps.hasOwnProperty(name)&&reactProps[name]||warnedProperties.hasOwnProperty(name)&&warnedProperties[name]){return}warnedProperties[name]=true;var lowerCasedName=name.toLowerCase();var standardName=DOMProperty.isCustomAttribute(lowerCasedName)?lowerCasedName:DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName)?DOMProperty.getPossibleStandardName[lowerCasedName]:null;"production"!==process.env.NODE_ENV?warning(standardName==null,"Unknown DOM property "+name+". Did you mean "+standardName+"?"):null}}var DOMPropertyOperations={createMarkupForID:function(id){return processAttributeNameAndPrefix(DOMProperty.ID_ATTRIBUTE_NAME)+escapeTextForBrowser(id)+'"'},createMarkupForProperty:function(name,value){if(DOMProperty.isStandardName.hasOwnProperty(name)&&DOMProperty.isStandardName[name]){if(shouldIgnoreValue(name,value)){return""}var attributeName=DOMProperty.getAttributeName[name];if(DOMProperty.hasBooleanValue[name]||DOMProperty.hasOverloadedBooleanValue[name]&&value===true){return escapeTextForBrowser(attributeName)}return processAttributeNameAndPrefix(attributeName)+escapeTextForBrowser(value)+'"'}else if(DOMProperty.isCustomAttribute(name)){if(value==null){return""}return processAttributeNameAndPrefix(name)+escapeTextForBrowser(value)+'"'}else if("production"!==process.env.NODE_ENV){warnUnknownProperty(name)}return null},setValueForProperty:function(node,name,value){if(DOMProperty.isStandardName.hasOwnProperty(name)&&DOMProperty.isStandardName[name]){var mutationMethod=DOMProperty.getMutationMethod[name];if(mutationMethod){mutationMethod(node,value)}else if(shouldIgnoreValue(name,value)){this.deleteValueForProperty(node,name)}else if(DOMProperty.mustUseAttribute[name]){node.setAttribute(DOMProperty.getAttributeName[name],""+value)}else{var propName=DOMProperty.getPropertyName[name];if(!DOMProperty.hasSideEffects[name]||""+node[propName]!==""+value){node[propName]=value}}}else if(DOMProperty.isCustomAttribute(name)){if(value==null){node.removeAttribute(name)}else{node.setAttribute(name,""+value)}}else if("production"!==process.env.NODE_ENV){warnUnknownProperty(name)}},deleteValueForProperty:function(node,name){if(DOMProperty.isStandardName.hasOwnProperty(name)&&DOMProperty.isStandardName[name]){var mutationMethod=DOMProperty.getMutationMethod[name];if(mutationMethod){mutationMethod(node,undefined)}else if(DOMProperty.mustUseAttribute[name]){node.removeAttribute(DOMProperty.getAttributeName[name])}else{var propName=DOMProperty.getPropertyName[name];var defaultValue=DOMProperty.getDefaultValueForProperty(node.nodeName,propName);if(!DOMProperty.hasSideEffects[name]||""+node[propName]!==defaultValue){node[propName]=defaultValue}}}else if(DOMProperty.isCustomAttribute(name)){node.removeAttribute(name)}else if("production"!==process.env.NODE_ENV){warnUnknownProperty(name)}}};module.exports=DOMPropertyOperations}).call(this,require("_process"))},{"./DOMProperty":12,"./escapeTextForBrowser":124,"./memoizeStringOnly":150,"./warning":161,_process:1}],14:[function(require,module,exports){(function(process){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var createNodesFromMarkup=require("./createNodesFromMarkup");var emptyFunction=require("./emptyFunction");var getMarkupWrap=require("./getMarkupWrap");var invariant=require("./invariant");var OPEN_TAG_NAME_EXP=/^(<[^ \/>]+)/;var RESULT_INDEX_ATTR="data-danger-index";function getNodeName(markup){return markup.substring(1,markup.indexOf(" "))}var Danger={dangerouslyRenderMarkup:function(markupList){"production"!==process.env.NODE_ENV?invariant(ExecutionEnvironment.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker "+"thread. Make sure `window` and `document` are available globally "+"before requiring React when unit testing or use "+"React.renderToString for server rendering."):invariant(ExecutionEnvironment.canUseDOM);var nodeName;var markupByNodeName={};for(var i=0;i<markupList.length;i++){"production"!==process.env.NODE_ENV?invariant(markupList[i],"dangerouslyRenderMarkup(...): Missing markup."):invariant(markupList[i]);nodeName=getNodeName(markupList[i]);nodeName=getMarkupWrap(nodeName)?nodeName:"*";markupByNodeName[nodeName]=markupByNodeName[nodeName]||[];markupByNodeName[nodeName][i]=markupList[i]}var resultList=[];var resultListAssignmentCount=0;for(nodeName in markupByNodeName){if(!markupByNodeName.hasOwnProperty(nodeName)){continue}var markupListByNodeName=markupByNodeName[nodeName];for(var resultIndex in markupListByNodeName){if(markupListByNodeName.hasOwnProperty(resultIndex)){var markup=markupListByNodeName[resultIndex]; | |
markupListByNodeName[resultIndex]=markup.replace(OPEN_TAG_NAME_EXP,"$1 "+RESULT_INDEX_ATTR+'="'+resultIndex+'" ')}}var renderNodes=createNodesFromMarkup(markupListByNodeName.join(""),emptyFunction);for(i=0;i<renderNodes.length;++i){var renderNode=renderNodes[i];if(renderNode.hasAttribute&&renderNode.hasAttribute(RESULT_INDEX_ATTR)){resultIndex=+renderNode.getAttribute(RESULT_INDEX_ATTR);renderNode.removeAttribute(RESULT_INDEX_ATTR);"production"!==process.env.NODE_ENV?invariant(!resultList.hasOwnProperty(resultIndex),"Danger: Assigning to an already-occupied result index."):invariant(!resultList.hasOwnProperty(resultIndex));resultList[resultIndex]=renderNode;resultListAssignmentCount+=1}else if("production"!==process.env.NODE_ENV){console.error("Danger: Discarding unexpected node:",renderNode)}}}"production"!==process.env.NODE_ENV?invariant(resultListAssignmentCount===resultList.length,"Danger: Did not assign to every index of resultList."):invariant(resultListAssignmentCount===resultList.length);"production"!==process.env.NODE_ENV?invariant(resultList.length===markupList.length,"Danger: Expected markup to render %s nodes, but rendered %s.",markupList.length,resultList.length):invariant(resultList.length===markupList.length);return resultList},dangerouslyReplaceNodeWithMarkup:function(oldChild,markup){"production"!==process.env.NODE_ENV?invariant(ExecutionEnvironment.canUseDOM,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a "+"worker thread. Make sure `window` and `document` are available "+"globally before requiring React when unit testing or use "+"React.renderToString for server rendering."):invariant(ExecutionEnvironment.canUseDOM);"production"!==process.env.NODE_ENV?invariant(markup,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):invariant(markup);"production"!==process.env.NODE_ENV?invariant(oldChild.tagName.toLowerCase()!=="html","dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the "+"<html> node. This is because browser quirks make this unreliable "+"and/or slow. If you want to render to the root you must use "+"server rendering. See renderComponentToString()."):invariant(oldChild.tagName.toLowerCase()!=="html");var newChild=createNodesFromMarkup(markup,emptyFunction)[0];oldChild.parentNode.replaceChild(newChild,oldChild)}};module.exports=Danger}).call(this,require("_process"))},{"./ExecutionEnvironment":23,"./createNodesFromMarkup":118,"./emptyFunction":122,"./getMarkupWrap":133,"./invariant":141,_process:1}],15:[function(require,module,exports){"use strict";var keyOf=require("./keyOf");var DefaultEventPluginOrder=[keyOf({ResponderEventPlugin:null}),keyOf({SimpleEventPlugin:null}),keyOf({TapEventPlugin:null}),keyOf({EnterLeaveEventPlugin:null}),keyOf({ChangeEventPlugin:null}),keyOf({SelectEventPlugin:null}),keyOf({CompositionEventPlugin:null}),keyOf({BeforeInputEventPlugin:null}),keyOf({AnalyticsEventPlugin:null}),keyOf({MobileSafariClickEventPlugin:null})];module.exports=DefaultEventPluginOrder},{"./keyOf":148}],16:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPropagators=require("./EventPropagators");var SyntheticMouseEvent=require("./SyntheticMouseEvent");var ReactMount=require("./ReactMount");var keyOf=require("./keyOf");var topLevelTypes=EventConstants.topLevelTypes;var getFirstReactDOM=ReactMount.getFirstReactDOM;var eventTypes={mouseEnter:{registrationName:keyOf({onMouseEnter:null}),dependencies:[topLevelTypes.topMouseOut,topLevelTypes.topMouseOver]},mouseLeave:{registrationName:keyOf({onMouseLeave:null}),dependencies:[topLevelTypes.topMouseOut,topLevelTypes.topMouseOver]}};var extractedEvents=[null,null];var EnterLeaveEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){if(topLevelType===topLevelTypes.topMouseOver&&(nativeEvent.relatedTarget||nativeEvent.fromElement)){return null}if(topLevelType!==topLevelTypes.topMouseOut&&topLevelType!==topLevelTypes.topMouseOver){return null}var win;if(topLevelTarget.window===topLevelTarget){win=topLevelTarget}else{var doc=topLevelTarget.ownerDocument;if(doc){win=doc.defaultView||doc.parentWindow}else{win=window}}var from,to;if(topLevelType===topLevelTypes.topMouseOut){from=topLevelTarget;to=getFirstReactDOM(nativeEvent.relatedTarget||nativeEvent.toElement)||win}else{from=win;to=topLevelTarget}if(from===to){return null}var fromID=from?ReactMount.getID(from):"";var toID=to?ReactMount.getID(to):"";var leave=SyntheticMouseEvent.getPooled(eventTypes.mouseLeave,fromID,nativeEvent);leave.type="mouseleave";leave.target=from;leave.relatedTarget=to;var enter=SyntheticMouseEvent.getPooled(eventTypes.mouseEnter,toID,nativeEvent);enter.type="mouseenter";enter.target=to;enter.relatedTarget=from;EventPropagators.accumulateEnterLeaveDispatches(leave,enter,fromID,toID);extractedEvents[0]=leave;extractedEvents[1]=enter;return extractedEvents}};module.exports=EnterLeaveEventPlugin},{"./EventConstants":17,"./EventPropagators":22,"./ReactMount":70,"./SyntheticMouseEvent":104,"./keyOf":148}],17:[function(require,module,exports){"use strict";var keyMirror=require("./keyMirror");var PropagationPhases=keyMirror({bubbled:null,captured:null});var topLevelTypes=keyMirror({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null});var EventConstants={topLevelTypes:topLevelTypes,PropagationPhases:PropagationPhases};module.exports=EventConstants},{"./keyMirror":147}],18:[function(require,module,exports){(function(process){var emptyFunction=require("./emptyFunction");var EventListener={listen:function(target,eventType,callback){if(target.addEventListener){target.addEventListener(eventType,callback,false);return{remove:function(){target.removeEventListener(eventType,callback,false)}}}else if(target.attachEvent){target.attachEvent("on"+eventType,callback);return{remove:function(){target.detachEvent("on"+eventType,callback)}}}},capture:function(target,eventType,callback){if(!target.addEventListener){if("production"!==process.env.NODE_ENV){console.error("Attempted to listen to events during the capture phase on a "+"browser that does not support the capture phase. Your application "+"will not receive some events.")}return{remove:emptyFunction}}else{target.addEventListener(eventType,callback,true);return{remove:function(){target.removeEventListener(eventType,callback,true)}}}},registerDefault:function(){}};module.exports=EventListener}).call(this,require("_process"))},{"./emptyFunction":122,_process:1}],19:[function(require,module,exports){(function(process){"use strict";var EventPluginRegistry=require("./EventPluginRegistry");var EventPluginUtils=require("./EventPluginUtils");var accumulateInto=require("./accumulateInto");var forEachAccumulated=require("./forEachAccumulated");var invariant=require("./invariant");var listenerBank={};var eventQueue=null;var executeDispatchesAndRelease=function(event){if(event){var executeDispatch=EventPluginUtils.executeDispatch;var PluginModule=EventPluginRegistry.getPluginModuleForEvent(event);if(PluginModule&&PluginModule.executeDispatch){executeDispatch=PluginModule.executeDispatch}EventPluginUtils.executeDispatchesInOrder(event,executeDispatch);if(!event.isPersistent()){event.constructor.release(event)}}};var InstanceHandle=null;function validateInstanceHandle(){var invalid=!InstanceHandle||!InstanceHandle.traverseTwoPhase||!InstanceHandle.traverseEnterLeave;if(invalid){throw new Error("InstanceHandle not injected before use!")}}var EventPluginHub={injection:{injectMount:EventPluginUtils.injection.injectMount,injectInstanceHandle:function(InjectedInstanceHandle){InstanceHandle=InjectedInstanceHandle;if("production"!==process.env.NODE_ENV){validateInstanceHandle()}},getInstanceHandle:function(){if("production"!==process.env.NODE_ENV){validateInstanceHandle()}return InstanceHandle},injectEventPluginOrder:EventPluginRegistry.injectEventPluginOrder,injectEventPluginsByName:EventPluginRegistry.injectEventPluginsByName},eventNameDispatchConfigs:EventPluginRegistry.eventNameDispatchConfigs,registrationNameModules:EventPluginRegistry.registrationNameModules,putListener:function(id,registrationName,listener){"production"!==process.env.NODE_ENV?invariant(!listener||typeof listener==="function","Expected %s listener to be a function, instead got type %s",registrationName,typeof listener):invariant(!listener||typeof listener==="function");var bankForRegistrationName=listenerBank[registrationName]||(listenerBank[registrationName]={});bankForRegistrationName[id]=listener},getListener:function(id,registrationName){var bankForRegistrationName=listenerBank[registrationName];return bankForRegistrationName&&bankForRegistrationName[id]},deleteListener:function(id,registrationName){var bankForRegistrationName=listenerBank[registrationName];if(bankForRegistrationName){delete bankForRegistrationName[id]}},deleteAllListeners:function(id){for(var registrationName in listenerBank){delete listenerBank[registrationName][id]}},extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var events;var plugins=EventPluginRegistry.plugins;for(var i=0,l=plugins.length;i<l;i++){var possiblePlugin=plugins[i];if(possiblePlugin){var extractedEvents=possiblePlugin.extractEvents(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent);if(extractedEvents){events=accumulateInto(events,extractedEvents)}}}return events},enqueueEvents:function(events){if(events){eventQueue=accumulateInto(eventQueue,events)}},processEventQueue:function(){var processingEventQueue=eventQueue;eventQueue=null;forEachAccumulated(processingEventQueue,executeDispatchesAndRelease);"production"!==process.env.NODE_ENV?invariant(!eventQueue,"processEventQueue(): Additional events were enqueued while processing "+"an event queue. Support for this has not yet been implemented."):invariant(!eventQueue)},__purge:function(){listenerBank={}},__getListenerBank:function(){return listenerBank}};module.exports=EventPluginHub}).call(this,require("_process"))},{"./EventPluginRegistry":20,"./EventPluginUtils":21,"./accumulateInto":110,"./forEachAccumulated":127,"./invariant":141,_process:1}],20:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");var EventPluginOrder=null;var namesToPlugins={};function recomputePluginOrdering(){if(!EventPluginOrder){return}for(var pluginName in namesToPlugins){var PluginModule=namesToPlugins[pluginName];var pluginIndex=EventPluginOrder.indexOf(pluginName);"production"!==process.env.NODE_ENV?invariant(pluginIndex>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in "+"the plugin ordering, `%s`.",pluginName):invariant(pluginIndex>-1);if(EventPluginRegistry.plugins[pluginIndex]){continue}"production"!==process.env.NODE_ENV?invariant(PluginModule.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` "+"method, but `%s` does not.",pluginName):invariant(PluginModule.extractEvents);EventPluginRegistry.plugins[pluginIndex]=PluginModule;var publishedEvents=PluginModule.eventTypes;for(var eventName in publishedEvents){"production"!==process.env.NODE_ENV?invariant(publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",eventName,pluginName):invariant(publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName))}}}function publishEventForPlugin(dispatchConfig,PluginModule,eventName){"production"!==process.env.NODE_ENV?invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName),"EventPluginHub: More than one plugin attempted to publish the same "+"event name, `%s`.",eventName):invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName));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){"production"!==process.env.NODE_ENV?invariant(!EventPluginRegistry.registrationNameModules[registrationName],"EventPluginHub: More than one plugin attempted to publish the same "+"registration name, `%s`.",registrationName):invariant(!EventPluginRegistry.registrationNameModules[registrationName]);EventPluginRegistry.registrationNameModules[registrationName]=PluginModule;EventPluginRegistry.registrationNameDependencies[registrationName]=PluginModule.eventTypes[eventName].dependencies}var EventPluginRegistry={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(InjectedEventPluginOrder){"production"!==process.env.NODE_ENV?invariant(!EventPluginOrder,"EventPluginRegistry: Cannot inject event plugin ordering more than "+"once. You are likely trying to load more than one copy of React."):invariant(!EventPluginOrder);EventPluginOrder=Array.prototype.slice.call(InjectedEventPluginOrder);recomputePluginOrdering()},injectEventPluginsByName:function(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){"production"!==process.env.NODE_ENV?invariant(!namesToPlugins[pluginName],"EventPluginRegistry: Cannot inject two different event plugins "+"using the same name, `%s`.",pluginName):invariant(!namesToPlugins[pluginName]);namesToPlugins[pluginName]=PluginModule;isOrderingDirty=true}}if(isOrderingDirty){recomputePluginOrdering()}},getPluginModuleForEvent:function(event){var dispatchConfig=event.dispatchConfig;if(dispatchConfig.registrationName){return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName]||null}for(var phase in dispatchConfig.phasedRegistrationNames){if(!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)){continue}var PluginModule=EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];if(PluginModule){return PluginModule}}return null},_resetEventPlugins:function(){EventPluginOrder=null;for(var pluginName in namesToPlugins){if(namesToPlugins.hasOwnProperty(pluginName)){delete namesToPlugins[pluginName]}}EventPluginRegistry.plugins.length=0;var eventNameDispatchConfigs=EventPluginRegistry.eventNameDispatchConfigs;for(var eventName in eventNameDispatchConfigs){if(eventNameDispatchConfigs.hasOwnProperty(eventName)){delete eventNameDispatchConfigs[eventName]}}var registrationNameModules=EventPluginRegistry.registrationNameModules;for(var registrationName in registrationNameModules){if(registrationNameModules.hasOwnProperty(registrationName)){delete registrationNameModules[registrationName]}}}};module.exports=EventPluginRegistry}).call(this,require("_process"))},{"./invariant":141,_process:1}],21:[function(require,module,exports){(function(process){"use strict";var EventConstants=require("./EventConstants");var invariant=require("./invariant");var injection={Mount:null,injectMount:function(InjectedMount){injection.Mount=InjectedMount;if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?invariant(InjectedMount&&InjectedMount.getNode,"EventPluginUtils.injection.injectMount(...): Injected Mount module "+"is missing getNode."):invariant(InjectedMount&&InjectedMount.getNode)}}};var topLevelTypes=EventConstants.topLevelTypes;function isEndish(topLevelType){return topLevelType===topLevelTypes.topMouseUp||topLevelType===topLevelTypes.topTouchEnd||topLevelType===topLevelTypes.topTouchCancel}function isMoveish(topLevelType){return topLevelType===topLevelTypes.topMouseMove||topLevelType===topLevelTypes.topTouchMove}function isStartish(topLevelType){return topLevelType===topLevelTypes.topMouseDown||topLevelType===topLevelTypes.topTouchStart}var validateEventDispatches;if("production"!==process.env.NODE_ENV){validateEventDispatches=function(event){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;var listenersIsArr=Array.isArray(dispatchListeners);var idsIsArr=Array.isArray(dispatchIDs);var IDsLen=idsIsArr?dispatchIDs.length:dispatchIDs?1:0;var listenersLen=listenersIsArr?dispatchListeners.length:dispatchListeners?1:0;"production"!==process.env.NODE_ENV?invariant(idsIsArr===listenersIsArr&&IDsLen===listenersLen,"EventPluginUtils: Invalid `event`."):invariant(idsIsArr===listenersIsArr&&IDsLen===listenersLen)}}function forEachEventDispatch(event,cb){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if("production"!==process.env.NODE_ENV){validateEventDispatches(event)}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break}cb(event,dispatchListeners[i],dispatchIDs[i])}}else if(dispatchListeners){cb(event,dispatchListeners,dispatchIDs)}}function executeDispatch(event,listener,domID){event.currentTarget=injection.Mount.getNode(domID);var returnValue=listener(event,domID);event.currentTarget=null;return returnValue}function executeDispatchesInOrder(event,executeDispatch){forEachEventDispatch(event,executeDispatch);event._dispatchListeners=null;event._dispatchIDs=null}function executeDispatchesInOrderStopAtTrueImpl(event){var dispatchListeners=event._dispatchListeners;var dispatchIDs=event._dispatchIDs;if("production"!==process.env.NODE_ENV){validateEventDispatches(event)}if(Array.isArray(dispatchListeners)){for(var i=0;i<dispatchListeners.length;i++){if(event.isPropagationStopped()){break}if(dispatchListeners[i](event,dispatchIDs[i])){return dispatchIDs[i]}}}else if(dispatchListeners){if(dispatchListeners(event,dispatchIDs)){return dispatchIDs}}return null}function executeDispatchesInOrderStopAtTrue(event){var ret=executeDispatchesInOrderStopAtTrueImpl(event);event._dispatchIDs=null;event._dispatchListeners=null;return ret}function executeDirectDispatch(event){if("production"!==process.env.NODE_ENV){validateEventDispatches(event)}var dispatchListener=event._dispatchListeners;var dispatchID=event._dispatchIDs;"production"!==process.env.NODE_ENV?invariant(!Array.isArray(dispatchListener),"executeDirectDispatch(...): Invalid `event`."):invariant(!Array.isArray(dispatchListener));var res=dispatchListener?dispatchListener(event,dispatchID):null;event._dispatchListeners=null;event._dispatchIDs=null;return res}function hasDispatches(event){return!!event._dispatchListeners}var EventPluginUtils={isEndish:isEndish,isMoveish:isMoveish,isStartish:isStartish,executeDirectDispatch:executeDirectDispatch,executeDispatch:executeDispatch,executeDispatchesInOrder:executeDispatchesInOrder,executeDispatchesInOrderStopAtTrue:executeDispatchesInOrderStopAtTrue,hasDispatches:hasDispatches,injection:injection,useTouchEvents:false};module.exports=EventPluginUtils}).call(this,require("_process"))},{"./EventConstants":17,"./invariant":141,_process:1}],22:[function(require,module,exports){(function(process){"use strict";var EventConstants=require("./EventConstants");var EventPluginHub=require("./EventPluginHub");var accumulateInto=require("./accumulateInto");var forEachAccumulated=require("./forEachAccumulated");var PropagationPhases=EventConstants.PropagationPhases;var getListener=EventPluginHub.getListener;function listenerAtPhase(id,event,propagationPhase){var registrationName=event.dispatchConfig.phasedRegistrationNames[propagationPhase];return getListener(id,registrationName)}function accumulateDirectionalDispatches(domID,upwards,event){if("production"!==process.env.NODE_ENV){if(!domID){throw new Error("Dispatching id must not be null")}}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)}}function accumulateTwoPhaseDispatchesSingle(event){if(event&&event.dispatchConfig.phasedRegistrationNames){EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker,accumulateDirectionalDispatches,event)}}function accumulateDispatches(id,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(id,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchIDs=accumulateInto(event._dispatchIDs,id)}}}function accumulateDirectDispatchesSingle(event){if(event&&event.dispatchConfig.registrationName){accumulateDispatches(event.dispatchMarker,null,event)}}function accumulateTwoPhaseDispatches(events){forEachAccumulated(events,accumulateTwoPhaseDispatchesSingle)}function accumulateEnterLeaveDispatches(leave,enter,fromID,toID){EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID,toID,accumulateDispatches,leave,enter)}function accumulateDirectDispatches(events){forEachAccumulated(events,accumulateDirectDispatchesSingle)}var EventPropagators={accumulateTwoPhaseDispatches:accumulateTwoPhaseDispatches,accumulateDirectDispatches:accumulateDirectDispatches,accumulateEnterLeaveDispatches:accumulateEnterLeaveDispatches};module.exports=EventPropagators}).call(this,require("_process"))},{"./EventConstants":17,"./EventPluginHub":19,"./accumulateInto":110,"./forEachAccumulated":127,_process:1}],23:[function(require,module,exports){"use strict";var canUseDOM=!!(typeof window!=="undefined"&&window.document&&window.document.createElement);var ExecutionEnvironment={canUseDOM:canUseDOM,canUseWorkers:typeof Worker!=="undefined",canUseEventListeners:canUseDOM&&!!(window.addEventListener||window.attachEvent),canUseViewport:canUseDOM&&!!window.screen,isInWorker:!canUseDOM};module.exports=ExecutionEnvironment},{}],24:[function(require,module,exports){"use strict";var DOMProperty=require("./DOMProperty");var ExecutionEnvironment=require("./ExecutionEnvironment");var MUST_USE_ATTRIBUTE=DOMProperty.injection.MUST_USE_ATTRIBUTE;var MUST_USE_PROPERTY=DOMProperty.injection.MUST_USE_PROPERTY;var HAS_BOOLEAN_VALUE=DOMProperty.injection.HAS_BOOLEAN_VALUE;var HAS_SIDE_EFFECTS=DOMProperty.injection.HAS_SIDE_EFFECTS;var HAS_NUMERIC_VALUE=DOMProperty.injection.HAS_NUMERIC_VALUE;var HAS_POSITIVE_NUMERIC_VALUE=DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;var HAS_OVERLOADED_BOOLEAN_VALUE=DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;var hasSVG;if(ExecutionEnvironment.canUseDOM){var implementation=document.implementation;hasSVG=implementation&&implementation.hasFeature&&implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var HTMLDOMPropertyConfig={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,allowTransparency:MUST_USE_ATTRIBUTE,alt:null,async:HAS_BOOLEAN_VALUE,autoComplete:null,autoPlay:HAS_BOOLEAN_VALUE,cellPadding:null,cellSpacing:null,charSet:MUST_USE_ATTRIBUTE,checked:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,classID:MUST_USE_ATTRIBUTE,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,dateTime:MUST_USE_ATTRIBUTE,defer:HAS_BOOLEAN_VALUE,dir:null,disabled:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,download:HAS_OVERLOADED_BOOLEAN_VALUE,draggable:null,encType:null,form:MUST_USE_ATTRIBUTE,formAction:MUST_USE_ATTRIBUTE,formEncType:MUST_USE_ATTRIBUTE,formMethod:MUST_USE_ATTRIBUTE,formNoValidate:HAS_BOOLEAN_VALUE,formTarget:MUST_USE_ATTRIBUTE,frameBorder:MUST_USE_ATTRIBUTE,height:MUST_USE_ATTRIBUTE,hidden:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:MUST_USE_PROPERTY,label:null,lang:null,list:MUST_USE_ATTRIBUTE,loop:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,manifest:MUST_USE_ATTRIBUTE,marginHeight:null,marginWidth:null,max:null,maxLength:MUST_USE_ATTRIBUTE,media:MUST_USE_ATTRIBUTE,mediaGroup:null,method:null,min:null,multiple:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,muted:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,name:null,noValidate:HAS_BOOLEAN_VALUE,open:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,rel:null,required:HAS_BOOLEAN_VALUE,role:MUST_USE_ATTRIBUTE,rows:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,selected:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,shape:null,size:MUST_USE_ATTRIBUTE|HAS_POSITIVE_NUMERIC_VALUE,sizes:MUST_USE_ATTRIBUTE,span:HAS_POSITIVE_NUMERIC_VALUE,spellCheck:null,src:null,srcDoc:MUST_USE_PROPERTY,srcSet:MUST_USE_ATTRIBUTE,start:HAS_NUMERIC_VALUE,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:MUST_USE_PROPERTY|HAS_SIDE_EFFECTS,width:MUST_USE_ATTRIBUTE,wmode:MUST_USE_ATTRIBUTE,autoCapitalize:null,autoCorrect:null,itemProp:MUST_USE_ATTRIBUTE,itemScope:MUST_USE_ATTRIBUTE|HAS_BOOLEAN_VALUE,itemType:MUST_USE_ATTRIBUTE,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};module.exports=HTMLDOMPropertyConfig},{"./DOMProperty":12,"./ExecutionEnvironment":23}],25:[function(require,module,exports){"use strict";var ReactLink=require("./ReactLink");var ReactStateSetters=require("./ReactStateSetters");var LinkedStateMixin={linkState:function(key){return new ReactLink(this.state[key],ReactStateSetters.createStateKeySetter(this,key))}};module.exports=LinkedStateMixin},{"./ReactLink":68,"./ReactStateSetters":85}],26:[function(require,module,exports){(function(process){"use strict";var ReactPropTypes=require("./ReactPropTypes");var invariant=require("./invariant");var hasReadOnlyValue={button:true,checkbox:true,image:true,hidden:true,radio:true,reset:true,submit:true};function _assertSingleLink(input){"production"!==process.env.NODE_ENV?invariant(input.props.checkedLink==null||input.props.valueLink==null,"Cannot provide a checkedLink and a valueLink. If you want to use "+"checkedLink, you probably don't want to use valueLink and vice versa."):invariant(input.props.checkedLink==null||input.props.valueLink==null)}function _assertValueLink(input){_assertSingleLink(input);"production"!==process.env.NODE_ENV?invariant(input.props.value==null&&input.props.onChange==null,"Cannot provide a valueLink and a value or onChange event. If you want "+"to use value or onChange, you probably don't want to use valueLink."):invariant(input.props.value==null&&input.props.onChange==null)}function _assertCheckedLink(input){_assertSingleLink(input);"production"!==process.env.NODE_ENV?invariant(input.props.checked==null&&input.props.onChange==null,"Cannot provide a checkedLink and a checked property or onChange event. "+"If you want to use checked or onChange, you probably don't want to "+"use checkedLink"):invariant(input.props.checked==null&&input.props.onChange==null)}function _handleLinkedValueChange(e){this.props.valueLink.requestChange(e.target.value)}function _handleLinkedCheckChange(e){this.props.checkedLink.requestChange(e.target.checked)}var LinkedValueUtils={Mixin:{propTypes:{value:function(props,propName,componentName){if(!props[propName]||hasReadOnlyValue[props.type]||props.onChange||props.readOnly||props.disabled){return}return new Error("You provided a `value` prop to a form field without an "+"`onChange` handler. This will render a read-only field. If "+"the field should be mutable use `defaultValue`. Otherwise, "+"set either `onChange` or `readOnly`.")},checked:function(props,propName,componentName){if(!props[propName]||props.onChange||props.readOnly||props.disabled){return}return new Error("You provided a `checked` prop to a form field without an "+"`onChange` handler. This will render a read-only field. If "+"the field should be mutable use `defaultChecked`. Otherwise, "+"set either `onChange` or `readOnly`.")},onChange:ReactPropTypes.func}},getValue:function(input){if(input.props.valueLink){_assertValueLink(input);return input.props.valueLink.value}return input.props.value},getChecked:function(input){if(input.props.checkedLink){_assertCheckedLink(input);return input.props.checkedLink.value}return input.props.checked},getOnChange:function(input){if(input.props.valueLink){_assertValueLink(input);return _handleLinkedValueChange}else if(input.props.checkedLink){_assertCheckedLink(input);return _handleLinkedCheckChange}return input.props.onChange}};module.exports=LinkedValueUtils}).call(this,require("_process"))},{"./ReactPropTypes":79,"./invariant":141,_process:1}],27:[function(require,module,exports){(function(process){"use strict";var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var accumulateInto=require("./accumulateInto");var forEachAccumulated=require("./forEachAccumulated");var invariant=require("./invariant");function remove(event){event.remove()}var LocalEventTrapMixin={trapBubbledEvent:function(topLevelType,handlerBaseName){"production"!==process.env.NODE_ENV?invariant(this.isMounted(),"Must be mounted to trap events"):invariant(this.isMounted());var listener=ReactBrowserEventEmitter.trapBubbledEvent(topLevelType,handlerBaseName,this.getDOMNode());this._localEventListeners=accumulateInto(this._localEventListeners,listener)},componentWillUnmount:function(){if(this._localEventListeners){forEachAccumulated(this._localEventListeners,remove)}}};module.exports=LocalEventTrapMixin}).call(this,require("_process"))},{"./ReactBrowserEventEmitter":33,"./accumulateInto":110,"./forEachAccumulated":127,"./invariant":141,_process:1}],28:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var emptyFunction=require("./emptyFunction");var topLevelTypes=EventConstants.topLevelTypes;var MobileSafariClickEventPlugin={eventTypes:null,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){if(topLevelType===topLevelTypes.topTouchStart){var target=nativeEvent.target;if(target&&!target.onclick){target.onclick=emptyFunction}}}};module.exports=MobileSafariClickEventPlugin},{"./EventConstants":17,"./emptyFunction":122}],29:[function(require,module,exports){function assign(target,sources){if(target==null){throw new TypeError("Object.assign target cannot be null or undefined")}var to=Object(target);var hasOwnProperty=Object.prototype.hasOwnProperty;for(var nextIndex=1;nextIndex<arguments.length;nextIndex++){var nextSource=arguments[nextIndex]; | |
if(nextSource==null){continue}var from=Object(nextSource);for(var key in from){if(hasOwnProperty.call(from,key)){to[key]=from[key]}}}return to}module.exports=assign},{}],30:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");var oneArgumentPooler=function(copyFieldsFrom){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,copyFieldsFrom);return instance}else{return new Klass(copyFieldsFrom)}};var twoArgumentPooler=function(a1,a2){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2);return instance}else{return new Klass(a1,a2)}};var threeArgumentPooler=function(a1,a2,a3){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2,a3);return instance}else{return new Klass(a1,a2,a3)}};var fiveArgumentPooler=function(a1,a2,a3,a4,a5){var Klass=this;if(Klass.instancePool.length){var instance=Klass.instancePool.pop();Klass.call(instance,a1,a2,a3,a4,a5);return instance}else{return new Klass(a1,a2,a3,a4,a5)}};var standardReleaser=function(instance){var Klass=this;"production"!==process.env.NODE_ENV?invariant(instance instanceof Klass,"Trying to release an instance into a pool of a different type."):invariant(instance instanceof Klass);if(instance.destructor){instance.destructor()}if(Klass.instancePool.length<Klass.poolSize){Klass.instancePool.push(instance)}};var DEFAULT_POOL_SIZE=10;var DEFAULT_POOLER=oneArgumentPooler;var addPoolingTo=function(CopyConstructor,pooler){var NewKlass=CopyConstructor;NewKlass.instancePool=[];NewKlass.getPooled=pooler||DEFAULT_POOLER;if(!NewKlass.poolSize){NewKlass.poolSize=DEFAULT_POOL_SIZE}NewKlass.release=standardReleaser;return NewKlass};var PooledClass={addPoolingTo:addPoolingTo,oneArgumentPooler:oneArgumentPooler,twoArgumentPooler:twoArgumentPooler,threeArgumentPooler:threeArgumentPooler,fiveArgumentPooler:fiveArgumentPooler};module.exports=PooledClass}).call(this,require("_process"))},{"./invariant":141,_process:1}],31:[function(require,module,exports){(function(process){"use strict";var DOMPropertyOperations=require("./DOMPropertyOperations");var EventPluginUtils=require("./EventPluginUtils");var ReactChildren=require("./ReactChildren");var ReactComponent=require("./ReactComponent");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactContext=require("./ReactContext");var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactElement=require("./ReactElement");var ReactElementValidator=require("./ReactElementValidator");var ReactDOM=require("./ReactDOM");var ReactDOMComponent=require("./ReactDOMComponent");var ReactDefaultInjection=require("./ReactDefaultInjection");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactLegacyElement=require("./ReactLegacyElement");var ReactMount=require("./ReactMount");var ReactMultiChild=require("./ReactMultiChild");var ReactPerf=require("./ReactPerf");var ReactPropTypes=require("./ReactPropTypes");var ReactServerRendering=require("./ReactServerRendering");var ReactTextComponent=require("./ReactTextComponent");var assign=require("./Object.assign");var deprecated=require("./deprecated");var onlyChild=require("./onlyChild");ReactDefaultInjection.inject();var createElement=ReactElement.createElement;var createFactory=ReactElement.createFactory;if("production"!==process.env.NODE_ENV){createElement=ReactElementValidator.createElement;createFactory=ReactElementValidator.createFactory}createElement=ReactLegacyElement.wrapCreateElement(createElement);createFactory=ReactLegacyElement.wrapCreateFactory(createFactory);var render=ReactPerf.measure("React","render",ReactMount.render);var React={Children:{map:ReactChildren.map,forEach:ReactChildren.forEach,count:ReactChildren.count,only:onlyChild},DOM:ReactDOM,PropTypes:ReactPropTypes,initializeTouchEvents:function(shouldUseTouch){EventPluginUtils.useTouchEvents=shouldUseTouch},createClass:ReactCompositeComponent.createClass,createElement:createElement,createFactory:createFactory,constructAndRenderComponent:ReactMount.constructAndRenderComponent,constructAndRenderComponentByID:ReactMount.constructAndRenderComponentByID,render:render,renderToString:ReactServerRendering.renderToString,renderToStaticMarkup:ReactServerRendering.renderToStaticMarkup,unmountComponentAtNode:ReactMount.unmountComponentAtNode,isValidClass:ReactLegacyElement.isValidClass,isValidElement:ReactElement.isValidElement,withContext:ReactContext.withContext,__spread:assign,renderComponent:deprecated("React","renderComponent","render",this,render),renderComponentToString:deprecated("React","renderComponentToString","renderToString",this,ReactServerRendering.renderToString),renderComponentToStaticMarkup:deprecated("React","renderComponentToStaticMarkup","renderToStaticMarkup",this,ReactServerRendering.renderToStaticMarkup),isValidComponent:deprecated("React","isValidComponent","isValidElement",this,ReactElement.isValidElement)};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=="undefined"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject==="function"){__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({Component:ReactComponent,CurrentOwner:ReactCurrentOwner,DOMComponent:ReactDOMComponent,DOMPropertyOperations:DOMPropertyOperations,InstanceHandles:ReactInstanceHandles,Mount:ReactMount,MultiChild:ReactMultiChild,TextComponent:ReactTextComponent})}if("production"!==process.env.NODE_ENV){var ExecutionEnvironment=require("./ExecutionEnvironment");if(ExecutionEnvironment.canUseDOM&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__==="undefined"){console.debug("Download the React DevTools for a better development experience: "+"http://fb.me/react-devtools")}}var expectedFeatures=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze];for(var i=0;i<expectedFeatures.length;i++){if(!expectedFeatures[i]){console.error("One or more ES5 shim/shams expected by React are not available: "+"http://fb.me/react-warning-polyfills");break}}}}React.version="0.12.2";module.exports=React}).call(this,require("_process"))},{"./DOMPropertyOperations":13,"./EventPluginUtils":21,"./ExecutionEnvironment":23,"./Object.assign":29,"./ReactChildren":36,"./ReactComponent":37,"./ReactCompositeComponent":40,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactDOM":43,"./ReactDOMComponent":45,"./ReactDefaultInjection":55,"./ReactElement":58,"./ReactElementValidator":59,"./ReactInstanceHandles":66,"./ReactLegacyElement":67,"./ReactMount":70,"./ReactMultiChild":71,"./ReactPerf":75,"./ReactPropTypes":79,"./ReactServerRendering":83,"./ReactTextComponent":87,"./deprecated":121,"./onlyChild":152,_process:1}],32:[function(require,module,exports){(function(process){"use strict";var ReactEmptyComponent=require("./ReactEmptyComponent");var ReactMount=require("./ReactMount");var invariant=require("./invariant");var ReactBrowserComponentMixin={getDOMNode:function(){"production"!==process.env.NODE_ENV?invariant(this.isMounted(),"getDOMNode(): A component must be mounted to have a DOM node."):invariant(this.isMounted());if(ReactEmptyComponent.isNullComponentID(this._rootNodeID)){return null}return ReactMount.getNode(this._rootNodeID)}};module.exports=ReactBrowserComponentMixin}).call(this,require("_process"))},{"./ReactEmptyComponent":60,"./ReactMount":70,"./invariant":141,_process:1}],33:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPluginHub=require("./EventPluginHub");var EventPluginRegistry=require("./EventPluginRegistry");var ReactEventEmitterMixin=require("./ReactEventEmitterMixin");var ViewportMetrics=require("./ViewportMetrics");var assign=require("./Object.assign");var isEventSupported=require("./isEventSupported");var alreadyListeningTo={};var isMonitoringScrollValue=false;var reactTopListenersCounter=0;var topEventMapping={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"};var topListenersIDKey="_reactListenersID"+String(Math.random()).slice(2);function getListeningForDocument(mountAt){if(!Object.prototype.hasOwnProperty.call(mountAt,topListenersIDKey)){mountAt[topListenersIDKey]=reactTopListenersCounter++;alreadyListeningTo[mountAt[topListenersIDKey]]={}}return alreadyListeningTo[mountAt[topListenersIDKey]]}var ReactBrowserEventEmitter=assign({},ReactEventEmitterMixin,{ReactEventListener:null,injection:{injectReactEventListener:function(ReactEventListener){ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);ReactBrowserEventEmitter.ReactEventListener=ReactEventListener}},setEnabled:function(enabled){if(ReactBrowserEventEmitter.ReactEventListener){ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled)}},isEnabled:function(){return!!(ReactBrowserEventEmitter.ReactEventListener&&ReactBrowserEventEmitter.ReactEventListener.isEnabled())},listenTo:function(registrationName,contentDocumentHandle){var mountAt=contentDocumentHandle;var isListening=getListeningForDocument(mountAt);var dependencies=EventPluginRegistry.registrationNameDependencies[registrationName];var topLevelTypes=EventConstants.topLevelTypes;for(var i=0,l=dependencies.length;i<l;i++){var dependency=dependencies[i];if(!(isListening.hasOwnProperty(dependency)&&isListening[dependency])){if(dependency===topLevelTypes.topWheel){if(isEventSupported("wheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"wheel",mountAt)}else if(isEventSupported("mousewheel")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"mousewheel",mountAt)}else{ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel,"DOMMouseScroll",mountAt)}}else if(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)}}else if(dependency===topLevelTypes.topFocus||dependency===topLevelTypes.topBlur){if(isEventSupported("focus",true)){ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus,"focus",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur,"blur",mountAt)}else if(isEventSupported("focusin")){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus,"focusin",mountAt);ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur,"focusout",mountAt)}isListening[topLevelTypes.topBlur]=true;isListening[topLevelTypes.topFocus]=true}else if(topEventMapping.hasOwnProperty(dependency)){ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency,topEventMapping[dependency],mountAt)}isListening[dependency]=true}}},trapBubbledEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType,handlerBaseName,handle)},trapCapturedEvent:function(topLevelType,handlerBaseName,handle){return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType,handlerBaseName,handle)},ensureScrollValueMonitoring:function(){if(!isMonitoringScrollValue){var refresh=ViewportMetrics.refreshScrollValues;ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);isMonitoringScrollValue=true}},eventNameDispatchConfigs:EventPluginHub.eventNameDispatchConfigs,registrationNameModules:EventPluginHub.registrationNameModules,putListener:EventPluginHub.putListener,getListener:EventPluginHub.getListener,deleteListener:EventPluginHub.deleteListener,deleteAllListeners:EventPluginHub.deleteAllListeners});module.exports=ReactBrowserEventEmitter},{"./EventConstants":17,"./EventPluginHub":19,"./EventPluginRegistry":20,"./Object.assign":29,"./ReactEventEmitterMixin":62,"./ViewportMetrics":109,"./isEventSupported":142}],34:[function(require,module,exports){"use strict";var React=require("./React");var assign=require("./Object.assign");var ReactTransitionGroup=React.createFactory(require("./ReactTransitionGroup"));var ReactCSSTransitionGroupChild=React.createFactory(require("./ReactCSSTransitionGroupChild"));var ReactCSSTransitionGroup=React.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:React.PropTypes.string.isRequired,transitionEnter:React.PropTypes.bool,transitionLeave:React.PropTypes.bool},getDefaultProps:function(){return{transitionEnter:true,transitionLeave:true}},_wrapChild:function(child){return ReactCSSTransitionGroupChild({name:this.props.transitionName,enter:this.props.transitionEnter,leave:this.props.transitionLeave},child)},render:function(){return ReactTransitionGroup(assign({},this.props,{childFactory:this._wrapChild}))}});module.exports=ReactCSSTransitionGroup},{"./Object.assign":29,"./React":31,"./ReactCSSTransitionGroupChild":35,"./ReactTransitionGroup":90}],35:[function(require,module,exports){(function(process){"use strict";var React=require("./React");var CSSCore=require("./CSSCore");var ReactTransitionEvents=require("./ReactTransitionEvents");var onlyChild=require("./onlyChild");var TICK=17;var NO_EVENT_TIMEOUT=5e3;var noEventListener=null;if("production"!==process.env.NODE_ENV){noEventListener=function(){console.warn("transition(): tried to perform an animation without "+"an animationend or transitionend event after timeout ("+NO_EVENT_TIMEOUT+"ms). You should either disable this "+"transition in JS or add a CSS animation/transition.")}}var ReactCSSTransitionGroupChild=React.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(animationType,finishCallback){var node=this.getDOMNode();var className=this.props.name+"-"+animationType;var activeClassName=className+"-active";var noEventTimeout=null;var endListener=function(e){if(e&&e.target!==node){return}if("production"!==process.env.NODE_ENV){clearTimeout(noEventTimeout)}CSSCore.removeClass(node,className);CSSCore.removeClass(node,activeClassName);ReactTransitionEvents.removeEndEventListener(node,endListener);finishCallback&&finishCallback()};ReactTransitionEvents.addEndEventListener(node,endListener);CSSCore.addClass(node,className);this.queueClass(activeClassName);if("production"!==process.env.NODE_ENV){noEventTimeout=setTimeout(noEventListener,NO_EVENT_TIMEOUT)}},queueClass:function(className){this.classNameQueue.push(className);if(!this.timeout){this.timeout=setTimeout(this.flushClassNameQueue,TICK)}},flushClassNameQueue:function(){if(this.isMounted()){this.classNameQueue.forEach(CSSCore.addClass.bind(CSSCore,this.getDOMNode()))}this.classNameQueue.length=0;this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){if(this.timeout){clearTimeout(this.timeout)}},componentWillEnter:function(done){if(this.props.enter){this.transition("enter",done)}else{done()}},componentWillLeave:function(done){if(this.props.leave){this.transition("leave",done)}else{done()}},render:function(){return onlyChild(this.props.children)}});module.exports=ReactCSSTransitionGroupChild}).call(this,require("_process"))},{"./CSSCore":4,"./React":31,"./ReactTransitionEvents":89,"./onlyChild":152,_process:1}],36:[function(require,module,exports){(function(process){"use strict";var PooledClass=require("./PooledClass");var traverseAllChildren=require("./traverseAllChildren");var warning=require("./warning");var twoArgumentPooler=PooledClass.twoArgumentPooler;var threeArgumentPooler=PooledClass.threeArgumentPooler;function ForEachBookKeeping(forEachFunction,forEachContext){this.forEachFunction=forEachFunction;this.forEachContext=forEachContext}PooledClass.addPoolingTo(ForEachBookKeeping,twoArgumentPooler);function forEachSingleChild(traverseContext,child,name,i){var forEachBookKeeping=traverseContext;forEachBookKeeping.forEachFunction.call(forEachBookKeeping.forEachContext,child,i)}function forEachChildren(children,forEachFunc,forEachContext){if(children==null){return children}var traverseContext=ForEachBookKeeping.getPooled(forEachFunc,forEachContext);traverseAllChildren(children,forEachSingleChild,traverseContext);ForEachBookKeeping.release(traverseContext)}function MapBookKeeping(mapResult,mapFunction,mapContext){this.mapResult=mapResult;this.mapFunction=mapFunction;this.mapContext=mapContext}PooledClass.addPoolingTo(MapBookKeeping,threeArgumentPooler);function mapSingleChildIntoContext(traverseContext,child,name,i){var mapBookKeeping=traverseContext;var mapResult=mapBookKeeping.mapResult;var keyUnique=!mapResult.hasOwnProperty(name);"production"!==process.env.NODE_ENV?warning(keyUnique,"ReactChildren.map(...): 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):null;if(keyUnique){var mappedChild=mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext,child,i);mapResult[name]=mappedChild}}function mapChildren(children,func,context){if(children==null){return children}var mapResult={};var traverseContext=MapBookKeeping.getPooled(mapResult,func,context);traverseAllChildren(children,mapSingleChildIntoContext,traverseContext);MapBookKeeping.release(traverseContext);return mapResult}function forEachSingleChildDummy(traverseContext,child,name,i){return null}function countChildren(children,context){return traverseAllChildren(children,forEachSingleChildDummy,null)}var ReactChildren={forEach:forEachChildren,map:mapChildren,count:countChildren};module.exports=ReactChildren}).call(this,require("_process"))},{"./PooledClass":30,"./traverseAllChildren":159,"./warning":161,_process:1}],37:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactOwner=require("./ReactOwner");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var invariant=require("./invariant");var keyMirror=require("./keyMirror");var ComponentLifeCycle=keyMirror({MOUNTED:null,UNMOUNTED:null});var injected=false;var unmountIDFromEnvironment=null;var mountImageIntoNode=null;var ReactComponent={injection:{injectEnvironment:function(ReactComponentEnvironment){"production"!==process.env.NODE_ENV?invariant(!injected,"ReactComponent: injectEnvironment() can only be called once."):invariant(!injected);mountImageIntoNode=ReactComponentEnvironment.mountImageIntoNode;unmountIDFromEnvironment=ReactComponentEnvironment.unmountIDFromEnvironment;ReactComponent.BackendIDOperations=ReactComponentEnvironment.BackendIDOperations;injected=true}},LifeCycle:ComponentLifeCycle,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===ComponentLifeCycle.MOUNTED},setProps:function(partialProps,callback){var element=this._pendingElement||this._currentElement;this.replaceProps(assign({},element.props,partialProps),callback)},replaceProps:function(props,callback){"production"!==process.env.NODE_ENV?invariant(this.isMounted(),"replaceProps(...): Can only update a mounted component."):invariant(this.isMounted());"production"!==process.env.NODE_ENV?invariant(this._mountDepth===0,"replaceProps(...): You called `setProps` or `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(this._mountDepth===0);this._pendingElement=ReactElement.cloneAndReplaceProps(this._pendingElement||this._currentElement,props);ReactUpdates.enqueueUpdate(this,callback)},_setPropsInternal:function(partialProps,callback){var element=this._pendingElement||this._currentElement;this._pendingElement=ReactElement.cloneAndReplaceProps(element,assign({},element.props,partialProps));ReactUpdates.enqueueUpdate(this,callback)},construct:function(element){this.props=element.props;this._owner=element._owner;this._lifeCycleState=ComponentLifeCycle.UNMOUNTED;this._pendingCallbacks=null;this._currentElement=element;this._pendingElement=null},mountComponent:function(rootID,transaction,mountDepth){"production"!==process.env.NODE_ENV?invariant(!this.isMounted(),"mountComponent(%s, ...): Can only mount an unmounted component. "+"Make sure to avoid storing components between renders or reusing a "+"single component instance in multiple places.",rootID):invariant(!this.isMounted());var ref=this._currentElement.ref;if(ref!=null){var owner=this._currentElement._owner;ReactOwner.addComponentAsRefTo(this,ref,owner)}this._rootNodeID=rootID;this._lifeCycleState=ComponentLifeCycle.MOUNTED;this._mountDepth=mountDepth},unmountComponent:function(){"production"!==process.env.NODE_ENV?invariant(this.isMounted(),"unmountComponent(): Can only unmount a mounted component."):invariant(this.isMounted());var ref=this._currentElement.ref;if(ref!=null){ReactOwner.removeComponentAsRefFrom(this,ref,this._owner)}unmountIDFromEnvironment(this._rootNodeID);this._rootNodeID=null;this._lifeCycleState=ComponentLifeCycle.UNMOUNTED},receiveComponent:function(nextElement,transaction){"production"!==process.env.NODE_ENV?invariant(this.isMounted(),"receiveComponent(...): Can only update a mounted component."):invariant(this.isMounted());this._pendingElement=nextElement;this.performUpdateIfNecessary(transaction)},performUpdateIfNecessary:function(transaction){if(this._pendingElement==null){return}var prevElement=this._currentElement;var nextElement=this._pendingElement;this._currentElement=nextElement;this.props=nextElement.props;this._owner=nextElement._owner;this._pendingElement=null;this.updateComponent(transaction,prevElement)},updateComponent:function(transaction,prevElement){var nextElement=this._currentElement;if(nextElement._owner!==prevElement._owner||nextElement.ref!==prevElement.ref){if(prevElement.ref!=null){ReactOwner.removeComponentAsRefFrom(this,prevElement.ref,prevElement._owner)}if(nextElement.ref!=null){ReactOwner.addComponentAsRefTo(this,nextElement.ref,nextElement._owner)}}},mountComponentIntoNode:function(rootID,container,shouldReuseMarkup){var transaction=ReactUpdates.ReactReconcileTransaction.getPooled();transaction.perform(this._mountComponentIntoNode,this,rootID,container,transaction,shouldReuseMarkup);ReactUpdates.ReactReconcileTransaction.release(transaction)},_mountComponentIntoNode:function(rootID,container,transaction,shouldReuseMarkup){var markup=this.mountComponent(rootID,transaction,0);mountImageIntoNode(markup,container,shouldReuseMarkup)},isOwnedBy:function(owner){return this._owner===owner},getSiblingByRef:function(ref){var owner=this._owner;if(!owner||!owner.refs){return null}return owner.refs[ref]}}};module.exports=ReactComponent}).call(this,require("_process"))},{"./Object.assign":29,"./ReactElement":58,"./ReactOwner":74,"./ReactUpdates":91,"./invariant":141,"./keyMirror":147,_process:1}],38:[function(require,module,exports){(function(process){"use strict";var ReactDOMIDOperations=require("./ReactDOMIDOperations");var ReactMarkupChecksum=require("./ReactMarkupChecksum");var ReactMount=require("./ReactMount");var ReactPerf=require("./ReactPerf");var ReactReconcileTransaction=require("./ReactReconcileTransaction");var getReactRootElementInContainer=require("./getReactRootElementInContainer");var invariant=require("./invariant");var setInnerHTML=require("./setInnerHTML");var ELEMENT_NODE_TYPE=1;var DOC_NODE_TYPE=9;var ReactComponentBrowserEnvironment={ReactReconcileTransaction:ReactReconcileTransaction,BackendIDOperations:ReactDOMIDOperations,unmountIDFromEnvironment:function(rootNodeID){ReactMount.purgeID(rootNodeID)},mountImageIntoNode:ReactPerf.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(markup,container,shouldReuseMarkup){"production"!==process.env.NODE_ENV?invariant(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE),"mountComponentIntoNode(...): Target container is not valid."):invariant(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE));if(shouldReuseMarkup){if(ReactMarkupChecksum.canReuseMarkup(markup,getReactRootElementInContainer(container))){return}else{"production"!==process.env.NODE_ENV?invariant(container.nodeType!==DOC_NODE_TYPE,"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."):invariant(container.nodeType!==DOC_NODE_TYPE);if("production"!==process.env.NODE_ENV){console.warn("React attempted to use 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.")}}}"production"!==process.env.NODE_ENV?invariant(container.nodeType!==DOC_NODE_TYPE,"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 renderComponentToString() for server rendering."):invariant(container.nodeType!==DOC_NODE_TYPE);setInnerHTML(container,markup)})};module.exports=ReactComponentBrowserEnvironment}).call(this,require("_process"))},{"./ReactDOMIDOperations":47,"./ReactMarkupChecksum":69,"./ReactMount":70,"./ReactPerf":75,"./ReactReconcileTransaction":81,"./getReactRootElementInContainer":135,"./invariant":141,"./setInnerHTML":155,_process:1}],39:[function(require,module,exports){"use strict";var shallowEqual=require("./shallowEqual");var ReactComponentWithPureRenderMixin={shouldComponentUpdate:function(nextProps,nextState){return!shallowEqual(this.props,nextProps)||!shallowEqual(this.state,nextState)}};module.exports=ReactComponentWithPureRenderMixin},{"./shallowEqual":156}],40:[function(require,module,exports){(function(process){"use strict";var ReactComponent=require("./ReactComponent");var ReactContext=require("./ReactContext");var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactElement=require("./ReactElement");var ReactElementValidator=require("./ReactElementValidator");var ReactEmptyComponent=require("./ReactEmptyComponent");var ReactErrorUtils=require("./ReactErrorUtils");var ReactLegacyElement=require("./ReactLegacyElement");var ReactOwner=require("./ReactOwner");var ReactPerf=require("./ReactPerf");var ReactPropTransferer=require("./ReactPropTransferer");var ReactPropTypeLocations=require("./ReactPropTypeLocations");var ReactPropTypeLocationNames=require("./ReactPropTypeLocationNames");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var instantiateReactComponent=require("./instantiateReactComponent");var invariant=require("./invariant");var keyMirror=require("./keyMirror");var keyOf=require("./keyOf");var monitorCodeUse=require("./monitorCodeUse");var mapObject=require("./mapObject");var shouldUpdateReactComponent=require("./shouldUpdateReactComponent");var warning=require("./warning");var MIXINS_KEY=keyOf({mixins:null});var SpecPolicy=keyMirror({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null});var injectedMixins=[];var ReactCompositeComponentInterface={mixins:SpecPolicy.DEFINE_MANY,statics:SpecPolicy.DEFINE_MANY,propTypes:SpecPolicy.DEFINE_MANY,contextTypes:SpecPolicy.DEFINE_MANY,childContextTypes:SpecPolicy.DEFINE_MANY,getDefaultProps:SpecPolicy.DEFINE_MANY_MERGED,getInitialState:SpecPolicy.DEFINE_MANY_MERGED,getChildContext:SpecPolicy.DEFINE_MANY_MERGED,render:SpecPolicy.DEFINE_ONCE,componentWillMount:SpecPolicy.DEFINE_MANY,componentDidMount:SpecPolicy.DEFINE_MANY,componentWillReceiveProps:SpecPolicy.DEFINE_MANY,shouldComponentUpdate:SpecPolicy.DEFINE_ONCE,componentWillUpdate:SpecPolicy.DEFINE_MANY,componentDidUpdate:SpecPolicy.DEFINE_MANY,componentWillUnmount:SpecPolicy.DEFINE_MANY,updateComponent:SpecPolicy.OVERRIDE_BASE};var RESERVED_SPEC_KEYS={displayName:function(Constructor,displayName){Constructor.displayName=displayName},mixins:function(Constructor,mixins){if(mixins){for(var i=0;i<mixins.length;i++){mixSpecIntoComponent(Constructor,mixins[i])}}},childContextTypes:function(Constructor,childContextTypes){validateTypeDef(Constructor,childContextTypes,ReactPropTypeLocations.childContext);Constructor.childContextTypes=assign({},Constructor.childContextTypes,childContextTypes)},contextTypes:function(Constructor,contextTypes){validateTypeDef(Constructor,contextTypes,ReactPropTypeLocations.context);Constructor.contextTypes=assign({},Constructor.contextTypes,contextTypes)},getDefaultProps:function(Constructor,getDefaultProps){if(Constructor.getDefaultProps){Constructor.getDefaultProps=createMergedResultFunction(Constructor.getDefaultProps,getDefaultProps)}else{Constructor.getDefaultProps=getDefaultProps}},propTypes:function(Constructor,propTypes){validateTypeDef(Constructor,propTypes,ReactPropTypeLocations.prop);Constructor.propTypes=assign({},Constructor.propTypes,propTypes)},statics:function(Constructor,statics){mixStaticSpecIntoComponent(Constructor,statics)}};function getDeclarationErrorAddendum(component){var owner=component._owner||null;if(owner&&owner.constructor&&owner.constructor.displayName){return" Check the render method of `"+owner.constructor.displayName+"`."}return""}function validateTypeDef(Constructor,typeDef,location){for(var propName in typeDef){if(typeDef.hasOwnProperty(propName)){"production"!==process.env.NODE_ENV?invariant(typeof typeDef[propName]=="function","%s: %s type `%s` is invalid; it must be a function, usually from "+"React.PropTypes.",Constructor.displayName||"ReactCompositeComponent",ReactPropTypeLocationNames[location],propName):invariant(typeof typeDef[propName]=="function")}}}function validateMethodOverride(proto,name){var specPolicy=ReactCompositeComponentInterface.hasOwnProperty(name)?ReactCompositeComponentInterface[name]:null;if(ReactCompositeComponentMixin.hasOwnProperty(name)){"production"!==process.env.NODE_ENV?invariant(specPolicy===SpecPolicy.OVERRIDE_BASE,"ReactCompositeComponentInterface: You are attempting to override "+"`%s` from your class specification. Ensure that your method names "+"do not overlap with React methods.",name):invariant(specPolicy===SpecPolicy.OVERRIDE_BASE)}if(proto.hasOwnProperty(name)){"production"!==process.env.NODE_ENV?invariant(specPolicy===SpecPolicy.DEFINE_MANY||specPolicy===SpecPolicy.DEFINE_MANY_MERGED,"ReactCompositeComponentInterface: You are attempting to define "+"`%s` on your component more than once. This conflict may be due "+"to a mixin.",name):invariant(specPolicy===SpecPolicy.DEFINE_MANY||specPolicy===SpecPolicy.DEFINE_MANY_MERGED) | |
}}function validateLifeCycleOnReplaceState(instance){var compositeLifeCycleState=instance._compositeLifeCycleState;"production"!==process.env.NODE_ENV?invariant(instance.isMounted()||compositeLifeCycleState===CompositeLifeCycle.MOUNTING,"replaceState(...): Can only update a mounted or mounting component."):invariant(instance.isMounted()||compositeLifeCycleState===CompositeLifeCycle.MOUNTING);"production"!==process.env.NODE_ENV?invariant(ReactCurrentOwner.current==null,"replaceState(...): Cannot update during an existing state transition "+"(such as within `render`). Render methods should be a pure function "+"of props and state."):invariant(ReactCurrentOwner.current==null);"production"!==process.env.NODE_ENV?invariant(compositeLifeCycleState!==CompositeLifeCycle.UNMOUNTING,"replaceState(...): Cannot update while unmounting component. This "+"usually means you called setState() on an unmounted component."):invariant(compositeLifeCycleState!==CompositeLifeCycle.UNMOUNTING)}function mixSpecIntoComponent(Constructor,spec){if(!spec){return}"production"!==process.env.NODE_ENV?invariant(!ReactLegacyElement.isValidFactory(spec),"ReactCompositeComponent: You're attempting to "+"use a component class as a mixin. Instead, just use a regular object."):invariant(!ReactLegacyElement.isValidFactory(spec));"production"!==process.env.NODE_ENV?invariant(!ReactElement.isValidElement(spec),"ReactCompositeComponent: You're attempting to "+"use a component as a mixin. Instead, just use a regular object."):invariant(!ReactElement.isValidElement(spec));var proto=Constructor.prototype;if(spec.hasOwnProperty(MIXINS_KEY)){RESERVED_SPEC_KEYS.mixins(Constructor,spec.mixins)}for(var name in spec){if(!spec.hasOwnProperty(name)){continue}if(name===MIXINS_KEY){continue}var property=spec[name];validateMethodOverride(proto,name);if(RESERVED_SPEC_KEYS.hasOwnProperty(name)){RESERVED_SPEC_KEYS[name](Constructor,property)}else{var isCompositeComponentMethod=ReactCompositeComponentInterface.hasOwnProperty(name);var isAlreadyDefined=proto.hasOwnProperty(name);var markedDontBind=property&&property.__reactDontBind;var isFunction=typeof property==="function";var shouldAutoBind=isFunction&&!isCompositeComponentMethod&&!isAlreadyDefined&&!markedDontBind;if(shouldAutoBind){if(!proto.__reactAutoBindMap){proto.__reactAutoBindMap={}}proto.__reactAutoBindMap[name]=property;proto[name]=property}else{if(isAlreadyDefined){var specPolicy=ReactCompositeComponentInterface[name];"production"!==process.env.NODE_ENV?invariant(isCompositeComponentMethod&&(specPolicy===SpecPolicy.DEFINE_MANY_MERGED||specPolicy===SpecPolicy.DEFINE_MANY),"ReactCompositeComponent: Unexpected spec policy %s for key %s "+"when mixing in component specs.",specPolicy,name):invariant(isCompositeComponentMethod&&(specPolicy===SpecPolicy.DEFINE_MANY_MERGED||specPolicy===SpecPolicy.DEFINE_MANY));if(specPolicy===SpecPolicy.DEFINE_MANY_MERGED){proto[name]=createMergedResultFunction(proto[name],property)}else if(specPolicy===SpecPolicy.DEFINE_MANY){proto[name]=createChainedFunction(proto[name],property)}}else{proto[name]=property;if("production"!==process.env.NODE_ENV){if(typeof property==="function"&&spec.displayName){proto[name].displayName=spec.displayName+"_"+name}}}}}}}function mixStaticSpecIntoComponent(Constructor,statics){if(!statics){return}for(var name in statics){var property=statics[name];if(!statics.hasOwnProperty(name)){continue}var isReserved=name in RESERVED_SPEC_KEYS;"production"!==process.env.NODE_ENV?invariant(!isReserved,"ReactCompositeComponent: 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(!isReserved);var isInherited=name in Constructor;"production"!==process.env.NODE_ENV?invariant(!isInherited,"ReactCompositeComponent: You are attempting to define "+"`%s` on your component more than once. This conflict may be "+"due to a mixin.",name):invariant(!isInherited);Constructor[name]=property}}function mergeObjectsWithNoDuplicateKeys(one,two){"production"!==process.env.NODE_ENV?invariant(one&&two&&typeof one==="object"&&typeof two==="object","mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"):invariant(one&&two&&typeof one==="object"&&typeof two==="object");mapObject(two,function(value,key){"production"!==process.env.NODE_ENV?invariant(one[key]===undefined,"mergeObjectsWithNoDuplicateKeys(): "+"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(one[key]===undefined);one[key]=value});return one}function createMergedResultFunction(one,two){return function mergedResult(){var a=one.apply(this,arguments);var b=two.apply(this,arguments);if(a==null){return b}else if(b==null){return a}return mergeObjectsWithNoDuplicateKeys(a,b)}}function createChainedFunction(one,two){return function chainedFunction(){one.apply(this,arguments);two.apply(this,arguments)}}var CompositeLifeCycle=keyMirror({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null});var ReactCompositeComponentMixin={construct:function(element){ReactComponent.Mixin.construct.apply(this,arguments);ReactOwner.Mixin.construct.apply(this,arguments);this.state=null;this._pendingState=null;this.context=null;this._compositeLifeCycleState=null},isMounted:function(){return ReactComponent.Mixin.isMounted.call(this)&&this._compositeLifeCycleState!==CompositeLifeCycle.MOUNTING},mountComponent:ReactPerf.measure("ReactCompositeComponent","mountComponent",function(rootID,transaction,mountDepth){ReactComponent.Mixin.mountComponent.call(this,rootID,transaction,mountDepth);this._compositeLifeCycleState=CompositeLifeCycle.MOUNTING;if(this.__reactAutoBindMap){this._bindAutoBindMethods()}this.context=this._processContext(this._currentElement._context);this.props=this._processProps(this.props);this.state=this.getInitialState?this.getInitialState():null;"production"!==process.env.NODE_ENV?invariant(typeof this.state==="object"&&!Array.isArray(this.state),"%s.getInitialState(): must return an object or null",this.constructor.displayName||"ReactCompositeComponent"):invariant(typeof this.state==="object"&&!Array.isArray(this.state));this._pendingState=null;this._pendingForceUpdate=false;if(this.componentWillMount){this.componentWillMount();if(this._pendingState){this.state=this._pendingState;this._pendingState=null}}this._renderedComponent=instantiateReactComponent(this._renderValidatedComponent(),this._currentElement.type);this._compositeLifeCycleState=null;var markup=this._renderedComponent.mountComponent(rootID,transaction,mountDepth+1);if(this.componentDidMount){transaction.getReactMountReady().enqueue(this.componentDidMount,this)}return markup}),unmountComponent:function(){this._compositeLifeCycleState=CompositeLifeCycle.UNMOUNTING;if(this.componentWillUnmount){this.componentWillUnmount()}this._compositeLifeCycleState=null;this._renderedComponent.unmountComponent();this._renderedComponent=null;ReactComponent.Mixin.unmountComponent.call(this)},setState:function(partialState,callback){"production"!==process.env.NODE_ENV?invariant(typeof partialState==="object"||partialState==null,"setState(...): takes an object of state variables to update."):invariant(typeof partialState==="object"||partialState==null);if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(partialState!=null,"setState(...): You passed an undefined or null state object; "+"instead, use forceUpdate()."):null}this.replaceState(assign({},this._pendingState||this.state,partialState),callback)},replaceState:function(completeState,callback){validateLifeCycleOnReplaceState(this);this._pendingState=completeState;if(this._compositeLifeCycleState!==CompositeLifeCycle.MOUNTING){ReactUpdates.enqueueUpdate(this,callback)}},_processContext:function(context){var maskedContext=null;var contextTypes=this.constructor.contextTypes;if(contextTypes){maskedContext={};for(var contextName in contextTypes){maskedContext[contextName]=context[contextName]}if("production"!==process.env.NODE_ENV){this._checkPropTypes(contextTypes,maskedContext,ReactPropTypeLocations.context)}}return maskedContext},_processChildContext:function(currentContext){var childContext=this.getChildContext&&this.getChildContext();var displayName=this.constructor.displayName||"ReactCompositeComponent";if(childContext){"production"!==process.env.NODE_ENV?invariant(typeof this.constructor.childContextTypes==="object","%s.getChildContext(): childContextTypes must be defined in order to "+"use getChildContext().",displayName):invariant(typeof this.constructor.childContextTypes==="object");if("production"!==process.env.NODE_ENV){this._checkPropTypes(this.constructor.childContextTypes,childContext,ReactPropTypeLocations.childContext)}for(var name in childContext){"production"!==process.env.NODE_ENV?invariant(name in this.constructor.childContextTypes,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',displayName,name):invariant(name in this.constructor.childContextTypes)}return assign({},currentContext,childContext)}return currentContext},_processProps:function(newProps){if("production"!==process.env.NODE_ENV){var propTypes=this.constructor.propTypes;if(propTypes){this._checkPropTypes(propTypes,newProps,ReactPropTypeLocations.prop)}}return newProps},_checkPropTypes:function(propTypes,props,location){var componentName=this.constructor.displayName;for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error=propTypes[propName](props,propName,componentName,location);if(error instanceof Error){var addendum=getDeclarationErrorAddendum(this);"production"!==process.env.NODE_ENV?warning(false,error.message+addendum):null}}}},performUpdateIfNecessary:function(transaction){var compositeLifeCycleState=this._compositeLifeCycleState;if(compositeLifeCycleState===CompositeLifeCycle.MOUNTING||compositeLifeCycleState===CompositeLifeCycle.RECEIVING_PROPS){return}if(this._pendingElement==null&&this._pendingState==null&&!this._pendingForceUpdate){return}var nextContext=this.context;var nextProps=this.props;var nextElement=this._currentElement;if(this._pendingElement!=null){nextElement=this._pendingElement;nextContext=this._processContext(nextElement._context);nextProps=this._processProps(nextElement.props);this._pendingElement=null;this._compositeLifeCycleState=CompositeLifeCycle.RECEIVING_PROPS;if(this.componentWillReceiveProps){this.componentWillReceiveProps(nextProps,nextContext)}}this._compositeLifeCycleState=null;var nextState=this._pendingState||this.state;this._pendingState=null;var shouldUpdate=this._pendingForceUpdate||!this.shouldComponentUpdate||this.shouldComponentUpdate(nextProps,nextState,nextContext);if("production"!==process.env.NODE_ENV){if(typeof shouldUpdate==="undefined"){console.warn((this.constructor.displayName||"ReactCompositeComponent")+".shouldComponentUpdate(): Returned undefined instead of a "+"boolean value. Make sure to return true or false.")}}if(shouldUpdate){this._pendingForceUpdate=false;this._performComponentUpdate(nextElement,nextProps,nextState,nextContext,transaction)}else{this._currentElement=nextElement;this.props=nextProps;this.state=nextState;this.context=nextContext;this._owner=nextElement._owner}},_performComponentUpdate:function(nextElement,nextProps,nextState,nextContext,transaction){var prevElement=this._currentElement;var prevProps=this.props;var prevState=this.state;var prevContext=this.context;if(this.componentWillUpdate){this.componentWillUpdate(nextProps,nextState,nextContext)}this._currentElement=nextElement;this.props=nextProps;this.state=nextState;this.context=nextContext;this._owner=nextElement._owner;this.updateComponent(transaction,prevElement);if(this.componentDidUpdate){transaction.getReactMountReady().enqueue(this.componentDidUpdate.bind(this,prevProps,prevState,prevContext),this)}},receiveComponent:function(nextElement,transaction){if(nextElement===this._currentElement&&nextElement._owner!=null){return}ReactComponent.Mixin.receiveComponent.call(this,nextElement,transaction)},updateComponent:ReactPerf.measure("ReactCompositeComponent","updateComponent",function(transaction,prevParentElement){ReactComponent.Mixin.updateComponent.call(this,transaction,prevParentElement);var prevComponentInstance=this._renderedComponent;var prevElement=prevComponentInstance._currentElement;var nextElement=this._renderValidatedComponent();if(shouldUpdateReactComponent(prevElement,nextElement)){prevComponentInstance.receiveComponent(nextElement,transaction)}else{var thisID=this._rootNodeID;var prevComponentID=prevComponentInstance._rootNodeID;prevComponentInstance.unmountComponent();this._renderedComponent=instantiateReactComponent(nextElement,this._currentElement.type);var nextMarkup=this._renderedComponent.mountComponent(thisID,transaction,this._mountDepth+1);ReactComponent.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(prevComponentID,nextMarkup)}}),forceUpdate:function(callback){var compositeLifeCycleState=this._compositeLifeCycleState;"production"!==process.env.NODE_ENV?invariant(this.isMounted()||compositeLifeCycleState===CompositeLifeCycle.MOUNTING,"forceUpdate(...): Can only force an update on mounted or mounting "+"components."):invariant(this.isMounted()||compositeLifeCycleState===CompositeLifeCycle.MOUNTING);"production"!==process.env.NODE_ENV?invariant(compositeLifeCycleState!==CompositeLifeCycle.UNMOUNTING&&ReactCurrentOwner.current==null,"forceUpdate(...): Cannot force an update while unmounting component "+"or within a `render` function."):invariant(compositeLifeCycleState!==CompositeLifeCycle.UNMOUNTING&&ReactCurrentOwner.current==null);this._pendingForceUpdate=true;ReactUpdates.enqueueUpdate(this,callback)},_renderValidatedComponent:ReactPerf.measure("ReactCompositeComponent","_renderValidatedComponent",function(){var renderedComponent;var previousContext=ReactContext.current;ReactContext.current=this._processChildContext(this._currentElement._context);ReactCurrentOwner.current=this;try{renderedComponent=this.render();if(renderedComponent===null||renderedComponent===false){renderedComponent=ReactEmptyComponent.getEmptyComponent();ReactEmptyComponent.registerNullComponentID(this._rootNodeID)}else{ReactEmptyComponent.deregisterNullComponentID(this._rootNodeID)}}finally{ReactContext.current=previousContext;ReactCurrentOwner.current=null}"production"!==process.env.NODE_ENV?invariant(ReactElement.isValidElement(renderedComponent),"%s.render(): A valid ReactComponent must be returned. You may have "+"returned undefined, an array or some other invalid object.",this.constructor.displayName||"ReactCompositeComponent"):invariant(ReactElement.isValidElement(renderedComponent));return renderedComponent}),_bindAutoBindMethods:function(){for(var autoBindKey in this.__reactAutoBindMap){if(!this.__reactAutoBindMap.hasOwnProperty(autoBindKey)){continue}var method=this.__reactAutoBindMap[autoBindKey];this[autoBindKey]=this._bindAutoBindMethod(ReactErrorUtils.guard(method,this.constructor.displayName+"."+autoBindKey))}},_bindAutoBindMethod:function(method){var component=this;var boundMethod=method.bind(component);if("production"!==process.env.NODE_ENV){boundMethod.__reactBoundContext=component;boundMethod.__reactBoundMethod=method;boundMethod.__reactBoundArguments=null;var componentName=component.constructor.displayName;var _bind=boundMethod.bind;boundMethod.bind=function(newThis){for(var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++)args.push(arguments[$__0]);if(newThis!==component&&newThis!==null){monitorCodeUse("react_bind_warning",{component:componentName});console.warn("bind(): React component methods may only be bound to the "+"component instance. See "+componentName)}else if(!args.length){monitorCodeUse("react_bind_warning",{component:componentName});console.warn("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 "+componentName);return boundMethod}var reboundMethod=_bind.apply(boundMethod,arguments);reboundMethod.__reactBoundContext=component;reboundMethod.__reactBoundMethod=method;reboundMethod.__reactBoundArguments=args;return reboundMethod}}return boundMethod}};var ReactCompositeComponentBase=function(){};assign(ReactCompositeComponentBase.prototype,ReactComponent.Mixin,ReactOwner.Mixin,ReactPropTransferer.Mixin,ReactCompositeComponentMixin);var ReactCompositeComponent={LifeCycle:CompositeLifeCycle,Base:ReactCompositeComponentBase,createClass:function(spec){var Constructor=function(props){};Constructor.prototype=new ReactCompositeComponentBase;Constructor.prototype.constructor=Constructor;injectedMixins.forEach(mixSpecIntoComponent.bind(null,Constructor));mixSpecIntoComponent(Constructor,spec);if(Constructor.getDefaultProps){Constructor.defaultProps=Constructor.getDefaultProps()}"production"!==process.env.NODE_ENV?invariant(Constructor.prototype.render,"createClass(...): Class specification must implement a `render` method."):invariant(Constructor.prototype.render);if("production"!==process.env.NODE_ENV){if(Constructor.prototype.componentShouldUpdate){monitorCodeUse("react_component_should_update_warning",{component:spec.displayName});console.warn((spec.displayName||"A component")+" 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.")}}for(var methodName in ReactCompositeComponentInterface){if(!Constructor.prototype[methodName]){Constructor.prototype[methodName]=null}}if("production"!==process.env.NODE_ENV){return ReactLegacyElement.wrapFactory(ReactElementValidator.createFactory(Constructor))}return ReactLegacyElement.wrapFactory(ReactElement.createFactory(Constructor))},injection:{injectMixin:function(mixin){injectedMixins.push(mixin)}}};module.exports=ReactCompositeComponent}).call(this,require("_process"))},{"./Object.assign":29,"./ReactComponent":37,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactElementValidator":59,"./ReactEmptyComponent":60,"./ReactErrorUtils":61,"./ReactLegacyElement":67,"./ReactOwner":74,"./ReactPerf":75,"./ReactPropTransferer":76,"./ReactPropTypeLocationNames":77,"./ReactPropTypeLocations":78,"./ReactUpdates":91,"./instantiateReactComponent":140,"./invariant":141,"./keyMirror":147,"./keyOf":148,"./mapObject":149,"./monitorCodeUse":151,"./shouldUpdateReactComponent":157,"./warning":161,_process:1}],41:[function(require,module,exports){"use strict";var assign=require("./Object.assign");var ReactContext={current:{},withContext:function(newContext,scopedCallback){var result;var previousContext=ReactContext.current;ReactContext.current=assign({},previousContext,newContext);try{result=scopedCallback()}finally{ReactContext.current=previousContext}return result}};module.exports=ReactContext},{"./Object.assign":29}],42:[function(require,module,exports){"use strict";var ReactCurrentOwner={current:null};module.exports=ReactCurrentOwner},{}],43:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactElementValidator=require("./ReactElementValidator");var ReactLegacyElement=require("./ReactLegacyElement");var mapObject=require("./mapObject");function createDOMFactory(tag){if("production"!==process.env.NODE_ENV){return ReactLegacyElement.markNonLegacyFactory(ReactElementValidator.createFactory(tag))}return ReactLegacyElement.markNonLegacyFactory(ReactElement.createFactory(tag))}var ReactDOM=mapObject({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},createDOMFactory);module.exports=ReactDOM}).call(this,require("_process"))},{"./ReactElement":58,"./ReactElementValidator":59,"./ReactLegacyElement":67,"./mapObject":149,_process:1}],44:[function(require,module,exports){"use strict";var AutoFocusMixin=require("./AutoFocusMixin");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var keyMirror=require("./keyMirror");var button=ReactElement.createFactory(ReactDOM.button.type);var mouseListenerNames=keyMirror({onClick:true,onDoubleClick:true,onMouseDown:true,onMouseMove:true,onMouseUp:true,onClickCapture:true,onDoubleClickCapture:true,onMouseDownCapture:true,onMouseMoveCapture:true,onMouseUpCapture:true});var ReactDOMButton=ReactCompositeComponent.createClass({displayName:"ReactDOMButton",mixins:[AutoFocusMixin,ReactBrowserComponentMixin],render:function(){var props={};for(var key in this.props){if(this.props.hasOwnProperty(key)&&(!this.props.disabled||!mouseListenerNames[key])){props[key]=this.props[key]}}return button(props,this.props.children)}});module.exports=ReactDOMButton},{"./AutoFocusMixin":2,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58,"./keyMirror":147}],45:[function(require,module,exports){(function(process){"use strict";var CSSPropertyOperations=require("./CSSPropertyOperations");var DOMProperty=require("./DOMProperty");var DOMPropertyOperations=require("./DOMPropertyOperations");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactComponent=require("./ReactComponent");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactMount=require("./ReactMount");var ReactMultiChild=require("./ReactMultiChild");var ReactPerf=require("./ReactPerf");var assign=require("./Object.assign");var escapeTextForBrowser=require("./escapeTextForBrowser");var invariant=require("./invariant");var isEventSupported=require("./isEventSupported");var keyOf=require("./keyOf");var monitorCodeUse=require("./monitorCodeUse");var deleteListener=ReactBrowserEventEmitter.deleteListener;var listenTo=ReactBrowserEventEmitter.listenTo;var registrationNameModules=ReactBrowserEventEmitter.registrationNameModules;var CONTENT_TYPES={string:true,number:true};var STYLE=keyOf({style:null});var ELEMENT_NODE_TYPE=1;function assertValidProps(props){if(!props){return}"production"!==process.env.NODE_ENV?invariant(props.children==null||props.dangerouslySetInnerHTML==null,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):invariant(props.children==null||props.dangerouslySetInnerHTML==null);if("production"!==process.env.NODE_ENV){if(props.contentEditable&&props.children!=null){console.warn("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.")}}"production"!==process.env.NODE_ENV?invariant(props.style==null||typeof props.style==="object","The `style` prop expects a mapping from style properties to values, "+"not a string."):invariant(props.style==null||typeof props.style==="object")}function putListener(id,registrationName,listener,transaction){if("production"!==process.env.NODE_ENV){if(registrationName==="onScroll"&&!isEventSupported("scroll",true)){monitorCodeUse("react_no_scroll_event");console.warn("This browser doesn't support the `onScroll` event")}}var container=ReactMount.findReactContainerForID(id);if(container){var doc=container.nodeType===ELEMENT_NODE_TYPE?container.ownerDocument:container;listenTo(registrationName,doc)}transaction.getPutListenerQueue().enqueuePutListener(id,registrationName,listener)}var omittedCloseTags={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};var VALID_TAG_REGEX=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;var validatedTagCache={};var hasOwnProperty={}.hasOwnProperty;function validateDangerousTag(tag){if(!hasOwnProperty.call(validatedTagCache,tag)){"production"!==process.env.NODE_ENV?invariant(VALID_TAG_REGEX.test(tag),"Invalid tag: %s",tag):invariant(VALID_TAG_REGEX.test(tag));validatedTagCache[tag]=true}}function ReactDOMComponent(tag){validateDangerousTag(tag);this._tag=tag;this.tagName=tag.toUpperCase()}ReactDOMComponent.displayName="ReactDOMComponent";ReactDOMComponent.Mixin={mountComponent:ReactPerf.measure("ReactDOMComponent","mountComponent",function(rootID,transaction,mountDepth){ReactComponent.Mixin.mountComponent.call(this,rootID,transaction,mountDepth);assertValidProps(this.props);var closeTag=omittedCloseTags[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(transaction)+this._createContentMarkup(transaction)+closeTag}),_createOpenTagMarkupAndPutListeners:function(transaction){var props=this.props;var ret="<"+this._tag;for(var propKey in props){if(!props.hasOwnProperty(propKey)){continue}var propValue=props[propKey];if(propValue==null){continue}if(registrationNameModules.hasOwnProperty(propKey)){putListener(this._rootNodeID,propKey,propValue,transaction)}else{if(propKey===STYLE){if(propValue){propValue=props.style=assign({},props.style)}propValue=CSSPropertyOperations.createMarkupForStyles(propValue)}var markup=DOMPropertyOperations.createMarkupForProperty(propKey,propValue);if(markup){ret+=" "+markup}}}if(transaction.renderToStaticMarkup){return ret+">"}var markupForID=DOMPropertyOperations.createMarkupForID(this._rootNodeID);return ret+" "+markupForID+">"},_createContentMarkup:function(transaction){var innerHTML=this.props.dangerouslySetInnerHTML;if(innerHTML!=null){if(innerHTML.__html!=null){return innerHTML.__html}}else{var contentToUse=CONTENT_TYPES[typeof this.props.children]?this.props.children:null;var childrenToUse=contentToUse!=null?null:this.props.children;if(contentToUse!=null){return escapeTextForBrowser(contentToUse)}else if(childrenToUse!=null){var mountImages=this.mountChildren(childrenToUse,transaction);return mountImages.join("")}}return""},receiveComponent:function(nextElement,transaction){if(nextElement===this._currentElement&&nextElement._owner!=null){return}ReactComponent.Mixin.receiveComponent.call(this,nextElement,transaction)},updateComponent:ReactPerf.measure("ReactDOMComponent","updateComponent",function(transaction,prevElement){assertValidProps(this._currentElement.props);ReactComponent.Mixin.updateComponent.call(this,transaction,prevElement);this._updateDOMProperties(prevElement.props,transaction);this._updateDOMChildren(prevElement.props,transaction)}),_updateDOMProperties:function(lastProps,transaction){var nextProps=this.props;var propKey;var styleName;var styleUpdates;for(propKey in lastProps){if(nextProps.hasOwnProperty(propKey)||!lastProps.hasOwnProperty(propKey)){continue}if(propKey===STYLE){var lastStyle=lastProps[propKey];for(styleName in lastStyle){if(lastStyle.hasOwnProperty(styleName)){styleUpdates=styleUpdates||{};styleUpdates[styleName]=""}}}else if(registrationNameModules.hasOwnProperty(propKey)){deleteListener(this._rootNodeID,propKey)}else if(DOMProperty.isStandardName[propKey]||DOMProperty.isCustomAttribute(propKey)){ReactComponent.BackendIDOperations.deletePropertyByID(this._rootNodeID,propKey)}}for(propKey in nextProps){var nextProp=nextProps[propKey];var lastProp=lastProps[propKey];if(!nextProps.hasOwnProperty(propKey)||nextProp===lastProp){continue}if(propKey===STYLE){if(nextProp){nextProp=nextProps.style=assign({},nextProp)}if(lastProp){for(styleName in lastProp){if(lastProp.hasOwnProperty(styleName)&&(!nextProp||!nextProp.hasOwnProperty(styleName))){styleUpdates=styleUpdates||{};styleUpdates[styleName]=""}}for(styleName in nextProp){if(nextProp.hasOwnProperty(styleName)&&lastProp[styleName]!==nextProp[styleName]){styleUpdates=styleUpdates||{};styleUpdates[styleName]=nextProp[styleName]}}}else{styleUpdates=nextProp}}else if(registrationNameModules.hasOwnProperty(propKey)){putListener(this._rootNodeID,propKey,nextProp,transaction)}else if(DOMProperty.isStandardName[propKey]||DOMProperty.isCustomAttribute(propKey)){ReactComponent.BackendIDOperations.updatePropertyByID(this._rootNodeID,propKey,nextProp)}}if(styleUpdates){ReactComponent.BackendIDOperations.updateStylesByID(this._rootNodeID,styleUpdates)}},_updateDOMChildren:function(lastProps,transaction){var nextProps=this.props;var lastContent=CONTENT_TYPES[typeof lastProps.children]?lastProps.children:null;var nextContent=CONTENT_TYPES[typeof nextProps.children]?nextProps.children:null;var lastHtml=lastProps.dangerouslySetInnerHTML&&lastProps.dangerouslySetInnerHTML.__html;var nextHtml=nextProps.dangerouslySetInnerHTML&&nextProps.dangerouslySetInnerHTML.__html;var lastChildren=lastContent!=null?null:lastProps.children;var nextChildren=nextContent!=null?null:nextProps.children;var lastHasContentOrHtml=lastContent!=null||lastHtml!=null;var nextHasContentOrHtml=nextContent!=null||nextHtml!=null;if(lastChildren!=null&&nextChildren==null){this.updateChildren(null,transaction)}else if(lastHasContentOrHtml&&!nextHasContentOrHtml){this.updateTextContent("")}if(nextContent!=null){if(lastContent!==nextContent){this.updateTextContent(""+nextContent)}}else if(nextHtml!=null){if(lastHtml!==nextHtml){ReactComponent.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,nextHtml)}}else if(nextChildren!=null){this.updateChildren(nextChildren,transaction)}},unmountComponent:function(){this.unmountChildren();ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID);ReactComponent.Mixin.unmountComponent.call(this)}};assign(ReactDOMComponent.prototype,ReactComponent.Mixin,ReactDOMComponent.Mixin,ReactMultiChild.Mixin,ReactBrowserComponentMixin);module.exports=ReactDOMComponent}).call(this,require("_process"))},{"./CSSPropertyOperations":6,"./DOMProperty":12,"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactBrowserEventEmitter":33,"./ReactComponent":37,"./ReactMount":70,"./ReactMultiChild":71,"./ReactPerf":75,"./escapeTextForBrowser":124,"./invariant":141,"./isEventSupported":142,"./keyOf":148,"./monitorCodeUse":151,_process:1}],46:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var LocalEventTrapMixin=require("./LocalEventTrapMixin");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent"); | |
var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var form=ReactElement.createFactory(ReactDOM.form.type);var ReactDOMForm=ReactCompositeComponent.createClass({displayName:"ReactDOMForm",mixins:[ReactBrowserComponentMixin,LocalEventTrapMixin],render:function(){return form(this.props)},componentDidMount:function(){this.trapBubbledEvent(EventConstants.topLevelTypes.topReset,"reset");this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit,"submit")}});module.exports=ReactDOMForm},{"./EventConstants":17,"./LocalEventTrapMixin":27,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58}],47:[function(require,module,exports){(function(process){"use strict";var CSSPropertyOperations=require("./CSSPropertyOperations");var DOMChildrenOperations=require("./DOMChildrenOperations");var DOMPropertyOperations=require("./DOMPropertyOperations");var ReactMount=require("./ReactMount");var ReactPerf=require("./ReactPerf");var invariant=require("./invariant");var setInnerHTML=require("./setInnerHTML");var INVALID_PROPERTY_ERRORS={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."};var ReactDOMIDOperations={updatePropertyByID:ReactPerf.measure("ReactDOMIDOperations","updatePropertyByID",function(id,name,value){var node=ReactMount.getNode(id);"production"!==process.env.NODE_ENV?invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),"updatePropertyByID(...): %s",INVALID_PROPERTY_ERRORS[name]):invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name));if(value!=null){DOMPropertyOperations.setValueForProperty(node,name,value)}else{DOMPropertyOperations.deleteValueForProperty(node,name)}}),deletePropertyByID:ReactPerf.measure("ReactDOMIDOperations","deletePropertyByID",function(id,name,value){var node=ReactMount.getNode(id);"production"!==process.env.NODE_ENV?invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name),"updatePropertyByID(...): %s",INVALID_PROPERTY_ERRORS[name]):invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name));DOMPropertyOperations.deleteValueForProperty(node,name,value)}),updateStylesByID:ReactPerf.measure("ReactDOMIDOperations","updateStylesByID",function(id,styles){var node=ReactMount.getNode(id);CSSPropertyOperations.setValueForStyles(node,styles)}),updateInnerHTMLByID:ReactPerf.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(id,html){var node=ReactMount.getNode(id);setInnerHTML(node,html)}),updateTextContentByID:ReactPerf.measure("ReactDOMIDOperations","updateTextContentByID",function(id,content){var node=ReactMount.getNode(id);DOMChildrenOperations.updateTextContent(node,content)}),dangerouslyReplaceNodeWithMarkupByID:ReactPerf.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(id,markup){var node=ReactMount.getNode(id);DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node,markup)}),dangerouslyProcessChildrenUpdates:ReactPerf.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(updates,markup){for(var i=0;i<updates.length;i++){updates[i].parentNode=ReactMount.getNode(updates[i].parentID)}DOMChildrenOperations.processUpdates(updates,markup)})};module.exports=ReactDOMIDOperations}).call(this,require("_process"))},{"./CSSPropertyOperations":6,"./DOMChildrenOperations":11,"./DOMPropertyOperations":13,"./ReactMount":70,"./ReactPerf":75,"./invariant":141,"./setInnerHTML":155,_process:1}],48:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var LocalEventTrapMixin=require("./LocalEventTrapMixin");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var img=ReactElement.createFactory(ReactDOM.img.type);var ReactDOMImg=ReactCompositeComponent.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[ReactBrowserComponentMixin,LocalEventTrapMixin],render:function(){return img(this.props)},componentDidMount:function(){this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad,"load");this.trapBubbledEvent(EventConstants.topLevelTypes.topError,"error")}});module.exports=ReactDOMImg},{"./EventConstants":17,"./LocalEventTrapMixin":27,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58}],49:[function(require,module,exports){(function(process){"use strict";var AutoFocusMixin=require("./AutoFocusMixin");var DOMPropertyOperations=require("./DOMPropertyOperations");var LinkedValueUtils=require("./LinkedValueUtils");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var ReactMount=require("./ReactMount");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var invariant=require("./invariant");var input=ReactElement.createFactory(ReactDOM.input.type);var instancesByReactID={};function forceUpdateIfMounted(){if(this.isMounted()){this.forceUpdate()}}var ReactDOMInput=ReactCompositeComponent.createClass({displayName:"ReactDOMInput",mixins:[AutoFocusMixin,LinkedValueUtils.Mixin,ReactBrowserComponentMixin],getInitialState:function(){var defaultValue=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||false,initialValue:defaultValue!=null?defaultValue:null}},render:function(){var props=assign({},this.props);props.defaultChecked=null;props.defaultValue=null;var value=LinkedValueUtils.getValue(this);props.value=value!=null?value:this.state.initialValue;var checked=LinkedValueUtils.getChecked(this);props.checked=checked!=null?checked:this.state.initialChecked;props.onChange=this._handleChange;return input(props,this.props.children)},componentDidMount:function(){var id=ReactMount.getID(this.getDOMNode());instancesByReactID[id]=this},componentWillUnmount:function(){var rootNode=this.getDOMNode();var id=ReactMount.getID(rootNode);delete instancesByReactID[id]},componentDidUpdate:function(prevProps,prevState,prevContext){var rootNode=this.getDOMNode();if(this.props.checked!=null){DOMPropertyOperations.setValueForProperty(rootNode,"checked",this.props.checked||false)}var value=LinkedValueUtils.getValue(this);if(value!=null){DOMPropertyOperations.setValueForProperty(rootNode,"value",""+value)}},_handleChange:function(event){var returnValue;var onChange=LinkedValueUtils.getOnChange(this);if(onChange){returnValue=onChange.call(this,event)}ReactUpdates.asap(forceUpdateIfMounted,this);var name=this.props.name;if(this.props.type==="radio"&&name!=null){var rootNode=this.getDOMNode();var queryRoot=rootNode;while(queryRoot.parentNode){queryRoot=queryRoot.parentNode}var group=queryRoot.querySelectorAll("input[name="+JSON.stringify(""+name)+'][type="radio"]');for(var i=0,groupLen=group.length;i<groupLen;i++){var otherNode=group[i];if(otherNode===rootNode||otherNode.form!==rootNode.form){continue}var otherID=ReactMount.getID(otherNode);"production"!==process.env.NODE_ENV?invariant(otherID,"ReactDOMInput: Mixing React and non-React radio inputs with the "+"same `name` is not supported."):invariant(otherID);var otherInstance=instancesByReactID[otherID];"production"!==process.env.NODE_ENV?invariant(otherInstance,"ReactDOMInput: Unknown radio button ID %s.",otherID):invariant(otherInstance);ReactUpdates.asap(forceUpdateIfMounted,otherInstance)}}return returnValue}});module.exports=ReactDOMInput}).call(this,require("_process"))},{"./AutoFocusMixin":2,"./DOMPropertyOperations":13,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58,"./ReactMount":70,"./ReactUpdates":91,"./invariant":141,_process:1}],50:[function(require,module,exports){(function(process){"use strict";var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var warning=require("./warning");var option=ReactElement.createFactory(ReactDOM.option.type);var ReactDOMOption=ReactCompositeComponent.createClass({displayName:"ReactDOMOption",mixins:[ReactBrowserComponentMixin],componentWillMount:function(){if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(this.props.selected==null,"Use the `defaultValue` or `value` props on <select> instead of "+"setting `selected` on <option>."):null}},render:function(){return option(this.props,this.props.children)}});module.exports=ReactDOMOption}).call(this,require("_process"))},{"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58,"./warning":161,_process:1}],51:[function(require,module,exports){"use strict";var AutoFocusMixin=require("./AutoFocusMixin");var LinkedValueUtils=require("./LinkedValueUtils");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var select=ReactElement.createFactory(ReactDOM.select.type);function updateWithPendingValueIfMounted(){if(this.isMounted()){this.setState({value:this._pendingValue});this._pendingValue=0}}function selectValueType(props,propName,componentName){if(props[propName]==null){return}if(props.multiple){if(!Array.isArray(props[propName])){return new Error("The `"+propName+"` prop supplied to <select> must be an array if "+"`multiple` is true.")}}else{if(Array.isArray(props[propName])){return new Error("The `"+propName+"` prop supplied to <select> must be a scalar "+"value if `multiple` is false.")}}}function updateOptions(component,propValue){var multiple=component.props.multiple;var value=propValue!=null?propValue:component.state.value;var options=component.getDOMNode().options;var selectedValue,i,l;if(multiple){selectedValue={};for(i=0,l=value.length;i<l;++i){selectedValue[""+value[i]]=true}}else{selectedValue=""+value}for(i=0,l=options.length;i<l;i++){var selected=multiple?selectedValue.hasOwnProperty(options[i].value):options[i].value===selectedValue;if(selected!==options[i].selected){options[i].selected=selected}}}var ReactDOMSelect=ReactCompositeComponent.createClass({displayName:"ReactDOMSelect",mixins:[AutoFocusMixin,LinkedValueUtils.Mixin,ReactBrowserComponentMixin],propTypes:{defaultValue:selectValueType,value:selectValueType},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillMount:function(){this._pendingValue=null},componentWillReceiveProps:function(nextProps){if(!this.props.multiple&&nextProps.multiple){this.setState({value:[this.state.value]})}else if(this.props.multiple&&!nextProps.multiple){this.setState({value:this.state.value[0]})}},render:function(){var props=assign({},this.props);props.onChange=this._handleChange;props.value=null;return select(props,this.props.children)},componentDidMount:function(){updateOptions(this,LinkedValueUtils.getValue(this))},componentDidUpdate:function(prevProps){var value=LinkedValueUtils.getValue(this);var prevMultiple=!!prevProps.multiple;var multiple=!!this.props.multiple;if(value!=null||prevMultiple!==multiple){updateOptions(this,value)}},_handleChange:function(event){var returnValue;var onChange=LinkedValueUtils.getOnChange(this);if(onChange){returnValue=onChange.call(this,event)}var selectedValue;if(this.props.multiple){selectedValue=[];var options=event.target.options;for(var i=0,l=options.length;i<l;i++){if(options[i].selected){selectedValue.push(options[i].value)}}}else{selectedValue=event.target.value}this._pendingValue=selectedValue;ReactUpdates.asap(updateWithPendingValueIfMounted,this);return returnValue}});module.exports=ReactDOMSelect},{"./AutoFocusMixin":2,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58,"./ReactUpdates":91}],52:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var getNodeForCharacterOffset=require("./getNodeForCharacterOffset");var getTextContentAccessor=require("./getTextContentAccessor");function isCollapsed(anchorNode,anchorOffset,focusNode,focusOffset){return anchorNode===focusNode&&anchorOffset===focusOffset}function getIEOffsets(node){var selection=document.selection;var selectedRange=selection.createRange();var selectedLength=selectedRange.text.length;var fromStart=selectedRange.duplicate();fromStart.moveToElementText(node);fromStart.setEndPoint("EndToStart",selectedRange);var startOffset=fromStart.text.length;var endOffset=startOffset+selectedLength;return{start:startOffset,end:endOffset}}function getModernOffsets(node){var selection=window.getSelection&&window.getSelection();if(!selection||selection.rangeCount===0){return null}var anchorNode=selection.anchorNode;var anchorOffset=selection.anchorOffset;var focusNode=selection.focusNode;var focusOffset=selection.focusOffset;var currentRange=selection.getRangeAt(0);var isSelectionCollapsed=isCollapsed(selection.anchorNode,selection.anchorOffset,selection.focusNode,selection.focusOffset);var rangeLength=isSelectionCollapsed?0:currentRange.toString().length;var tempRange=currentRange.cloneRange();tempRange.selectNodeContents(node);tempRange.setEnd(currentRange.startContainer,currentRange.startOffset);var isTempRangeCollapsed=isCollapsed(tempRange.startContainer,tempRange.startOffset,tempRange.endContainer,tempRange.endOffset);var start=isTempRangeCollapsed?0:tempRange.toString().length;var end=start+rangeLength;var detectionRange=document.createRange();detectionRange.setStart(anchorNode,anchorOffset);detectionRange.setEnd(focusNode,focusOffset);var isBackward=detectionRange.collapsed;return{start:isBackward?end:start,end:isBackward?start:end}}function setIEOffsets(node,offsets){var range=document.selection.createRange().duplicate();var start,end;if(typeof offsets.end==="undefined"){start=offsets.start;end=start}else if(offsets.start>offsets.end){start=offsets.end;end=offsets.start}else{start=offsets.start;end=offsets.end}range.moveToElementText(node);range.moveStart("character",start);range.setEndPoint("EndToStart",range);range.moveEnd("character",end-start);range.select()}function setModernOffsets(node,offsets){if(!window.getSelection){return}var selection=window.getSelection();var length=node[getTextContentAccessor()].length;var start=Math.min(offsets.start,length);var end=typeof offsets.end==="undefined"?start:Math.min(offsets.end,length);if(!selection.extend&&start>end){var temp=end;end=start;start=temp}var startMarker=getNodeForCharacterOffset(node,start);var endMarker=getNodeForCharacterOffset(node,end);if(startMarker&&endMarker){var range=document.createRange();range.setStart(startMarker.node,startMarker.offset);selection.removeAllRanges();if(start>end){selection.addRange(range);selection.extend(endMarker.node,endMarker.offset)}else{range.setEnd(endMarker.node,endMarker.offset);selection.addRange(range)}}}var useIEOffsets=ExecutionEnvironment.canUseDOM&&document.selection;var ReactDOMSelection={getOffsets:useIEOffsets?getIEOffsets:getModernOffsets,setOffsets:useIEOffsets?setIEOffsets:setModernOffsets};module.exports=ReactDOMSelection},{"./ExecutionEnvironment":23,"./getNodeForCharacterOffset":134,"./getTextContentAccessor":136}],53:[function(require,module,exports){(function(process){"use strict";var AutoFocusMixin=require("./AutoFocusMixin");var DOMPropertyOperations=require("./DOMPropertyOperations");var LinkedValueUtils=require("./LinkedValueUtils");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var ReactDOM=require("./ReactDOM");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var invariant=require("./invariant");var warning=require("./warning");var textarea=ReactElement.createFactory(ReactDOM.textarea.type);function forceUpdateIfMounted(){if(this.isMounted()){this.forceUpdate()}}var ReactDOMTextarea=ReactCompositeComponent.createClass({displayName:"ReactDOMTextarea",mixins:[AutoFocusMixin,LinkedValueUtils.Mixin,ReactBrowserComponentMixin],getInitialState:function(){var defaultValue=this.props.defaultValue;var children=this.props.children;if(children!=null){if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(false,"Use the `defaultValue` or `value` props instead of setting "+"children on <textarea>."):null}"production"!==process.env.NODE_ENV?invariant(defaultValue==null,"If you supply `defaultValue` on a <textarea>, do not pass children."):invariant(defaultValue==null);if(Array.isArray(children)){"production"!==process.env.NODE_ENV?invariant(children.length<=1,"<textarea> can only have at most one child."):invariant(children.length<=1);children=children[0]}defaultValue=""+children}if(defaultValue==null){defaultValue=""}var value=LinkedValueUtils.getValue(this);return{initialValue:""+(value!=null?value:defaultValue)}},render:function(){var props=assign({},this.props);"production"!==process.env.NODE_ENV?invariant(props.dangerouslySetInnerHTML==null,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):invariant(props.dangerouslySetInnerHTML==null);props.defaultValue=null;props.value=null;props.onChange=this._handleChange;return textarea(props,this.state.initialValue)},componentDidUpdate:function(prevProps,prevState,prevContext){var value=LinkedValueUtils.getValue(this);if(value!=null){var rootNode=this.getDOMNode();DOMPropertyOperations.setValueForProperty(rootNode,"value",""+value)}},_handleChange:function(event){var returnValue;var onChange=LinkedValueUtils.getOnChange(this);if(onChange){returnValue=onChange.call(this,event)}ReactUpdates.asap(forceUpdateIfMounted,this);return returnValue}});module.exports=ReactDOMTextarea}).call(this,require("_process"))},{"./AutoFocusMixin":2,"./DOMPropertyOperations":13,"./LinkedValueUtils":26,"./Object.assign":29,"./ReactBrowserComponentMixin":32,"./ReactCompositeComponent":40,"./ReactDOM":43,"./ReactElement":58,"./ReactUpdates":91,"./invariant":141,"./warning":161,_process:1}],54:[function(require,module,exports){"use strict";var ReactUpdates=require("./ReactUpdates");var Transaction=require("./Transaction");var assign=require("./Object.assign");var emptyFunction=require("./emptyFunction");var RESET_BATCHED_UPDATES={initialize:emptyFunction,close:function(){ReactDefaultBatchingStrategy.isBatchingUpdates=false}};var FLUSH_BATCHED_UPDATES={initialize:emptyFunction,close:ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)};var TRANSACTION_WRAPPERS=[FLUSH_BATCHED_UPDATES,RESET_BATCHED_UPDATES];function ReactDefaultBatchingStrategyTransaction(){this.reinitializeTransaction()}assign(ReactDefaultBatchingStrategyTransaction.prototype,Transaction.Mixin,{getTransactionWrappers:function(){return TRANSACTION_WRAPPERS}});var transaction=new ReactDefaultBatchingStrategyTransaction;var ReactDefaultBatchingStrategy={isBatchingUpdates:false,batchedUpdates:function(callback,a,b){var alreadyBatchingUpdates=ReactDefaultBatchingStrategy.isBatchingUpdates;ReactDefaultBatchingStrategy.isBatchingUpdates=true;if(alreadyBatchingUpdates){callback(a,b)}else{transaction.perform(callback,null,a,b)}}};module.exports=ReactDefaultBatchingStrategy},{"./Object.assign":29,"./ReactUpdates":91,"./Transaction":108,"./emptyFunction":122}],55:[function(require,module,exports){(function(process){"use strict";var BeforeInputEventPlugin=require("./BeforeInputEventPlugin");var ChangeEventPlugin=require("./ChangeEventPlugin");var ClientReactRootIndex=require("./ClientReactRootIndex");var CompositionEventPlugin=require("./CompositionEventPlugin");var DefaultEventPluginOrder=require("./DefaultEventPluginOrder");var EnterLeaveEventPlugin=require("./EnterLeaveEventPlugin");var ExecutionEnvironment=require("./ExecutionEnvironment");var HTMLDOMPropertyConfig=require("./HTMLDOMPropertyConfig");var MobileSafariClickEventPlugin=require("./MobileSafariClickEventPlugin");var ReactBrowserComponentMixin=require("./ReactBrowserComponentMixin");var ReactComponentBrowserEnvironment=require("./ReactComponentBrowserEnvironment");var ReactDefaultBatchingStrategy=require("./ReactDefaultBatchingStrategy");var ReactDOMComponent=require("./ReactDOMComponent");var ReactDOMButton=require("./ReactDOMButton");var ReactDOMForm=require("./ReactDOMForm");var ReactDOMImg=require("./ReactDOMImg");var ReactDOMInput=require("./ReactDOMInput");var ReactDOMOption=require("./ReactDOMOption");var ReactDOMSelect=require("./ReactDOMSelect");var ReactDOMTextarea=require("./ReactDOMTextarea");var ReactEventListener=require("./ReactEventListener");var ReactInjection=require("./ReactInjection");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactMount=require("./ReactMount");var SelectEventPlugin=require("./SelectEventPlugin");var ServerReactRootIndex=require("./ServerReactRootIndex");var SimpleEventPlugin=require("./SimpleEventPlugin");var SVGDOMPropertyConfig=require("./SVGDOMPropertyConfig");var createFullPageComponent=require("./createFullPageComponent");function inject(){ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles);ReactInjection.EventPluginHub.injectMount(ReactMount);ReactInjection.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:SimpleEventPlugin,EnterLeaveEventPlugin:EnterLeaveEventPlugin,ChangeEventPlugin:ChangeEventPlugin,CompositionEventPlugin:CompositionEventPlugin,MobileSafariClickEventPlugin:MobileSafariClickEventPlugin,SelectEventPlugin:SelectEventPlugin,BeforeInputEventPlugin:BeforeInputEventPlugin});ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent);ReactInjection.NativeComponent.injectComponentClasses({button:ReactDOMButton,form:ReactDOMForm,img:ReactDOMImg,input:ReactDOMInput,option:ReactDOMOption,select:ReactDOMSelect,textarea:ReactDOMTextarea,html:createFullPageComponent("html"),head:createFullPageComponent("head"),body:createFullPageComponent("body")});ReactInjection.CompositeComponent.injectMixin(ReactBrowserComponentMixin);ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);ReactInjection.EmptyComponent.injectEmptyComponent("noscript");ReactInjection.Updates.injectReconcileTransaction(ReactComponentBrowserEnvironment.ReactReconcileTransaction);ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM?ClientReactRootIndex.createReactRootIndex:ServerReactRootIndex.createReactRootIndex);ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);if("production"!==process.env.NODE_ENV){var url=ExecutionEnvironment.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(url)){var ReactDefaultPerf=require("./ReactDefaultPerf");ReactDefaultPerf.start()}}}module.exports={inject:inject}}).call(this,require("_process"))},{"./BeforeInputEventPlugin":3,"./ChangeEventPlugin":8,"./ClientReactRootIndex":9,"./CompositionEventPlugin":10,"./DefaultEventPluginOrder":15,"./EnterLeaveEventPlugin":16,"./ExecutionEnvironment":23,"./HTMLDOMPropertyConfig":24,"./MobileSafariClickEventPlugin":28,"./ReactBrowserComponentMixin":32,"./ReactComponentBrowserEnvironment":38,"./ReactDOMButton":44,"./ReactDOMComponent":45,"./ReactDOMForm":46,"./ReactDOMImg":48,"./ReactDOMInput":49,"./ReactDOMOption":50,"./ReactDOMSelect":51,"./ReactDOMTextarea":53,"./ReactDefaultBatchingStrategy":54,"./ReactDefaultPerf":56,"./ReactEventListener":63,"./ReactInjection":64,"./ReactInstanceHandles":66,"./ReactMount":70,"./SVGDOMPropertyConfig":93,"./SelectEventPlugin":94,"./ServerReactRootIndex":95,"./SimpleEventPlugin":96,"./createFullPageComponent":117,_process:1}],56:[function(require,module,exports){"use strict";var DOMProperty=require("./DOMProperty");var ReactDefaultPerfAnalysis=require("./ReactDefaultPerfAnalysis");var ReactMount=require("./ReactMount");var ReactPerf=require("./ReactPerf");var performanceNow=require("./performanceNow");function roundFloat(val){return Math.floor(val*100)/100}function addValue(obj,key,val){obj[key]=(obj[key]||0)+val}var ReactDefaultPerf={_allMeasurements:[],_mountStack:[0],_injected:false,start:function(){if(!ReactDefaultPerf._injected){ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure)}ReactDefaultPerf._allMeasurements.length=0;ReactPerf.enableMeasure=true},stop:function(){ReactPerf.enableMeasure=false},getLastMeasurements:function(){return ReactDefaultPerf._allMeasurements},printExclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=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}}))},printInclusive:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=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:function(measurements){var summary=ReactDefaultPerfAnalysis.getInclusiveSummary(measurements,true);return summary.map(function(item){return{"Owner > component":item.componentName,"Wasted time (ms)":item.time,Instances:item.count}})},printWasted:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements));console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},printDOM:function(measurements){measurements=measurements||ReactDefaultPerf._allMeasurements;var summary=ReactDefaultPerfAnalysis.getDOMSummary(measurements);console.table(summary.map(function(item){var result={};result[DOMProperty.ID_ATTRIBUTE_NAME]=item.id;result["type"]=item.type;result["args"]=JSON.stringify(item.args);return result}));console.log("Total time:",ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2)+" ms")},_recordWrite:function(id,fnName,totalTime,args){var writes=ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].writes;writes[id]=writes[id]||[];writes[id].push({type:fnName,time:totalTime,args:args})},measure:function(moduleName,fnName,func){return function(){for(var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++)args.push(arguments[$__0]);var totalTime;var rv;var start;if(fnName==="_renderNewRootComponent"||fnName==="flushBatchedUpdates"){ReactDefaultPerf._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0});start=performanceNow();rv=func.apply(this,args);ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1].totalTime=performanceNow()-start;return rv}else if(moduleName==="ReactDOMIDOperations"||moduleName==="ReactComponentBrowserEnvironment"){start=performanceNow();rv=func.apply(this,args);totalTime=performanceNow()-start;if(fnName==="mountImageIntoNode"){var mountID=ReactMount.getID(args[1]);ReactDefaultPerf._recordWrite(mountID,fnName,totalTime,args[0])}else if(fnName==="dangerouslyProcessChildrenUpdates"){args[0].forEach(function(update){var writeArgs={};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{ReactDefaultPerf._recordWrite(args[0],fnName,totalTime,Array.prototype.slice.call(args,1))}return rv}else if(moduleName==="ReactCompositeComponent"&&(fnName==="mountComponent"||fnName==="updateComponent"||fnName==="_renderValidatedComponent")){var rootNodeID=fnName==="mountComponent"?args[0]:this._rootNodeID;var isRender=fnName==="_renderValidatedComponent";var isMount=fnName==="mountComponent";var mountStack=ReactDefaultPerf._mountStack;var entry=ReactDefaultPerf._allMeasurements[ReactDefaultPerf._allMeasurements.length-1];if(isRender){addValue(entry.counts,rootNodeID,1)}else if(isMount){mountStack.push(0)}start=performanceNow();rv=func.apply(this,args);totalTime=performanceNow()-start;if(isRender){addValue(entry.render,rootNodeID,totalTime)}else if(isMount){var subMountTime=mountStack.pop();mountStack[mountStack.length-1]+=totalTime;addValue(entry.exclusive,rootNodeID,totalTime-subMountTime);addValue(entry.inclusive,rootNodeID,totalTime)}else{addValue(entry.inclusive,rootNodeID,totalTime)}entry.displayNames[rootNodeID]={current:this.constructor.displayName,owner:this._owner?this._owner.constructor.displayName:"<root>"};return rv}else{return func.apply(this,args)}}}};module.exports=ReactDefaultPerf},{"./DOMProperty":12,"./ReactDefaultPerfAnalysis":57,"./ReactMount":70,"./ReactPerf":75,"./performanceNow":154}],57:[function(require,module,exports){var assign=require("./Object.assign");var DONT_CARE_THRESHOLD=1.2;var DOM_OPERATION_TYPES={mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"};function getTotalTime(measurements){var totalTime=0;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];totalTime+=measurement.totalTime}return totalTime}function getDOMSummary(measurements){var items=[];for(var i=0;i<measurements.length;i++){var measurement=measurements[i];var id;for(id in measurement.writes){measurement.writes[id].forEach(function(write){items.push({id:id,type:DOM_OPERATION_TYPES[write.type]||write.type,args:write.args})})}}return items}function getExclusiveSummary(measurements){var candidates={};var displayName;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];var allIDs=assign({},measurement.exclusive,measurement.inclusive);for(var id in allIDs){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]}}}var arr=[];for(displayName in candidates){if(candidates[displayName].exclusive>=DONT_CARE_THRESHOLD){arr.push(candidates[displayName])}}arr.sort(function(a,b){return b.exclusive-a.exclusive});return arr}function getInclusiveSummary(measurements,onlyClean){var candidates={};var inclusiveKey;for(var i=0;i<measurements.length;i++){var measurement=measurements[i];var allIDs=assign({},measurement.exclusive,measurement.inclusive); | |
var cleanComponents;if(onlyClean){cleanComponents=getUnchangedComponents(measurement)}for(var id in allIDs){if(onlyClean&&!cleanComponents[id]){continue}var displayName=measurement.displayNames[id];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]}}}var arr=[];for(inclusiveKey in candidates){if(candidates[inclusiveKey].time>=DONT_CARE_THRESHOLD){arr.push(candidates[inclusiveKey])}}arr.sort(function(a,b){return b.time-a.time});return arr}function getUnchangedComponents(measurement){var cleanComponents={};var dirtyLeafIDs=Object.keys(measurement.writes);var allIDs=assign({},measurement.exclusive,measurement.inclusive);for(var id in allIDs){var isDirty=false;for(var i=0;i<dirtyLeafIDs.length;i++){if(dirtyLeafIDs[i].indexOf(id)===0){isDirty=true;break}}if(!isDirty&&measurement.counts[id]>0){cleanComponents[id]=true}}return cleanComponents}var ReactDefaultPerfAnalysis={getExclusiveSummary:getExclusiveSummary,getInclusiveSummary:getInclusiveSummary,getDOMSummary:getDOMSummary,getTotalTime:getTotalTime};module.exports=ReactDefaultPerfAnalysis},{"./Object.assign":29}],58:[function(require,module,exports){(function(process){"use strict";var ReactContext=require("./ReactContext");var ReactCurrentOwner=require("./ReactCurrentOwner");var warning=require("./warning");var RESERVED_PROPS={key:true,ref:true};function defineWarningProperty(object,key){Object.defineProperty(object,key,{configurable:false,enumerable:true,get:function(){if(!this._store){return null}return this._store[key]},set:function(value){"production"!==process.env.NODE_ENV?warning(false,"Don't set the "+key+" property of the component. "+"Mutate the existing props object instead."):null;this._store[key]=value}})}var useMutationMembrane=false;function defineMutationMembrane(prototype){try{var pseudoFrozenProperties={props:true};for(var key in pseudoFrozenProperties){defineWarningProperty(prototype,key)}useMutationMembrane=true}catch(x){}}var ReactElement=function(type,key,ref,owner,context,props){this.type=type;this.key=key;this.ref=ref;this._owner=owner;this._context=context;if("production"!==process.env.NODE_ENV){this._store={validated:false,props:props};if(useMutationMembrane){Object.freeze(this);return}}this.props=props};ReactElement.prototype={_isReactElement:true};if("production"!==process.env.NODE_ENV){defineMutationMembrane(ReactElement.prototype)}ReactElement.createElement=function(type,config,children){var propName;var props={};var key=null;var ref=null;if(config!=null){ref=config.ref===undefined?null:config.ref;if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(config.key!==null,"createElement(...): Encountered component with a `key` of null. In "+"a future version, this will be treated as equivalent to the string "+"'null'; instead, provide an explicit key or use undefined."):null}key=config.key==null?null:""+config.key;for(propName in config){if(config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)){props[propName]=config[propName]}}}var childrenLength=arguments.length-2;if(childrenLength===1){props.children=children}else if(childrenLength>1){var childArray=Array(childrenLength);for(var i=0;i<childrenLength;i++){childArray[i]=arguments[i+2]}props.children=childArray}if(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps){if(typeof props[propName]==="undefined"){props[propName]=defaultProps[propName]}}}return new ReactElement(type,key,ref,ReactCurrentOwner.current,ReactContext.current,props)};ReactElement.createFactory=function(type){var factory=ReactElement.createElement.bind(null,type);factory.type=type;return factory};ReactElement.cloneAndReplaceProps=function(oldElement,newProps){var newElement=new ReactElement(oldElement.type,oldElement.key,oldElement.ref,oldElement._owner,oldElement._context,newProps);if("production"!==process.env.NODE_ENV){newElement._store.validated=oldElement._store.validated}return newElement};ReactElement.isValidElement=function(object){var isElement=!!(object&&object._isReactElement);return isElement};module.exports=ReactElement}).call(this,require("_process"))},{"./ReactContext":41,"./ReactCurrentOwner":42,"./warning":161,_process:1}],59:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactPropTypeLocations=require("./ReactPropTypeLocations");var ReactCurrentOwner=require("./ReactCurrentOwner");var monitorCodeUse=require("./monitorCodeUse");var warning=require("./warning");var ownerHasKeyUseWarning={react_key_warning:{},react_numeric_key_warning:{}};var ownerHasMonitoredObjectMap={};var loggedTypeFailures={};var NUMERIC_PROPERTY_REGEX=/^\d+$/;function getCurrentOwnerDisplayName(){var current=ReactCurrentOwner.current;return current&¤t.constructor.displayName||undefined}function validateExplicitKey(component,parentType){if(component._store.validated||component.key!=null){return}component._store.validated=true;warnAndMonitorForKeyUse("react_key_warning",'Each child in an array should have a unique "key" prop.',component,parentType)}function validatePropertyKey(name,component,parentType){if(!NUMERIC_PROPERTY_REGEX.test(name)){return}warnAndMonitorForKeyUse("react_numeric_key_warning","Child objects should have non-numeric keys so ordering is preserved.",component,parentType)}function warnAndMonitorForKeyUse(warningID,message,component,parentType){var ownerName=getCurrentOwnerDisplayName();var parentName=parentType.displayName;var useName=ownerName||parentName;var memoizer=ownerHasKeyUseWarning[warningID];if(memoizer.hasOwnProperty(useName)){return}memoizer[useName]=true;message+=ownerName?" Check the render method of "+ownerName+".":" Check the renderComponent call using <"+parentName+">.";var childOwnerName=null;if(component._owner&&component._owner!==ReactCurrentOwner.current){childOwnerName=component._owner.constructor.displayName;message+=" It was passed a child from "+childOwnerName+"."}message+=" See http://fb.me/react-warning-keys for more information.";monitorCodeUse(warningID,{component:useName,componentOwner:childOwnerName});console.warn(message)}function monitorUseOfObjectMap(){var currentName=getCurrentOwnerDisplayName()||"";if(ownerHasMonitoredObjectMap.hasOwnProperty(currentName)){return}ownerHasMonitoredObjectMap[currentName]=true;monitorCodeUse("react_object_map_children")}function validateChildKeys(component,parentType){if(Array.isArray(component)){for(var i=0;i<component.length;i++){var child=component[i];if(ReactElement.isValidElement(child)){validateExplicitKey(child,parentType)}}}else if(ReactElement.isValidElement(component)){component._store.validated=true}else if(component&&typeof component==="object"){monitorUseOfObjectMap();for(var name in component){validatePropertyKey(name,component[name],parentType)}}}function checkPropTypes(componentName,propTypes,props,location){for(var propName in propTypes){if(propTypes.hasOwnProperty(propName)){var error;try{error=propTypes[propName](props,propName,componentName,location)}catch(ex){error=ex}if(error instanceof Error&&!(error.message in loggedTypeFailures)){loggedTypeFailures[error.message]=true;monitorCodeUse("react_failed_descriptor_type_check",{message:error.message})}}}}var ReactElementValidator={createElement:function(type,props,children){"production"!==process.env.NODE_ENV?warning(type!=null,"React.createElement: type should not be null or undefined. It should "+"be a string (for DOM elements) or a ReactClass (for composite "+"components)."):null;var element=ReactElement.createElement.apply(this,arguments);if(element==null){return element}for(var i=2;i<arguments.length;i++){validateChildKeys(arguments[i],type)}if(type){var name=type.displayName;if(type.propTypes){checkPropTypes(name,type.propTypes,element.props,ReactPropTypeLocations.prop)}if(type.contextTypes){checkPropTypes(name,type.contextTypes,element._context,ReactPropTypeLocations.context)}}return element},createFactory:function(type){var validatedFactory=ReactElementValidator.createElement.bind(null,type);validatedFactory.type=type;return validatedFactory}};module.exports=ReactElementValidator}).call(this,require("_process"))},{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":151,"./warning":161,_process:1}],60:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var invariant=require("./invariant");var component;var nullComponentIdsRegistry={};var ReactEmptyComponentInjection={injectEmptyComponent:function(emptyComponent){component=ReactElement.createFactory(emptyComponent)}};function getEmptyComponent(){"production"!==process.env.NODE_ENV?invariant(component,"Trying to return null from a render, but no null placeholder component "+"was injected."):invariant(component);return component()}function registerNullComponentID(id){nullComponentIdsRegistry[id]=true}function deregisterNullComponentID(id){delete nullComponentIdsRegistry[id]}function isNullComponentID(id){return nullComponentIdsRegistry[id]}var ReactEmptyComponent={deregisterNullComponentID:deregisterNullComponentID,getEmptyComponent:getEmptyComponent,injection:ReactEmptyComponentInjection,isNullComponentID:isNullComponentID,registerNullComponentID:registerNullComponentID};module.exports=ReactEmptyComponent}).call(this,require("_process"))},{"./ReactElement":58,"./invariant":141,_process:1}],61:[function(require,module,exports){"use strict";var ReactErrorUtils={guard:function(func,name){return func}};module.exports=ReactErrorUtils},{}],62:[function(require,module,exports){"use strict";var EventPluginHub=require("./EventPluginHub");function runEventQueueInBatch(events){EventPluginHub.enqueueEvents(events);EventPluginHub.processEventQueue()}var ReactEventEmitterMixin={handleTopLevel:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var events=EventPluginHub.extractEvents(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent);runEventQueueInBatch(events)}};module.exports=ReactEventEmitterMixin},{"./EventPluginHub":19}],63:[function(require,module,exports){"use strict";var EventListener=require("./EventListener");var ExecutionEnvironment=require("./ExecutionEnvironment");var PooledClass=require("./PooledClass");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactMount=require("./ReactMount");var ReactUpdates=require("./ReactUpdates");var assign=require("./Object.assign");var getEventTarget=require("./getEventTarget");var getUnboundedScrollPosition=require("./getUnboundedScrollPosition");function findParent(node){var nodeID=ReactMount.getID(node);var rootID=ReactInstanceHandles.getReactRootIDFromNodeID(nodeID);var container=ReactMount.findReactContainerForID(rootID);var parent=ReactMount.getFirstReactDOM(container);return parent}function TopLevelCallbackBookKeeping(topLevelType,nativeEvent){this.topLevelType=topLevelType;this.nativeEvent=nativeEvent;this.ancestors=[]}assign(TopLevelCallbackBookKeeping.prototype,{destructor:function(){this.topLevelType=null;this.nativeEvent=null;this.ancestors.length=0}});PooledClass.addPoolingTo(TopLevelCallbackBookKeeping,PooledClass.twoArgumentPooler);function handleTopLevelImpl(bookKeeping){var topLevelTarget=ReactMount.getFirstReactDOM(getEventTarget(bookKeeping.nativeEvent))||window;var ancestor=topLevelTarget;while(ancestor){bookKeeping.ancestors.push(ancestor);ancestor=findParent(ancestor)}for(var i=0,l=bookKeeping.ancestors.length;i<l;i++){topLevelTarget=bookKeeping.ancestors[i];var topLevelTargetID=ReactMount.getID(topLevelTarget)||"";ReactEventListener._handleTopLevel(bookKeeping.topLevelType,topLevelTarget,topLevelTargetID,bookKeeping.nativeEvent)}}function scrollValueMonitor(cb){var scrollPosition=getUnboundedScrollPosition(window);cb(scrollPosition)}var ReactEventListener={_enabled:true,_handleTopLevel:null,WINDOW_HANDLE:ExecutionEnvironment.canUseDOM?window:null,setHandleTopLevel:function(handleTopLevel){ReactEventListener._handleTopLevel=handleTopLevel},setEnabled:function(enabled){ReactEventListener._enabled=!!enabled},isEnabled:function(){return ReactEventListener._enabled},trapBubbledEvent:function(topLevelType,handlerBaseName,handle){var element=handle;if(!element){return}return EventListener.listen(element,handlerBaseName,ReactEventListener.dispatchEvent.bind(null,topLevelType))},trapCapturedEvent:function(topLevelType,handlerBaseName,handle){var element=handle;if(!element){return}return EventListener.capture(element,handlerBaseName,ReactEventListener.dispatchEvent.bind(null,topLevelType))},monitorScrollValue:function(refresh){var callback=scrollValueMonitor.bind(null,refresh);EventListener.listen(window,"scroll",callback);EventListener.listen(window,"resize",callback)},dispatchEvent:function(topLevelType,nativeEvent){if(!ReactEventListener._enabled){return}var bookKeeping=TopLevelCallbackBookKeeping.getPooled(topLevelType,nativeEvent);try{ReactUpdates.batchedUpdates(handleTopLevelImpl,bookKeeping)}finally{TopLevelCallbackBookKeeping.release(bookKeeping)}}};module.exports=ReactEventListener},{"./EventListener":18,"./ExecutionEnvironment":23,"./Object.assign":29,"./PooledClass":30,"./ReactInstanceHandles":66,"./ReactMount":70,"./ReactUpdates":91,"./getEventTarget":132,"./getUnboundedScrollPosition":137}],64:[function(require,module,exports){"use strict";var DOMProperty=require("./DOMProperty");var EventPluginHub=require("./EventPluginHub");var ReactComponent=require("./ReactComponent");var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactEmptyComponent=require("./ReactEmptyComponent");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactNativeComponent=require("./ReactNativeComponent");var ReactPerf=require("./ReactPerf");var ReactRootIndex=require("./ReactRootIndex");var ReactUpdates=require("./ReactUpdates");var ReactInjection={Component:ReactComponent.injection,CompositeComponent:ReactCompositeComponent.injection,DOMProperty:DOMProperty.injection,EmptyComponent:ReactEmptyComponent.injection,EventPluginHub:EventPluginHub.injection,EventEmitter:ReactBrowserEventEmitter.injection,NativeComponent:ReactNativeComponent.injection,Perf:ReactPerf.injection,RootIndex:ReactRootIndex.injection,Updates:ReactUpdates.injection};module.exports=ReactInjection},{"./DOMProperty":12,"./EventPluginHub":19,"./ReactBrowserEventEmitter":33,"./ReactComponent":37,"./ReactCompositeComponent":40,"./ReactEmptyComponent":60,"./ReactNativeComponent":73,"./ReactPerf":75,"./ReactRootIndex":82,"./ReactUpdates":91}],65:[function(require,module,exports){"use strict";var ReactDOMSelection=require("./ReactDOMSelection");var containsNode=require("./containsNode");var focusNode=require("./focusNode");var getActiveElement=require("./getActiveElement");function isInDocument(node){return containsNode(document.documentElement,node)}var ReactInputSelection={hasSelectionCapabilities:function(elem){return elem&&(elem.nodeName==="INPUT"&&elem.type==="text"||elem.nodeName==="TEXTAREA"||elem.contentEditable==="true")},getSelectionInformation:function(){var focusedElem=getActiveElement();return{focusedElem:focusedElem,selectionRange:ReactInputSelection.hasSelectionCapabilities(focusedElem)?ReactInputSelection.getSelection(focusedElem):null}},restoreSelection:function(priorSelectionInformation){var curFocusedElem=getActiveElement();var priorFocusedElem=priorSelectionInformation.focusedElem;var priorSelectionRange=priorSelectionInformation.selectionRange;if(curFocusedElem!==priorFocusedElem&&isInDocument(priorFocusedElem)){if(ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)){ReactInputSelection.setSelection(priorFocusedElem,priorSelectionRange)}focusNode(priorFocusedElem)}},getSelection:function(input){var selection;if("selectionStart"in input){selection={start:input.selectionStart,end:input.selectionEnd}}else if(document.selection&&input.nodeName==="INPUT"){var range=document.selection.createRange();if(range.parentElement()===input){selection={start:-range.moveStart("character",-input.value.length),end:-range.moveEnd("character",-input.value.length)}}}else{selection=ReactDOMSelection.getOffsets(input)}return selection||{start:0,end:0}},setSelection:function(input,offsets){var start=offsets.start;var end=offsets.end;if(typeof end==="undefined"){end=start}if("selectionStart"in input){input.selectionStart=start;input.selectionEnd=Math.min(end,input.value.length)}else if(document.selection&&input.nodeName==="INPUT"){var range=input.createTextRange();range.collapse(true);range.moveStart("character",start);range.moveEnd("character",end-start);range.select()}else{ReactDOMSelection.setOffsets(input,offsets)}}};module.exports=ReactInputSelection},{"./ReactDOMSelection":52,"./containsNode":115,"./focusNode":126,"./getActiveElement":128}],66:[function(require,module,exports){(function(process){"use strict";var ReactRootIndex=require("./ReactRootIndex");var invariant=require("./invariant");var SEPARATOR=".";var SEPARATOR_LENGTH=SEPARATOR.length;var MAX_TREE_DEPTH=100;function getReactRootIDString(index){return SEPARATOR+index.toString(36)}function isBoundary(id,index){return id.charAt(index)===SEPARATOR||index===id.length}function isValidID(id){return id===""||id.charAt(0)===SEPARATOR&&id.charAt(id.length-1)!==SEPARATOR}function isAncestorIDOf(ancestorID,descendantID){return descendantID.indexOf(ancestorID)===0&&isBoundary(descendantID,ancestorID.length)}function getParentID(id){return id?id.substr(0,id.lastIndexOf(SEPARATOR)):""}function getNextDescendantID(ancestorID,destinationID){"production"!==process.env.NODE_ENV?invariant(isValidID(ancestorID)&&isValidID(destinationID),"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",ancestorID,destinationID):invariant(isValidID(ancestorID)&&isValidID(destinationID));"production"!==process.env.NODE_ENV?invariant(isAncestorIDOf(ancestorID,destinationID),"getNextDescendantID(...): React has made an invalid assumption about "+"the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",ancestorID,destinationID):invariant(isAncestorIDOf(ancestorID,destinationID));if(ancestorID===destinationID){return ancestorID}var start=ancestorID.length+SEPARATOR_LENGTH;for(var i=start;i<destinationID.length;i++){if(isBoundary(destinationID,i)){break}}return destinationID.substr(0,i)}function getFirstCommonAncestorID(oneID,twoID){var minLength=Math.min(oneID.length,twoID.length);if(minLength===0){return""}var lastCommonMarkerIndex=0;for(var i=0;i<=minLength;i++){if(isBoundary(oneID,i)&&isBoundary(twoID,i)){lastCommonMarkerIndex=i}else if(oneID.charAt(i)!==twoID.charAt(i)){break}}var longestCommonID=oneID.substr(0,lastCommonMarkerIndex);"production"!==process.env.NODE_ENV?invariant(isValidID(longestCommonID),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",oneID,twoID,longestCommonID):invariant(isValidID(longestCommonID));return longestCommonID}function traverseParentPath(start,stop,cb,arg,skipFirst,skipLast){start=start||"";stop=stop||"";"production"!==process.env.NODE_ENV?invariant(start!==stop,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",start):invariant(start!==stop);var traverseUp=isAncestorIDOf(stop,start);"production"!==process.env.NODE_ENV?invariant(traverseUp||isAncestorIDOf(start,stop),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do "+"not have a parent path.",start,stop):invariant(traverseUp||isAncestorIDOf(start,stop));var depth=0;var traverse=traverseUp?getParentID:getNextDescendantID;for(var id=start;;id=traverse(id,stop)){var ret;if((!skipFirst||id!==start)&&(!skipLast||id!==stop)){ret=cb(id,traverseUp,arg)}if(ret===false||id===stop){break}"production"!==process.env.NODE_ENV?invariant(depth++<MAX_TREE_DEPTH,"traverseParentPath(%s, %s, ...): Detected an infinite loop while "+"traversing the React DOM ID tree. This may be due to malformed IDs: %s",start,stop):invariant(depth++<MAX_TREE_DEPTH)}}var ReactInstanceHandles={createReactRootID:function(){return getReactRootIDString(ReactRootIndex.createReactRootIndex())},createReactID:function(rootID,name){return rootID+name},getReactRootIDFromNodeID:function(id){if(id&&id.charAt(0)===SEPARATOR&&id.length>1){var index=id.indexOf(SEPARATOR,1);return index>-1?id.substr(0,index):id}return null},traverseEnterLeave:function(leaveID,enterID,cb,upArg,downArg){var ancestorID=getFirstCommonAncestorID(leaveID,enterID);if(ancestorID!==leaveID){traverseParentPath(leaveID,ancestorID,cb,upArg,false,true)}if(ancestorID!==enterID){traverseParentPath(ancestorID,enterID,cb,downArg,true,false)}},traverseTwoPhase:function(targetID,cb,arg){if(targetID){traverseParentPath("",targetID,cb,arg,true,false);traverseParentPath(targetID,"",cb,arg,false,true)}},traverseAncestors:function(targetID,cb,arg){traverseParentPath("",targetID,cb,arg,true,false)},_getFirstCommonAncestorID:getFirstCommonAncestorID,_getNextDescendantID:getNextDescendantID,isAncestorIDOf:isAncestorIDOf,SEPARATOR:SEPARATOR};module.exports=ReactInstanceHandles}).call(this,require("_process"))},{"./ReactRootIndex":82,"./invariant":141,_process:1}],67:[function(require,module,exports){(function(process){"use strict";var ReactCurrentOwner=require("./ReactCurrentOwner");var invariant=require("./invariant");var monitorCodeUse=require("./monitorCodeUse");var warning=require("./warning");var legacyFactoryLogs={};function warnForLegacyFactoryCall(){if(!ReactLegacyElementFactory._isLegacyCallWarningEnabled){return}var owner=ReactCurrentOwner.current;var name=owner&&owner.constructor?owner.constructor.displayName:"";if(!name){name="Something"}if(legacyFactoryLogs.hasOwnProperty(name)){return}legacyFactoryLogs[name]=true;"production"!==process.env.NODE_ENV?warning(false,name+" is calling a React component directly. "+"Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"):null;monitorCodeUse("react_legacy_factory_call",{version:3,name:name})}function warnForPlainFunctionType(type){var isReactClass=type.prototype&&typeof type.prototype.mountComponent==="function"&&typeof type.prototype.receiveComponent==="function";if(isReactClass){"production"!==process.env.NODE_ENV?warning(false,"Did not expect to get a React class here. Use `Component` instead "+"of `Component.type` or `this.constructor`."):null}else{if(!type._reactWarnedForThisType){try{type._reactWarnedForThisType=true}catch(x){}monitorCodeUse("react_non_component_in_jsx",{version:3,name:type.name})}"production"!==process.env.NODE_ENV?warning(false,"This JSX uses a plain function. Only React components are "+"valid in React's JSX transform."):null}}function warnForNonLegacyFactory(type){"production"!==process.env.NODE_ENV?warning(false,"Do not pass React.DOM."+type.type+" to JSX or createFactory. "+'Use the string "'+type.type+'" instead.'):null}function proxyStaticMethods(target,source){if(typeof source!=="function"){return}for(var key in source){if(source.hasOwnProperty(key)){var value=source[key];if(typeof value==="function"){var bound=value.bind(source);for(var k in value){if(value.hasOwnProperty(k)){bound[k]=value[k]}}target[key]=bound}else{target[key]=value}}}}var LEGACY_MARKER={};var NON_LEGACY_MARKER={};var ReactLegacyElementFactory={};ReactLegacyElementFactory.wrapCreateFactory=function(createFactory){var legacyCreateFactory=function(type){if(typeof type!=="function"){return createFactory(type)}if(type.isReactNonLegacyFactory){if("production"!==process.env.NODE_ENV){warnForNonLegacyFactory(type)}return createFactory(type.type)}if(type.isReactLegacyFactory){return createFactory(type.type)}if("production"!==process.env.NODE_ENV){warnForPlainFunctionType(type)}return type};return legacyCreateFactory};ReactLegacyElementFactory.wrapCreateElement=function(createElement){var legacyCreateElement=function(type,props,children){if(typeof type!=="function"){return createElement.apply(this,arguments)}var args;if(type.isReactNonLegacyFactory){if("production"!==process.env.NODE_ENV){warnForNonLegacyFactory(type)}args=Array.prototype.slice.call(arguments,0);args[0]=type.type;return createElement.apply(this,args)}if(type.isReactLegacyFactory){if(type._isMockFunction){type.type._mockedReactClassConstructor=type}args=Array.prototype.slice.call(arguments,0);args[0]=type.type;return createElement.apply(this,args)}if("production"!==process.env.NODE_ENV){warnForPlainFunctionType(type)}return type.apply(null,Array.prototype.slice.call(arguments,1))};return legacyCreateElement};ReactLegacyElementFactory.wrapFactory=function(factory){"production"!==process.env.NODE_ENV?invariant(typeof factory==="function","This is suppose to accept a element factory"):invariant(typeof factory==="function");var legacyElementFactory=function(config,children){if("production"!==process.env.NODE_ENV){warnForLegacyFactoryCall()}return factory.apply(this,arguments)};proxyStaticMethods(legacyElementFactory,factory.type);legacyElementFactory.isReactLegacyFactory=LEGACY_MARKER;legacyElementFactory.type=factory.type;return legacyElementFactory};ReactLegacyElementFactory.markNonLegacyFactory=function(factory){factory.isReactNonLegacyFactory=NON_LEGACY_MARKER;return factory};ReactLegacyElementFactory.isValidFactory=function(factory){return typeof factory==="function"&&factory.isReactLegacyFactory===LEGACY_MARKER};ReactLegacyElementFactory.isValidClass=function(factory){if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(false,"isValidClass is deprecated and will be removed in a future release. "+"Use a more specific validator instead."):null}return ReactLegacyElementFactory.isValidFactory(factory)};ReactLegacyElementFactory._isLegacyCallWarningEnabled=true;module.exports=ReactLegacyElementFactory}).call(this,require("_process"))},{"./ReactCurrentOwner":42,"./invariant":141,"./monitorCodeUse":151,"./warning":161,_process:1}],68:[function(require,module,exports){"use strict";var React=require("./React");function ReactLink(value,requestChange){this.value=value;this.requestChange=requestChange}function createLinkTypeChecker(linkType){var shapes={value:typeof linkType==="undefined"?React.PropTypes.any.isRequired:linkType.isRequired,requestChange:React.PropTypes.func.isRequired};return React.PropTypes.shape(shapes)}ReactLink.PropTypes={link:createLinkTypeChecker};module.exports=ReactLink},{"./React":31}],69:[function(require,module,exports){"use strict";var adler32=require("./adler32");var ReactMarkupChecksum={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(markup){var checksum=adler32(markup);return markup.replace(">"," "+ReactMarkupChecksum.CHECKSUM_ATTR_NAME+'="'+checksum+'">')},canReuseMarkup:function(markup,element){var existingChecksum=element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);existingChecksum=existingChecksum&&parseInt(existingChecksum,10);var markupChecksum=adler32(markup);return markupChecksum===existingChecksum}};module.exports=ReactMarkupChecksum},{"./adler32":111}],70:[function(require,module,exports){(function(process){"use strict";var DOMProperty=require("./DOMProperty");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactElement=require("./ReactElement");var ReactLegacyElement=require("./ReactLegacyElement");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactPerf=require("./ReactPerf");var containsNode=require("./containsNode");var deprecated=require("./deprecated");var getReactRootElementInContainer=require("./getReactRootElementInContainer");var instantiateReactComponent=require("./instantiateReactComponent");var invariant=require("./invariant");var shouldUpdateReactComponent=require("./shouldUpdateReactComponent");var warning=require("./warning");var createElement=ReactLegacyElement.wrapCreateElement(ReactElement.createElement);var SEPARATOR=ReactInstanceHandles.SEPARATOR;var ATTR_NAME=DOMProperty.ID_ATTRIBUTE_NAME;var nodeCache={};var ELEMENT_NODE_TYPE=1;var DOC_NODE_TYPE=9;var instancesByReactRootID={};var containersByReactRootID={};if("production"!==process.env.NODE_ENV){var rootElementsByReactRootID={}}var findComponentRootReusableArray=[];function getReactRootID(container){var rootElement=getReactRootElementInContainer(container);return rootElement&&ReactMount.getID(rootElement)}function getID(node){var id=internalGetID(node);if(id){if(nodeCache.hasOwnProperty(id)){var cached=nodeCache[id];if(cached!==node){"production"!==process.env.NODE_ENV?invariant(!isValid(cached,id),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",ATTR_NAME,id):invariant(!isValid(cached,id));nodeCache[id]=node}}else{nodeCache[id]=node}}return id}function internalGetID(node){return node&&node.getAttribute&&node.getAttribute(ATTR_NAME)||""}function setID(node,id){var oldID=internalGetID(node);if(oldID!==id){delete nodeCache[oldID]}node.setAttribute(ATTR_NAME,id);nodeCache[id]=node}function getNode(id){if(!nodeCache.hasOwnProperty(id)||!isValid(nodeCache[id],id)){nodeCache[id]=ReactMount.findReactNodeByID(id)}return nodeCache[id]}function isValid(node,id){if(node){"production"!==process.env.NODE_ENV?invariant(internalGetID(node)===id,"ReactMount: Unexpected modification of `%s`",ATTR_NAME):invariant(internalGetID(node)===id);var container=ReactMount.findReactContainerForID(id);if(container&&containsNode(container,node)){return true}}return false}function purgeID(id){delete nodeCache[id]}var deepestNodeSoFar=null;function findDeepestCachedAncestorImpl(ancestorID){var ancestor=nodeCache[ancestorID];if(ancestor&&isValid(ancestor,ancestorID)){deepestNodeSoFar=ancestor}else{return false}}function findDeepestCachedAncestor(targetID){deepestNodeSoFar=null;ReactInstanceHandles.traverseAncestors(targetID,findDeepestCachedAncestorImpl);var foundNode=deepestNodeSoFar;deepestNodeSoFar=null;return foundNode}var ReactMount={_instancesByReactRootID:instancesByReactRootID,scrollMonitor:function(container,renderCallback){renderCallback()},_updateRootComponent:function(prevComponent,nextComponent,container,callback){var nextProps=nextComponent.props;ReactMount.scrollMonitor(container,function(){prevComponent.replaceProps(nextProps,callback)});if("production"!==process.env.NODE_ENV){rootElementsByReactRootID[getReactRootID(container)]=getReactRootElementInContainer(container)}return prevComponent},_registerComponent:function(nextComponent,container){"production"!==process.env.NODE_ENV?invariant(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE),"_registerComponent(...): Target container is not a DOM element."):invariant(container&&(container.nodeType===ELEMENT_NODE_TYPE||container.nodeType===DOC_NODE_TYPE));ReactBrowserEventEmitter.ensureScrollValueMonitoring();var reactRootID=ReactMount.registerContainer(container);instancesByReactRootID[reactRootID]=nextComponent;return reactRootID},_renderNewRootComponent:ReactPerf.measure("ReactMount","_renderNewRootComponent",function(nextComponent,container,shouldReuseMarkup){"production"!==process.env.NODE_ENV?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."):null;var componentInstance=instantiateReactComponent(nextComponent,null);var reactRootID=ReactMount._registerComponent(componentInstance,container);componentInstance.mountComponentIntoNode(reactRootID,container,shouldReuseMarkup);if("production"!==process.env.NODE_ENV){rootElementsByReactRootID[reactRootID]=getReactRootElementInContainer(container)}return componentInstance}),render:function(nextElement,container,callback){"production"!==process.env.NODE_ENV?invariant(ReactElement.isValidElement(nextElement),"renderComponent(): Invalid component element.%s",typeof nextElement==="string"?" Instead of passing an element string, make sure to instantiate "+"it by passing it to React.createElement.":ReactLegacyElement.isValidFactory(nextElement)?" Instead of passing a component class, make sure to instantiate "+"it by passing it to React.createElement.":typeof nextElement.props!=="undefined"?" This may be caused by unintentionally loading two independent "+"copies of React.":""):invariant(ReactElement.isValidElement(nextElement)); | |
var prevComponent=instancesByReactRootID[getReactRootID(container)];if(prevComponent){var prevElement=prevComponent._currentElement;if(shouldUpdateReactComponent(prevElement,nextElement)){return ReactMount._updateRootComponent(prevComponent,nextElement,container,callback)}else{ReactMount.unmountComponentAtNode(container)}}var reactRootElement=getReactRootElementInContainer(container);var containerHasReactMarkup=reactRootElement&&ReactMount.isRenderedByReact(reactRootElement);var shouldReuseMarkup=containerHasReactMarkup&&!prevComponent;var component=ReactMount._renderNewRootComponent(nextElement,container,shouldReuseMarkup);callback&&callback.call(component);return component},constructAndRenderComponent:function(constructor,props,container){var element=createElement(constructor,props);return ReactMount.render(element,container)},constructAndRenderComponentByID:function(constructor,props,id){var domNode=document.getElementById(id);"production"!==process.env.NODE_ENV?invariant(domNode,'Tried to get element with id of "%s" but it is not present on the page.',id):invariant(domNode);return ReactMount.constructAndRenderComponent(constructor,props,domNode)},registerContainer:function(container){var reactRootID=getReactRootID(container);if(reactRootID){reactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID)}if(!reactRootID){reactRootID=ReactInstanceHandles.createReactRootID()}containersByReactRootID[reactRootID]=container;return reactRootID},unmountComponentAtNode:function(container){"production"!==process.env.NODE_ENV?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."):null;var reactRootID=getReactRootID(container);var component=instancesByReactRootID[reactRootID];if(!component){return false}ReactMount.unmountComponentFromNode(component,container);delete instancesByReactRootID[reactRootID];delete containersByReactRootID[reactRootID];if("production"!==process.env.NODE_ENV){delete rootElementsByReactRootID[reactRootID]}return true},unmountComponentFromNode:function(instance,container){instance.unmountComponent();if(container.nodeType===DOC_NODE_TYPE){container=container.documentElement}while(container.lastChild){container.removeChild(container.lastChild)}},findReactContainerForID:function(id){var reactRootID=ReactInstanceHandles.getReactRootIDFromNodeID(id);var container=containersByReactRootID[reactRootID];if("production"!==process.env.NODE_ENV){var rootElement=rootElementsByReactRootID[reactRootID];if(rootElement&&rootElement.parentNode!==container){"production"!==process.env.NODE_ENV?invariant(internalGetID(rootElement)===reactRootID,"ReactMount: Root element ID differed from reactRootID."):invariant(internalGetID(rootElement)===reactRootID);var containerChild=container.firstChild;if(containerChild&&reactRootID===internalGetID(containerChild)){rootElementsByReactRootID[reactRootID]=containerChild}else{console.warn("ReactMount: Root element has been removed from its original "+"container. New container:",rootElement.parentNode)}}}return container},findReactNodeByID:function(id){var reactRoot=ReactMount.findReactContainerForID(id);return ReactMount.findComponentRoot(reactRoot,id)},isRenderedByReact:function(node){if(node.nodeType!==1){return false}var id=ReactMount.getID(node);return id?id.charAt(0)===SEPARATOR:false},getFirstReactDOM:function(node){var current=node;while(current&¤t.parentNode!==current){if(ReactMount.isRenderedByReact(current)){return current}current=current.parentNode}return null},findComponentRoot:function(ancestorNode,targetID){var firstChildren=findComponentRootReusableArray;var childIndex=0;var deepestAncestor=findDeepestCachedAncestor(targetID)||ancestorNode;firstChildren[0]=deepestAncestor.firstChild;firstChildren.length=1;while(childIndex<firstChildren.length){var child=firstChildren[childIndex++];var targetChild;while(child){var childID=ReactMount.getID(child);if(childID){if(targetID===childID){targetChild=child}else if(ReactInstanceHandles.isAncestorIDOf(childID,targetID)){firstChildren.length=childIndex=0;firstChildren.push(child.firstChild)}}else{firstChildren.push(child.firstChild)}child=child.nextSibling}if(targetChild){firstChildren.length=0;return targetChild}}firstChildren.length=0;"production"!==process.env.NODE_ENV?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)},getReactRootID:getReactRootID,getID:getID,setID:setID,getNode:getNode,purgeID:purgeID};ReactMount.renderComponent=deprecated("ReactMount","renderComponent","render",this,ReactMount.render);module.exports=ReactMount}).call(this,require("_process"))},{"./DOMProperty":12,"./ReactBrowserEventEmitter":33,"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactInstanceHandles":66,"./ReactLegacyElement":67,"./ReactPerf":75,"./containsNode":115,"./deprecated":121,"./getReactRootElementInContainer":135,"./instantiateReactComponent":140,"./invariant":141,"./shouldUpdateReactComponent":157,"./warning":161,_process:1}],71:[function(require,module,exports){"use strict";var ReactComponent=require("./ReactComponent");var ReactMultiChildUpdateTypes=require("./ReactMultiChildUpdateTypes");var flattenChildren=require("./flattenChildren");var instantiateReactComponent=require("./instantiateReactComponent");var shouldUpdateReactComponent=require("./shouldUpdateReactComponent");var updateDepth=0;var updateQueue=[];var markupQueue=[];function enqueueMarkup(parentID,markup,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.INSERT_MARKUP,markupIndex:markupQueue.push(markup)-1,textContent:null,fromIndex:null,toIndex:toIndex})}function enqueueMove(parentID,fromIndex,toIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:fromIndex,toIndex:toIndex})}function enqueueRemove(parentID,fromIndex){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:fromIndex,toIndex:null})}function enqueueTextContent(parentID,textContent){updateQueue.push({parentID:parentID,parentNode:null,type:ReactMultiChildUpdateTypes.TEXT_CONTENT,markupIndex:null,textContent:textContent,fromIndex:null,toIndex:null})}function processQueue(){if(updateQueue.length){ReactComponent.BackendIDOperations.dangerouslyProcessChildrenUpdates(updateQueue,markupQueue);clearQueue()}}function clearQueue(){updateQueue.length=0;markupQueue.length=0}var ReactMultiChild={Mixin:{mountChildren:function(nestedChildren,transaction){var children=flattenChildren(nestedChildren);var mountImages=[];var index=0;this._renderedChildren=children;for(var name in children){var child=children[name];if(children.hasOwnProperty(name)){var childInstance=instantiateReactComponent(child,null);children[name]=childInstance;var rootID=this._rootNodeID+name;var mountImage=childInstance.mountComponent(rootID,transaction,this._mountDepth+1);childInstance._mountIndex=index;mountImages.push(mountImage);index++}}return mountImages},updateTextContent:function(nextContent){updateDepth++;var errorThrown=true;try{var prevChildren=this._renderedChildren;for(var name in prevChildren){if(prevChildren.hasOwnProperty(name)){this._unmountChildByName(prevChildren[name],name)}}this.setTextContent(nextContent);errorThrown=false}finally{updateDepth--;if(!updateDepth){errorThrown?clearQueue():processQueue()}}},updateChildren:function(nextNestedChildren,transaction){updateDepth++;var errorThrown=true;try{this._updateChildren(nextNestedChildren,transaction);errorThrown=false}finally{updateDepth--;if(!updateDepth){errorThrown?clearQueue():processQueue()}}},_updateChildren:function(nextNestedChildren,transaction){var nextChildren=flattenChildren(nextNestedChildren);var prevChildren=this._renderedChildren;if(!nextChildren&&!prevChildren){return}var name;var lastIndex=0;var nextIndex=0;for(name in nextChildren){if(!nextChildren.hasOwnProperty(name)){continue}var prevChild=prevChildren&&prevChildren[name];var prevElement=prevChild&&prevChild._currentElement;var nextElement=nextChildren[name];if(shouldUpdateReactComponent(prevElement,nextElement)){this.moveChild(prevChild,nextIndex,lastIndex);lastIndex=Math.max(prevChild._mountIndex,lastIndex);prevChild.receiveComponent(nextElement,transaction);prevChild._mountIndex=nextIndex}else{if(prevChild){lastIndex=Math.max(prevChild._mountIndex,lastIndex);this._unmountChildByName(prevChild,name)}var nextChildInstance=instantiateReactComponent(nextElement,null);this._mountChildByNameAtIndex(nextChildInstance,name,nextIndex,transaction)}nextIndex++}for(name in prevChildren){if(prevChildren.hasOwnProperty(name)&&!(nextChildren&&nextChildren[name])){this._unmountChildByName(prevChildren[name],name)}}},unmountChildren:function(){var renderedChildren=this._renderedChildren;for(var name in renderedChildren){var renderedChild=renderedChildren[name];if(renderedChild.unmountComponent){renderedChild.unmountComponent()}}this._renderedChildren=null},moveChild:function(child,toIndex,lastIndex){if(child._mountIndex<lastIndex){enqueueMove(this._rootNodeID,child._mountIndex,toIndex)}},createChild:function(child,mountImage){enqueueMarkup(this._rootNodeID,mountImage,child._mountIndex)},removeChild:function(child){enqueueRemove(this._rootNodeID,child._mountIndex)},setTextContent:function(textContent){enqueueTextContent(this._rootNodeID,textContent)},_mountChildByNameAtIndex:function(child,name,index,transaction){var rootID=this._rootNodeID+name;var mountImage=child.mountComponent(rootID,transaction,this._mountDepth+1);child._mountIndex=index;this.createChild(child,mountImage);this._renderedChildren=this._renderedChildren||{};this._renderedChildren[name]=child},_unmountChildByName:function(child,name){this.removeChild(child);child._mountIndex=null;child.unmountComponent();delete this._renderedChildren[name]}}};module.exports=ReactMultiChild},{"./ReactComponent":37,"./ReactMultiChildUpdateTypes":72,"./flattenChildren":125,"./instantiateReactComponent":140,"./shouldUpdateReactComponent":157}],72:[function(require,module,exports){"use strict";var keyMirror=require("./keyMirror");var ReactMultiChildUpdateTypes=keyMirror({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});module.exports=ReactMultiChildUpdateTypes},{"./keyMirror":147}],73:[function(require,module,exports){(function(process){"use strict";var assign=require("./Object.assign");var invariant=require("./invariant");var genericComponentClass=null;var tagToComponentClass={};var ReactNativeComponentInjection={injectGenericComponentClass:function(componentClass){genericComponentClass=componentClass},injectComponentClasses:function(componentClasses){assign(tagToComponentClass,componentClasses)}};function createInstanceForTag(tag,props,parentType){var componentClass=tagToComponentClass[tag];if(componentClass==null){"production"!==process.env.NODE_ENV?invariant(genericComponentClass,"There is no registered component for the tag %s",tag):invariant(genericComponentClass);return new genericComponentClass(tag,props)}if(parentType===tag){"production"!==process.env.NODE_ENV?invariant(genericComponentClass,"There is no registered component for the tag %s",tag):invariant(genericComponentClass);return new genericComponentClass(tag,props)}return new componentClass.type(props)}var ReactNativeComponent={createInstanceForTag:createInstanceForTag,injection:ReactNativeComponentInjection};module.exports=ReactNativeComponent}).call(this,require("_process"))},{"./Object.assign":29,"./invariant":141,_process:1}],74:[function(require,module,exports){(function(process){"use strict";var emptyObject=require("./emptyObject");var invariant=require("./invariant");var ReactOwner={isValidOwner:function(object){return!!(object&&typeof object.attachRef==="function"&&typeof object.detachRef==="function")},addComponentAsRefTo:function(component,ref,owner){"production"!==process.env.NODE_ENV?invariant(ReactOwner.isValidOwner(owner),"addComponentAsRefTo(...): Only a ReactOwner can have refs. This "+"usually means that you're trying to add a ref to a component that "+"doesn't have an owner (that is, was not created inside of another "+"component's `render` method). Try rendering this component inside of "+"a new top-level component which will hold the ref."):invariant(ReactOwner.isValidOwner(owner));owner.attachRef(ref,component)},removeComponentAsRefFrom:function(component,ref,owner){"production"!==process.env.NODE_ENV?invariant(ReactOwner.isValidOwner(owner),"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This "+"usually means that you're trying to remove a ref to a component that "+"doesn't have an owner (that is, was not created inside of another "+"component's `render` method). Try rendering this component inside of "+"a new top-level component which will hold the ref."):invariant(ReactOwner.isValidOwner(owner));if(owner.refs[ref]===component){owner.detachRef(ref)}},Mixin:{construct:function(){this.refs=emptyObject},attachRef:function(ref,component){"production"!==process.env.NODE_ENV?invariant(component.isOwnedBy(this),"attachRef(%s, ...): Only a component's owner can store a ref to it.",ref):invariant(component.isOwnedBy(this));var refs=this.refs===emptyObject?this.refs={}:this.refs;refs[ref]=component},detachRef:function(ref){delete this.refs[ref]}}};module.exports=ReactOwner}).call(this,require("_process"))},{"./emptyObject":123,"./invariant":141,_process:1}],75:[function(require,module,exports){(function(process){"use strict";var ReactPerf={enableMeasure:false,storedMeasure:_noMeasure,measure:function(objName,fnName,func){if("production"!==process.env.NODE_ENV){var measuredFunc=null;var wrapper=function(){if(ReactPerf.enableMeasure){if(!measuredFunc){measuredFunc=ReactPerf.storedMeasure(objName,fnName,func)}return measuredFunc.apply(this,arguments)}return func.apply(this,arguments)};wrapper.displayName=objName+"_"+fnName;return wrapper}return func},injection:{injectMeasure:function(measure){ReactPerf.storedMeasure=measure}}};function _noMeasure(objName,fnName,func){return func}module.exports=ReactPerf}).call(this,require("_process"))},{_process:1}],76:[function(require,module,exports){(function(process){"use strict";var assign=require("./Object.assign");var emptyFunction=require("./emptyFunction");var invariant=require("./invariant");var joinClasses=require("./joinClasses");var warning=require("./warning");var didWarn=false;function createTransferStrategy(mergeStrategy){return function(props,key,value){if(!props.hasOwnProperty(key)){props[key]=value}else{props[key]=mergeStrategy(props[key],value)}}}var transferStrategyMerge=createTransferStrategy(function(a,b){return assign({},b,a)});var TransferStrategies={children:emptyFunction,className:createTransferStrategy(joinClasses),style:transferStrategyMerge};function transferInto(props,newProps){for(var thisKey in newProps){if(!newProps.hasOwnProperty(thisKey)){continue}var transferStrategy=TransferStrategies[thisKey];if(transferStrategy&&TransferStrategies.hasOwnProperty(thisKey)){transferStrategy(props,thisKey,newProps[thisKey])}else if(!props.hasOwnProperty(thisKey)){props[thisKey]=newProps[thisKey]}}return props}var ReactPropTransferer={TransferStrategies:TransferStrategies,mergeProps:function(oldProps,newProps){return transferInto(assign({},oldProps),newProps)},Mixin:{transferPropsTo:function(element){"production"!==process.env.NODE_ENV?invariant(element._owner===this,"%s: You can't call transferPropsTo() on a component that you "+"don't own, %s. This usually means you are calling "+"transferPropsTo() on a component passed in as props or children.",this.constructor.displayName,typeof element.type==="string"?element.type:element.type.displayName):invariant(element._owner===this);if("production"!==process.env.NODE_ENV){if(!didWarn){didWarn=true;"production"!==process.env.NODE_ENV?warning(false,"transferPropsTo is deprecated. "+"See http://fb.me/react-transferpropsto for more information."):null}}transferInto(element.props,this.props);return element}}};module.exports=ReactPropTransferer}).call(this,require("_process"))},{"./Object.assign":29,"./emptyFunction":122,"./invariant":141,"./joinClasses":146,"./warning":161,_process:1}],77:[function(require,module,exports){(function(process){"use strict";var ReactPropTypeLocationNames={};if("production"!==process.env.NODE_ENV){ReactPropTypeLocationNames={prop:"prop",context:"context",childContext:"child context"}}module.exports=ReactPropTypeLocationNames}).call(this,require("_process"))},{_process:1}],78:[function(require,module,exports){"use strict";var keyMirror=require("./keyMirror");var ReactPropTypeLocations=keyMirror({prop:null,context:null,childContext:null});module.exports=ReactPropTypeLocations},{"./keyMirror":147}],79:[function(require,module,exports){"use strict";var ReactElement=require("./ReactElement");var ReactPropTypeLocationNames=require("./ReactPropTypeLocationNames");var deprecated=require("./deprecated");var emptyFunction=require("./emptyFunction");var ANONYMOUS="<<anonymous>>";var elementTypeChecker=createElementTypeChecker();var nodeTypeChecker=createNodeChecker();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:elementTypeChecker,instanceOf:createInstanceTypeChecker,node:nodeTypeChecker,objectOf:createObjectOfTypeChecker,oneOf:createEnumTypeChecker,oneOfType:createUnionTypeChecker,shape:createShapeTypeChecker,component:deprecated("React.PropTypes","component","element",this,elementTypeChecker),renderable:deprecated("React.PropTypes","renderable","node",this,nodeTypeChecker)};function createChainableTypeChecker(validate){function checkType(isRequired,props,propName,componentName,location){componentName=componentName||ANONYMOUS;if(props[propName]==null){var locationName=ReactPropTypeLocationNames[location];if(isRequired){return new Error("Required "+locationName+" `"+propName+"` was not specified in "+("`"+componentName+"`."))}}else{return validate(props,propName,componentName,location)}}var chainedCheckType=checkType.bind(null,false);chainedCheckType.isRequired=checkType.bind(null,true);return chainedCheckType}function createPrimitiveTypeChecker(expectedType){function validate(props,propName,componentName,location){var propValue=props[propName];var propType=getPropType(propValue);if(propType!==expectedType){var locationName=ReactPropTypeLocationNames[location];var preciseType=getPreciseType(propValue);return new Error("Invalid "+locationName+" `"+propName+"` of type `"+preciseType+"` "+("supplied to `"+componentName+"`, expected `"+expectedType+"`."))}}return createChainableTypeChecker(validate)}function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunction.thatReturns())}function createArrayOfTypeChecker(typeChecker){function validate(props,propName,componentName,location){var propValue=props[propName];if(!Array.isArray(propValue)){var locationName=ReactPropTypeLocationNames[location];var propType=getPropType(propValue);return new Error("Invalid "+locationName+" `"+propName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an array."))}for(var i=0;i<propValue.length;i++){var error=typeChecker(propValue,i,componentName,location);if(error instanceof Error){return error}}}return createChainableTypeChecker(validate)}function createElementTypeChecker(){function validate(props,propName,componentName,location){if(!ReactElement.isValidElement(props[propName])){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propName+"` supplied to "+("`"+componentName+"`, expected a ReactElement."))}}return createChainableTypeChecker(validate)}function createInstanceTypeChecker(expectedClass){function validate(props,propName,componentName,location){if(!(props[propName]instanceof expectedClass)){var locationName=ReactPropTypeLocationNames[location];var expectedClassName=expectedClass.name||ANONYMOUS;return new Error("Invalid "+locationName+" `"+propName+"` supplied to "+("`"+componentName+"`, expected instance of `"+expectedClassName+"`."))}}return createChainableTypeChecker(validate)}function createEnumTypeChecker(expectedValues){function validate(props,propName,componentName,location){var propValue=props[propName];for(var i=0;i<expectedValues.length;i++){if(propValue===expectedValues[i]){return}}var locationName=ReactPropTypeLocationNames[location];var valuesString=JSON.stringify(expectedValues);return new Error("Invalid "+locationName+" `"+propName+"` of value `"+propValue+"` "+("supplied to `"+componentName+"`, expected one of "+valuesString+"."))}return createChainableTypeChecker(validate)}function createObjectOfTypeChecker(typeChecker){function validate(props,propName,componentName,location){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propName+"` of type "+("`"+propType+"` supplied to `"+componentName+"`, expected an object."))}for(var key in propValue){if(propValue.hasOwnProperty(key)){var error=typeChecker(propValue,key,componentName,location);if(error instanceof Error){return error}}}}return createChainableTypeChecker(validate)}function createUnionTypeChecker(arrayOfTypeCheckers){function validate(props,propName,componentName,location){for(var i=0;i<arrayOfTypeCheckers.length;i++){var checker=arrayOfTypeCheckers[i];if(checker(props,propName,componentName,location)==null){return}}var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propName+"` supplied to "+("`"+componentName+"`."))}return createChainableTypeChecker(validate)}function createNodeChecker(){function validate(props,propName,componentName,location){if(!isNode(props[propName])){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propName+"` supplied to "+("`"+componentName+"`, expected a ReactNode."))}}return createChainableTypeChecker(validate)}function createShapeTypeChecker(shapeTypes){function validate(props,propName,componentName,location){var propValue=props[propName];var propType=getPropType(propValue);if(propType!=="object"){var locationName=ReactPropTypeLocationNames[location];return new Error("Invalid "+locationName+" `"+propName+"` of type `"+propType+"` "+("supplied to `"+componentName+"`, expected `object`."))}for(var key in shapeTypes){var checker=shapeTypes[key];if(!checker){continue}var error=checker(propValue,key,componentName,location);if(error){return error}}}return createChainableTypeChecker(validate,"expected `object`")}function isNode(propValue){switch(typeof propValue){case"number":case"string":return true;case"boolean":return!propValue;case"object":if(Array.isArray(propValue)){return propValue.every(isNode)}if(ReactElement.isValidElement(propValue)){return true}for(var k in propValue){if(!isNode(propValue[k])){return false}}return true;default:return false}}function getPropType(propValue){var propType=typeof propValue;if(Array.isArray(propValue)){return"array"}if(propValue instanceof RegExp){return"object"}return propType}function getPreciseType(propValue){var propType=getPropType(propValue);if(propType==="object"){if(propValue instanceof Date){return"date"}else if(propValue instanceof RegExp){return"regexp"}}return propType}module.exports=ReactPropTypes},{"./ReactElement":58,"./ReactPropTypeLocationNames":77,"./deprecated":121,"./emptyFunction":122}],80:[function(require,module,exports){"use strict";var PooledClass=require("./PooledClass");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var assign=require("./Object.assign");function ReactPutListenerQueue(){this.listenersToPut=[]}assign(ReactPutListenerQueue.prototype,{enqueuePutListener:function(rootNodeID,propKey,propValue){this.listenersToPut.push({rootNodeID:rootNodeID,propKey:propKey,propValue:propValue})},putListeners:function(){for(var i=0;i<this.listenersToPut.length;i++){var listenerToPut=this.listenersToPut[i];ReactBrowserEventEmitter.putListener(listenerToPut.rootNodeID,listenerToPut.propKey,listenerToPut.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}});PooledClass.addPoolingTo(ReactPutListenerQueue);module.exports=ReactPutListenerQueue},{"./Object.assign":29,"./PooledClass":30,"./ReactBrowserEventEmitter":33}],81:[function(require,module,exports){"use strict";var CallbackQueue=require("./CallbackQueue");var PooledClass=require("./PooledClass");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactInputSelection=require("./ReactInputSelection");var ReactPutListenerQueue=require("./ReactPutListenerQueue");var Transaction=require("./Transaction");var assign=require("./Object.assign");var SELECTION_RESTORATION={initialize:ReactInputSelection.getSelectionInformation,close:ReactInputSelection.restoreSelection};var EVENT_SUPPRESSION={initialize:function(){var currentlyEnabled=ReactBrowserEventEmitter.isEnabled();ReactBrowserEventEmitter.setEnabled(false);return currentlyEnabled},close:function(previouslyEnabled){ReactBrowserEventEmitter.setEnabled(previouslyEnabled)}};var ON_DOM_READY_QUEUEING={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}};var PUT_LISTENER_QUEUEING={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}};var TRANSACTION_WRAPPERS=[PUT_LISTENER_QUEUEING,SELECTION_RESTORATION,EVENT_SUPPRESSION,ON_DOM_READY_QUEUEING];function ReactReconcileTransaction(){this.reinitializeTransaction();this.renderToStaticMarkup=false;this.reactMountReady=CallbackQueue.getPooled(null);this.putListenerQueue=ReactPutListenerQueue.getPooled()}var Mixin={getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){CallbackQueue.release(this.reactMountReady);this.reactMountReady=null;ReactPutListenerQueue.release(this.putListenerQueue);this.putListenerQueue=null}};assign(ReactReconcileTransaction.prototype,Transaction.Mixin,Mixin);PooledClass.addPoolingTo(ReactReconcileTransaction);module.exports=ReactReconcileTransaction},{"./CallbackQueue":7,"./Object.assign":29,"./PooledClass":30,"./ReactBrowserEventEmitter":33,"./ReactInputSelection":65,"./ReactPutListenerQueue":80,"./Transaction":108}],82:[function(require,module,exports){"use strict";var ReactRootIndexInjection={injectCreateReactRootIndex:function(_createReactRootIndex){ReactRootIndex.createReactRootIndex=_createReactRootIndex}};var ReactRootIndex={createReactRootIndex:null,injection:ReactRootIndexInjection};module.exports=ReactRootIndex},{}],83:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactInstanceHandles=require("./ReactInstanceHandles");var ReactMarkupChecksum=require("./ReactMarkupChecksum");var ReactServerRenderingTransaction=require("./ReactServerRenderingTransaction");var instantiateReactComponent=require("./instantiateReactComponent");var invariant=require("./invariant");function renderToString(element){"production"!==process.env.NODE_ENV?invariant(ReactElement.isValidElement(element),"renderToString(): You must pass a valid ReactElement."):invariant(ReactElement.isValidElement(element));var transaction;try{var id=ReactInstanceHandles.createReactRootID();transaction=ReactServerRenderingTransaction.getPooled(false);return transaction.perform(function(){var componentInstance=instantiateReactComponent(element,null);var markup=componentInstance.mountComponent(id,transaction,0);return ReactMarkupChecksum.addChecksumToMarkup(markup)},null)}finally{ReactServerRenderingTransaction.release(transaction)}}function renderToStaticMarkup(element){"production"!==process.env.NODE_ENV?invariant(ReactElement.isValidElement(element),"renderToStaticMarkup(): You must pass a valid ReactElement."):invariant(ReactElement.isValidElement(element));var transaction;try{var id=ReactInstanceHandles.createReactRootID();transaction=ReactServerRenderingTransaction.getPooled(true);return transaction.perform(function(){var componentInstance=instantiateReactComponent(element,null);return componentInstance.mountComponent(id,transaction,0)},null)}finally{ReactServerRenderingTransaction.release(transaction)}}module.exports={renderToString:renderToString,renderToStaticMarkup:renderToStaticMarkup}}).call(this,require("_process"))},{"./ReactElement":58,"./ReactInstanceHandles":66,"./ReactMarkupChecksum":69,"./ReactServerRenderingTransaction":84,"./instantiateReactComponent":140,"./invariant":141,_process:1}],84:[function(require,module,exports){"use strict";var PooledClass=require("./PooledClass");var CallbackQueue=require("./CallbackQueue");var ReactPutListenerQueue=require("./ReactPutListenerQueue");var Transaction=require("./Transaction");var assign=require("./Object.assign");var emptyFunction=require("./emptyFunction");var ON_DOM_READY_QUEUEING={initialize:function(){this.reactMountReady.reset()},close:emptyFunction};var PUT_LISTENER_QUEUEING={initialize:function(){this.putListenerQueue.reset()},close:emptyFunction};var TRANSACTION_WRAPPERS=[PUT_LISTENER_QUEUEING,ON_DOM_READY_QUEUEING];function ReactServerRenderingTransaction(renderToStaticMarkup){this.reinitializeTransaction();this.renderToStaticMarkup=renderToStaticMarkup;this.reactMountReady=CallbackQueue.getPooled(null);this.putListenerQueue=ReactPutListenerQueue.getPooled()}var Mixin={getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){CallbackQueue.release(this.reactMountReady);this.reactMountReady=null;ReactPutListenerQueue.release(this.putListenerQueue);this.putListenerQueue=null}};assign(ReactServerRenderingTransaction.prototype,Transaction.Mixin,Mixin);PooledClass.addPoolingTo(ReactServerRenderingTransaction);module.exports=ReactServerRenderingTransaction},{"./CallbackQueue":7,"./Object.assign":29,"./PooledClass":30,"./ReactPutListenerQueue":80,"./Transaction":108,"./emptyFunction":122}],85:[function(require,module,exports){"use strict";var ReactStateSetters={createStateSetter:function(component,funcReturningState){return function(a,b,c,d,e,f){var partialState=funcReturningState.call(component,a,b,c,d,e,f);if(partialState){component.setState(partialState)}}},createStateKeySetter:function(component,key){var cache=component.__keySetters||(component.__keySetters={});return cache[key]||(cache[key]=createStateKeySetter(component,key))}};function createStateKeySetter(component,key){var partialState={};return function stateKeySetter(value){partialState[key]=value;component.setState(partialState)}}ReactStateSetters.Mixin={createStateSetter:function(funcReturningState){return ReactStateSetters.createStateSetter(this,funcReturningState)},createStateKeySetter:function(key){return ReactStateSetters.createStateKeySetter(this,key)}};module.exports=ReactStateSetters},{}],86:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants"); | |
var EventPluginHub=require("./EventPluginHub");var EventPropagators=require("./EventPropagators");var React=require("./React");var ReactElement=require("./ReactElement");var ReactBrowserEventEmitter=require("./ReactBrowserEventEmitter");var ReactMount=require("./ReactMount");var ReactTextComponent=require("./ReactTextComponent");var ReactUpdates=require("./ReactUpdates");var SyntheticEvent=require("./SyntheticEvent");var assign=require("./Object.assign");var topLevelTypes=EventConstants.topLevelTypes;function Event(suffix){}var ReactTestUtils={renderIntoDocument:function(instance){var div=document.createElement("div");return React.render(instance,div)},isElement:function(element){return ReactElement.isValidElement(element)},isElementOfType:function(inst,convenienceConstructor){return ReactElement.isValidElement(inst)&&inst.type===convenienceConstructor.type},isDOMComponent:function(inst){return!!(inst&&inst.mountComponent&&inst.tagName)},isDOMComponentElement:function(inst){return!!(inst&&ReactElement.isValidElement(inst)&&!!inst.tagName)},isCompositeComponent:function(inst){return typeof inst.render==="function"&&typeof inst.setState==="function"},isCompositeComponentWithType:function(inst,type){return!!(ReactTestUtils.isCompositeComponent(inst)&&inst.constructor===type.type)},isCompositeComponentElement:function(inst){if(!ReactElement.isValidElement(inst)){return false}var prototype=inst.type.prototype;return typeof prototype.render==="function"&&typeof prototype.setState==="function"},isCompositeComponentElementWithType:function(inst,type){return!!(ReactTestUtils.isCompositeComponentElement(inst)&&inst.constructor===type)},isTextComponent:function(inst){return inst instanceof ReactTextComponent.type},findAllInRenderedTree:function(inst,test){if(!inst){return[]}var ret=test(inst)?[inst]:[];if(ReactTestUtils.isDOMComponent(inst)){var renderedChildren=inst._renderedChildren;var key;for(key in renderedChildren){if(!renderedChildren.hasOwnProperty(key)){continue}ret=ret.concat(ReactTestUtils.findAllInRenderedTree(renderedChildren[key],test))}}else if(ReactTestUtils.isCompositeComponent(inst)){ret=ret.concat(ReactTestUtils.findAllInRenderedTree(inst._renderedComponent,test))}return ret},scryRenderedDOMComponentsWithClass:function(root,className){return ReactTestUtils.findAllInRenderedTree(root,function(inst){var instClassName=inst.props.className;return ReactTestUtils.isDOMComponent(inst)&&(instClassName&&(" "+instClassName+" ").indexOf(" "+className+" ")!==-1)})},findRenderedDOMComponentWithClass:function(root,className){var all=ReactTestUtils.scryRenderedDOMComponentsWithClass(root,className);if(all.length!==1){throw new Error("Did not find exactly one match for class:"+className)}return all[0]},scryRenderedDOMComponentsWithTag:function(root,tagName){return ReactTestUtils.findAllInRenderedTree(root,function(inst){return ReactTestUtils.isDOMComponent(inst)&&inst.tagName===tagName.toUpperCase()})},findRenderedDOMComponentWithTag:function(root,tagName){var all=ReactTestUtils.scryRenderedDOMComponentsWithTag(root,tagName);if(all.length!==1){throw new Error("Did not find exactly one match for tag:"+tagName)}return all[0]},scryRenderedComponentsWithType:function(root,componentType){return ReactTestUtils.findAllInRenderedTree(root,function(inst){return ReactTestUtils.isCompositeComponentWithType(inst,componentType)})},findRenderedComponentWithType:function(root,componentType){var all=ReactTestUtils.scryRenderedComponentsWithType(root,componentType);if(all.length!==1){throw new Error("Did not find exactly one match for componentType:"+componentType)}return all[0]},mockComponent:function(module,mockTagName){mockTagName=mockTagName||module.mockTagName||"div";var ConvenienceConstructor=React.createClass({displayName:"ConvenienceConstructor",render:function(){return React.createElement(mockTagName,null,this.props.children)}});module.mockImplementation(ConvenienceConstructor);module.type=ConvenienceConstructor.type;module.isReactLegacyFactory=true;return this},simulateNativeEventOnNode:function(topLevelType,node,fakeNativeEvent){fakeNativeEvent.target=node;ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(topLevelType,fakeNativeEvent)},simulateNativeEventOnDOMComponent:function(topLevelType,comp,fakeNativeEvent){ReactTestUtils.simulateNativeEventOnNode(topLevelType,comp.getDOMNode(),fakeNativeEvent)},nativeTouchData:function(x,y){return{touches:[{pageX:x,pageY:y}]}},Simulate:null,SimulateNative:{}};function makeSimulator(eventType){return function(domComponentOrNode,eventData){var node;if(ReactTestUtils.isDOMComponent(domComponentOrNode)){node=domComponentOrNode.getDOMNode()}else if(domComponentOrNode.tagName){node=domComponentOrNode}var fakeNativeEvent=new Event;fakeNativeEvent.target=node;var event=new SyntheticEvent(ReactBrowserEventEmitter.eventNameDispatchConfigs[eventType],ReactMount.getID(node),fakeNativeEvent);assign(event,eventData);EventPropagators.accumulateTwoPhaseDispatches(event);ReactUpdates.batchedUpdates(function(){EventPluginHub.enqueueEvents(event);EventPluginHub.processEventQueue()})}}function buildSimulators(){ReactTestUtils.Simulate={};var eventType;for(eventType in ReactBrowserEventEmitter.eventNameDispatchConfigs){ReactTestUtils.Simulate[eventType]=makeSimulator(eventType)}}var oldInjectEventPluginOrder=EventPluginHub.injection.injectEventPluginOrder;EventPluginHub.injection.injectEventPluginOrder=function(){oldInjectEventPluginOrder.apply(this,arguments);buildSimulators()};var oldInjectEventPlugins=EventPluginHub.injection.injectEventPluginsByName;EventPluginHub.injection.injectEventPluginsByName=function(){oldInjectEventPlugins.apply(this,arguments);buildSimulators()};buildSimulators();function makeNativeSimulator(eventType){return function(domComponentOrNode,nativeEventData){var fakeNativeEvent=new Event(eventType);assign(fakeNativeEvent,nativeEventData);if(ReactTestUtils.isDOMComponent(domComponentOrNode)){ReactTestUtils.simulateNativeEventOnDOMComponent(eventType,domComponentOrNode,fakeNativeEvent)}else if(!!domComponentOrNode.tagName){ReactTestUtils.simulateNativeEventOnNode(eventType,domComponentOrNode,fakeNativeEvent)}}}var eventType;for(eventType in topLevelTypes){var convenienceName=eventType.indexOf("top")===0?eventType.charAt(3).toLowerCase()+eventType.substr(4):eventType;ReactTestUtils.SimulateNative[convenienceName]=makeNativeSimulator(eventType)}module.exports=ReactTestUtils},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./Object.assign":29,"./React":31,"./ReactBrowserEventEmitter":33,"./ReactElement":58,"./ReactMount":70,"./ReactTextComponent":87,"./ReactUpdates":91,"./SyntheticEvent":100}],87:[function(require,module,exports){"use strict";var DOMPropertyOperations=require("./DOMPropertyOperations");var ReactComponent=require("./ReactComponent");var ReactElement=require("./ReactElement");var assign=require("./Object.assign");var escapeTextForBrowser=require("./escapeTextForBrowser");var ReactTextComponent=function(props){};assign(ReactTextComponent.prototype,ReactComponent.Mixin,{mountComponent:function(rootID,transaction,mountDepth){ReactComponent.Mixin.mountComponent.call(this,rootID,transaction,mountDepth);var escapedText=escapeTextForBrowser(this.props);if(transaction.renderToStaticMarkup){return escapedText}return"<span "+DOMPropertyOperations.createMarkupForID(rootID)+">"+escapedText+"</span>"},receiveComponent:function(nextComponent,transaction){var nextProps=nextComponent.props;if(nextProps!==this.props){this.props=nextProps;ReactComponent.BackendIDOperations.updateTextContentByID(this._rootNodeID,nextProps)}}});var ReactTextComponentFactory=function(text){return new ReactElement(ReactTextComponent,null,null,null,null,text)};ReactTextComponentFactory.type=ReactTextComponent;module.exports=ReactTextComponentFactory},{"./DOMPropertyOperations":13,"./Object.assign":29,"./ReactComponent":37,"./ReactElement":58,"./escapeTextForBrowser":124}],88:[function(require,module,exports){"use strict";var ReactChildren=require("./ReactChildren");var ReactTransitionChildMapping={getChildMapping:function(children){return ReactChildren.map(children,function(child){return child})},mergeChildMappings:function(prev,next){prev=prev||{};next=next||{};function getValueForKey(key){if(next.hasOwnProperty(key)){return next[key]}else{return prev[key]}}var nextKeysPending={};var pendingKeys=[];for(var prevKey in prev){if(next.hasOwnProperty(prevKey)){if(pendingKeys.length){nextKeysPending[prevKey]=pendingKeys;pendingKeys=[]}}else{pendingKeys.push(prevKey)}}var i;var childMapping={};for(var nextKey in next){if(nextKeysPending.hasOwnProperty(nextKey)){for(i=0;i<nextKeysPending[nextKey].length;i++){var pendingNextKey=nextKeysPending[nextKey][i];childMapping[nextKeysPending[nextKey][i]]=getValueForKey(pendingNextKey)}}childMapping[nextKey]=getValueForKey(nextKey)}for(i=0;i<pendingKeys.length;i++){childMapping[pendingKeys[i]]=getValueForKey(pendingKeys[i])}return childMapping}};module.exports=ReactTransitionChildMapping},{"./ReactChildren":36}],89:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var EVENT_NAME_MAP={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}};var endEvents=[];function detectEvents(){var testEl=document.createElement("div");var style=testEl.style;if(!("AnimationEvent"in window)){delete EVENT_NAME_MAP.animationend.animation}if(!("TransitionEvent"in window)){delete EVENT_NAME_MAP.transitionend.transition}for(var baseEventName in EVENT_NAME_MAP){var baseEvents=EVENT_NAME_MAP[baseEventName];for(var styleName in baseEvents){if(styleName in style){endEvents.push(baseEvents[styleName]);break}}}}if(ExecutionEnvironment.canUseDOM){detectEvents()}function addEventListener(node,eventName,eventListener){node.addEventListener(eventName,eventListener,false)}function removeEventListener(node,eventName,eventListener){node.removeEventListener(eventName,eventListener,false)}var ReactTransitionEvents={addEndEventListener:function(node,eventListener){if(endEvents.length===0){window.setTimeout(eventListener,0);return}endEvents.forEach(function(endEvent){addEventListener(node,endEvent,eventListener)})},removeEndEventListener:function(node,eventListener){if(endEvents.length===0){return}endEvents.forEach(function(endEvent){removeEventListener(node,endEvent,eventListener)})}};module.exports=ReactTransitionEvents},{"./ExecutionEnvironment":23}],90:[function(require,module,exports){"use strict";var React=require("./React");var ReactTransitionChildMapping=require("./ReactTransitionChildMapping");var assign=require("./Object.assign");var cloneWithProps=require("./cloneWithProps");var emptyFunction=require("./emptyFunction");var ReactTransitionGroup=React.createClass({displayName:"ReactTransitionGroup",propTypes:{component:React.PropTypes.any,childFactory:React.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:emptyFunction.thatReturnsArgument}},getInitialState:function(){return{children:ReactTransitionChildMapping.getChildMapping(this.props.children)}},componentWillReceiveProps:function(nextProps){var nextChildMapping=ReactTransitionChildMapping.getChildMapping(nextProps.children);var prevChildMapping=this.state.children;this.setState({children:ReactTransitionChildMapping.mergeChildMappings(prevChildMapping,nextChildMapping)});var key;for(key in nextChildMapping){var hasPrev=prevChildMapping&&prevChildMapping.hasOwnProperty(key);if(nextChildMapping[key]&&!hasPrev&&!this.currentlyTransitioningKeys[key]){this.keysToEnter.push(key)}}for(key in prevChildMapping){var hasNext=nextChildMapping&&nextChildMapping.hasOwnProperty(key);if(prevChildMapping[key]&&!hasNext&&!this.currentlyTransitioningKeys[key]){this.keysToLeave.push(key)}}},componentWillMount:function(){this.currentlyTransitioningKeys={};this.keysToEnter=[];this.keysToLeave=[]},componentDidUpdate:function(){var keysToEnter=this.keysToEnter;this.keysToEnter=[];keysToEnter.forEach(this.performEnter);var keysToLeave=this.keysToLeave;this.keysToLeave=[];keysToLeave.forEach(this.performLeave)},performEnter:function(key){this.currentlyTransitioningKeys[key]=true;var component=this.refs[key];if(component.componentWillEnter){component.componentWillEnter(this._handleDoneEntering.bind(this,key))}else{this._handleDoneEntering(key)}},_handleDoneEntering:function(key){var component=this.refs[key];if(component.componentDidEnter){component.componentDidEnter()}delete this.currentlyTransitioningKeys[key];var currentChildMapping=ReactTransitionChildMapping.getChildMapping(this.props.children);if(!currentChildMapping||!currentChildMapping.hasOwnProperty(key)){this.performLeave(key)}},performLeave:function(key){this.currentlyTransitioningKeys[key]=true;var component=this.refs[key];if(component.componentWillLeave){component.componentWillLeave(this._handleDoneLeaving.bind(this,key))}else{this._handleDoneLeaving(key)}},_handleDoneLeaving:function(key){var component=this.refs[key];if(component.componentDidLeave){component.componentDidLeave()}delete this.currentlyTransitioningKeys[key];var currentChildMapping=ReactTransitionChildMapping.getChildMapping(this.props.children);if(currentChildMapping&¤tChildMapping.hasOwnProperty(key)){this.performEnter(key)}else{var newChildren=assign({},this.state.children);delete newChildren[key];this.setState({children:newChildren})}},render:function(){var childrenToRender={};for(var key in this.state.children){var child=this.state.children[key];if(child){childrenToRender[key]=cloneWithProps(this.props.childFactory(child),{ref:key})}}return React.createElement(this.props.component,this.props,childrenToRender)}});module.exports=ReactTransitionGroup},{"./Object.assign":29,"./React":31,"./ReactTransitionChildMapping":88,"./cloneWithProps":114,"./emptyFunction":122}],91:[function(require,module,exports){(function(process){"use strict";var CallbackQueue=require("./CallbackQueue");var PooledClass=require("./PooledClass");var ReactCurrentOwner=require("./ReactCurrentOwner");var ReactPerf=require("./ReactPerf");var Transaction=require("./Transaction");var assign=require("./Object.assign");var invariant=require("./invariant");var warning=require("./warning");var dirtyComponents=[];var asapCallbackQueue=CallbackQueue.getPooled();var asapEnqueued=false;var batchingStrategy=null;function ensureInjected(){"production"!==process.env.NODE_ENV?invariant(ReactUpdates.ReactReconcileTransaction&&batchingStrategy,"ReactUpdates: must inject a reconcile transaction class and batching "+"strategy"):invariant(ReactUpdates.ReactReconcileTransaction&&batchingStrategy)}var NESTED_UPDATES={initialize:function(){this.dirtyComponentsLength=dirtyComponents.length},close:function(){if(this.dirtyComponentsLength!==dirtyComponents.length){dirtyComponents.splice(0,this.dirtyComponentsLength);flushBatchedUpdates()}else{dirtyComponents.length=0}}};var UPDATE_QUEUEING={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}};var TRANSACTION_WRAPPERS=[NESTED_UPDATES,UPDATE_QUEUEING];function ReactUpdatesFlushTransaction(){this.reinitializeTransaction();this.dirtyComponentsLength=null;this.callbackQueue=CallbackQueue.getPooled();this.reconcileTransaction=ReactUpdates.ReactReconcileTransaction.getPooled()}assign(ReactUpdatesFlushTransaction.prototype,Transaction.Mixin,{getTransactionWrappers:function(){return TRANSACTION_WRAPPERS},destructor:function(){this.dirtyComponentsLength=null;CallbackQueue.release(this.callbackQueue);this.callbackQueue=null;ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);this.reconcileTransaction=null},perform:function(method,scope,a){return Transaction.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,method,scope,a)}});PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);function batchedUpdates(callback,a,b){ensureInjected();batchingStrategy.batchedUpdates(callback,a,b)}function mountDepthComparator(c1,c2){return c1._mountDepth-c2._mountDepth}function runBatchedUpdates(transaction){var len=transaction.dirtyComponentsLength;"production"!==process.env.NODE_ENV?invariant(len===dirtyComponents.length,"Expected flush transaction's stored dirty-components length (%s) to "+"match dirty-components array length (%s).",len,dirtyComponents.length):invariant(len===dirtyComponents.length);dirtyComponents.sort(mountDepthComparator);for(var i=0;i<len;i++){var component=dirtyComponents[i];if(component.isMounted()){var callbacks=component._pendingCallbacks;component._pendingCallbacks=null;component.performUpdateIfNecessary(transaction.reconcileTransaction);if(callbacks){for(var j=0;j<callbacks.length;j++){transaction.callbackQueue.enqueue(callbacks[j],component)}}}}}var flushBatchedUpdates=ReactPerf.measure("ReactUpdates","flushBatchedUpdates",function(){while(dirtyComponents.length||asapEnqueued){if(dirtyComponents.length){var transaction=ReactUpdatesFlushTransaction.getPooled();transaction.perform(runBatchedUpdates,null,transaction);ReactUpdatesFlushTransaction.release(transaction)}if(asapEnqueued){asapEnqueued=false;var queue=asapCallbackQueue;asapCallbackQueue=CallbackQueue.getPooled();queue.notifyAll();CallbackQueue.release(queue)}}});function enqueueUpdate(component,callback){"production"!==process.env.NODE_ENV?invariant(!callback||typeof callback==="function","enqueueUpdate(...): You called `setProps`, `replaceProps`, "+"`setState`, `replaceState`, or `forceUpdate` with a callback that "+"isn't callable."):invariant(!callback||typeof callback==="function");ensureInjected();"production"!==process.env.NODE_ENV?warning(ReactCurrentOwner.current==null,"enqueueUpdate(): 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."):null;if(!batchingStrategy.isBatchingUpdates){batchingStrategy.batchedUpdates(enqueueUpdate,component,callback);return}dirtyComponents.push(component);if(callback){if(component._pendingCallbacks){component._pendingCallbacks.push(callback)}else{component._pendingCallbacks=[callback]}}}function asap(callback,context){"production"!==process.env.NODE_ENV?invariant(batchingStrategy.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context where"+"updates are not being batched."):invariant(batchingStrategy.isBatchingUpdates);asapCallbackQueue.enqueue(callback,context);asapEnqueued=true}var ReactUpdatesInjection={injectReconcileTransaction:function(ReconcileTransaction){"production"!==process.env.NODE_ENV?invariant(ReconcileTransaction,"ReactUpdates: must provide a reconcile transaction class"):invariant(ReconcileTransaction);ReactUpdates.ReactReconcileTransaction=ReconcileTransaction},injectBatchingStrategy:function(_batchingStrategy){"production"!==process.env.NODE_ENV?invariant(_batchingStrategy,"ReactUpdates: must provide a batching strategy"):invariant(_batchingStrategy);"production"!==process.env.NODE_ENV?invariant(typeof _batchingStrategy.batchedUpdates==="function","ReactUpdates: must provide a batchedUpdates() function"):invariant(typeof _batchingStrategy.batchedUpdates==="function");"production"!==process.env.NODE_ENV?invariant(typeof _batchingStrategy.isBatchingUpdates==="boolean","ReactUpdates: must provide an isBatchingUpdates boolean attribute"):invariant(typeof _batchingStrategy.isBatchingUpdates==="boolean");batchingStrategy=_batchingStrategy}};var ReactUpdates={ReactReconcileTransaction:null,batchedUpdates:batchedUpdates,enqueueUpdate:enqueueUpdate,flushBatchedUpdates:flushBatchedUpdates,injection:ReactUpdatesInjection,asap:asap};module.exports=ReactUpdates}).call(this,require("_process"))},{"./CallbackQueue":7,"./Object.assign":29,"./PooledClass":30,"./ReactCurrentOwner":42,"./ReactPerf":75,"./Transaction":108,"./invariant":141,"./warning":161,_process:1}],92:[function(require,module,exports){(function(process){"use strict";var LinkedStateMixin=require("./LinkedStateMixin");var React=require("./React");var ReactComponentWithPureRenderMixin=require("./ReactComponentWithPureRenderMixin");var ReactCSSTransitionGroup=require("./ReactCSSTransitionGroup");var ReactTransitionGroup=require("./ReactTransitionGroup");var ReactUpdates=require("./ReactUpdates");var cx=require("./cx");var cloneWithProps=require("./cloneWithProps");var update=require("./update");React.addons={CSSTransitionGroup:ReactCSSTransitionGroup,LinkedStateMixin:LinkedStateMixin,PureRenderMixin:ReactComponentWithPureRenderMixin,TransitionGroup:ReactTransitionGroup,batchedUpdates:ReactUpdates.batchedUpdates,classSet:cx,cloneWithProps:cloneWithProps,update:update};if("production"!==process.env.NODE_ENV){React.addons.Perf=require("./ReactDefaultPerf");React.addons.TestUtils=require("./ReactTestUtils")}module.exports=React}).call(this,require("_process"))},{"./LinkedStateMixin":25,"./React":31,"./ReactCSSTransitionGroup":34,"./ReactComponentWithPureRenderMixin":39,"./ReactDefaultPerf":56,"./ReactTestUtils":86,"./ReactTransitionGroup":90,"./ReactUpdates":91,"./cloneWithProps":114,"./cx":119,"./update":160,_process:1}],93:[function(require,module,exports){"use strict";var DOMProperty=require("./DOMProperty");var MUST_USE_ATTRIBUTE=DOMProperty.injection.MUST_USE_ATTRIBUTE;var SVGDOMPropertyConfig={Properties:{cx:MUST_USE_ATTRIBUTE,cy:MUST_USE_ATTRIBUTE,d:MUST_USE_ATTRIBUTE,dx:MUST_USE_ATTRIBUTE,dy:MUST_USE_ATTRIBUTE,fill:MUST_USE_ATTRIBUTE,fillOpacity:MUST_USE_ATTRIBUTE,fontFamily:MUST_USE_ATTRIBUTE,fontSize:MUST_USE_ATTRIBUTE,fx:MUST_USE_ATTRIBUTE,fy:MUST_USE_ATTRIBUTE,gradientTransform:MUST_USE_ATTRIBUTE,gradientUnits:MUST_USE_ATTRIBUTE,markerEnd:MUST_USE_ATTRIBUTE,markerMid:MUST_USE_ATTRIBUTE,markerStart:MUST_USE_ATTRIBUTE,offset:MUST_USE_ATTRIBUTE,opacity:MUST_USE_ATTRIBUTE,patternContentUnits:MUST_USE_ATTRIBUTE,patternUnits:MUST_USE_ATTRIBUTE,points:MUST_USE_ATTRIBUTE,preserveAspectRatio:MUST_USE_ATTRIBUTE,r:MUST_USE_ATTRIBUTE,rx:MUST_USE_ATTRIBUTE,ry:MUST_USE_ATTRIBUTE,spreadMethod:MUST_USE_ATTRIBUTE,stopColor:MUST_USE_ATTRIBUTE,stopOpacity:MUST_USE_ATTRIBUTE,stroke:MUST_USE_ATTRIBUTE,strokeDasharray:MUST_USE_ATTRIBUTE,strokeLinecap:MUST_USE_ATTRIBUTE,strokeOpacity:MUST_USE_ATTRIBUTE,strokeWidth:MUST_USE_ATTRIBUTE,textAnchor:MUST_USE_ATTRIBUTE,transform:MUST_USE_ATTRIBUTE,version:MUST_USE_ATTRIBUTE,viewBox:MUST_USE_ATTRIBUTE,x1:MUST_USE_ATTRIBUTE,x2:MUST_USE_ATTRIBUTE,x:MUST_USE_ATTRIBUTE,y1:MUST_USE_ATTRIBUTE,y2:MUST_USE_ATTRIBUTE,y:MUST_USE_ATTRIBUTE},DOMAttributeNames:{fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};module.exports=SVGDOMPropertyConfig},{"./DOMProperty":12}],94:[function(require,module,exports){"use strict";var EventConstants=require("./EventConstants");var EventPropagators=require("./EventPropagators");var ReactInputSelection=require("./ReactInputSelection");var SyntheticEvent=require("./SyntheticEvent");var getActiveElement=require("./getActiveElement");var isTextInputElement=require("./isTextInputElement");var keyOf=require("./keyOf");var shallowEqual=require("./shallowEqual");var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={select:{phasedRegistrationNames:{bubbled:keyOf({onSelect:null}),captured:keyOf({onSelectCapture:null})},dependencies:[topLevelTypes.topBlur,topLevelTypes.topContextMenu,topLevelTypes.topFocus,topLevelTypes.topKeyDown,topLevelTypes.topMouseDown,topLevelTypes.topMouseUp,topLevelTypes.topSelectionChange]}};var activeElement=null;var activeElementID=null;var lastSelection=null;var mouseDown=false;function getSelection(node){if("selectionStart"in node&&ReactInputSelection.hasSelectionCapabilities(node)){return{start:node.selectionStart,end:node.selectionEnd}}else if(window.getSelection){var selection=window.getSelection();return{anchorNode:selection.anchorNode,anchorOffset:selection.anchorOffset,focusNode:selection.focusNode,focusOffset:selection.focusOffset}}else if(document.selection){var range=document.selection.createRange();return{parentElement:range.parentElement(),text:range.text,top:range.boundingTop,left:range.boundingLeft}}}function constructSelectEvent(nativeEvent){if(mouseDown||activeElement==null||activeElement!=getActiveElement()){return}var currentSelection=getSelection(activeElement);if(!lastSelection||!shallowEqual(lastSelection,currentSelection)){lastSelection=currentSelection;var syntheticEvent=SyntheticEvent.getPooled(eventTypes.select,activeElementID,nativeEvent);syntheticEvent.type="select";syntheticEvent.target=activeElement;EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);return syntheticEvent}}var SelectEventPlugin={eventTypes:eventTypes,extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){switch(topLevelType){case topLevelTypes.topFocus:if(isTextInputElement(topLevelTarget)||topLevelTarget.contentEditable==="true"){activeElement=topLevelTarget;activeElementID=topLevelTargetID;lastSelection=null}break;case topLevelTypes.topBlur:activeElement=null;activeElementID=null;lastSelection=null;break;case topLevelTypes.topMouseDown:mouseDown=true;break;case topLevelTypes.topContextMenu:case topLevelTypes.topMouseUp:mouseDown=false;return constructSelectEvent(nativeEvent);case topLevelTypes.topSelectionChange:case topLevelTypes.topKeyDown:case topLevelTypes.topKeyUp:return constructSelectEvent(nativeEvent)}}};module.exports=SelectEventPlugin},{"./EventConstants":17,"./EventPropagators":22,"./ReactInputSelection":65,"./SyntheticEvent":100,"./getActiveElement":128,"./isTextInputElement":144,"./keyOf":148,"./shallowEqual":156}],95:[function(require,module,exports){"use strict";var GLOBAL_MOUNT_POINT_MAX=Math.pow(2,53);var ServerReactRootIndex={createReactRootIndex:function(){return Math.ceil(Math.random()*GLOBAL_MOUNT_POINT_MAX)}};module.exports=ServerReactRootIndex},{}],96:[function(require,module,exports){(function(process){"use strict";var EventConstants=require("./EventConstants");var EventPluginUtils=require("./EventPluginUtils");var EventPropagators=require("./EventPropagators");var SyntheticClipboardEvent=require("./SyntheticClipboardEvent");var SyntheticEvent=require("./SyntheticEvent");var SyntheticFocusEvent=require("./SyntheticFocusEvent");var SyntheticKeyboardEvent=require("./SyntheticKeyboardEvent");var SyntheticMouseEvent=require("./SyntheticMouseEvent");var SyntheticDragEvent=require("./SyntheticDragEvent");var SyntheticTouchEvent=require("./SyntheticTouchEvent");var SyntheticUIEvent=require("./SyntheticUIEvent");var SyntheticWheelEvent=require("./SyntheticWheelEvent");var getEventCharCode=require("./getEventCharCode");var invariant=require("./invariant");var keyOf=require("./keyOf");var warning=require("./warning");var topLevelTypes=EventConstants.topLevelTypes;var eventTypes={blur:{phasedRegistrationNames:{bubbled:keyOf({onBlur:true}),captured:keyOf({onBlurCapture:true})}},click:{phasedRegistrationNames:{bubbled:keyOf({onClick:true}),captured:keyOf({onClickCapture:true})}},contextMenu:{phasedRegistrationNames:{bubbled:keyOf({onContextMenu:true}),captured:keyOf({onContextMenuCapture:true})}},copy:{phasedRegistrationNames:{bubbled:keyOf({onCopy:true}),captured:keyOf({onCopyCapture:true})}},cut:{phasedRegistrationNames:{bubbled:keyOf({onCut:true}),captured:keyOf({onCutCapture:true})}},doubleClick:{phasedRegistrationNames:{bubbled:keyOf({onDoubleClick:true}),captured:keyOf({onDoubleClickCapture:true})}},drag:{phasedRegistrationNames:{bubbled:keyOf({onDrag:true}),captured:keyOf({onDragCapture:true})}},dragEnd:{phasedRegistrationNames:{bubbled:keyOf({onDragEnd:true}),captured:keyOf({onDragEndCapture:true})}},dragEnter:{phasedRegistrationNames:{bubbled:keyOf({onDragEnter:true}),captured:keyOf({onDragEnterCapture:true})}},dragExit:{phasedRegistrationNames:{bubbled:keyOf({onDragExit:true}),captured:keyOf({onDragExitCapture:true})}},dragLeave:{phasedRegistrationNames:{bubbled:keyOf({onDragLeave:true}),captured:keyOf({onDragLeaveCapture:true})}},dragOver:{phasedRegistrationNames:{bubbled:keyOf({onDragOver:true}),captured:keyOf({onDragOverCapture:true})}},dragStart:{phasedRegistrationNames:{bubbled:keyOf({onDragStart:true}),captured:keyOf({onDragStartCapture:true})}},drop:{phasedRegistrationNames:{bubbled:keyOf({onDrop:true}),captured:keyOf({onDropCapture:true})}},focus:{phasedRegistrationNames:{bubbled:keyOf({onFocus:true}),captured:keyOf({onFocusCapture:true})}},input:{phasedRegistrationNames:{bubbled:keyOf({onInput:true}),captured:keyOf({onInputCapture:true})}},keyDown:{phasedRegistrationNames:{bubbled:keyOf({onKeyDown:true}),captured:keyOf({onKeyDownCapture:true})}},keyPress:{phasedRegistrationNames:{bubbled:keyOf({onKeyPress:true}),captured:keyOf({onKeyPressCapture:true})}},keyUp:{phasedRegistrationNames:{bubbled:keyOf({onKeyUp:true}),captured:keyOf({onKeyUpCapture:true})}},load:{phasedRegistrationNames:{bubbled:keyOf({onLoad:true}),captured:keyOf({onLoadCapture:true})}},error:{phasedRegistrationNames:{bubbled:keyOf({onError:true}),captured:keyOf({onErrorCapture:true})}},mouseDown:{phasedRegistrationNames:{bubbled:keyOf({onMouseDown:true}),captured:keyOf({onMouseDownCapture:true})}},mouseMove:{phasedRegistrationNames:{bubbled:keyOf({onMouseMove:true}),captured:keyOf({onMouseMoveCapture:true})}},mouseOut:{phasedRegistrationNames:{bubbled:keyOf({onMouseOut:true}),captured:keyOf({onMouseOutCapture:true})}},mouseOver:{phasedRegistrationNames:{bubbled:keyOf({onMouseOver:true}),captured:keyOf({onMouseOverCapture:true})}},mouseUp:{phasedRegistrationNames:{bubbled:keyOf({onMouseUp:true}),captured:keyOf({onMouseUpCapture:true})}},paste:{phasedRegistrationNames:{bubbled:keyOf({onPaste:true}),captured:keyOf({onPasteCapture:true})}},reset:{phasedRegistrationNames:{bubbled:keyOf({onReset:true}),captured:keyOf({onResetCapture:true})}},scroll:{phasedRegistrationNames:{bubbled:keyOf({onScroll:true}),captured:keyOf({onScrollCapture:true})}},submit:{phasedRegistrationNames:{bubbled:keyOf({onSubmit:true}),captured:keyOf({onSubmitCapture:true})}},touchCancel:{phasedRegistrationNames:{bubbled:keyOf({onTouchCancel:true}),captured:keyOf({onTouchCancelCapture:true})}},touchEnd:{phasedRegistrationNames:{bubbled:keyOf({onTouchEnd:true}),captured:keyOf({onTouchEndCapture:true})}},touchMove:{phasedRegistrationNames:{bubbled:keyOf({onTouchMove:true}),captured:keyOf({onTouchMoveCapture:true})}},touchStart:{phasedRegistrationNames:{bubbled:keyOf({onTouchStart:true}),captured:keyOf({onTouchStartCapture:true})}},wheel:{phasedRegistrationNames:{bubbled:keyOf({onWheel:true}),captured:keyOf({onWheelCapture:true})}}};var topLevelEventsToDispatchConfig={topBlur:eventTypes.blur,topClick:eventTypes.click,topContextMenu:eventTypes.contextMenu,topCopy:eventTypes.copy,topCut:eventTypes.cut,topDoubleClick:eventTypes.doubleClick,topDrag:eventTypes.drag,topDragEnd:eventTypes.dragEnd,topDragEnter:eventTypes.dragEnter,topDragExit:eventTypes.dragExit,topDragLeave:eventTypes.dragLeave,topDragOver:eventTypes.dragOver,topDragStart:eventTypes.dragStart,topDrop:eventTypes.drop,topError:eventTypes.error,topFocus:eventTypes.focus,topInput:eventTypes.input,topKeyDown:eventTypes.keyDown,topKeyPress:eventTypes.keyPress,topKeyUp:eventTypes.keyUp,topLoad:eventTypes.load,topMouseDown:eventTypes.mouseDown,topMouseMove:eventTypes.mouseMove,topMouseOut:eventTypes.mouseOut,topMouseOver:eventTypes.mouseOver,topMouseUp:eventTypes.mouseUp,topPaste:eventTypes.paste,topReset:eventTypes.reset,topScroll:eventTypes.scroll,topSubmit:eventTypes.submit,topTouchCancel:eventTypes.touchCancel,topTouchEnd:eventTypes.touchEnd,topTouchMove:eventTypes.touchMove,topTouchStart:eventTypes.touchStart,topWheel:eventTypes.wheel}; | |
for(var topLevelType in topLevelEventsToDispatchConfig){topLevelEventsToDispatchConfig[topLevelType].dependencies=[topLevelType]}var SimpleEventPlugin={eventTypes:eventTypes,executeDispatch:function(event,listener,domID){var returnValue=EventPluginUtils.executeDispatch(event,listener,domID);"production"!==process.env.NODE_ENV?warning(typeof returnValue!=="boolean","Returning `false` from an event handler is deprecated and will be "+"ignored in a future release. Instead, manually call "+"e.stopPropagation() or e.preventDefault(), as appropriate."):null;if(returnValue===false){event.stopPropagation();event.preventDefault()}},extractEvents:function(topLevelType,topLevelTarget,topLevelTargetID,nativeEvent){var dispatchConfig=topLevelEventsToDispatchConfig[topLevelType];if(!dispatchConfig){return null}var EventConstructor;switch(topLevelType){case topLevelTypes.topInput:case topLevelTypes.topLoad:case topLevelTypes.topError:case topLevelTypes.topReset:case topLevelTypes.topSubmit:EventConstructor=SyntheticEvent;break;case topLevelTypes.topKeyPress:if(getEventCharCode(nativeEvent)===0){return null}case topLevelTypes.topKeyDown:case topLevelTypes.topKeyUp:EventConstructor=SyntheticKeyboardEvent;break;case topLevelTypes.topBlur:case topLevelTypes.topFocus:EventConstructor=SyntheticFocusEvent;break;case topLevelTypes.topClick:if(nativeEvent.button===2){return null}case topLevelTypes.topContextMenu:case topLevelTypes.topDoubleClick:case topLevelTypes.topMouseDown:case topLevelTypes.topMouseMove:case topLevelTypes.topMouseOut:case topLevelTypes.topMouseOver:case topLevelTypes.topMouseUp:EventConstructor=SyntheticMouseEvent;break;case topLevelTypes.topDrag:case topLevelTypes.topDragEnd:case topLevelTypes.topDragEnter:case topLevelTypes.topDragExit:case topLevelTypes.topDragLeave:case topLevelTypes.topDragOver:case topLevelTypes.topDragStart:case topLevelTypes.topDrop:EventConstructor=SyntheticDragEvent;break;case topLevelTypes.topTouchCancel:case topLevelTypes.topTouchEnd:case topLevelTypes.topTouchMove:case topLevelTypes.topTouchStart:EventConstructor=SyntheticTouchEvent;break;case topLevelTypes.topScroll:EventConstructor=SyntheticUIEvent;break;case topLevelTypes.topWheel:EventConstructor=SyntheticWheelEvent;break;case topLevelTypes.topCopy:case topLevelTypes.topCut:case topLevelTypes.topPaste:EventConstructor=SyntheticClipboardEvent;break}"production"!==process.env.NODE_ENV?invariant(EventConstructor,"SimpleEventPlugin: Unhandled event type, `%s`.",topLevelType):invariant(EventConstructor);var event=EventConstructor.getPooled(dispatchConfig,topLevelTargetID,nativeEvent);EventPropagators.accumulateTwoPhaseDispatches(event);return event}};module.exports=SimpleEventPlugin}).call(this,require("_process"))},{"./EventConstants":17,"./EventPluginUtils":21,"./EventPropagators":22,"./SyntheticClipboardEvent":97,"./SyntheticDragEvent":99,"./SyntheticEvent":100,"./SyntheticFocusEvent":101,"./SyntheticKeyboardEvent":103,"./SyntheticMouseEvent":104,"./SyntheticTouchEvent":105,"./SyntheticUIEvent":106,"./SyntheticWheelEvent":107,"./getEventCharCode":129,"./invariant":141,"./keyOf":148,"./warning":161,_process:1}],97:[function(require,module,exports){"use strict";var SyntheticEvent=require("./SyntheticEvent");var ClipboardEventInterface={clipboardData:function(event){return"clipboardData"in event?event.clipboardData:window.clipboardData}};function SyntheticClipboardEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticEvent.augmentClass(SyntheticClipboardEvent,ClipboardEventInterface);module.exports=SyntheticClipboardEvent},{"./SyntheticEvent":100}],98:[function(require,module,exports){"use strict";var SyntheticEvent=require("./SyntheticEvent");var CompositionEventInterface={data:null};function SyntheticCompositionEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticEvent.augmentClass(SyntheticCompositionEvent,CompositionEventInterface);module.exports=SyntheticCompositionEvent},{"./SyntheticEvent":100}],99:[function(require,module,exports){"use strict";var SyntheticMouseEvent=require("./SyntheticMouseEvent");var DragEventInterface={dataTransfer:null};function SyntheticDragEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticMouseEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticMouseEvent.augmentClass(SyntheticDragEvent,DragEventInterface);module.exports=SyntheticDragEvent},{"./SyntheticMouseEvent":104}],100:[function(require,module,exports){"use strict";var PooledClass=require("./PooledClass");var assign=require("./Object.assign");var emptyFunction=require("./emptyFunction");var getEventTarget=require("./getEventTarget");var EventInterface={type:null,target:getEventTarget,currentTarget:emptyFunction.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(event){return event.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};function SyntheticEvent(dispatchConfig,dispatchMarker,nativeEvent){this.dispatchConfig=dispatchConfig;this.dispatchMarker=dispatchMarker;this.nativeEvent=nativeEvent;var Interface=this.constructor.Interface;for(var propName in Interface){if(!Interface.hasOwnProperty(propName)){continue}var normalize=Interface[propName];if(normalize){this[propName]=normalize(nativeEvent)}else{this[propName]=nativeEvent[propName]}}var defaultPrevented=nativeEvent.defaultPrevented!=null?nativeEvent.defaultPrevented:nativeEvent.returnValue===false;if(defaultPrevented){this.isDefaultPrevented=emptyFunction.thatReturnsTrue}else{this.isDefaultPrevented=emptyFunction.thatReturnsFalse}this.isPropagationStopped=emptyFunction.thatReturnsFalse}assign(SyntheticEvent.prototype,{preventDefault:function(){this.defaultPrevented=true;var event=this.nativeEvent;event.preventDefault?event.preventDefault():event.returnValue=false;this.isDefaultPrevented=emptyFunction.thatReturnsTrue},stopPropagation:function(){var event=this.nativeEvent;event.stopPropagation?event.stopPropagation():event.cancelBubble=true;this.isPropagationStopped=emptyFunction.thatReturnsTrue},persist:function(){this.isPersistent=emptyFunction.thatReturnsTrue},isPersistent:emptyFunction.thatReturnsFalse,destructor:function(){var Interface=this.constructor.Interface;for(var propName in Interface){this[propName]=null}this.dispatchConfig=null;this.dispatchMarker=null;this.nativeEvent=null}});SyntheticEvent.Interface=EventInterface;SyntheticEvent.augmentClass=function(Class,Interface){var Super=this;var prototype=Object.create(Super.prototype);assign(prototype,Class.prototype);Class.prototype=prototype;Class.prototype.constructor=Class;Class.Interface=assign({},Super.Interface,Interface);Class.augmentClass=Super.augmentClass;PooledClass.addPoolingTo(Class,PooledClass.threeArgumentPooler)};PooledClass.addPoolingTo(SyntheticEvent,PooledClass.threeArgumentPooler);module.exports=SyntheticEvent},{"./Object.assign":29,"./PooledClass":30,"./emptyFunction":122,"./getEventTarget":132}],101:[function(require,module,exports){"use strict";var SyntheticUIEvent=require("./SyntheticUIEvent");var FocusEventInterface={relatedTarget:null};function SyntheticFocusEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticUIEvent.augmentClass(SyntheticFocusEvent,FocusEventInterface);module.exports=SyntheticFocusEvent},{"./SyntheticUIEvent":106}],102:[function(require,module,exports){"use strict";var SyntheticEvent=require("./SyntheticEvent");var InputEventInterface={data:null};function SyntheticInputEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticEvent.augmentClass(SyntheticInputEvent,InputEventInterface);module.exports=SyntheticInputEvent},{"./SyntheticEvent":100}],103:[function(require,module,exports){"use strict";var SyntheticUIEvent=require("./SyntheticUIEvent");var getEventCharCode=require("./getEventCharCode");var getEventKey=require("./getEventKey");var getEventModifierState=require("./getEventModifierState");var KeyboardEventInterface={key:getEventKey,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:getEventModifierState,charCode:function(event){if(event.type==="keypress"){return getEventCharCode(event)}return 0},keyCode:function(event){if(event.type==="keydown"||event.type==="keyup"){return event.keyCode}return 0},which:function(event){if(event.type==="keypress"){return getEventCharCode(event)}if(event.type==="keydown"||event.type==="keyup"){return event.keyCode}return 0}};function SyntheticKeyboardEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent,KeyboardEventInterface);module.exports=SyntheticKeyboardEvent},{"./SyntheticUIEvent":106,"./getEventCharCode":129,"./getEventKey":130,"./getEventModifierState":131}],104:[function(require,module,exports){"use strict";var SyntheticUIEvent=require("./SyntheticUIEvent");var ViewportMetrics=require("./ViewportMetrics");var getEventModifierState=require("./getEventModifierState");var MouseEventInterface={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:getEventModifierState,button:function(event){var button=event.button;if("which"in event){return button}return button===2?2:button===4?1:0},buttons:null,relatedTarget:function(event){return event.relatedTarget||(event.fromElement===event.srcElement?event.toElement:event.fromElement)},pageX:function(event){return"pageX"in event?event.pageX:event.clientX+ViewportMetrics.currentScrollLeft},pageY:function(event){return"pageY"in event?event.pageY:event.clientY+ViewportMetrics.currentScrollTop}};function SyntheticMouseEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticUIEvent.augmentClass(SyntheticMouseEvent,MouseEventInterface);module.exports=SyntheticMouseEvent},{"./SyntheticUIEvent":106,"./ViewportMetrics":109,"./getEventModifierState":131}],105:[function(require,module,exports){"use strict";var SyntheticUIEvent=require("./SyntheticUIEvent");var getEventModifierState=require("./getEventModifierState");var TouchEventInterface={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:getEventModifierState};function SyntheticTouchEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticUIEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticUIEvent.augmentClass(SyntheticTouchEvent,TouchEventInterface);module.exports=SyntheticTouchEvent},{"./SyntheticUIEvent":106,"./getEventModifierState":131}],106:[function(require,module,exports){"use strict";var SyntheticEvent=require("./SyntheticEvent");var getEventTarget=require("./getEventTarget");var UIEventInterface={view:function(event){if(event.view){return event.view}var target=getEventTarget(event);if(target!=null&&target.window===target){return target}var doc=target.ownerDocument;if(doc){return doc.defaultView||doc.parentWindow}else{return window}},detail:function(event){return event.detail||0}};function SyntheticUIEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticEvent.augmentClass(SyntheticUIEvent,UIEventInterface);module.exports=SyntheticUIEvent},{"./SyntheticEvent":100,"./getEventTarget":132}],107:[function(require,module,exports){"use strict";var SyntheticMouseEvent=require("./SyntheticMouseEvent");var WheelEventInterface={deltaX:function(event){return"deltaX"in event?event.deltaX:"wheelDeltaX"in event?-event.wheelDeltaX:0},deltaY:function(event){return"deltaY"in event?event.deltaY:"wheelDeltaY"in event?-event.wheelDeltaY:"wheelDelta"in event?-event.wheelDelta:0},deltaZ:null,deltaMode:null};function SyntheticWheelEvent(dispatchConfig,dispatchMarker,nativeEvent){SyntheticMouseEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent)}SyntheticMouseEvent.augmentClass(SyntheticWheelEvent,WheelEventInterface);module.exports=SyntheticWheelEvent},{"./SyntheticMouseEvent":104}],108:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");var Mixin={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers();if(!this.wrapperInitData){this.wrapperInitData=[]}else{this.wrapperInitData.length=0}this._isInTransaction=false},_isInTransaction:false,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(method,scope,a,b,c,d,e,f){"production"!==process.env.NODE_ENV?invariant(!this.isInTransaction(),"Transaction.perform(...): Cannot initialize a transaction when there "+"is already an outstanding transaction."):invariant(!this.isInTransaction());var errorThrown;var ret;try{this._isInTransaction=true;errorThrown=true;this.initializeAll(0);ret=method.call(scope,a,b,c,d,e,f);errorThrown=false}finally{try{if(errorThrown){try{this.closeAll(0)}catch(err){}}else{this.closeAll(0)}}finally{this._isInTransaction=false}}return ret},initializeAll:function(startIndex){var transactionWrappers=this.transactionWrappers;for(var i=startIndex;i<transactionWrappers.length;i++){var wrapper=transactionWrappers[i];try{this.wrapperInitData[i]=Transaction.OBSERVED_ERROR;this.wrapperInitData[i]=wrapper.initialize?wrapper.initialize.call(this):null}finally{if(this.wrapperInitData[i]===Transaction.OBSERVED_ERROR){try{this.initializeAll(i+1)}catch(err){}}}}},closeAll:function(startIndex){"production"!==process.env.NODE_ENV?invariant(this.isInTransaction(),"Transaction.closeAll(): Cannot close transaction when none are open."):invariant(this.isInTransaction());var transactionWrappers=this.transactionWrappers;for(var i=startIndex;i<transactionWrappers.length;i++){var wrapper=transactionWrappers[i];var initData=this.wrapperInitData[i];var errorThrown;try{errorThrown=true;if(initData!==Transaction.OBSERVED_ERROR){wrapper.close&&wrapper.close.call(this,initData)}errorThrown=false}finally{if(errorThrown){try{this.closeAll(i+1)}catch(e){}}}}this.wrapperInitData.length=0}};var Transaction={Mixin:Mixin,OBSERVED_ERROR:{}};module.exports=Transaction}).call(this,require("_process"))},{"./invariant":141,_process:1}],109:[function(require,module,exports){"use strict";var getUnboundedScrollPosition=require("./getUnboundedScrollPosition");var ViewportMetrics={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var scrollPosition=getUnboundedScrollPosition(window);ViewportMetrics.currentScrollLeft=scrollPosition.x;ViewportMetrics.currentScrollTop=scrollPosition.y}};module.exports=ViewportMetrics},{"./getUnboundedScrollPosition":137}],110:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");function accumulateInto(current,next){"production"!==process.env.NODE_ENV?invariant(next!=null,"accumulateInto(...): Accumulated items must not be null or undefined."):invariant(next!=null);if(current==null){return next}var currentIsArray=Array.isArray(current);var nextIsArray=Array.isArray(next);if(currentIsArray&&nextIsArray){current.push.apply(current,next);return current}if(currentIsArray){current.push(next);return current}if(nextIsArray){return[current].concat(next)}return[current,next]}module.exports=accumulateInto}).call(this,require("_process"))},{"./invariant":141,_process:1}],111:[function(require,module,exports){"use strict";var MOD=65521;function adler32(data){var a=1;var b=0;for(var i=0;i<data.length;i++){a=(a+data.charCodeAt(i))%MOD;b=(b+a)%MOD}return a|b<<16}module.exports=adler32},{}],112:[function(require,module,exports){var _hyphenPattern=/-(.)/g;function camelize(string){return string.replace(_hyphenPattern,function(_,character){return character.toUpperCase()})}module.exports=camelize},{}],113:[function(require,module,exports){"use strict";var camelize=require("./camelize");var msPattern=/^-ms-/;function camelizeStyleName(string){return camelize(string.replace(msPattern,"ms-"))}module.exports=camelizeStyleName},{"./camelize":112}],114:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactPropTransferer=require("./ReactPropTransferer");var keyOf=require("./keyOf");var warning=require("./warning");var CHILDREN_PROP=keyOf({children:null});function cloneWithProps(child,props){if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(!child.ref,"You are calling cloneWithProps() on a child with a ref. This is "+"dangerous because you're creating a new child which will not be "+"added as a ref to its parent."):null}var newProps=ReactPropTransferer.mergeProps(props,child.props);if(!newProps.hasOwnProperty(CHILDREN_PROP)&&child.props.hasOwnProperty(CHILDREN_PROP)){newProps.children=child.props.children}return ReactElement.createElement(child.type,newProps)}module.exports=cloneWithProps}).call(this,require("_process"))},{"./ReactElement":58,"./ReactPropTransferer":76,"./keyOf":148,"./warning":161,_process:1}],115:[function(require,module,exports){var isTextNode=require("./isTextNode");function containsNode(outerNode,innerNode){if(!outerNode||!innerNode){return false}else if(outerNode===innerNode){return true}else if(isTextNode(outerNode)){return false}else if(isTextNode(innerNode)){return containsNode(outerNode,innerNode.parentNode)}else if(outerNode.contains){return outerNode.contains(innerNode)}else if(outerNode.compareDocumentPosition){return!!(outerNode.compareDocumentPosition(innerNode)&16)}else{return false}}module.exports=containsNode},{"./isTextNode":145}],116:[function(require,module,exports){var toArray=require("./toArray");function hasArrayNature(obj){return!!obj&&(typeof obj=="object"||typeof obj=="function")&&"length"in obj&&!("setInterval"in obj)&&typeof obj.nodeType!="number"&&(Array.isArray(obj)||"callee"in obj||"item"in obj)}function createArrayFrom(obj){if(!hasArrayNature(obj)){return[obj]}else if(Array.isArray(obj)){return obj.slice()}else{return toArray(obj)}}module.exports=createArrayFrom},{"./toArray":158}],117:[function(require,module,exports){(function(process){"use strict";var ReactCompositeComponent=require("./ReactCompositeComponent");var ReactElement=require("./ReactElement");var invariant=require("./invariant");function createFullPageComponent(tag){var elementFactory=ReactElement.createFactory(tag);var FullPageComponent=ReactCompositeComponent.createClass({displayName:"ReactFullPageComponent"+tag,componentWillUnmount:function(){"production"!==process.env.NODE_ENV?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.constructor.displayName):invariant(false)},render:function(){return elementFactory(this.props)}});return FullPageComponent}module.exports=createFullPageComponent}).call(this,require("_process"))},{"./ReactCompositeComponent":40,"./ReactElement":58,"./invariant":141,_process:1}],118:[function(require,module,exports){(function(process){var ExecutionEnvironment=require("./ExecutionEnvironment");var createArrayFrom=require("./createArrayFrom");var getMarkupWrap=require("./getMarkupWrap");var invariant=require("./invariant");var dummyNode=ExecutionEnvironment.canUseDOM?document.createElement("div"):null;var nodeNamePattern=/^\s*<(\w+)/;function getNodeName(markup){var nodeNameMatch=markup.match(nodeNamePattern);return nodeNameMatch&&nodeNameMatch[1].toLowerCase()}function createNodesFromMarkup(markup,handleScript){var node=dummyNode;"production"!==process.env.NODE_ENV?invariant(!!dummyNode,"createNodesFromMarkup dummy not initialized"):invariant(!!dummyNode);var nodeName=getNodeName(markup);var wrap=nodeName&&getMarkupWrap(nodeName);if(wrap){node.innerHTML=wrap[1]+markup+wrap[2];var wrapDepth=wrap[0];while(wrapDepth--){node=node.lastChild}}else{node.innerHTML=markup}var scripts=node.getElementsByTagName("script");if(scripts.length){"production"!==process.env.NODE_ENV?invariant(handleScript,"createNodesFromMarkup(...): Unexpected <script> element rendered."):invariant(handleScript);createArrayFrom(scripts).forEach(handleScript)}var nodes=createArrayFrom(node.childNodes);while(node.lastChild){node.removeChild(node.lastChild)}return nodes}module.exports=createNodesFromMarkup}).call(this,require("_process"))},{"./ExecutionEnvironment":23,"./createArrayFrom":116,"./getMarkupWrap":133,"./invariant":141,_process:1}],119:[function(require,module,exports){function cx(classNames){if(typeof classNames=="object"){return Object.keys(classNames).filter(function(className){return classNames[className]}).join(" ")}else{return Array.prototype.join.call(arguments," ")}}module.exports=cx},{}],120:[function(require,module,exports){"use strict";var CSSProperty=require("./CSSProperty");var isUnitlessNumber=CSSProperty.isUnitlessNumber;function dangerousStyleValue(name,value){var isEmpty=value==null||typeof value==="boolean"||value==="";if(isEmpty){return""}var isNonNumeric=isNaN(value);if(isNonNumeric||value===0||isUnitlessNumber.hasOwnProperty(name)&&isUnitlessNumber[name]){return""+value}if(typeof value==="string"){value=value.trim()}return value+"px"}module.exports=dangerousStyleValue},{"./CSSProperty":5}],121:[function(require,module,exports){(function(process){var assign=require("./Object.assign");var warning=require("./warning");function deprecated(namespace,oldName,newName,ctx,fn){var warned=false;if("production"!==process.env.NODE_ENV){var newFn=function(){"production"!==process.env.NODE_ENV?warning(warned,namespace+"."+oldName+" will be deprecated in a future version. "+("Use "+namespace+"."+newName+" instead.")):null;warned=true;return fn.apply(ctx,arguments)};newFn.displayName=namespace+"_"+oldName;return assign(newFn,fn)}return fn}module.exports=deprecated}).call(this,require("_process"))},{"./Object.assign":29,"./warning":161,_process:1}],122:[function(require,module,exports){function makeEmptyFunction(arg){return function(){return arg}}function emptyFunction(){}emptyFunction.thatReturns=makeEmptyFunction;emptyFunction.thatReturnsFalse=makeEmptyFunction(false);emptyFunction.thatReturnsTrue=makeEmptyFunction(true);emptyFunction.thatReturnsNull=makeEmptyFunction(null);emptyFunction.thatReturnsThis=function(){return this};emptyFunction.thatReturnsArgument=function(arg){return arg};module.exports=emptyFunction},{}],123:[function(require,module,exports){(function(process){"use strict";var emptyObject={};if("production"!==process.env.NODE_ENV){Object.freeze(emptyObject)}module.exports=emptyObject}).call(this,require("_process"))},{_process:1}],124:[function(require,module,exports){"use strict";var ESCAPE_LOOKUP={"&":"&",">":">","<":"<",'"':""","'":"'"};var ESCAPE_REGEX=/[&><"']/g;function escaper(match){return ESCAPE_LOOKUP[match]}function escapeTextForBrowser(text){return(""+text).replace(ESCAPE_REGEX,escaper)}module.exports=escapeTextForBrowser},{}],125:[function(require,module,exports){(function(process){"use strict";var ReactTextComponent=require("./ReactTextComponent");var traverseAllChildren=require("./traverseAllChildren");var warning=require("./warning");function flattenSingleChildIntoContext(traverseContext,child,name){var result=traverseContext;var keyUnique=!result.hasOwnProperty(name);"production"!==process.env.NODE_ENV?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):null;if(keyUnique&&child!=null){var type=typeof child;var normalizedValue;if(type==="string"){normalizedValue=ReactTextComponent(child)}else if(type==="number"){normalizedValue=ReactTextComponent(""+child)}else{normalizedValue=child}result[name]=normalizedValue}}function flattenChildren(children){if(children==null){return children}var result={};traverseAllChildren(children,flattenSingleChildIntoContext,result);return result}module.exports=flattenChildren}).call(this,require("_process"))},{"./ReactTextComponent":87,"./traverseAllChildren":159,"./warning":161,_process:1}],126:[function(require,module,exports){"use strict";function focusNode(node){try{node.focus()}catch(e){}}module.exports=focusNode},{}],127:[function(require,module,exports){"use strict";var forEachAccumulated=function(arr,cb,scope){if(Array.isArray(arr)){arr.forEach(cb,scope)}else if(arr){cb.call(scope,arr)}};module.exports=forEachAccumulated},{}],128:[function(require,module,exports){function getActiveElement(){try{return document.activeElement||document.body}catch(e){return document.body}}module.exports=getActiveElement},{}],129:[function(require,module,exports){"use strict";function getEventCharCode(nativeEvent){var charCode;var keyCode=nativeEvent.keyCode;if("charCode"in nativeEvent){charCode=nativeEvent.charCode;if(charCode===0&&keyCode===13){charCode=13}}else{charCode=keyCode}if(charCode>=32||charCode===13){return charCode}return 0}module.exports=getEventCharCode},{}],130:[function(require,module,exports){"use strict";var getEventCharCode=require("./getEventCharCode");var normalizeKey={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"};var translateToKey={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};function getEventKey(nativeEvent){if(nativeEvent.key){var key=normalizeKey[nativeEvent.key]||nativeEvent.key;if(key!=="Unidentified"){return key}}if(nativeEvent.type==="keypress"){var charCode=getEventCharCode(nativeEvent);return charCode===13?"Enter":String.fromCharCode(charCode)}if(nativeEvent.type==="keydown"||nativeEvent.type==="keyup"){return translateToKey[nativeEvent.keyCode]||"Unidentified"}return""}module.exports=getEventKey},{"./getEventCharCode":129}],131:[function(require,module,exports){"use strict";var modifierKeyToProp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function modifierStateGetter(keyArg){var syntheticEvent=this;var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.getModifierState){return nativeEvent.getModifierState(keyArg)}var keyProp=modifierKeyToProp[keyArg];return keyProp?!!nativeEvent[keyProp]:false}function getEventModifierState(nativeEvent){return modifierStateGetter}module.exports=getEventModifierState},{}],132:[function(require,module,exports){"use strict";function getEventTarget(nativeEvent){var target=nativeEvent.target||nativeEvent.srcElement||window;return target.nodeType===3?target.parentNode:target}module.exports=getEventTarget},{}],133:[function(require,module,exports){(function(process){var ExecutionEnvironment=require("./ExecutionEnvironment");var invariant=require("./invariant");var dummyNode=ExecutionEnvironment.canUseDOM?document.createElement("div"):null;var shouldWrap={circle:true,defs:true,ellipse:true,g:true,line:true,linearGradient:true,path:true,polygon:true,polyline:true,radialGradient:true,rect:true,stop:true,text:true};var selectWrap=[1,'<select multiple="true">',"</select>"];var tableWrap=[1,"<table>","</table>"];var trWrap=[3,"<table><tbody><tr>","</tr></tbody></table>"];var svgWrap=[1,"<svg>","</svg>"];var markupWrap={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:selectWrap,option:selectWrap,caption:tableWrap,colgroup:tableWrap,tbody:tableWrap,tfoot:tableWrap,thead:tableWrap,td:trWrap,th:trWrap,circle:svgWrap,defs:svgWrap,ellipse:svgWrap,g:svgWrap,line:svgWrap,linearGradient:svgWrap,path:svgWrap,polygon:svgWrap,polyline:svgWrap,radialGradient:svgWrap,rect:svgWrap,stop:svgWrap,text:svgWrap};function getMarkupWrap(nodeName){"production"!==process.env.NODE_ENV?invariant(!!dummyNode,"Markup wrapping node not initialized"):invariant(!!dummyNode);if(!markupWrap.hasOwnProperty(nodeName)){nodeName="*"}if(!shouldWrap.hasOwnProperty(nodeName)){if(nodeName==="*"){dummyNode.innerHTML="<link />"}else{dummyNode.innerHTML="<"+nodeName+"></"+nodeName+">"}shouldWrap[nodeName]=!dummyNode.firstChild}return shouldWrap[nodeName]?markupWrap[nodeName]:null}module.exports=getMarkupWrap}).call(this,require("_process"))},{"./ExecutionEnvironment":23,"./invariant":141,_process:1}],134:[function(require,module,exports){"use strict";function getLeafNode(node){while(node&&node.firstChild){node=node.firstChild}return node}function getSiblingNode(node){while(node){if(node.nextSibling){return node.nextSibling}node=node.parentNode}}function getNodeForCharacterOffset(root,offset){var node=getLeafNode(root);var nodeStart=0;var nodeEnd=0;while(node){if(node.nodeType==3){nodeEnd=nodeStart+node.textContent.length;if(nodeStart<=offset&&nodeEnd>=offset){return{node:node,offset:offset-nodeStart}}nodeStart=nodeEnd}node=getLeafNode(getSiblingNode(node))}}module.exports=getNodeForCharacterOffset},{}],135:[function(require,module,exports){"use strict";var DOC_NODE_TYPE=9;function getReactRootElementInContainer(container){if(!container){return null}if(container.nodeType===DOC_NODE_TYPE){return container.documentElement}else{return container.firstChild}}module.exports=getReactRootElementInContainer},{}],136:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var contentKey=null;function getTextContentAccessor(){if(!contentKey&&ExecutionEnvironment.canUseDOM){contentKey="textContent"in document.documentElement?"textContent":"innerText"}return contentKey}module.exports=getTextContentAccessor},{"./ExecutionEnvironment":23}],137:[function(require,module,exports){"use strict";function getUnboundedScrollPosition(scrollable){if(scrollable===window){return{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}return{x:scrollable.scrollLeft,y:scrollable.scrollTop}}module.exports=getUnboundedScrollPosition},{}],138:[function(require,module,exports){var _uppercasePattern=/([A-Z])/g;function hyphenate(string){return string.replace(_uppercasePattern,"-$1").toLowerCase()}module.exports=hyphenate},{}],139:[function(require,module,exports){"use strict";var hyphenate=require("./hyphenate");var msPattern=/^ms-/;function hyphenateStyleName(string){return hyphenate(string).replace(msPattern,"-ms-")}module.exports=hyphenateStyleName},{"./hyphenate":138}],140:[function(require,module,exports){(function(process){"use strict";var warning=require("./warning");var ReactElement=require("./ReactElement");var ReactLegacyElement=require("./ReactLegacyElement");var ReactNativeComponent=require("./ReactNativeComponent");var ReactEmptyComponent=require("./ReactEmptyComponent");function instantiateReactComponent(element,parentCompositeType){var instance;if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(element&&(typeof element.type==="function"||typeof element.type==="string"),"Only functions or strings can be mounted as React components."):null;if(element.type._mockedReactClassConstructor){ReactLegacyElement._isLegacyCallWarningEnabled=false;try{instance=new element.type._mockedReactClassConstructor(element.props)}finally{ReactLegacyElement._isLegacyCallWarningEnabled=true}if(ReactElement.isValidElement(instance)){instance=new instance.type(instance.props) | |
}var render=instance.render;if(!render){element=ReactEmptyComponent.getEmptyComponent()}else{if(render._isMockFunction&&!render._getMockImplementation()){render.mockImplementation(ReactEmptyComponent.getEmptyComponent)}instance.construct(element);return instance}}}if(typeof element.type==="string"){instance=ReactNativeComponent.createInstanceForTag(element.type,element.props,parentCompositeType)}else{instance=new element.type(element.props)}if("production"!==process.env.NODE_ENV){"production"!==process.env.NODE_ENV?warning(typeof instance.construct==="function"&&typeof instance.mountComponent==="function"&&typeof instance.receiveComponent==="function","Only React Components can be mounted."):null}instance.construct(element);return instance}module.exports=instantiateReactComponent}).call(this,require("_process"))},{"./ReactElement":58,"./ReactEmptyComponent":60,"./ReactLegacyElement":67,"./ReactNativeComponent":73,"./warning":161,_process:1}],141:[function(require,module,exports){(function(process){"use strict";var invariant=function(condition,format,a,b,c,d,e,f){if("production"!==process.env.NODE_ENV){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(){return args[argIndex++]}))}error.framesToPop=1;throw error}};module.exports=invariant}).call(this,require("_process"))},{_process:1}],142:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var useHasFeature;if(ExecutionEnvironment.canUseDOM){useHasFeature=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==true}function isEventSupported(eventNameSuffix,capture){if(!ExecutionEnvironment.canUseDOM||capture&&!("addEventListener"in document)){return false}var eventName="on"+eventNameSuffix;var isSupported=eventName in document;if(!isSupported){var element=document.createElement("div");element.setAttribute(eventName,"return;");isSupported=typeof element[eventName]==="function"}if(!isSupported&&useHasFeature&&eventNameSuffix==="wheel"){isSupported=document.implementation.hasFeature("Events.wheel","3.0")}return isSupported}module.exports=isEventSupported},{"./ExecutionEnvironment":23}],143:[function(require,module,exports){function isNode(object){return!!(object&&(typeof Node==="function"?object instanceof Node:typeof object==="object"&&typeof object.nodeType==="number"&&typeof object.nodeName==="string"))}module.exports=isNode},{}],144:[function(require,module,exports){"use strict";var supportedInputTypes={color:true,date:true,datetime:true,"datetime-local":true,email:true,month:true,number:true,password:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true};function isTextInputElement(elem){return elem&&(elem.nodeName==="INPUT"&&supportedInputTypes[elem.type]||elem.nodeName==="TEXTAREA")}module.exports=isTextInputElement},{}],145:[function(require,module,exports){var isNode=require("./isNode");function isTextNode(object){return isNode(object)&&object.nodeType==3}module.exports=isTextNode},{"./isNode":143}],146:[function(require,module,exports){"use strict";function joinClasses(className){if(!className){className=""}var nextClass;var argLength=arguments.length;if(argLength>1){for(var ii=1;ii<argLength;ii++){nextClass=arguments[ii];if(nextClass){className=(className?className+" ":"")+nextClass}}}return className}module.exports=joinClasses},{}],147:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");var keyMirror=function(obj){var ret={};var key;"production"!==process.env.NODE_ENV?invariant(obj instanceof Object&&!Array.isArray(obj),"keyMirror(...): Argument must be an object."):invariant(obj instanceof Object&&!Array.isArray(obj));for(key in obj){if(!obj.hasOwnProperty(key)){continue}ret[key]=key}return ret};module.exports=keyMirror}).call(this,require("_process"))},{"./invariant":141,_process:1}],148:[function(require,module,exports){var keyOf=function(oneKeyObj){var key;for(key in oneKeyObj){if(!oneKeyObj.hasOwnProperty(key)){continue}return key}return null};module.exports=keyOf},{}],149:[function(require,module,exports){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;function mapObject(object,callback,context){if(!object){return null}var result={};for(var name in object){if(hasOwnProperty.call(object,name)){result[name]=callback.call(context,object[name],name,object)}}return result}module.exports=mapObject},{}],150:[function(require,module,exports){"use strict";function memoizeStringOnly(callback){var cache={};return function(string){if(cache.hasOwnProperty(string)){return cache[string]}else{return cache[string]=callback.call(this,string)}}}module.exports=memoizeStringOnly},{}],151:[function(require,module,exports){(function(process){"use strict";var invariant=require("./invariant");function monitorCodeUse(eventName,data){"production"!==process.env.NODE_ENV?invariant(eventName&&!/[^a-z0-9_]/.test(eventName),"You must provide an eventName using only the characters [a-z0-9_]"):invariant(eventName&&!/[^a-z0-9_]/.test(eventName))}module.exports=monitorCodeUse}).call(this,require("_process"))},{"./invariant":141,_process:1}],152:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var invariant=require("./invariant");function onlyChild(children){"production"!==process.env.NODE_ENV?invariant(ReactElement.isValidElement(children),"onlyChild must be passed a children with exactly one child."):invariant(ReactElement.isValidElement(children));return children}module.exports=onlyChild}).call(this,require("_process"))},{"./ReactElement":58,"./invariant":141,_process:1}],153:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var performance;if(ExecutionEnvironment.canUseDOM){performance=window.performance||window.msPerformance||window.webkitPerformance}module.exports=performance||{}},{"./ExecutionEnvironment":23}],154:[function(require,module,exports){var performance=require("./performance");if(!performance||!performance.now){performance=Date}var performanceNow=performance.now.bind(performance);module.exports=performanceNow},{"./performance":153}],155:[function(require,module,exports){"use strict";var ExecutionEnvironment=require("./ExecutionEnvironment");var WHITESPACE_TEST=/^[ \r\n\t\f]/;var NONVISIBLE_TEST=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;var setInnerHTML=function(node,html){node.innerHTML=html};if(ExecutionEnvironment.canUseDOM){var testElement=document.createElement("div");testElement.innerHTML=" ";if(testElement.innerHTML===""){setInnerHTML=function(node,html){if(node.parentNode){node.parentNode.replaceChild(node,node)}if(WHITESPACE_TEST.test(html)||html[0]==="<"&&NONVISIBLE_TEST.test(html)){node.innerHTML=""+html;var textNode=node.firstChild;if(textNode.data.length===1){node.removeChild(textNode)}else{textNode.deleteData(0,1)}}else{node.innerHTML=html}}}}module.exports=setInnerHTML},{"./ExecutionEnvironment":23}],156:[function(require,module,exports){"use strict";function shallowEqual(objA,objB){if(objA===objB){return true}var key;for(key in objA){if(objA.hasOwnProperty(key)&&(!objB.hasOwnProperty(key)||objA[key]!==objB[key])){return false}}for(key in objB){if(objB.hasOwnProperty(key)&&!objA.hasOwnProperty(key)){return false}}return true}module.exports=shallowEqual},{}],157:[function(require,module,exports){"use strict";function shouldUpdateReactComponent(prevElement,nextElement){if(prevElement&&nextElement&&prevElement.type===nextElement.type&&prevElement.key===nextElement.key&&prevElement._owner===nextElement._owner){return true}return false}module.exports=shouldUpdateReactComponent},{}],158:[function(require,module,exports){(function(process){var invariant=require("./invariant");function toArray(obj){var length=obj.length;"production"!==process.env.NODE_ENV?invariant(!Array.isArray(obj)&&(typeof obj==="object"||typeof obj==="function"),"toArray: Array-like object expected"):invariant(!Array.isArray(obj)&&(typeof obj==="object"||typeof obj==="function"));"production"!==process.env.NODE_ENV?invariant(typeof length==="number","toArray: Object needs a length property"):invariant(typeof length==="number");"production"!==process.env.NODE_ENV?invariant(length===0||length-1 in obj,"toArray: Object should have keys for indices"):invariant(length===0||length-1 in obj);if(obj.hasOwnProperty){try{return Array.prototype.slice.call(obj)}catch(e){}}var ret=Array(length);for(var ii=0;ii<length;ii++){ret[ii]=obj[ii]}return ret}module.exports=toArray}).call(this,require("_process"))},{"./invariant":141,_process:1}],159:[function(require,module,exports){(function(process){"use strict";var ReactElement=require("./ReactElement");var ReactInstanceHandles=require("./ReactInstanceHandles");var invariant=require("./invariant");var SEPARATOR=ReactInstanceHandles.SEPARATOR;var SUBSEPARATOR=":";var userProvidedKeyEscaperLookup={"=":"=0",".":"=1",":":"=2"};var userProvidedKeyEscapeRegex=/[=.:]/g;function userProvidedKeyEscaper(match){return userProvidedKeyEscaperLookup[match]}function getComponentKey(component,index){if(component&&component.key!=null){return wrapUserProvidedKey(component.key)}return index.toString(36)}function escapeUserProvidedKey(text){return(""+text).replace(userProvidedKeyEscapeRegex,userProvidedKeyEscaper)}function wrapUserProvidedKey(key){return"$"+escapeUserProvidedKey(key)}var traverseAllChildrenImpl=function(children,nameSoFar,indexSoFar,callback,traverseContext){var nextName,nextIndex;var subtreeCount=0;if(Array.isArray(children)){for(var i=0;i<children.length;i++){var child=children[i];nextName=nameSoFar+(nameSoFar?SUBSEPARATOR:SEPARATOR)+getComponentKey(child,i);nextIndex=indexSoFar+subtreeCount;subtreeCount+=traverseAllChildrenImpl(child,nextName,nextIndex,callback,traverseContext)}}else{var type=typeof children;var isOnlyChild=nameSoFar==="";var storageName=isOnlyChild?SEPARATOR+getComponentKey(children,0):nameSoFar;if(children==null||type==="boolean"){callback(traverseContext,null,storageName,indexSoFar);subtreeCount=1}else if(type==="string"||type==="number"||ReactElement.isValidElement(children)){callback(traverseContext,children,storageName,indexSoFar);subtreeCount=1}else if(type==="object"){"production"!==process.env.NODE_ENV?invariant(!children||children.nodeType!==1,"traverseAllChildren(...): Encountered an invalid child; DOM "+"elements are not valid children of React components."):invariant(!children||children.nodeType!==1);for(var key in children){if(children.hasOwnProperty(key)){nextName=nameSoFar+(nameSoFar?SUBSEPARATOR:SEPARATOR)+wrapUserProvidedKey(key)+SUBSEPARATOR+getComponentKey(children[key],0);nextIndex=indexSoFar+subtreeCount;subtreeCount+=traverseAllChildrenImpl(children[key],nextName,nextIndex,callback,traverseContext)}}}}return subtreeCount};function traverseAllChildren(children,callback,traverseContext){if(children==null){return 0}return traverseAllChildrenImpl(children,"",0,callback,traverseContext)}module.exports=traverseAllChildren}).call(this,require("_process"))},{"./ReactElement":58,"./ReactInstanceHandles":66,"./invariant":141,_process:1}],160:[function(require,module,exports){(function(process){"use strict";var assign=require("./Object.assign");var keyOf=require("./keyOf");var invariant=require("./invariant");function shallowCopy(x){if(Array.isArray(x)){return x.concat()}else if(x&&typeof x==="object"){return assign(new x.constructor,x)}else{return x}}var COMMAND_PUSH=keyOf({$push:null});var COMMAND_UNSHIFT=keyOf({$unshift:null});var COMMAND_SPLICE=keyOf({$splice:null});var COMMAND_SET=keyOf({$set:null});var COMMAND_MERGE=keyOf({$merge:null});var COMMAND_APPLY=keyOf({$apply:null});var ALL_COMMANDS_LIST=[COMMAND_PUSH,COMMAND_UNSHIFT,COMMAND_SPLICE,COMMAND_SET,COMMAND_MERGE,COMMAND_APPLY];var ALL_COMMANDS_SET={};ALL_COMMANDS_LIST.forEach(function(command){ALL_COMMANDS_SET[command]=true});function invariantArrayCase(value,spec,command){"production"!==process.env.NODE_ENV?invariant(Array.isArray(value),"update(): expected target of %s to be an array; got %s.",command,value):invariant(Array.isArray(value));var specValue=spec[command];"production"!==process.env.NODE_ENV?invariant(Array.isArray(specValue),"update(): expected spec of %s to be an array; got %s. "+"Did you forget to wrap your parameter in an array?",command,specValue):invariant(Array.isArray(specValue))}function update(value,spec){"production"!==process.env.NODE_ENV?invariant(typeof spec==="object","update(): You provided a key path to update() that did not contain one "+"of %s. Did you forget to include {%s: ...}?",ALL_COMMANDS_LIST.join(", "),COMMAND_SET):invariant(typeof spec==="object");if(spec.hasOwnProperty(COMMAND_SET)){"production"!==process.env.NODE_ENV?invariant(Object.keys(spec).length===1,"Cannot have more than one key in an object with %s",COMMAND_SET):invariant(Object.keys(spec).length===1);return spec[COMMAND_SET]}var nextValue=shallowCopy(value);if(spec.hasOwnProperty(COMMAND_MERGE)){var mergeObj=spec[COMMAND_MERGE];"production"!==process.env.NODE_ENV?invariant(mergeObj&&typeof mergeObj==="object","update(): %s expects a spec of type 'object'; got %s",COMMAND_MERGE,mergeObj):invariant(mergeObj&&typeof mergeObj==="object");"production"!==process.env.NODE_ENV?invariant(nextValue&&typeof nextValue==="object","update(): %s expects a target of type 'object'; got %s",COMMAND_MERGE,nextValue):invariant(nextValue&&typeof nextValue==="object");assign(nextValue,spec[COMMAND_MERGE])}if(spec.hasOwnProperty(COMMAND_PUSH)){invariantArrayCase(value,spec,COMMAND_PUSH);spec[COMMAND_PUSH].forEach(function(item){nextValue.push(item)})}if(spec.hasOwnProperty(COMMAND_UNSHIFT)){invariantArrayCase(value,spec,COMMAND_UNSHIFT);spec[COMMAND_UNSHIFT].forEach(function(item){nextValue.unshift(item)})}if(spec.hasOwnProperty(COMMAND_SPLICE)){"production"!==process.env.NODE_ENV?invariant(Array.isArray(value),"Expected %s target to be an array; got %s",COMMAND_SPLICE,value):invariant(Array.isArray(value));"production"!==process.env.NODE_ENV?invariant(Array.isArray(spec[COMMAND_SPLICE]),"update(): expected spec of %s to be an array of arrays; got %s. "+"Did you forget to wrap your parameters in an array?",COMMAND_SPLICE,spec[COMMAND_SPLICE]):invariant(Array.isArray(spec[COMMAND_SPLICE]));spec[COMMAND_SPLICE].forEach(function(args){"production"!==process.env.NODE_ENV?invariant(Array.isArray(args),"update(): expected spec of %s to be an array of arrays; got %s. "+"Did you forget to wrap your parameters in an array?",COMMAND_SPLICE,spec[COMMAND_SPLICE]):invariant(Array.isArray(args));nextValue.splice.apply(nextValue,args)})}if(spec.hasOwnProperty(COMMAND_APPLY)){"production"!==process.env.NODE_ENV?invariant(typeof spec[COMMAND_APPLY]==="function","update(): expected spec of %s to be a function; got %s.",COMMAND_APPLY,spec[COMMAND_APPLY]):invariant(typeof spec[COMMAND_APPLY]==="function");nextValue=spec[COMMAND_APPLY](nextValue)}for(var k in spec){if(!(ALL_COMMANDS_SET.hasOwnProperty(k)&&ALL_COMMANDS_SET[k])){nextValue[k]=update(value[k],spec[k])}}return nextValue}module.exports=update}).call(this,require("_process"))},{"./Object.assign":29,"./invariant":141,"./keyOf":148,_process:1}],161:[function(require,module,exports){(function(process){"use strict";var emptyFunction=require("./emptyFunction");var warning=emptyFunction;if("production"!==process.env.NODE_ENV){warning=function(condition,format){for(var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++)args.push(arguments[$__0]);if(format===undefined){throw new Error("`warning(condition, format, ...args)` requires a warning "+"message argument")}if(!condition){var argIndex=0;console.warn("Warning: "+format.replace(/%s/g,function(){return args[argIndex++]}))}}}module.exports=warning}).call(this,require("_process"))},{"./emptyFunction":122,_process:1}],"react/addons":[function(require,module,exports){module.exports=require("./lib/ReactWithAddons")},{"./lib/ReactWithAddons":92}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";var assign=require("es5-ext/object/assign"),normalizeOpts=require("es5-ext/object/normalize-options"),isCallable=require("es5-ext/object/is-callable"),contains=require("es5-ext/string/#/contains"),d;d=module.exports=function(dscr,value){var c,e,w,options,desc;if(arguments.length<2||typeof dscr!=="string"){options=value;value=dscr;dscr=null}else{options=arguments[2]}if(dscr==null){c=w=true;e=false}else{c=contains.call(dscr,"c");e=contains.call(dscr,"e");w=contains.call(dscr,"w")}desc={value:value,configurable:c,enumerable:e,writable:w};return!options?desc:assign(normalizeOpts(options),desc)};d.gs=function(dscr,get,set){var c,e,options,desc;if(typeof dscr!=="string"){options=set;set=get;get=dscr;dscr=null}else{options=arguments[3]}if(get==null){get=undefined}else if(!isCallable(get)){options=get;get=set=undefined}else if(set==null){set=undefined}else if(!isCallable(set)){options=set;set=undefined}if(dscr==null){c=true;e=false}else{c=contains.call(dscr,"c");e=contains.call(dscr,"e")}desc={get:get,set:set,configurable:c,enumerable:e};return!options?desc:assign(normalizeOpts(options),desc)}},{"es5-ext/object/assign":2,"es5-ext/object/is-callable":5,"es5-ext/object/normalize-options":9,"es5-ext/string/#/contains":12}],2:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?Object.assign:require("./shim")},{"./is-implemented":3,"./shim":4}],3:[function(require,module,exports){"use strict";module.exports=function(){var assign=Object.assign,obj;if(typeof assign!=="function")return false;obj={foo:"raz"};assign(obj,{bar:"dwa"},{trzy:"trzy"});return obj.foo+obj.bar+obj.trzy==="razdwatrzy"}},{}],4:[function(require,module,exports){"use strict";var keys=require("../keys"),value=require("../valid-value"),max=Math.max;module.exports=function(dest,src){var error,i,l=max(arguments.length,2),assign;dest=Object(value(dest));assign=function(key){try{dest[key]=src[key]}catch(e){if(!error)error=e}};for(i=1;i<l;++i){src=arguments[i];keys(src).forEach(assign)}if(error!==undefined)throw error;return dest}},{"../keys":6,"../valid-value":11}],5:[function(require,module,exports){"use strict";module.exports=function(obj){return typeof obj==="function"}},{}],6:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?Object.keys:require("./shim")},{"./is-implemented":7,"./shim":8}],7:[function(require,module,exports){"use strict";module.exports=function(){try{Object.keys("primitive");return true}catch(e){return false}}},{}],8:[function(require,module,exports){"use strict";var keys=Object.keys;module.exports=function(object){return keys(object==null?object:Object(object))}},{}],9:[function(require,module,exports){"use strict";var forEach=Array.prototype.forEach,create=Object.create;var process=function(src,obj){var key;for(key in src)obj[key]=src[key]};module.exports=function(options){var result=create(null);forEach.call(arguments,function(options){if(options==null)return;process(Object(options),result)});return result}},{}],10:[function(require,module,exports){"use strict";module.exports=function(fn){if(typeof fn!=="function")throw new TypeError(fn+" is not a function");return fn}},{}],11:[function(require,module,exports){"use strict";module.exports=function(value){if(value==null)throw new TypeError("Cannot use null or undefined");return value}},{}],12:[function(require,module,exports){"use strict";module.exports=require("./is-implemented")()?String.prototype.contains:require("./shim")},{"./is-implemented":13,"./shim":14}],13:[function(require,module,exports){"use strict";var str="razdwatrzy";module.exports=function(){if(typeof str.contains!=="function")return false;return str.contains("dwa")===true&&str.contains("foo")===false}},{}],14:[function(require,module,exports){"use strict";var indexOf=String.prototype.indexOf;module.exports=function(searchString){return indexOf.call(this,searchString,arguments[1])>-1}},{}],"event-emitter":[function(require,module,exports){"use strict";var d=require("d"),callable=require("es5-ext/object/valid-callable"),apply=Function.prototype.apply,call=Function.prototype.call,create=Object.create,defineProperty=Object.defineProperty,defineProperties=Object.defineProperties,hasOwnProperty=Object.prototype.hasOwnProperty,descriptor={configurable:true,enumerable:false,writable:true},on,once,off,emit,methods,descriptors,base;on=function(type,listener){var data;callable(listener);if(!hasOwnProperty.call(this,"__ee__")){data=descriptor.value=create(null);defineProperty(this,"__ee__",descriptor);descriptor.value=null}else{data=this.__ee__}if(!data[type])data[type]=listener;else if(typeof data[type]==="object")data[type].push(listener);else data[type]=[data[type],listener];return this};once=function(type,listener){var once,self;callable(listener);self=this;on.call(this,type,once=function(){off.call(self,type,once);apply.call(listener,this,arguments)});once.__eeOnceListener__=listener;return this};off=function(type,listener){var data,listeners,candidate,i;callable(listener);if(!hasOwnProperty.call(this,"__ee__"))return this;data=this.__ee__;if(!data[type])return this;listeners=data[type];if(typeof listeners==="object"){for(i=0;candidate=listeners[i];++i){if(candidate===listener||candidate.__eeOnceListener__===listener){if(listeners.length===2)data[type]=listeners[i?0:1];else listeners.splice(i,1)}}}else{if(listeners===listener||listeners.__eeOnceListener__===listener){delete data[type]}}return this};emit=function(type){var i,l,listener,listeners,args;if(!hasOwnProperty.call(this,"__ee__"))return;listeners=this.__ee__[type];if(!listeners)return;if(typeof listeners==="object"){l=arguments.length;args=new Array(l-1);for(i=1;i<l;++i)args[i-1]=arguments[i];listeners=listeners.slice();for(i=0;listener=listeners[i];++i){apply.call(listener,this,args)}}else{switch(arguments.length){case 1:call.call(listeners,this);break;case 2:call.call(listeners,this,arguments[1]);break;case 3:call.call(listeners,this,arguments[1],arguments[2]);break;default:l=arguments.length;args=new Array(l-1);for(i=1;i<l;++i){args[i-1]=arguments[i]}apply.call(listeners,this,args)}}};methods={on:on,once:once,off:off,emit:emit};descriptors={on:d(on),once:d(once),off:d(off),emit:d(emit)};base=defineProperties({},descriptors);module.exports=exports=function(o){return o==null?create(base):defineProperties(Object(o),descriptors)};exports.methods=methods},{d:1,"es5-ext/object/valid-callable":10}]},{},[]);var Immutable=require("immutable");var React=require("react/addons");var emitter=require("event-emitter");var store=function(){var state=new Immutable.fromJS({people:[{id:1,name:"John"},{id:2,name:"Alice",parentId:1},{id:3,name:"Bob",parentId:1}],cat:{name:"Orion",ownerId:3}});var store=emitter({getState:function(){return state},renameJohn:function(){var curName=state.getIn(["people",0,"name"]);state=state.setIn(["people",0,"name"],curName==="John"?"Jane":"John");store._emitChange()},_emitChange:function(){store.emit("change")}});return store}();function findById(list,id){return list.find(function(item){return item.get("id")===id})}var Person=React.createClass({mixins:[React.addons.PureRenderMixin],props:{person:React.PropTypes.instanceOf(Immutable.Map),parent:React.PropTypes.instanceOf(Immutable.Map)},render:function(){return React.createElement("li",null,this.props.person.get("name")+(this.props.parent?" is a child of "+this.props.parent.get("name"):""))}});var App=React.createClass({getInitialState:function(){return store.getState()},componentDidMount:function(){store.on("change",this.onStoreChange)},componentWillUnmount:function(){store.off("change",this.onStoreChange)},onStoreChange:function(){this.replaceState(store.getState())},changeName:function(){store.renameJohn()},renderPerson:function(person){var parent=findById(this.state.get("people"),person.get("parentId"));return React.createElement(Person,{person:person,parent:parent})},renderCat:function(){var people=this.state.get("people");var cat=this.state.get("cat");var catOwner=findById(people,cat.get("ownerId"));var catOwnerParent=findById(people,catOwner.get("parentId"));return React.createElement("div",null,cat.get("name")+" is owned by "+catOwner.get("name")+", child of "+catOwnerParent.get("name"))},render:function(){var peopleElems=this.state.get("people").toArray().map(this.renderPerson);var catElem=this.renderCat();return React.createElement("div",{style:{fontFamily:"arial",padding:"30px"}},[React.createElement("h4",null,"People"),React.createElement("ul",null,peopleElems),React.createElement("h4",null,"The Cat"),React.createElement("div",null,catElem),React.createElement("br"),React.createElement("button",{onClick:this.changeName},"Toggle Name")])}});React.render(React.createElement(App),document.body); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"immutable": "3.6.2", | |
"react": "0.12.2", | |
"event-emitter": "0.3.3" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style type='text/css'>html, body { margin: 0; padding: 0; border: 0; } | |
body, html { height: 100%; width: 100%; }</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment