Files
flights_web_raw/node_modules/backstopjs/examples/simpleReactApp/compiled.js
T
gnezim 60e2149072 Add comprehensive e2e test suites for Tasks 16-25
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date)
- Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class
- Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting
- Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states
- Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions
- Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation

Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares)
- Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline
- Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements
- Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations
- Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary
- Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds

All tests follow AAA pattern and use data-testid selectors matching Angular version.
Total: 245 tests across 10 feature suites.
2026-04-05 19:25:03 +03:00

313 lines
422 KiB
JavaScript

(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 || 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 React = require('react'); var Search = require('./Search'); var Map = require('./Map'); var CurrentLocation = require('./CurrentLocation'); var LocationList = require('./LocationList'); var App = React.createClass({ displayName: 'App', getInitialState: function () { var favorites = []; if (localStorage.favorites) { favorites = JSON.parse(localStorage.favorites); } return { favorites: favorites, currentAddress: 'Paris, France', mapCoordinates: { lat: 48.856614, lng: 2.3522219 } }; }, toggleFavorite: function (address) { if (this.isAddressInFavorites(address)) { this.removeFromFavorites(address); } else { this.addToFavorites(address); } }, addToFavorites: function (address) { var favorites = this.state.favorites; favorites.push({ address: address, timestamp: Date.now() }); this.setState({ favorites: favorites }); localStorage.favorites = JSON.stringify(favorites); }, removeFromFavorites: function (address) { var favorites = this.state.favorites; var index = -1; for (var i = 0; i < favorites.length; i++) { if (favorites[i].address == address) { index = i; break; } } if (index !== -1) { favorites.splice(index, 1); this.setState({ favorites: favorites }); localStorage.favorites = JSON.stringify(favorites); } }, isAddressInFavorites: function (address) { var favorites = this.state.favorites; for (var i = 0; i < favorites.length; i++) { if (favorites[i].address == address) { return true; } } return false; }, searchForAddress: function (address) { var self = this; GMaps.geocode({ address: address, callback: function (results, status) { if (status !== 'OK') return; var latlng = results[0].geometry.location; self.setState({ currentAddress: results[0].formatted_address, mapCoordinates: { lat: latlng.lat(), lng: latlng.lng() } }); setTimeout(function () { console.log('gmapResponded'); }, 1e3); } }); }, componentDidMount: function () { var that = this; setTimeout(function () { that.searchForAddress('San Francisco'); }, 2e3); }, render: function () { return React.createElement('div', null, React.createElement('h1', null, 'Your Google Maps Locations'), React.createElement(Search, { onSearch: this.searchForAddress }), React.createElement(Map, { lat: this.state.mapCoordinates.lat, lng: this.state.mapCoordinates.lng }), React.createElement(CurrentLocation, { address: this.state.currentAddress, favorite: this.isAddressInFavorites(this.state.currentAddress), onFavoriteToggle: this.toggleFavorite }), React.createElement(LocationList, { locations: this.state.favorites, activeLocationAddress: this.state.currentAddress, onClick: this.searchForAddress })); } }); module.exports = App; }, { './CurrentLocation': 2, './LocationList': 4, './Map': 5, './Search': 6, react: 163 }],
2: [function (require, module, exports) { var React = require('react'); var CurrentLocation = React.createClass({ displayName: 'CurrentLocation', toggleFavorite: function () { this.props.onFavoriteToggle(this.props.address); }, render: function () { var starClassName = 'glyphicon glyphicon-star-empty'; if (this.props.favorite) { starClassName = 'glyphicon glyphicon-star'; } return React.createElement('div', { className: 'col-xs-12 col-md-6 col-md-offset-3 current-location' }, React.createElement('h4', { id: 'save-location' }, this.props.address), React.createElement('span', { className: starClassName, onClick: this.toggleFavorite, 'aria-hidden': 'true' })); } }); module.exports = CurrentLocation; }, { react: 163 }],
3: [function (require, module, exports) { var React = require('react'); var LocationItem = require('./LocationItem'); var moment = require('moment'); var LocationItem = React.createClass({ displayName: 'LocationItem', handleClick: function () { this.props.onClick(this.props.address); }, render: function () { var cn = 'list-group-item'; if (this.props.active) { cn += ' active-location'; } return React.createElement('a', { className: cn, onClick: this.handleClick }, this.props.address, React.createElement('span', { className: 'createdAt' }, moment(this.props.timestamp).fromNow()), React.createElement('span', { className: 'glyphicon glyphicon-menu-right' })); } }); module.exports = LocationItem; }, { './LocationItem': 3, moment: 8, react: 163 }],
4: [function (require, module, exports) { var React = require('react'); var LocationItem = require('./LocationItem'); var LocationList = React.createClass({ displayName: 'LocationList', render: function () { var self = this; var locations = this.props.locations.map(function (l) { var active = self.props.activeLocationAddress == l.address; return React.createElement(LocationItem, { address: l.address, timestamp: l.timestamp, active: active, onClick: self.props.onClick }); }); if (!locations.length) { return null; } return React.createElement('div', { className: 'list-group col-xs-12 col-md-6 col-md-offset-3' }, React.createElement('span', { className: 'list-group-item active' }, 'Saved Locations'), locations); } }); module.exports = LocationList; }, { './LocationItem': 3, react: 163 }],
5: [function (require, module, exports) { var React = require('react'); var Map = React.createClass({ displayName: 'Map', componentDidMount: function () { this.componentDidUpdate(); }, componentDidUpdate: function () { if (this.lastLat == this.props.lat && this.lastLng == this.props.lng) { return; } this.lastLat = this.props.lat; this.lastLng = this.props.lng; var map = new GMaps({ el: '#map', lat: this.props.lat, lng: this.props.lng }); map.addMarker({ lat: this.props.lat, lng: this.props.lng }); }, render: function () { return React.createElement('div', { className: 'map-holder' }, React.createElement('p', null, 'Loading...'), React.createElement('div', { id: 'map' })); } }); module.exports = Map; }, { react: 163 }],
6: [function (require, module, exports) { var React = require('react'); var Search = React.createClass({ displayName: 'Search', getInitialState: function () { return { value: '' }; }, handleChange: function (event) { this.setState({ value: event.target.value }); }, handleSubmit: function (event) { event.preventDefault(); this.props.onSearch(this.state.value); this.getDOMNode().querySelector('input').blur(); }, render: function () { return React.createElement('form', { id: 'geocoding_form', className: 'form-horizontal', onSubmit: this.handleSubmit }, React.createElement('div', { className: 'form-group' }, React.createElement('div', { className: 'col-xs-12 col-md-6 col-md-offset-3' }, React.createElement('div', { className: 'input-group' }, React.createElement('input', { type: 'text', className: 'form-control', id: 'address', placeholder: 'Find a location...', value: this.state.value, onChange: this.handleChange }), React.createElement('span', { className: 'input-group-btn' }, React.createElement('span', { className: 'glyphicon glyphicon-search', 'aria-hidden': 'true' })))))); } }); module.exports = Search; }, { react: 163 }],
7: [function (require, module, exports) { var React = require('react'); var App = require('./components/App'); React.render(React.createElement(App, null), document.getElementById('main')); }, { './components/App': 1, react: 163 }],
8: [function (require, module, exports) {
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory(); })(this, function () {
'use strict'; var hookCallback; function utils_hooks__hooks () { return hookCallback.apply(null, arguments); } function setHookCallback (callback) { hookCallback = callback; } function isArray (input) { return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } function isObject (input) { return Object.prototype.toString.call(input) === '[object Object]'; } function isObjectEmpty (obj) { var k; for (k in obj) { return false; } return true; } function isDate (input) { return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } function map (arr, fn) { var res = []; var i; for (i = 0; i < arr.length; ++i) { res.push(fn(arr[i], i)); } return res; } function hasOwnProp (a, b) { return Object.prototype.hasOwnProperty.call(a, b); } function extend (a, b) { for (var i in b) { if (hasOwnProp(b, i)) { a[i] = b[i]; } } if (hasOwnProp(b, 'toString')) { a.toString = b.toString; } if (hasOwnProp(b, 'valueOf')) { a.valueOf = b.valueOf; } return a; } function create_utc__createUTC (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, true).utc(); } function defaultParsingFlags () { return { empty: false, unusedTokens: [], unusedInput: [], overflow: -2, charsLeftOver: 0, nullInput: false, invalidMonth: null, invalidFormat: false, userInvalidated: false, iso: false, parsedDateParts: [], meridiem: null }; } function getParsingFlags (m) { if (m._pf == null) { m._pf = defaultParsingFlags(); } return m._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function (fun) { var t = Object(this); var len = t.length >>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function valid__isValid (m) { if (m._isValid == null) { var flags = getParsingFlags(m); var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); m._isValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts); if (m._strict) { m._isValid = m._isValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } } return m._isValid; } function valid__createInvalid (flags) { var m = create_utc__createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } function isUndefined (input) { return input === void 0; } var momentProperties = utils_hooks__hooks.momentProperties = []; function copyConfig (to, from) { var i, prop, val; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentProperties.length > 0) { for (i in momentProperties) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } var updateInProgress = false; function Moment (config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); if (updateInProgress === false) { updateInProgress = true; utils_hooks__hooks.updateOffset(this); updateInProgress = false; } } function isMoment (obj) { return obj instanceof Moment || obj != null && obj._isAMomentObject != null; } function absFloor (number) { if (number < 0) { return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt (argumentForCoercion) { var coercedNumber = +argumentForCoercion; var value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } function compareArrays (array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length); var lengthDiff = Math.abs(array1.length - array2.length); var diffs = 0; var i; for (i = 0; i < len; i++) { if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) { diffs++; } } return diffs + lengthDiff; } function warn (msg) { if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { console.warn('Deprecation warning: ' + msg); } } function deprecate (msg, fn) { var firstTime = true; return extend(function () { if (utils_hooks__hooks.deprecationHandler != null) { utils_hooks__hooks.deprecationHandler(null, msg); } if (firstTime) { warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple (name, msg) { if (utils_hooks__hooks.deprecationHandler != null) { utils_hooks__hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } }utils_hooks__hooks.suppressDeprecationWarnings = false; utils_hooks__hooks.deprecationHandler = null; function isFunction (input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } function locale_set__set (config) { var prop, i; for (i in config) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } this._config = config; this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); } function mergeConfigs (parentConfig, childConfig) { var res = extend({}, parentConfig); var prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { res[prop] = extend({}, res[prop]); } } return res; } function Locale (config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i; var res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay: '[Today at] LT', nextDay: '[Tomorrow at] LT', nextWeek: 'dddd [at] LT', lastDay: '[Yesterday at] LT', lastWeek: '[Last] dddd [at] LT', sameElse: 'L' }; function locale_calendar__calendar (key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { LTS: 'h:mm:ss A', LT: 'h:mm A', L: 'MM/DD/YYYY', LL: 'MMMM D, YYYY', LLL: 'MMMM D, YYYY h:mm A', LLLL: 'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key) { var format = this._longDateFormat[key]; var formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate () { return this._invalidDate; } var defaultOrdinal = '%d'; var defaultOrdinalParse = /\d{1,2}/; function ordinal (number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { future: 'in %s', past: '%s ago', s: 'a few seconds', m: 'a minute', mm: '%d minutes', h: 'an hour', hh: '%d hours', d: 'a day', dd: '%d days', M: 'a month', MM: '%d months', y: 'a year', yy: '%d years' }; function relative__relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias (unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits (units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits (inputObject) { var normalizedInput = {}; var normalizedProp; var prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority (unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits (unitsObj) { var units = []; for (var u in unitsObj) { units.push({ unit: u, priority: priorities[u] }); }units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { get_set__set(this, unit, value); utils_hooks__hooks.updateOffset(this, keepTime); return this; } else { return get_set__get(this, unit); } }; } function get_set__get (mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function get_set__set (mom, unit, value) { if (mom.isValid()) { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } function stringGet (units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet (units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units); for (var i = 0; i < prioritized.length; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } function zeroFill (number, targetLength, forceSign) { var absNumber = '' + Math.abs(number); var zerosToFill = targetLength - absNumber.length; var sign = number >= 0; return (sign ? forceSign ? '+' : '' : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions = {}; var formatTokenFunctions = {}; function addFormatToken (token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal(func.apply(this, arguments), token); }; } } function removeFormattingTokens (input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction (format) { var array = format.match(formattingTokens); var i; var length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = ''; var i; for (i = 0; i < length; i++) { output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; } return output; }; } function formatMoment (m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); }format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat (format, locale) { var i = 5; function replaceLongDateFormatTokens (input) { return locale.longDateFormat(input) || input; }localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var match1 = /\d/; var match2 = /\d\d/; var match3 = /\d{3}/; var match4 = /\d{4}/; var match6 = /[+-]?\d{6}/; var match1to2 = /\d\d?/; var match3to4 = /\d\d\d\d?/; var match5to6 = /\d\d\d\d\d\d?/; var match1to3 = /\d{1,3}/; var match1to4 = /\d{1,4}/; var match1to6 = /[+-]?\d{1,6}/; var matchUnsigned = /\d+/; var matchSigned = /[+-]?\d+/; var matchOffset = /Z|[+-]\d\d:?\d\d/gi; var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; var regexes = {}; function addRegexToken (token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return isStrict && strictRegex ? strictRegex : regex; }; } function getParseRegexForToken (token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } function unescapeFormat (s) { return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } function regexEscape (s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken (token, callback) { var i; var func = callback; if (typeof token === 'string') { token = [token]; } if (typeof callback === 'number') { func = function (input, array) { array[callback] = toInt(input); }; } for (i = 0; i < token.length; i++) { tokens[token[i]] = func; } } function addWeekParseToken (token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken (token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0; var MONTH = 1; var DATE = 2; var HOUR = 3; var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; var WEEK = 7; var WEEKDAY = 8; var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth (year, month) { return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); }addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); addUnitAlias('month', 'M'); addUnitPriority('month', 8); addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function units_month__handleStrictParse (monthName, format, strict) { var i; var ii; var mom; var llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = create_utc__createUTC([2e3, i]); this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse (monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return units_month__handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } for (i = 0; i < 12; i++) { mom = create_utc__createUTC([2e3, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } function setMonth (mom, value) { var dayOfMonth; if (!mom.isValid()) { return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); if (typeof value !== 'number') { return mom; } } }dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value) { if (value != null) { setMonth(this, value); utils_hooks__hooks.updateOffset(this, true); return this; } else { return get_set__get(this, 'Month'); } } function getDaysInMonth () { return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex = matchWord; function monthsShortRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } var defaultMonthsRegex = matchWord; function monthsRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse () { function cmpLenRev (a, b) { return b.length - a.length; } var shortPieces = []; var longPieces = []; var mixedPieces = []; var i; var mom; for (i = 0; i < 12; i++) { mom = create_utc__createUTC([2e3, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); }shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); }addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? '' + y : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); addUnitAlias('year', 'y'); addUnitPriority('year', 1); addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); function daysInYear (year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear (year) { return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0; }utils_hooks__hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3); }; var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear () { return isLeapYear(this.year()); } function createDate (y, m, d, h, M, s, ms) { var date = new Date(y, m, d, h, M, s, ms); if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { date.setFullYear(y); } return date; } function createUTCDate (y) { var date = new Date(Date.UTC.apply(null, arguments)); if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } return date; } function firstWeekOffset (year, dow, doy) { var fwd = 7 + dow - doy; var fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } function dayOfYearFromWeeks (year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7; var weekOffset = firstWeekOffset(year, dow, doy); var dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset; var resYear; var resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear (mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy); var week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1; var resWeek; var resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear (year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy); var weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; }addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); }); function localeWeek (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow: 0, doy: 6 }; function localeFirstDayOfWeek () { return this._week.dow; } function localeFirstDayOfYear () { return this._week.doy; } function getSetWeek (input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); }addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); function parseWeekday (input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); }input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday (input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format) { return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m) { return this._weekdaysShort[m.day()]; } var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m) { return this._weekdaysMin[m.day()]; } function day_of_week__handleStrictParse (weekdayName, format, strict) {
var i; var ii; var mom; var llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = create_utc__createUTC([2e3, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) {
if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; }
} else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; }ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } }
} function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { mom = create_utc__createUTC([2e3, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } function getSetDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } var defaultWeekdaysRegex = matchWord; function weekdaysRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } var defaultWeekdaysShortRegex = matchWord; function weekdaysShortRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } var defaultWeekdaysMinRegex = matchWord; function weekdaysMinRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse () { function cmpLenRev (a, b) { return b.length - a.length; } var minPieces = []; var shortPieces = []; var longPieces = []; var mixedPieces = []; var i; var mom; var minp; var shortp; var longp; for (i = 0; i < 7; i++) { mom = create_utc__createUTC([2e3, 1]).day(i); minp = this.weekdaysMin(mom, ''); shortp = this.weekdaysShort(mom, ''); longp = this.weekdays(mom, ''); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); }minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 7; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); mixedPieces[i] = regexEscape(mixedPieces[i]); } this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); } function hFormat () { return this.hours() % 12 || 12; } function kFormat () { return this.hours() || 24; }addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); }meridiem('a', true); meridiem('A', false); addUnitAlias('hour', 'h'); addUnitPriority('hour', 13); function matchMeridiem (isStrict, locale) { return locale._meridiemParse; }addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); function localeIsPM (input) { return (input + '').toLowerCase().charAt(0) === 'p'; } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } var getSetHour = makeGetSet('Hours', true); var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, ordinalParse: defaultOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse }; var locales = {}; var globalLocale; function normalizeLocale (key) { return key ? key.toLowerCase().replace('_', '-') : key; } function chooseLocale (names) { var i = 0; var j; var next; var locale; var split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { break; }j--; }i++; } return null; } function loadLocale (name) { var oldLocale = null; if (!locales[name] && typeof module !== 'undefined' && module && module.exports) { try { oldLocale = globalLocale._abbr; require('./locale/' + name); locale_locales__getSetGlobalLocale(oldLocale); } catch (e) {} } return locales[name]; } function locale_locales__getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = locale_locales__getLocale(key); } else { data = defineLocale(key, values); } if (data) { globalLocale = data; } } return globalLocale._abbr; } function defineLocale (name, config) { if (config !== null) { var parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { deprecateSimple('parentLocaleUndefined', 'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/'); } }locales[name] = new Locale(mergeConfigs(parentConfig, config)); locale_locales__getSetGlobalLocale(name); return locales[name]; } else { delete locales[name]; return null; } } function updateLocale (name, config) { if (config != null) { var locale; var parentConfig = baseConfig; if (locales[name] != null) { parentConfig = locales[name]._config; }config = mergeConfigs(parentConfig, config); locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; locale_locales__getSetGlobalLocale(name); } else { if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } function locale_locales__getLocale (key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { locale = loadLocale(key); if (locale) { return locale; }key = [key]; } return chooseLocale(key); } function locale_locales__listLocales () { return keys(locales); } function checkOverflow (m) { var overflow; var a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; }getParsingFlags(m).overflow = overflow; } return m; } var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/]]; var isoTimes = [['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/]]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; function configFromISO (config) { var i; var l; var string = config._i; var match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string); var allowTime; var dateFormat; var timeFormat; var tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } }config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } function configFromString (config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; }configFromISO(config); if (config._isValid === false) { delete config._isValid; utils_hooks__hooks.createFromInputFallback(config); } }utils_hooks__hooks.createFromInputFallback = deprecate('moment construction falls back to js Date. This is ' + 'discouraged and will be removed in upcoming major ' + 'release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); }); function defaults (a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray (config) { var nowValue = new Date(utils_hooks__hooks.now()); if (config._useUTC) { return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } function configFromArray (config) { var i; var date; var input = []; var currentDate; var yearToUse; if (config._d) { return; }currentDate = currentDateArray(config); if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } if (config._dayOfYear) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { getParsingFlags(config)._overflowDayOfYear = true; }date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } for (;i < 7; i++) { config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i]; } if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; }config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } } function dayOfYearFromWeekInfo (config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); week = defaults(w.w, 1); if (w.d != null) { weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } }utils_hooks__hooks.ISO_8601 = function () {}; function configFromStringAndFormat (config) { if (config._f === utils_hooks__hooks.ISO_8601) { configFromISO(config); return; }config._a = []; getParsingFlags(config).empty = true; var string = '' + config._i; var i; var parsedInput; var tokens; var token; var skipped; var stringLength = string.length; var totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); }string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); }addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } }getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; }getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem) { var isPm; if (meridiem == null) { return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { return hour; } } function configFromStringAndArray (config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; }tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!valid__isValid(tempConfig)) { continue; }currentScore += getParsingFlags(tempConfig).charsLeftOver; currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } }extend(config, bestMoment || tempConfig); } function configFromObject (config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i); config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig (config) { var input = config._i; var format = config._f; config._locale = config._locale || locale_locales__getLocale(config._l); if (input === null || format === undefined && input === '') { return valid__createInvalid({ nullInput: true }); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isArray(format)) { configFromStringAndArray(config); } else if (isDate(input)) { config._d = input; } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!valid__isValid(config)) { config._d = null; } return config; } function configFromInput (config) { var input = config._i; if (input === undefined) { config._d = new Date(utils_hooks__hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (typeof input === 'object') { configFromObject(config); } else if (typeof input === 'number') { config._d = new Date(input); } else { utils_hooks__hooks.createFromInputFallback(config); } } function createLocalOrUTC (input, format, locale, strict, isUTC) { var c = {}; if (typeof locale === 'boolean') { strict = locale; locale = undefined; } if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) { input = undefined; }c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function local__createLocal (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate('moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return valid__createInvalid(); } }); var prototypeMax = deprecate('moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return valid__createInvalid(); } }); function pickBy (fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return local__createLocal(); }res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +new Date(); }; function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration); var years = normalizedInput.year || 0; var quarters = normalizedInput.quarter || 0; var months = normalizedInput.month || 0; var weeks = normalizedInput.week || 0; var days = normalizedInput.day || 0; var hours = normalizedInput.hour || 0; var minutes = normalizedInput.minute || 0; var seconds = normalizedInput.second || 0; var milliseconds = normalizedInput.millisecond || 0; this._milliseconds = +milliseconds + seconds * 1e3 + minutes * 6e4 + hours * 1e3 * 60 * 60; this._days = +days + weeks * 7; this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = locale_locales__getLocale(); this._bubble(); } function isDuration (obj) { return obj instanceof Duration; } function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); var sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2); }); }offset('Z', ':'); offset('ZZ', ''); addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString (matcher, string) { var matches = (string || '').match(matcher) || []; var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); return parts[0] === '+' ? minutes : -minutes; } function cloneWithOffset (input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf(); res._d.setTime(res._d.valueOf() + diff); utils_hooks__hooks.updateOffset(res, false); return res; } else { return local__createLocal(input).local(); } } function getDateOffset (m) { return -Math.round(m._d.getTimezoneOffset() / 15) * 15; }utils_hooks__hooks.updateOffset = function () {}; function getSetOffset (input, keepLocalTime) { var offset = this._offset || 0; var localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); } else if (Math.abs(input) < 16) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; utils_hooks__hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone (input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC (keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset () { if (this._tzm) { this.utcOffset(this._tzm); } else if (typeof this._i === 'string') { this.utcOffset(offsetFromString(matchOffset, this._i)); } return this; } function hasAlignedHourOffset (input) { if (!this.isValid()) { return false; }input = input ? local__createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime () { return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset(); } function isDaylightSavingTimeShifted () { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}; copyConfig(c, this); c = prepareConfig(c); if (c._a) { var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal () { return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { return this.isValid() ? this._isUTC : false; } function isUtc () { return this.isValid() ? this._isUTC && this._offset === 0 : false; } var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/; function create__createDuration (input, key) { var duration = input; var match = null; var sign; var ret; var diffRes; if (isDuration(input)) { duration = { ms: input._milliseconds, d: input._days, M: input._months }; } else if (typeof input === 'number') { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (match = aspNetRegex.exec(input)) { sign = match[1] === '-' ? -1 : 1; duration = { y: 0, d: toInt(match[DATE]) * sign, h: toInt(match[HOUR]) * sign, m: toInt(match[MINUTE]) * sign, s: toInt(match[SECOND]) * sign, ms: toInt(match[MILLISECOND]) * sign }; } else if (match = isoRegex.exec(input)) { sign = match[1] === '-' ? -1 : 1; duration = { y: parseIso(match[2], sign), M: parseIso(match[3], sign), w: parseIso(match[4], sign), d: parseIso(match[5], sign), h: parseIso(match[6], sign), m: parseIso(match[7], sign), s: parseIso(match[8], sign) }; } else if (duration == null) { duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; }ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } return ret; }create__createDuration.fn = Duration.prototype; function parseIso (inp, sign) { var res = inp && parseFloat(inp.replace(',', '.')); return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference (base, other) { var res = { milliseconds: 0, months: 0 }; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; }res.milliseconds = +other - +base.clone().add(res.months, 'M'); return res; } function momentsDifference (base, other) { var res; if (!(base.isValid() && other.isValid())) { return { milliseconds: 0, months: 0 }; }other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } function absRound (number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } function createAdder (direction, name) { return function (val, period) { var dur, tmp; if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; }val = typeof val === 'string' ? +val : val; dur = create__createDuration(val, period); add_subtract__addSubtract(this, dur, direction); return this; }; } function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds; var days = absRound(duration._days); var months = absRound(duration._months); if (!mom.isValid()) { return; }updateOffset = updateOffset == null ? true : updateOffset; if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (days) { get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); } if (months) { setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); } if (updateOffset) { utils_hooks__hooks.updateOffset(mom, days || months); } } var add_subtract__add = createAdder(1, 'add'); var add_subtract__subtract = createAdder(-1, 'subtract'); function getCalendarFormat (myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function moment_calendar__calendar (time, formats) { var now = time || local__createLocal(); var sod = cloneWithOffset(now, this).startOf('day'); var format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse'; var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); } function clone () { return new Moment(this); } function isAfter (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; }units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; }units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween (from, to, units, inclusivity) { inclusivity = inclusivity || '()'; return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); } function isSame (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input); var inputMs; if (!(this.isValid() && localInput.isValid())) { return false; }units = normalizeUnits(units || 'millisecond'); if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } } function isSameOrAfter (input, units) { return this.isSame(input, units) || this.isAfter(input, units); } function isSameOrBefore (input, units) { return this.isSame(input, units) || this.isBefore(input, units); } function diff (input, units, asFloat) {
var that, zoneDelta, delta, output; if (!this.isValid()) { return NaN; }that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; }zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); if (units === 'year' || units === 'month' || units === 'quarter') { output = monthDiff(this, that); if (units === 'quarter') { output = output / 3; } else if (units === 'year') { output = output / 12; } } else {
delta = this - that; output = units === 'second' ? delta / 1e3 : units === 'minute' ? delta / 6e4 : units === 'hour' ? delta / 36e5 : units === 'day' ? (delta - zoneDelta) / 864e5 : units === 'week' ? (delta - zoneDelta) / 6048e5 : delta;
} return asFloat ? output : absFloor(output);
} function monthDiff (a, b) { var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()); var anchor = a.clone().add(wholeMonthDiff, 'months'); var anchor2; var adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); adjust = (b - anchor) / (anchor2 - anchor); } return -(wholeMonthDiff + adjust) || 0; }utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString () { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function moment_format__toISOString () { var m = this.clone().utc(); if (m.year() > 0 && m.year() <= 9999) { if (isFunction(Date.prototype.toISOString)) { return this.toDate().toISOString(); } else { return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } } else { return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } } function format (inputString) { if (!inputString) { inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from (time, withoutSuffix) { if (this.isValid() && (isMoment(time) && time.isValid() || local__createLocal(time).isValid())) { return create__createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow (withoutSuffix) { return this.from(local__createLocal(), withoutSuffix); } function to (time, withoutSuffix) { if (this.isValid() && (isMoment(time) && time.isValid() || local__createLocal(time).isValid())) { return create__createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow (withoutSuffix) { return this.to(local__createLocal(), withoutSuffix); } function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = locale_locales__getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate('moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } }); function localeData () { return this._locale; } function startOf (units) { units = normalizeUnits(units); switch (units) { case 'year':this.month(0); case 'quarter':case 'month':this.date(1); case 'week':case 'isoWeek':case 'day':case 'date':this.hours(0); case 'hour':this.minutes(0); case 'minute':this.seconds(0); case 'second':this.milliseconds(0); } if (units === 'week') { this.weekday(0); } if (units === 'isoWeek') { this.isoWeekday(1); } if (units === 'quarter') { this.month(Math.floor(this.month() / 3) * 3); } return this; } function endOf (units) { units = normalizeUnits(units); if (units === undefined || units === 'millisecond') { return this; } if (units === 'date') { units = 'day'; } return this.startOf(units).add(1, units === 'isoWeek' ? 'week' : units).subtract(1, 'ms'); } function to_type__valueOf () { return this._d.valueOf() - (this._offset || 0) * 6e4; } function unix () { return Math.floor(this.valueOf() / 1e3); } function toDate () { return new Date(this.valueOf()); } function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } function toJSON () { return this.isValid() ? this.toISOString() : null; } function moment_valid__isValid () { return valid__isValid(this); } function parsingFlags () { return extend({}, getParsingFlags(this)); } function invalidAt () { return getParsingFlags(this).overflow; } function creationData () { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }; }addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter) { addFormatToken(0, [token, token.length], 0, getter); }addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = utils_hooks__hooks.parseTwoDigitYear(input); }); function getSetWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { return weeksInYear(this.year(), 1, 4); } function getWeeksInYear () { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper (input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll (weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); var date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; }addFormatToken('Q', 0, 'Qo', 'quarter'); addUnitAlias('quarter', 'Q'); addUnitPriority('quarter', 7); addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); function getSetQuarter (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); }addFormatToken('D', ['DD', 2], 'Do', 'date'); addUnitAlias('date', 'D'); addUnitPriority('date', 9); addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0], 10); }); var getSetDayOfMonth = makeGetSet('Date', true); addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); addUnitAlias('dayOfYear', 'DDD'); addUnitPriority('dayOfYear', 4); addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); }addFormatToken('m', ['mm', 2], 0, 'minute'); addUnitAlias('minute', 'm'); addUnitPriority('minute', 14); addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); var getSetMinute = makeGetSet('Minutes', false); addFormatToken('s', ['ss', 2], 0, 'second'); addUnitAlias('second', 's'); addUnitPriority('second', 15); addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); var getSetSecond = makeGetSet('Seconds', false); addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1e3; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 1e4; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 1e5; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1e6; }); addUnitAlias('millisecond', 'ms'); addUnitPriority('millisecond', 16); addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs (input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1e3); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } var getSetMillisecond = makeGetSet('Milliseconds', false); addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); function getZoneAbbr () { return this._isUTC ? 'UTC' : ''; } function getZoneName () { return this._isUTC ? 'Coordinated Universal Time' : ''; } var momentPrototype__proto = Moment.prototype; momentPrototype__proto.add = add_subtract__add; momentPrototype__proto.calendar = moment_calendar__calendar; momentPrototype__proto.clone = clone; momentPrototype__proto.diff = diff; momentPrototype__proto.endOf = endOf; momentPrototype__proto.format = format; momentPrototype__proto.from = from; momentPrototype__proto.fromNow = fromNow; momentPrototype__proto.to = to; momentPrototype__proto.toNow = toNow; momentPrototype__proto.get = stringGet; momentPrototype__proto.invalidAt = invalidAt; momentPrototype__proto.isAfter = isAfter; momentPrototype__proto.isBefore = isBefore; momentPrototype__proto.isBetween = isBetween; momentPrototype__proto.isSame = isSame; momentPrototype__proto.isSameOrAfter = isSameOrAfter; momentPrototype__proto.isSameOrBefore = isSameOrBefore; momentPrototype__proto.isValid = moment_valid__isValid; momentPrototype__proto.lang = lang; momentPrototype__proto.locale = locale; momentPrototype__proto.localeData = localeData; momentPrototype__proto.max = prototypeMax; momentPrototype__proto.min = prototypeMin; momentPrototype__proto.parsingFlags = parsingFlags; momentPrototype__proto.set = stringSet; momentPrototype__proto.startOf = startOf; momentPrototype__proto.subtract = add_subtract__subtract; momentPrototype__proto.toArray = toArray; momentPrototype__proto.toObject = toObject; momentPrototype__proto.toDate = toDate; momentPrototype__proto.toISOString = moment_format__toISOString; momentPrototype__proto.toJSON = toJSON; momentPrototype__proto.toString = toString; momentPrototype__proto.unix = unix; momentPrototype__proto.valueOf = to_type__valueOf; momentPrototype__proto.creationData = creationData; momentPrototype__proto.year = getSetYear; momentPrototype__proto.isLeapYear = getIsLeapYear; momentPrototype__proto.weekYear = getSetWeekYear; momentPrototype__proto.isoWeekYear = getSetISOWeekYear; momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; momentPrototype__proto.month = getSetMonth; momentPrototype__proto.daysInMonth = getDaysInMonth; momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; momentPrototype__proto.weeksInYear = getWeeksInYear; momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; momentPrototype__proto.date = getSetDayOfMonth; momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; momentPrototype__proto.weekday = getSetLocaleDayOfWeek; momentPrototype__proto.isoWeekday = getSetISODayOfWeek; momentPrototype__proto.dayOfYear = getSetDayOfYear; momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; momentPrototype__proto.utcOffset = getSetOffset; momentPrototype__proto.utc = setOffsetToUTC; momentPrototype__proto.local = setOffsetToLocal; momentPrototype__proto.parseZone = setOffsetToParsedOffset; momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; momentPrototype__proto.isDST = isDaylightSavingTime; momentPrototype__proto.isLocal = isLocal; momentPrototype__proto.isUtcOffset = isUtcOffset; momentPrototype__proto.isUtc = isUtc; momentPrototype__proto.isUTC = isUtc; momentPrototype__proto.zoneAbbr = getZoneAbbr; momentPrototype__proto.zoneName = getZoneName; momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); var momentPrototype = momentPrototype__proto; function moment__createUnix (input) { return local__createLocal(input * 1e3); } function moment__createInZone () { return local__createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat (string) { return string; } var prototype__proto = Locale.prototype; prototype__proto.calendar = locale_calendar__calendar; prototype__proto.longDateFormat = longDateFormat; prototype__proto.invalidDate = invalidDate; prototype__proto.ordinal = ordinal; prototype__proto.preparse = preParsePostFormat; prototype__proto.postformat = preParsePostFormat; prototype__proto.relativeTime = relative__relativeTime; prototype__proto.pastFuture = pastFuture; prototype__proto.set = locale_set__set; prototype__proto.months = localeMonths; prototype__proto.monthsShort = localeMonthsShort; prototype__proto.monthsParse = localeMonthsParse; prototype__proto.monthsRegex = monthsRegex; prototype__proto.monthsShortRegex = monthsShortRegex; prototype__proto.week = localeWeek; prototype__proto.firstDayOfYear = localeFirstDayOfYear; prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; prototype__proto.weekdays = localeWeekdays; prototype__proto.weekdaysMin = localeWeekdaysMin; prototype__proto.weekdaysShort = localeWeekdaysShort; prototype__proto.weekdaysParse = localeWeekdaysParse; prototype__proto.weekdaysRegex = weekdaysRegex; prototype__proto.weekdaysShortRegex = weekdaysShortRegex; prototype__proto.weekdaysMinRegex = weekdaysMinRegex; prototype__proto.isPM = localeIsPM; prototype__proto.meridiem = localeMeridiem; function lists__get (format, index, field, setter) { var locale = locale_locales__getLocale(); var utc = create_utc__createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl (format, index, field) { if (typeof format === 'number') { index = format; format = undefined; }format = format || ''; if (index != null) { return lists__get(format, index, field, 'month'); } var i; var out = []; for (i = 0; i < 12; i++) { out[i] = lists__get(format, i, field, 'month'); } return out; } function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (typeof format === 'number') { index = format; format = undefined; }format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (typeof format === 'number') { index = format; format = undefined; }format = format || ''; } var locale = locale_locales__getLocale(); var shift = localeSorted ? locale._week.dow : 0; if (index != null) { return lists__get(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = lists__get(format, (i + shift) % 7, field, 'day'); } return out; } function lists__listMonths (format, index) { return listMonthsImpl(format, index, 'months'); } function lists__listMonthsShort (format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function lists__listWeekdays (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function lists__listWeekdaysShort (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function lists__listWeekdaysMin (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); }locale_locales__getSetGlobalLocale('en', { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal: function (number) { var b = number % 10; var output = toInt(number % 100 / 10) === 1 ? 'th' : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th'; return number + output; } }); utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); var mathAbs = Math.abs; function duration_abs__abs () { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function duration_add_subtract__addSubtract (duration, input, value, direction) { var other = create__createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } function duration_add_subtract__add (input, value) { return duration_add_subtract__addSubtract(this, input, value, 1); } function duration_add_subtract__subtract (input, value) { return duration_add_subtract__addSubtract(this, input, value, -1); } function absCeil (number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble () { var milliseconds = this._milliseconds; var days = this._days; var months = this._months; var data = this._data; var seconds, minutes, hours, years, monthsFromDays; if (!(milliseconds >= 0 && days >= 0 && months >= 0 || milliseconds <= 0 && days <= 0 && months <= 0)) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; }data.milliseconds = milliseconds % 1e3; seconds = absFloor(milliseconds / 1e3); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths (days) { return days * 4800 / 146097; } function monthsToDays (months) { return months * 146097 / 4800; } function as (units) { var days; var months; var milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); return units === 'month' ? months : months / 12; } else { days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week':return days / 7 + milliseconds / 6048e5; case 'day':return days + milliseconds / 864e5; case 'hour':return days * 24 + milliseconds / 36e5; case 'minute':return days * 1440 + milliseconds / 6e4; case 'second':return days * 86400 + milliseconds / 1e3; case 'millisecond':return Math.floor(days * 864e5) + milliseconds; default:throw new Error('Unknown unit ' + units); } } } function duration_as__valueOf () { return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6; } function makeAs (alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'); var asSeconds = makeAs('s'); var asMinutes = makeAs('m'); var asHours = makeAs('h'); var asDays = makeAs('d'); var asWeeks = makeAs('w'); var asMonths = makeAs('M'); var asYears = makeAs('y'); function duration_get__get (units) { units = normalizeUnits(units); return this[units + 's'](); } function makeGetter (name) { return function () { return this._data[name]; }; } var milliseconds = makeGetter('milliseconds'); var seconds = makeGetter('seconds'); var minutes = makeGetter('minutes'); var hours = makeGetter('hours'); var days = makeGetter('days'); var months = makeGetter('months'); var years = makeGetter('years'); function weeks () { return absFloor(this.days() / 7); } var round = Math.round; var thresholds = { s: 45, m: 45, h: 22, d: 26, M: 11 }; function substituteTimeAgo (string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { var duration = create__createDuration(posNegDuration).abs(); var seconds = round(duration.as('s')); var minutes = round(duration.as('m')); var hours = round(duration.as('h')); var days = round(duration.as('d')); var months = round(duration.as('M')); var years = round(duration.as('y')); var a = seconds < thresholds.s && ['s', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } function duration_humanize__getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof roundingFunction === 'function') { round = roundingFunction; return true; } return false; } function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; }thresholds[threshold] = limit; return true; } function humanize (withSuffix) { var locale = this.localeData(); var output = duration_humanize__relativeTime(this, !withSuffix, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var iso_string__abs = Math.abs; function iso_string__toISOString () { var seconds = iso_string__abs(this._milliseconds) / 1e3; var days = iso_string__abs(this._days); var months = iso_string__abs(this._months); var minutes, hours, years; minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; years = absFloor(months / 12); months %= 12; var Y = years; var M = months; var D = days; var h = hours; var m = minutes; var s = seconds; var total = this.asSeconds(); if (!total) { return 'P0D'; } return (total < 0 ? '-' : '') + 'P' + (Y ? Y + 'Y' : '') + (M ? M + 'M' : '') + (D ? D + 'D' : '') + (h || m || s ? 'T' : '') + (h ? h + 'H' : '') + (m ? m + 'M' : '') + (s ? s + 'S' : ''); } var duration_prototype__proto = Duration.prototype; duration_prototype__proto.abs = duration_abs__abs; duration_prototype__proto.add = duration_add_subtract__add; duration_prototype__proto.subtract = duration_add_subtract__subtract; duration_prototype__proto.as = as; duration_prototype__proto.asMilliseconds = asMilliseconds; duration_prototype__proto.asSeconds = asSeconds; duration_prototype__proto.asMinutes = asMinutes; duration_prototype__proto.asHours = asHours; duration_prototype__proto.asDays = asDays; duration_prototype__proto.asWeeks = asWeeks; duration_prototype__proto.asMonths = asMonths; duration_prototype__proto.asYears = asYears; duration_prototype__proto.valueOf = duration_as__valueOf; duration_prototype__proto._bubble = bubble; duration_prototype__proto.get = duration_get__get; duration_prototype__proto.milliseconds = milliseconds; duration_prototype__proto.seconds = seconds; duration_prototype__proto.minutes = minutes; duration_prototype__proto.hours = hours; duration_prototype__proto.days = days; duration_prototype__proto.weeks = weeks; duration_prototype__proto.months = months; duration_prototype__proto.years = years; duration_prototype__proto.humanize = humanize; duration_prototype__proto.toISOString = iso_string__toISOString; duration_prototype__proto.toString = iso_string__toISOString; duration_prototype__proto.toJSON = iso_string__toISOString; duration_prototype__proto.locale = locale; duration_prototype__proto.localeData = localeData; duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); duration_prototype__proto.lang = lang; addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input, 10) * 1e3); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); utils_hooks__hooks.version = '2.14.1'; setHookCallback(local__createLocal); utils_hooks__hooks.fn = momentPrototype; utils_hooks__hooks.min = min; utils_hooks__hooks.max = max; utils_hooks__hooks.now = now; utils_hooks__hooks.utc = create_utc__createUTC; utils_hooks__hooks.unix = moment__createUnix; utils_hooks__hooks.months = lists__listMonths; utils_hooks__hooks.isDate = isDate; utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; utils_hooks__hooks.invalid = valid__createInvalid; utils_hooks__hooks.duration = create__createDuration; utils_hooks__hooks.isMoment = isMoment; utils_hooks__hooks.weekdays = lists__listWeekdays; utils_hooks__hooks.parseZone = moment__createInZone; utils_hooks__hooks.localeData = locale_locales__getLocale; utils_hooks__hooks.isDuration = isDuration; utils_hooks__hooks.monthsShort = lists__listMonthsShort; utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; utils_hooks__hooks.defineLocale = defineLocale; utils_hooks__hooks.updateLocale = updateLocale; utils_hooks__hooks.locales = locale_locales__listLocales; utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits = normalizeUnits; utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding; utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; utils_hooks__hooks.calendarFormat = getCalendarFormat; utils_hooks__hooks.prototype = momentPrototype; var _moment = utils_hooks__hooks; return _moment;
});
}, {}],
9: [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': 127 }],
10: [function (require, module, exports) { 'use strict'; var EventConstants = require('./EventConstants'); var EventPropagators = require('./EventPropagators'); var ExecutionEnvironment = require('./ExecutionEnvironment'); var FallbackCompositionState = require('./FallbackCompositionState'); var SyntheticCompositionEvent = require('./SyntheticCompositionEvent'); var SyntheticInputEvent = require('./SyntheticInputEvent'); var keyOf = require('./keyOf'); var END_KEYCODES = [9, 13, 27, 32]; var START_KEYCODE = 229; var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window; var documentMode = null; if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { documentMode = document.documentMode; } var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto(); var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11); 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] }, 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] } }; var hasSpaceKeypress = false; function isKeypressCommand (nativeEvent) { return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && !(nativeEvent.ctrlKey && nativeEvent.altKey); } function getCompositionEventType (topLevelType) { switch (topLevelType) { case topLevelTypes.topCompositionStart:return eventTypes.compositionStart; case topLevelTypes.topCompositionEnd:return eventTypes.compositionEnd; case topLevelTypes.topCompositionUpdate:return eventTypes.compositionUpdate; } } function isFallbackCompositionStart (topLevelType, nativeEvent) { return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE; } function isFallbackCompositionEnd (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 getDataFromCustomEvent (nativeEvent) { var detail = nativeEvent.detail; if (typeof detail === 'object' && 'data' in detail) { return detail.data; } return null; } var currentComposition = null; function extractCompositionEvent (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) { var eventType; var fallbackData; if (canUseCompositionEvent) { eventType = getCompositionEventType(topLevelType); } else if (!currentComposition) { if (isFallbackCompositionStart(topLevelType, nativeEvent)) { eventType = eventTypes.compositionStart; } } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { eventType = eventTypes.compositionEnd; } if (!eventType) { return null; } if (useFallbackCompositionData) { if (!currentComposition && eventType === eventTypes.compositionStart) { currentComposition = FallbackCompositionState.getPooled(topLevelTarget); } else if (eventType === eventTypes.compositionEnd) { if (currentComposition) { fallbackData = currentComposition.getData(); } } } var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent); if (fallbackData) { event.data = fallbackData; } else { var customData = getDataFromCustomEvent(nativeEvent); if (customData !== null) { event.data = customData; } }EventPropagators.accumulateTwoPhaseDispatches(event); return event; } function getNativeBeforeInputChars (topLevelType, nativeEvent) { switch (topLevelType) { case topLevelTypes.topCompositionEnd:return getDataFromCustomEvent(nativeEvent); case topLevelTypes.topKeyPress:var which = nativeEvent.which; if (which !== SPACEBAR_CODE) { return null; }hasSpaceKeypress = true; return SPACEBAR_CHAR; case topLevelTypes.topTextInput:var chars = nativeEvent.data; if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { return null; } return chars; default:return null; } } function getFallbackBeforeInputChars (topLevelType, nativeEvent) { if (currentComposition) { if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) { var chars = currentComposition.getData(); FallbackCompositionState.release(currentComposition); currentComposition = null; return chars; } return null; } switch (topLevelType) { case topLevelTypes.topPaste:return null; case topLevelTypes.topKeyPress:if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { return String.fromCharCode(nativeEvent.which); } return null; case topLevelTypes.topCompositionEnd:return useFallbackCompositionData ? null : nativeEvent.data; default:return null; } } function extractBeforeInputEvent (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) { var chars; if (canUseTextInputEvent) { chars = getNativeBeforeInputChars(topLevelType, nativeEvent); } else { chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); } if (!chars) { return null; } var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent); event.data = chars; EventPropagators.accumulateTwoPhaseDispatches(event); return event; } var BeforeInputEventPlugin = { eventTypes: eventTypes, extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent) { return [extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent), extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent)]; } }; module.exports = BeforeInputEventPlugin; }, { './EventConstants': 22,
'./EventPropagators': 27,
'./ExecutionEnvironment': 28,
'./FallbackCompositionState': 29,
'./SyntheticCompositionEvent': 101,
'./SyntheticInputEvent': 105,
'./keyOf': 149 }],
11: [function (require, module, exports) { 'use strict'; var isUnitlessNumber = { boxFlex: true, boxFlexGroup: true, columnCount: true, flex: true, flexGrow: true, flexPositive: true, flexShrink: true, flexNegative: true, fontWeight: true, lineClamp: true, lineHeight: true, opacity: true, order: true, orphans: true, widows: true, zIndex: true, zoom: true, fillOpacity: true, strokeDashoffset: true, strokeOpacity: true, strokeWidth: 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; }, {}],
12: [function (require, module, exports) { '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' !== 'production') { var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; var badStyleValueWithSemicolonPattern = /;\s*$/; var warnedStyleNames = {}; var warnedStyleValues = {}; var warnHyphenatedStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; }warnedStyleNames[name] = true; 'production' !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : null; }; var warnBadVendoredStyleName = function (name) { if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { return; }warnedStyleNames[name] = true; 'production' !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : null; }; var warnStyleValueWithSemicolon = function (name, value) { if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { return; }warnedStyleValues[value] = true; 'production' !== 'production' ? warning(false, "Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : null; }; var warnValidStyle = function (name, value) { if (name.indexOf('-') > -1) { warnHyphenatedStyleName(name); } else if (badVendoredStyleNamePattern.test(name)) { warnBadVendoredStyleName(name); } else if (badStyleValueWithSemicolonPattern.test(value)) { warnStyleValueWithSemicolon(name, value); } }; } var CSSPropertyOperations = { createMarkupForStyles: function (styles) { var serialized = ''; for (var styleName in styles) { if (!styles.hasOwnProperty(styleName)) { continue; } var styleValue = styles[styleName]; if ('production' !== 'production') { warnValidStyle(styleName, styleValue); } 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' !== 'production') { warnValidStyle(styleName, styles[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; }, { './CSSProperty': 11, './ExecutionEnvironment': 28, './camelizeStyleName': 116, './dangerousStyleValue': 121, './hyphenateStyleName': 141, './memoizeStringOnly': 151, './warning': 162 }],
13: [function (require, module, exports) { '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' !== 'production' ? 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; }, { './Object.assign': 34, './PooledClass': 35, './invariant': 143 }],
14: [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': 22, './EventPluginHub': 24, './EventPropagators': 27, './ExecutionEnvironment': 28, './ReactUpdates': 95, './SyntheticEvent': 103, './isEventSupported': 144, './isTextInputElement': 146, './keyOf': 149 }],
15: [function (require, module, exports) { 'use strict'; var nextReactRootIndex = 0; var ClientReactRootIndex = { createReactRootIndex: function () { return nextReactRootIndex++; } }; module.exports = ClientReactRootIndex; }, {}],
16: [function (require, module, exports) { 'use strict'; var Danger = require('./Danger'); var ReactMultiChildUpdateTypes = require('./ReactMultiChildUpdateTypes'); var setTextContent = require('./setTextContent'); var invariant = require('./invariant'); function insertChildAt (parentNode, childNode, index) { parentNode.insertBefore(childNode, parentNode.childNodes[index] || null); } var DOMChildrenOperations = { dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup, updateTextContent: setTextContent, processUpdates: function (updates, markupList) { var update; var initialChildren = null; var updatedChildren = null; for (var i = 0; i < updates.length; i++) { update = updates[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' !== 'production' ? 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; k < updates.length; k++) { update = updates[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:setTextContent(update.parentNode, update.textContent); break; case ReactMultiChildUpdateTypes.REMOVE_NODE:break; } } } }; module.exports = DOMChildrenOperations; }, { './Danger': 19, './ReactMultiChildUpdateTypes': 80, './invariant': 143, './setTextContent': 157 }],
17: [function (require, module, exports) { '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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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; }, { './invariant': 143 }],
18: [function (require, module, exports) { 'use strict'; var DOMProperty = require('./DOMProperty'); var quoteAttributeValueForBrowser = require('./quoteAttributeValueForBrowser'); 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; } if ('production' !== 'production') { 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' !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : null; }; } var DOMPropertyOperations = { createMarkupForID: function (id) { return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(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 attributeName; } return attributeName + '=' + quoteAttributeValueForBrowser(value); } else if (DOMProperty.isCustomAttribute(name)) { if (value == null) { return ''; } return name + '=' + quoteAttributeValueForBrowser(value); } else if ('production' !== 'production') { 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' !== 'production') { 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' !== 'production') { warnUnknownProperty(name); } } }; module.exports = DOMPropertyOperations; }, { './DOMProperty': 17, './quoteAttributeValueForBrowser': 155, './warning': 162 }],
19: [function (require, module, exports) { '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' !== 'production' ? 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' !== 'production' ? 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]; var resultIndex; for (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 (var j = 0; j < renderNodes.length; ++j) { var renderNode = renderNodes[j]; if (renderNode.hasAttribute && renderNode.hasAttribute(RESULT_INDEX_ATTR)) { resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR); renderNode.removeAttribute(RESULT_INDEX_ATTR); 'production' !== 'production' ? invariant(!resultList.hasOwnProperty(resultIndex), 'Danger: Assigning to an already-occupied result index.') : invariant(!resultList.hasOwnProperty(resultIndex)); resultList[resultIndex] = renderNode; resultListAssignmentCount += 1; } else if ('production' !== 'production') { console.error('Danger: Discarding unexpected node:', renderNode); } } }'production' !== 'production' ? invariant(resultListAssignmentCount === resultList.length, 'Danger: Did not assign to every index of resultList.') : invariant(resultListAssignmentCount === resultList.length); 'production' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup); 'production' !== 'production' ? 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 React.renderToString().') : invariant(oldChild.tagName.toLowerCase() !== 'html'); var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; oldChild.parentNode.replaceChild(newChild, oldChild); } }; module.exports = Danger; }, { './ExecutionEnvironment': 28, './createNodesFromMarkup': 120, './emptyFunction': 122, './getMarkupWrap': 135, './invariant': 143 }],
20: [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({ BeforeInputEventPlugin: null }), keyOf({ AnalyticsEventPlugin: null }), keyOf({ MobileSafariClickEventPlugin: null })]; module.exports = DefaultEventPluginOrder; }, { './keyOf': 149 }],
21: [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': 22, './EventPropagators': 27, './ReactMount': 78, './SyntheticMouseEvent': 107, './keyOf': 149 }],
22: [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': 148 }],
23: [function (require, module, exports) { 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' !== 'production') { 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; }, { './emptyFunction': 122 }],
24: [function (require, module, exports) {
'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 valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave; 'production' !== 'production' ? invariant(valid, 'InstanceHandle not injected before use!') : invariant(valid); } var EventPluginHub = { injection: { injectMount: EventPluginUtils.injection.injectMount,
injectInstanceHandle: function (InjectedInstanceHandle) { InstanceHandle = InjectedInstanceHandle; if ('production' !== 'production') { validateInstanceHandle(); } },
getInstanceHandle: function () {
if ('production' !== 'production') {
validateInstanceHandle();
} return InstanceHandle;
},
injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName },
eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,
registrationNameModules: EventPluginRegistry.registrationNameModules,
putListener: function (id, registrationName, listener) { 'production' !== 'production' ? 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' !== 'production' ? 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;
}, { './EventPluginRegistry': 25, './EventPluginUtils': 26, './accumulateInto': 113, './forEachAccumulated': 128, './invariant': 143 }],
25: [function (require, module, exports) { '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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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; }, { './invariant': 143 }],
26: [function (require, module, exports) { 'use strict'; var EventConstants = require('./EventConstants'); var invariant = require('./invariant'); var injection = { Mount: null, injectMount: function (InjectedMount) { injection.Mount = InjectedMount; if ('production' !== 'production') { 'production' !== 'production' ? 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' !== 'production') { 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' !== 'production' ? 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' !== 'production') { 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, cb) { forEachEventDispatch(event, cb); event._dispatchListeners = null; event._dispatchIDs = null; } function executeDispatchesInOrderStopAtTrueImpl (event) { var dispatchListeners = event._dispatchListeners; var dispatchIDs = event._dispatchIDs; if ('production' !== 'production') { 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' !== 'production') { validateEventDispatches(event); } var dispatchListener = event._dispatchListeners; var dispatchID = event._dispatchIDs; 'production' !== 'production' ? 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; }, { './EventConstants': 22, './invariant': 143 }],
27: [function (require, module, exports) { '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' !== 'production') { 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; }, { './EventConstants': 22, './EventPluginHub': 24, './accumulateInto': 113, './forEachAccumulated': 128 }],
28: [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; }, {}],
29: [function (require, module, exports) { 'use strict'; var PooledClass = require('./PooledClass'); var assign = require('./Object.assign'); var getTextContentAccessor = require('./getTextContentAccessor'); function FallbackCompositionState (root) { this._root = root; this._startText = this.getText(); this._fallbackText = null; }assign(FallbackCompositionState.prototype, { getText: function () { if ('value' in this._root) { return this._root.value; } return this._root[getTextContentAccessor()]; }, getData: function () { if (this._fallbackText) { return this._fallbackText; } var start; var startValue = this._startText; var startLength = startValue.length; var end; var endValue = this.getText(); var endLength = endValue.length; for (start = 0; start < startLength; start++) { if (startValue[start] !== endValue[start]) { break; } } var minEnd = startLength - start; for (end = 1; end <= minEnd; end++) { if (startValue[startLength - end] !== endValue[endLength - end]) { break; } } var sliceTail = end > 1 ? 1 - end : undefined; this._fallbackText = endValue.slice(start, sliceTail); return this._fallbackText; } }); PooledClass.addPoolingTo(FallbackCompositionState); module.exports = FallbackCompositionState; }, { './Object.assign': 34, './PooledClass': 35, './getTextContentAccessor': 138 }],
30: [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, headers: null, height: MUST_USE_ATTRIBUTE, hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, high: null, 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, low: null, 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: HAS_BOOLEAN_VALUE, optimum: 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, scoped: HAS_BOOLEAN_VALUE, 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, itemID: MUST_USE_ATTRIBUTE, itemRef: MUST_USE_ATTRIBUTE, property: null, unselectable: MUST_USE_ATTRIBUTE }, DOMAttributeNames: { acceptCharset: 'accept-charset', className: 'class', htmlFor: 'for', httpEquiv: 'http-equiv' }, DOMPropertyNames: { autoCapitalize: 'autocapitalize', autoComplete: 'autocomplete', autoCorrect: 'autocorrect', autoFocus: 'autofocus', autoPlay: 'autoplay', encType: 'encoding', hrefLang: 'hreflang', radioGroup: 'radiogroup', spellCheck: 'spellcheck', srcDoc: 'srcdoc', srcSet: 'srcset' } }; module.exports = HTMLDOMPropertyConfig; }, { './DOMProperty': 17, './ExecutionEnvironment': 28 }],
31: [function (require, module, exports) { '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' !== 'production' ? 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' !== 'production' ? 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' !== 'production' ? 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 null; } 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 null; } 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; }, { './ReactPropTypes': 86, './invariant': 143 }],
32: [function (require, module, exports) { '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' !== 'production' ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()); var node = this.getDOMNode(); 'production' !== 'production' ? invariant(node, 'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.') : invariant(node); var listener = ReactBrowserEventEmitter.trapBubbledEvent(topLevelType, handlerBaseName, node); this._localEventListeners = accumulateInto(this._localEventListeners, listener); }, componentWillUnmount: function () { if (this._localEventListeners) { forEachAccumulated(this._localEventListeners, remove); } } }; module.exports = LocalEventTrapMixin; }, { './ReactBrowserEventEmitter': 38, './accumulateInto': 113, './forEachAccumulated': 128, './invariant': 143 }],
33: [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': 22, './emptyFunction': 122 }],
34: [function (require, module, exports) { 'use strict'; 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; }, {}],
35: [function (require, module, exports) { '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' !== 'production' ? 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; }, { './invariant': 143 }],
36: [function (require, module, exports) { 'use strict'; var EventPluginUtils = require('./EventPluginUtils'); var ReactChildren = require('./ReactChildren'); var ReactComponent = require('./ReactComponent'); var ReactClass = require('./ReactClass'); var ReactContext = require('./ReactContext'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactElement = require('./ReactElement'); var ReactElementValidator = require('./ReactElementValidator'); var ReactDOM = require('./ReactDOM'); var ReactDOMTextComponent = require('./ReactDOMTextComponent'); var ReactDefaultInjection = require('./ReactDefaultInjection'); var ReactInstanceHandles = require('./ReactInstanceHandles'); var ReactMount = require('./ReactMount'); var ReactPerf = require('./ReactPerf'); var ReactPropTypes = require('./ReactPropTypes'); var ReactReconciler = require('./ReactReconciler'); var ReactServerRendering = require('./ReactServerRendering'); var assign = require('./Object.assign'); var findDOMNode = require('./findDOMNode'); var onlyChild = require('./onlyChild'); ReactDefaultInjection.inject(); var createElement = ReactElement.createElement; var createFactory = ReactElement.createFactory; var cloneElement = ReactElement.cloneElement; if ('production' !== 'production') { createElement = ReactElementValidator.createElement; createFactory = ReactElementValidator.createFactory; cloneElement = ReactElementValidator.cloneElement; } var render = ReactPerf.measure('React', 'render', ReactMount.render); var React = { Children: { map: ReactChildren.map, forEach: ReactChildren.forEach, count: ReactChildren.count, only: onlyChild }, Component: ReactComponent, DOM: ReactDOM, PropTypes: ReactPropTypes, initializeTouchEvents: function (shouldUseTouch) { EventPluginUtils.useTouchEvents = shouldUseTouch; }, createClass: ReactClass.createClass, createElement: createElement, cloneElement: cloneElement, createFactory: createFactory, createMixin: function (mixin) { return mixin; }, constructAndRenderComponent: ReactMount.constructAndRenderComponent, constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, findDOMNode: findDOMNode, render: render, renderToString: ReactServerRendering.renderToString, renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, unmountComponentAtNode: ReactMount.unmountComponentAtNode, isValidElement: ReactElement.isValidElement, withContext: ReactContext.withContext, __spread: assign }; if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ CurrentOwner: ReactCurrentOwner, InstanceHandles: ReactInstanceHandles, Mount: ReactMount, Reconciler: ReactReconciler, TextComponent: ReactDOMTextComponent }); } if ('production' !== 'production') { 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: ' + 'https://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: ' + 'https://fb.me/react-warning-polyfills'); break; } } } }React.version = '0.13.3'; module.exports = React; }, { './EventPluginUtils': 26, './ExecutionEnvironment': 28, './Object.assign': 34, './ReactChildren': 40, './ReactClass': 41, './ReactComponent': 42, './ReactContext': 46, './ReactCurrentOwner': 47, './ReactDOM': 48, './ReactDOMTextComponent': 59, './ReactDefaultInjection': 62, './ReactElement': 65, './ReactElementValidator': 66, './ReactInstanceHandles': 74, './ReactMount': 78, './ReactPerf': 83, './ReactPropTypes': 86, './ReactReconciler': 89, './ReactServerRendering': 92, './findDOMNode': 125, './onlyChild': 152 }],
37: [function (require, module, exports) { 'use strict'; var findDOMNode = require('./findDOMNode'); var ReactBrowserComponentMixin = { getDOMNode: function () { return findDOMNode(this); } }; module.exports = ReactBrowserComponentMixin; }, { './findDOMNode': 125 }],
38: [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': 22, './EventPluginHub': 24, './EventPluginRegistry': 25, './Object.assign': 34, './ReactEventEmitterMixin': 69, './ViewportMetrics': 112, './isEventSupported': 144 }],
39: [function (require, module, exports) { 'use strict'; var ReactReconciler = require('./ReactReconciler'); var flattenChildren = require('./flattenChildren'); var instantiateReactComponent = require('./instantiateReactComponent'); var shouldUpdateReactComponent = require('./shouldUpdateReactComponent'); var ReactChildReconciler = { instantiateChildren: function (nestedChildNodes, transaction, context) { var children = flattenChildren(nestedChildNodes); for (var name in children) { if (children.hasOwnProperty(name)) { var child = children[name]; var childInstance = instantiateReactComponent(child, null); children[name] = childInstance; } } return children; }, updateChildren: function (prevChildren, nextNestedChildNodes, transaction, context) { var nextChildren = flattenChildren(nextNestedChildNodes); if (!nextChildren && !prevChildren) { return null; } var name; 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)) { ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context); nextChildren[name] = prevChild; } else { if (prevChild) { ReactReconciler.unmountComponent(prevChild, name); } var nextChildInstance = instantiateReactComponent(nextElement, null); nextChildren[name] = nextChildInstance; } } for (name in prevChildren) { if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { ReactReconciler.unmountComponent(prevChildren[name]); } } return nextChildren; }, unmountChildren: function (renderedChildren) { for (var name in renderedChildren) { var renderedChild = renderedChildren[name]; ReactReconciler.unmountComponent(renderedChild); } } }; module.exports = ReactChildReconciler; }, { './ReactReconciler': 89, './flattenChildren': 126, './instantiateReactComponent': 142, './shouldUpdateReactComponent': 159 }],
40: [function (require, module, exports) { 'use strict'; var PooledClass = require('./PooledClass'); var ReactFragment = require('./ReactFragment'); 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); if ('production' !== 'production') { 'production' !== 'production' ? 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 ReactFragment.create(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; }, { './PooledClass': 35, './ReactFragment': 71, './traverseAllChildren': 161, './warning': 162 }],
41: [function (require, module, exports) { 'use strict'; var ReactComponent = require('./ReactComponent'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactElement = require('./ReactElement'); var ReactErrorUtils = require('./ReactErrorUtils'); var ReactInstanceMap = require('./ReactInstanceMap'); var ReactLifeCycle = require('./ReactLifeCycle'); var ReactPropTypeLocations = require('./ReactPropTypeLocations'); var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames'); var ReactUpdateQueue = require('./ReactUpdateQueue'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var keyMirror = require('./keyMirror'); var keyOf = require('./keyOf'); 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 ReactClassInterface = { 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) { if ('production' !== 'production') { validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext); }Constructor.childContextTypes = assign({}, Constructor.childContextTypes, childContextTypes); }, contextTypes: function (Constructor, contextTypes) { if ('production' !== 'production') { 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) { if ('production' !== 'production') { validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop); }Constructor.propTypes = assign({}, Constructor.propTypes, propTypes); }, statics: function (Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); } }; function validateTypeDef (Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { 'production' !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : null; } } } function validateMethodOverride (proto, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; if (ReactClassMixin.hasOwnProperty(name)) { 'production' !== 'production' ? invariant(specPolicy === SpecPolicy.OVERRIDE_BASE, 'ReactClassInterface: 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' !== 'production' ? invariant(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED, 'ReactClassInterface: 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 mixSpecIntoComponent (Constructor, spec) { if (!spec) { return; }'production' !== 'production' ? invariant(typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(typeof spec !== 'function'); 'production' !== 'production' ? invariant(!ReactElement.isValidElement(spec), "ReactClass: 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 isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isAlreadyDefined = proto.hasOwnProperty(name); var markedDontBind = property && property.__reactDontBind; var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && !markedDontBind; if (shouldAutoBind) { if (!proto.__reactAutoBindMap) { proto.__reactAutoBindMap = {}; }proto.__reactAutoBindMap[name] = property; proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; 'production' !== 'production' ? invariant(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(isReactClassMethod && (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' !== 'production') { 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' !== 'production' ? invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(!isReserved); var isInherited = name in Constructor; 'production' !== 'production' ? invariant(!isInherited, 'ReactClass: 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 mergeIntoWithNoDuplicateKeys (one, two) { 'production' !== 'production' ? invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(one && two && typeof one === 'object' && typeof two === 'object'); for (var key in two) { if (two.hasOwnProperty(key)) { 'production' !== 'production' ? invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(one[key] === undefined); one[key] = two[key]; } } 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; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } function createChainedFunction (one, two) { return function chainedFunction () { one.apply(this, arguments); two.apply(this, arguments); }; } function bindAutoBindMethod (component, method) { var boundMethod = method.bind(component); if ('production' !== 'production') { 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) { 'production' !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : null; } else if (!args.length) { 'production' !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : null; return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } function bindAutoBindMethods (component) { for (var autoBindKey in component.__reactAutoBindMap) { if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { var method = component.__reactAutoBindMap[autoBindKey]; component[autoBindKey] = bindAutoBindMethod(component, ReactErrorUtils.guard(method, component.constructor.displayName + '.' + autoBindKey)); } } } var typeDeprecationDescriptor = { enumerable: false, get: function () { var displayName = this.displayName || this.name || 'Component'; 'production' !== 'production' ? warning(false, '%s.type is deprecated. Use %s directly to access the class.', displayName, displayName) : null; Object.defineProperty(this, 'type', { value: this }); return this; } }; var ReactClassMixin = { replaceState: function (newState, callback) { ReactUpdateQueue.enqueueReplaceState(this, newState); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); } }, isMounted: function () { if ('production' !== 'production') { var owner = ReactCurrentOwner.current; if (owner !== null) { 'production' !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : null; owner._warnedAboutRefsInRender = true; } } var internalInstance = ReactInstanceMap.get(this); return internalInstance && internalInstance !== ReactLifeCycle.currentlyMountingInstance; }, setProps: function (partialProps, callback) { ReactUpdateQueue.enqueueSetProps(this, partialProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); } }, replaceProps: function (newProps, callback) { ReactUpdateQueue.enqueueReplaceProps(this, newProps); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); } } }; var ReactClassComponent = function () {}; assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); var ReactClass = { createClass: function (spec) { var Constructor = function (props, context) { if ('production' !== 'production') { 'production' !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : null; } if (this.__reactAutoBindMap) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.state = null; var initialState = this.getInitialState ? this.getInitialState() : null; if ('production' !== 'production') { if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) { initialState = null; } }'production' !== 'production' ? invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(typeof initialState === 'object' && !Array.isArray(initialState)); this.state = initialState; }; Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, spec); if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if ('production' !== 'production') { if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } }'production' !== 'production' ? invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.') : invariant(Constructor.prototype.render); if ('production' !== 'production') { 'production' !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : null; } for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } }Constructor.type = Constructor; if ('production' !== 'production') { try { Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor); } catch (x) {} } return Constructor; }, injection: { injectMixin: function (mixin) { injectedMixins.push(mixin); } } }; module.exports = ReactClass; }, { './Object.assign': 34, './ReactComponent': 42, './ReactCurrentOwner': 47, './ReactElement': 65, './ReactErrorUtils': 68, './ReactInstanceMap': 75, './ReactLifeCycle': 76, './ReactPropTypeLocationNames': 84, './ReactPropTypeLocations': 85, './ReactUpdateQueue': 94, './invariant': 143, './keyMirror': 148, './keyOf': 149, './warning': 162 }],
42: [function (require, module, exports) { 'use strict'; var ReactUpdateQueue = require('./ReactUpdateQueue'); var invariant = require('./invariant'); var warning = require('./warning'); function ReactComponent (props, context) { this.props = props; this.context = context; }ReactComponent.prototype.setState = function (partialState, callback) { 'production' !== 'production' ? invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null); if ('production' !== 'production') { 'production' !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : null; }ReactUpdateQueue.enqueueSetState(this, partialState); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); } }; ReactComponent.prototype.forceUpdate = function (callback) { ReactUpdateQueue.enqueueForceUpdate(this); if (callback) { ReactUpdateQueue.enqueueCallback(this, callback); } }; if ('production' !== 'production') { var deprecatedAPIs = { getDOMNode: ['getDOMNode', 'Use React.findDOMNode(component) instead.'], isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'], replaceProps: ['replaceProps', 'Instead, call React.render again at the top level.'], replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'], setProps: ['setProps', 'Instead, call React.render again at the top level.'] }; var defineDeprecationWarning = function (methodName, info) { try { Object.defineProperty(ReactComponent.prototype, methodName, { get: function () { 'production' !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : null; return undefined; } }); } catch (x) {} }; for (var fnName in deprecatedAPIs) { if (deprecatedAPIs.hasOwnProperty(fnName)) { defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); } } }module.exports = ReactComponent; }, { './ReactUpdateQueue': 94, './invariant': 143, './warning': 162 }],
43: [function (require, module, exports) { 'use strict'; var ReactDOMIDOperations = require('./ReactDOMIDOperations'); var ReactMount = require('./ReactMount'); var ReactComponentBrowserEnvironment = { processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, unmountIDFromEnvironment: function (rootNodeID) { ReactMount.purgeID(rootNodeID); } }; module.exports = ReactComponentBrowserEnvironment; }, { './ReactDOMIDOperations': 52, './ReactMount': 78 }],
44: [function (require, module, exports) { 'use strict'; var invariant = require('./invariant'); var injected = false; var ReactComponentEnvironment = { unmountIDFromEnvironment: null, replaceNodeWithMarkupByID: null, processChildrenUpdates: null, injection: { injectEnvironment: function (environment) { 'production' !== 'production' ? invariant(!injected, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(!injected); ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment; ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID; ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates; injected = true; } } }; module.exports = ReactComponentEnvironment; }, { './invariant': 143 }],
45: [function (require, module, exports) {
'use strict'; var ReactComponentEnvironment = require('./ReactComponentEnvironment'); var ReactContext = require('./ReactContext'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactElement = require('./ReactElement'); var ReactElementValidator = require('./ReactElementValidator'); var ReactInstanceMap = require('./ReactInstanceMap'); var ReactLifeCycle = require('./ReactLifeCycle'); var ReactNativeComponent = require('./ReactNativeComponent'); var ReactPerf = require('./ReactPerf'); var ReactPropTypeLocations = require('./ReactPropTypeLocations'); var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames'); var ReactReconciler = require('./ReactReconciler'); var ReactUpdates = require('./ReactUpdates'); var assign = require('./Object.assign'); var emptyObject = require('./emptyObject'); var invariant = require('./invariant'); var shouldUpdateReactComponent = require('./shouldUpdateReactComponent'); var warning = require('./warning'); function getDeclarationErrorAddendum (component) { var owner = component._currentElement._owner || null; if (owner) { var name = owner.getName(); if (name) { return ' Check the render method of `' + name + '`.'; } } return ''; } var nextMountID = 1; var ReactCompositeComponentMixin = { construct: function (element) { this._currentElement = element; this._rootNodeID = null; this._instance = null; this._pendingElement = null; this._pendingStateQueue = null; this._pendingReplaceState = false; this._pendingForceUpdate = false; this._renderedComponent = null; this._context = null; this._mountOrder = 0; this._isTopLevel = false; this._pendingCallbacks = null; },
mountComponent: function (rootID, transaction, context) { this._context = context; this._mountOrder = nextMountID++; this._rootNodeID = rootID; var publicProps = this._processProps(this._currentElement.props); var publicContext = this._processContext(this._currentElement._context); var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); var inst = new Component(publicProps, publicContext); if ('production' !== 'production') { 'production' !== 'production' ? warning(inst.render != null, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render` in your ' + 'component or you may have accidentally tried to render an element ' + "whose type is a function that isn't a React component.", Component.displayName || Component.name || 'Component') : null; }inst.props = publicProps; inst.context = publicContext; inst.refs = emptyObject; this._instance = inst; ReactInstanceMap.set(inst, this); if ('production' !== 'production') { this._warnIfContextsDiffer(this._currentElement._context, context); } if ('production' !== 'production') { 'production' !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : null; 'production' !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : null; 'production' !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : null; 'production' !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : null; 'production' !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : null; } var initialState = inst.state; if (initialState === undefined) { inst.state = initialState = null; }'production' !== 'production' ? invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(typeof initialState === 'object' && !Array.isArray(initialState)); this._pendingStateQueue = null; this._pendingReplaceState = false; this._pendingForceUpdate = false; var childContext; var renderedElement; var previouslyMounting = ReactLifeCycle.currentlyMountingInstance; ReactLifeCycle.currentlyMountingInstance = this; try { if (inst.componentWillMount) { inst.componentWillMount(); if (this._pendingStateQueue) { inst.state = this._processPendingState(inst.props, inst.context); } }childContext = this._getValidatedChildContext(context); renderedElement = this._renderValidatedComponent(childContext); } finally { ReactLifeCycle.currentlyMountingInstance = previouslyMounting; } this._renderedComponent = this._instantiateReactComponent(renderedElement, this._currentElement.type); var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._mergeChildContext(context, childContext)); if (inst.componentDidMount) { transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); } return markup; },
unmountComponent: function () { var inst = this._instance; if (inst.componentWillUnmount) { var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance; ReactLifeCycle.currentlyUnmountingInstance = this; try { inst.componentWillUnmount(); } finally { ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting; } }ReactReconciler.unmountComponent(this._renderedComponent); this._renderedComponent = null; this._pendingStateQueue = null; this._pendingReplaceState = false; this._pendingForceUpdate = false; this._pendingCallbacks = null; this._pendingElement = null; this._context = null; this._rootNodeID = null; ReactInstanceMap.remove(inst); },
_setPropsInternal: function (partialProps, callback) { var element = this._pendingElement || this._currentElement; this._pendingElement = ReactElement.cloneAndReplaceProps(element, assign({}, element.props, partialProps)); ReactUpdates.enqueueUpdate(this, callback); },
_maskContext: function (context) { var maskedContext = null; if (typeof this._currentElement.type === 'string') { return emptyObject; } var contextTypes = this._currentElement.type.contextTypes; if (!contextTypes) { return emptyObject; }maskedContext = {}; for (var contextName in contextTypes) { maskedContext[contextName] = context[contextName]; } return maskedContext; },
_processContext: function (context) { var maskedContext = this._maskContext(context); if ('production' !== 'production') { var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); if (Component.contextTypes) { this._checkPropTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context); } } return maskedContext; },
_getValidatedChildContext: function (currentContext) {
var inst = this._instance; var childContext = inst.getChildContext && inst.getChildContext(); if (childContext) { 'production' !== 'production' ? invariant(typeof inst.constructor.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(typeof inst.constructor.childContextTypes === 'object'); if ('production' !== 'production') { this._checkPropTypes(inst.constructor.childContextTypes, childContext, ReactPropTypeLocations.childContext); } for (var name in childContext) { 'production' !== 'production' ? invariant(name in inst.constructor.childContextTypes, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(name in inst.constructor.childContextTypes); } return childContext; } return null;
},
_mergeChildContext: function (currentContext, childContext) { if (childContext) { return assign({}, currentContext, childContext); } return currentContext; },
_processProps: function (newProps) { if ('production' !== 'production') { var Component = ReactNativeComponent.getComponentClassForElement(this._currentElement); if (Component.propTypes) { this._checkPropTypes(Component.propTypes, newProps, ReactPropTypeLocations.prop); } } return newProps; },
_checkPropTypes: function (propTypes, props, location) { var componentName = this.getName(); for (var propName in propTypes) { if (propTypes.hasOwnProperty(propName)) { var error; try { 'production' !== 'production' ? invariant(typeof propTypes[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(typeof propTypes[propName] === 'function'); error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; } if (error instanceof Error) { var addendum = getDeclarationErrorAddendum(this); if (location === ReactPropTypeLocations.prop) { 'production' !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : null; } else { 'production' !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : null; } } } } },
receiveComponent: function (nextElement, transaction, nextContext) { var prevElement = this._currentElement; var prevContext = this._context; this._pendingElement = null; this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext); },
performUpdateIfNecessary: function (transaction) { if (this._pendingElement != null) { ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context); } if (this._pendingStateQueue !== null || this._pendingForceUpdate) { if ('production' !== 'production') { ReactElementValidator.checkAndWarnForMutatedProps(this._currentElement); } this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context); } },
_warnIfContextsDiffer: function (ownerBasedContext, parentBasedContext) { ownerBasedContext = this._maskContext(ownerBasedContext); parentBasedContext = this._maskContext(parentBasedContext); var parentKeys = Object.keys(parentBasedContext).sort(); var displayName = this.getName() || 'ReactCompositeComponent'; for (var i = 0; i < parentKeys.length; i++) { var key = parentKeys[i]; 'production' !== 'production' ? warning(ownerBasedContext[key] === parentBasedContext[key], 'owner-based and parent-based contexts differ ' + '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + '(see: http://fb.me/react-context-by-parent)', ownerBasedContext[key], parentBasedContext[key], key, displayName) : null; } },
updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) { var inst = this._instance; var nextContext = inst.context; var nextProps = inst.props; if (prevParentElement !== nextParentElement) { nextContext = this._processContext(nextParentElement._context); nextProps = this._processProps(nextParentElement.props); if ('production' !== 'production') { if (nextUnmaskedContext != null) { this._warnIfContextsDiffer(nextParentElement._context, nextUnmaskedContext); } } if (inst.componentWillReceiveProps) { inst.componentWillReceiveProps(nextProps, nextContext); } } var nextState = this._processPendingState(nextProps, nextContext); var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext); if ('production' !== 'production') { 'production' !== 'production' ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : null; } if (shouldUpdate) { this._pendingForceUpdate = false; this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext); } else { this._currentElement = nextParentElement; this._context = nextUnmaskedContext; inst.props = nextProps; inst.state = nextState; inst.context = nextContext; } },
_processPendingState: function (props, context) { var inst = this._instance; var queue = this._pendingStateQueue; var replace = this._pendingReplaceState; this._pendingReplaceState = false; this._pendingStateQueue = null; if (!queue) { return inst.state; } if (replace && queue.length === 1) { return queue[0]; } var nextState = assign({}, replace ? queue[0] : inst.state); for (var i = replace ? 1 : 0; i < queue.length; i++) { var partial = queue[i]; assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial); } return nextState; },
_performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) { var inst = this._instance; var prevProps = inst.props; var prevState = inst.state; var prevContext = inst.context; if (inst.componentWillUpdate) { inst.componentWillUpdate(nextProps, nextState, nextContext); } this._currentElement = nextElement; this._context = unmaskedContext; inst.props = nextProps; inst.state = nextState; inst.context = nextContext; this._updateRenderedComponent(transaction, unmaskedContext); if (inst.componentDidUpdate) { transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst); } },
_updateRenderedComponent: function (transaction, context) { var prevComponentInstance = this._renderedComponent; var prevRenderedElement = prevComponentInstance._currentElement; var childContext = this._getValidatedChildContext(); var nextRenderedElement = this._renderValidatedComponent(childContext); if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._mergeChildContext(context, childContext)); } else { var thisID = this._rootNodeID; var prevComponentID = prevComponentInstance._rootNodeID; ReactReconciler.unmountComponent(prevComponentInstance); this._renderedComponent = this._instantiateReactComponent(nextRenderedElement, this._currentElement.type); var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._mergeChildContext(context, childContext)); this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup); } },
_replaceNodeWithMarkupByID: function (prevComponentID, nextMarkup) { ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup); },
_renderValidatedComponentWithoutOwnerOrContext: function () { var inst = this._instance; var renderedComponent = inst.render(); if ('production' !== 'production') { if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) { renderedComponent = null; } } return renderedComponent; },
_renderValidatedComponent: function (childContext) { var renderedComponent; var previousContext = ReactContext.current; ReactContext.current = this._mergeChildContext(this._currentElement._context, childContext); ReactCurrentOwner.current = this; try { renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext(); } finally { ReactContext.current = previousContext; ReactCurrentOwner.current = null; }'production' !== 'production' ? invariant(renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent), '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)); return renderedComponent; },
attachRef: function (ref, component) { var inst = this.getPublicInstance(); var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs; refs[ref] = component.getPublicInstance(); },
detachRef: function (ref) { var refs = this.getPublicInstance().refs; delete refs[ref]; },
getName: function () { var type = this._currentElement.type; var constructor = this._instance && this._instance.constructor; return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null; },
getPublicInstance: function () { return this._instance; },
_instantiateReactComponent: null }; ReactPerf.measureMethods(ReactCompositeComponentMixin, 'ReactCompositeComponent', { mountComponent: 'mountComponent', updateComponent: 'updateComponent', _renderValidatedComponent: '_renderValidatedComponent' }); var ReactCompositeComponent = { Mixin: ReactCompositeComponentMixin }; module.exports = ReactCompositeComponent;
}, { './Object.assign': 34, './ReactComponentEnvironment': 44, './ReactContext': 46, './ReactCurrentOwner': 47, './ReactElement': 65, './ReactElementValidator': 66, './ReactInstanceMap': 75, './ReactLifeCycle': 76, './ReactNativeComponent': 81, './ReactPerf': 83, './ReactPropTypeLocationNames': 84, './ReactPropTypeLocations': 85, './ReactReconciler': 89, './ReactUpdates': 95, './emptyObject': 123, './invariant': 143, './shouldUpdateReactComponent': 159, './warning': 162 }],
46: [function (require, module, exports) { 'use strict'; var assign = require('./Object.assign'); var emptyObject = require('./emptyObject'); var warning = require('./warning'); var didWarn = false; var ReactContext = { current: emptyObject, withContext: function (newContext, scopedCallback) { if ('production' !== 'production') { 'production' !== 'production' ? warning(didWarn, 'withContext is deprecated and will be removed in a future version. ' + 'Use a wrapper component with getChildContext instead.') : null; didWarn = true; } 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': 34, './emptyObject': 123, './warning': 162 }],
47: [function (require, module, exports) { 'use strict'; var ReactCurrentOwner = { current: null }; module.exports = ReactCurrentOwner; }, {}],
48: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var ReactElementValidator = require('./ReactElementValidator'); var mapObject = require('./mapObject'); function createDOMFactory (tag) { if ('production' !== 'production') { return ReactElementValidator.createFactory(tag); } return 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', clipPath: 'clipPath', 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; }, { './ReactElement': 65, './ReactElementValidator': 66, './mapObject': 150 }],
49: [function (require, module, exports) { 'use strict'; var AutoFocusMixin = require('./AutoFocusMixin'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var keyMirror = require('./keyMirror'); var button = ReactElement.createFactory('button'); 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 = ReactClass.createClass({ displayName: 'ReactDOMButton', tagName: 'BUTTON', 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': 9, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65, './keyMirror': 148 }],
50: [function (require, module, exports) { 'use strict'; var CSSPropertyOperations = require('./CSSPropertyOperations'); var DOMProperty = require('./DOMProperty'); var DOMPropertyOperations = require('./DOMPropertyOperations'); var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter'); var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment'); var ReactMount = require('./ReactMount'); var ReactMultiChild = require('./ReactMultiChild'); var ReactPerf = require('./ReactPerf'); var assign = require('./Object.assign'); var escapeTextContentForBrowser = require('./escapeTextContentForBrowser'); var invariant = require('./invariant'); var isEventSupported = require('./isEventSupported'); var keyOf = require('./keyOf'); var warning = require('./warning'); 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; var BackendIDOperations = null; function assertValidProps (props) { if (!props) { return; } if (props.dangerouslySetInnerHTML != null) { 'production' !== 'production' ? invariant(props.children == null, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(props.children == null); 'production' !== 'production' ? invariant(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(typeof props.dangerouslySetInnerHTML === 'object' && '__html' in props.dangerouslySetInnerHTML); } if ('production' !== 'production') { 'production' !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : null; 'production' !== 'production' ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : null; }'production' !== 'production' ? invariant(props.style == null || typeof props.style === 'object', 'The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.') : invariant(props.style == null || typeof props.style === 'object'); } function putListener (id, registrationName, listener, transaction) { if ('production' !== 'production') { 'production' !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : null; } 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' !== 'production' ? 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._renderedChildren = null; this._previousStyleCopy = null; this._rootNodeID = null; }ReactDOMComponent.displayName = 'ReactDOMComponent'; ReactDOMComponent.Mixin = { construct: function (element) { this._currentElement = element; }, mountComponent: function (rootID, transaction, context) { this._rootNodeID = rootID; assertValidProps(this._currentElement.props); var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>'; return this._createOpenTagMarkupAndPutListeners(transaction) + this._createContentMarkup(transaction, context) + closeTag; }, _createOpenTagMarkupAndPutListeners: function (transaction) { var props = this._currentElement.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 = this._previousStyleCopy = 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, context) { var prefix = ''; if (this._tag === 'listing' || this._tag === 'pre' || this._tag === 'textarea') { prefix = '\n'; } var props = this._currentElement.props; var innerHTML = props.dangerouslySetInnerHTML; if (innerHTML != null) { if (innerHTML.__html != null) { return prefix + innerHTML.__html; } } else { var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null; var childrenToUse = contentToUse != null ? null : props.children; if (contentToUse != null) { return prefix + escapeTextContentForBrowser(contentToUse); } else if (childrenToUse != null) { var mountImages = this.mountChildren(childrenToUse, transaction, context); return prefix + mountImages.join(''); } } return prefix; }, receiveComponent: function (nextElement, transaction, context) { var prevElement = this._currentElement; this._currentElement = nextElement; this.updateComponent(transaction, prevElement, nextElement, context); }, updateComponent: function (transaction, prevElement, nextElement, context) { assertValidProps(this._currentElement.props); this._updateDOMProperties(prevElement.props, transaction); this._updateDOMChildren(prevElement.props, transaction, context); }, _updateDOMProperties: function (lastProps, transaction) { var nextProps = this._currentElement.props; var propKey; var styleName; var styleUpdates; for (propKey in lastProps) { if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey)) { continue; } if (propKey === STYLE) { var lastStyle = this._previousStyleCopy; for (styleName in lastStyle) { if (lastStyle.hasOwnProperty(styleName)) { styleUpdates = styleUpdates || {}; styleUpdates[styleName] = ''; } } this._previousStyleCopy = null; } else if (registrationNameModules.hasOwnProperty(propKey)) { deleteListener(this._rootNodeID, propKey); } else if (DOMProperty.isStandardName[propKey] || DOMProperty.isCustomAttribute(propKey)) { BackendIDOperations.deletePropertyByID(this._rootNodeID, propKey); } } for (propKey in nextProps) { var nextProp = nextProps[propKey]; var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps[propKey]; if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) { continue; } if (propKey === STYLE) { if (nextProp) { nextProp = this._previousStyleCopy = assign({}, nextProp); } else { this._previousStyleCopy = null; } 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)) { BackendIDOperations.updatePropertyByID(this._rootNodeID, propKey, nextProp); } } if (styleUpdates) { BackendIDOperations.updateStylesByID(this._rootNodeID, styleUpdates); } }, _updateDOMChildren: function (lastProps, transaction, context) { var nextProps = this._currentElement.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, context); } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { this.updateTextContent(''); } if (nextContent != null) { if (lastContent !== nextContent) { this.updateTextContent('' + nextContent); } } else if (nextHtml != null) { if (lastHtml !== nextHtml) { BackendIDOperations.updateInnerHTMLByID(this._rootNodeID, nextHtml); } } else if (nextChildren != null) { this.updateChildren(nextChildren, transaction, context); } }, unmountComponent: function () { this.unmountChildren(); ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID); ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); this._rootNodeID = null; } }; ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', { mountComponent: 'mountComponent', updateComponent: 'updateComponent' }); assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin); ReactDOMComponent.injection = { injectIDOperations: function (IDOperations) { ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations; } }; module.exports = ReactDOMComponent; }, { './CSSPropertyOperations': 12, './DOMProperty': 17, './DOMPropertyOperations': 18, './Object.assign': 34, './ReactBrowserEventEmitter': 38, './ReactComponentBrowserEnvironment': 43, './ReactMount': 78, './ReactMultiChild': 79, './ReactPerf': 83, './escapeTextContentForBrowser': 124, './invariant': 143, './isEventSupported': 144, './keyOf': 149, './warning': 162 }],
51: [function (require, module, exports) { 'use strict'; var EventConstants = require('./EventConstants'); var LocalEventTrapMixin = require('./LocalEventTrapMixin'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var form = ReactElement.createFactory('form'); var ReactDOMForm = ReactClass.createClass({ displayName: 'ReactDOMForm', tagName: 'FORM', 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': 22, './LocalEventTrapMixin': 32, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65 }],
52: [function (require, module, exports) { '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: function (id, name, value) { var node = ReactMount.getNode(id); 'production' !== 'production' ? 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: function (id, name, value) { var node = ReactMount.getNode(id); 'production' !== 'production' ? invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name), 'updatePropertyByID(...): %s', INVALID_PROPERTY_ERRORS[name]) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name)); DOMPropertyOperations.deleteValueForProperty(node, name, value); }, updateStylesByID: function (id, styles) { var node = ReactMount.getNode(id); CSSPropertyOperations.setValueForStyles(node, styles); }, updateInnerHTMLByID: function (id, html) { var node = ReactMount.getNode(id); setInnerHTML(node, html); }, updateTextContentByID: function (id, content) { var node = ReactMount.getNode(id); DOMChildrenOperations.updateTextContent(node, content); }, dangerouslyReplaceNodeWithMarkupByID: function (id, markup) { var node = ReactMount.getNode(id); DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); }, dangerouslyProcessChildrenUpdates: function (updates, markup) { for (var i = 0; i < updates.length; i++) { updates[i].parentNode = ReactMount.getNode(updates[i].parentID); }DOMChildrenOperations.processUpdates(updates, markup); } }; ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', { updatePropertyByID: 'updatePropertyByID', deletePropertyByID: 'deletePropertyByID', updateStylesByID: 'updateStylesByID', updateInnerHTMLByID: 'updateInnerHTMLByID', updateTextContentByID: 'updateTextContentByID', dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID', dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates' }); module.exports = ReactDOMIDOperations; }, { './CSSPropertyOperations': 12, './DOMChildrenOperations': 16, './DOMPropertyOperations': 18, './ReactMount': 78, './ReactPerf': 83, './invariant': 143, './setInnerHTML': 156 }],
53: [function (require, module, exports) { 'use strict'; var EventConstants = require('./EventConstants'); var LocalEventTrapMixin = require('./LocalEventTrapMixin'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var iframe = ReactElement.createFactory('iframe'); var ReactDOMIframe = ReactClass.createClass({ displayName: 'ReactDOMIframe', tagName: 'IFRAME', mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], render: function () { return iframe(this.props); }, componentDidMount: function () { this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); } }); module.exports = ReactDOMIframe; }, { './EventConstants': 22, './LocalEventTrapMixin': 32, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65 }],
54: [function (require, module, exports) { 'use strict'; var EventConstants = require('./EventConstants'); var LocalEventTrapMixin = require('./LocalEventTrapMixin'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var img = ReactElement.createFactory('img'); var ReactDOMImg = ReactClass.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': 22, './LocalEventTrapMixin': 32, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65 }],
55: [function (require, module, exports) { 'use strict'; var AutoFocusMixin = require('./AutoFocusMixin'); var DOMPropertyOperations = require('./DOMPropertyOperations'); var LinkedValueUtils = require('./LinkedValueUtils'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var ReactMount = require('./ReactMount'); var ReactUpdates = require('./ReactUpdates'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var input = ReactElement.createFactory('input'); var instancesByReactID = {}; function forceUpdateIfMounted () { if (this.isMounted()) { this.forceUpdate(); } } var ReactDOMInput = ReactClass.createClass({ displayName: 'ReactDOMInput', tagName: 'INPUT', 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' !== 'production' ? invariant(otherID, 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + 'same `name` is not supported.') : invariant(otherID); var otherInstance = instancesByReactID[otherID]; 'production' !== 'production' ? invariant(otherInstance, 'ReactDOMInput: Unknown radio button ID %s.', otherID) : invariant(otherInstance); ReactUpdates.asap(forceUpdateIfMounted, otherInstance); } } return returnValue; } }); module.exports = ReactDOMInput; }, { './AutoFocusMixin': 9, './DOMPropertyOperations': 18, './LinkedValueUtils': 31, './Object.assign': 34, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65, './ReactMount': 78, './ReactUpdates': 95, './invariant': 143
}],
56: [function (require, module, exports) { 'use strict'; var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var warning = require('./warning'); var option = ReactElement.createFactory('option'); var ReactDOMOption = ReactClass.createClass({ displayName: 'ReactDOMOption', tagName: 'OPTION', mixins: [ReactBrowserComponentMixin], componentWillMount: function () { if ('production' !== 'production') { 'production' !== 'production' ? 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; }, { './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65, './warning': 162 }],
57: [function (require, module, exports) { 'use strict'; var AutoFocusMixin = require('./AutoFocusMixin'); var LinkedValueUtils = require('./LinkedValueUtils'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var ReactUpdates = require('./ReactUpdates'); var assign = require('./Object.assign'); var select = ReactElement.createFactory('select'); function updateOptionsIfPendingUpdateAndMounted () { if (this._pendingUpdate) { this._pendingUpdate = false; var value = LinkedValueUtils.getValue(this); if (value != null && this.isMounted()) { updateOptions(this, value); } } } function selectValueType (props, propName, componentName) { if (props[propName] == null) { return null; } 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 selectedValue, i, l; var options = component.getDOMNode().options; if (component.props.multiple) { selectedValue = {}; for (i = 0, l = propValue.length; i < l; i++) { selectedValue['' + propValue[i]] = true; } for (i = 0, l = options.length; i < l; i++) { var selected = selectedValue.hasOwnProperty(options[i].value); if (options[i].selected !== selected) { options[i].selected = selected; } } } else { selectedValue = '' + propValue; for (i = 0, l = options.length; i < l; i++) { if (options[i].value === selectedValue) { options[i].selected = true; return; } } if (options.length) { options[0].selected = true; } } } var ReactDOMSelect = ReactClass.createClass({ displayName: 'ReactDOMSelect', tagName: 'SELECT', mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], propTypes: { defaultValue: selectValueType, value: selectValueType }, render: function () { var props = assign({}, this.props); props.onChange = this._handleChange; props.value = null; return select(props, this.props.children); }, componentWillMount: function () { this._pendingUpdate = false; }, componentDidMount: function () { var value = LinkedValueUtils.getValue(this); if (value != null) { updateOptions(this, value); } else if (this.props.defaultValue != null) { updateOptions(this, this.props.defaultValue); } }, componentDidUpdate: function (prevProps) { var value = LinkedValueUtils.getValue(this); if (value != null) { this._pendingUpdate = false; updateOptions(this, value); } else if (!prevProps.multiple !== !this.props.multiple) { if (this.props.defaultValue != null) { updateOptions(this, this.props.defaultValue); } else { updateOptions(this, this.props.multiple ? [] : ''); } } }, _handleChange: function (event) { var returnValue; var onChange = LinkedValueUtils.getOnChange(this); if (onChange) { returnValue = onChange.call(this, event); } this._pendingUpdate = true; ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); return returnValue; } }); module.exports = ReactDOMSelect; }, { './AutoFocusMixin': 9, './LinkedValueUtils': 31, './Object.assign': 34, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65, './ReactUpdates': 95 }],
58: [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 && 'selection' in document && !('getSelection' in window); var ReactDOMSelection = { getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets }; module.exports = ReactDOMSelection; }, { './ExecutionEnvironment': 28, './getNodeForCharacterOffset': 136, './getTextContentAccessor': 138 }],
59: [function (require, module, exports) { 'use strict'; var DOMPropertyOperations = require('./DOMPropertyOperations'); var ReactComponentBrowserEnvironment = require('./ReactComponentBrowserEnvironment'); var ReactDOMComponent = require('./ReactDOMComponent'); var assign = require('./Object.assign'); var escapeTextContentForBrowser = require('./escapeTextContentForBrowser'); var ReactDOMTextComponent = function (props) {}; assign(ReactDOMTextComponent.prototype, { construct: function (text) { this._currentElement = text; this._stringText = '' + text; this._rootNodeID = null; this._mountIndex = 0; }, mountComponent: function (rootID, transaction, context) { this._rootNodeID = rootID; var escapedText = escapeTextContentForBrowser(this._stringText); if (transaction.renderToStaticMarkup) { return escapedText; } return '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + escapedText + '</span>'; }, receiveComponent: function (nextText, transaction) { if (nextText !== this._currentElement) { this._currentElement = nextText; var nextStringText = '' + nextText; if (nextStringText !== this._stringText) { this._stringText = nextStringText; ReactDOMComponent.BackendIDOperations.updateTextContentByID(this._rootNodeID, nextStringText); } } }, unmountComponent: function () { ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); } }); module.exports = ReactDOMTextComponent; }, { './DOMPropertyOperations': 18, './Object.assign': 34, './ReactComponentBrowserEnvironment': 43, './ReactDOMComponent': 50, './escapeTextContentForBrowser': 124 }],
60: [function (require, module, exports) { 'use strict'; var AutoFocusMixin = require('./AutoFocusMixin'); var DOMPropertyOperations = require('./DOMPropertyOperations'); var LinkedValueUtils = require('./LinkedValueUtils'); var ReactBrowserComponentMixin = require('./ReactBrowserComponentMixin'); var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var ReactUpdates = require('./ReactUpdates'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var warning = require('./warning'); var textarea = ReactElement.createFactory('textarea'); function forceUpdateIfMounted () { if (this.isMounted()) { this.forceUpdate(); } } var ReactDOMTextarea = ReactClass.createClass({ displayName: 'ReactDOMTextarea', tagName: 'TEXTAREA', mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], getInitialState: function () { var defaultValue = this.props.defaultValue; var children = this.props.children; if (children != null) { if ('production' !== 'production') { 'production' !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : null; }'production' !== 'production' ? invariant(defaultValue == null, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : invariant(defaultValue == null); if (Array.isArray(children)) { 'production' !== 'production' ? 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' !== 'production' ? 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; }, { './AutoFocusMixin': 9, './DOMPropertyOperations': 18, './LinkedValueUtils': 31, './Object.assign': 34, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactElement': 65, './ReactUpdates': 95, './invariant': 143, './warning': 162 }],
61: [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, c, d) { var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; ReactDefaultBatchingStrategy.isBatchingUpdates = true; if (alreadyBatchingUpdates) { callback(a, b, c, d); } else { transaction.perform(callback, null, a, b, c, d); } } }; module.exports = ReactDefaultBatchingStrategy; }, { './Object.assign': 34, './ReactUpdates': 95, './Transaction': 111, './emptyFunction': 122 }],
62: [function (require, module, exports) { 'use strict'; var BeforeInputEventPlugin = require('./BeforeInputEventPlugin'); var ChangeEventPlugin = require('./ChangeEventPlugin'); var ClientReactRootIndex = require('./ClientReactRootIndex'); 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 ReactClass = require('./ReactClass'); 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 ReactDOMIDOperations = require('./ReactDOMIDOperations'); var ReactDOMIframe = require('./ReactDOMIframe'); var ReactDOMInput = require('./ReactDOMInput'); var ReactDOMOption = require('./ReactDOMOption'); var ReactDOMSelect = require('./ReactDOMSelect'); var ReactDOMTextarea = require('./ReactDOMTextarea'); var ReactDOMTextComponent = require('./ReactDOMTextComponent'); var ReactElement = require('./ReactElement'); var ReactEventListener = require('./ReactEventListener'); var ReactInjection = require('./ReactInjection'); var ReactInstanceHandles = require('./ReactInstanceHandles'); var ReactMount = require('./ReactMount'); var ReactReconcileTransaction = require('./ReactReconcileTransaction'); var SelectEventPlugin = require('./SelectEventPlugin'); var ServerReactRootIndex = require('./ServerReactRootIndex'); var SimpleEventPlugin = require('./SimpleEventPlugin'); var SVGDOMPropertyConfig = require('./SVGDOMPropertyConfig'); var createFullPageComponent = require('./createFullPageComponent'); function autoGenerateWrapperClass (type) { return ReactClass.createClass({ tagName: type.toUpperCase(), render: function () { return new ReactElement(type, null, null, null, null, this.props); } }); } 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, MobileSafariClickEventPlugin: MobileSafariClickEventPlugin, SelectEventPlugin: SelectEventPlugin, BeforeInputEventPlugin: BeforeInputEventPlugin }); ReactInjection.NativeComponent.injectGenericComponentClass(ReactDOMComponent); ReactInjection.NativeComponent.injectTextComponentClass(ReactDOMTextComponent); ReactInjection.NativeComponent.injectAutoWrapper(autoGenerateWrapperClass); ReactInjection.Class.injectMixin(ReactBrowserComponentMixin); ReactInjection.NativeComponent.injectComponentClasses({ button: ReactDOMButton, form: ReactDOMForm, iframe: ReactDOMIframe, img: ReactDOMImg, input: ReactDOMInput, option: ReactDOMOption, select: ReactDOMSelect, textarea: ReactDOMTextarea, html: createFullPageComponent('html'), head: createFullPageComponent('head'), body: createFullPageComponent('body') }); ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); ReactInjection.EmptyComponent.injectEmptyComponent('noscript'); ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); ReactInjection.RootIndex.injectCreateReactRootIndex(ExecutionEnvironment.canUseDOM ? ClientReactRootIndex.createReactRootIndex : ServerReactRootIndex.createReactRootIndex); ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations); if ('production' !== 'production') { var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; if (/[?&]react_perf\b/.test(url)) { var ReactDefaultPerf = require('./ReactDefaultPerf'); ReactDefaultPerf.start(); } } }module.exports = { inject: inject }; }, { './BeforeInputEventPlugin': 10, './ChangeEventPlugin': 14, './ClientReactRootIndex': 15, './DefaultEventPluginOrder': 20, './EnterLeaveEventPlugin': 21, './ExecutionEnvironment': 28, './HTMLDOMPropertyConfig': 30, './MobileSafariClickEventPlugin': 33, './ReactBrowserComponentMixin': 37, './ReactClass': 41, './ReactComponentBrowserEnvironment': 43, './ReactDOMButton': 49, './ReactDOMComponent': 50, './ReactDOMForm': 51, './ReactDOMIDOperations': 52, './ReactDOMIframe': 53, './ReactDOMImg': 54, './ReactDOMInput': 55, './ReactDOMOption': 56, './ReactDOMSelect': 57, './ReactDOMTextComponent': 59, './ReactDOMTextarea': 60, './ReactDefaultBatchingStrategy': 61, './ReactDefaultPerf': 63, './ReactElement': 65, './ReactEventListener': 70, './ReactInjection': 72, './ReactInstanceHandles': 74, './ReactMount': 78, './ReactReconcileTransaction': 88, './SVGDOMPropertyConfig': 96, './SelectEventPlugin': 97, './ServerReactRootIndex': 98, './SimpleEventPlugin': 99, './createFullPageComponent': 119 }],
63: [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 (fnName === '_mountImageIntoNode' || moduleName === 'ReactDOMIDOperations') { 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')) { if (typeof this._currentElement.type === 'string') { return func.apply(this, args); } 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.getName(), owner: this._currentElement._owner ? this._currentElement._owner.getName() : '<root>' }; return rv; } else { return func.apply(this, args); } }; } }; module.exports = ReactDefaultPerf; }, { './DOMProperty': 17, './ReactDefaultPerfAnalysis': 64, './ReactMount': 78, './ReactPerf': 83, './performanceNow': 154 }],
64: [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': 34 }],
65: [function (require, module, exports) { 'use strict'; var ReactContext = require('./ReactContext'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var assign = require('./Object.assign'); 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' !== 'production' ? warning(false, "Don't set the %s property of the React element. Instead, " + 'specify the correct value when initially creating the element.', key) : 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' !== 'production') { this._store = { props: props, originalProps: assign({}, props) }; try { Object.defineProperty(this._store, 'validated', { configurable: false, enumerable: false, writable: true }); } catch (x) {} this._store.validated = false; if (useMutationMembrane) { Object.freeze(this); return; } } this.props = props; }; ReactElement.prototype = { _isReactElement: true }; if ('production' !== 'production') { 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; key = config.key === undefined ? 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' !== 'production') { newElement._store.validated = oldElement._store.validated; } return newElement; }; ReactElement.cloneElement = function (element, config, children) { var propName; var props = assign({}, element.props); var key = element.key; var ref = element.ref; var owner = element._owner; if (config != null) { if (config.ref !== undefined) { ref = config.ref; owner = ReactCurrentOwner.current; } if (config.key !== undefined) { key = '' + 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; } return new ReactElement(element.type, key, ref, owner, element._context, props); }; ReactElement.isValidElement = function (object) { var isElement = !!(object && object._isReactElement); return isElement; }; module.exports = ReactElement; }, { './Object.assign': 34, './ReactContext': 46, './ReactCurrentOwner': 47, './warning': 162 }],
66: [function (require, module, exports) {
'use strict'; var ReactElement = require('./ReactElement'); var ReactFragment = require('./ReactFragment'); var ReactPropTypeLocations = require('./ReactPropTypeLocations'); var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactNativeComponent = require('./ReactNativeComponent'); var getIteratorFn = require('./getIteratorFn'); var invariant = require('./invariant'); var warning = require('./warning'); function getDeclarationErrorAddendum () { if (ReactCurrentOwner.current) { var name = ReactCurrentOwner.current.getName(); if (name) { return ' Check the render method of `' + name + '`.'; } } return ''; } var ownerHasKeyUseWarning = {}; var loggedTypeFailures = {}; var NUMERIC_PROPERTY_REGEX = /^\d+$/; function getName (instance) { var publicInstance = instance && instance.getPublicInstance(); if (!publicInstance) { return undefined; } var constructor = publicInstance.constructor; if (!constructor) { return undefined; } return constructor.displayName || constructor.name || undefined; } function getCurrentOwnerDisplayName () { var current = ReactCurrentOwner.current; return current && getName(current) || undefined; } function validateExplicitKey (element, parentType) {
if (element._store.validated || element.key != null) { return; }element._store.validated = true;
warnAndMonitorForKeyUse('Each child in an array or iterator should have a unique "key" prop.', element, parentType);
} function validatePropertyKey (name, element, parentType) { if (!NUMERIC_PROPERTY_REGEX.test(name)) { return; }warnAndMonitorForKeyUse('Child objects should have non-numeric keys so ordering is preserved.', element, parentType); } function warnAndMonitorForKeyUse (message, element, parentType) { var ownerName = getCurrentOwnerDisplayName(); var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; var useName = ownerName || parentName; var memoizer = ownerHasKeyUseWarning[message] || (ownerHasKeyUseWarning[message] = {}); if (memoizer.hasOwnProperty(useName)) { return; }memoizer[useName] = true; var parentOrOwnerAddendum = ownerName ? ' Check the render method of ' + ownerName + '.' : parentName ? ' Check the React.render call using <' + parentName + '>.' : ''; var childOwnerAddendum = ''; if (element && element._owner && element._owner !== ReactCurrentOwner.current) { var childOwnerName = getName(element._owner); childOwnerAddendum = ' It was passed a child from ' + childOwnerName + '.'; }'production' !== 'production' ? warning(false, message + '%s%s See https://fb.me/react-warning-keys for more information.', parentOrOwnerAddendum, childOwnerAddendum) : null; } function validateChildKeys (node, parentType) { if (Array.isArray(node)) { for (var i = 0; i < node.length; i++) { var child = node[i]; if (ReactElement.isValidElement(child)) { validateExplicitKey(child, parentType); } } } else if (ReactElement.isValidElement(node)) { node._store.validated = true; } else if (node) { var iteratorFn = getIteratorFn(node); if (iteratorFn) { if (iteratorFn !== node.entries) { var iterator = iteratorFn.call(node); var step; while (!(step = iterator.next()).done) { if (ReactElement.isValidElement(step.value)) { validateExplicitKey(step.value, parentType); } } } } else if (typeof node === 'object') { var fragment = ReactFragment.extractIfFragment(node); for (var key in fragment) { if (fragment.hasOwnProperty(key)) { validatePropertyKey(key, fragment[key], parentType); } } } } } function checkPropTypes (componentName, propTypes, props, location) { for (var propName in propTypes) { if (propTypes.hasOwnProperty(propName)) { var error; try { 'production' !== 'production' ? invariant(typeof propTypes[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(typeof propTypes[propName] === 'function'); error = propTypes[propName](props, propName, componentName, location); } catch (ex) { error = ex; } if (error instanceof Error && !(error.message in loggedTypeFailures)) { loggedTypeFailures[error.message] = true; var addendum = getDeclarationErrorAddendum(this); 'production' !== 'production' ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null; } } } } var warnedPropsMutations = {}; function warnForPropsMutation (propName, element) { var type = element.type; var elementName = typeof type === 'string' ? type : type.displayName; var ownerName = element._owner ? element._owner.getPublicInstance().constructor.displayName : null; var warningKey = propName + '|' + elementName + '|' + ownerName; if (warnedPropsMutations.hasOwnProperty(warningKey)) { return; }warnedPropsMutations[warningKey] = true; var elementInfo = ''; if (elementName) { elementInfo = ' <' + elementName + ' />'; } var ownerInfo = ''; if (ownerName) { ownerInfo = ' The element was created by ' + ownerName + '.'; }'production' !== 'production' ? warning(false, "Don't set .props.%s of the React component%s. Instead, specify the " + 'correct value when initially creating the element or use ' + 'React.cloneElement to make a new element with updated props.%s', propName, elementInfo, ownerInfo) : null; } function is (a, b) { if (a !== a) { return b !== b; } if (a === 0 && b === 0) { return 1 / a === 1 / b; } return a === b; } function checkAndWarnForMutatedProps (element) { if (!element._store) { return; } var originalProps = element._store.originalProps; var props = element.props; for (var propName in props) { if (props.hasOwnProperty(propName)) { if (!originalProps.hasOwnProperty(propName) || !is(originalProps[propName], props[propName])) { warnForPropsMutation(propName, element); originalProps[propName] = props[propName]; } } } } function validatePropTypes (element) { if (element.type == null) { return; } var componentClass = ReactNativeComponent.getComponentClassForElement(element); var name = componentClass.displayName || componentClass.name; if (componentClass.propTypes) { checkPropTypes(name, componentClass.propTypes, element.props, ReactPropTypeLocations.prop); } if (typeof componentClass.getDefaultProps === 'function') { 'production' !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : null; } } var ReactElementValidator = { checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, createElement: function (type, props, children) { 'production' !== 'production' ? 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); }validatePropTypes(element); return element; }, createFactory: function (type) { var validatedFactory = ReactElementValidator.createElement.bind(null, type); validatedFactory.type = type; if ('production' !== 'production') { try { Object.defineProperty(validatedFactory, 'type', { enumerable: false, get: function () { 'production' !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : null; Object.defineProperty(this, 'type', { value: type }); return type; } }); } catch (x) {} } return validatedFactory; }, cloneElement: function (element, props, children) { var newElement = ReactElement.cloneElement.apply(this, arguments); for (var i = 2; i < arguments.length; i++) { validateChildKeys(arguments[i], newElement.type); }validatePropTypes(newElement); return newElement; } }; module.exports = ReactElementValidator;
}, { './ReactCurrentOwner': 47, './ReactElement': 65, './ReactFragment': 71, './ReactNativeComponent': 81, './ReactPropTypeLocationNames': 84, './ReactPropTypeLocations': 85, './getIteratorFn': 134, './invariant': 143, './warning': 162 }],
67: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var ReactInstanceMap = require('./ReactInstanceMap'); var invariant = require('./invariant'); var component; var nullComponentIDsRegistry = {}; var ReactEmptyComponentInjection = { injectEmptyComponent: function (emptyComponent) { component = ReactElement.createFactory(emptyComponent); } }; var ReactEmptyComponentType = function () {}; ReactEmptyComponentType.prototype.componentDidMount = function () { var internalInstance = ReactInstanceMap.get(this); if (!internalInstance) { return; }registerNullComponentID(internalInstance._rootNodeID); }; ReactEmptyComponentType.prototype.componentWillUnmount = function () { var internalInstance = ReactInstanceMap.get(this); if (!internalInstance) { return; }deregisterNullComponentID(internalInstance._rootNodeID); }; ReactEmptyComponentType.prototype.render = function () { 'production' !== 'production' ? invariant(component, 'Trying to return null from a render, but no null placeholder component ' + 'was injected.') : invariant(component); return component(); }; var emptyElement = ReactElement.createElement(ReactEmptyComponentType); function registerNullComponentID (id) { nullComponentIDsRegistry[id] = true; } function deregisterNullComponentID (id) { delete nullComponentIDsRegistry[id]; } function isNullComponentID (id) { return !!nullComponentIDsRegistry[id]; } var ReactEmptyComponent = { emptyElement: emptyElement, injection: ReactEmptyComponentInjection, isNullComponentID: isNullComponentID }; module.exports = ReactEmptyComponent; }, { './ReactElement': 65, './ReactInstanceMap': 75, './invariant': 143 }],
68: [function (require, module, exports) { 'use strict'; var ReactErrorUtils = { guard: function (func, name) { return func; } }; module.exports = ReactErrorUtils; }, {}],
69: [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': 24 }],
70: [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 null; } return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); }, trapCapturedEvent: function (topLevelType, handlerBaseName, handle) { var element = handle; if (!element) { return null; } return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType)); }, monitorScrollValue: function (refresh) { var callback = scrollValueMonitor.bind(null, refresh); EventListener.listen(window, 'scroll', 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': 23, './ExecutionEnvironment': 28, './Object.assign': 34, './PooledClass': 35, './ReactInstanceHandles': 74, './ReactMount': 78, './ReactUpdates': 95, './getEventTarget': 133, './getUnboundedScrollPosition': 139 }],
71: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var warning = require('./warning'); if ('production' !== 'production') { var fragmentKey = '_reactFragment'; var didWarnKey = '_reactDidWarn'; var canWarnForReactFragment = false; try { var dummy = function () { return 1; }; Object.defineProperty({}, fragmentKey, { enumerable: false, value: true }); Object.defineProperty({}, 'key', { enumerable: true, get: dummy }); canWarnForReactFragment = true; } catch (x) {} var proxyPropertyAccessWithWarning = function (obj, key) { Object.defineProperty(obj, key, { enumerable: true, get: function () { 'production' !== 'production' ? warning(this[didWarnKey], 'A ReactFragment is an opaque type. Accessing any of its ' + 'properties is deprecated. Pass it to one of the React.Children ' + 'helpers.') : null; this[didWarnKey] = true; return this[fragmentKey][key]; }, set: function (value) { 'production' !== 'production' ? warning(this[didWarnKey], 'A ReactFragment is an immutable opaque type. Mutating its ' + 'properties is deprecated.') : null; this[didWarnKey] = true; this[fragmentKey][key] = value; } }); }; var issuedWarnings = {}; var didWarnForFragment = function (fragment) { var fragmentCacheKey = ''; for (var key in fragment) { fragmentCacheKey += key + ':' + typeof fragment[key] + ','; } var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; issuedWarnings[fragmentCacheKey] = true; return alreadyWarnedOnce; }; } var ReactFragment = { create: function (object) { if ('production' !== 'production') { if (typeof object !== 'object' || !object || Array.isArray(object)) { 'production' !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object.', object) : null; return object; } if (ReactElement.isValidElement(object)) { 'production' !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : null; return object; } if (canWarnForReactFragment) { var proxy = {}; Object.defineProperty(proxy, fragmentKey, { enumerable: false, value: object }); Object.defineProperty(proxy, didWarnKey, { writable: true, enumerable: false, value: false }); for (var key in object) { proxyPropertyAccessWithWarning(proxy, key); }Object.preventExtensions(proxy); return proxy; } } return object; }, extract: function (fragment) { if ('production' !== 'production') { if (canWarnForReactFragment) { if (!fragment[fragmentKey]) { 'production' !== 'production' ? warning(didWarnForFragment(fragment), 'Any use of a keyed object should be wrapped in ' + 'React.addons.createFragment(object) before being passed as a ' + 'child.') : null; return fragment; } return fragment[fragmentKey]; } } return fragment; }, extractIfFragment: function (fragment) { if ('production' !== 'production') { if (canWarnForReactFragment) { if (fragment[fragmentKey]) { return fragment[fragmentKey]; } for (var key in fragment) { if (fragment.hasOwnProperty(key) && ReactElement.isValidElement(fragment[key])) { return ReactFragment.extract(fragment); } } } } return fragment; } }; module.exports = ReactFragment; }, { './ReactElement': 65, './warning': 162 }],
72: [function (require, module, exports) { 'use strict'; var DOMProperty = require('./DOMProperty'); var EventPluginHub = require('./EventPluginHub'); var ReactComponentEnvironment = require('./ReactComponentEnvironment'); var ReactClass = require('./ReactClass'); var ReactEmptyComponent = require('./ReactEmptyComponent'); var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter'); var ReactNativeComponent = require('./ReactNativeComponent'); var ReactDOMComponent = require('./ReactDOMComponent'); var ReactPerf = require('./ReactPerf'); var ReactRootIndex = require('./ReactRootIndex'); var ReactUpdates = require('./ReactUpdates'); var ReactInjection = { Component: ReactComponentEnvironment.injection, Class: ReactClass.injection, DOMComponent: ReactDOMComponent.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': 17, './EventPluginHub': 24, './ReactBrowserEventEmitter': 38, './ReactClass': 41, './ReactComponentEnvironment': 44, './ReactDOMComponent': 50, './ReactEmptyComponent': 67, './ReactNativeComponent': 81, './ReactPerf': 83, './ReactRootIndex': 91, './ReactUpdates': 95 }],
73: [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': 58, './containsNode': 117, './focusNode': 127, './getActiveElement': 129 }],
74: [function (require, module, exports) { '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' !== 'production' ? invariant(isValidID(ancestorID) && isValidID(destinationID), 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', ancestorID, destinationID) : invariant(isValidID(ancestorID) && isValidID(destinationID)); 'production' !== 'production' ? 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; var i; for (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' !== 'production' ? 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' !== 'production' ? invariant(start !== stop, 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', start) : invariant(start !== stop); var traverseUp = isAncestorIDOf(stop, start); 'production' !== 'production' ? 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' !== 'production' ? 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; }, { './ReactRootIndex': 91, './invariant': 143 }],
75: [function (require, module, exports) { 'use strict'; var ReactInstanceMap = { remove: function (key) { key._reactInternalInstance = undefined; }, get: function (key) { return key._reactInternalInstance; }, has: function (key) { return key._reactInternalInstance !== undefined; }, set: function (key, value) { key._reactInternalInstance = value; } }; module.exports = ReactInstanceMap; }, {}],
76: [function (require, module, exports) { 'use strict'; var ReactLifeCycle = { currentlyMountingInstance: null, currentlyUnmountingInstance: null }; module.exports = ReactLifeCycle; }, {}],
77: [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': 114 }],
78: [function (require, module, exports) {
'use strict'; var DOMProperty = require('./DOMProperty'); var ReactBrowserEventEmitter = require('./ReactBrowserEventEmitter'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactElement = require('./ReactElement'); var ReactElementValidator = require('./ReactElementValidator'); var ReactEmptyComponent = require('./ReactEmptyComponent'); var ReactInstanceHandles = require('./ReactInstanceHandles'); var ReactInstanceMap = require('./ReactInstanceMap'); var ReactMarkupChecksum = require('./ReactMarkupChecksum'); var ReactPerf = require('./ReactPerf'); var ReactReconciler = require('./ReactReconciler'); var ReactUpdateQueue = require('./ReactUpdateQueue'); var ReactUpdates = require('./ReactUpdates'); var emptyObject = require('./emptyObject'); var containsNode = require('./containsNode'); var getReactRootElementInContainer = require('./getReactRootElementInContainer'); var instantiateReactComponent = require('./instantiateReactComponent'); var invariant = require('./invariant'); var setInnerHTML = require('./setInnerHTML'); var shouldUpdateReactComponent = require('./shouldUpdateReactComponent'); var warning = require('./warning'); 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' !== 'production') { var rootElementsByReactRootID = {}; } var findComponentRootReusableArray = []; function firstDifferenceIndex (string1, string2) { var minLen = Math.min(string1.length, string2.length); for (var i = 0; i < minLen; i++) { if (string1.charAt(i) !== string2.charAt(i)) { return i; } } return string1.length === string2.length ? -1 : minLen; } 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' !== 'production' ? 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 getNodeFromInstance (instance) { var id = ReactInstanceMap.get(instance)._rootNodeID; if (ReactEmptyComponent.isNullComponentID(id)) { return null; } if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { nodeCache[id] = ReactMount.findReactNodeByID(id); } return nodeCache[id]; } function isValid (node, id) { if (node) { 'production' !== 'production' ? 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; } function mountComponentIntoNode (componentInstance, rootID, container, transaction, shouldReuseMarkup) { var markup = ReactReconciler.mountComponent(componentInstance, rootID, transaction, emptyObject); componentInstance._isTopLevel = true; ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup); } function batchedMountComponentIntoNode (componentInstance, rootID, container, shouldReuseMarkup) { var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); transaction.perform(mountComponentIntoNode, null, componentInstance, rootID, container, transaction, shouldReuseMarkup); ReactUpdates.ReactReconcileTransaction.release(transaction); } var ReactMount = { _instancesByReactRootID: instancesByReactRootID,
scrollMonitor: function (container, renderCallback) { renderCallback(); },
_updateRootComponent: function (prevComponent, nextElement, container, callback) { if ('production' !== 'production') { ReactElementValidator.checkAndWarnForMutatedProps(nextElement); }ReactMount.scrollMonitor(container, function () { ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement); if (callback) { ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); } }); if ('production' !== 'production') { rootElementsByReactRootID[getReactRootID(container)] = getReactRootElementInContainer(container); } return prevComponent; },
_registerComponent: function (nextComponent, container) { 'production' !== 'production' ? 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: function (nextElement, container, shouldReuseMarkup) { 'production' !== 'production' ? warning(ReactCurrentOwner.current == null, '_renderNewRootComponent(): Render methods should be a pure function ' + 'of props and state; triggering nested component updates from ' + 'render is not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate.') : null; var componentInstance = instantiateReactComponent(nextElement, null); var reactRootID = ReactMount._registerComponent(componentInstance, container); ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, reactRootID, container, shouldReuseMarkup); if ('production' !== 'production') { rootElementsByReactRootID[reactRootID] = getReactRootElementInContainer(container); } return componentInstance; },
render: function (nextElement, container, callback) { 'production' !== 'production' ? invariant(ReactElement.isValidElement(nextElement), 'React.render(): Invalid component element.%s', typeof nextElement === 'string' ? ' Instead of passing an element string, make sure to instantiate ' + 'it by passing it to React.createElement.' : typeof nextElement === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : nextElement != null && 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).getPublicInstance(); } else { ReactMount.unmountComponentAtNode(container); } } var reactRootElement = getReactRootElementInContainer(container); var containerHasReactMarkup = reactRootElement && ReactMount.isRenderedByReact(reactRootElement); if ('production' !== 'production') { if (!containerHasReactMarkup || reactRootElement.nextSibling) { var rootElementSibling = reactRootElement; while (rootElementSibling) { if (ReactMount.isRenderedByReact(rootElementSibling)) { 'production' !== 'production' ? warning(false, 'render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.') : null; break; }rootElementSibling = rootElementSibling.nextSibling; } } } var shouldReuseMarkup = containerHasReactMarkup && !prevComponent; var component = ReactMount._renderNewRootComponent(nextElement, container, shouldReuseMarkup).getPublicInstance(); if (callback) { callback.call(component); } return component; },
constructAndRenderComponent: function (constructor, props, container) { var element = ReactElement.createElement(constructor, props); return ReactMount.render(element, container); },
constructAndRenderComponentByID: function (constructor, props, id) { var domNode = document.getElementById(id); 'production' !== 'production' ? 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' !== 'production' ? warning(ReactCurrentOwner.current == null, 'unmountComponentAtNode(): Render methods should be a pure function of ' + 'props and state; triggering nested component updates from render is ' + 'not allowed. If necessary, trigger nested updates in ' + 'componentDidUpdate.') : null; 'production' !== 'production' ? invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE), 'unmountComponentAtNode(...): Target container is not a DOM element.') : invariant(container && (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE)); var reactRootID = getReactRootID(container); var component = instancesByReactRootID[reactRootID]; if (!component) { return false; }ReactMount.unmountComponentFromNode(component, container); delete instancesByReactRootID[reactRootID]; delete containersByReactRootID[reactRootID]; if ('production' !== 'production') { delete rootElementsByReactRootID[reactRootID]; } return true; },
unmountComponentFromNode: function (instance, container) { ReactReconciler.unmountComponent(instance); 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' !== 'production') { var rootElement = rootElementsByReactRootID[reactRootID]; if (rootElement && rootElement.parentNode !== container) { 'production' !== 'production' ? 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 { 'production' !== 'production' ? warning(false, 'ReactMount: Root element has been removed from its original ' + 'container. New container:', rootElement.parentNode) : null; } } } 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 && current.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' !== 'production' ? invariant(false, 'findComponentRoot(..., %s): Unable to find element. This probably ' + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + 'parent. ' + 'Try inspecting the child nodes of the element with React ID `%s`.', targetID, ReactMount.getID(ancestorNode)) : invariant(false); },
_mountImageIntoNode: function (markup, container, shouldReuseMarkup) { 'production' !== 'production' ? 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) { var rootElement = getReactRootElementInContainer(container); if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { return; } else { var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); var rootMarkup = rootElement.outerHTML; rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum); var diffIndex = firstDifferenceIndex(markup, rootMarkup); var difference = ' (client) ' + markup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); 'production' !== 'production' ? 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:\n%s', difference) : invariant(container.nodeType !== DOC_NODE_TYPE); if ('production' !== 'production') { 'production' !== 'production' ? warning(false, 'React attempted to reuse markup in a container but the ' + 'checksum was invalid. This generally means that you are ' + 'using server rendering and the markup generated on the ' + 'server was not what the client was expecting. React injected ' + 'new markup to compensate which works but you have lost many ' + 'of the benefits of server rendering. Instead, figure out ' + 'why the markup being generated is different on the client ' + 'or server:\n%s', difference) : null; } } }'production' !== 'production' ? 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 React.renderToString() for server rendering.') : invariant(container.nodeType !== DOC_NODE_TYPE); setInnerHTML(container, markup); },
getReactRootID: getReactRootID,
getID: getID,
setID: setID,
getNode: getNode,
getNodeFromInstance: getNodeFromInstance,
purgeID: purgeID }; ReactPerf.measureMethods(ReactMount, 'ReactMount', { _renderNewRootComponent: '_renderNewRootComponent', _mountImageIntoNode: '_mountImageIntoNode' }); module.exports = ReactMount;
}, { './DOMProperty': 17, './ReactBrowserEventEmitter': 38, './ReactCurrentOwner': 47, './ReactElement': 65, './ReactElementValidator': 66, './ReactEmptyComponent': 67, './ReactInstanceHandles': 74, './ReactInstanceMap': 75, './ReactMarkupChecksum': 77, './ReactPerf': 83, './ReactReconciler': 89, './ReactUpdateQueue': 94, './ReactUpdates': 95, './containsNode': 117, './emptyObject': 123, './getReactRootElementInContainer': 137, './instantiateReactComponent': 142, './invariant': 143, './setInnerHTML': 156, './shouldUpdateReactComponent': 159, './warning': 162 }],
79: [function (require, module, exports) { 'use strict'; var ReactComponentEnvironment = require('./ReactComponentEnvironment'); var ReactMultiChildUpdateTypes = require('./ReactMultiChildUpdateTypes'); var ReactReconciler = require('./ReactReconciler'); var ReactChildReconciler = require('./ReactChildReconciler'); 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) { ReactComponentEnvironment.processChildrenUpdates(updateQueue, markupQueue); clearQueue(); } } function clearQueue () { updateQueue.length = 0; markupQueue.length = 0; } var ReactMultiChild = { Mixin: { mountChildren: function (nestedChildren, transaction, context) { var children = ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context); this._renderedChildren = children; var mountImages = []; var index = 0; for (var name in children) { if (children.hasOwnProperty(name)) { var child = children[name]; var rootID = this._rootNodeID + name; var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context); child._mountIndex = index; mountImages.push(mountImage); index++; } } return mountImages; }, updateTextContent: function (nextContent) { updateDepth++; var errorThrown = true; try { var prevChildren = this._renderedChildren; ReactChildReconciler.unmountChildren(prevChildren); for (var name in prevChildren) { if (prevChildren.hasOwnProperty(name)) { this._unmountChildByName(prevChildren[name], name); } } this.setTextContent(nextContent); errorThrown = false; } finally { updateDepth--; if (!updateDepth) { if (errorThrown) { clearQueue(); } else { processQueue(); } } } }, updateChildren: function (nextNestedChildren, transaction, context) { updateDepth++; var errorThrown = true; try { this._updateChildren(nextNestedChildren, transaction, context); errorThrown = false; } finally { updateDepth--; if (!updateDepth) { if (errorThrown) { clearQueue(); } else { processQueue(); } } } }, _updateChildren: function (nextNestedChildren, transaction, context) { var prevChildren = this._renderedChildren; var nextChildren = ReactChildReconciler.updateChildren(prevChildren, nextNestedChildren, transaction, context); this._renderedChildren = nextChildren; 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 nextChild = nextChildren[name]; if (prevChild === nextChild) { this.moveChild(prevChild, nextIndex, lastIndex); lastIndex = Math.max(prevChild._mountIndex, lastIndex); prevChild._mountIndex = nextIndex; } else { if (prevChild) { lastIndex = Math.max(prevChild._mountIndex, lastIndex); this._unmountChildByName(prevChild, name); } this._mountChildByNameAtIndex(nextChild, name, nextIndex, transaction, context); }nextIndex++; } for (name in prevChildren) { if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) { this._unmountChildByName(prevChildren[name], name); } } }, unmountChildren: function () { var renderedChildren = this._renderedChildren; ReactChildReconciler.unmountChildren(renderedChildren); 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, context) { var rootID = this._rootNodeID + name; var mountImage = ReactReconciler.mountComponent(child, rootID, transaction, context); child._mountIndex = index; this.createChild(child, mountImage); }, _unmountChildByName: function (child, name) { this.removeChild(child); child._mountIndex = null; } } }; module.exports = ReactMultiChild; }, { './ReactChildReconciler': 39, './ReactComponentEnvironment': 44, './ReactMultiChildUpdateTypes': 80, './ReactReconciler': 89 }],
80: [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': 148 }],
81: [function (require, module, exports) { 'use strict'; var assign = require('./Object.assign'); var invariant = require('./invariant'); var autoGenerateWrapperClass = null; var genericComponentClass = null; var tagToComponentClass = {}; var textComponentClass = null; var ReactNativeComponentInjection = { injectGenericComponentClass: function (componentClass) { genericComponentClass = componentClass; }, injectTextComponentClass: function (componentClass) { textComponentClass = componentClass; }, injectComponentClasses: function (componentClasses) { assign(tagToComponentClass, componentClasses); }, injectAutoWrapper: function (wrapperFactory) { autoGenerateWrapperClass = wrapperFactory; } }; function getComponentClassForElement (element) { if (typeof element.type === 'function') { return element.type; } var tag = element.type; var componentClass = tagToComponentClass[tag]; if (componentClass == null) { tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag); } return componentClass; } function createInternalComponent (element) { 'production' !== 'production' ? invariant(genericComponentClass, 'There is no registered component for the tag %s', element.type) : invariant(genericComponentClass); return new genericComponentClass(element.type, element.props); } function createInstanceForText (text) { return new textComponentClass(text); } function isTextComponent (component) { return component instanceof textComponentClass; } var ReactNativeComponent = { getComponentClassForElement: getComponentClassForElement, createInternalComponent: createInternalComponent, createInstanceForText: createInstanceForText, isTextComponent: isTextComponent, injection: ReactNativeComponentInjection }; module.exports = ReactNativeComponent; }, { './Object.assign': 34, './invariant': 143 }],
82: [function (require, module, exports) { 'use strict'; 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' !== 'production' ? 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' !== 'production' ? 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.getPublicInstance().refs[ref] === component.getPublicInstance()) { owner.detachRef(ref); } } }; module.exports = ReactOwner; }, { './invariant': 143 }],
83: [function (require, module, exports) { 'use strict'; var ReactPerf = { enableMeasure: false, storedMeasure: _noMeasure, measureMethods: function (object, objectName, methodNames) { if ('production' !== 'production') { for (var key in methodNames) { if (!methodNames.hasOwnProperty(key)) { continue; }object[key] = ReactPerf.measure(objectName, methodNames[key], object[key]); } } }, measure: function (objName, fnName, func) { if ('production' !== 'production') { 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; }, {}],
84: [function (require, module, exports) { 'use strict'; var ReactPropTypeLocationNames = {}; if ('production' !== 'production') { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context' }; }module.exports = ReactPropTypeLocationNames; }, {}],
85: [function (require, module, exports) { 'use strict'; var keyMirror = require('./keyMirror'); var ReactPropTypeLocations = keyMirror({ prop: null, context: null, childContext: null }); module.exports = ReactPropTypeLocations; }, { './keyMirror': 148 }],
86: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var ReactFragment = require('./ReactFragment'); var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames'); 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 }; 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 + '`.')); } return null; } 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 null; } return createChainableTypeChecker(validate); } function createAnyTypeChecker () { return createChainableTypeChecker(emptyFunction.thatReturns(null)); } 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 null; } 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 null; } 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 null; } 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 null; } } 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 null; } 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 null; } } 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 null; } 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 null; } return createChainableTypeChecker(validate); } function isNode (propValue) { switch (typeof propValue) { case 'number':case 'string':case 'undefined':return true; case 'boolean':return !propValue; case 'object':if (Array.isArray(propValue)) { return propValue.every(isNode); } if (propValue === null || ReactElement.isValidElement(propValue)) { return true; }propValue = ReactFragment.extractIfFragment(propValue); 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': 65, './ReactFragment': 71, './ReactPropTypeLocationNames': 84, './emptyFunction': 122 }],
87: [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': 34, './PooledClass': 35, './ReactBrowserEventEmitter': 38 }],
88: [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': 13, './Object.assign': 34, './PooledClass': 35, './ReactBrowserEventEmitter': 38, './ReactInputSelection': 73, './ReactPutListenerQueue': 87, './Transaction': 111 }],
89: [function (require, module, exports) { 'use strict'; var ReactRef = require('./ReactRef'); var ReactElementValidator = require('./ReactElementValidator'); function attachRefs () { ReactRef.attachRefs(this, this._currentElement); } var ReactReconciler = { mountComponent: function (internalInstance, rootID, transaction, context) { var markup = internalInstance.mountComponent(rootID, transaction, context); if ('production' !== 'production') { ReactElementValidator.checkAndWarnForMutatedProps(internalInstance._currentElement); }transaction.getReactMountReady().enqueue(attachRefs, internalInstance); return markup; }, unmountComponent: function (internalInstance) { ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(); }, receiveComponent: function (internalInstance, nextElement, transaction, context) { var prevElement = internalInstance._currentElement; if (nextElement === prevElement && nextElement._owner != null) { return; } if ('production' !== 'production') { ReactElementValidator.checkAndWarnForMutatedProps(nextElement); } var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement); if (refsChanged) { ReactRef.detachRefs(internalInstance, prevElement); }internalInstance.receiveComponent(nextElement, transaction, context); if (refsChanged) { transaction.getReactMountReady().enqueue(attachRefs, internalInstance); } }, performUpdateIfNecessary: function (internalInstance, transaction) { internalInstance.performUpdateIfNecessary(transaction); } }; module.exports = ReactReconciler; }, { './ReactElementValidator': 66, './ReactRef': 90 }],
90: [function (require, module, exports) { 'use strict'; var ReactOwner = require('./ReactOwner'); var ReactRef = {}; function attachRef (ref, component, owner) { if (typeof ref === 'function') { ref(component.getPublicInstance()); } else { ReactOwner.addComponentAsRefTo(component, ref, owner); } } function detachRef (ref, component, owner) { if (typeof ref === 'function') { ref(null); } else { ReactOwner.removeComponentAsRefFrom(component, ref, owner); } }ReactRef.attachRefs = function (instance, element) { var ref = element.ref; if (ref != null) { attachRef(ref, instance, element._owner); } }; ReactRef.shouldUpdateRefs = function (prevElement, nextElement) { return nextElement._owner !== prevElement._owner || nextElement.ref !== prevElement.ref; }; ReactRef.detachRefs = function (instance, element) { var ref = element.ref; if (ref != null) { detachRef(ref, instance, element._owner); } }; module.exports = ReactRef; }, { './ReactOwner': 82 }],
91: [function (require, module, exports) { 'use strict'; var ReactRootIndexInjection = { injectCreateReactRootIndex: function (_createReactRootIndex) { ReactRootIndex.createReactRootIndex = _createReactRootIndex; } }; var ReactRootIndex = { createReactRootIndex: null, injection: ReactRootIndexInjection }; module.exports = ReactRootIndex; }, {}],
92: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var ReactInstanceHandles = require('./ReactInstanceHandles'); var ReactMarkupChecksum = require('./ReactMarkupChecksum'); var ReactServerRenderingTransaction = require('./ReactServerRenderingTransaction'); var emptyObject = require('./emptyObject'); var instantiateReactComponent = require('./instantiateReactComponent'); var invariant = require('./invariant'); function renderToString (element) { 'production' !== 'production' ? 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, emptyObject); return ReactMarkupChecksum.addChecksumToMarkup(markup); }, null); } finally { ReactServerRenderingTransaction.release(transaction); } } function renderToStaticMarkup (element) { 'production' !== 'production' ? 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, emptyObject); }, null); } finally { ReactServerRenderingTransaction.release(transaction); } }module.exports = { renderToString: renderToString, renderToStaticMarkup: renderToStaticMarkup }; }, { './ReactElement': 65, './ReactInstanceHandles': 74, './ReactMarkupChecksum': 77, './ReactServerRenderingTransaction': 93, './emptyObject': 123, './instantiateReactComponent': 142, './invariant': 143 }],
93: [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': 13, './Object.assign': 34, './PooledClass': 35, './ReactPutListenerQueue': 87, './Transaction': 111, './emptyFunction': 122 }],
94: [function (require, module, exports) { 'use strict'; var ReactLifeCycle = require('./ReactLifeCycle'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactElement = require('./ReactElement'); var ReactInstanceMap = require('./ReactInstanceMap'); var ReactUpdates = require('./ReactUpdates'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var warning = require('./warning'); function enqueueUpdate (internalInstance) { if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) { ReactUpdates.enqueueUpdate(internalInstance); } } function getInternalInstanceReadyForUpdate (publicInstance, callerName) { 'production' !== 'production' ? invariant(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition ' + '(such as within `render`). Render methods should be a pure function ' + 'of props and state.', callerName) : invariant(ReactCurrentOwner.current == null); var internalInstance = ReactInstanceMap.get(publicInstance); if (!internalInstance) { if ('production' !== 'production') { 'production' !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted ' + 'component. This is a no-op.', callerName, callerName) : null; } return null; } if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) { return null; } return internalInstance; } var ReactUpdateQueue = { enqueueCallback: function (publicInstance, callback) { 'production' !== 'production' ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + "isn't callable.") : invariant(typeof callback === 'function'); var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); if (!internalInstance || internalInstance === ReactLifeCycle.currentlyMountingInstance) { return null; } if (internalInstance._pendingCallbacks) { internalInstance._pendingCallbacks.push(callback); } else { internalInstance._pendingCallbacks = [callback]; }enqueueUpdate(internalInstance); }, enqueueCallbackInternal: function (internalInstance, callback) { 'production' !== 'production' ? invariant(typeof callback === 'function', 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + "isn't callable.") : invariant(typeof callback === 'function'); if (internalInstance._pendingCallbacks) { internalInstance._pendingCallbacks.push(callback); } else { internalInstance._pendingCallbacks = [callback]; }enqueueUpdate(internalInstance); }, enqueueForceUpdate: function (publicInstance) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate'); if (!internalInstance) { return; }internalInstance._pendingForceUpdate = true; enqueueUpdate(internalInstance); }, enqueueReplaceState: function (publicInstance, completeState) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState'); if (!internalInstance) { return; }internalInstance._pendingStateQueue = [completeState]; internalInstance._pendingReplaceState = true; enqueueUpdate(internalInstance); }, enqueueSetState: function (publicInstance, partialState) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState'); if (!internalInstance) { return; } var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []); queue.push(partialState); enqueueUpdate(internalInstance); }, enqueueSetProps: function (publicInstance, partialProps) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setProps'); if (!internalInstance) { return; }'production' !== 'production' ? invariant(internalInstance._isTopLevel, 'setProps(...): You called `setProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + "get reactively updated when rendered. Instead, change the owner's " + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); var element = internalInstance._pendingElement || internalInstance._currentElement; var props = assign({}, element.props, partialProps); internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); enqueueUpdate(internalInstance); }, enqueueReplaceProps: function (publicInstance, props) { var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceProps'); if (!internalInstance) { return; }'production' !== 'production' ? invariant(internalInstance._isTopLevel, 'replaceProps(...): You called `replaceProps` on a ' + 'component with a parent. This is an anti-pattern since props will ' + "get reactively updated when rendered. Instead, change the owner's " + '`render` method to pass the correct value as props to the component ' + 'where it is created.') : invariant(internalInstance._isTopLevel); var element = internalInstance._pendingElement || internalInstance._currentElement; internalInstance._pendingElement = ReactElement.cloneAndReplaceProps(element, props); enqueueUpdate(internalInstance); }, enqueueElementInternal: function (internalInstance, newElement) { internalInstance._pendingElement = newElement; enqueueUpdate(internalInstance); } }; module.exports = ReactUpdateQueue; }, { './Object.assign': 34, './ReactCurrentOwner': 47, './ReactElement': 65, './ReactInstanceMap': 75, './ReactLifeCycle': 76, './ReactUpdates': 95, './invariant': 143, './warning': 162 }],
95: [function (require, module, exports) { 'use strict'; var CallbackQueue = require('./CallbackQueue'); var PooledClass = require('./PooledClass'); var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactPerf = require('./ReactPerf'); var ReactReconciler = require('./ReactReconciler'); 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' !== 'production' ? 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, c, d) { ensureInjected(); batchingStrategy.batchedUpdates(callback, a, b, c, d); } function mountOrderComparator (c1, c2) { return c1._mountOrder - c2._mountOrder; } function runBatchedUpdates (transaction) { var len = transaction.dirtyComponentsLength; 'production' !== 'production' ? 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(mountOrderComparator); for (var i = 0; i < len; i++) { var component = dirtyComponents[i]; var callbacks = component._pendingCallbacks; component._pendingCallbacks = null; ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction); if (callbacks) { for (var j = 0; j < callbacks.length; j++) { transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance()); } } } } var 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); } } }; flushBatchedUpdates = ReactPerf.measure('ReactUpdates', 'flushBatchedUpdates', flushBatchedUpdates); function enqueueUpdate (component) { ensureInjected(); 'production' !== 'production' ? 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); return; }dirtyComponents.push(component); } function asap (callback, context) { 'production' !== 'production' ? 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' !== 'production' ? invariant(ReconcileTransaction, 'ReactUpdates: must provide a reconcile transaction class') : invariant(ReconcileTransaction); ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; }, injectBatchingStrategy: function (_batchingStrategy) { 'production' !== 'production' ? invariant(_batchingStrategy, 'ReactUpdates: must provide a batching strategy') : invariant(_batchingStrategy); 'production' !== 'production' ? invariant(typeof _batchingStrategy.batchedUpdates === 'function', 'ReactUpdates: must provide a batchedUpdates() function') : invariant(typeof _batchingStrategy.batchedUpdates === 'function'); 'production' !== 'production' ? 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; }, { './CallbackQueue': 13, './Object.assign': 34, './PooledClass': 35, './ReactCurrentOwner': 47, './ReactPerf': 83, './ReactReconciler': 89, './Transaction': 111, './invariant': 143, './warning': 162 }],
96: [function (require, module, exports) { 'use strict'; var DOMProperty = require('./DOMProperty'); var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; var SVGDOMPropertyConfig = { Properties: { clipPath: MUST_USE_ATTRIBUTE, 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: { clipPath: 'clip-path', 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': 17 }],
97: [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 null; } 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': 22, './EventPropagators': 27, './ReactInputSelection': 73, './SyntheticEvent': 103, './getActiveElement': 129, './isTextInputElement': 146, './keyOf': 149, './shallowEqual': 158 }],
98: [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; }, {}],
99: [function (require, module, exports) { '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 type in topLevelEventsToDispatchConfig) { topLevelEventsToDispatchConfig[type].dependencies = [type]; } var SimpleEventPlugin = { eventTypes: eventTypes, executeDispatch: function (event, listener, domID) { var returnValue = EventPluginUtils.executeDispatch(event, listener, domID); 'production' !== 'production' ? 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' !== 'production' ? 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; }, { './EventConstants': 22, './EventPluginUtils': 26, './EventPropagators': 27, './SyntheticClipboardEvent': 100, './SyntheticDragEvent': 102, './SyntheticEvent': 103, './SyntheticFocusEvent': 104, './SyntheticKeyboardEvent': 106, './SyntheticMouseEvent': 107, './SyntheticTouchEvent': 108, './SyntheticUIEvent': 109, './SyntheticWheelEvent': 110, './getEventCharCode': 130, './invariant': 143, './keyOf': 149, './warning': 162 }],
100: [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': 103 }],
101: [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': 103 }],
102: [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': 107 }],
103: [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; if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } this.isDefaultPrevented = emptyFunction.thatReturnsTrue; }, stopPropagation: function () { var event = this.nativeEvent; if (event.stopPropagation) { event.stopPropagation(); } else { 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': 34, './PooledClass': 35, './emptyFunction': 122, './getEventTarget': 133 }],
104: [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': 109 }],
105: [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': 103 }],
106: [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': 109, './getEventCharCode': 130, './getEventKey': 131, './getEventModifierState': 132 }],
107: [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': 109, './ViewportMetrics': 112, './getEventModifierState': 132 }],
108: [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': 109, './getEventModifierState': 132 }],
109: [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': 103, './getEventTarget': 133 }],
110: [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': 107 }],
111: [function (require, module, exports) { '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' !== 'production' ? 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' !== 'production' ? 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; }, { './invariant': 143 }],
112: [function (require, module, exports) { 'use strict'; var ViewportMetrics = { currentScrollLeft: 0, currentScrollTop: 0, refreshScrollValues: function (scrollPosition) { ViewportMetrics.currentScrollLeft = scrollPosition.x; ViewportMetrics.currentScrollTop = scrollPosition.y; } }; module.exports = ViewportMetrics; }, {}],
113: [function (require, module, exports) { 'use strict'; var invariant = require('./invariant'); function accumulateInto (current, next) { 'production' !== 'production' ? 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; }, { './invariant': 143 }],
114: [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; }, {}],
115: [function (require, module, exports) { var _hyphenPattern = /-(.)/g; function camelize (string) { return string.replace(_hyphenPattern, function (_, character) { return character.toUpperCase(); }); }module.exports = camelize; }, {}],
116: [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': 115 }],
117: [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': 147 }],
118: [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 createArrayFromMixed (obj) { if (!hasArrayNature(obj)) { return [obj]; } else if (Array.isArray(obj)) { return obj.slice(); } else { return toArray(obj); } }module.exports = createArrayFromMixed; }, { './toArray': 160 }],
119: [function (require, module, exports) { 'use strict'; var ReactClass = require('./ReactClass'); var ReactElement = require('./ReactElement'); var invariant = require('./invariant'); function createFullPageComponent (tag) { var elementFactory = ReactElement.createFactory(tag); var FullPageComponent = ReactClass.createClass({ tagName: tag.toUpperCase(), displayName: 'ReactFullPageComponent' + tag, componentWillUnmount: function () { 'production' !== 'production' ? invariant(false, '%s tried to unmount. Because of cross-browser quirks it is ' + 'impossible to unmount some top-level components (eg <html>, <head>, ' + 'and <body>) reliably and efficiently. To fix this, have a single ' + 'top-level component that never unmounts render these elements.', this.constructor.displayName) : invariant(false); }, render: function () { return elementFactory(this.props); } }); return FullPageComponent; }module.exports = createFullPageComponent; }, { './ReactClass': 41, './ReactElement': 65, './invariant': 143 }],
120: [function (require, module, exports) { var ExecutionEnvironment = require('./ExecutionEnvironment'); var createArrayFromMixed = require('./createArrayFromMixed'); 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' !== 'production' ? 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' !== 'production' ? invariant(handleScript, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(handleScript); createArrayFromMixed(scripts).forEach(handleScript); } var nodes = createArrayFromMixed(node.childNodes); while (node.lastChild) { node.removeChild(node.lastChild); } return nodes; }module.exports = createNodesFromMarkup; }, { './ExecutionEnvironment': 28, './createArrayFromMixed': 118, './getMarkupWrap': 135, './invariant': 143 }],
121: [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': 11 }],
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) { 'use strict'; var emptyObject = {}; if ('production' !== 'production') { Object.freeze(emptyObject); }module.exports = emptyObject; }, {}],
124: [function (require, module, exports) { 'use strict'; var ESCAPE_LOOKUP = { '&': '&amp;', '>': '&gt;', '<': '&lt;', '"': '&quot;', "'": '&#x27;' }; var ESCAPE_REGEX = /[&><"']/g; function escaper (match) { return ESCAPE_LOOKUP[match]; } function escapeTextContentForBrowser (text) { return ('' + text).replace(ESCAPE_REGEX, escaper); }module.exports = escapeTextContentForBrowser; }, {}],
125: [function (require, module, exports) { 'use strict'; var ReactCurrentOwner = require('./ReactCurrentOwner'); var ReactInstanceMap = require('./ReactInstanceMap'); var ReactMount = require('./ReactMount'); var invariant = require('./invariant'); var isNode = require('./isNode'); var warning = require('./warning'); function findDOMNode (componentOrElement) { if ('production' !== 'production') { var owner = ReactCurrentOwner.current; if (owner !== null) { 'production' !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing getDOMNode or findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : null; owner._warnedAboutRefsInRender = true; } } if (componentOrElement == null) { return null; } if (isNode(componentOrElement)) { return componentOrElement; } if (ReactInstanceMap.has(componentOrElement)) { return ReactMount.getNodeFromInstance(componentOrElement); }'production' !== 'production' ? invariant(componentOrElement.render == null || typeof componentOrElement.render !== 'function', 'Component (with keys: %s) contains `render` method ' + 'but is not mounted in the DOM', Object.keys(componentOrElement)) : invariant(componentOrElement.render == null || typeof componentOrElement.render !== 'function'); 'production' !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : invariant(false); }module.exports = findDOMNode; }, { './ReactCurrentOwner': 47, './ReactInstanceMap': 75, './ReactMount': 78, './invariant': 143, './isNode': 145, './warning': 162 }],
126: [function (require, module, exports) { 'use strict'; var traverseAllChildren = require('./traverseAllChildren'); var warning = require('./warning'); function flattenSingleChildIntoContext (traverseContext, child, name) { var result = traverseContext; var keyUnique = !result.hasOwnProperty(name); if ('production' !== 'production') { 'production' !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : null; } if (keyUnique && child != null) { result[name] = child; } } function flattenChildren (children) { if (children == null) { return children; } var result = {}; traverseAllChildren(children, flattenSingleChildIntoContext, result); return result; }module.exports = flattenChildren; }, { './traverseAllChildren': 161, './warning': 162 }],
127: [function (require, module, exports) { 'use strict'; function focusNode (node) { try { node.focus(); } catch (e) {} }module.exports = focusNode; }, {}],
128: [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; }, {}],
129: [function (require, module, exports) { function getActiveElement () { try { return document.activeElement || document.body; } catch (e) { return document.body; } }module.exports = getActiveElement; }, {}],
130: [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; }, {}],
131: [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': 130 }],
132: [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; }, {}],
133: [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; }, {}],
134: [function (require, module, exports) { 'use strict'; var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; var FAUX_ITERATOR_SYMBOL = '@@iterator'; function getIteratorFn (maybeIterable) { var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); if (typeof iteratorFn === 'function') { return iteratorFn; } }module.exports = getIteratorFn; }, {}],
135: [function (require, module, exports) { var ExecutionEnvironment = require('./ExecutionEnvironment'); var invariant = require('./invariant'); var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; var shouldWrap = { circle: true, clipPath: 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, clipPath: 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' !== 'production' ? 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; }, { './ExecutionEnvironment': 28, './invariant': 143 }],
136: [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; }, {}],
137: [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; }, {}],
138: [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': 28 }],
139: [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; }, {}],
140: [function (require, module, exports) { var _uppercasePattern = /([A-Z])/g; function hyphenate (string) { return string.replace(_uppercasePattern, '-$1').toLowerCase(); }module.exports = hyphenate; }, {}],
141: [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': 140 }],
142: [function (require, module, exports) { 'use strict'; var ReactCompositeComponent = require('./ReactCompositeComponent'); var ReactEmptyComponent = require('./ReactEmptyComponent'); var ReactNativeComponent = require('./ReactNativeComponent'); var assign = require('./Object.assign'); var invariant = require('./invariant'); var warning = require('./warning'); var ReactCompositeComponentWrapper = function () {}; assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, { _instantiateReactComponent: instantiateReactComponent }); function isInternalComponentType (type) { return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function'; } function instantiateReactComponent (node, parentCompositeType) { var instance; if (node === null || node === false) { node = ReactEmptyComponent.emptyElement; } if (typeof node === 'object') { var element = node; if ('production' !== 'production') { 'production' !== 'production' ? warning(element && (typeof element.type === 'function' || typeof element.type === 'string'), 'Only functions or strings can be mounted as React components.') : null; } if (parentCompositeType === element.type && typeof element.type === 'string') { instance = ReactNativeComponent.createInternalComponent(element); } else if (isInternalComponentType(element.type)) { instance = new element.type(element); } else { instance = new ReactCompositeComponentWrapper(); } } else if (typeof node === 'string' || typeof node === 'number') { instance = ReactNativeComponent.createInstanceForText(node); } else { 'production' !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : invariant(false); } if ('production' !== 'production') { 'production' !== 'production' ? warning(typeof instance.construct === 'function' && typeof instance.mountComponent === 'function' && typeof instance.receiveComponent === 'function' && typeof instance.unmountComponent === 'function', 'Only React Components can be mounted.') : null; }instance.construct(node); instance._mountIndex = 0; instance._mountImage = null; if ('production' !== 'production') { instance._isOwnerNecessary = false; instance._warnedAboutRefsInRender = false; } if ('production' !== 'production') { if (Object.preventExtensions) { Object.preventExtensions(instance); } } return instance; }module.exports = instantiateReactComponent; }, { './Object.assign': 34, './ReactCompositeComponent': 45, './ReactEmptyComponent': 67, './ReactNativeComponent': 81, './invariant': 143, './warning': 162 }],
143: [function (require, module, exports) { 'use strict'; var invariant = function (condition, format, a, b, c, d, e, f) { if ('production' !== 'production') { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error('Invariant Violation: ' + format.replace(/%s/g, function () { return args[argIndex++]; })); }error.framesToPop = 1; throw error; } }; module.exports = invariant; }, {}],
144: [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': 28 }],
145: [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; }, {}],
146: [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; }, {}],
147: [function (require, module, exports) { var isNode = require('./isNode'); function isTextNode (object) { return isNode(object) && object.nodeType == 3; }module.exports = isTextNode; }, { './isNode': 145 }],
148: [function (require, module, exports) { 'use strict'; var invariant = require('./invariant'); var keyMirror = function (obj) { var ret = {}; var key; 'production' !== 'production' ? 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; }, { './invariant': 143 }],
149: [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; }, {}],
150: [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; }, {}],
151: [function (require, module, exports) { 'use strict'; function memoizeStringOnly (callback) { var cache = {}; return function (string) { if (!cache.hasOwnProperty(string)) { cache[string] = callback.call(this, string); } return cache[string]; }; }module.exports = memoizeStringOnly; }, {}],
152: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var invariant = require('./invariant'); function onlyChild (children) { 'production' !== 'production' ? invariant(ReactElement.isValidElement(children), 'onlyChild must be passed a children with exactly one child.') : invariant(ReactElement.isValidElement(children)); return children; }module.exports = onlyChild; }, { './ReactElement': 65, './invariant': 143 }],
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': 28 }],
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 escapeTextContentForBrowser = require('./escapeTextContentForBrowser'); function quoteAttributeValueForBrowser (value) { return '"' + escapeTextContentForBrowser(value) + '"'; }module.exports = quoteAttributeValueForBrowser; }, { './escapeTextContentForBrowser': 124 }],
156: [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 (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { setInnerHTML = function (node, html) { MSApp.execUnsafeLocalFunction(function () { 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 = '\ufeff' + 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': 28 }],
157: [function (require, module, exports) { 'use strict'; var ExecutionEnvironment = require('./ExecutionEnvironment'); var escapeTextContentForBrowser = require('./escapeTextContentForBrowser'); var setInnerHTML = require('./setInnerHTML'); var setTextContent = function (node, text) { node.textContent = text; }; if (ExecutionEnvironment.canUseDOM) { if (!('textContent' in document.documentElement)) { setTextContent = function (node, text) { setInnerHTML(node, escapeTextContentForBrowser(text)); }; } }module.exports = setTextContent; }, { './ExecutionEnvironment': 28, './escapeTextContentForBrowser': 124, './setInnerHTML': 156 }],
158: [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; }, {}],
159: [function (require, module, exports) {
'use strict'; var warning = require('./warning'); function shouldUpdateReactComponent (prevElement, nextElement) {
if (prevElement != null && nextElement != null) {
var prevType = typeof prevElement; var nextType = typeof nextElement; if (prevType === 'string' || prevType === 'number') { return nextType === 'string' || nextType === 'number'; } else {
if (nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key) {
var ownersMatch = prevElement._owner === nextElement._owner; var prevName = null; var nextName = null; var nextDisplayName = null; if ('production' !== 'production') {
if (!ownersMatch) {
if (prevElement._owner != null && prevElement._owner.getPublicInstance() != null && prevElement._owner.getPublicInstance().constructor != null) { prevName = prevElement._owner.getPublicInstance().constructor.displayName; } if (nextElement._owner != null && nextElement._owner.getPublicInstance() != null && nextElement._owner.getPublicInstance().constructor != null) { nextName = nextElement._owner.getPublicInstance().constructor.displayName; } if (nextElement.type != null && nextElement.type.displayName != null) { nextDisplayName = nextElement.type.displayName; } if (nextElement.type != null && typeof nextElement.type === 'string') { nextDisplayName = nextElement.type; } if (typeof nextElement.type !== 'string' || nextElement.type === 'input' || nextElement.type === 'textarea') {
if (prevElement._owner != null && prevElement._owner._isOwnerNecessary === false || nextElement._owner != null && nextElement._owner._isOwnerNecessary === false) {
if (prevElement._owner != null) { prevElement._owner._isOwnerNecessary = true; } if (nextElement._owner != null) { nextElement._owner._isOwnerNecessary = true; }'production' !== 'production' ? warning(false, '<%s /> is being rendered by both %s and %s using the same ' + 'key (%s) in the same place. Currently, this means that ' + "they don't preserve state. This behavior should be very " + "rare so we're considering deprecating it. Please contact " + 'the React team and explain your use case so that we can ' + 'take that into consideration.', nextDisplayName || 'Unknown Component', prevName || '[Unknown]', nextName || '[Unknown]', prevElement.key) : null;
}
}
}
} return ownersMatch;
}
}
} return false;
}module.exports = shouldUpdateReactComponent;
}, { './warning': 162 }],
160: [function (require, module, exports) { var invariant = require('./invariant'); function toArray (obj) { var length = obj.length; 'production' !== 'production' ? 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' !== 'production' ? invariant(typeof length === 'number', 'toArray: Object needs a length property') : invariant(typeof length === 'number'); 'production' !== 'production' ? 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; }, { './invariant': 143 }],
161: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var ReactFragment = require('./ReactFragment'); var ReactInstanceHandles = require('./ReactInstanceHandles'); var getIteratorFn = require('./getIteratorFn'); var invariant = require('./invariant'); var warning = require('./warning'); var SEPARATOR = ReactInstanceHandles.SEPARATOR; var SUBSEPARATOR = ':'; var userProvidedKeyEscaperLookup = { '=': '=0', '.': '=1', ':': '=2' }; var userProvidedKeyEscapeRegex = /[=.:]/g; var didWarnAboutMaps = false; 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); } function traverseAllChildrenImpl (children, nameSoFar, indexSoFar, callback, traverseContext) { var type = typeof children; if (type === 'undefined' || type === 'boolean') { children = null; } if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) { callback(traverseContext, children, nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, indexSoFar); return 1; } var child, nextName, nextIndex; var subtreeCount = 0; if (Array.isArray(children)) { for (var i = 0; i < children.length; i++) { child = children[i]; nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, i); nextIndex = indexSoFar + subtreeCount; subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); } } else { var iteratorFn = getIteratorFn(children); if (iteratorFn) { var iterator = iteratorFn.call(children); var step; if (iteratorFn !== children.entries) { var ii = 0; while (!(step = iterator.next()).done) { child = step.value; nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + getComponentKey(child, ii++); nextIndex = indexSoFar + subtreeCount; subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); } } else { if ('production' !== 'production') { 'production' !== 'production' ? warning(didWarnAboutMaps, 'Using Maps as children is not yet fully supported. It is an ' + 'experimental feature that might be removed. Convert it to a ' + 'sequence / iterable of keyed ReactElements instead.') : null; didWarnAboutMaps = true; } while (!(step = iterator.next()).done) { var entry = step.value; if (entry) { child = entry[1]; nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0); nextIndex = indexSoFar + subtreeCount; subtreeCount += traverseAllChildrenImpl(child, nextName, nextIndex, callback, traverseContext); } } } } else if (type === 'object') { 'production' !== 'production' ? invariant(children.nodeType !== 1, 'traverseAllChildren(...): Encountered an invalid child; DOM ' + 'elements are not valid children of React components.') : invariant(children.nodeType !== 1); var fragment = ReactFragment.extract(children); for (var key in fragment) { if (fragment.hasOwnProperty(key)) { child = fragment[key]; nextName = (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + wrapUserProvidedKey(key) + SUBSEPARATOR + getComponentKey(child, 0); nextIndex = indexSoFar + subtreeCount; subtreeCount += traverseAllChildrenImpl(child, 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; }, { './ReactElement': 65, './ReactFragment': 71, './ReactInstanceHandles': 74, './getIteratorFn': 134, './invariant': 143, './warning': 162 }],
162: [function (require, module, exports) { 'use strict'; var emptyFunction = require('./emptyFunction'); var warning = emptyFunction; if ('production' !== 'production') { 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 (format.length < 10 || /^[s\W]*$/.test(format)) { throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format); } if (format.indexOf('Failed Composite propType: ') === 0) { return; } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; }); console.warn(message); try { throw new Error(message); } catch (x) {} } }; }module.exports = warning; }, { './emptyFunction': 122 }],
163: [function (require, module, exports) { module.exports = require('./lib/React'); }, { './lib/React': 36 }] }, {}, [7]);