{"version":3,"file":"static/js/bundle.js","sources":["/Users/Ystartsev/Work/debugger-sourcemaps/webpack/bootstrap cbd3f28b2666e547679d","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/ansi-regex/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/ansi-styles/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/asap/browser-raw.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/escape-string-regexp/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/EventListener.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/ExecutionEnvironment.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/camelize.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/camelizeStyleName.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/containsNode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/emptyFunction.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/emptyObject.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/focusNode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/getActiveElement.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/hyphenate.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/hyphenateStyleName.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/invariant.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/isNode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/isTextNode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/shallowEqual.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/fbjs/lib/warning.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/has-ansi/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/inherits/inherits_browser.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/json3/lib/json3.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/ms/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/object-assign/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/process/browser.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/prop-types/checkPropTypes.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/prop-types/lib/ReactPropTypesSecret.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/punycode/punycode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/querystring-es3/decode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/querystring-es3/encode.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/querystring-es3/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dev-utils/formatWebpackMessages.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dev-utils/launchEditorEndpoint.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dev-utils/node_modules/chalk/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dev-utils/node_modules/strip-ansi/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dev-utils/webpackHotDevClient.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dom/cjs/react-dom.development.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-dom/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-error-overlay/lib/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-scripts/config/polyfills.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-scripts/node_modules/promise/lib/core.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-scripts/node_modules/promise/lib/es6-extensions.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react-scripts/node_modules/promise/lib/rejection-tracking.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react/cjs/react.development.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/react/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/requires-port/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/entry.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/event/close.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/event/emitter.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/event/event.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/event/eventtarget.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/event/trans-message.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/facade.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/iframe-bootstrap.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/info-ajax.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/info-iframe-receiver.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/info-iframe.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/info-receiver.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/location.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/main.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/shims.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport-list.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/browser/abstract-xhr.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/browser/eventsource.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/browser/websocket.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/eventsource.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/htmlfile.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/iframe.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/jsonp-polling.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/lib/ajax-based.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/lib/buffered-sender.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/lib/iframe-wrap.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/lib/polling.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/lib/sender-receiver.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/receiver/eventsource.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/receiver/htmlfile.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/receiver/jsonp.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/receiver/xhr.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/sender/jsonp.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/sender/xdr.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/sender/xhr-cors.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/sender/xhr-fake.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/sender/xhr-local.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/websocket.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/xdr-polling.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/xdr-streaming.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/xhr-polling.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/transport/xhr-streaming.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/browser-crypto.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/browser.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/escape.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/event.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/iframe.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/log.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/object.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/random.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/transport.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/utils/url.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/lib/version.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/node_modules/debug/src/browser.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/sockjs-client/node_modules/debug/src/debug.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/supports-color/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/url-parse/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/url-parse/node_modules/querystringify/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/url/url.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/url/util.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/webpack/buildin/amd-options.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/webpack/buildin/global.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/webpack/buildin/module.js","/Users/Ystartsev/Work/debugger-sourcemaps/node_modules/whatwg-fetch/fetch.js","/Users/Ystartsev/Work/debugger-sourcemaps/src/App.js","/Users/Ystartsev/Work/debugger-sourcemaps/src/index.js","/Users/Ystartsev/Work/debugger-sourcemaps/src/step-in-test.js","/Users/Ystartsev/Work/debugger-sourcemaps/src/step-out-test.js","/Users/Ystartsev/Work/debugger-sourcemaps/src/step-over-test.js"],"sourcesContent":[" \tfunction hotDisposeChunk(chunkId) {\n \t\tdelete installedChunks[chunkId];\n \t}\n \tvar parentHotUpdateCallback = this[\"webpackHotUpdate\"];\n \tthis[\"webpackHotUpdate\"] = \r\n \tfunction webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars\r\n \t\thotAddUpdateChunk(chunkId, moreModules);\r\n \t\tif(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);\r\n \t} ;\r\n \t\r\n \tfunction hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars\r\n \t\tvar head = document.getElementsByTagName(\"head\")[0];\r\n \t\tvar script = document.createElement(\"script\");\r\n \t\tscript.type = \"text/javascript\";\r\n \t\tscript.charset = \"utf-8\";\r\n \t\tscript.src = __webpack_require__.p + \"\" + chunkId + \".\" + hotCurrentHash + \".hot-update.js\";\r\n \t\t;\r\n \t\thead.appendChild(script);\r\n \t}\r\n \t\r\n \tfunction hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars\r\n \t\trequestTimeout = requestTimeout || 10000;\r\n \t\treturn new Promise(function(resolve, reject) {\r\n \t\t\tif(typeof XMLHttpRequest === \"undefined\")\r\n \t\t\t\treturn reject(new Error(\"No browser support\"));\r\n \t\t\ttry {\r\n \t\t\t\tvar request = new XMLHttpRequest();\r\n \t\t\t\tvar requestPath = __webpack_require__.p + \"\" + hotCurrentHash + \".hot-update.json\";\r\n \t\t\t\trequest.open(\"GET\", requestPath, true);\r\n \t\t\t\trequest.timeout = requestTimeout;\r\n \t\t\t\trequest.send(null);\r\n \t\t\t} catch(err) {\r\n \t\t\t\treturn reject(err);\r\n \t\t\t}\r\n \t\t\trequest.onreadystatechange = function() {\r\n \t\t\t\tif(request.readyState !== 4) return;\r\n \t\t\t\tif(request.status === 0) {\r\n \t\t\t\t\t// timeout\r\n \t\t\t\t\treject(new Error(\"Manifest request to \" + requestPath + \" timed out.\"));\r\n \t\t\t\t} else if(request.status === 404) {\r\n \t\t\t\t\t// no update available\r\n \t\t\t\t\tresolve();\r\n \t\t\t\t} else if(request.status !== 200 && request.status !== 304) {\r\n \t\t\t\t\t// other failure\r\n \t\t\t\t\treject(new Error(\"Manifest request to \" + requestPath + \" failed.\"));\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// success\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\tvar update = JSON.parse(request.responseText);\r\n \t\t\t\t\t} catch(e) {\r\n \t\t\t\t\t\treject(e);\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tresolve(update);\r\n \t\t\t\t}\r\n \t\t\t};\r\n \t\t});\r\n \t}\r\n\n \t\r\n \t\r\n \tvar hotApplyOnUpdate = true;\r\n \tvar hotCurrentHash = \"cbd3f28b2666e547679d\"; // eslint-disable-line no-unused-vars\r\n \tvar hotRequestTimeout = 10000;\r\n \tvar hotCurrentModuleData = {};\r\n \tvar hotCurrentChildModule; // eslint-disable-line no-unused-vars\r\n \tvar hotCurrentParents = []; // eslint-disable-line no-unused-vars\r\n \tvar hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars\r\n \t\r\n \tfunction hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars\r\n \t\tvar me = installedModules[moduleId];\r\n \t\tif(!me) return __webpack_require__;\r\n \t\tvar fn = function(request) {\r\n \t\t\tif(me.hot.active) {\r\n \t\t\t\tif(installedModules[request]) {\r\n \t\t\t\t\tif(installedModules[request].parents.indexOf(moduleId) < 0)\r\n \t\t\t\t\t\tinstalledModules[request].parents.push(moduleId);\r\n \t\t\t\t} else {\r\n \t\t\t\t\thotCurrentParents = [moduleId];\r\n \t\t\t\t\thotCurrentChildModule = request;\r\n \t\t\t\t}\r\n \t\t\t\tif(me.children.indexOf(request) < 0)\r\n \t\t\t\t\tme.children.push(request);\r\n \t\t\t} else {\r\n \t\t\t\tconsole.warn(\"[HMR] unexpected require(\" + request + \") from disposed module \" + moduleId);\r\n \t\t\t\thotCurrentParents = [];\r\n \t\t\t}\r\n \t\t\treturn __webpack_require__(request);\r\n \t\t};\r\n \t\tvar ObjectFactory = function ObjectFactory(name) {\r\n \t\t\treturn {\r\n \t\t\t\tconfigurable: true,\r\n \t\t\t\tenumerable: true,\r\n \t\t\t\tget: function() {\r\n \t\t\t\t\treturn __webpack_require__[name];\r\n \t\t\t\t},\r\n \t\t\t\tset: function(value) {\r\n \t\t\t\t\t__webpack_require__[name] = value;\r\n \t\t\t\t}\r\n \t\t\t};\r\n \t\t};\r\n \t\tfor(var name in __webpack_require__) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== \"e\") {\r\n \t\t\t\tObject.defineProperty(fn, name, ObjectFactory(name));\r\n \t\t\t}\r\n \t\t}\r\n \t\tfn.e = function(chunkId) {\r\n \t\t\tif(hotStatus === \"ready\")\r\n \t\t\t\thotSetStatus(\"prepare\");\r\n \t\t\thotChunksLoading++;\r\n \t\t\treturn __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {\r\n \t\t\t\tfinishChunkLoading();\r\n \t\t\t\tthrow err;\r\n \t\t\t});\r\n \t\r\n \t\t\tfunction finishChunkLoading() {\r\n \t\t\t\thotChunksLoading--;\r\n \t\t\t\tif(hotStatus === \"prepare\") {\r\n \t\t\t\t\tif(!hotWaitingFilesMap[chunkId]) {\r\n \t\t\t\t\t\thotEnsureUpdateChunk(chunkId);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif(hotChunksLoading === 0 && hotWaitingFiles === 0) {\r\n \t\t\t\t\t\thotUpdateDownloaded();\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t};\r\n \t\treturn fn;\r\n \t}\r\n \t\r\n \tfunction hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars\r\n \t\tvar hot = {\r\n \t\t\t// private stuff\r\n \t\t\t_acceptedDependencies: {},\r\n \t\t\t_declinedDependencies: {},\r\n \t\t\t_selfAccepted: false,\r\n \t\t\t_selfDeclined: false,\r\n \t\t\t_disposeHandlers: [],\r\n \t\t\t_main: hotCurrentChildModule !== moduleId,\r\n \t\r\n \t\t\t// Module API\r\n \t\t\tactive: true,\r\n \t\t\taccept: function(dep, callback) {\r\n \t\t\t\tif(typeof dep === \"undefined\")\r\n \t\t\t\t\thot._selfAccepted = true;\r\n \t\t\t\telse if(typeof dep === \"function\")\r\n \t\t\t\t\thot._selfAccepted = dep;\r\n \t\t\t\telse if(typeof dep === \"object\")\r\n \t\t\t\t\tfor(var i = 0; i < dep.length; i++)\r\n \t\t\t\t\t\thot._acceptedDependencies[dep[i]] = callback || function() {};\r\n \t\t\t\telse\r\n \t\t\t\t\thot._acceptedDependencies[dep] = callback || function() {};\r\n \t\t\t},\r\n \t\t\tdecline: function(dep) {\r\n \t\t\t\tif(typeof dep === \"undefined\")\r\n \t\t\t\t\thot._selfDeclined = true;\r\n \t\t\t\telse if(typeof dep === \"object\")\r\n \t\t\t\t\tfor(var i = 0; i < dep.length; i++)\r\n \t\t\t\t\t\thot._declinedDependencies[dep[i]] = true;\r\n \t\t\t\telse\r\n \t\t\t\t\thot._declinedDependencies[dep] = true;\r\n \t\t\t},\r\n \t\t\tdispose: function(callback) {\r\n \t\t\t\thot._disposeHandlers.push(callback);\r\n \t\t\t},\r\n \t\t\taddDisposeHandler: function(callback) {\r\n \t\t\t\thot._disposeHandlers.push(callback);\r\n \t\t\t},\r\n \t\t\tremoveDisposeHandler: function(callback) {\r\n \t\t\t\tvar idx = hot._disposeHandlers.indexOf(callback);\r\n \t\t\t\tif(idx >= 0) hot._disposeHandlers.splice(idx, 1);\r\n \t\t\t},\r\n \t\r\n \t\t\t// Management API\r\n \t\t\tcheck: hotCheck,\r\n \t\t\tapply: hotApply,\r\n \t\t\tstatus: function(l) {\r\n \t\t\t\tif(!l) return hotStatus;\r\n \t\t\t\thotStatusHandlers.push(l);\r\n \t\t\t},\r\n \t\t\taddStatusHandler: function(l) {\r\n \t\t\t\thotStatusHandlers.push(l);\r\n \t\t\t},\r\n \t\t\tremoveStatusHandler: function(l) {\r\n \t\t\t\tvar idx = hotStatusHandlers.indexOf(l);\r\n \t\t\t\tif(idx >= 0) hotStatusHandlers.splice(idx, 1);\r\n \t\t\t},\r\n \t\r\n \t\t\t//inherit from previous dispose call\r\n \t\t\tdata: hotCurrentModuleData[moduleId]\r\n \t\t};\r\n \t\thotCurrentChildModule = undefined;\r\n \t\treturn hot;\r\n \t}\r\n \t\r\n \tvar hotStatusHandlers = [];\r\n \tvar hotStatus = \"idle\";\r\n \t\r\n \tfunction hotSetStatus(newStatus) {\r\n \t\thotStatus = newStatus;\r\n \t\tfor(var i = 0; i < hotStatusHandlers.length; i++)\r\n \t\t\thotStatusHandlers[i].call(null, newStatus);\r\n \t}\r\n \t\r\n \t// while downloading\r\n \tvar hotWaitingFiles = 0;\r\n \tvar hotChunksLoading = 0;\r\n \tvar hotWaitingFilesMap = {};\r\n \tvar hotRequestedFilesMap = {};\r\n \tvar hotAvailableFilesMap = {};\r\n \tvar hotDeferred;\r\n \t\r\n \t// The update info\r\n \tvar hotUpdate, hotUpdateNewHash;\r\n \t\r\n \tfunction toModuleId(id) {\r\n \t\tvar isNumber = (+id) + \"\" === id;\r\n \t\treturn isNumber ? +id : id;\r\n \t}\r\n \t\r\n \tfunction hotCheck(apply) {\r\n \t\tif(hotStatus !== \"idle\") throw new Error(\"check() is only allowed in idle status\");\r\n \t\thotApplyOnUpdate = apply;\r\n \t\thotSetStatus(\"check\");\r\n \t\treturn hotDownloadManifest(hotRequestTimeout).then(function(update) {\r\n \t\t\tif(!update) {\r\n \t\t\t\thotSetStatus(\"idle\");\r\n \t\t\t\treturn null;\r\n \t\t\t}\r\n \t\t\thotRequestedFilesMap = {};\r\n \t\t\thotWaitingFilesMap = {};\r\n \t\t\thotAvailableFilesMap = update.c;\r\n \t\t\thotUpdateNewHash = update.h;\r\n \t\r\n \t\t\thotSetStatus(\"prepare\");\r\n \t\t\tvar promise = new Promise(function(resolve, reject) {\r\n \t\t\t\thotDeferred = {\r\n \t\t\t\t\tresolve: resolve,\r\n \t\t\t\t\treject: reject\r\n \t\t\t\t};\r\n \t\t\t});\r\n \t\t\thotUpdate = {};\r\n \t\t\tvar chunkId = 0;\r\n \t\t\t{ // eslint-disable-line no-lone-blocks\r\n \t\t\t\t/*globals chunkId */\r\n \t\t\t\thotEnsureUpdateChunk(chunkId);\r\n \t\t\t}\r\n \t\t\tif(hotStatus === \"prepare\" && hotChunksLoading === 0 && hotWaitingFiles === 0) {\r\n \t\t\t\thotUpdateDownloaded();\r\n \t\t\t}\r\n \t\t\treturn promise;\r\n \t\t});\r\n \t}\r\n \t\r\n \tfunction hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars\r\n \t\tif(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])\r\n \t\t\treturn;\r\n \t\thotRequestedFilesMap[chunkId] = false;\r\n \t\tfor(var moduleId in moreModules) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\r\n \t\t\t\thotUpdate[moduleId] = moreModules[moduleId];\r\n \t\t\t}\r\n \t\t}\r\n \t\tif(--hotWaitingFiles === 0 && hotChunksLoading === 0) {\r\n \t\t\thotUpdateDownloaded();\r\n \t\t}\r\n \t}\r\n \t\r\n \tfunction hotEnsureUpdateChunk(chunkId) {\r\n \t\tif(!hotAvailableFilesMap[chunkId]) {\r\n \t\t\thotWaitingFilesMap[chunkId] = true;\r\n \t\t} else {\r\n \t\t\thotRequestedFilesMap[chunkId] = true;\r\n \t\t\thotWaitingFiles++;\r\n \t\t\thotDownloadUpdateChunk(chunkId);\r\n \t\t}\r\n \t}\r\n \t\r\n \tfunction hotUpdateDownloaded() {\r\n \t\thotSetStatus(\"ready\");\r\n \t\tvar deferred = hotDeferred;\r\n \t\thotDeferred = null;\r\n \t\tif(!deferred) return;\r\n \t\tif(hotApplyOnUpdate) {\r\n \t\t\t// Wrap deferred object in Promise to mark it as a well-handled Promise to\r\n \t\t\t// avoid triggering uncaught exception warning in Chrome.\r\n \t\t\t// See https://bugs.chromium.org/p/chromium/issues/detail?id=465666\r\n \t\t\tPromise.resolve().then(function() {\r\n \t\t\t\treturn hotApply(hotApplyOnUpdate);\r\n \t\t\t}).then(\r\n \t\t\t\tfunction(result) {\r\n \t\t\t\t\tdeferred.resolve(result);\r\n \t\t\t\t},\r\n \t\t\t\tfunction(err) {\r\n \t\t\t\t\tdeferred.reject(err);\r\n \t\t\t\t}\r\n \t\t\t);\r\n \t\t} else {\r\n \t\t\tvar outdatedModules = [];\r\n \t\t\tfor(var id in hotUpdate) {\r\n \t\t\t\tif(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {\r\n \t\t\t\t\toutdatedModules.push(toModuleId(id));\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tdeferred.resolve(outdatedModules);\r\n \t\t}\r\n \t}\r\n \t\r\n \tfunction hotApply(options) {\r\n \t\tif(hotStatus !== \"ready\") throw new Error(\"apply() is only allowed in ready status\");\r\n \t\toptions = options || {};\r\n \t\r\n \t\tvar cb;\r\n \t\tvar i;\r\n \t\tvar j;\r\n \t\tvar module;\r\n \t\tvar moduleId;\r\n \t\r\n \t\tfunction getAffectedStuff(updateModuleId) {\r\n \t\t\tvar outdatedModules = [updateModuleId];\r\n \t\t\tvar outdatedDependencies = {};\r\n \t\r\n \t\t\tvar queue = outdatedModules.slice().map(function(id) {\r\n \t\t\t\treturn {\r\n \t\t\t\t\tchain: [id],\r\n \t\t\t\t\tid: id\r\n \t\t\t\t};\r\n \t\t\t});\r\n \t\t\twhile(queue.length > 0) {\r\n \t\t\t\tvar queueItem = queue.pop();\r\n \t\t\t\tvar moduleId = queueItem.id;\r\n \t\t\t\tvar chain = queueItem.chain;\r\n \t\t\t\tmodule = installedModules[moduleId];\r\n \t\t\t\tif(!module || module.hot._selfAccepted)\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\tif(module.hot._selfDeclined) {\r\n \t\t\t\t\treturn {\r\n \t\t\t\t\t\ttype: \"self-declined\",\r\n \t\t\t\t\t\tchain: chain,\r\n \t\t\t\t\t\tmoduleId: moduleId\r\n \t\t\t\t\t};\r\n \t\t\t\t}\r\n \t\t\t\tif(module.hot._main) {\r\n \t\t\t\t\treturn {\r\n \t\t\t\t\t\ttype: \"unaccepted\",\r\n \t\t\t\t\t\tchain: chain,\r\n \t\t\t\t\t\tmoduleId: moduleId\r\n \t\t\t\t\t};\r\n \t\t\t\t}\r\n \t\t\t\tfor(var i = 0; i < module.parents.length; i++) {\r\n \t\t\t\t\tvar parentId = module.parents[i];\r\n \t\t\t\t\tvar parent = installedModules[parentId];\r\n \t\t\t\t\tif(!parent) continue;\r\n \t\t\t\t\tif(parent.hot._declinedDependencies[moduleId]) {\r\n \t\t\t\t\t\treturn {\r\n \t\t\t\t\t\t\ttype: \"declined\",\r\n \t\t\t\t\t\t\tchain: chain.concat([parentId]),\r\n \t\t\t\t\t\t\tmoduleId: moduleId,\r\n \t\t\t\t\t\t\tparentId: parentId\r\n \t\t\t\t\t\t};\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif(outdatedModules.indexOf(parentId) >= 0) continue;\r\n \t\t\t\t\tif(parent.hot._acceptedDependencies[moduleId]) {\r\n \t\t\t\t\t\tif(!outdatedDependencies[parentId])\r\n \t\t\t\t\t\t\toutdatedDependencies[parentId] = [];\r\n \t\t\t\t\t\taddAllToSet(outdatedDependencies[parentId], [moduleId]);\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdelete outdatedDependencies[parentId];\r\n \t\t\t\t\toutdatedModules.push(parentId);\r\n \t\t\t\t\tqueue.push({\r\n \t\t\t\t\t\tchain: chain.concat([parentId]),\r\n \t\t\t\t\t\tid: parentId\r\n \t\t\t\t\t});\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\r\n \t\t\treturn {\r\n \t\t\t\ttype: \"accepted\",\r\n \t\t\t\tmoduleId: updateModuleId,\r\n \t\t\t\toutdatedModules: outdatedModules,\r\n \t\t\t\toutdatedDependencies: outdatedDependencies\r\n \t\t\t};\r\n \t\t}\r\n \t\r\n \t\tfunction addAllToSet(a, b) {\r\n \t\t\tfor(var i = 0; i < b.length; i++) {\r\n \t\t\t\tvar item = b[i];\r\n \t\t\t\tif(a.indexOf(item) < 0)\r\n \t\t\t\t\ta.push(item);\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// at begin all updates modules are outdated\r\n \t\t// the \"outdated\" status can propagate to parents if they don't accept the children\r\n \t\tvar outdatedDependencies = {};\r\n \t\tvar outdatedModules = [];\r\n \t\tvar appliedUpdate = {};\r\n \t\r\n \t\tvar warnUnexpectedRequire = function warnUnexpectedRequire() {\r\n \t\t\tconsole.warn(\"[HMR] unexpected require(\" + result.moduleId + \") to disposed module\");\r\n \t\t};\r\n \t\r\n \t\tfor(var id in hotUpdate) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {\r\n \t\t\t\tmoduleId = toModuleId(id);\r\n \t\t\t\tvar result;\r\n \t\t\t\tif(hotUpdate[id]) {\r\n \t\t\t\t\tresult = getAffectedStuff(moduleId);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresult = {\r\n \t\t\t\t\t\ttype: \"disposed\",\r\n \t\t\t\t\t\tmoduleId: id\r\n \t\t\t\t\t};\r\n \t\t\t\t}\r\n \t\t\t\tvar abortError = false;\r\n \t\t\t\tvar doApply = false;\r\n \t\t\t\tvar doDispose = false;\r\n \t\t\t\tvar chainInfo = \"\";\r\n \t\t\t\tif(result.chain) {\r\n \t\t\t\t\tchainInfo = \"\\nUpdate propagation: \" + result.chain.join(\" -> \");\r\n \t\t\t\t}\r\n \t\t\t\tswitch(result.type) {\r\n \t\t\t\t\tcase \"self-declined\":\r\n \t\t\t\t\t\tif(options.onDeclined)\r\n \t\t\t\t\t\t\toptions.onDeclined(result);\r\n \t\t\t\t\t\tif(!options.ignoreDeclined)\r\n \t\t\t\t\t\t\tabortError = new Error(\"Aborted because of self decline: \" + result.moduleId + chainInfo);\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\tcase \"declined\":\r\n \t\t\t\t\t\tif(options.onDeclined)\r\n \t\t\t\t\t\t\toptions.onDeclined(result);\r\n \t\t\t\t\t\tif(!options.ignoreDeclined)\r\n \t\t\t\t\t\t\tabortError = new Error(\"Aborted because of declined dependency: \" + result.moduleId + \" in \" + result.parentId + chainInfo);\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\tcase \"unaccepted\":\r\n \t\t\t\t\t\tif(options.onUnaccepted)\r\n \t\t\t\t\t\t\toptions.onUnaccepted(result);\r\n \t\t\t\t\t\tif(!options.ignoreUnaccepted)\r\n \t\t\t\t\t\t\tabortError = new Error(\"Aborted because \" + moduleId + \" is not accepted\" + chainInfo);\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\tcase \"accepted\":\r\n \t\t\t\t\t\tif(options.onAccepted)\r\n \t\t\t\t\t\t\toptions.onAccepted(result);\r\n \t\t\t\t\t\tdoApply = true;\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\tcase \"disposed\":\r\n \t\t\t\t\t\tif(options.onDisposed)\r\n \t\t\t\t\t\t\toptions.onDisposed(result);\r\n \t\t\t\t\t\tdoDispose = true;\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t\tdefault:\r\n \t\t\t\t\t\tthrow new Error(\"Unexception type \" + result.type);\r\n \t\t\t\t}\r\n \t\t\t\tif(abortError) {\r\n \t\t\t\t\thotSetStatus(\"abort\");\r\n \t\t\t\t\treturn Promise.reject(abortError);\r\n \t\t\t\t}\r\n \t\t\t\tif(doApply) {\r\n \t\t\t\t\tappliedUpdate[moduleId] = hotUpdate[moduleId];\r\n \t\t\t\t\taddAllToSet(outdatedModules, result.outdatedModules);\r\n \t\t\t\t\tfor(moduleId in result.outdatedDependencies) {\r\n \t\t\t\t\t\tif(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {\r\n \t\t\t\t\t\t\tif(!outdatedDependencies[moduleId])\r\n \t\t\t\t\t\t\t\toutdatedDependencies[moduleId] = [];\r\n \t\t\t\t\t\t\taddAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\tif(doDispose) {\r\n \t\t\t\t\taddAllToSet(outdatedModules, [result.moduleId]);\r\n \t\t\t\t\tappliedUpdate[moduleId] = warnUnexpectedRequire;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// Store self accepted outdated modules to require them later by the module system\r\n \t\tvar outdatedSelfAcceptedModules = [];\r\n \t\tfor(i = 0; i < outdatedModules.length; i++) {\r\n \t\t\tmoduleId = outdatedModules[i];\r\n \t\t\tif(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)\r\n \t\t\t\toutdatedSelfAcceptedModules.push({\r\n \t\t\t\t\tmodule: moduleId,\r\n \t\t\t\t\terrorHandler: installedModules[moduleId].hot._selfAccepted\r\n \t\t\t\t});\r\n \t\t}\r\n \t\r\n \t\t// Now in \"dispose\" phase\r\n \t\thotSetStatus(\"dispose\");\r\n \t\tObject.keys(hotAvailableFilesMap).forEach(function(chunkId) {\r\n \t\t\tif(hotAvailableFilesMap[chunkId] === false) {\r\n \t\t\t\thotDisposeChunk(chunkId);\r\n \t\t\t}\r\n \t\t});\r\n \t\r\n \t\tvar idx;\r\n \t\tvar queue = outdatedModules.slice();\r\n \t\twhile(queue.length > 0) {\r\n \t\t\tmoduleId = queue.pop();\r\n \t\t\tmodule = installedModules[moduleId];\r\n \t\t\tif(!module) continue;\r\n \t\r\n \t\t\tvar data = {};\r\n \t\r\n \t\t\t// Call dispose handlers\r\n \t\t\tvar disposeHandlers = module.hot._disposeHandlers;\r\n \t\t\tfor(j = 0; j < disposeHandlers.length; j++) {\r\n \t\t\t\tcb = disposeHandlers[j];\r\n \t\t\t\tcb(data);\r\n \t\t\t}\r\n \t\t\thotCurrentModuleData[moduleId] = data;\r\n \t\r\n \t\t\t// disable module (this disables requires from this module)\r\n \t\t\tmodule.hot.active = false;\r\n \t\r\n \t\t\t// remove module from cache\r\n \t\t\tdelete installedModules[moduleId];\r\n \t\r\n \t\t\t// when disposing there is no need to call dispose handler\r\n \t\t\tdelete outdatedDependencies[moduleId];\r\n \t\r\n \t\t\t// remove \"parents\" references from all children\r\n \t\t\tfor(j = 0; j < module.children.length; j++) {\r\n \t\t\t\tvar child = installedModules[module.children[j]];\r\n \t\t\t\tif(!child) continue;\r\n \t\t\t\tidx = child.parents.indexOf(moduleId);\r\n \t\t\t\tif(idx >= 0) {\r\n \t\t\t\t\tchild.parents.splice(idx, 1);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// remove outdated dependency from module children\r\n \t\tvar dependency;\r\n \t\tvar moduleOutdatedDependencies;\r\n \t\tfor(moduleId in outdatedDependencies) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {\r\n \t\t\t\tmodule = installedModules[moduleId];\r\n \t\t\t\tif(module) {\r\n \t\t\t\t\tmoduleOutdatedDependencies = outdatedDependencies[moduleId];\r\n \t\t\t\t\tfor(j = 0; j < moduleOutdatedDependencies.length; j++) {\r\n \t\t\t\t\t\tdependency = moduleOutdatedDependencies[j];\r\n \t\t\t\t\t\tidx = module.children.indexOf(dependency);\r\n \t\t\t\t\t\tif(idx >= 0) module.children.splice(idx, 1);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// Not in \"apply\" phase\r\n \t\thotSetStatus(\"apply\");\r\n \t\r\n \t\thotCurrentHash = hotUpdateNewHash;\r\n \t\r\n \t\t// insert new code\r\n \t\tfor(moduleId in appliedUpdate) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {\r\n \t\t\t\tmodules[moduleId] = appliedUpdate[moduleId];\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// call accept handlers\r\n \t\tvar error = null;\r\n \t\tfor(moduleId in outdatedDependencies) {\r\n \t\t\tif(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {\r\n \t\t\t\tmodule = installedModules[moduleId];\r\n \t\t\t\tif(module) {\r\n \t\t\t\t\tmoduleOutdatedDependencies = outdatedDependencies[moduleId];\r\n \t\t\t\t\tvar callbacks = [];\r\n \t\t\t\t\tfor(i = 0; i < moduleOutdatedDependencies.length; i++) {\r\n \t\t\t\t\t\tdependency = moduleOutdatedDependencies[i];\r\n \t\t\t\t\t\tcb = module.hot._acceptedDependencies[dependency];\r\n \t\t\t\t\t\tif(cb) {\r\n \t\t\t\t\t\t\tif(callbacks.indexOf(cb) >= 0) continue;\r\n \t\t\t\t\t\t\tcallbacks.push(cb);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tfor(i = 0; i < callbacks.length; i++) {\r\n \t\t\t\t\t\tcb = callbacks[i];\r\n \t\t\t\t\t\ttry {\r\n \t\t\t\t\t\t\tcb(moduleOutdatedDependencies);\r\n \t\t\t\t\t\t} catch(err) {\r\n \t\t\t\t\t\t\tif(options.onErrored) {\r\n \t\t\t\t\t\t\t\toptions.onErrored({\r\n \t\t\t\t\t\t\t\t\ttype: \"accept-errored\",\r\n \t\t\t\t\t\t\t\t\tmoduleId: moduleId,\r\n \t\t\t\t\t\t\t\t\tdependencyId: moduleOutdatedDependencies[i],\r\n \t\t\t\t\t\t\t\t\terror: err\r\n \t\t\t\t\t\t\t\t});\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif(!options.ignoreErrored) {\r\n \t\t\t\t\t\t\t\tif(!error)\r\n \t\t\t\t\t\t\t\t\terror = err;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// Load self accepted modules\r\n \t\tfor(i = 0; i < outdatedSelfAcceptedModules.length; i++) {\r\n \t\t\tvar item = outdatedSelfAcceptedModules[i];\r\n \t\t\tmoduleId = item.module;\r\n \t\t\thotCurrentParents = [moduleId];\r\n \t\t\ttry {\r\n \t\t\t\t__webpack_require__(moduleId);\r\n \t\t\t} catch(err) {\r\n \t\t\t\tif(typeof item.errorHandler === \"function\") {\r\n \t\t\t\t\ttry {\r\n \t\t\t\t\t\titem.errorHandler(err);\r\n \t\t\t\t\t} catch(err2) {\r\n \t\t\t\t\t\tif(options.onErrored) {\r\n \t\t\t\t\t\t\toptions.onErrored({\r\n \t\t\t\t\t\t\t\ttype: \"self-accept-error-handler-errored\",\r\n \t\t\t\t\t\t\t\tmoduleId: moduleId,\r\n \t\t\t\t\t\t\t\terror: err2,\r\n \t\t\t\t\t\t\t\torginalError: err, // TODO remove in webpack 4\r\n \t\t\t\t\t\t\t\toriginalError: err\r\n \t\t\t\t\t\t\t});\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif(!options.ignoreErrored) {\r\n \t\t\t\t\t\t\tif(!error)\r\n \t\t\t\t\t\t\t\terror = err2;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif(!error)\r\n \t\t\t\t\t\t\terror = err;\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tif(options.onErrored) {\r\n \t\t\t\t\t\toptions.onErrored({\r\n \t\t\t\t\t\t\ttype: \"self-accept-errored\",\r\n \t\t\t\t\t\t\tmoduleId: moduleId,\r\n \t\t\t\t\t\t\terror: err\r\n \t\t\t\t\t\t});\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif(!options.ignoreErrored) {\r\n \t\t\t\t\t\tif(!error)\r\n \t\t\t\t\t\t\terror = err;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\r\n \t\t// handle errors in accept handlers and self accepted module load\r\n \t\tif(error) {\r\n \t\t\thotSetStatus(\"fail\");\r\n \t\t\treturn Promise.reject(error);\r\n \t\t}\r\n \t\r\n \t\thotSetStatus(\"idle\");\r\n \t\treturn new Promise(function(resolve) {\r\n \t\t\tresolve(outdatedModules);\r\n \t\t});\r\n \t}\r\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {},\n \t\t\thot: hotCreateModule(moduleId),\n \t\t\tparents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),\n \t\t\tchildren: []\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// __webpack_hash__\n \t__webpack_require__.h = function() { return hotCurrentHash; };\n\n \t// Load entry module and return exports\n \treturn hotCreateRequire(0)(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap cbd3f28b2666e547679d","'use strict';\nmodule.exports = function () {\n\treturn /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ansi-regex/index.js\n// module id = ./node_modules/ansi-regex/index.js\n// module chunks = 0","'use strict';\n\nfunction assembleStyles () {\n\tvar styles = {\n\t\tmodifiers: {\n\t\t\treset: [0, 0],\n\t\t\tbold: [1, 22], // 21 isn't widely supported and 22 does the same thing\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolors: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39]\n\t\t},\n\t\tbgColors: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49]\n\t\t}\n\t};\n\n\t// fix humans\n\tstyles.colors.grey = styles.colors.gray;\n\n\tObject.keys(styles).forEach(function (groupName) {\n\t\tvar group = styles[groupName];\n\n\t\tObject.keys(group).forEach(function (styleName) {\n\t\t\tvar style = group[styleName];\n\n\t\t\tstyles[styleName] = group[styleName] = {\n\t\t\t\topen: '\\u001b[' + style[0] + 'm',\n\t\t\t\tclose: '\\u001b[' + style[1] + 'm'\n\t\t\t};\n\t\t});\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t});\n\n\treturn styles;\n}\n\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ansi-styles/index.js\n// module id = ./node_modules/ansi-styles/index.js\n// module chunks = 0","\"use strict\";\n\n// Use the fastest means possible to execute a task in its own turn, with\n// priority over other events including IO, animation, reflow, and redraw\n// events in browsers.\n//\n// An exception thrown by a task will permanently interrupt the processing of\n// subsequent tasks. The higher level `asap` function ensures that if an\n// exception is thrown by a task, that the task queue will continue flushing as\n// soon as possible, but if you use `rawAsap` directly, you are responsible to\n// either ensure that no exceptions are thrown from your task, or to manually\n// call `rawAsap.requestFlush` if an exception is thrown.\nmodule.exports = rawAsap;\nfunction rawAsap(task) {\n if (!queue.length) {\n requestFlush();\n flushing = true;\n }\n // Equivalent to push, but avoids a function call.\n queue[queue.length] = task;\n}\n\nvar queue = [];\n// Once a flush has been requested, no further calls to `requestFlush` are\n// necessary until the next `flush` completes.\nvar flushing = false;\n// `requestFlush` is an implementation-specific method that attempts to kick\n// off a `flush` event as quickly as possible. `flush` will attempt to exhaust\n// the event queue before yielding to the browser's own event loop.\nvar requestFlush;\n// The position of the next task to execute in the task queue. This is\n// preserved between calls to `flush` so that it can be resumed if\n// a task throws an exception.\nvar index = 0;\n// If a task schedules additional tasks recursively, the task queue can grow\n// unbounded. To prevent memory exhaustion, the task queue will periodically\n// truncate already-completed tasks.\nvar capacity = 1024;\n\n// The flush function processes all tasks that have been scheduled with\n// `rawAsap` unless and until one of those tasks throws an exception.\n// If a task throws an exception, `flush` ensures that its state will remain\n// consistent and will resume where it left off when called again.\n// However, `flush` does not make any arrangements to be called again if an\n// exception is thrown.\nfunction flush() {\n while (index < queue.length) {\n var currentIndex = index;\n // Advance the index before calling the task. This ensures that we will\n // begin flushing on the next task the task throws an error.\n index = index + 1;\n queue[currentIndex].call();\n // Prevent leaking memory for long chains of recursive calls to `asap`.\n // If we call `asap` within tasks scheduled by `asap`, the queue will\n // grow, but to avoid an O(n) walk for every task we execute, we don't\n // shift tasks off the queue after they have been executed.\n // Instead, we periodically shift 1024 tasks off the queue.\n if (index > capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/asap/browser-raw.js\n// module id = ./node_modules/asap/browser-raw.js\n// module chunks = 0","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/escape-string-regexp/index.js\n// module id = ./node_modules/escape-string-regexp/index.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Upstream version of event listener. Does not take into account specific\n * nature of platform.\n */\nvar EventListener = {\n /**\n * Listen to DOM events during the bubble phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n listen: function listen(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, false);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, false);\n }\n };\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, callback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, callback);\n }\n };\n }\n },\n\n /**\n * Listen to DOM events during the capture phase.\n *\n * @param {DOMEventTarget} target DOM element to register listener on.\n * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.\n * @param {function} callback Callback function.\n * @return {object} Object with a `remove` method.\n */\n capture: function capture(target, eventType, callback) {\n if (target.addEventListener) {\n target.addEventListener(eventType, callback, true);\n return {\n remove: function remove() {\n target.removeEventListener(eventType, callback, true);\n }\n };\n } else {\n if (process.env.NODE_ENV !== 'production') {\n 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.');\n }\n return {\n remove: emptyFunction\n };\n }\n },\n\n registerDefault: function registerDefault() {}\n};\n\nmodule.exports = EventListener;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/EventListener.js\n// module id = ./node_modules/fbjs/lib/EventListener.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/ExecutionEnvironment.js\n// module id = ./node_modules/fbjs/lib/ExecutionEnvironment.js\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar _hyphenPattern = /-(.)/g;\n\n/**\n * Camelcases a hyphenated string, for example:\n *\n * > camelize('background-color')\n * < \"backgroundColor\"\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelize(string) {\n return string.replace(_hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n}\n\nmodule.exports = camelize;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/camelize.js\n// module id = ./node_modules/fbjs/lib/camelize.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar camelize = require('./camelize');\n\nvar msPattern = /^-ms-/;\n\n/**\n * Camelcases a hyphenated CSS property name, for example:\n *\n * > camelizeStyleName('background-color')\n * < \"backgroundColor\"\n * > camelizeStyleName('-moz-transition')\n * < \"MozTransition\"\n * > camelizeStyleName('-ms-transition')\n * < \"msTransition\"\n *\n * As Andi Smith suggests\n * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n * is converted to lowercase `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction camelizeStyleName(string) {\n return camelize(string.replace(msPattern, 'ms-'));\n}\n\nmodule.exports = camelizeStyleName;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/camelizeStyleName.js\n// module id = ./node_modules/fbjs/lib/camelizeStyleName.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nvar isTextNode = require('./isTextNode');\n\n/*eslint-disable no-bitwise */\n\n/**\n * Checks if a given DOM node contains or is another DOM node.\n */\nfunction containsNode(outerNode, innerNode) {\n if (!outerNode || !innerNode) {\n return false;\n } else if (outerNode === innerNode) {\n return true;\n } else if (isTextNode(outerNode)) {\n return false;\n } else if (isTextNode(innerNode)) {\n return containsNode(outerNode, innerNode.parentNode);\n } else if ('contains' in outerNode) {\n return outerNode.contains(innerNode);\n } else if (outerNode.compareDocumentPosition) {\n return !!(outerNode.compareDocumentPosition(innerNode) & 16);\n } else {\n return false;\n }\n}\n\nmodule.exports = containsNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/containsNode.js\n// module id = ./node_modules/fbjs/lib/containsNode.js\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyFunction.js\n// module id = ./node_modules/fbjs/lib/emptyFunction.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/emptyObject.js\n// module id = ./node_modules/fbjs/lib/emptyObject.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * @param {DOMElement} node input/textarea to focus\n */\n\nfunction focusNode(node) {\n // IE8 can throw \"Can't move focus to the control because it is invisible,\n // not enabled, or of a type that does not accept the focus.\" for all kinds of\n // reasons that are too expensive and fragile to test.\n try {\n node.focus();\n } catch (e) {}\n}\n\nmodule.exports = focusNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/focusNode.js\n// module id = ./node_modules/fbjs/lib/focusNode.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/* eslint-disable fb-www/typeof-undefined */\n\n/**\n * Same as document.activeElement but wraps in a try-catch block. In IE it is\n * not safe to call document.activeElement if there is nothing focused.\n *\n * The activeElement will be null only if the document or document body is not\n * yet defined.\n *\n * @param {?DOMDocument} doc Defaults to current document.\n * @return {?DOMElement}\n */\nfunction getActiveElement(doc) /*?DOMElement*/{\n doc = doc || (typeof document !== 'undefined' ? document : undefined);\n if (typeof doc === 'undefined') {\n return null;\n }\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\n\nmodule.exports = getActiveElement;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/getActiveElement.js\n// module id = ./node_modules/fbjs/lib/getActiveElement.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar _uppercasePattern = /([A-Z])/g;\n\n/**\n * Hyphenates a camelcased string, for example:\n *\n * > hyphenate('backgroundColor')\n * < \"background-color\"\n *\n * For CSS style names, use `hyphenateStyleName` instead which works properly\n * with all vendor prefixes, including `ms`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenate(string) {\n return string.replace(_uppercasePattern, '-$1').toLowerCase();\n}\n\nmodule.exports = hyphenate;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/hyphenate.js\n// module id = ./node_modules/fbjs/lib/hyphenate.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n'use strict';\n\nvar hyphenate = require('./hyphenate');\n\nvar msPattern = /^ms-/;\n\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n *\n * @param {string} string\n * @return {string}\n */\nfunction hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}\n\nmodule.exports = hyphenateStyleName;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/hyphenateStyleName.js\n// module id = ./node_modules/fbjs/lib/hyphenateStyleName.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/invariant.js\n// module id = ./node_modules/fbjs/lib/invariant.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM node.\n */\nfunction isNode(object) {\n var doc = object ? object.ownerDocument || object : document;\n var defaultView = doc.defaultView || window;\n return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));\n}\n\nmodule.exports = isNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/isNode.js\n// module id = ./node_modules/fbjs/lib/isNode.js\n// module chunks = 0","'use strict';\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n */\n\nvar isNode = require('./isNode');\n\n/**\n * @param {*} object The object to check.\n * @return {boolean} Whether or not the object is a DOM text node.\n */\nfunction isTextNode(object) {\n return isNode(object) && object.nodeType == 3;\n}\n\nmodule.exports = isTextNode;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/isTextNode.js\n// module id = ./node_modules/fbjs/lib/isTextNode.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n }\n\n // Test for A's keys different from B.\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = shallowEqual;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/shallowEqual.js\n// module id = ./node_modules/fbjs/lib/shallowEqual.js\n// module chunks = 0","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/fbjs/lib/warning.js\n// module id = ./node_modules/fbjs/lib/warning.js\n// module chunks = 0","'use strict';\nvar ansiRegex = require('ansi-regex');\nvar re = new RegExp(ansiRegex().source); // remove the `g` flag\nmodule.exports = re.test.bind(re);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/has-ansi/index.js\n// module id = ./node_modules/has-ansi/index.js\n// module chunks = 0","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/inherits/inherits_browser.js\n// module id = ./node_modules/inherits/inherits_browser.js\n// module chunks = 0","/*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */\n;(function () {\n // Detect the `define` function exposed by asynchronous module loaders. The\n // strict `define` check is necessary for compatibility with `r.js`.\n var isLoader = typeof define === \"function\" && define.amd;\n\n // A set of types used to distinguish objects from primitives.\n var objectTypes = {\n \"function\": true,\n \"object\": true\n };\n\n // Detect the `exports` object exposed by CommonJS implementations.\n var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;\n\n // Use the `global` object exposed by Node (including Browserify via\n // `insert-module-globals`), Narwhal, and Ringo as the default context,\n // and the `window` object in browsers. Rhino exports a `global` function\n // instead.\n var root = objectTypes[typeof window] && window || this,\n freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == \"object\" && global;\n\n if (freeGlobal && (freeGlobal[\"global\"] === freeGlobal || freeGlobal[\"window\"] === freeGlobal || freeGlobal[\"self\"] === freeGlobal)) {\n root = freeGlobal;\n }\n\n // Public: Initializes JSON 3 using the given `context` object, attaching the\n // `stringify` and `parse` functions to the specified `exports` object.\n function runInContext(context, exports) {\n context || (context = root[\"Object\"]());\n exports || (exports = root[\"Object\"]());\n\n // Native constructor aliases.\n var Number = context[\"Number\"] || root[\"Number\"],\n String = context[\"String\"] || root[\"String\"],\n Object = context[\"Object\"] || root[\"Object\"],\n Date = context[\"Date\"] || root[\"Date\"],\n SyntaxError = context[\"SyntaxError\"] || root[\"SyntaxError\"],\n TypeError = context[\"TypeError\"] || root[\"TypeError\"],\n Math = context[\"Math\"] || root[\"Math\"],\n nativeJSON = context[\"JSON\"] || root[\"JSON\"];\n\n // Delegate to the native `stringify` and `parse` implementations.\n if (typeof nativeJSON == \"object\" && nativeJSON) {\n exports.stringify = nativeJSON.stringify;\n exports.parse = nativeJSON.parse;\n }\n\n // Convenience aliases.\n var objectProto = Object.prototype,\n getClass = objectProto.toString,\n isProperty, forEach, undef;\n\n // Test the `Date#getUTC*` methods. Based on work by @Yaffle.\n var isExtended = new Date(-3509827334573292);\n try {\n // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical\n // results for certain dates in Opera >= 10.53.\n isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 &&\n // Safari < 2.0.2 stores the internal millisecond time value correctly,\n // but clips the values returned by the date methods to the range of\n // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]).\n isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708;\n } catch (exception) {}\n\n // Internal: Determines whether the native `JSON.stringify` and `parse`\n // implementations are spec-compliant. Based on work by Ken Snyder.\n function has(name) {\n if (has[name] !== undef) {\n // Return cached feature test result.\n return has[name];\n }\n var isSupported;\n if (name == \"bug-string-char-index\") {\n // IE <= 7 doesn't support accessing string characters using square\n // bracket notation. IE 8 only supports this for primitives.\n isSupported = \"a\"[0] != \"a\";\n } else if (name == \"json\") {\n // Indicates whether both `JSON.stringify` and `JSON.parse` are\n // supported.\n isSupported = has(\"json-stringify\") && has(\"json-parse\");\n } else {\n var value, serialized = '{\"a\":[1,true,false,null,\"\\\\u0000\\\\b\\\\n\\\\f\\\\r\\\\t\"]}';\n // Test `JSON.stringify`.\n if (name == \"json-stringify\") {\n var stringify = exports.stringify, stringifySupported = typeof stringify == \"function\" && isExtended;\n if (stringifySupported) {\n // A test function object with a custom `toJSON` method.\n (value = function () {\n return 1;\n }).toJSON = value;\n try {\n stringifySupported =\n // Firefox 3.1b1 and b2 serialize string, number, and boolean\n // primitives as object literals.\n stringify(0) === \"0\" &&\n // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object\n // literals.\n stringify(new Number()) === \"0\" &&\n stringify(new String()) == '\"\"' &&\n // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or\n // does not define a canonical JSON representation (this applies to\n // objects with `toJSON` properties as well, *unless* they are nested\n // within an object or array).\n stringify(getClass) === undef &&\n // IE 8 serializes `undefined` as `\"undefined\"`. Safari <= 5.1.7 and\n // FF 3.1b3 pass this test.\n stringify(undef) === undef &&\n // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s,\n // respectively, if the value is omitted entirely.\n stringify() === undef &&\n // FF 3.1b1, 2 throw an error if the given value is not a number,\n // string, array, object, Boolean, or `null` literal. This applies to\n // objects with custom `toJSON` methods as well, unless they are nested\n // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON`\n // methods entirely.\n stringify(value) === \"1\" &&\n stringify([value]) == \"[1]\" &&\n // Prototype <= 1.6.1 serializes `[undefined]` as `\"[]\"` instead of\n // `\"[null]\"`.\n stringify([undef]) == \"[null]\" &&\n // YUI 3.0.0b1 fails to serialize `null` literals.\n stringify(null) == \"null\" &&\n // FF 3.1b1, 2 halts serialization if an array contains a function:\n // `[1, true, getClass, 1]` serializes as \"[1,true,],\". FF 3.1b3\n // elides non-JSON values from objects and arrays, unless they\n // define custom `toJSON` methods.\n stringify([undef, getClass, null]) == \"[null,null,null]\" &&\n // Simple serialization test. FF 3.1b1 uses Unicode escape sequences\n // where character escape codes are expected (e.g., `\\b` => `\\u0008`).\n stringify({ \"a\": [value, true, false, null, \"\\x00\\b\\n\\f\\r\\t\"] }) == serialized &&\n // FF 3.1b1 and b2 ignore the `filter` and `width` arguments.\n stringify(null, value) === \"1\" &&\n stringify([1, 2], null, 1) == \"[\\n 1,\\n 2\\n]\" &&\n // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly\n // serialize extended years.\n stringify(new Date(-8.64e15)) == '\"-271821-04-20T00:00:00.000Z\"' &&\n // The milliseconds are optional in ES 5, but required in 5.1.\n stringify(new Date(8.64e15)) == '\"+275760-09-13T00:00:00.000Z\"' &&\n // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative\n // four-digit years instead of six-digit years. Credits: @Yaffle.\n stringify(new Date(-621987552e5)) == '\"-000001-01-01T00:00:00.000Z\"' &&\n // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond\n // values less than 1000. Credits: @Yaffle.\n stringify(new Date(-1)) == '\"1969-12-31T23:59:59.999Z\"';\n } catch (exception) {\n stringifySupported = false;\n }\n }\n isSupported = stringifySupported;\n }\n // Test `JSON.parse`.\n if (name == \"json-parse\") {\n var parse = exports.parse;\n if (typeof parse == \"function\") {\n try {\n // FF 3.1b1, b2 will throw an exception if a bare literal is provided.\n // Conforming implementations should also coerce the initial argument to\n // a string prior to parsing.\n if (parse(\"0\") === 0 && !parse(false)) {\n // Simple parsing test.\n value = parse(serialized);\n var parseSupported = value[\"a\"].length == 5 && value[\"a\"][0] === 1;\n if (parseSupported) {\n try {\n // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings.\n parseSupported = !parse('\"\\t\"');\n } catch (exception) {}\n if (parseSupported) {\n try {\n // FF 4.0 and 4.0.1 allow leading `+` signs and leading\n // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow\n // certain octal literals.\n parseSupported = parse(\"01\") !== 1;\n } catch (exception) {}\n }\n if (parseSupported) {\n try {\n // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal\n // points. These environments, along with FF 3.1b1 and 2,\n // also allow trailing commas in JSON objects and arrays.\n parseSupported = parse(\"1.\") !== 1;\n } catch (exception) {}\n }\n }\n }\n } catch (exception) {\n parseSupported = false;\n }\n }\n isSupported = parseSupported;\n }\n }\n return has[name] = !!isSupported;\n }\n\n if (!has(\"json\")) {\n // Common `[[Class]]` name aliases.\n var functionClass = \"[object Function]\",\n dateClass = \"[object Date]\",\n numberClass = \"[object Number]\",\n stringClass = \"[object String]\",\n arrayClass = \"[object Array]\",\n booleanClass = \"[object Boolean]\";\n\n // Detect incomplete support for accessing string characters by index.\n var charIndexBuggy = has(\"bug-string-char-index\");\n\n // Define additional utility methods if the `Date` methods are buggy.\n if (!isExtended) {\n var floor = Math.floor;\n // A mapping between the months of the year and the number of days between\n // January 1st and the first of the respective month.\n var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n // Internal: Calculates the number of days between the Unix epoch and the\n // first day of the given month.\n var getDay = function (year, month) {\n return Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400);\n };\n }\n\n // Internal: Determines if a property is a direct property of the given\n // object. Delegates to the native `Object#hasOwnProperty` method.\n if (!(isProperty = objectProto.hasOwnProperty)) {\n isProperty = function (property) {\n var members = {}, constructor;\n if ((members.__proto__ = null, members.__proto__ = {\n // The *proto* property cannot be set multiple times in recent\n // versions of Firefox and SeaMonkey.\n \"toString\": 1\n }, members).toString != getClass) {\n // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but\n // supports the mutable *proto* property.\n isProperty = function (property) {\n // Capture and break the object's prototype chain (see section 8.6.2\n // of the ES 5.1 spec). The parenthesized expression prevents an\n // unsafe transformation by the Closure Compiler.\n var original = this.__proto__, result = property in (this.__proto__ = null, this);\n // Restore the original prototype chain.\n this.__proto__ = original;\n return result;\n };\n } else {\n // Capture a reference to the top-level `Object` constructor.\n constructor = members.constructor;\n // Use the `constructor` property to simulate `Object#hasOwnProperty` in\n // other environments.\n isProperty = function (property) {\n var parent = (this.constructor || constructor).prototype;\n return property in this && !(property in parent && this[property] === parent[property]);\n };\n }\n members = null;\n return isProperty.call(this, property);\n };\n }\n\n // Internal: Normalizes the `for...in` iteration algorithm across\n // environments. Each enumerated key is yielded to a `callback` function.\n forEach = function (object, callback) {\n var size = 0, Properties, members, property;\n\n // Tests for bugs in the current environment's `for...in` algorithm. The\n // `valueOf` property inherits the non-enumerable flag from\n // `Object.prototype` in older versions of IE, Netscape, and Mozilla.\n (Properties = function () {\n this.valueOf = 0;\n }).prototype.valueOf = 0;\n\n // Iterate over a new instance of the `Properties` class.\n members = new Properties();\n for (property in members) {\n // Ignore all properties inherited from `Object.prototype`.\n if (isProperty.call(members, property)) {\n size++;\n }\n }\n Properties = members = null;\n\n // Normalize the iteration algorithm.\n if (!size) {\n // A list of non-enumerable properties inherited from `Object.prototype`.\n members = [\"valueOf\", \"toString\", \"toLocaleString\", \"propertyIsEnumerable\", \"isPrototypeOf\", \"hasOwnProperty\", \"constructor\"];\n // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable\n // properties.\n forEach = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, length;\n var hasProperty = !isFunction && typeof object.constructor != \"function\" && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty || isProperty;\n for (property in object) {\n // Gecko <= 1.0 enumerates the `prototype` property of functions under\n // certain conditions; IE does not.\n if (!(isFunction && property == \"prototype\") && hasProperty.call(object, property)) {\n callback(property);\n }\n }\n // Manually invoke the callback for each non-enumerable property.\n for (length = members.length; property = members[--length]; hasProperty.call(object, property) && callback(property));\n };\n } else if (size == 2) {\n // Safari <= 2.0.4 enumerates shadowed properties twice.\n forEach = function (object, callback) {\n // Create a set of iterated properties.\n var members = {}, isFunction = getClass.call(object) == functionClass, property;\n for (property in object) {\n // Store each property name to prevent double enumeration. The\n // `prototype` property of functions is not enumerated due to cross-\n // environment inconsistencies.\n if (!(isFunction && property == \"prototype\") && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property)) {\n callback(property);\n }\n }\n };\n } else {\n // No bugs detected; use the standard `for...in` algorithm.\n forEach = function (object, callback) {\n var isFunction = getClass.call(object) == functionClass, property, isConstructor;\n for (property in object) {\n if (!(isFunction && property == \"prototype\") && isProperty.call(object, property) && !(isConstructor = property === \"constructor\")) {\n callback(property);\n }\n }\n // Manually invoke the callback for the `constructor` property due to\n // cross-environment inconsistencies.\n if (isConstructor || isProperty.call(object, (property = \"constructor\"))) {\n callback(property);\n }\n };\n }\n return forEach(object, callback);\n };\n\n // Public: Serializes a JavaScript `value` as a JSON string. The optional\n // `filter` argument may specify either a function that alters how object and\n // array members are serialized, or an array of strings and numbers that\n // indicates which properties should be serialized. The optional `width`\n // argument may be either a string or number that specifies the indentation\n // level of the output.\n if (!has(\"json-stringify\")) {\n // Internal: A map of control characters and their escaped equivalents.\n var Escapes = {\n 92: \"\\\\\\\\\",\n 34: '\\\\\"',\n 8: \"\\\\b\",\n 12: \"\\\\f\",\n 10: \"\\\\n\",\n 13: \"\\\\r\",\n 9: \"\\\\t\"\n };\n\n // Internal: Converts `value` into a zero-padded string such that its\n // length is at least equal to `width`. The `width` must be <= 6.\n var leadingZeroes = \"000000\";\n var toPaddedString = function (width, value) {\n // The `|| 0` expression is necessary to work around a bug in\n // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== \"0\"`.\n return (leadingZeroes + (value || 0)).slice(-width);\n };\n\n // Internal: Double-quotes a string `value`, replacing all ASCII control\n // characters (characters with code unit values between 0 and 31) with\n // their escaped equivalents. This is an implementation of the\n // `Quote(value)` operation defined in ES 5.1 section 15.12.3.\n var unicodePrefix = \"\\\\u00\";\n var quote = function (value) {\n var result = '\"', index = 0, length = value.length, useCharIndex = !charIndexBuggy || length > 10;\n var symbols = useCharIndex && (charIndexBuggy ? value.split(\"\") : value);\n for (; index < length; index++) {\n var charCode = value.charCodeAt(index);\n // If the character is a control character, append its Unicode or\n // shorthand escape sequence; otherwise, append the character as-is.\n switch (charCode) {\n case 8: case 9: case 10: case 12: case 13: case 34: case 92:\n result += Escapes[charCode];\n break;\n default:\n if (charCode < 32) {\n result += unicodePrefix + toPaddedString(2, charCode.toString(16));\n break;\n }\n result += useCharIndex ? symbols[index] : value.charAt(index);\n }\n }\n return result + '\"';\n };\n\n // Internal: Recursively serializes an object. Implements the\n // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations.\n var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {\n var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result;\n try {\n // Necessary for host object support.\n value = object[property];\n } catch (exception) {}\n if (typeof value == \"object\" && value) {\n className = getClass.call(value);\n if (className == dateClass && !isProperty.call(value, \"toJSON\")) {\n if (value > -1 / 0 && value < 1 / 0) {\n // Dates are serialized according to the `Date#toJSON` method\n // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15\n // for the ISO 8601 date time string format.\n if (getDay) {\n // Manually compute the year, month, date, hours, minutes,\n // seconds, and milliseconds if the `getUTC*` methods are\n // buggy. Adapted from @Yaffle's `date-shim` project.\n date = floor(value / 864e5);\n for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++);\n for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++);\n date = 1 + date - getDay(year, month);\n // The `time` value specifies the time within the day (see ES\n // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used\n // to compute `A modulo B`, as the `%` operator does not\n // correspond to the `modulo` operation for negative numbers.\n time = (value % 864e5 + 864e5) % 864e5;\n // The hours, minutes, seconds, and milliseconds are obtained by\n // decomposing the time within the day. See section 15.9.1.10.\n hours = floor(time / 36e5) % 24;\n minutes = floor(time / 6e4) % 60;\n seconds = floor(time / 1e3) % 60;\n milliseconds = time % 1e3;\n } else {\n year = value.getUTCFullYear();\n month = value.getUTCMonth();\n date = value.getUTCDate();\n hours = value.getUTCHours();\n minutes = value.getUTCMinutes();\n seconds = value.getUTCSeconds();\n milliseconds = value.getUTCMilliseconds();\n }\n // Serialize extended years correctly.\n value = (year <= 0 || year >= 1e4 ? (year < 0 ? \"-\" : \"+\") + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) +\n \"-\" + toPaddedString(2, month + 1) + \"-\" + toPaddedString(2, date) +\n // Months, dates, hours, minutes, and seconds should have two\n // digits; milliseconds should have three.\n \"T\" + toPaddedString(2, hours) + \":\" + toPaddedString(2, minutes) + \":\" + toPaddedString(2, seconds) +\n // Milliseconds are optional in ES 5.0, but required in 5.1.\n \".\" + toPaddedString(3, milliseconds) + \"Z\";\n } else {\n value = null;\n }\n } else if (typeof value.toJSON == \"function\" && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, \"toJSON\"))) {\n // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the\n // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3\n // ignores all `toJSON` methods on these objects unless they are\n // defined directly on an instance.\n value = value.toJSON(property);\n }\n }\n if (callback) {\n // If a replacement function was provided, call it to obtain the value\n // for serialization.\n value = callback.call(object, property, value);\n }\n if (value === null) {\n return \"null\";\n }\n className = getClass.call(value);\n if (className == booleanClass) {\n // Booleans are represented literally.\n return \"\" + value;\n } else if (className == numberClass) {\n // JSON numbers must be finite. `Infinity` and `NaN` are serialized as\n // `\"null\"`.\n return value > -1 / 0 && value < 1 / 0 ? \"\" + value : \"null\";\n } else if (className == stringClass) {\n // Strings are double-quoted and escaped.\n return quote(\"\" + value);\n }\n // Recursively serialize objects and arrays.\n if (typeof value == \"object\") {\n // Check for cyclic structures. This is a linear search; performance\n // is inversely proportional to the number of unique nested objects.\n for (length = stack.length; length--;) {\n if (stack[length] === value) {\n // Cyclic structures cannot be serialized by `JSON.stringify`.\n throw TypeError();\n }\n }\n // Add the object to the stack of traversed objects.\n stack.push(value);\n results = [];\n // Save the current indentation level and indent one additional level.\n prefix = indentation;\n indentation += whitespace;\n if (className == arrayClass) {\n // Recursively serialize array elements.\n for (index = 0, length = value.length; index < length; index++) {\n element = serialize(index, value, callback, properties, whitespace, indentation, stack);\n results.push(element === undef ? \"null\" : element);\n }\n result = results.length ? (whitespace ? \"[\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"]\" : (\"[\" + results.join(\",\") + \"]\")) : \"[]\";\n } else {\n // Recursively serialize object members. Members are selected from\n // either a user-specified list of property names, or the object\n // itself.\n forEach(properties || value, function (property) {\n var element = serialize(property, value, callback, properties, whitespace, indentation, stack);\n if (element !== undef) {\n // According to ES 5.1 section 15.12.3: \"If `gap` {whitespace}\n // is not the empty string, let `member` {quote(property) + \":\"}\n // be the concatenation of `member` and the `space` character.\"\n // The \"`space` character\" refers to the literal space\n // character, not the `space` {width} argument provided to\n // `JSON.stringify`.\n results.push(quote(property) + \":\" + (whitespace ? \" \" : \"\") + element);\n }\n });\n result = results.length ? (whitespace ? \"{\\n\" + indentation + results.join(\",\\n\" + indentation) + \"\\n\" + prefix + \"}\" : (\"{\" + results.join(\",\") + \"}\")) : \"{}\";\n }\n // Remove the object from the traversed object stack.\n stack.pop();\n return result;\n }\n };\n\n // Public: `JSON.stringify`. See ES 5.1 section 15.12.3.\n exports.stringify = function (source, filter, width) {\n var whitespace, callback, properties, className;\n if (objectTypes[typeof filter] && filter) {\n if ((className = getClass.call(filter)) == functionClass) {\n callback = filter;\n } else if (className == arrayClass) {\n // Convert the property names array into a makeshift set.\n properties = {};\n for (var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1));\n }\n }\n if (width) {\n if ((className = getClass.call(width)) == numberClass) {\n // Convert the `width` to an integer and create a string containing\n // `width` number of space characters.\n if ((width -= width % 1) > 0) {\n for (whitespace = \"\", width > 10 && (width = 10); whitespace.length < width; whitespace += \" \");\n }\n } else if (className == stringClass) {\n whitespace = width.length <= 10 ? width : width.slice(0, 10);\n }\n }\n // Opera <= 7.54u2 discards the values associated with empty string keys\n // (`\"\"`) only if they are used directly within an object member list\n // (e.g., `!(\"\" in { \"\": 1})`).\n return serialize(\"\", (value = {}, value[\"\"] = source, value), callback, properties, whitespace, \"\", []);\n };\n }\n\n // Public: Parses a JSON source string.\n if (!has(\"json-parse\")) {\n var fromCharCode = String.fromCharCode;\n\n // Internal: A map of escaped control characters and their unescaped\n // equivalents.\n var Unescapes = {\n 92: \"\\\\\",\n 34: '\"',\n 47: \"/\",\n 98: \"\\b\",\n 116: \"\\t\",\n 110: \"\\n\",\n 102: \"\\f\",\n 114: \"\\r\"\n };\n\n // Internal: Stores the parser state.\n var Index, Source;\n\n // Internal: Resets the parser state and throws a `SyntaxError`.\n var abort = function () {\n Index = Source = null;\n throw SyntaxError();\n };\n\n // Internal: Returns the next token, or `\"$\"` if the parser has reached\n // the end of the source string. A token may be a string, number, `null`\n // literal, or Boolean literal.\n var lex = function () {\n var source = Source, length = source.length, value, begin, position, isSigned, charCode;\n while (Index < length) {\n charCode = source.charCodeAt(Index);\n switch (charCode) {\n case 9: case 10: case 13: case 32:\n // Skip whitespace tokens, including tabs, carriage returns, line\n // feeds, and space characters.\n Index++;\n break;\n case 123: case 125: case 91: case 93: case 58: case 44:\n // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at\n // the current position.\n value = charIndexBuggy ? source.charAt(Index) : source[Index];\n Index++;\n return value;\n case 34:\n // `\"` delimits a JSON string; advance to the next character and\n // begin parsing the string. String tokens are prefixed with the\n // sentinel `@` character to distinguish them from punctuators and\n // end-of-string tokens.\n for (value = \"@\", Index++; Index < length;) {\n charCode = source.charCodeAt(Index);\n if (charCode < 32) {\n // Unescaped ASCII control characters (those with a code unit\n // less than the space character) are not permitted.\n abort();\n } else if (charCode == 92) {\n // A reverse solidus (`\\`) marks the beginning of an escaped\n // control character (including `\"`, `\\`, and `/`) or Unicode\n // escape sequence.\n charCode = source.charCodeAt(++Index);\n switch (charCode) {\n case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114:\n // Revive escaped control characters.\n value += Unescapes[charCode];\n Index++;\n break;\n case 117:\n // `\\u` marks the beginning of a Unicode escape sequence.\n // Advance to the first character and validate the\n // four-digit code point.\n begin = ++Index;\n for (position = Index + 4; Index < position; Index++) {\n charCode = source.charCodeAt(Index);\n // A valid sequence comprises four hexdigits (case-\n // insensitive) that form a single hexadecimal value.\n if (!(charCode >= 48 && charCode <= 57 || charCode >= 97 && charCode <= 102 || charCode >= 65 && charCode <= 70)) {\n // Invalid Unicode escape sequence.\n abort();\n }\n }\n // Revive the escaped character.\n value += fromCharCode(\"0x\" + source.slice(begin, Index));\n break;\n default:\n // Invalid escape sequence.\n abort();\n }\n } else {\n if (charCode == 34) {\n // An unescaped double-quote character marks the end of the\n // string.\n break;\n }\n charCode = source.charCodeAt(Index);\n begin = Index;\n // Optimize for the common case where a string is valid.\n while (charCode >= 32 && charCode != 92 && charCode != 34) {\n charCode = source.charCodeAt(++Index);\n }\n // Append the string as-is.\n value += source.slice(begin, Index);\n }\n }\n if (source.charCodeAt(Index) == 34) {\n // Advance to the next character and return the revived string.\n Index++;\n return value;\n }\n // Unterminated string.\n abort();\n default:\n // Parse numbers and literals.\n begin = Index;\n // Advance past the negative sign, if one is specified.\n if (charCode == 45) {\n isSigned = true;\n charCode = source.charCodeAt(++Index);\n }\n // Parse an integer or floating-point value.\n if (charCode >= 48 && charCode <= 57) {\n // Leading zeroes are interpreted as octal literals.\n if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) {\n // Illegal octal literal.\n abort();\n }\n isSigned = false;\n // Parse the integer component.\n for (; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++);\n // Floats cannot contain a leading decimal point; however, this\n // case is already accounted for by the parser.\n if (source.charCodeAt(Index) == 46) {\n position = ++Index;\n // Parse the decimal component.\n for (; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n if (position == Index) {\n // Illegal trailing decimal.\n abort();\n }\n Index = position;\n }\n // Parse exponents. The `e` denoting the exponent is\n // case-insensitive.\n charCode = source.charCodeAt(Index);\n if (charCode == 101 || charCode == 69) {\n charCode = source.charCodeAt(++Index);\n // Skip past the sign following the exponent, if one is\n // specified.\n if (charCode == 43 || charCode == 45) {\n Index++;\n }\n // Parse the exponential component.\n for (position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++);\n if (position == Index) {\n // Illegal empty exponent.\n abort();\n }\n Index = position;\n }\n // Coerce the parsed value to a JavaScript number.\n return +source.slice(begin, Index);\n }\n // A negative sign may only precede numbers.\n if (isSigned) {\n abort();\n }\n // `true`, `false`, and `null` literals.\n if (source.slice(Index, Index + 4) == \"true\") {\n Index += 4;\n return true;\n } else if (source.slice(Index, Index + 5) == \"false\") {\n Index += 5;\n return false;\n } else if (source.slice(Index, Index + 4) == \"null\") {\n Index += 4;\n return null;\n }\n // Unrecognized token.\n abort();\n }\n }\n // Return the sentinel `$` character if the parser has reached the end\n // of the source string.\n return \"$\";\n };\n\n // Internal: Parses a JSON `value` token.\n var get = function (value) {\n var results, hasMembers;\n if (value == \"$\") {\n // Unexpected end of input.\n abort();\n }\n if (typeof value == \"string\") {\n if ((charIndexBuggy ? value.charAt(0) : value[0]) == \"@\") {\n // Remove the sentinel `@` character.\n return value.slice(1);\n }\n // Parse object and array literals.\n if (value == \"[\") {\n // Parses a JSON array, returning a new JavaScript array.\n results = [];\n for (;; hasMembers || (hasMembers = true)) {\n value = lex();\n // A closing square bracket marks the end of the array literal.\n if (value == \"]\") {\n break;\n }\n // If the array literal contains elements, the current token\n // should be a comma separating the previous element from the\n // next.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"]\") {\n // Unexpected trailing `,` in array literal.\n abort();\n }\n } else {\n // A `,` must separate each array element.\n abort();\n }\n }\n // Elisions and leading commas are not permitted.\n if (value == \",\") {\n abort();\n }\n results.push(get(value));\n }\n return results;\n } else if (value == \"{\") {\n // Parses a JSON object, returning a new JavaScript object.\n results = {};\n for (;; hasMembers || (hasMembers = true)) {\n value = lex();\n // A closing curly brace marks the end of the object literal.\n if (value == \"}\") {\n break;\n }\n // If the object literal contains members, the current token\n // should be a comma separator.\n if (hasMembers) {\n if (value == \",\") {\n value = lex();\n if (value == \"}\") {\n // Unexpected trailing `,` in object literal.\n abort();\n }\n } else {\n // A `,` must separate each object member.\n abort();\n }\n }\n // Leading commas are not permitted, object property names must be\n // double-quoted strings, and a `:` must separate each property\n // name and value.\n if (value == \",\" || typeof value != \"string\" || (charIndexBuggy ? value.charAt(0) : value[0]) != \"@\" || lex() != \":\") {\n abort();\n }\n results[value.slice(1)] = get(lex());\n }\n return results;\n }\n // Unexpected token encountered.\n abort();\n }\n return value;\n };\n\n // Internal: Updates a traversed object member.\n var update = function (source, property, callback) {\n var element = walk(source, property, callback);\n if (element === undef) {\n delete source[property];\n } else {\n source[property] = element;\n }\n };\n\n // Internal: Recursively traverses a parsed JSON object, invoking the\n // `callback` function for each value. This is an implementation of the\n // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2.\n var walk = function (source, property, callback) {\n var value = source[property], length;\n if (typeof value == \"object\" && value) {\n // `forEach` can't be used to traverse an array in Opera <= 8.54\n // because its `Object#hasOwnProperty` implementation returns `false`\n // for array indices (e.g., `![1, 2, 3].hasOwnProperty(\"0\")`).\n if (getClass.call(value) == arrayClass) {\n for (length = value.length; length--;) {\n update(value, length, callback);\n }\n } else {\n forEach(value, function (property) {\n update(value, property, callback);\n });\n }\n }\n return callback.call(source, property, value);\n };\n\n // Public: `JSON.parse`. See ES 5.1 section 15.12.2.\n exports.parse = function (source, callback) {\n var result, value;\n Index = 0;\n Source = \"\" + source;\n result = get(lex());\n // If a JSON string contains multiple tokens, it is invalid.\n if (lex() != \"$\") {\n abort();\n }\n // Reset the parser state.\n Index = Source = null;\n return callback && getClass.call(callback) == functionClass ? walk((value = {}, value[\"\"] = result, value), \"\", callback) : result;\n };\n }\n }\n\n exports[\"runInContext\"] = runInContext;\n return exports;\n }\n\n if (freeExports && !isLoader) {\n // Export for CommonJS environments.\n runInContext(root, freeExports);\n } else {\n // Export for web browsers and JavaScript engines.\n var nativeJSON = root.JSON,\n previousJSON = root[\"JSON3\"],\n isRestored = false;\n\n var JSON3 = runInContext(root, (root[\"JSON3\"] = {\n // Public: Restores the original value of the global `JSON` object and\n // returns a reference to the `JSON3` object.\n \"noConflict\": function () {\n if (!isRestored) {\n isRestored = true;\n root.JSON = nativeJSON;\n root[\"JSON3\"] = previousJSON;\n nativeJSON = previousJSON = null;\n }\n return JSON3;\n }\n }));\n\n root.JSON = {\n \"parse\": JSON3.parse,\n \"stringify\": JSON3.stringify\n };\n }\n\n // Export for asynchronous module loaders.\n if (isLoader) {\n define(function () {\n return JSON3;\n });\n }\n}).call(this);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/json3/lib/json3.js\n// module id = ./node_modules/json3/lib/json3.js\n// module chunks = 0","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/ms/index.js\n// module id = ./node_modules/ms/index.js\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/object-assign/index.js\n// module id = ./node_modules/object-assign/index.js\n// module chunks = 0","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/process/browser.js\n// module id = ./node_modules/process/browser.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/checkPropTypes.js\n// module id = ./node_modules/prop-types/checkPropTypes.js\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = ./node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module chunks = 0","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/punycode/punycode.js\n// module id = ./node_modules/punycode/punycode.js\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/querystring-es3/decode.js\n// module id = ./node_modules/querystring-es3/decode.js\n// module chunks = 0","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/querystring-es3/encode.js\n// module id = ./node_modules/querystring-es3/encode.js\n// module chunks = 0","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/querystring-es3/index.js\n// module id = ./node_modules/querystring-es3/index.js\n// module chunks = 0","/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n// WARNING: this code is untranspiled and is used in browser too.\n// Please make sure any changes are in ES5 or contribute a Babel compile step.\n\n// Some custom utilities to prettify Webpack output.\n// This is quite hacky and hopefully won't be needed when Webpack fixes this.\n// https://github.com/webpack/webpack/issues/2878\n\nvar chalk = require('chalk');\nvar friendlySyntaxErrorLabel = 'Syntax error:';\n\nfunction isLikelyASyntaxError(message) {\n return message.indexOf(friendlySyntaxErrorLabel) !== -1;\n}\n\n// Cleans up webpack error messages.\n// eslint-disable-next-line no-unused-vars\nfunction formatMessage(message, isError) {\n var lines = message.split('\\n');\n\n if (lines.length > 2 && lines[1] === '') {\n // Remove extra newline.\n lines.splice(1, 1);\n }\n\n // Remove webpack-specific loader notation from filename.\n // Before:\n // ./~/css-loader!./~/postcss-loader!./src/App.css\n // After:\n // ./src/App.css\n if (lines[0].lastIndexOf('!') !== -1) {\n lines[0] = lines[0].substr(lines[0].lastIndexOf('!') + 1);\n }\n\n lines = lines.filter(function(line) {\n // Webpack adds a list of entry points to warning messages:\n // @ ./src/index.js\n // @ multi react-scripts/~/react-dev-utils/webpackHotDevClient.js ...\n // It is misleading (and unrelated to the warnings) so we clean it up.\n // It is only useful for syntax errors but we have beautiful frames for them.\n return line.indexOf(' @ ') !== 0;\n });\n\n // line #0 is filename\n // line #1 is the main error message\n if (!lines[0] || !lines[1]) {\n return lines.join('\\n');\n }\n\n // Cleans up verbose \"module not found\" messages for files and packages.\n if (lines[1].indexOf('Module not found: ') === 0) {\n lines = [\n lines[0],\n // Clean up message because \"Module not found: \" is descriptive enough.\n lines[1]\n .replace(\"Cannot resolve 'file' or 'directory' \", '')\n .replace('Cannot resolve module ', '')\n .replace('Error: ', '')\n .replace('[CaseSensitivePathsPlugin] ', ''),\n ];\n }\n\n // Cleans up syntax error messages.\n if (lines[1].indexOf('Module build failed: ') === 0) {\n lines[1] = lines[1].replace(\n 'Module build failed: SyntaxError:',\n friendlySyntaxErrorLabel\n );\n }\n\n // Clean up export errors.\n // TODO: we should really send a PR to Webpack for this.\n var exportError = /\\s*(.+?)\\s*(\")?export '(.+?)' was not found in '(.+?)'/;\n if (lines[1].match(exportError)) {\n lines[1] = lines[1].replace(\n exportError,\n \"$1 '$4' does not contain an export named '$3'.\"\n );\n }\n\n lines[0] = chalk.inverse(lines[0]);\n\n // Reassemble the message.\n message = lines.join('\\n');\n // Internal stacks are generally useless so we strip them... with the\n // exception of stacks containing `webpack:` because they're normally\n // from user code generated by WebPack. For more information see\n // https://github.com/facebookincubator/create-react-app/pull/1050\n message = message.replace(\n /^\\s*at\\s((?!webpack:).)*:\\d+:\\d+[\\s)]*(\\n|$)/gm,\n ''\n ); // at ... ...:x:y\n\n return message.trim();\n}\n\nfunction formatWebpackMessages(json) {\n var formattedErrors = json.errors.map(function(message) {\n return formatMessage(message, true);\n });\n var formattedWarnings = json.warnings.map(function(message) {\n return formatMessage(message, false);\n });\n var result = {\n errors: formattedErrors,\n warnings: formattedWarnings,\n };\n if (result.errors.some(isLikelyASyntaxError)) {\n // If there are any syntax errors, show just them.\n // This prevents a confusing ESLint parsing error\n // preceding a much more useful Babel syntax error.\n result.errors = result.errors.filter(isLikelyASyntaxError);\n }\n return result;\n}\n\nmodule.exports = formatWebpackMessages;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-dev-utils/formatWebpackMessages.js\n// module id = ./node_modules/react-dev-utils/formatWebpackMessages.js\n// module chunks = 0","/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n\n// TODO: we might want to make this injectable to support DEV-time non-root URLs.\nmodule.exports = '/__open-stack-frame-in-editor';\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-dev-utils/launchEditorEndpoint.js\n// module id = ./node_modules/react-dev-utils/launchEditorEndpoint.js\n// module chunks = 0","'use strict';\nvar escapeStringRegexp = require('escape-string-regexp');\nvar ansiStyles = require('ansi-styles');\nvar stripAnsi = require('strip-ansi');\nvar hasAnsi = require('has-ansi');\nvar supportsColor = require('supports-color');\nvar defineProps = Object.defineProperties;\nvar isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);\n\nfunction Chalk(options) {\n\t// detect mode if not set manually\n\tthis.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;\n}\n\n// use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001b[94m';\n}\n\nvar styles = (function () {\n\tvar ret = {};\n\n\tObject.keys(ansiStyles).forEach(function (key) {\n\t\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\t\tret[key] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, this._styles.concat(key));\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n})();\n\nvar proto = defineProps(function chalk() {}, styles);\n\nfunction build(_styles) {\n\tvar builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder.enabled = this.enabled;\n\t// __proto__ is used because we must return a function, but there is\n\t// no way to create a function with a different prototype.\n\t/* eslint-disable no-proto */\n\tbuilder.__proto__ = proto;\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// support varags, but simply cast to string in case there's only one arg\n\tvar args = arguments;\n\tvar argsLen = args.length;\n\tvar str = argsLen !== 0 && String(arguments[0]);\n\n\tif (argsLen > 1) {\n\t\t// don't slice `arguments`, it prevents v8 optimizations\n\t\tfor (var a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || !str) {\n\t\treturn str;\n\t}\n\n\tvar nestedStyles = this._styles;\n\tvar i = nestedStyles.length;\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tvar originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\twhile (i--) {\n\t\tvar code = ansiStyles[nestedStyles[i]];\n\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\t}\n\n\t// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction init() {\n\tvar ret = {};\n\n\tObject.keys(styles).forEach(function (name) {\n\t\tret[name] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, [name]);\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n}\n\ndefineProps(Chalk.prototype, init());\n\nmodule.exports = new Chalk();\nmodule.exports.styles = ansiStyles;\nmodule.exports.hasColor = hasAnsi;\nmodule.exports.stripColor = stripAnsi;\nmodule.exports.supportsColor = supportsColor;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-dev-utils/node_modules/chalk/index.js\n// module id = ./node_modules/react-dev-utils/node_modules/chalk/index.js\n// module chunks = 0","'use strict';\nvar ansiRegex = require('ansi-regex')();\n\nmodule.exports = function (str) {\n\treturn typeof str === 'string' ? str.replace(ansiRegex, '') : str;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-dev-utils/node_modules/strip-ansi/index.js\n// module id = ./node_modules/react-dev-utils/node_modules/strip-ansi/index.js\n// module chunks = 0","/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n// This alternative WebpackDevServer combines the functionality of:\n// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js\n// https://github.com/webpack/webpack/blob/webpack-1/hot/dev-server.js\n\n// It only supports their simplest configuration (hot updates on same server).\n// It makes some opinionated choices on top, like adding a syntax error overlay\n// that looks similar to our console output. The error overlay is inspired by:\n// https://github.com/glenjamin/webpack-hot-middleware\n\nvar SockJS = require('sockjs-client');\nvar stripAnsi = require('strip-ansi');\nvar url = require('url');\nvar launchEditorEndpoint = require('./launchEditorEndpoint');\nvar formatWebpackMessages = require('./formatWebpackMessages');\nvar ErrorOverlay = require('react-error-overlay');\n\nErrorOverlay.setEditorHandler(function editorHandler(errorLocation) {\n // Keep this sync with errorOverlayMiddleware.js\n fetch(\n launchEditorEndpoint +\n '?fileName=' +\n window.encodeURIComponent(errorLocation.fileName) +\n '&lineNumber=' +\n window.encodeURIComponent(errorLocation.lineNumber || 1)\n );\n});\n\n// We need to keep track of if there has been a runtime error.\n// Essentially, we cannot guarantee application state was not corrupted by the\n// runtime error. To prevent confusing behavior, we forcibly reload the entire\n// application. This is handled below when we are notified of a compile (code\n// change).\n// See https://github.com/facebookincubator/create-react-app/issues/3096\nvar hadRuntimeError = false;\nErrorOverlay.startReportingRuntimeErrors({\n onError: function() {\n hadRuntimeError = true;\n },\n filename: '/static/js/bundle.js',\n});\n\nif (module.hot && typeof module.hot.dispose === 'function') {\n module.hot.dispose(function() {\n // TODO: why do we need this?\n ErrorOverlay.stopReportingRuntimeErrors();\n });\n}\n\n// Connect to WebpackDevServer via a socket.\nvar connection = new SockJS(\n url.format({\n protocol: window.location.protocol,\n hostname: window.location.hostname,\n port: window.location.port,\n // Hardcoded in WebpackDevServer\n pathname: '/sockjs-node',\n })\n);\n\n// Unlike WebpackDevServer client, we won't try to reconnect\n// to avoid spamming the console. Disconnect usually happens\n// when developer stops the server.\nconnection.onclose = function() {\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\n console.info(\n 'The development server has disconnected.\\nRefresh the page if necessary.'\n );\n }\n};\n\n// Remember some state related to hot module replacement.\nvar isFirstCompilation = true;\nvar mostRecentCompilationHash = null;\nvar hasCompileErrors = false;\n\nfunction clearOutdatedErrors() {\n // Clean up outdated compile errors, if any.\n if (typeof console !== 'undefined' && typeof console.clear === 'function') {\n if (hasCompileErrors) {\n console.clear();\n }\n }\n}\n\n// Successful compilation.\nfunction handleSuccess() {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onHotUpdateSuccess() {\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n ErrorOverlay.dismissBuildError();\n });\n }\n}\n\n// Compilation with warnings (e.g. ESLint).\nfunction handleWarnings(warnings) {\n clearOutdatedErrors();\n\n var isHotUpdate = !isFirstCompilation;\n isFirstCompilation = false;\n hasCompileErrors = false;\n\n function printWarnings() {\n // Print warnings to the console.\n var formatted = formatWebpackMessages({\n warnings: warnings,\n errors: [],\n });\n\n if (typeof console !== 'undefined' && typeof console.warn === 'function') {\n for (var i = 0; i < formatted.warnings.length; i++) {\n if (i === 5) {\n console.warn(\n 'There were more warnings in other files.\\n' +\n 'You can find a complete log in the terminal.'\n );\n break;\n }\n console.warn(stripAnsi(formatted.warnings[i]));\n }\n }\n }\n\n // Attempt to apply hot updates or reload.\n if (isHotUpdate) {\n tryApplyUpdates(function onSuccessfulHotUpdate() {\n // Only print warnings if we aren't refreshing the page.\n // Otherwise they'll disappear right away anyway.\n printWarnings();\n // Only dismiss it when we're sure it's a hot update.\n // Otherwise it would flicker right before the reload.\n ErrorOverlay.dismissBuildError();\n });\n } else {\n // Print initial warnings immediately.\n printWarnings();\n }\n}\n\n// Compilation with errors (e.g. syntax error or missing modules).\nfunction handleErrors(errors) {\n clearOutdatedErrors();\n\n isFirstCompilation = false;\n hasCompileErrors = true;\n\n // \"Massage\" webpack messages.\n var formatted = formatWebpackMessages({\n errors: errors,\n warnings: [],\n });\n\n // Only show the first error.\n ErrorOverlay.reportBuildError(formatted.errors[0]);\n\n // Also log them to the console.\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n for (var i = 0; i < formatted.errors.length; i++) {\n console.error(stripAnsi(formatted.errors[i]));\n }\n }\n\n // Do not attempt to reload now.\n // We will reload on next success instead.\n}\n\n// There is a newer version of the code available.\nfunction handleAvailableHash(hash) {\n // Update last known compilation hash.\n mostRecentCompilationHash = hash;\n}\n\n// Handle messages from the server.\nconnection.onmessage = function(e) {\n var message = JSON.parse(e.data);\n switch (message.type) {\n case 'hash':\n handleAvailableHash(message.data);\n break;\n case 'still-ok':\n case 'ok':\n handleSuccess();\n break;\n case 'content-changed':\n // Triggered when a file from `contentBase` changed.\n window.location.reload();\n break;\n case 'warnings':\n handleWarnings(message.data);\n break;\n case 'errors':\n handleErrors(message.data);\n break;\n default:\n // Do nothing.\n }\n};\n\n// Is there a newer version of this code available?\nfunction isUpdateAvailable() {\n /* globals __webpack_hash__ */\n // __webpack_hash__ is the hash of the current compilation.\n // It's a global variable injected by Webpack.\n return mostRecentCompilationHash !== __webpack_hash__;\n}\n\n// Webpack disallows updates in other states.\nfunction canApplyUpdates() {\n return module.hot.status() === 'idle';\n}\n\n// Attempt to update code on the fly, fall back to a hard reload.\nfunction tryApplyUpdates(onHotUpdateSuccess) {\n if (!module.hot) {\n // HotModuleReplacementPlugin is not in Webpack configuration.\n window.location.reload();\n return;\n }\n\n if (!isUpdateAvailable() || !canApplyUpdates()) {\n return;\n }\n\n function handleApplyUpdates(err, updatedModules) {\n if (err || !updatedModules || hadRuntimeError) {\n window.location.reload();\n return;\n }\n\n if (typeof onHotUpdateSuccess === 'function') {\n // Maybe we want to do something.\n onHotUpdateSuccess();\n }\n\n if (isUpdateAvailable()) {\n // While we were updating, there was a new update! Do it again.\n tryApplyUpdates();\n }\n }\n\n // https://webpack.github.io/docs/hot-module-replacement.html#check\n var result = module.hot.check(/* autoApply */ true, handleApplyUpdates);\n\n // // Webpack 2 returns a Promise instead of invoking a callback\n if (result && result.then) {\n result.then(\n function(updatedModules) {\n handleApplyUpdates(null, updatedModules);\n },\n function(err) {\n handleApplyUpdates(err, null);\n }\n );\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/react-dev-utils/webpackHotDevClient.js\n// module id = ./node_modules/react-dev-utils/webpackHotDevClient.js\n// module chunks = 0","/** @license React v16.2.0\n * react-dom.development.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\nvar ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');\nvar _assign = require('object-assign');\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar EventListener = require('fbjs/lib/EventListener');\nvar getActiveElement = require('fbjs/lib/getActiveElement');\nvar shallowEqual = require('fbjs/lib/shallowEqual');\nvar containsNode = require('fbjs/lib/containsNode');\nvar focusNode = require('fbjs/lib/focusNode');\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar checkPropTypes = require('prop-types/checkPropTypes');\nvar hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');\nvar camelizeStyleName = require('fbjs/lib/camelizeStyleName');\n\n/**\n * WARNING: DO NOT manually require this module.\n * This is a replacement for `invariant(...)` used by the error code system\n * and will _only_ be required by the corresponding babel pass.\n * It always throws.\n */\n\n!React ? invariant(false, 'ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.') : void 0;\n\n// These attributes should be all lowercase to allow for\n// case insensitive checks\nvar RESERVED_PROPS = {\n children: true,\n dangerouslySetInnerHTML: true,\n defaultValue: true,\n defaultChecked: true,\n innerHTML: true,\n suppressContentEditableWarning: true,\n suppressHydrationWarning: true,\n style: true\n};\n\nfunction checkMask(value, bitmask) {\n return (value & bitmask) === bitmask;\n}\n\nvar DOMPropertyInjection = {\n /**\n * Mapping from normalized, camelcased property names to a configuration that\n * specifies how the associated DOM property should be accessed or rendered.\n */\n MUST_USE_PROPERTY: 0x1,\n HAS_BOOLEAN_VALUE: 0x4,\n HAS_NUMERIC_VALUE: 0x8,\n HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,\n HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,\n HAS_STRING_BOOLEAN_VALUE: 0x40,\n\n /**\n * Inject some specialized knowledge about the DOM. This takes a config object\n * with the following properties:\n *\n * Properties: object mapping DOM property name to one of the\n * DOMPropertyInjection constants or null. If your attribute isn't in here,\n * it won't get written to the DOM.\n *\n * DOMAttributeNames: object mapping React attribute name to the DOM\n * attribute name. Attribute names not specified use the **lowercase**\n * normalized name.\n *\n * DOMAttributeNamespaces: object mapping React attribute name to the DOM\n * attribute namespace URL. (Attribute names not specified use no namespace.)\n *\n * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.\n * Property names not specified use the normalized name.\n *\n * DOMMutationMethods: Properties that require special mutation methods. If\n * `value` is undefined, the mutation method should unset the property.\n *\n * @param {object} domPropertyConfig the config as described above.\n */\n injectDOMPropertyConfig: function (domPropertyConfig) {\n var Injection = DOMPropertyInjection;\n var Properties = domPropertyConfig.Properties || {};\n var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};\n var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};\n var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};\n\n for (var propName in Properties) {\n !!properties.hasOwnProperty(propName) ? invariant(false, \"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.\", propName) : void 0;\n\n var lowerCased = propName.toLowerCase();\n var propConfig = Properties[propName];\n\n var propertyInfo = {\n attributeName: lowerCased,\n attributeNamespace: null,\n propertyName: propName,\n mutationMethod: null,\n\n mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),\n hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),\n hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),\n hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),\n hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE),\n hasStringBooleanValue: checkMask(propConfig, Injection.HAS_STRING_BOOLEAN_VALUE)\n };\n !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? invariant(false, \"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s\", propName) : void 0;\n\n if (DOMAttributeNames.hasOwnProperty(propName)) {\n var attributeName = DOMAttributeNames[propName];\n\n propertyInfo.attributeName = attributeName;\n }\n\n if (DOMAttributeNamespaces.hasOwnProperty(propName)) {\n propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];\n }\n\n if (DOMMutationMethods.hasOwnProperty(propName)) {\n propertyInfo.mutationMethod = DOMMutationMethods[propName];\n }\n\n // Downcase references to whitelist properties to check for membership\n // without case-sensitivity. This allows the whitelist to pick up\n // `allowfullscreen`, which should be written using the property configuration\n // for `allowFullscreen`\n properties[propName] = propertyInfo;\n }\n }\n};\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\n\n\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\n\n/**\n * Map from property \"standard name\" to an object with info about how to set\n * the property in the DOM. Each object contains:\n *\n * attributeName:\n * Used when rendering markup or with `*Attribute()`.\n * attributeNamespace\n * propertyName:\n * Used on DOM node instances. (This includes properties that mutate due to\n * external factors.)\n * mutationMethod:\n * If non-null, used instead of the property or `setAttribute()` after\n * initial render.\n * mustUseProperty:\n * Whether the property must be accessed and mutated as an object property.\n * hasBooleanValue:\n * Whether the property should be removed when set to a falsey value.\n * hasNumericValue:\n * Whether the property must be numeric or parse as a numeric and should be\n * removed when set to a falsey value.\n * hasPositiveNumericValue:\n * Whether the property must be positive numeric or parse as a positive\n * numeric and should be removed when set to a falsey value.\n * hasOverloadedBooleanValue:\n * Whether the property can be used as a flag as well as with a value.\n * Removed when strictly equal to false; present without a value when\n * strictly equal to true; present with a value otherwise.\n */\nvar properties = {};\n\n/**\n * Checks whether a property name is a writeable attribute.\n * @method\n */\nfunction shouldSetAttribute(name, value) {\n if (isReservedProp(name)) {\n return false;\n }\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return false;\n }\n if (value === null) {\n return true;\n }\n switch (typeof value) {\n case 'boolean':\n return shouldAttributeAcceptBooleanValue(name);\n case 'undefined':\n case 'number':\n case 'string':\n case 'object':\n return true;\n default:\n // function, symbol\n return false;\n }\n}\n\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction shouldAttributeAcceptBooleanValue(name) {\n if (isReservedProp(name)) {\n return true;\n }\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n return propertyInfo.hasBooleanValue || propertyInfo.hasStringBooleanValue || propertyInfo.hasOverloadedBooleanValue;\n }\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix === 'data-' || prefix === 'aria-';\n}\n\n/**\n * Checks to see if a property name is within the list of properties\n * reserved for internal React operations. These properties should\n * not be set on an HTML element.\n *\n * @private\n * @param {string} name\n * @return {boolean} If the name is within reserved props\n */\nfunction isReservedProp(name) {\n return RESERVED_PROPS.hasOwnProperty(name);\n}\n\nvar injection = DOMPropertyInjection;\n\nvar MUST_USE_PROPERTY = injection.MUST_USE_PROPERTY;\nvar HAS_BOOLEAN_VALUE = injection.HAS_BOOLEAN_VALUE;\nvar HAS_NUMERIC_VALUE = injection.HAS_NUMERIC_VALUE;\nvar HAS_POSITIVE_NUMERIC_VALUE = injection.HAS_POSITIVE_NUMERIC_VALUE;\nvar HAS_OVERLOADED_BOOLEAN_VALUE = injection.HAS_OVERLOADED_BOOLEAN_VALUE;\nvar HAS_STRING_BOOLEAN_VALUE = injection.HAS_STRING_BOOLEAN_VALUE;\n\nvar HTMLDOMPropertyConfig = {\n // When adding attributes to this list, be sure to also add them to\n // the `possibleStandardNames` module to ensure casing and incorrect\n // name warnings.\n Properties: {\n allowFullScreen: HAS_BOOLEAN_VALUE,\n // specifies target context for links with `preload` type\n async: HAS_BOOLEAN_VALUE,\n // Note: there is a special case that prevents it from being written to the DOM\n // on the client side because the browsers are inconsistent. Instead we call focus().\n autoFocus: HAS_BOOLEAN_VALUE,\n autoPlay: HAS_BOOLEAN_VALUE,\n capture: HAS_OVERLOADED_BOOLEAN_VALUE,\n checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n cols: HAS_POSITIVE_NUMERIC_VALUE,\n contentEditable: HAS_STRING_BOOLEAN_VALUE,\n controls: HAS_BOOLEAN_VALUE,\n 'default': HAS_BOOLEAN_VALUE,\n defer: HAS_BOOLEAN_VALUE,\n disabled: HAS_BOOLEAN_VALUE,\n download: HAS_OVERLOADED_BOOLEAN_VALUE,\n draggable: HAS_STRING_BOOLEAN_VALUE,\n formNoValidate: HAS_BOOLEAN_VALUE,\n hidden: HAS_BOOLEAN_VALUE,\n loop: HAS_BOOLEAN_VALUE,\n // Caution; `option.selected` is not updated if `select.multiple` is\n // disabled with `removeAttribute`.\n multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n noValidate: HAS_BOOLEAN_VALUE,\n open: HAS_BOOLEAN_VALUE,\n playsInline: HAS_BOOLEAN_VALUE,\n readOnly: HAS_BOOLEAN_VALUE,\n required: HAS_BOOLEAN_VALUE,\n reversed: HAS_BOOLEAN_VALUE,\n rows: HAS_POSITIVE_NUMERIC_VALUE,\n rowSpan: HAS_NUMERIC_VALUE,\n scoped: HAS_BOOLEAN_VALUE,\n seamless: HAS_BOOLEAN_VALUE,\n selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,\n size: HAS_POSITIVE_NUMERIC_VALUE,\n start: HAS_NUMERIC_VALUE,\n // support for projecting regular DOM Elements via V1 named slots ( shadow dom )\n span: HAS_POSITIVE_NUMERIC_VALUE,\n spellCheck: HAS_STRING_BOOLEAN_VALUE,\n // Style must be explicitly set in the attribute list. React components\n // expect a style object\n style: 0,\n // Keep it in the whitelist because it is case-sensitive for SVG.\n tabIndex: 0,\n // itemScope is for for Microdata support.\n // See http://schema.org/docs/gs.html\n itemScope: HAS_BOOLEAN_VALUE,\n // These attributes must stay in the white-list because they have\n // different attribute names (see DOMAttributeNames below)\n acceptCharset: 0,\n className: 0,\n htmlFor: 0,\n httpEquiv: 0,\n // Attributes with mutation methods must be specified in the whitelist\n // Set the string boolean flag to allow the behavior\n value: HAS_STRING_BOOLEAN_VALUE\n },\n DOMAttributeNames: {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv'\n },\n DOMMutationMethods: {\n value: function (node, value) {\n if (value == null) {\n return node.removeAttribute('value');\n }\n\n // Number inputs get special treatment due to some edge cases in\n // Chrome. Let everything else assign the value attribute as normal.\n // https://github.com/facebook/react/issues/7253#issuecomment-236074326\n if (node.type !== 'number' || node.hasAttribute('value') === false) {\n node.setAttribute('value', '' + value);\n } else if (node.validity && !node.validity.badInput && node.ownerDocument.activeElement !== node) {\n // Don't assign an attribute if validation reports bad\n // input. Chrome will clear the value. Additionally, don't\n // operate on inputs that have focus, otherwise Chrome might\n // strip off trailing decimal places and cause the user's\n // cursor position to jump to the beginning of the input.\n //\n // In ReactDOMInput, we have an onBlur event that will trigger\n // this function again when focus is lost.\n node.setAttribute('value', '' + value);\n }\n }\n }\n};\n\nvar HAS_STRING_BOOLEAN_VALUE$1 = injection.HAS_STRING_BOOLEAN_VALUE;\n\n\nvar NS = {\n xlink: 'http://www.w3.org/1999/xlink',\n xml: 'http://www.w3.org/XML/1998/namespace'\n};\n\n/**\n * This is a list of all SVG attributes that need special casing,\n * namespacing, or boolean value assignment.\n *\n * When adding attributes to this list, be sure to also add them to\n * the `possibleStandardNames` module to ensure casing and incorrect\n * name warnings.\n *\n * SVG Attributes List:\n * https://www.w3.org/TR/SVG/attindex.html\n * SMIL Spec:\n * https://www.w3.org/TR/smil\n */\nvar ATTRS = ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'x-height', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xmlns:xlink', 'xml:lang', 'xml:space'];\n\nvar SVGDOMPropertyConfig = {\n Properties: {\n autoReverse: HAS_STRING_BOOLEAN_VALUE$1,\n externalResourcesRequired: HAS_STRING_BOOLEAN_VALUE$1,\n preserveAlpha: HAS_STRING_BOOLEAN_VALUE$1\n },\n DOMAttributeNames: {\n autoReverse: 'autoReverse',\n externalResourcesRequired: 'externalResourcesRequired',\n preserveAlpha: 'preserveAlpha'\n },\n DOMAttributeNamespaces: {\n xlinkActuate: NS.xlink,\n xlinkArcrole: NS.xlink,\n xlinkHref: NS.xlink,\n xlinkRole: NS.xlink,\n xlinkShow: NS.xlink,\n xlinkTitle: NS.xlink,\n xlinkType: NS.xlink,\n xmlBase: NS.xml,\n xmlLang: NS.xml,\n xmlSpace: NS.xml\n }\n};\n\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n};\n\nATTRS.forEach(function (original) {\n var reactName = original.replace(CAMELIZE, capitalize);\n\n SVGDOMPropertyConfig.Properties[reactName] = 0;\n SVGDOMPropertyConfig.DOMAttributeNames[reactName] = original;\n});\n\ninjection.injectDOMPropertyConfig(HTMLDOMPropertyConfig);\ninjection.injectDOMPropertyConfig(SVGDOMPropertyConfig);\n\nvar ReactErrorUtils = {\n // Used by Fiber to simulate a try-catch.\n _caughtError: null,\n _hasCaughtError: false,\n\n // Used by event system to capture/rethrow the first error.\n _rethrowError: null,\n _hasRethrowError: false,\n\n injection: {\n injectErrorUtils: function (injectedErrorUtils) {\n !(typeof injectedErrorUtils.invokeGuardedCallback === 'function') ? invariant(false, 'Injected invokeGuardedCallback() must be a function.') : void 0;\n invokeGuardedCallback = injectedErrorUtils.invokeGuardedCallback;\n }\n },\n\n /**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n invokeGuardedCallback: function (name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(ReactErrorUtils, arguments);\n },\n\n /**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if _caughtError and _rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n invokeGuardedCallbackAndCatchFirstError: function (name, func, context, a, b, c, d, e, f) {\n ReactErrorUtils.invokeGuardedCallback.apply(this, arguments);\n if (ReactErrorUtils.hasCaughtError()) {\n var error = ReactErrorUtils.clearCaughtError();\n if (!ReactErrorUtils._hasRethrowError) {\n ReactErrorUtils._hasRethrowError = true;\n ReactErrorUtils._rethrowError = error;\n }\n }\n },\n\n /**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n rethrowCaughtError: function () {\n return rethrowCaughtError.apply(ReactErrorUtils, arguments);\n },\n\n hasCaughtError: function () {\n return ReactErrorUtils._hasCaughtError;\n },\n\n clearCaughtError: function () {\n if (ReactErrorUtils._hasCaughtError) {\n var error = ReactErrorUtils._caughtError;\n ReactErrorUtils._caughtError = null;\n ReactErrorUtils._hasCaughtError = false;\n return error;\n } else {\n invariant(false, 'clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n};\n\nvar invokeGuardedCallback = function (name, func, context, a, b, c, d, e, f) {\n ReactErrorUtils._hasCaughtError = false;\n ReactErrorUtils._caughtError = null;\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n ReactErrorUtils._caughtError = error;\n ReactErrorUtils._hasCaughtError = true;\n }\n};\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // untintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {\n // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n var didError = true;\n\n // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n function callCallback() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false);\n func.apply(context, funcArgs);\n didError = false;\n }\n\n // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n var error = void 0;\n // Use this to track whether the error event is ever called.\n var didSetError = false;\n var isCrossOriginError = false;\n\n function onError(event) {\n error = event.error;\n didSetError = true;\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n }\n\n // Create a fake event type.\n var evtType = 'react-' + (name ? name : 'invokeguardedcallback');\n\n // Attach our event handlers\n window.addEventListener('error', onError);\n fakeNode.addEventListener(evtType, callCallback, false);\n\n // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n var evt = document.createEvent('Event');\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');\n }\n ReactErrorUtils._hasCaughtError = true;\n ReactErrorUtils._caughtError = error;\n } else {\n ReactErrorUtils._hasCaughtError = false;\n ReactErrorUtils._caughtError = null;\n }\n\n // Remove our event listeners\n window.removeEventListener('error', onError);\n };\n\n invokeGuardedCallback = invokeGuardedCallbackDev;\n }\n}\n\nvar rethrowCaughtError = function () {\n if (ReactErrorUtils._hasRethrowError) {\n var error = ReactErrorUtils._rethrowError;\n ReactErrorUtils._rethrowError = null;\n ReactErrorUtils._hasRethrowError = false;\n throw error;\n }\n};\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n\n/**\n * Injectable mapping from names to event plugin modules.\n */\nvar namesToPlugins = {};\n\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n !(pluginIndex > -1) ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : void 0;\n if (plugins[pluginIndex]) {\n continue;\n }\n !pluginModule.extractEvents ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : void 0;\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n for (var eventName in publishedEvents) {\n !publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName) ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : void 0;\n }\n }\n}\n\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n !!eventNameDispatchConfigs.hasOwnProperty(eventName) ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : void 0;\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n return false;\n}\n\n/**\n * Publishes a registration name that is used to identify dispatched events.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n !!registrationNameModules[registrationName] ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : void 0;\n registrationNameModules[registrationName] = pluginModule;\n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n\n/**\n * Registers plugins so that they can extract and dispatch events.\n *\n * @see {EventPluginHub}\n */\n\n/**\n * Ordered list of injected plugins.\n */\nvar plugins = [];\n\n/**\n * Mapping from event name to dispatch config\n */\nvar eventNameDispatchConfigs = {};\n\n/**\n * Mapping from registration name to plugin module\n */\nvar registrationNameModules = {};\n\n/**\n * Mapping from registration name to event name\n */\nvar registrationNameDependencies = {};\n\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\nvar possibleRegistrationNames = {};\n// Trust the developer to only use possibleRegistrationNames in true\n\n/**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginOrder}\n */\nfunction injectEventPluginOrder(injectedEventPluginOrder) {\n !!eventPluginOrder ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.') : void 0;\n // Clone the ordering so it cannot be dynamically mutated.\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n}\n\n/**\n * Injects plugins to be used by `EventPluginHub`. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n * @see {EventPluginHub.injection.injectEventPluginsByName}\n */\nfunction injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n var pluginModule = injectedNamesToPlugins[pluginName];\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n !!namesToPlugins[pluginName] ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : void 0;\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n}\n\nvar EventPluginRegistry = Object.freeze({\n\tplugins: plugins,\n\teventNameDispatchConfigs: eventNameDispatchConfigs,\n\tregistrationNameModules: registrationNameModules,\n\tregistrationNameDependencies: registrationNameDependencies,\n\tpossibleRegistrationNames: possibleRegistrationNames,\n\tinjectEventPluginOrder: injectEventPluginOrder,\n\tinjectEventPluginsByName: injectEventPluginsByName\n});\n\nvar getFiberCurrentPropsFromNode = null;\nvar getInstanceFromNode = null;\nvar getNodeFromInstance = null;\n\nvar injection$2 = {\n injectComponentTree: function (Injected) {\n getFiberCurrentPropsFromNode = Injected.getFiberCurrentPropsFromNode;\n getInstanceFromNode = Injected.getInstanceFromNode;\n getNodeFromInstance = Injected.getNodeFromInstance;\n\n {\n warning(getNodeFromInstance && getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');\n }\n }\n};\n\n\n\n\n\n\nvar validateEventDispatches;\n{\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.');\n };\n}\n\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\nfunction executeDispatch(event, simulated, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = getNodeFromInstance(inst);\n ReactErrorUtils.invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\nfunction executeDispatchesInOrder(event, simulated) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n {\n validateEventDispatches(event);\n }\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n }\n // Listeners and Instances are two parallel arrays that are always in sync.\n executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, simulated, dispatchListeners, dispatchInstances);\n }\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\n/**\n * @see executeDispatchesInOrderStopAtTrueImpl\n */\n\n\n/**\n * Execution of a \"direct\" dispatch - there must be at most one dispatch\n * accumulated on the event or it is considered an error. It doesn't really make\n * sense for an event with multiple dispatches (bubbled) to keep track of the\n * return values at each dispatch execution, but it does tend to make sense when\n * dealing with \"direct\" dispatches.\n *\n * @return {*} The return value of executing the single dispatch.\n */\n\n\n/**\n * @param {SyntheticEvent} event\n * @return {boolean} True iff number of dispatches accumulated is greater than 0.\n */\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n !(next != null) ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : void 0;\n\n if (current == null) {\n return next;\n }\n\n // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n * @param {function} cb Callback invoked with each element or a collection.\n * @param {?} [scope] Scope used as `this` in a callback.\n */\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\nvar eventQueue = null;\n\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @param {boolean} simulated If the event is simulated (changes exn behavior)\n * @private\n */\nvar executeDispatchesAndRelease = function (event, simulated) {\n if (event) {\n executeDispatchesInOrder(event, simulated);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\nvar executeDispatchesAndReleaseSimulated = function (e) {\n return executeDispatchesAndRelease(e, true);\n};\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e, false);\n};\n\nfunction isInteractive(tag) {\n return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';\n}\n\nfunction shouldPreventMouseEvent(name, type, props) {\n switch (name) {\n case 'onClick':\n case 'onClickCapture':\n case 'onDoubleClick':\n case 'onDoubleClickCapture':\n case 'onMouseDown':\n case 'onMouseDownCapture':\n case 'onMouseMove':\n case 'onMouseMoveCapture':\n case 'onMouseUp':\n case 'onMouseUpCapture':\n return !!(props.disabled && isInteractive(type));\n default:\n return false;\n }\n}\n\n/**\n * This is a unified interface for event plugins to be installed and configured.\n *\n * Event plugins can implement the following properties:\n *\n * `extractEvents` {function(string, DOMEventTarget, string, object): *}\n * Required. When a top-level event is fired, this method is expected to\n * extract synthetic events that will in turn be queued and dispatched.\n *\n * `eventTypes` {object}\n * Optional, plugins that fire events must publish a mapping of registration\n * names that are used to register listeners. Values of this mapping must\n * be objects that contain `registrationName` or `phasedRegistrationNames`.\n *\n * `executeDispatch` {function(object, function, string)}\n * Optional, allows plugins to override how an event gets dispatched. By\n * default, the listener is simply invoked.\n *\n * Each plugin that is injected into `EventsPluginHub` is immediately operable.\n *\n * @public\n */\n\n/**\n * Methods for injecting dependencies.\n */\nvar injection$1 = {\n /**\n * @param {array} InjectedEventPluginOrder\n * @public\n */\n injectEventPluginOrder: injectEventPluginOrder,\n\n /**\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n */\n injectEventPluginsByName: injectEventPluginsByName\n};\n\n/**\n * @param {object} inst The instance, which is the source of events.\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @return {?function} The stored callback.\n */\nfunction getListener(inst, registrationName) {\n var listener;\n\n // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not\n // live here; needs to be moved to a better place soon\n var stateNode = inst.stateNode;\n if (!stateNode) {\n // Work in progress (ex: onload events in incremental mode).\n return null;\n }\n var props = getFiberCurrentPropsFromNode(stateNode);\n if (!props) {\n // Work in progress.\n return null;\n }\n listener = props[registrationName];\n if (shouldPreventMouseEvent(registrationName, inst.type, props)) {\n return null;\n }\n !(!listener || typeof listener === 'function') ? invariant(false, 'Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener) : void 0;\n return listener;\n}\n\n/**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\nfunction extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events;\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n return events;\n}\n\n/**\n * Enqueues a synthetic event that should be dispatched when\n * `processEventQueue` is invoked.\n *\n * @param {*} events An accumulation of synthetic events.\n * @internal\n */\nfunction enqueueEvents(events) {\n if (events) {\n eventQueue = accumulateInto(eventQueue, events);\n }\n}\n\n/**\n * Dispatches all synthetic events on the event queue.\n *\n * @internal\n */\nfunction processEventQueue(simulated) {\n // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n var processingEventQueue = eventQueue;\n eventQueue = null;\n\n if (!processingEventQueue) {\n return;\n }\n\n if (simulated) {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);\n } else {\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n }\n !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0;\n // This would be a good time to rethrow if any of the event handlers threw.\n ReactErrorUtils.rethrowCaughtError();\n}\n\nvar EventPluginHub = Object.freeze({\n\tinjection: injection$1,\n\tgetListener: getListener,\n\textractEvents: extractEvents,\n\tenqueueEvents: enqueueEvents,\n\tprocessEventQueue: processEventQueue\n});\n\nvar IndeterminateComponent = 0; // Before we know whether it is functional or class\nvar FunctionalComponent = 1;\nvar ClassComponent = 2;\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\nvar HostComponent = 5;\nvar HostText = 6;\nvar CallComponent = 7;\nvar CallHandlerPhase = 8;\nvar ReturnComponent = 9;\nvar Fragment = 10;\n\nvar randomKey = Math.random().toString(36).slice(2);\nvar internalInstanceKey = '__reactInternalInstance$' + randomKey;\nvar internalEventHandlersKey = '__reactEventHandlers$' + randomKey;\n\nfunction precacheFiberNode$1(hostInst, node) {\n node[internalInstanceKey] = hostInst;\n}\n\n/**\n * Given a DOM node, return the closest ReactDOMComponent or\n * ReactDOMTextComponent instance ancestor.\n */\nfunction getClosestInstanceFromNode(node) {\n if (node[internalInstanceKey]) {\n return node[internalInstanceKey];\n }\n\n // Walk up the tree until we find an ancestor whose instance we have cached.\n var parents = [];\n while (!node[internalInstanceKey]) {\n parents.push(node);\n if (node.parentNode) {\n node = node.parentNode;\n } else {\n // Top of the tree. This node must not be part of a React tree (or is\n // unmounted, potentially).\n return null;\n }\n }\n\n var closest = void 0;\n var inst = node[internalInstanceKey];\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber, this will always be the deepest root.\n return inst;\n }\n for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {\n closest = inst;\n }\n\n return closest;\n}\n\n/**\n * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent\n * instance, or null if the node was not rendered by this React.\n */\nfunction getInstanceFromNode$1(node) {\n var inst = node[internalInstanceKey];\n if (inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n return inst;\n } else {\n return null;\n }\n }\n return null;\n}\n\n/**\n * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding\n * DOM node.\n */\nfunction getNodeFromInstance$1(inst) {\n if (inst.tag === HostComponent || inst.tag === HostText) {\n // In Fiber this, is just the state node right now. We assume it will be\n // a host component or host text.\n return inst.stateNode;\n }\n\n // Without this first invariant, passing a non-DOM-component triggers the next\n // invariant for a missing parent, which is super confusing.\n invariant(false, 'getNodeFromInstance: Invalid argument.');\n}\n\nfunction getFiberCurrentPropsFromNode$1(node) {\n return node[internalEventHandlersKey] || null;\n}\n\nfunction updateFiberProps$1(node, props) {\n node[internalEventHandlersKey] = props;\n}\n\nvar ReactDOMComponentTree = Object.freeze({\n\tprecacheFiberNode: precacheFiberNode$1,\n\tgetClosestInstanceFromNode: getClosestInstanceFromNode,\n\tgetInstanceFromNode: getInstanceFromNode$1,\n\tgetNodeFromInstance: getNodeFromInstance$1,\n\tgetFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode$1,\n\tupdateFiberProps: updateFiberProps$1\n});\n\nfunction getParent(inst) {\n do {\n inst = inst['return'];\n // TODO: If this is a HostRoot we might want to bail out.\n // That is depending on if we want nested subtrees (layers) to bubble\n // events to their parent. We could also go through parentNode on the\n // host node but that wouldn't work for React Native and doesn't let us\n // do the portal feature.\n } while (inst && inst.tag !== HostComponent);\n if (inst) {\n return inst;\n }\n return null;\n}\n\n/**\n * Return the lowest common ancestor of A and B, or null if they are in\n * different trees.\n */\nfunction getLowestCommonAncestor(instA, instB) {\n var depthA = 0;\n for (var tempA = instA; tempA; tempA = getParent(tempA)) {\n depthA++;\n }\n var depthB = 0;\n for (var tempB = instB; tempB; tempB = getParent(tempB)) {\n depthB++;\n }\n\n // If A is deeper, crawl up.\n while (depthA - depthB > 0) {\n instA = getParent(instA);\n depthA--;\n }\n\n // If B is deeper, crawl up.\n while (depthB - depthA > 0) {\n instB = getParent(instB);\n depthB--;\n }\n\n // Walk in lockstep until we find a match.\n var depth = depthA;\n while (depth--) {\n if (instA === instB || instA === instB.alternate) {\n return instA;\n }\n instA = getParent(instA);\n instB = getParent(instB);\n }\n return null;\n}\n\n/**\n * Return if A is an ancestor of B.\n */\n\n\n/**\n * Return the parent instance of the passed-in instance.\n */\nfunction getParentInstance(inst) {\n return getParent(inst);\n}\n\n/**\n * Simulates the traversal of a two-phase, capture/bubble event dispatch.\n */\nfunction traverseTwoPhase(inst, fn, arg) {\n var path = [];\n while (inst) {\n path.push(inst);\n inst = getParent(inst);\n }\n var i;\n for (i = path.length; i-- > 0;) {\n fn(path[i], 'captured', arg);\n }\n for (i = 0; i < path.length; i++) {\n fn(path[i], 'bubbled', arg);\n }\n}\n\n/**\n * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that\n * should would receive a `mouseEnter` or `mouseLeave` event.\n *\n * Does not invoke the callback on the nearest common ancestor because nothing\n * \"entered\" or \"left\" that element.\n */\nfunction traverseEnterLeave(from, to, fn, argFrom, argTo) {\n var common = from && to ? getLowestCommonAncestor(from, to) : null;\n var pathFrom = [];\n while (true) {\n if (!from) {\n break;\n }\n if (from === common) {\n break;\n }\n var alternate = from.alternate;\n if (alternate !== null && alternate === common) {\n break;\n }\n pathFrom.push(from);\n from = getParent(from);\n }\n var pathTo = [];\n while (true) {\n if (!to) {\n break;\n }\n if (to === common) {\n break;\n }\n var _alternate = to.alternate;\n if (_alternate !== null && _alternate === common) {\n break;\n }\n pathTo.push(to);\n to = getParent(to);\n }\n for (var i = 0; i < pathFrom.length; i++) {\n fn(pathFrom[i], 'bubbled', argFrom);\n }\n for (var _i = pathTo.length; _i-- > 0;) {\n fn(pathTo[_i], 'captured', argTo);\n }\n}\n\n/**\n * Some event types have a notion of different registration names for different\n * \"phases\" of propagation. This finds listeners by a given phase.\n */\nfunction listenerAtPhase(inst, event, propagationPhase) {\n var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];\n return getListener(inst, registrationName);\n}\n\n/**\n * A small set of propagation patterns, each of which will accept a small amount\n * of information, and generate a set of \"dispatch ready event objects\" - which\n * are sets of events that have already been annotated with a set of dispatched\n * listener functions/ids. The API is designed this way to discourage these\n * propagation strategies from actually executing the dispatches, since we\n * always want to collect the entire set of dispatches before executing even a\n * single one.\n */\n\n/**\n * Tags a `SyntheticEvent` with dispatched listeners. Creating this function\n * here, allows us to not have to bind or create functions for each event.\n * Mutating the event's members allows us to not have to create a wrapping\n * \"dispatch\" object that pairs the event with the listener.\n */\nfunction accumulateDirectionalDispatches(inst, phase, event) {\n {\n warning(inst, 'Dispatching inst must not be null');\n }\n var listener = listenerAtPhase(inst, event, phase);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n}\n\n/**\n * Collect dispatches (must be entirely collected before dispatching - see unit\n * tests). Lazily allocate the array to conserve memory. We must loop through\n * each event and perform the traversal for each one. We cannot perform a\n * single traversal for the entire collection of events because each event may\n * have a different target.\n */\nfunction accumulateTwoPhaseDispatchesSingle(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.\n */\nfunction accumulateTwoPhaseDispatchesSingleSkipTarget(event) {\n if (event && event.dispatchConfig.phasedRegistrationNames) {\n var targetInst = event._targetInst;\n var parentInst = targetInst ? getParentInstance(targetInst) : null;\n traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);\n }\n}\n\n/**\n * Accumulates without regard to direction, does not look for phased\n * registration names. Same as `accumulateDirectDispatchesSingle` but without\n * requiring that the `dispatchMarker` be the same as the dispatched ID.\n */\nfunction accumulateDispatches(inst, ignoredDirection, event) {\n if (inst && event && event.dispatchConfig.registrationName) {\n var registrationName = event.dispatchConfig.registrationName;\n var listener = getListener(inst, registrationName);\n if (listener) {\n event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);\n event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);\n }\n }\n}\n\n/**\n * Accumulates dispatches on an `SyntheticEvent`, but only for the\n * `dispatchMarker`.\n * @param {SyntheticEvent} event\n */\nfunction accumulateDirectDispatchesSingle(event) {\n if (event && event.dispatchConfig.registrationName) {\n accumulateDispatches(event._targetInst, null, event);\n }\n}\n\nfunction accumulateTwoPhaseDispatches(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);\n}\n\nfunction accumulateTwoPhaseDispatchesSkipTarget(events) {\n forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);\n}\n\nfunction accumulateEnterLeaveDispatches(leave, enter, from, to) {\n traverseEnterLeave(from, to, accumulateDispatches, leave, enter);\n}\n\nfunction accumulateDirectDispatches(events) {\n forEachAccumulated(events, accumulateDirectDispatchesSingle);\n}\n\nvar EventPropagators = Object.freeze({\n\taccumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,\n\taccumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,\n\taccumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches,\n\taccumulateDirectDispatches: accumulateDirectDispatches\n});\n\nvar contentKey = null;\n\n/**\n * Gets the key used to access text content on a DOM node.\n *\n * @return {?string} Key used to access text content.\n * @internal\n */\nfunction getTextContentAccessor() {\n if (!contentKey && ExecutionEnvironment.canUseDOM) {\n // Prefer textContent to innerText because many browsers support both but\n // SVG elements don't support innerText even when
does.\n contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';\n }\n return contentKey;\n}\n\n/**\n * This helper object stores information about text content of a target node,\n * allowing comparison of content before and after a given event.\n *\n * Identify the node where selection currently begins, then observe\n * both its text content and its current position in the DOM. Since the\n * browser may natively replace the target node during composition, we can\n * use its position to find its replacement.\n *\n *\n */\nvar compositionState = {\n _root: null,\n _startText: null,\n _fallbackText: null\n};\n\nfunction initialize(nativeEventTarget) {\n compositionState._root = nativeEventTarget;\n compositionState._startText = getText();\n return true;\n}\n\nfunction reset() {\n compositionState._root = null;\n compositionState._startText = null;\n compositionState._fallbackText = null;\n}\n\nfunction getData() {\n if (compositionState._fallbackText) {\n return compositionState._fallbackText;\n }\n\n var start;\n var startValue = compositionState._startText;\n var startLength = startValue.length;\n var end;\n var endValue = getText();\n var endLength = endValue.length;\n\n for (start = 0; start < startLength; start++) {\n if (startValue[start] !== endValue[start]) {\n break;\n }\n }\n\n var minEnd = startLength - start;\n for (end = 1; end <= minEnd; end++) {\n if (startValue[startLength - end] !== endValue[endLength - end]) {\n break;\n }\n }\n\n var sliceTail = end > 1 ? 1 - end : undefined;\n compositionState._fallbackText = endValue.slice(start, sliceTail);\n return compositionState._fallbackText;\n}\n\nfunction getText() {\n if ('value' in compositionState._root) {\n return compositionState._root.value;\n }\n return compositionState._root[getTextContentAccessor()];\n}\n\n/* eslint valid-typeof: 0 */\n\nvar didWarnForAddedNewProperty = false;\nvar isProxySupported = typeof Proxy === 'function';\nvar EVENT_POOL_SIZE = 10;\n\nvar shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar EventInterface = {\n type: null,\n target: null,\n // currentTarget is set when dispatching; no use in copying it here\n currentTarget: emptyFunction.thatReturnsNull,\n eventPhase: null,\n bubbles: null,\n cancelable: null,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: null,\n isTrusted: null\n};\n\n/**\n * Synthetic events are dispatched by event plugins, typically in response to a\n * top-level event delegation handler.\n *\n * These systems should generally use pooling to reduce the frequency of garbage\n * collection. The system should check `isPersistent` to determine whether the\n * event should be released into the pool after being dispatched. Users that\n * need a persisted event should invoke `persist`.\n *\n * Synthetic events (and subclasses) implement the DOM Level 3 Events API by\n * normalizing browser quirks. Subclasses do not necessarily have to implement a\n * DOM interface; custom application-specific events can also subclass this.\n *\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {*} targetInst Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @param {DOMEventTarget} nativeEventTarget Target node.\n */\nfunction SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {\n {\n // these have a getter/setter for warnings\n delete this.nativeEvent;\n delete this.preventDefault;\n delete this.stopPropagation;\n }\n\n this.dispatchConfig = dispatchConfig;\n this._targetInst = targetInst;\n this.nativeEvent = nativeEvent;\n\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n if (!Interface.hasOwnProperty(propName)) {\n continue;\n }\n {\n delete this[propName]; // this has a getter/setter for warnings\n }\n var normalize = Interface[propName];\n if (normalize) {\n this[propName] = normalize(nativeEvent);\n } else {\n if (propName === 'target') {\n this.target = nativeEventTarget;\n } else {\n this[propName] = nativeEvent[propName];\n }\n }\n }\n\n var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;\n if (defaultPrevented) {\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n } else {\n this.isDefaultPrevented = emptyFunction.thatReturnsFalse;\n }\n this.isPropagationStopped = emptyFunction.thatReturnsFalse;\n return this;\n}\n\n_assign(SyntheticEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = true;\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.preventDefault) {\n event.preventDefault();\n } else if (typeof event.returnValue !== 'unknown') {\n event.returnValue = false;\n }\n this.isDefaultPrevented = emptyFunction.thatReturnsTrue;\n },\n\n stopPropagation: function () {\n var event = this.nativeEvent;\n if (!event) {\n return;\n }\n\n if (event.stopPropagation) {\n event.stopPropagation();\n } else if (typeof event.cancelBubble !== 'unknown') {\n // The ChangeEventPlugin registers a \"propertychange\" event for\n // IE. This event does not support bubbling or cancelling, and\n // any references to cancelBubble throw \"Member not found\". A\n // typeof check of \"unknown\" circumvents this issue (and is also\n // IE specific).\n event.cancelBubble = true;\n }\n\n this.isPropagationStopped = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * We release all dispatched `SyntheticEvent`s after each event loop, adding\n * them back into the pool. This allows a way to hold onto a reference that\n * won't be added back into the pool.\n */\n persist: function () {\n this.isPersistent = emptyFunction.thatReturnsTrue;\n },\n\n /**\n * Checks if this event should be released back into the pool.\n *\n * @return {boolean} True if this should not be released, false otherwise.\n */\n isPersistent: emptyFunction.thatReturnsFalse,\n\n /**\n * `PooledClass` looks for `destructor` on each instance it releases.\n */\n destructor: function () {\n var Interface = this.constructor.Interface;\n for (var propName in Interface) {\n {\n Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));\n }\n }\n for (var i = 0; i < shouldBeReleasedProperties.length; i++) {\n this[shouldBeReleasedProperties[i]] = null;\n }\n {\n Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));\n Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));\n Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));\n }\n }\n});\n\nSyntheticEvent.Interface = EventInterface;\n\n/**\n * Helper to reduce boilerplate when creating subclasses.\n *\n * @param {function} Class\n * @param {?object} Interface\n */\nSyntheticEvent.augmentClass = function (Class, Interface) {\n var Super = this;\n\n var E = function () {};\n E.prototype = Super.prototype;\n var prototype = new E();\n\n _assign(prototype, Class.prototype);\n Class.prototype = prototype;\n Class.prototype.constructor = Class;\n\n Class.Interface = _assign({}, Super.Interface, Interface);\n Class.augmentClass = Super.augmentClass;\n addEventPoolingTo(Class);\n};\n\n/** Proxying after everything set on SyntheticEvent\n * to resolve Proxy issue on some WebKit browsers\n * in which some Event properties are set to undefined (GH#10010)\n */\n{\n if (isProxySupported) {\n /*eslint-disable no-func-assign */\n SyntheticEvent = new Proxy(SyntheticEvent, {\n construct: function (target, args) {\n return this.apply(target, Object.create(target.prototype), args);\n },\n apply: function (constructor, that, args) {\n return new Proxy(constructor.apply(that, args), {\n set: function (target, prop, value) {\n if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {\n warning(didWarnForAddedNewProperty || target.isPersistent(), \"This synthetic event is reused for performance reasons. If you're \" + \"seeing this, you're adding a new property in the synthetic event object. \" + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.');\n didWarnForAddedNewProperty = true;\n }\n target[prop] = value;\n return true;\n }\n });\n }\n });\n /*eslint-enable no-func-assign */\n }\n}\n\naddEventPoolingTo(SyntheticEvent);\n\n/**\n * Helper to nullify syntheticEvent instance properties when destructing\n *\n * @param {String} propName\n * @param {?object} getVal\n * @return {object} defineProperty object\n */\nfunction getPooledWarningPropertyDefinition(propName, getVal) {\n var isFunction = typeof getVal === 'function';\n return {\n configurable: true,\n set: set,\n get: get\n };\n\n function set(val) {\n var action = isFunction ? 'setting the method' : 'setting the property';\n warn(action, 'This is effectively a no-op');\n return val;\n }\n\n function get() {\n var action = isFunction ? 'accessing the method' : 'accessing the property';\n var result = isFunction ? 'This is a no-op function' : 'This is set to null';\n warn(action, result);\n return getVal;\n }\n\n function warn(action, result) {\n var warningCondition = false;\n warning(warningCondition, \"This synthetic event is reused for performance reasons. If you're seeing this, \" + \"you're %s `%s` on a released/nullified synthetic event. %s. \" + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result);\n }\n}\n\nfunction getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {\n var EventConstructor = this;\n if (EventConstructor.eventPool.length) {\n var instance = EventConstructor.eventPool.pop();\n EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);\n return instance;\n }\n return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);\n}\n\nfunction releasePooledEvent(event) {\n var EventConstructor = this;\n !(event instanceof EventConstructor) ? invariant(false, 'Trying to release an event instance into a pool of a different type.') : void 0;\n event.destructor();\n if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {\n EventConstructor.eventPool.push(event);\n }\n}\n\nfunction addEventPoolingTo(EventConstructor) {\n EventConstructor.eventPool = [];\n EventConstructor.getPooled = getPooledEvent;\n EventConstructor.release = releasePooledEvent;\n}\n\nvar SyntheticEvent$1 = SyntheticEvent;\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents\n */\nvar CompositionEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105\n * /#events-inputevents\n */\nvar InputEventInterface = {\n data: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticInputEvent, InputEventInterface);\n\nvar END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space\nvar START_KEYCODE = 229;\n\nvar canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;\n\nvar documentMode = null;\nif (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {\n documentMode = document.documentMode;\n}\n\n// Webkit offers a very useful `textInput` event that can be used to\n// directly represent `beforeInput`. The IE `textinput` event is not as\n// useful, so we don't use it.\nvar canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();\n\n// In IE9+, we have access to composition events, but the data supplied\n// by the native compositionend event may be incorrect. Japanese ideographic\n// spaces, for instance (\\u3000) are not recorded correctly.\nvar useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);\n\n/**\n * Opera <= 12 includes TextEvent in window, but does not fire\n * text input events. Rely on keypress instead.\n */\nfunction isPresto() {\n var opera = window.opera;\n return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;\n}\n\nvar SPACEBAR_CODE = 32;\nvar SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);\n\n// Events and their corresponding property names.\nvar eventTypes = {\n beforeInput: {\n phasedRegistrationNames: {\n bubbled: 'onBeforeInput',\n captured: 'onBeforeInputCapture'\n },\n dependencies: ['topCompositionEnd', 'topKeyPress', 'topTextInput', 'topPaste']\n },\n compositionEnd: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionEnd',\n captured: 'onCompositionEndCapture'\n },\n dependencies: ['topBlur', 'topCompositionEnd', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionStart: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionStart',\n captured: 'onCompositionStartCapture'\n },\n dependencies: ['topBlur', 'topCompositionStart', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n },\n compositionUpdate: {\n phasedRegistrationNames: {\n bubbled: 'onCompositionUpdate',\n captured: 'onCompositionUpdateCapture'\n },\n dependencies: ['topBlur', 'topCompositionUpdate', 'topKeyDown', 'topKeyPress', 'topKeyUp', 'topMouseDown']\n }\n};\n\n// Track whether we've ever handled a keypress on the space key.\nvar hasSpaceKeypress = false;\n\n/**\n * Return whether a native keypress event is assumed to be a command.\n * This is required because Firefox fires `keypress` events for key commands\n * (cut, copy, select-all, etc.) even though no character is inserted.\n */\nfunction isKeypressCommand(nativeEvent) {\n return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&\n // ctrlKey && altKey is equivalent to AltGr, and is not a command.\n !(nativeEvent.ctrlKey && nativeEvent.altKey);\n}\n\n/**\n * Translate native top level events into event types.\n *\n * @param {string} topLevelType\n * @return {object}\n */\nfunction getCompositionEventType(topLevelType) {\n switch (topLevelType) {\n case 'topCompositionStart':\n return eventTypes.compositionStart;\n case 'topCompositionEnd':\n return eventTypes.compositionEnd;\n case 'topCompositionUpdate':\n return eventTypes.compositionUpdate;\n }\n}\n\n/**\n * Does our fallback best-guess model think this event signifies that\n * composition has begun?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionStart(topLevelType, nativeEvent) {\n return topLevelType === 'topKeyDown' && nativeEvent.keyCode === START_KEYCODE;\n}\n\n/**\n * Does our fallback mode think that this event is the end of composition?\n *\n * @param {string} topLevelType\n * @param {object} nativeEvent\n * @return {boolean}\n */\nfunction isFallbackCompositionEnd(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topKeyUp':\n // Command keys insert or clear IME input.\n return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;\n case 'topKeyDown':\n // Expect IME keyCode on each keydown. If we get any other\n // code we must have exited earlier.\n return nativeEvent.keyCode !== START_KEYCODE;\n case 'topKeyPress':\n case 'topMouseDown':\n case 'topBlur':\n // Events are not possible without cancelling IME.\n return true;\n default:\n return false;\n }\n}\n\n/**\n * Google Input Tools provides composition data via a CustomEvent,\n * with the `data` property populated in the `detail` object. If this\n * is available on the event object, use it. If not, this is a plain\n * composition event and we have nothing special to extract.\n *\n * @param {object} nativeEvent\n * @return {?string}\n */\nfunction getDataFromCustomEvent(nativeEvent) {\n var detail = nativeEvent.detail;\n if (typeof detail === 'object' && 'data' in detail) {\n return detail.data;\n }\n return null;\n}\n\n// Track the current IME composition status, if any.\nvar isComposing = false;\n\n/**\n * @return {?object} A SyntheticCompositionEvent.\n */\nfunction extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var eventType;\n var fallbackData;\n\n if (canUseCompositionEvent) {\n eventType = getCompositionEventType(topLevelType);\n } else if (!isComposing) {\n if (isFallbackCompositionStart(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionStart;\n }\n } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n eventType = eventTypes.compositionEnd;\n }\n\n if (!eventType) {\n return null;\n }\n\n if (useFallbackCompositionData) {\n // The current composition is stored statically and must not be\n // overwritten while composition continues.\n if (!isComposing && eventType === eventTypes.compositionStart) {\n isComposing = initialize(nativeEventTarget);\n } else if (eventType === eventTypes.compositionEnd) {\n if (isComposing) {\n fallbackData = getData();\n }\n }\n }\n\n var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);\n\n if (fallbackData) {\n // Inject data generated from fallback path into the synthetic event.\n // This matches the property of native CompositionEventInterface.\n event.data = fallbackData;\n } else {\n var customData = getDataFromCustomEvent(nativeEvent);\n if (customData !== null) {\n event.data = customData;\n }\n }\n\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * @param {TopLevelTypes} topLevelType Record from `BrowserEventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The string corresponding to this `beforeInput` event.\n */\nfunction getNativeBeforeInputChars(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case 'topCompositionEnd':\n return getDataFromCustomEvent(nativeEvent);\n case 'topKeyPress':\n /**\n * If native `textInput` events are available, our goal is to make\n * use of them. However, there is a special case: the spacebar key.\n * In Webkit, preventing default on a spacebar `textInput` event\n * cancels character insertion, but it *also* causes the browser\n * to fall back to its default spacebar behavior of scrolling the\n * page.\n *\n * Tracking at:\n * https://code.google.com/p/chromium/issues/detail?id=355103\n *\n * To avoid this issue, use the keypress event as if no `textInput`\n * event is available.\n */\n var which = nativeEvent.which;\n if (which !== SPACEBAR_CODE) {\n return null;\n }\n\n hasSpaceKeypress = true;\n return SPACEBAR_CHAR;\n\n case 'topTextInput':\n // Record the characters to be added to the DOM.\n var chars = nativeEvent.data;\n\n // If it's a spacebar character, assume that we have already handled\n // it at the keypress level and bail immediately. Android Chrome\n // doesn't give us keycodes, so we need to blacklist it.\n if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {\n return null;\n }\n\n return chars;\n\n default:\n // For other native event types, do nothing.\n return null;\n }\n}\n\n/**\n * For browsers that do not provide the `textInput` event, extract the\n * appropriate string to use for SyntheticInputEvent.\n *\n * @param {string} topLevelType Record from `BrowserEventConstants`.\n * @param {object} nativeEvent Native browser event.\n * @return {?string} The fallback string for this `beforeInput` event.\n */\nfunction getFallbackBeforeInputChars(topLevelType, nativeEvent) {\n // If we are currently composing (IME) and using a fallback to do so,\n // try to extract the composed characters from the fallback object.\n // If composition event is available, we extract a string only at\n // compositionevent, otherwise extract it at fallback events.\n if (isComposing) {\n if (topLevelType === 'topCompositionEnd' || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {\n var chars = getData();\n reset();\n isComposing = false;\n return chars;\n }\n return null;\n }\n\n switch (topLevelType) {\n case 'topPaste':\n // If a paste event occurs after a keypress, throw out the input\n // chars. Paste events should not lead to BeforeInput events.\n return null;\n case 'topKeyPress':\n /**\n * As of v27, Firefox may fire keypress events even when no character\n * will be inserted. A few possibilities:\n *\n * - `which` is `0`. Arrow keys, Esc key, etc.\n *\n * - `which` is the pressed key code, but no char is available.\n * Ex: 'AltGr + d` in Polish. There is no modified character for\n * this key combination and no character is inserted into the\n * document, but FF fires the keypress for char code `100` anyway.\n * No `input` event will occur.\n *\n * - `which` is the pressed key code, but a command combination is\n * being used. Ex: `Cmd+C`. No character is inserted, and no\n * `input` event will occur.\n */\n if (!isKeypressCommand(nativeEvent)) {\n // IE fires the `keypress` event when a user types an emoji via\n // Touch keyboard of Windows. In such a case, the `char` property\n // holds an emoji character like `\\uD83D\\uDE0A`. Because its length\n // is 2, the property `which` does not represent an emoji correctly.\n // In such a case, we directly return the `char` property instead of\n // using `which`.\n if (nativeEvent.char && nativeEvent.char.length > 1) {\n return nativeEvent.char;\n } else if (nativeEvent.which) {\n return String.fromCharCode(nativeEvent.which);\n }\n }\n return null;\n case 'topCompositionEnd':\n return useFallbackCompositionData ? null : nativeEvent.data;\n default:\n return null;\n }\n}\n\n/**\n * Extract a SyntheticInputEvent for `beforeInput`, based on either native\n * `textInput` or fallback behavior.\n *\n * @return {?object} A SyntheticInputEvent.\n */\nfunction extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var chars;\n\n if (canUseTextInputEvent) {\n chars = getNativeBeforeInputChars(topLevelType, nativeEvent);\n } else {\n chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);\n }\n\n // If no characters are being inserted, no BeforeInput event should\n // be fired.\n if (!chars) {\n return null;\n }\n\n var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);\n\n event.data = chars;\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n\n/**\n * Create an `onBeforeInput` event to match\n * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.\n *\n * This event plugin is based on the native `textInput` event\n * available in Chrome, Safari, Opera, and IE. This event fires after\n * `onKeyPress` and `onCompositionEnd`, but before `onInput`.\n *\n * `beforeInput` is spec'd but not implemented in any browsers, and\n * the `input` event does not provide any useful information about what has\n * actually been added, contrary to the spec. Thus, `textInput` is the best\n * available event to identify the characters that have actually been inserted\n * into the target node.\n *\n * This plugin is also responsible for emitting `composition` events, thus\n * allowing us to share composition fallback code for both `beforeInput` and\n * `composition` event types.\n */\nvar BeforeInputEventPlugin = {\n eventTypes: eventTypes,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];\n }\n};\n\n// Use to restore controlled state after a change event has fired.\n\nvar fiberHostComponent = null;\n\nvar ReactControlledComponentInjection = {\n injectFiberControlledHostComponent: function (hostComponentImpl) {\n // The fiber implementation doesn't use dynamic dispatch so we need to\n // inject the implementation.\n fiberHostComponent = hostComponentImpl;\n }\n};\n\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n if (!internalInstance) {\n // Unmounted\n return;\n }\n !(fiberHostComponent && typeof fiberHostComponent.restoreControlledState === 'function') ? invariant(false, 'Fiber needs to be injected to handle a fiber target for controlled events. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n var props = getFiberCurrentPropsFromNode(internalInstance.stateNode);\n fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);\n}\n\nvar injection$3 = ReactControlledComponentInjection;\n\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\n\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n\n restoreStateOfTarget(target);\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\nvar ReactControlledComponent = Object.freeze({\n\tinjection: injection$3,\n\tenqueueStateRestore: enqueueStateRestore,\n\trestoreStateIfNeeded: restoreStateIfNeeded\n});\n\n// Used as a way to call batchedUpdates when we don't have a reference to\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n\n// Defaults\nvar fiberBatchedUpdates = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar isNestingBatched = false;\nfunction batchedUpdates(fn, bookkeeping) {\n if (isNestingBatched) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state. Therefore, we add the target to\n // a queue of work.\n return fiberBatchedUpdates(fn, bookkeeping);\n }\n isNestingBatched = true;\n try {\n return fiberBatchedUpdates(fn, bookkeeping);\n } finally {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n isNestingBatched = false;\n restoreStateIfNeeded();\n }\n}\n\nvar ReactGenericBatchingInjection = {\n injectFiberBatchedUpdates: function (_batchedUpdates) {\n fiberBatchedUpdates = _batchedUpdates;\n }\n};\n\nvar injection$4 = ReactGenericBatchingInjection;\n\n/**\n * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary\n */\nvar supportedInputTypes = {\n color: true,\n date: true,\n datetime: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n password: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true\n};\n\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n\n if (nodeName === 'input') {\n return !!supportedInputTypes[elem.type];\n }\n\n if (nodeName === 'textarea') {\n return true;\n }\n\n return false;\n}\n\n/**\n * HTML nodeType values that represent the type of the node\n */\n\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\nfunction getEventTarget(nativeEvent) {\n var target = nativeEvent.target || nativeEvent.srcElement || window;\n\n // Normalize SVG element events #4963\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n }\n\n // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature = document.implementation && document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n\n var currentValue = '' + node[valueField];\n\n // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable,\n configurable: true,\n get: function () {\n return descriptor.get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n descriptor.set.call(this, value);\n }\n });\n\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n }\n\n // TODO: Once it's just Fiber we can move this to node._wrapperState\n node._valueTracker = trackValueOnNode(node);\n}\n\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node);\n // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n return false;\n}\n\nvar eventTypes$1 = {\n change: {\n phasedRegistrationNames: {\n bubbled: 'onChange',\n captured: 'onChangeCapture'\n },\n dependencies: ['topBlur', 'topChange', 'topClick', 'topFocus', 'topInput', 'topKeyDown', 'topKeyUp', 'topSelectionChange']\n }\n};\n\nfunction createAndAccumulateChangeEvent(inst, nativeEvent, target) {\n var event = SyntheticEvent$1.getPooled(eventTypes$1.change, inst, nativeEvent, target);\n event.type = 'change';\n // Flag this event loop as needing state restore.\n enqueueStateRestore(target);\n accumulateTwoPhaseDispatches(event);\n return event;\n}\n/**\n * For IE shims\n */\nvar activeElement = null;\nvar activeElementInst = null;\n\n/**\n * SECTION: handle `change` event\n */\nfunction shouldUseChangeEvent(elem) {\n var nodeName = elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';\n}\n\nfunction manualDispatchChangeEvent(nativeEvent) {\n var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent));\n\n // If change and propertychange bubbled, we'd just bind to it like all the\n // other events and have it go through ReactBrowserEventEmitter. Since it\n // doesn't, we manually listen for the events and so we have to enqueue and\n // process the abstract event manually.\n //\n // Batching is necessary here in order to ensure that all event handlers run\n // before the next rerender (including event handlers attached to ancestor\n // elements instead of directly on the input). Without this, controlled\n // components don't work properly in conjunction with event bubbling because\n // the component is rerendered and the value reverted before all the event\n // handlers can run. See https://github.com/facebook/react/issues/708.\n batchedUpdates(runEventInBatch, event);\n}\n\nfunction runEventInBatch(event) {\n enqueueEvents(event);\n processEventQueue(false);\n}\n\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance$1(targetInst);\n if (updateValueIfChanged(targetNode)) {\n return targetInst;\n }\n}\n\nfunction getTargetInstForChangeEvent(topLevelType, targetInst) {\n if (topLevelType === 'topChange') {\n return targetInst;\n }\n}\n\n/**\n * SECTION: handle `input` event\n */\nvar isInputEventSupported = false;\nif (ExecutionEnvironment.canUseDOM) {\n // IE9 claims to support the input event but fails to trigger it when\n // deleting text, so we ignore its input events.\n isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);\n}\n\n/**\n * (For IE <=9) Starts tracking propertychange events on the passed-in element\n * and override the value property so that we can distinguish user events from\n * value changes in JS.\n */\nfunction startWatchingForValueChange(target, targetInst) {\n activeElement = target;\n activeElementInst = targetInst;\n activeElement.attachEvent('onpropertychange', handlePropertyChange);\n}\n\n/**\n * (For IE <=9) Removes the event listeners from the currently-tracked element,\n * if any exists.\n */\nfunction stopWatchingForValueChange() {\n if (!activeElement) {\n return;\n }\n activeElement.detachEvent('onpropertychange', handlePropertyChange);\n activeElement = null;\n activeElementInst = null;\n}\n\n/**\n * (For IE <=9) Handles a propertychange event, sending a `change` event if\n * the value of the active element has changed.\n */\nfunction handlePropertyChange(nativeEvent) {\n if (nativeEvent.propertyName !== 'value') {\n return;\n }\n if (getInstIfValueChanged(activeElementInst)) {\n manualDispatchChangeEvent(nativeEvent);\n }\n}\n\nfunction handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {\n if (topLevelType === 'topFocus') {\n // In IE9, propertychange fires for most input events but is buggy and\n // doesn't fire when text is deleted, but conveniently, selectionchange\n // appears to fire in all of the remaining cases so we catch those and\n // forward the event if the value has changed\n // In either case, we don't want to call the event handler if the value\n // is changed from JS so we redefine a setter for `.value` that updates\n // our activeElementValue variable, allowing us to ignore those changes\n //\n // stopWatching() should be a noop here but we call it just in case we\n // missed a blur event somehow.\n stopWatchingForValueChange();\n startWatchingForValueChange(target, targetInst);\n } else if (topLevelType === 'topBlur') {\n stopWatchingForValueChange();\n }\n}\n\n// For IE8 and IE9.\nfunction getTargetInstForInputEventPolyfill(topLevelType, targetInst) {\n if (topLevelType === 'topSelectionChange' || topLevelType === 'topKeyUp' || topLevelType === 'topKeyDown') {\n // On the selectionchange event, the target is just document which isn't\n // helpful for us so just check activeElement instead.\n //\n // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire\n // propertychange on the first input event after setting `value` from a\n // script and fires only keydown, keypress, keyup. Catching keyup usually\n // gets it and catching keydown lets us fire an event for the first\n // keystroke if user does a key repeat (it'll be a little delayed: right\n // before the second keystroke). Other input methods (e.g., paste) seem to\n // fire selectionchange normally.\n return getInstIfValueChanged(activeElementInst);\n }\n}\n\n/**\n * SECTION: handle `click` event\n */\nfunction shouldUseClickEvent(elem) {\n // Use the `click` event to detect changes to checkbox and radio inputs.\n // This approach works across all browsers, whereas `change` does not fire\n // until `blur` in IE8.\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');\n}\n\nfunction getTargetInstForClickEvent(topLevelType, targetInst) {\n if (topLevelType === 'topClick') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {\n if (topLevelType === 'topInput' || topLevelType === 'topChange') {\n return getInstIfValueChanged(targetInst);\n }\n}\n\nfunction handleControlledInputBlur(inst, node) {\n // TODO: In IE, inst is occasionally null. Why?\n if (inst == null) {\n return;\n }\n\n // Fiber and ReactDOM keep wrapper state in separate places\n var state = inst._wrapperState || node._wrapperState;\n\n if (!state || !state.controlled || node.type !== 'number') {\n return;\n }\n\n // If controlled, assign the value attribute to the current value on blur\n var value = '' + node.value;\n if (node.getAttribute('value') !== value) {\n node.setAttribute('value', value);\n }\n}\n\n/**\n * This plugin creates an `onChange` event that normalizes change events\n * across form elements. This event fires at a time when it's possible to\n * change the element's value without seeing a flicker.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - select\n */\nvar ChangeEventPlugin = {\n eventTypes: eventTypes$1,\n\n _isInputEventSupported: isInputEventSupported,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n var getTargetInstFunc, handleEventFunc;\n if (shouldUseChangeEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForChangeEvent;\n } else if (isTextInputElement(targetNode)) {\n if (isInputEventSupported) {\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n } else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n handleEventFunc = handleEventsForInputEventPolyfill;\n }\n } else if (shouldUseClickEvent(targetNode)) {\n getTargetInstFunc = getTargetInstForClickEvent;\n }\n\n if (getTargetInstFunc) {\n var inst = getTargetInstFunc(topLevelType, targetInst);\n if (inst) {\n var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);\n return event;\n }\n }\n\n if (handleEventFunc) {\n handleEventFunc(topLevelType, targetNode, targetInst);\n }\n\n // When blurring, set the value attribute for number inputs\n if (topLevelType === 'topBlur') {\n handleControlledInputBlur(targetInst, targetNode);\n }\n }\n};\n\n/**\n * Module that is injectable into `EventPluginHub`, that specifies a\n * deterministic ordering of `EventPlugin`s. A convenient way to reason about\n * plugins, without having to package every one of them. This is better than\n * having plugins be ordered in the same order that they are injected because\n * that ordering would be influenced by the packaging order.\n * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that\n * preventing default on events is convenient in `SimpleEventPlugin` handlers.\n */\nvar DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'TapEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];\n\n/**\n * @interface UIEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar UIEventInterface = {\n view: null,\n detail: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticUIEvent, UIEventInterface);\n\n/**\n * Translation from modifier key to the associated property in the event.\n * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers\n */\n\nvar modifierKeyToProp = {\n Alt: 'altKey',\n Control: 'ctrlKey',\n Meta: 'metaKey',\n Shift: 'shiftKey'\n};\n\n// IE8 does not implement getModifierState so we simply map it to the only\n// modifier keys exposed by the event itself, does not support Lock-keys.\n// Currently, all major browsers except Chrome seems to support Lock-keys.\nfunction modifierStateGetter(keyArg) {\n var syntheticEvent = this;\n var nativeEvent = syntheticEvent.nativeEvent;\n if (nativeEvent.getModifierState) {\n return nativeEvent.getModifierState(keyArg);\n }\n var keyProp = modifierKeyToProp[keyArg];\n return keyProp ? !!nativeEvent[keyProp] : false;\n}\n\nfunction getEventModifierState(nativeEvent) {\n return modifierStateGetter;\n}\n\n/**\n * @interface MouseEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar MouseEventInterface = {\n screenX: null,\n screenY: null,\n clientX: null,\n clientY: null,\n pageX: null,\n pageY: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n getModifierState: getEventModifierState,\n button: null,\n buttons: null,\n relatedTarget: function (event) {\n return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);\n\nvar eventTypes$2 = {\n mouseEnter: {\n registrationName: 'onMouseEnter',\n dependencies: ['topMouseOut', 'topMouseOver']\n },\n mouseLeave: {\n registrationName: 'onMouseLeave',\n dependencies: ['topMouseOut', 'topMouseOver']\n }\n};\n\nvar EnterLeaveEventPlugin = {\n eventTypes: eventTypes$2,\n\n /**\n * For almost every interaction we care about, there will be both a top-level\n * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that\n * we do not extract duplicate events. However, moving the mouse into the\n * browser from outside will not fire a `mouseout` event. In this case, we use\n * the `mouseover` top-level event.\n */\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n if (topLevelType === 'topMouseOver' && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {\n return null;\n }\n if (topLevelType !== 'topMouseOut' && topLevelType !== 'topMouseOver') {\n // Must not be a mouse in or mouse out - ignoring.\n return null;\n }\n\n var win;\n if (nativeEventTarget.window === nativeEventTarget) {\n // `nativeEventTarget` is probably a window object.\n win = nativeEventTarget;\n } else {\n // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.\n var doc = nativeEventTarget.ownerDocument;\n if (doc) {\n win = doc.defaultView || doc.parentWindow;\n } else {\n win = window;\n }\n }\n\n var from;\n var to;\n if (topLevelType === 'topMouseOut') {\n from = targetInst;\n var related = nativeEvent.relatedTarget || nativeEvent.toElement;\n to = related ? getClosestInstanceFromNode(related) : null;\n } else {\n // Moving to a node from outside the window.\n from = null;\n to = targetInst;\n }\n\n if (from === to) {\n // Nothing pertains to our managed components.\n return null;\n }\n\n var fromNode = from == null ? win : getNodeFromInstance$1(from);\n var toNode = to == null ? win : getNodeFromInstance$1(to);\n\n var leave = SyntheticMouseEvent.getPooled(eventTypes$2.mouseLeave, from, nativeEvent, nativeEventTarget);\n leave.type = 'mouseleave';\n leave.target = fromNode;\n leave.relatedTarget = toNode;\n\n var enter = SyntheticMouseEvent.getPooled(eventTypes$2.mouseEnter, to, nativeEvent, nativeEventTarget);\n enter.type = 'mouseenter';\n enter.target = toNode;\n enter.relatedTarget = fromNode;\n\n accumulateEnterLeaveDispatches(leave, enter, from, to);\n\n return [leave, enter];\n }\n};\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\n\n/**\n * This API should be called `delete` but we'd have to make sure to always\n * transform these to strings for IE support. When this transform is fully\n * supported we can rename it.\n */\n\n\nfunction get(key) {\n return key._reactInternalFiber;\n}\n\nfunction has(key) {\n return key._reactInternalFiber !== undefined;\n}\n\nfunction set(key, value) {\n key._reactInternalFiber = value;\n}\n\nvar ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nvar ReactCurrentOwner = ReactInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame = ReactInternals.ReactDebugCurrentFrame;\n\nfunction getComponentName(fiber) {\n var type = fiber.type;\n\n if (typeof type === 'string') {\n return type;\n }\n if (typeof type === 'function') {\n return type.displayName || type.name;\n }\n return null;\n}\n\n// Don't change these two values:\nvar NoEffect = 0; // 0b00000000\nvar PerformedWork = 1; // 0b00000001\n\n// You can change the rest (and add more).\nvar Placement = 2; // 0b00000010\nvar Update = 4; // 0b00000100\nvar PlacementAndUpdate = 6; // 0b00000110\nvar Deletion = 8; // 0b00001000\nvar ContentReset = 16; // 0b00010000\nvar Callback = 32; // 0b00100000\nvar Err = 64; // 0b01000000\nvar Ref = 128; // 0b10000000\n\nvar MOUNTING = 1;\nvar MOUNTED = 2;\nvar UNMOUNTED = 3;\n\nfunction isFiberMountedImpl(fiber) {\n var node = fiber;\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n if ((node.effectTag & Placement) !== NoEffect) {\n return MOUNTING;\n }\n while (node['return']) {\n node = node['return'];\n if ((node.effectTag & Placement) !== NoEffect) {\n return MOUNTING;\n }\n }\n } else {\n while (node['return']) {\n node = node['return'];\n }\n }\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return MOUNTED;\n }\n // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n return UNMOUNTED;\n}\n\nfunction isFiberMounted(fiber) {\n return isFiberMountedImpl(fiber) === MOUNTED;\n}\n\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n warning(instance._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.', getComponentName(ownerFiber) || 'A component');\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n if (!fiber) {\n return false;\n }\n return isFiberMountedImpl(fiber) === MOUNTED;\n}\n\nfunction assertIsMounted(fiber) {\n !(isFiberMountedImpl(fiber) === MOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var state = isFiberMountedImpl(fiber);\n !(state !== UNMOUNTED) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n if (state === MOUNTING) {\n return null;\n }\n return fiber;\n }\n // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n var a = fiber;\n var b = alternate;\n while (true) {\n var parentA = a['return'];\n var parentB = parentA ? parentA.alternate : null;\n if (!parentA || !parentB) {\n // We're at the root.\n break;\n }\n\n // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n child = child.sibling;\n }\n // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n invariant(false, 'Unable to find node on an unmounted component.');\n }\n\n if (a['return'] !== b['return']) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n _child = _child.sibling;\n }\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n _child = _child.sibling;\n }\n !didFindChild ? invariant(false, 'Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.') : void 0;\n }\n }\n\n !(a.alternate === b) ? invariant(false, 'Return fibers should always be each others\\' alternates. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n !(a.tag === HostRoot) ? invariant(false, 'Unable to find node on an unmounted component.') : void 0;\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n }\n // Otherwise B has to be current branch.\n return alternate;\n}\n\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n if (!currentParent) {\n return null;\n }\n\n // Next we'll drill down this component to find the first HostComponent/Text.\n var node = currentParent;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === currentParent) {\n return null;\n }\n while (!node.sibling) {\n if (!node['return'] || node['return'] === currentParent) {\n return null;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n return null;\n}\n\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n if (!currentParent) {\n return null;\n }\n\n // Next we'll drill down this component to find the first HostComponent/Text.\n var node = currentParent;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === currentParent) {\n return null;\n }\n while (!node.sibling) {\n if (!node['return'] || node['return'] === currentParent) {\n return null;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n return null;\n}\n\nvar CALLBACK_BOOKKEEPING_POOL_SIZE = 10;\nvar callbackBookkeepingPool = [];\n\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\nfunction findRootContainerNode(inst) {\n // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n while (inst['return']) {\n inst = inst['return'];\n }\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n return inst.stateNode.containerInfo;\n}\n\n// Used to store ancestor hierarchy in top level callback\nfunction getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {\n if (callbackBookkeepingPool.length) {\n var instance = callbackBookkeepingPool.pop();\n instance.topLevelType = topLevelType;\n instance.nativeEvent = nativeEvent;\n instance.targetInst = targetInst;\n return instance;\n }\n return {\n topLevelType: topLevelType,\n nativeEvent: nativeEvent,\n targetInst: targetInst,\n ancestors: []\n };\n}\n\nfunction releaseTopLevelCallbackBookKeeping(instance) {\n instance.topLevelType = null;\n instance.nativeEvent = null;\n instance.targetInst = null;\n instance.ancestors.length = 0;\n if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {\n callbackBookkeepingPool.push(instance);\n }\n}\n\nfunction handleTopLevelImpl(bookKeeping) {\n var targetInst = bookKeeping.targetInst;\n\n // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n var ancestor = targetInst;\n do {\n if (!ancestor) {\n bookKeeping.ancestors.push(ancestor);\n break;\n }\n var root = findRootContainerNode(ancestor);\n if (!root) {\n break;\n }\n bookKeeping.ancestors.push(ancestor);\n ancestor = getClosestInstanceFromNode(root);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n _handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));\n }\n}\n\n// TODO: can we stop exporting these?\nvar _enabled = true;\nvar _handleTopLevel = void 0;\n\nfunction setHandleTopLevel(handleTopLevel) {\n _handleTopLevel = handleTopLevel;\n}\n\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\n\nfunction isEnabled() {\n return _enabled;\n}\n\n/**\n * Traps top-level events by using event bubbling.\n *\n * @param {string} topLevelType Record from `BrowserEventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\nfunction trapBubbledEvent(topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.listen(element, handlerBaseName, dispatchEvent.bind(null, topLevelType));\n}\n\n/**\n * Traps a top-level event by using event capturing.\n *\n * @param {string} topLevelType Record from `BrowserEventConstants`.\n * @param {string} handlerBaseName Event name (e.g. \"click\").\n * @param {object} element Element on which to attach listener.\n * @return {?object} An object with a remove function which will forcefully\n * remove the listener.\n * @internal\n */\nfunction trapCapturedEvent(topLevelType, handlerBaseName, element) {\n if (!element) {\n return null;\n }\n return EventListener.capture(element, handlerBaseName, dispatchEvent.bind(null, topLevelType));\n}\n\nfunction dispatchEvent(topLevelType, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n if (targetInst !== null && typeof targetInst.tag === 'number' && !isFiberMounted(targetInst)) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n\n var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst);\n\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n batchedUpdates(handleTopLevelImpl, bookKeeping);\n } finally {\n releaseTopLevelCallbackBookKeeping(bookKeeping);\n }\n}\n\nvar ReactDOMEventListener = Object.freeze({\n\tget _enabled () { return _enabled; },\n\tget _handleTopLevel () { return _handleTopLevel; },\n\tsetHandleTopLevel: setHandleTopLevel,\n\tsetEnabled: setEnabled,\n\tisEnabled: isEnabled,\n\ttrapBubbledEvent: trapBubbledEvent,\n\ttrapCapturedEvent: trapCapturedEvent,\n\tdispatchEvent: dispatchEvent\n});\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\nvar prefixedEventNames = {};\n\n/**\n * Element to check for prefixes on.\n */\nvar style = {};\n\n/**\n * Bootstrap if a DOM exists.\n */\nif (ExecutionEnvironment.canUseDOM) {\n style = document.createElement('div').style;\n\n // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n }\n\n // Same as above\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return '';\n}\n\n/**\n * Types of raw signals from the browser caught at the top level.\n *\n * For events like 'submit' which don't consistently bubble (which we\n * trap at a lower node than `document`), binding at `document` would\n * cause duplicate events so we don't include them here.\n */\nvar topLevelTypes$1 = {\n topAbort: 'abort',\n topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',\n topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',\n topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',\n topBlur: 'blur',\n topCancel: 'cancel',\n topCanPlay: 'canplay',\n topCanPlayThrough: 'canplaythrough',\n topChange: 'change',\n topClick: 'click',\n topClose: 'close',\n topCompositionEnd: 'compositionend',\n topCompositionStart: 'compositionstart',\n topCompositionUpdate: 'compositionupdate',\n topContextMenu: 'contextmenu',\n topCopy: 'copy',\n topCut: 'cut',\n topDoubleClick: 'dblclick',\n topDrag: 'drag',\n topDragEnd: 'dragend',\n topDragEnter: 'dragenter',\n topDragExit: 'dragexit',\n topDragLeave: 'dragleave',\n topDragOver: 'dragover',\n topDragStart: 'dragstart',\n topDrop: 'drop',\n topDurationChange: 'durationchange',\n topEmptied: 'emptied',\n topEncrypted: 'encrypted',\n topEnded: 'ended',\n topError: 'error',\n topFocus: 'focus',\n topInput: 'input',\n topKeyDown: 'keydown',\n topKeyPress: 'keypress',\n topKeyUp: 'keyup',\n topLoadedData: 'loadeddata',\n topLoad: 'load',\n topLoadedMetadata: 'loadedmetadata',\n topLoadStart: 'loadstart',\n topMouseDown: 'mousedown',\n topMouseMove: 'mousemove',\n topMouseOut: 'mouseout',\n topMouseOver: 'mouseover',\n topMouseUp: 'mouseup',\n topPaste: 'paste',\n topPause: 'pause',\n topPlay: 'play',\n topPlaying: 'playing',\n topProgress: 'progress',\n topRateChange: 'ratechange',\n topScroll: 'scroll',\n topSeeked: 'seeked',\n topSeeking: 'seeking',\n topSelectionChange: 'selectionchange',\n topStalled: 'stalled',\n topSuspend: 'suspend',\n topTextInput: 'textInput',\n topTimeUpdate: 'timeupdate',\n topToggle: 'toggle',\n topTouchCancel: 'touchcancel',\n topTouchEnd: 'touchend',\n topTouchMove: 'touchmove',\n topTouchStart: 'touchstart',\n topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',\n topVolumeChange: 'volumechange',\n topWaiting: 'waiting',\n topWheel: 'wheel'\n};\n\nvar BrowserEventConstants = {\n topLevelTypes: topLevelTypes$1\n};\n\nfunction runEventQueueInBatch(events) {\n enqueueEvents(events);\n processEventQueue(false);\n}\n\n/**\n * Streams a fired top-level event to `EventPluginHub` where plugins have the\n * opportunity to create `ReactEvent`s to be dispatched.\n */\nfunction handleTopLevel(topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);\n runEventQueueInBatch(events);\n}\n\nvar topLevelTypes = BrowserEventConstants.topLevelTypes;\n\n/**\n * Summary of `ReactBrowserEventEmitter` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactDOMEventListener, which is injected and can therefore support\n * pluggable event sources. This is the only work that occurs in the main\n * thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginHub`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginHub` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginHub` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|EventPluginHub| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar alreadyListeningTo = {};\nvar reactTopListenersCounter = 0;\n\n/**\n * To ensure no conflicts with other potential React instances on the page\n */\nvar topListenersIDKey = '_reactListenersID' + ('' + Math.random()).slice(2);\n\nfunction getListeningForDocument(mountAt) {\n // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`\n // directly.\n if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {\n mountAt[topListenersIDKey] = reactTopListenersCounter++;\n alreadyListeningTo[mountAt[topListenersIDKey]] = {};\n }\n return alreadyListeningTo[mountAt[topListenersIDKey]];\n}\n\n/**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} contentDocumentHandle Document which owns the container\n */\nfunction listenTo(registrationName, contentDocumentHandle) {\n var mountAt = contentDocumentHandle;\n var isListening = getListeningForDocument(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n if (dependency === 'topScroll') {\n trapCapturedEvent('topScroll', 'scroll', mountAt);\n } else if (dependency === 'topFocus' || dependency === 'topBlur') {\n trapCapturedEvent('topFocus', 'focus', mountAt);\n trapCapturedEvent('topBlur', 'blur', mountAt);\n\n // to make sure blur and focus event listeners are only attached once\n isListening.topBlur = true;\n isListening.topFocus = true;\n } else if (dependency === 'topCancel') {\n if (isEventSupported('cancel', true)) {\n trapCapturedEvent('topCancel', 'cancel', mountAt);\n }\n isListening.topCancel = true;\n } else if (dependency === 'topClose') {\n if (isEventSupported('close', true)) {\n trapCapturedEvent('topClose', 'close', mountAt);\n }\n isListening.topClose = true;\n } else if (topLevelTypes.hasOwnProperty(dependency)) {\n trapBubbledEvent(dependency, topLevelTypes[dependency], mountAt);\n }\n\n isListening[dependency] = true;\n }\n }\n}\n\nfunction isListeningToAllDependencies(registrationName, mountAt) {\n var isListening = getListeningForDocument(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Given any node return the first leaf node without children.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {DOMElement|DOMTextNode}\n */\nfunction getLeafNode(node) {\n while (node && node.firstChild) {\n node = node.firstChild;\n }\n return node;\n}\n\n/**\n * Get the next sibling within a container. This will walk up the\n * DOM if a node's siblings have been exhausted.\n *\n * @param {DOMElement|DOMTextNode} node\n * @return {?DOMElement|DOMTextNode}\n */\nfunction getSiblingNode(node) {\n while (node) {\n if (node.nextSibling) {\n return node.nextSibling;\n }\n node = node.parentNode;\n }\n}\n\n/**\n * Get object describing the nodes which contain characters at offset.\n *\n * @param {DOMElement|DOMTextNode} root\n * @param {number} offset\n * @return {?object}\n */\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n var nodeStart = 0;\n var nodeEnd = 0;\n\n while (node) {\n if (node.nodeType === TEXT_NODE) {\n nodeEnd = nodeStart + node.textContent.length;\n\n if (nodeStart <= offset && nodeEnd >= offset) {\n return {\n node: node,\n offset: offset - nodeStart\n };\n }\n\n nodeStart = nodeEnd;\n }\n\n node = getLeafNode(getSiblingNode(node));\n }\n}\n\n/**\n * @param {DOMElement} outerNode\n * @return {?object}\n */\nfunction getOffsets(outerNode) {\n var selection = window.getSelection && window.getSelection();\n\n if (!selection || selection.rangeCount === 0) {\n return null;\n }\n\n var anchorNode = selection.anchorNode,\n anchorOffset = selection.anchorOffset,\n focusNode$$1 = selection.focusNode,\n focusOffset = selection.focusOffset;\n\n // In Firefox, anchorNode and focusNode can be \"anonymous divs\", e.g. the\n // up/down buttons on an . Anonymous divs do not seem to\n // expose properties, triggering a \"Permission denied error\" if any of its\n // properties are accessed. The only seemingly possible way to avoid erroring\n // is to access a property that typically works for non-anonymous divs and\n // catch any error that may otherwise arise. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=208427\n\n try {\n /* eslint-disable no-unused-expressions */\n anchorNode.nodeType;\n focusNode$$1.nodeType;\n /* eslint-enable no-unused-expressions */\n } catch (e) {\n return null;\n }\n\n return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode$$1, focusOffset);\n}\n\n/**\n * Returns {start, end} where `start` is the character/codepoint index of\n * (anchorNode, anchorOffset) within the textContent of `outerNode`, and\n * `end` is the index of (focusNode, focusOffset).\n *\n * Returns null if you pass in garbage input but we should probably just crash.\n *\n * Exported only for testing.\n */\nfunction getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode$$1, focusOffset) {\n var length = 0;\n var start = -1;\n var end = -1;\n var indexWithinAnchor = 0;\n var indexWithinFocus = 0;\n var node = outerNode;\n var parentNode = null;\n\n outer: while (true) {\n var next = null;\n\n while (true) {\n if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {\n start = length + anchorOffset;\n }\n if (node === focusNode$$1 && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {\n end = length + focusOffset;\n }\n\n if (node.nodeType === TEXT_NODE) {\n length += node.nodeValue.length;\n }\n\n if ((next = node.firstChild) === null) {\n break;\n }\n // Moving from `node` to its first child `next`.\n parentNode = node;\n node = next;\n }\n\n while (true) {\n if (node === outerNode) {\n // If `outerNode` has children, this is always the second time visiting\n // it. If it has no children, this is still the first loop, and the only\n // valid selection is anchorNode and focusNode both equal to this node\n // and both offsets 0, in which case we will have handled above.\n break outer;\n }\n if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {\n start = length;\n }\n if (parentNode === focusNode$$1 && ++indexWithinFocus === focusOffset) {\n end = length;\n }\n if ((next = node.nextSibling) !== null) {\n break;\n }\n node = parentNode;\n parentNode = node.parentNode;\n }\n\n // Moving from `node` to its next sibling `next`.\n node = next;\n }\n\n if (start === -1 || end === -1) {\n // This should never happen. (Would happen if the anchor/focus nodes aren't\n // actually inside the passed-in node.)\n return null;\n }\n\n return {\n start: start,\n end: end\n };\n}\n\n/**\n * In modern non-IE browsers, we can support both forward and backward\n * selections.\n *\n * Note: IE10+ supports the Selection object, but it does not support\n * the `extend` method, which means that even in modern IE, it's not possible\n * to programmatically create a backward selection. Thus, for all IE\n * versions, we use the old IE API to create our selections.\n *\n * @param {DOMElement|DOMTextNode} node\n * @param {object} offsets\n */\nfunction setOffsets(node, offsets) {\n if (!window.getSelection) {\n return;\n }\n\n var selection = window.getSelection();\n var length = node[getTextContentAccessor()].length;\n var start = Math.min(offsets.start, length);\n var end = offsets.end === undefined ? start : Math.min(offsets.end, length);\n\n // IE 11 uses modern selection, but doesn't support the extend method.\n // Flip backward selections, so we can set with a single range.\n if (!selection.extend && start > end) {\n var temp = end;\n end = start;\n start = temp;\n }\n\n var startMarker = getNodeForCharacterOffset(node, start);\n var endMarker = getNodeForCharacterOffset(node, end);\n\n if (startMarker && endMarker) {\n if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {\n return;\n }\n var range = document.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n\n if (start > end) {\n selection.addRange(range);\n selection.extend(endMarker.node, endMarker.offset);\n } else {\n range.setEnd(endMarker.node, endMarker.offset);\n selection.addRange(range);\n }\n }\n}\n\nfunction isInDocument(node) {\n return containsNode(document.documentElement, node);\n}\n\n/**\n * @ReactInputSelection: React input selection module. Based on Selection.js,\n * but modified to be suitable for react and has a couple of bug fixes (doesn't\n * assume buttons have range selections allowed).\n * Input selection module for React.\n */\n\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');\n}\n\nfunction getSelectionInformation() {\n var focusedElem = getActiveElement();\n return {\n focusedElem: focusedElem,\n selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection$1(focusedElem) : null\n };\n}\n\n/**\n * @restoreSelection: If any selection information was potentially lost,\n * restore it. This is useful when performing operations that could remove dom\n * nodes and place them back in, resulting in focus being lost.\n */\nfunction restoreSelection(priorSelectionInformation) {\n var curFocusedElem = getActiveElement();\n var priorFocusedElem = priorSelectionInformation.focusedElem;\n var priorSelectionRange = priorSelectionInformation.selectionRange;\n if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {\n if (hasSelectionCapabilities(priorFocusedElem)) {\n setSelection(priorFocusedElem, priorSelectionRange);\n }\n\n // Focusing a node can change the scroll position, which is undesirable\n var ancestors = [];\n var ancestor = priorFocusedElem;\n while (ancestor = ancestor.parentNode) {\n if (ancestor.nodeType === ELEMENT_NODE) {\n ancestors.push({\n element: ancestor,\n left: ancestor.scrollLeft,\n top: ancestor.scrollTop\n });\n }\n }\n\n focusNode(priorFocusedElem);\n\n for (var i = 0; i < ancestors.length; i++) {\n var info = ancestors[i];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n}\n\n/**\n * @getSelection: Gets the selection bounds of a focused textarea, input or\n * contentEditable node.\n * -@input: Look up selection bounds of this input\n * -@return {start: selectionStart, end: selectionEnd}\n */\nfunction getSelection$1(input) {\n var selection = void 0;\n\n if ('selectionStart' in input) {\n // Modern browser with input or textarea.\n selection = {\n start: input.selectionStart,\n end: input.selectionEnd\n };\n } else {\n // Content editable or old IE textarea.\n selection = getOffsets(input);\n }\n\n return selection || { start: 0, end: 0 };\n}\n\n/**\n * @setSelection: Sets the selection bounds of a textarea or input and focuses\n * the input.\n * -@input Set selection bounds of this input or textarea\n * -@offsets Object of same form that is returned from get*\n */\nfunction setSelection(input, offsets) {\n var start = offsets.start,\n end = offsets.end;\n\n if (end === undefined) {\n end = start;\n }\n\n if ('selectionStart' in input) {\n input.selectionStart = start;\n input.selectionEnd = Math.min(end, input.value.length);\n } else {\n setOffsets(input, offsets);\n }\n}\n\nvar skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;\n\nvar eventTypes$3 = {\n select: {\n phasedRegistrationNames: {\n bubbled: 'onSelect',\n captured: 'onSelectCapture'\n },\n dependencies: ['topBlur', 'topContextMenu', 'topFocus', 'topKeyDown', 'topKeyUp', 'topMouseDown', 'topMouseUp', 'topSelectionChange']\n }\n};\n\nvar activeElement$1 = null;\nvar activeElementInst$1 = null;\nvar lastSelection = null;\nvar mouseDown = false;\n\n/**\n * Get an object which is a unique representation of the current selection.\n *\n * The return value will not be consistent across nodes or browsers, but\n * two identical selections on the same node will return identical objects.\n *\n * @param {DOMElement} node\n * @return {object}\n */\nfunction getSelection(node) {\n if ('selectionStart' in node && hasSelectionCapabilities(node)) {\n return {\n start: node.selectionStart,\n end: node.selectionEnd\n };\n } else if (window.getSelection) {\n var selection = window.getSelection();\n return {\n anchorNode: selection.anchorNode,\n anchorOffset: selection.anchorOffset,\n focusNode: selection.focusNode,\n focusOffset: selection.focusOffset\n };\n }\n}\n\n/**\n * Poll selection to see whether it's changed.\n *\n * @param {object} nativeEvent\n * @return {?SyntheticEvent}\n */\nfunction constructSelectEvent(nativeEvent, nativeEventTarget) {\n // Ensure we have the right element, and that the user is not dragging a\n // selection (this matches native `select` event behavior). In HTML5, select\n // fires only on input and textarea thus if there's no focused element we\n // won't dispatch.\n if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement()) {\n return null;\n }\n\n // Only fire when selection has actually changed.\n var currentSelection = getSelection(activeElement$1);\n if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {\n lastSelection = currentSelection;\n\n var syntheticEvent = SyntheticEvent$1.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);\n\n syntheticEvent.type = 'select';\n syntheticEvent.target = activeElement$1;\n\n accumulateTwoPhaseDispatches(syntheticEvent);\n\n return syntheticEvent;\n }\n\n return null;\n}\n\n/**\n * This plugin creates an `onSelect` event that normalizes select events\n * across form elements.\n *\n * Supported elements are:\n * - input (see `isTextInputElement`)\n * - textarea\n * - contentEditable\n *\n * This differs from native browser implementations in the following ways:\n * - Fires on contentEditable fields as well as inputs.\n * - Fires for collapsed selection.\n * - Fires after user input.\n */\nvar SelectEventPlugin = {\n eventTypes: eventTypes$3,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : nativeEventTarget.nodeType === DOCUMENT_NODE ? nativeEventTarget : nativeEventTarget.ownerDocument;\n // Track whether all listeners exists for this plugin. If none exist, we do\n // not extract events. See #3639.\n if (!doc || !isListeningToAllDependencies('onSelect', doc)) {\n return null;\n }\n\n var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;\n\n switch (topLevelType) {\n // Track the input node that has focus.\n case 'topFocus':\n if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {\n activeElement$1 = targetNode;\n activeElementInst$1 = targetInst;\n lastSelection = null;\n }\n break;\n case 'topBlur':\n activeElement$1 = null;\n activeElementInst$1 = null;\n lastSelection = null;\n break;\n // Don't fire the event while the user is dragging. This matches the\n // semantics of the native select event.\n case 'topMouseDown':\n mouseDown = true;\n break;\n case 'topContextMenu':\n case 'topMouseUp':\n mouseDown = false;\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n // Chrome and IE fire non-standard event when selection is changed (and\n // sometimes when it hasn't). IE's event fires out of order with respect\n // to key and input events on deletion, so we discard it.\n //\n // Firefox doesn't support selectionchange, so check selection status\n // after each key entry. The selection changes after keydown and before\n // keyup, but we check on keydown as well in the case of holding down a\n // key, when multiple keydown events are fired but only one keyup is.\n // This is also our approach for IE handling, for the reason above.\n case 'topSelectionChange':\n if (skipSelectionChangeEvent) {\n break;\n }\n // falls through\n case 'topKeyDown':\n case 'topKeyUp':\n return constructSelectEvent(nativeEvent, nativeEventTarget);\n }\n\n return null;\n }\n};\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface\n * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent\n */\nvar AnimationEventInterface = {\n animationName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/clipboard-apis/\n */\nvar ClipboardEventInterface = {\n clipboardData: function (event) {\n return 'clipboardData' in event ? event.clipboardData : window.clipboardData;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);\n\n/**\n * @interface FocusEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar FocusEventInterface = {\n relatedTarget: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);\n\n/**\n * `charCode` represents the actual \"character code\" and is safe to use with\n * `String.fromCharCode`. As such, only keys that correspond to printable\n * characters produce a valid `charCode`, the only exception to this is Enter.\n * The Tab-key is considered non-printable and does not have a `charCode`,\n * presumably because it does not produce a tab-character in browsers.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {number} Normalized `charCode` property.\n */\nfunction getEventCharCode(nativeEvent) {\n var charCode;\n var keyCode = nativeEvent.keyCode;\n\n if ('charCode' in nativeEvent) {\n charCode = nativeEvent.charCode;\n\n // FF does not set `charCode` for the Enter-key, check against `keyCode`.\n if (charCode === 0 && keyCode === 13) {\n charCode = 13;\n }\n } else {\n // IE8 does not implement `charCode`, but `keyCode` has the correct value.\n charCode = keyCode;\n }\n\n // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.\n // Must not discard the (non-)printable Enter-key.\n if (charCode >= 32 || charCode === 13) {\n return charCode;\n }\n\n return 0;\n}\n\n/**\n * Normalization of deprecated HTML5 `key` values\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar normalizeKey = {\n Esc: 'Escape',\n Spacebar: ' ',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Win: 'OS',\n Menu: 'ContextMenu',\n Apps: 'ContextMenu',\n Scroll: 'ScrollLock',\n MozPrintableKey: 'Unidentified'\n};\n\n/**\n * Translation from legacy `keyCode` to HTML5 `key`\n * Only special keys supported, all others depend on keyboard layout or browser\n * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names\n */\nvar translateToKey = {\n '8': 'Backspace',\n '9': 'Tab',\n '12': 'Clear',\n '13': 'Enter',\n '16': 'Shift',\n '17': 'Control',\n '18': 'Alt',\n '19': 'Pause',\n '20': 'CapsLock',\n '27': 'Escape',\n '32': ' ',\n '33': 'PageUp',\n '34': 'PageDown',\n '35': 'End',\n '36': 'Home',\n '37': 'ArrowLeft',\n '38': 'ArrowUp',\n '39': 'ArrowRight',\n '40': 'ArrowDown',\n '45': 'Insert',\n '46': 'Delete',\n '112': 'F1',\n '113': 'F2',\n '114': 'F3',\n '115': 'F4',\n '116': 'F5',\n '117': 'F6',\n '118': 'F7',\n '119': 'F8',\n '120': 'F9',\n '121': 'F10',\n '122': 'F11',\n '123': 'F12',\n '144': 'NumLock',\n '145': 'ScrollLock',\n '224': 'Meta'\n};\n\n/**\n * @param {object} nativeEvent Native browser event.\n * @return {string} Normalized `key` property.\n */\nfunction getEventKey(nativeEvent) {\n if (nativeEvent.key) {\n // Normalize inconsistent values reported by browsers due to\n // implementations of a working draft specification.\n\n // FireFox implements `key` but returns `MozPrintableKey` for all\n // printable characters (normalized to `Unidentified`), ignore it.\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (key !== 'Unidentified') {\n return key;\n }\n }\n\n // Browser does not implement `key`, polyfill as much of it as we can.\n if (nativeEvent.type === 'keypress') {\n var charCode = getEventCharCode(nativeEvent);\n\n // The enter-key is technically both printable and non-printable and can\n // thus be captured by `keypress`, no other non-printable key should.\n return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);\n }\n if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {\n // While user keyboard layout determines the actual meaning of each\n // `keyCode` value, almost all function keys have a universal value.\n return translateToKey[nativeEvent.keyCode] || 'Unidentified';\n }\n return '';\n}\n\n/**\n * @interface KeyboardEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar KeyboardEventInterface = {\n key: getEventKey,\n location: null,\n ctrlKey: null,\n shiftKey: null,\n altKey: null,\n metaKey: null,\n repeat: null,\n locale: null,\n getModifierState: getEventModifierState,\n // Legacy Interface\n charCode: function (event) {\n // `charCode` is the result of a KeyPress event and represents the value of\n // the actual printable character.\n\n // KeyPress is deprecated, but its replacement is not yet final and not\n // implemented in any major browser. Only KeyPress has charCode.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n return 0;\n },\n keyCode: function (event) {\n // `keyCode` is the result of a KeyDown/Up event and represents the value of\n // physical keyboard key.\n\n // The actual meaning of the value depends on the users' keyboard layout\n // which cannot be detected. Assuming that it is a US keyboard layout\n // provides a surprisingly accurate mapping for US and European users.\n // Due to this, it is left to the user to implement at this time.\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n },\n which: function (event) {\n // `which` is an alias for either `keyCode` or `charCode` depending on the\n // type of the event.\n if (event.type === 'keypress') {\n return getEventCharCode(event);\n }\n if (event.type === 'keydown' || event.type === 'keyup') {\n return event.keyCode;\n }\n return 0;\n }\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);\n\n/**\n * @interface DragEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar DragEventInterface = {\n dataTransfer: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticMouseEvent}\n */\nfunction SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);\n\n/**\n * @interface TouchEvent\n * @see http://www.w3.org/TR/touch-events/\n */\nvar TouchEventInterface = {\n touches: null,\n targetTouches: null,\n changedTouches: null,\n altKey: null,\n metaKey: null,\n ctrlKey: null,\n shiftKey: null,\n getModifierState: getEventModifierState\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticUIEvent}\n */\nfunction SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);\n\n/**\n * @interface Event\n * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-\n * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent\n */\nvar TransitionEventInterface = {\n propertyName: null,\n elapsedTime: null,\n pseudoElement: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticEvent}\n */\nfunction SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticEvent$1.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticEvent$1.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);\n\n/**\n * @interface WheelEvent\n * @see http://www.w3.org/TR/DOM-Level-3-Events/\n */\nvar WheelEventInterface = {\n deltaX: function (event) {\n return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).\n 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;\n },\n deltaY: function (event) {\n return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).\n 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).\n 'wheelDelta' in event ? -event.wheelDelta : 0;\n },\n deltaZ: null,\n\n // Browsers without \"deltaMode\" is reporting in raw wheel delta where one\n // notch on the scroll is always +/- 120, roughly equivalent to pixels.\n // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or\n // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.\n deltaMode: null\n};\n\n/**\n * @param {object} dispatchConfig Configuration used to dispatch this event.\n * @param {string} dispatchMarker Marker identifying the event target.\n * @param {object} nativeEvent Native browser event.\n * @extends {SyntheticMouseEvent}\n */\nfunction SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {\n return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);\n}\n\nSyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);\n\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: ['topAbort'],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = {\n * 'topAbort': { sameConfig }\n * };\n */\nvar eventTypes$4 = {};\nvar topLevelEventsToDispatchConfig = {};\n['abort', 'animationEnd', 'animationIteration', 'animationStart', 'blur', 'cancel', 'canPlay', 'canPlayThrough', 'click', 'close', 'contextMenu', 'copy', 'cut', 'doubleClick', 'drag', 'dragEnd', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'dragStart', 'drop', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'mouseDown', 'mouseMove', 'mouseOut', 'mouseOver', 'mouseUp', 'paste', 'pause', 'play', 'playing', 'progress', 'rateChange', 'reset', 'scroll', 'seeked', 'seeking', 'stalled', 'submit', 'suspend', 'timeUpdate', 'toggle', 'touchCancel', 'touchEnd', 'touchMove', 'touchStart', 'transitionEnd', 'volumeChange', 'waiting', 'wheel'].forEach(function (event) {\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var topEvent = 'top' + capitalizedEvent;\n\n var type = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent]\n };\n eventTypes$4[event] = type;\n topLevelEventsToDispatchConfig[topEvent] = type;\n});\n\n// Only used in DEV for exhaustiveness validation.\nvar knownHTMLTopLevelTypes = ['topAbort', 'topCancel', 'topCanPlay', 'topCanPlayThrough', 'topClose', 'topDurationChange', 'topEmptied', 'topEncrypted', 'topEnded', 'topError', 'topInput', 'topInvalid', 'topLoad', 'topLoadedData', 'topLoadedMetadata', 'topLoadStart', 'topPause', 'topPlay', 'topPlaying', 'topProgress', 'topRateChange', 'topReset', 'topSeeked', 'topSeeking', 'topStalled', 'topSubmit', 'topSuspend', 'topTimeUpdate', 'topToggle', 'topVolumeChange', 'topWaiting'];\n\nvar SimpleEventPlugin = {\n eventTypes: eventTypes$4,\n\n extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {\n var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];\n if (!dispatchConfig) {\n return null;\n }\n var EventConstructor;\n switch (topLevelType) {\n case 'topKeyPress':\n // Firefox creates a keypress event for function keys too. This removes\n // the unwanted keypress events. Enter is however both printable and\n // non-printable. One would expect Tab to be as well (but it isn't).\n if (getEventCharCode(nativeEvent) === 0) {\n return null;\n }\n /* falls through */\n case 'topKeyDown':\n case 'topKeyUp':\n EventConstructor = SyntheticKeyboardEvent;\n break;\n case 'topBlur':\n case 'topFocus':\n EventConstructor = SyntheticFocusEvent;\n break;\n case 'topClick':\n // Firefox creates a click event on right mouse clicks. This removes the\n // unwanted click events.\n if (nativeEvent.button === 2) {\n return null;\n }\n /* falls through */\n case 'topDoubleClick':\n case 'topMouseDown':\n case 'topMouseMove':\n case 'topMouseUp':\n // TODO: Disabled elements should not respond to mouse events\n /* falls through */\n case 'topMouseOut':\n case 'topMouseOver':\n case 'topContextMenu':\n EventConstructor = SyntheticMouseEvent;\n break;\n case 'topDrag':\n case 'topDragEnd':\n case 'topDragEnter':\n case 'topDragExit':\n case 'topDragLeave':\n case 'topDragOver':\n case 'topDragStart':\n case 'topDrop':\n EventConstructor = SyntheticDragEvent;\n break;\n case 'topTouchCancel':\n case 'topTouchEnd':\n case 'topTouchMove':\n case 'topTouchStart':\n EventConstructor = SyntheticTouchEvent;\n break;\n case 'topAnimationEnd':\n case 'topAnimationIteration':\n case 'topAnimationStart':\n EventConstructor = SyntheticAnimationEvent;\n break;\n case 'topTransitionEnd':\n EventConstructor = SyntheticTransitionEvent;\n break;\n case 'topScroll':\n EventConstructor = SyntheticUIEvent;\n break;\n case 'topWheel':\n EventConstructor = SyntheticWheelEvent;\n break;\n case 'topCopy':\n case 'topCut':\n case 'topPaste':\n EventConstructor = SyntheticClipboardEvent;\n break;\n default:\n {\n if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {\n warning(false, 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);\n }\n }\n // HTML Events\n // @see http://www.w3.org/TR/html5/index.html#events-0\n EventConstructor = SyntheticEvent$1;\n break;\n }\n var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);\n accumulateTwoPhaseDispatches(event);\n return event;\n }\n};\n\nsetHandleTopLevel(handleTopLevel);\n\n/**\n * Inject modules for resolving DOM hierarchy and plugin ordering.\n */\ninjection$1.injectEventPluginOrder(DOMEventPluginOrder);\ninjection$2.injectComponentTree(ReactDOMComponentTree);\n\n/**\n * Some important event plugins included by default (without having to require\n * them).\n */\ninjection$1.injectEventPluginsByName({\n SimpleEventPlugin: SimpleEventPlugin,\n EnterLeaveEventPlugin: EnterLeaveEventPlugin,\n ChangeEventPlugin: ChangeEventPlugin,\n SelectEventPlugin: SelectEventPlugin,\n BeforeInputEventPlugin: BeforeInputEventPlugin\n});\n\nvar enableAsyncSubtreeAPI = true;\nvar enableAsyncSchedulingByDefaultInReactDOM = false;\n// Exports ReactDOM.createRoot\nvar enableCreateRoot = false;\nvar enableUserTimingAPI = true;\n\n// Mutating mode (React DOM, React ART, React Native):\nvar enableMutatingReconciler = true;\n// Experimental noop mode (currently unused):\nvar enableNoopReconciler = false;\n// Experimental persistent mode (CS):\nvar enablePersistentReconciler = false;\n\n// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:\nvar debugRenderPhaseSideEffects = false;\n\n// Only used in www builds.\n\nvar valueStack = [];\n\n{\n var fiberStack = [];\n}\n\nvar index = -1;\n\nfunction createCursor(defaultValue) {\n return {\n current: defaultValue\n };\n}\n\n\n\nfunction pop(cursor, fiber) {\n if (index < 0) {\n {\n warning(false, 'Unexpected pop.');\n }\n return;\n }\n\n {\n if (fiber !== fiberStack[index]) {\n warning(false, 'Unexpected Fiber popped.');\n }\n }\n\n cursor.current = valueStack[index];\n\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n}\n\nfunction push(cursor, value, fiber) {\n index++;\n\n valueStack[index] = cursor.current;\n\n {\n fiberStack[index] = fiber;\n }\n\n cursor.current = value;\n}\n\nfunction reset$1() {\n while (index > -1) {\n valueStack[index] = null;\n\n {\n fiberStack[index] = null;\n }\n\n index--;\n }\n}\n\nvar describeComponentFrame = function (name, source, ownerName) {\n return '\\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');\n};\n\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case IndeterminateComponent:\n case FunctionalComponent:\n case ClassComponent:\n case HostComponent:\n var owner = fiber._debugOwner;\n var source = fiber._debugSource;\n var name = getComponentName(fiber);\n var ownerName = null;\n if (owner) {\n ownerName = getComponentName(owner);\n }\n return describeComponentFrame(name, source, ownerName);\n default:\n return '';\n }\n}\n\n// This function can only be called with a work-in-progress fiber and\n// only during begin or complete phase. Do not call it under any other\n// circumstances.\nfunction getStackAddendumByWorkInProgressFiber(workInProgress) {\n var info = '';\n var node = workInProgress;\n do {\n info += describeFiber(node);\n // Otherwise this return pointer might point to the wrong tree:\n node = node['return'];\n } while (node);\n return info;\n}\n\nfunction getCurrentFiberOwnerName() {\n {\n var fiber = ReactDebugCurrentFiber.current;\n if (fiber === null) {\n return null;\n }\n var owner = fiber._debugOwner;\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner);\n }\n }\n return null;\n}\n\nfunction getCurrentFiberStackAddendum() {\n {\n var fiber = ReactDebugCurrentFiber.current;\n if (fiber === null) {\n return null;\n }\n // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n return getStackAddendumByWorkInProgressFiber(fiber);\n }\n return null;\n}\n\nfunction resetCurrentFiber() {\n ReactDebugCurrentFrame.getCurrentStack = null;\n ReactDebugCurrentFiber.current = null;\n ReactDebugCurrentFiber.phase = null;\n}\n\nfunction setCurrentFiber(fiber) {\n ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum;\n ReactDebugCurrentFiber.current = fiber;\n ReactDebugCurrentFiber.phase = null;\n}\n\nfunction setCurrentPhase(phase) {\n ReactDebugCurrentFiber.phase = phase;\n}\n\nvar ReactDebugCurrentFiber = {\n current: null,\n phase: null,\n resetCurrentFiber: resetCurrentFiber,\n setCurrentFiber: setCurrentFiber,\n setCurrentPhase: setCurrentPhase,\n getCurrentFiberOwnerName: getCurrentFiberOwnerName,\n getCurrentFiberStackAddendum: getCurrentFiberStackAddendum\n};\n\n// Prefix measurements so that it's possible to filter them.\n// Longer prefixes are hard to read in DevTools.\nvar reactEmoji = '\\u269B';\nvar warningEmoji = '\\u26D4';\nvar supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function';\n\n// Keep track of current fiber so that we know the path to unwind on pause.\n// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?\nvar currentFiber = null;\n// If we're in the middle of user code, which fiber and method is it?\n// Reusing `currentFiber` would be confusing for this because user code fiber\n// can change during commit phase too, but we don't need to unwind it (since\n// lifecycles in the commit phase don't resemble a tree).\nvar currentPhase = null;\nvar currentPhaseFiber = null;\n// Did lifecycle hook schedule an update? This is often a performance problem,\n// so we will keep track of it, and include it in the report.\n// Track commits caused by cascading updates.\nvar isCommitting = false;\nvar hasScheduledUpdateInCurrentCommit = false;\nvar hasScheduledUpdateInCurrentPhase = false;\nvar commitCountInCurrentWorkLoop = 0;\nvar effectCountInCurrentCommit = 0;\nvar isWaitingForCallback = false;\n// During commits, we only show a measurement once per method name\n// to avoid stretch the commit phase with measurement overhead.\nvar labelsInCurrentCommit = new Set();\n\nvar formatMarkName = function (markName) {\n return reactEmoji + ' ' + markName;\n};\n\nvar formatLabel = function (label, warning$$1) {\n var prefix = warning$$1 ? warningEmoji + ' ' : reactEmoji + ' ';\n var suffix = warning$$1 ? ' Warning: ' + warning$$1 : '';\n return '' + prefix + label + suffix;\n};\n\nvar beginMark = function (markName) {\n performance.mark(formatMarkName(markName));\n};\n\nvar clearMark = function (markName) {\n performance.clearMarks(formatMarkName(markName));\n};\n\nvar endMark = function (label, markName, warning$$1) {\n var formattedMarkName = formatMarkName(markName);\n var formattedLabel = formatLabel(label, warning$$1);\n try {\n performance.measure(formattedLabel, formattedMarkName);\n } catch (err) {}\n // If previous mark was missing for some reason, this will throw.\n // This could only happen if React crashed in an unexpected place earlier.\n // Don't pile on with more errors.\n\n // Clear marks immediately to avoid growing buffer.\n performance.clearMarks(formattedMarkName);\n performance.clearMeasures(formattedLabel);\n};\n\nvar getFiberMarkName = function (label, debugID) {\n return label + ' (#' + debugID + ')';\n};\n\nvar getFiberLabel = function (componentName, isMounted, phase) {\n if (phase === null) {\n // These are composite component total time measurements.\n return componentName + ' [' + (isMounted ? 'update' : 'mount') + ']';\n } else {\n // Composite component methods.\n return componentName + '.' + phase;\n }\n};\n\nvar beginFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n\n if (isCommitting && labelsInCurrentCommit.has(label)) {\n // During the commit phase, we don't show duplicate labels because\n // there is a fixed overhead for every measurement, and we don't\n // want to stretch the commit phase beyond necessary.\n return false;\n }\n labelsInCurrentCommit.add(label);\n\n var markName = getFiberMarkName(label, debugID);\n beginMark(markName);\n return true;\n};\n\nvar clearFiberMark = function (fiber, phase) {\n var componentName = getComponentName(fiber) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n clearMark(markName);\n};\n\nvar endFiberMark = function (fiber, phase, warning$$1) {\n var componentName = getComponentName(fiber) || 'Unknown';\n var debugID = fiber._debugID;\n var isMounted = fiber.alternate !== null;\n var label = getFiberLabel(componentName, isMounted, phase);\n var markName = getFiberMarkName(label, debugID);\n endMark(label, markName, warning$$1);\n};\n\nvar shouldIgnoreFiber = function (fiber) {\n // Host components should be skipped in the timeline.\n // We could check typeof fiber.type, but does this work with RN?\n switch (fiber.tag) {\n case HostRoot:\n case HostComponent:\n case HostText:\n case HostPortal:\n case ReturnComponent:\n case Fragment:\n return true;\n default:\n return false;\n }\n};\n\nvar clearPendingPhaseMeasurement = function () {\n if (currentPhase !== null && currentPhaseFiber !== null) {\n clearFiberMark(currentPhaseFiber, currentPhase);\n }\n currentPhaseFiber = null;\n currentPhase = null;\n hasScheduledUpdateInCurrentPhase = false;\n};\n\nvar pauseTimers = function () {\n // Stops all currently active measurements so that they can be resumed\n // if we continue in a later deferred loop from the same unit of work.\n var fiber = currentFiber;\n while (fiber) {\n if (fiber._debugIsCurrentlyTiming) {\n endFiberMark(fiber, null, null);\n }\n fiber = fiber['return'];\n }\n};\n\nvar resumeTimersRecursively = function (fiber) {\n if (fiber['return'] !== null) {\n resumeTimersRecursively(fiber['return']);\n }\n if (fiber._debugIsCurrentlyTiming) {\n beginFiberMark(fiber, null);\n }\n};\n\nvar resumeTimers = function () {\n // Resumes all measurements that were active during the last deferred loop.\n if (currentFiber !== null) {\n resumeTimersRecursively(currentFiber);\n }\n};\n\nfunction recordEffect() {\n if (enableUserTimingAPI) {\n effectCountInCurrentCommit++;\n }\n}\n\nfunction recordScheduleUpdate() {\n if (enableUserTimingAPI) {\n if (isCommitting) {\n hasScheduledUpdateInCurrentCommit = true;\n }\n if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {\n hasScheduledUpdateInCurrentPhase = true;\n }\n }\n}\n\nfunction startRequestCallbackTimer() {\n if (enableUserTimingAPI) {\n if (supportsUserTiming && !isWaitingForCallback) {\n isWaitingForCallback = true;\n beginMark('(Waiting for async callback...)');\n }\n }\n}\n\nfunction stopRequestCallbackTimer(didExpire) {\n if (enableUserTimingAPI) {\n if (supportsUserTiming) {\n isWaitingForCallback = false;\n var warning$$1 = didExpire ? 'React was blocked by main thread' : null;\n endMark('(Waiting for async callback...)', '(Waiting for async callback...)', warning$$1);\n }\n }\n}\n\nfunction startWorkTimer(fiber) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n }\n // If we pause, this is the fiber to unwind from.\n currentFiber = fiber;\n if (!beginFiberMark(fiber, null)) {\n return;\n }\n fiber._debugIsCurrentlyTiming = true;\n }\n}\n\nfunction cancelWorkTimer(fiber) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n }\n // Remember we shouldn't complete measurement for this fiber.\n // Otherwise flamechart will be deep even for small updates.\n fiber._debugIsCurrentlyTiming = false;\n clearFiberMark(fiber, null);\n }\n}\n\nfunction stopWorkTimer(fiber) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n }\n // If we pause, its parent is the fiber to unwind from.\n currentFiber = fiber['return'];\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n fiber._debugIsCurrentlyTiming = false;\n endFiberMark(fiber, null, null);\n }\n}\n\nfunction stopFailedWorkTimer(fiber) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {\n return;\n }\n // If we pause, its parent is the fiber to unwind from.\n currentFiber = fiber['return'];\n if (!fiber._debugIsCurrentlyTiming) {\n return;\n }\n fiber._debugIsCurrentlyTiming = false;\n var warning$$1 = 'An error was thrown inside this error boundary';\n endFiberMark(fiber, null, warning$$1);\n }\n}\n\nfunction startPhaseTimer(fiber, phase) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n clearPendingPhaseMeasurement();\n if (!beginFiberMark(fiber, phase)) {\n return;\n }\n currentPhaseFiber = fiber;\n currentPhase = phase;\n }\n}\n\nfunction stopPhaseTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n if (currentPhase !== null && currentPhaseFiber !== null) {\n var warning$$1 = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;\n endFiberMark(currentPhaseFiber, currentPhase, warning$$1);\n }\n currentPhase = null;\n currentPhaseFiber = null;\n }\n}\n\nfunction startWorkLoopTimer(nextUnitOfWork) {\n if (enableUserTimingAPI) {\n currentFiber = nextUnitOfWork;\n if (!supportsUserTiming) {\n return;\n }\n commitCountInCurrentWorkLoop = 0;\n // This is top level call.\n // Any other measurements are performed within.\n beginMark('(React Tree Reconciliation)');\n // Resume any measurements that were in progress during the last loop.\n resumeTimers();\n }\n}\n\nfunction stopWorkLoopTimer(interruptedBy) {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n var warning$$1 = null;\n if (interruptedBy !== null) {\n if (interruptedBy.tag === HostRoot) {\n warning$$1 = 'A top-level update interrupted the previous render';\n } else {\n var componentName = getComponentName(interruptedBy) || 'Unknown';\n warning$$1 = 'An update to ' + componentName + ' interrupted the previous render';\n }\n } else if (commitCountInCurrentWorkLoop > 1) {\n warning$$1 = 'There were cascading updates';\n }\n commitCountInCurrentWorkLoop = 0;\n // Pause any measurements until the next loop.\n pauseTimers();\n endMark('(React Tree Reconciliation)', '(React Tree Reconciliation)', warning$$1);\n }\n}\n\nfunction startCommitTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n isCommitting = true;\n hasScheduledUpdateInCurrentCommit = false;\n labelsInCurrentCommit.clear();\n beginMark('(Committing Changes)');\n }\n}\n\nfunction stopCommitTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n\n var warning$$1 = null;\n if (hasScheduledUpdateInCurrentCommit) {\n warning$$1 = 'Lifecycle hook scheduled a cascading update';\n } else if (commitCountInCurrentWorkLoop > 0) {\n warning$$1 = 'Caused by a cascading update in earlier commit';\n }\n hasScheduledUpdateInCurrentCommit = false;\n commitCountInCurrentWorkLoop++;\n isCommitting = false;\n labelsInCurrentCommit.clear();\n\n endMark('(Committing Changes)', '(Committing Changes)', warning$$1);\n }\n}\n\nfunction startCommitHostEffectsTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n effectCountInCurrentCommit = 0;\n beginMark('(Committing Host Effects)');\n }\n}\n\nfunction stopCommitHostEffectsTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark('(Committing Host Effects: ' + count + ' Total)', '(Committing Host Effects)', null);\n }\n}\n\nfunction startCommitLifeCyclesTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n effectCountInCurrentCommit = 0;\n beginMark('(Calling Lifecycle Methods)');\n }\n}\n\nfunction stopCommitLifeCyclesTimer() {\n if (enableUserTimingAPI) {\n if (!supportsUserTiming) {\n return;\n }\n var count = effectCountInCurrentCommit;\n effectCountInCurrentCommit = 0;\n endMark('(Calling Lifecycle Methods: ' + count + ' Total)', '(Calling Lifecycle Methods)', null);\n }\n}\n\n{\n var warnedAboutMissingGetChildContext = {};\n}\n\n// A cursor to the current merged context object on the stack.\nvar contextStackCursor = createCursor(emptyObject);\n// A cursor to a boolean indicating whether the context has changed.\nvar didPerformWorkStackCursor = createCursor(false);\n// Keep track of the previous context object that was on the stack.\n// We use this to get access to the parent context after we have already\n// pushed the next context provider, and now need to merge their contexts.\nvar previousContext = emptyObject;\n\nfunction getUnmaskedContext(workInProgress) {\n var hasOwnContext = isContextProvider(workInProgress);\n if (hasOwnContext) {\n // If the fiber is a context provider itself, when we read its context\n // we have already pushed its own child context on the stack. A context\n // provider should not \"see\" its own child context. Therefore we read the\n // previous (parent) context instead for a context provider.\n return previousContext;\n }\n return contextStackCursor.current;\n}\n\nfunction cacheContext(workInProgress, unmaskedContext, maskedContext) {\n var instance = workInProgress.stateNode;\n instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;\n instance.__reactInternalMemoizedMaskedChildContext = maskedContext;\n}\n\nfunction getMaskedContext(workInProgress, unmaskedContext) {\n var type = workInProgress.type;\n var contextTypes = type.contextTypes;\n if (!contextTypes) {\n return emptyObject;\n }\n\n // Avoid recreating masked context unless unmasked context has changed.\n // Failing to do this will result in unnecessary calls to componentWillReceiveProps.\n // This may trigger infinite loops if componentWillReceiveProps calls setState.\n var instance = workInProgress.stateNode;\n if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {\n return instance.__reactInternalMemoizedMaskedChildContext;\n }\n\n var context = {};\n for (var key in contextTypes) {\n context[key] = unmaskedContext[key];\n }\n\n {\n var name = getComponentName(workInProgress) || 'Unknown';\n checkPropTypes(contextTypes, context, 'context', name, ReactDebugCurrentFiber.getCurrentFiberStackAddendum);\n }\n\n // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // Context is created before the class component is instantiated so check for instance.\n if (instance) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return context;\n}\n\nfunction hasContextChanged() {\n return didPerformWorkStackCursor.current;\n}\n\nfunction isContextConsumer(fiber) {\n return fiber.tag === ClassComponent && fiber.type.contextTypes != null;\n}\n\nfunction isContextProvider(fiber) {\n return fiber.tag === ClassComponent && fiber.type.childContextTypes != null;\n}\n\nfunction popContextProvider(fiber) {\n if (!isContextProvider(fiber)) {\n return;\n }\n\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n}\n\nfunction popTopLevelContextObject(fiber) {\n pop(didPerformWorkStackCursor, fiber);\n pop(contextStackCursor, fiber);\n}\n\nfunction pushTopLevelContextObject(fiber, context, didChange) {\n !(contextStackCursor.cursor == null) ? invariant(false, 'Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n push(contextStackCursor, context, fiber);\n push(didPerformWorkStackCursor, didChange, fiber);\n}\n\nfunction processChildContext(fiber, parentContext) {\n var instance = fiber.stateNode;\n var childContextTypes = fiber.type.childContextTypes;\n\n // TODO (bvaughn) Replace this behavior with an invariant() in the future.\n // It has only been added in Fiber to match the (unintentional) behavior in Stack.\n if (typeof instance.getChildContext !== 'function') {\n {\n var componentName = getComponentName(fiber) || 'Unknown';\n\n if (!warnedAboutMissingGetChildContext[componentName]) {\n warnedAboutMissingGetChildContext[componentName] = true;\n warning(false, '%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);\n }\n }\n return parentContext;\n }\n\n var childContext = void 0;\n {\n ReactDebugCurrentFiber.setCurrentPhase('getChildContext');\n }\n startPhaseTimer(fiber, 'getChildContext');\n childContext = instance.getChildContext();\n stopPhaseTimer();\n {\n ReactDebugCurrentFiber.setCurrentPhase(null);\n }\n for (var contextKey in childContext) {\n !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key \"%s\" is not defined in childContextTypes.', getComponentName(fiber) || 'Unknown', contextKey) : void 0;\n }\n {\n var name = getComponentName(fiber) || 'Unknown';\n checkPropTypes(childContextTypes, childContext, 'child context', name,\n // In practice, there is one case in which we won't get a stack. It's when\n // somebody calls unstable_renderSubtreeIntoContainer() and we process\n // context from the parent component instance. The stack will be missing\n // because it's outside of the reconciliation, and so the pointer has not\n // been set. This is rare and doesn't matter. We'll also remove that API.\n ReactDebugCurrentFiber.getCurrentFiberStackAddendum);\n }\n\n return _assign({}, parentContext, childContext);\n}\n\nfunction pushContextProvider(workInProgress) {\n if (!isContextProvider(workInProgress)) {\n return false;\n }\n\n var instance = workInProgress.stateNode;\n // We push the context as early as possible to ensure stack integrity.\n // If the instance does not exist yet, we will push null at first,\n // and replace it on the stack later when invalidating the context.\n var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyObject;\n\n // Remember the parent context so we can merge with it later.\n // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.\n previousContext = contextStackCursor.current;\n push(contextStackCursor, memoizedMergedChildContext, workInProgress);\n push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);\n\n return true;\n}\n\nfunction invalidateContextProvider(workInProgress, didChange) {\n var instance = workInProgress.stateNode;\n !instance ? invariant(false, 'Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n if (didChange) {\n // Merge parent and own context.\n // Skip this if we're not updating due to sCU.\n // This avoids unnecessarily recomputing memoized values.\n var mergedContext = processChildContext(workInProgress, previousContext);\n instance.__reactInternalMemoizedMergedChildContext = mergedContext;\n\n // Replace the old (or empty) context with the new one.\n // It is important to unwind the context in the reverse order.\n pop(didPerformWorkStackCursor, workInProgress);\n pop(contextStackCursor, workInProgress);\n // Now push the new context and mark that it has changed.\n push(contextStackCursor, mergedContext, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n } else {\n pop(didPerformWorkStackCursor, workInProgress);\n push(didPerformWorkStackCursor, didChange, workInProgress);\n }\n}\n\nfunction resetContext() {\n previousContext = emptyObject;\n contextStackCursor.current = emptyObject;\n didPerformWorkStackCursor.current = false;\n}\n\nfunction findCurrentUnmaskedContext(fiber) {\n // Currently this is only used with renderSubtreeIntoContainer; not sure if it\n // makes sense elsewhere\n !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n var node = fiber;\n while (node.tag !== HostRoot) {\n if (isContextProvider(node)) {\n return node.stateNode.__reactInternalMemoizedMergedChildContext;\n }\n var parent = node['return'];\n !parent ? invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n node = parent;\n }\n return node.stateNode.context;\n}\n\nvar NoWork = 0; // TODO: Use an opaque type once ESLint et al support the syntax\n\nvar Sync = 1;\nvar Never = 2147483647; // Max int32: Math.pow(2, 31) - 1\n\nvar UNIT_SIZE = 10;\nvar MAGIC_NUMBER_OFFSET = 2;\n\n// 1 unit of expiration time represents 10ms.\nfunction msToExpirationTime(ms) {\n // Always add an offset so that we don't clash with the magic number for NoWork.\n return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;\n}\n\nfunction expirationTimeToMs(expirationTime) {\n return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE;\n}\n\nfunction ceiling(num, precision) {\n return ((num / precision | 0) + 1) * precision;\n}\n\nfunction computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {\n return ceiling(currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);\n}\n\nvar NoContext = 0;\nvar AsyncUpdates = 1;\n\n{\n var hasBadMapPolyfill = false;\n try {\n var nonExtensibleObject = Object.preventExtensions({});\n /* eslint-disable no-new */\n \n /* eslint-enable no-new */\n } catch (e) {\n // TODO: Consider warning about bad polyfills\n hasBadMapPolyfill = true;\n }\n}\n\n// A Fiber is work on a Component that needs to be done or was done. There can\n// be more than one per component.\n\n\n{\n var debugCounter = 1;\n}\n\nfunction FiberNode(tag, key, internalContextTag) {\n // Instance\n this.tag = tag;\n this.key = key;\n this.type = null;\n this.stateNode = null;\n\n // Fiber\n this['return'] = null;\n this.child = null;\n this.sibling = null;\n this.index = 0;\n\n this.ref = null;\n\n this.pendingProps = null;\n this.memoizedProps = null;\n this.updateQueue = null;\n this.memoizedState = null;\n\n this.internalContextTag = internalContextTag;\n\n // Effects\n this.effectTag = NoEffect;\n this.nextEffect = null;\n\n this.firstEffect = null;\n this.lastEffect = null;\n\n this.expirationTime = NoWork;\n\n this.alternate = null;\n\n {\n this._debugID = debugCounter++;\n this._debugSource = null;\n this._debugOwner = null;\n this._debugIsCurrentlyTiming = false;\n if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {\n Object.preventExtensions(this);\n }\n }\n}\n\n// This is a constructor function, rather than a POJO constructor, still\n// please ensure we do the following:\n// 1) Nobody should add any instance methods on this. Instance methods can be\n// more difficult to predict when they get optimized and they are almost\n// never inlined properly in static compilers.\n// 2) Nobody should rely on `instanceof Fiber` for type testing. We should\n// always know when it is a fiber.\n// 3) We might want to experiment with using numeric keys since they are easier\n// to optimize in a non-JIT environment.\n// 4) We can easily go from a constructor to a createFiber object literal if that\n// is faster.\n// 5) It should be easy to port this to a C struct and keep a C implementation\n// compatible.\nvar createFiber = function (tag, key, internalContextTag) {\n // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors\n return new FiberNode(tag, key, internalContextTag);\n};\n\nfunction shouldConstruct(Component) {\n return !!(Component.prototype && Component.prototype.isReactComponent);\n}\n\n// This is used to create an alternate fiber to do work on.\nfunction createWorkInProgress(current, pendingProps, expirationTime) {\n var workInProgress = current.alternate;\n if (workInProgress === null) {\n // We use a double buffering pooling technique because we know that we'll\n // only ever need at most two versions of a tree. We pool the \"other\" unused\n // node that we're free to reuse. This is lazily created to avoid allocating\n // extra objects for things that are never updated. It also allow us to\n // reclaim the extra memory if needed.\n workInProgress = createFiber(current.tag, current.key, current.internalContextTag);\n workInProgress.type = current.type;\n workInProgress.stateNode = current.stateNode;\n\n {\n // DEV-only fields\n workInProgress._debugID = current._debugID;\n workInProgress._debugSource = current._debugSource;\n workInProgress._debugOwner = current._debugOwner;\n }\n\n workInProgress.alternate = current;\n current.alternate = workInProgress;\n } else {\n // We already have an alternate.\n // Reset the effect tag.\n workInProgress.effectTag = NoEffect;\n\n // The effect list is no longer valid.\n workInProgress.nextEffect = null;\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n }\n\n workInProgress.expirationTime = expirationTime;\n workInProgress.pendingProps = pendingProps;\n\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n\n // These will be overridden during the parent's reconciliation\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n\n return workInProgress;\n}\n\nfunction createHostRootFiber() {\n var fiber = createFiber(HostRoot, null, NoContext);\n return fiber;\n}\n\nfunction createFiberFromElement(element, internalContextTag, expirationTime) {\n var owner = null;\n {\n owner = element._owner;\n }\n\n var fiber = void 0;\n var type = element.type,\n key = element.key;\n\n if (typeof type === 'function') {\n fiber = shouldConstruct(type) ? createFiber(ClassComponent, key, internalContextTag) : createFiber(IndeterminateComponent, key, internalContextTag);\n fiber.type = type;\n fiber.pendingProps = element.props;\n } else if (typeof type === 'string') {\n fiber = createFiber(HostComponent, key, internalContextTag);\n fiber.type = type;\n fiber.pendingProps = element.props;\n } else if (typeof type === 'object' && type !== null && typeof type.tag === 'number') {\n // Currently assumed to be a continuation and therefore is a fiber already.\n // TODO: The yield system is currently broken for updates in some cases.\n // The reified yield stores a fiber, but we don't know which fiber that is;\n // the current or a workInProgress? When the continuation gets rendered here\n // we don't know if we can reuse that fiber or if we need to clone it.\n // There is probably a clever way to restructure this.\n fiber = type;\n fiber.pendingProps = element.props;\n } else {\n var info = '';\n {\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n var ownerName = owner ? getComponentName(owner) : null;\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n }\n invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info);\n }\n\n {\n fiber._debugSource = element._source;\n fiber._debugOwner = element._owner;\n }\n\n fiber.expirationTime = expirationTime;\n\n return fiber;\n}\n\nfunction createFiberFromFragment(elements, internalContextTag, expirationTime, key) {\n var fiber = createFiber(Fragment, key, internalContextTag);\n fiber.pendingProps = elements;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromText(content, internalContextTag, expirationTime) {\n var fiber = createFiber(HostText, null, internalContextTag);\n fiber.pendingProps = content;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromHostInstanceForDeletion() {\n var fiber = createFiber(HostComponent, null, NoContext);\n fiber.type = 'DELETED';\n return fiber;\n}\n\nfunction createFiberFromCall(call, internalContextTag, expirationTime) {\n var fiber = createFiber(CallComponent, call.key, internalContextTag);\n fiber.type = call.handler;\n fiber.pendingProps = call;\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromReturn(returnNode, internalContextTag, expirationTime) {\n var fiber = createFiber(ReturnComponent, null, internalContextTag);\n fiber.expirationTime = expirationTime;\n return fiber;\n}\n\nfunction createFiberFromPortal(portal, internalContextTag, expirationTime) {\n var fiber = createFiber(HostPortal, portal.key, internalContextTag);\n fiber.pendingProps = portal.children || [];\n fiber.expirationTime = expirationTime;\n fiber.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null, // Used by persistent updates\n implementation: portal.implementation\n };\n return fiber;\n}\n\nfunction createFiberRoot(containerInfo, hydrate) {\n // Cyclic construction. This cheats the type system right now because\n // stateNode is any.\n var uninitializedFiber = createHostRootFiber();\n var root = {\n current: uninitializedFiber,\n containerInfo: containerInfo,\n pendingChildren: null,\n remainingExpirationTime: NoWork,\n isReadyForCommit: false,\n finishedWork: null,\n context: null,\n pendingContext: null,\n hydrate: hydrate,\n nextScheduledRoot: null\n };\n uninitializedFiber.stateNode = root;\n return root;\n}\n\nvar onCommitFiberRoot = null;\nvar onCommitFiberUnmount = null;\nvar hasLoggedError = false;\n\nfunction catchErrors(fn) {\n return function (arg) {\n try {\n return fn(arg);\n } catch (err) {\n if (true && !hasLoggedError) {\n hasLoggedError = true;\n warning(false, 'React DevTools encountered an error: %s', err);\n }\n }\n };\n}\n\nfunction injectInternals(internals) {\n if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {\n // No DevTools\n return false;\n }\n var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (hook.isDisabled) {\n // This isn't a real property on the hook, but it can be set to opt out\n // of DevTools integration and associated warnings and logs.\n // https://github.com/facebook/react/issues/3877\n return true;\n }\n if (!hook.supportsFiber) {\n {\n warning(false, 'The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://fb.me/react-devtools');\n }\n // DevTools exists, even though it doesn't support Fiber.\n return true;\n }\n try {\n var rendererID = hook.inject(internals);\n // We have successfully injected, so now it is safe to set up hooks.\n onCommitFiberRoot = catchErrors(function (root) {\n return hook.onCommitFiberRoot(rendererID, root);\n });\n onCommitFiberUnmount = catchErrors(function (fiber) {\n return hook.onCommitFiberUnmount(rendererID, fiber);\n });\n } catch (err) {\n // Catch all errors because it is unsafe to throw during initialization.\n {\n warning(false, 'React DevTools encountered an error: %s.', err);\n }\n }\n // DevTools exists\n return true;\n}\n\nfunction onCommitRoot(root) {\n if (typeof onCommitFiberRoot === 'function') {\n onCommitFiberRoot(root);\n }\n}\n\nfunction onCommitUnmount(fiber) {\n if (typeof onCommitFiberUnmount === 'function') {\n onCommitFiberUnmount(fiber);\n }\n}\n\n{\n var didWarnUpdateInsideUpdate = false;\n}\n\n// Callbacks are not validated until invocation\n\n\n// Singly linked-list of updates. When an update is scheduled, it is added to\n// the queue of the current fiber and the work-in-progress fiber. The two queues\n// are separate but they share a persistent structure.\n//\n// During reconciliation, updates are removed from the work-in-progress fiber,\n// but they remain on the current fiber. That ensures that if a work-in-progress\n// is aborted, the aborted updates are recovered by cloning from current.\n//\n// The work-in-progress queue is always a subset of the current queue.\n//\n// When the tree is committed, the work-in-progress becomes the current.\n\n\nfunction createUpdateQueue(baseState) {\n var queue = {\n baseState: baseState,\n expirationTime: NoWork,\n first: null,\n last: null,\n callbackList: null,\n hasForceUpdate: false,\n isInitialized: false\n };\n {\n queue.isProcessing = false;\n }\n return queue;\n}\n\nfunction insertUpdateIntoQueue(queue, update) {\n // Append the update to the end of the list.\n if (queue.last === null) {\n // Queue is empty\n queue.first = queue.last = update;\n } else {\n queue.last.next = update;\n queue.last = update;\n }\n if (queue.expirationTime === NoWork || queue.expirationTime > update.expirationTime) {\n queue.expirationTime = update.expirationTime;\n }\n}\n\nfunction insertUpdateIntoFiber(fiber, update) {\n // We'll have at least one and at most two distinct update queues.\n var alternateFiber = fiber.alternate;\n var queue1 = fiber.updateQueue;\n if (queue1 === null) {\n // TODO: We don't know what the base state will be until we begin work.\n // It depends on which fiber is the next current. Initialize with an empty\n // base state, then set to the memoizedState when rendering. Not super\n // happy with this approach.\n queue1 = fiber.updateQueue = createUpdateQueue(null);\n }\n\n var queue2 = void 0;\n if (alternateFiber !== null) {\n queue2 = alternateFiber.updateQueue;\n if (queue2 === null) {\n queue2 = alternateFiber.updateQueue = createUpdateQueue(null);\n }\n } else {\n queue2 = null;\n }\n queue2 = queue2 !== queue1 ? queue2 : null;\n\n // Warn if an update is scheduled from inside an updater function.\n {\n if ((queue1.isProcessing || queue2 !== null && queue2.isProcessing) && !didWarnUpdateInsideUpdate) {\n warning(false, 'An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');\n didWarnUpdateInsideUpdate = true;\n }\n }\n\n // If there's only one queue, add the update to that queue and exit.\n if (queue2 === null) {\n insertUpdateIntoQueue(queue1, update);\n return;\n }\n\n // If either queue is empty, we need to add to both queues.\n if (queue1.last === null || queue2.last === null) {\n insertUpdateIntoQueue(queue1, update);\n insertUpdateIntoQueue(queue2, update);\n return;\n }\n\n // If both lists are not empty, the last update is the same for both lists\n // because of structural sharing. So, we should only append to one of\n // the lists.\n insertUpdateIntoQueue(queue1, update);\n // But we still need to update the `last` pointer of queue2.\n queue2.last = update;\n}\n\nfunction getUpdateExpirationTime(fiber) {\n if (fiber.tag !== ClassComponent && fiber.tag !== HostRoot) {\n return NoWork;\n }\n var updateQueue = fiber.updateQueue;\n if (updateQueue === null) {\n return NoWork;\n }\n return updateQueue.expirationTime;\n}\n\nfunction getStateFromUpdate(update, instance, prevState, props) {\n var partialState = update.partialState;\n if (typeof partialState === 'function') {\n var updateFn = partialState;\n\n // Invoke setState callback an extra time to help detect side-effects.\n if (debugRenderPhaseSideEffects) {\n updateFn.call(instance, prevState, props);\n }\n\n return updateFn.call(instance, prevState, props);\n } else {\n return partialState;\n }\n}\n\nfunction processUpdateQueue(current, workInProgress, queue, instance, props, renderExpirationTime) {\n if (current !== null && current.updateQueue === queue) {\n // We need to create a work-in-progress queue, by cloning the current queue.\n var currentQueue = queue;\n queue = workInProgress.updateQueue = {\n baseState: currentQueue.baseState,\n expirationTime: currentQueue.expirationTime,\n first: currentQueue.first,\n last: currentQueue.last,\n isInitialized: currentQueue.isInitialized,\n // These fields are no longer valid because they were already committed.\n // Reset them.\n callbackList: null,\n hasForceUpdate: false\n };\n }\n\n {\n // Set this flag so we can warn if setState is called inside the update\n // function of another setState.\n queue.isProcessing = true;\n }\n\n // Reset the remaining expiration time. If we skip over any updates, we'll\n // increase this accordingly.\n queue.expirationTime = NoWork;\n\n // TODO: We don't know what the base state will be until we begin work.\n // It depends on which fiber is the next current. Initialize with an empty\n // base state, then set to the memoizedState when rendering. Not super\n // happy with this approach.\n var state = void 0;\n if (queue.isInitialized) {\n state = queue.baseState;\n } else {\n state = queue.baseState = workInProgress.memoizedState;\n queue.isInitialized = true;\n }\n var dontMutatePrevState = true;\n var update = queue.first;\n var didSkip = false;\n while (update !== null) {\n var updateExpirationTime = update.expirationTime;\n if (updateExpirationTime > renderExpirationTime) {\n // This update does not have sufficient priority. Skip it.\n var remainingExpirationTime = queue.expirationTime;\n if (remainingExpirationTime === NoWork || remainingExpirationTime > updateExpirationTime) {\n // Update the remaining expiration time.\n queue.expirationTime = updateExpirationTime;\n }\n if (!didSkip) {\n didSkip = true;\n queue.baseState = state;\n }\n // Continue to the next update.\n update = update.next;\n continue;\n }\n\n // This update does have sufficient priority.\n\n // If no previous updates were skipped, drop this update from the queue by\n // advancing the head of the list.\n if (!didSkip) {\n queue.first = update.next;\n if (queue.first === null) {\n queue.last = null;\n }\n }\n\n // Process the update\n var _partialState = void 0;\n if (update.isReplace) {\n state = getStateFromUpdate(update, instance, state, props);\n dontMutatePrevState = true;\n } else {\n _partialState = getStateFromUpdate(update, instance, state, props);\n if (_partialState) {\n if (dontMutatePrevState) {\n // $FlowFixMe: Idk how to type this properly.\n state = _assign({}, state, _partialState);\n } else {\n state = _assign(state, _partialState);\n }\n dontMutatePrevState = false;\n }\n }\n if (update.isForced) {\n queue.hasForceUpdate = true;\n }\n if (update.callback !== null) {\n // Append to list of callbacks.\n var _callbackList = queue.callbackList;\n if (_callbackList === null) {\n _callbackList = queue.callbackList = [];\n }\n _callbackList.push(update);\n }\n update = update.next;\n }\n\n if (queue.callbackList !== null) {\n workInProgress.effectTag |= Callback;\n } else if (queue.first === null && !queue.hasForceUpdate) {\n // The queue is empty. We can reset it.\n workInProgress.updateQueue = null;\n }\n\n if (!didSkip) {\n didSkip = true;\n queue.baseState = state;\n }\n\n {\n // No longer processing.\n queue.isProcessing = false;\n }\n\n return state;\n}\n\nfunction commitCallbacks(queue, context) {\n var callbackList = queue.callbackList;\n if (callbackList === null) {\n return;\n }\n // Set the list to null to make sure they don't get called more than once.\n queue.callbackList = null;\n for (var i = 0; i < callbackList.length; i++) {\n var update = callbackList[i];\n var _callback = update.callback;\n // This update might be processed again. Clear the callback so it's only\n // called once.\n update.callback = null;\n !(typeof _callback === 'function') ? invariant(false, 'Invalid argument passed as callback. Expected a function. Instead received: %s', _callback) : void 0;\n _callback.call(context);\n }\n}\n\nvar fakeInternalInstance = {};\nvar isArray = Array.isArray;\n\n{\n var didWarnAboutStateAssignmentForComponent = {};\n\n var warnOnInvalidCallback = function (callback, callerName) {\n warning(callback === null || typeof callback === 'function', '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);\n };\n\n // This is so gross but it's at least non-critical and can be removed if\n // it causes problems. This is meant to give a nicer error message for\n // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,\n // ...)) which otherwise throws a \"_processChildContext is not a function\"\n // exception.\n Object.defineProperty(fakeInternalInstance, '_processChildContext', {\n enumerable: false,\n value: function () {\n invariant(false, '_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn\\'t supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).');\n }\n });\n Object.freeze(fakeInternalInstance);\n}\n\nvar ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState) {\n // Class component state updater\n var updater = {\n isMounted: isMounted,\n enqueueSetState: function (instance, partialState, callback) {\n var fiber = get(instance);\n callback = callback === undefined ? null : callback;\n {\n warnOnInvalidCallback(callback, 'setState');\n }\n var expirationTime = computeExpirationForFiber(fiber);\n var update = {\n expirationTime: expirationTime,\n partialState: partialState,\n callback: callback,\n isReplace: false,\n isForced: false,\n nextCallback: null,\n next: null\n };\n insertUpdateIntoFiber(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueReplaceState: function (instance, state, callback) {\n var fiber = get(instance);\n callback = callback === undefined ? null : callback;\n {\n warnOnInvalidCallback(callback, 'replaceState');\n }\n var expirationTime = computeExpirationForFiber(fiber);\n var update = {\n expirationTime: expirationTime,\n partialState: state,\n callback: callback,\n isReplace: true,\n isForced: false,\n nextCallback: null,\n next: null\n };\n insertUpdateIntoFiber(fiber, update);\n scheduleWork(fiber, expirationTime);\n },\n enqueueForceUpdate: function (instance, callback) {\n var fiber = get(instance);\n callback = callback === undefined ? null : callback;\n {\n warnOnInvalidCallback(callback, 'forceUpdate');\n }\n var expirationTime = computeExpirationForFiber(fiber);\n var update = {\n expirationTime: expirationTime,\n partialState: null,\n callback: callback,\n isReplace: false,\n isForced: true,\n nextCallback: null,\n next: null\n };\n insertUpdateIntoFiber(fiber, update);\n scheduleWork(fiber, expirationTime);\n }\n };\n\n function checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext) {\n if (oldProps === null || workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate) {\n // If the workInProgress already has an Update effect, return true\n return true;\n }\n\n var instance = workInProgress.stateNode;\n var type = workInProgress.type;\n if (typeof instance.shouldComponentUpdate === 'function') {\n startPhaseTimer(workInProgress, 'shouldComponentUpdate');\n var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);\n stopPhaseTimer();\n\n // Simulate an async bailout/interruption by invoking lifecycle twice.\n if (debugRenderPhaseSideEffects) {\n instance.shouldComponentUpdate(newProps, newState, newContext);\n }\n\n {\n warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Unknown');\n }\n\n return shouldUpdate;\n }\n\n if (type.prototype && type.prototype.isPureReactComponent) {\n return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);\n }\n\n return true;\n }\n\n function checkClassInstance(workInProgress) {\n var instance = workInProgress.stateNode;\n var type = workInProgress.type;\n {\n var name = getComponentName(workInProgress);\n var renderPresent = instance.render;\n\n if (!renderPresent) {\n if (type.prototype && typeof type.prototype.render === 'function') {\n warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);\n } else {\n warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);\n }\n }\n\n var noGetInitialStateOnES6 = !instance.getInitialState || instance.getInitialState.isReactClassApproved || instance.state;\n warning(noGetInitialStateOnES6, '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?', name);\n var noGetDefaultPropsOnES6 = !instance.getDefaultProps || instance.getDefaultProps.isReactClassApproved;\n warning(noGetDefaultPropsOnES6, '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.', name);\n var noInstancePropTypes = !instance.propTypes;\n warning(noInstancePropTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);\n var noInstanceContextTypes = !instance.contextTypes;\n warning(noInstanceContextTypes, 'contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);\n var noComponentShouldUpdate = typeof instance.componentShouldUpdate !== 'function';\n warning(noComponentShouldUpdate, '%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.', name);\n if (type.prototype && type.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {\n warning(false, '%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(workInProgress) || 'A pure component');\n }\n var noComponentDidUnmount = typeof instance.componentDidUnmount !== 'function';\n warning(noComponentDidUnmount, '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);\n var noComponentDidReceiveProps = typeof instance.componentDidReceiveProps !== 'function';\n warning(noComponentDidReceiveProps, '%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);\n var noComponentWillRecieveProps = typeof instance.componentWillRecieveProps !== 'function';\n warning(noComponentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);\n var hasMutatedProps = instance.props !== workInProgress.pendingProps;\n warning(instance.props === undefined || !hasMutatedProps, '%s(...): When calling super() in `%s`, make sure to pass ' + \"up the same props that your component's constructor was passed.\", name, name);\n var noInstanceDefaultProps = !instance.defaultProps;\n warning(noInstanceDefaultProps, 'Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);\n }\n\n var state = instance.state;\n if (state && (typeof state !== 'object' || isArray(state))) {\n warning(false, '%s.state: must be set to an object or null', getComponentName(workInProgress));\n }\n if (typeof instance.getChildContext === 'function') {\n warning(typeof workInProgress.type.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(workInProgress));\n }\n }\n\n function resetInputPointers(workInProgress, instance) {\n instance.props = workInProgress.memoizedProps;\n instance.state = workInProgress.memoizedState;\n }\n\n function adoptClassInstance(workInProgress, instance) {\n instance.updater = updater;\n workInProgress.stateNode = instance;\n // The instance needs access to the fiber so that it can schedule updates\n set(instance, workInProgress);\n {\n instance._reactInternalInstance = fakeInternalInstance;\n }\n }\n\n function constructClassInstance(workInProgress, props) {\n var ctor = workInProgress.type;\n var unmaskedContext = getUnmaskedContext(workInProgress);\n var needsContext = isContextConsumer(workInProgress);\n var context = needsContext ? getMaskedContext(workInProgress, unmaskedContext) : emptyObject;\n var instance = new ctor(props, context);\n adoptClassInstance(workInProgress, instance);\n\n // Cache unmasked context so we can avoid recreating masked context unless necessary.\n // ReactFiberContext usually updates this cache but can't for newly-created instances.\n if (needsContext) {\n cacheContext(workInProgress, unmaskedContext, context);\n }\n\n return instance;\n }\n\n function callComponentWillMount(workInProgress, instance) {\n startPhaseTimer(workInProgress, 'componentWillMount');\n var oldState = instance.state;\n instance.componentWillMount();\n stopPhaseTimer();\n\n // Simulate an async bailout/interruption by invoking lifecycle twice.\n if (debugRenderPhaseSideEffects) {\n instance.componentWillMount();\n }\n\n if (oldState !== instance.state) {\n {\n warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + \"deprecated (except inside a component's \" + 'constructor). Use setState instead.', getComponentName(workInProgress));\n }\n updater.enqueueReplaceState(instance, instance.state, null);\n }\n }\n\n function callComponentWillReceiveProps(workInProgress, instance, newProps, newContext) {\n startPhaseTimer(workInProgress, 'componentWillReceiveProps');\n var oldState = instance.state;\n instance.componentWillReceiveProps(newProps, newContext);\n stopPhaseTimer();\n\n // Simulate an async bailout/interruption by invoking lifecycle twice.\n if (debugRenderPhaseSideEffects) {\n instance.componentWillReceiveProps(newProps, newContext);\n }\n\n if (instance.state !== oldState) {\n {\n var componentName = getComponentName(workInProgress) || 'Component';\n if (!didWarnAboutStateAssignmentForComponent[componentName]) {\n warning(false, '%s.componentWillReceiveProps(): Assigning directly to ' + \"this.state is deprecated (except inside a component's \" + 'constructor). Use setState instead.', componentName);\n didWarnAboutStateAssignmentForComponent[componentName] = true;\n }\n }\n updater.enqueueReplaceState(instance, instance.state, null);\n }\n }\n\n // Invokes the mount life-cycles on a previously never rendered instance.\n function mountClassInstance(workInProgress, renderExpirationTime) {\n var current = workInProgress.alternate;\n\n {\n checkClassInstance(workInProgress);\n }\n\n var instance = workInProgress.stateNode;\n var state = instance.state || null;\n\n var props = workInProgress.pendingProps;\n !props ? invariant(false, 'There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n var unmaskedContext = getUnmaskedContext(workInProgress);\n\n instance.props = props;\n instance.state = workInProgress.memoizedState = state;\n instance.refs = emptyObject;\n instance.context = getMaskedContext(workInProgress, unmaskedContext);\n\n if (enableAsyncSubtreeAPI && workInProgress.type != null && workInProgress.type.prototype != null && workInProgress.type.prototype.unstable_isAsyncReactComponent === true) {\n workInProgress.internalContextTag |= AsyncUpdates;\n }\n\n if (typeof instance.componentWillMount === 'function') {\n callComponentWillMount(workInProgress, instance);\n // If we had additional state updates during this life-cycle, let's\n // process them now.\n var updateQueue = workInProgress.updateQueue;\n if (updateQueue !== null) {\n instance.state = processUpdateQueue(current, workInProgress, updateQueue, instance, props, renderExpirationTime);\n }\n }\n if (typeof instance.componentDidMount === 'function') {\n workInProgress.effectTag |= Update;\n }\n }\n\n // Called on a preexisting class instance. Returns false if a resumed render\n // could be reused.\n // function resumeMountClassInstance(\n // workInProgress: Fiber,\n // priorityLevel: PriorityLevel,\n // ): boolean {\n // const instance = workInProgress.stateNode;\n // resetInputPointers(workInProgress, instance);\n\n // let newState = workInProgress.memoizedState;\n // let newProps = workInProgress.pendingProps;\n // if (!newProps) {\n // // If there isn't any new props, then we'll reuse the memoized props.\n // // This could be from already completed work.\n // newProps = workInProgress.memoizedProps;\n // invariant(\n // newProps != null,\n // 'There should always be pending or memoized props. This error is ' +\n // 'likely caused by a bug in React. Please file an issue.',\n // );\n // }\n // const newUnmaskedContext = getUnmaskedContext(workInProgress);\n // const newContext = getMaskedContext(workInProgress, newUnmaskedContext);\n\n // const oldContext = instance.context;\n // const oldProps = workInProgress.memoizedProps;\n\n // if (\n // typeof instance.componentWillReceiveProps === 'function' &&\n // (oldProps !== newProps || oldContext !== newContext)\n // ) {\n // callComponentWillReceiveProps(\n // workInProgress,\n // instance,\n // newProps,\n // newContext,\n // );\n // }\n\n // // Process the update queue before calling shouldComponentUpdate\n // const updateQueue = workInProgress.updateQueue;\n // if (updateQueue !== null) {\n // newState = processUpdateQueue(\n // workInProgress,\n // updateQueue,\n // instance,\n // newState,\n // newProps,\n // priorityLevel,\n // );\n // }\n\n // // TODO: Should we deal with a setState that happened after the last\n // // componentWillMount and before this componentWillMount? Probably\n // // unsupported anyway.\n\n // if (\n // !checkShouldComponentUpdate(\n // workInProgress,\n // workInProgress.memoizedProps,\n // newProps,\n // workInProgress.memoizedState,\n // newState,\n // newContext,\n // )\n // ) {\n // // Update the existing instance's state, props, and context pointers even\n // // though we're bailing out.\n // instance.props = newProps;\n // instance.state = newState;\n // instance.context = newContext;\n // return false;\n // }\n\n // // Update the input pointers now so that they are correct when we call\n // // componentWillMount\n // instance.props = newProps;\n // instance.state = newState;\n // instance.context = newContext;\n\n // if (typeof instance.componentWillMount === 'function') {\n // callComponentWillMount(workInProgress, instance);\n // // componentWillMount may have called setState. Process the update queue.\n // const newUpdateQueue = workInProgress.updateQueue;\n // if (newUpdateQueue !== null) {\n // newState = processUpdateQueue(\n // workInProgress,\n // newUpdateQueue,\n // instance,\n // newState,\n // newProps,\n // priorityLevel,\n // );\n // }\n // }\n\n // if (typeof instance.componentDidMount === 'function') {\n // workInProgress.effectTag |= Update;\n // }\n\n // instance.state = newState;\n\n // return true;\n // }\n\n // Invokes the update life-cycles and returns false if it shouldn't rerender.\n function updateClassInstance(current, workInProgress, renderExpirationTime) {\n var instance = workInProgress.stateNode;\n resetInputPointers(workInProgress, instance);\n\n var oldProps = workInProgress.memoizedProps;\n var newProps = workInProgress.pendingProps;\n if (!newProps) {\n // If there aren't any new props, then we'll reuse the memoized props.\n // This could be from already completed work.\n newProps = oldProps;\n !(newProps != null) ? invariant(false, 'There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n var oldContext = instance.context;\n var newUnmaskedContext = getUnmaskedContext(workInProgress);\n var newContext = getMaskedContext(workInProgress, newUnmaskedContext);\n\n // Note: During these life-cycles, instance.props/instance.state are what\n // ever the previously attempted to render - not the \"current\". However,\n // during componentDidUpdate we pass the \"current\" props.\n\n if (typeof instance.componentWillReceiveProps === 'function' && (oldProps !== newProps || oldContext !== newContext)) {\n callComponentWillReceiveProps(workInProgress, instance, newProps, newContext);\n }\n\n // Compute the next state using the memoized state and the update queue.\n var oldState = workInProgress.memoizedState;\n // TODO: Previous state can be null.\n var newState = void 0;\n if (workInProgress.updateQueue !== null) {\n newState = processUpdateQueue(current, workInProgress, workInProgress.updateQueue, instance, newProps, renderExpirationTime);\n } else {\n newState = oldState;\n }\n\n if (oldProps === newProps && oldState === newState && !hasContextChanged() && !(workInProgress.updateQueue !== null && workInProgress.updateQueue.hasForceUpdate)) {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n return false;\n }\n\n var shouldUpdate = checkShouldComponentUpdate(workInProgress, oldProps, newProps, oldState, newState, newContext);\n\n if (shouldUpdate) {\n if (typeof instance.componentWillUpdate === 'function') {\n startPhaseTimer(workInProgress, 'componentWillUpdate');\n instance.componentWillUpdate(newProps, newState, newContext);\n stopPhaseTimer();\n\n // Simulate an async bailout/interruption by invoking lifecycle twice.\n if (debugRenderPhaseSideEffects) {\n instance.componentWillUpdate(newProps, newState, newContext);\n }\n }\n if (typeof instance.componentDidUpdate === 'function') {\n workInProgress.effectTag |= Update;\n }\n } else {\n // If an update was already in progress, we should schedule an Update\n // effect even though we're bailing out, so that cWU/cDU are called.\n if (typeof instance.componentDidUpdate === 'function') {\n if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {\n workInProgress.effectTag |= Update;\n }\n }\n\n // If shouldComponentUpdate returned false, we should still update the\n // memoized props/state to indicate that this work can be reused.\n memoizeProps(workInProgress, newProps);\n memoizeState(workInProgress, newState);\n }\n\n // Update the existing instance's state, props, and context pointers even\n // if shouldComponentUpdate returns false.\n instance.props = newProps;\n instance.state = newState;\n instance.context = newContext;\n\n return shouldUpdate;\n }\n\n return {\n adoptClassInstance: adoptClassInstance,\n constructClassInstance: constructClassInstance,\n mountClassInstance: mountClassInstance,\n // resumeMountClassInstance,\n updateClassInstance: updateClassInstance\n };\n};\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol['for'];\n\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;\nvar REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;\nvar REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;\n\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable === 'undefined') {\n return null;\n }\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n return null;\n}\n\nvar getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;\n\n\n{\n var didWarnAboutMaps = false;\n /**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n var ownerHasKeyUseWarning = {};\n var ownerHasFunctionTypeWarning = {};\n\n var warnForMissingKey = function (child) {\n if (child === null || typeof child !== 'object') {\n return;\n }\n if (!child._store || child._store.validated || child.key != null) {\n return;\n }\n !(typeof child._store === 'object') ? invariant(false, 'React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n child._store.validated = true;\n\n var currentComponentErrorInfo = 'Each child in an array or iterator should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + (getCurrentFiberStackAddendum$1() || '');\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true;\n\n warning(false, 'Each child in an array or iterator should have a unique ' + '\"key\" prop. See https://fb.me/react-warning-keys for ' + 'more information.%s', getCurrentFiberStackAddendum$1());\n };\n}\n\nvar isArray$1 = Array.isArray;\n\nfunction coerceRef(current, element) {\n var mixedRef = element.ref;\n if (mixedRef !== null && typeof mixedRef !== 'function') {\n if (element._owner) {\n var owner = element._owner;\n var inst = void 0;\n if (owner) {\n var ownerFiber = owner;\n !(ownerFiber.tag === ClassComponent) ? invariant(false, 'Stateless function components cannot have refs.') : void 0;\n inst = ownerFiber.stateNode;\n }\n !inst ? invariant(false, 'Missing owner for string ref %s. This error is likely caused by a bug in React. Please file an issue.', mixedRef) : void 0;\n var stringRef = '' + mixedRef;\n // Check if previous string ref matches new string ref\n if (current !== null && current.ref !== null && current.ref._stringRef === stringRef) {\n return current.ref;\n }\n var ref = function (value) {\n var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;\n if (value === null) {\n delete refs[stringRef];\n } else {\n refs[stringRef] = value;\n }\n };\n ref._stringRef = stringRef;\n return ref;\n } else {\n !(typeof mixedRef === 'string') ? invariant(false, 'Expected ref to be a function or a string.') : void 0;\n !element._owner ? invariant(false, 'Element ref was specified as a string (%s) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).', mixedRef) : void 0;\n }\n }\n return mixedRef;\n}\n\nfunction throwOnInvalidObjectType(returnFiber, newChild) {\n if (returnFiber.type !== 'textarea') {\n var addendum = '';\n {\n addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + (getCurrentFiberStackAddendum$1() || '');\n }\n invariant(false, 'Objects are not valid as a React child (found: %s).%s', Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild, addendum);\n }\n}\n\nfunction warnOnFunctionType() {\n var currentComponentErrorInfo = 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of from render. ' + 'Or maybe you meant to call this function rather than return it.' + (getCurrentFiberStackAddendum$1() || '');\n\n if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {\n return;\n }\n ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;\n\n warning(false, 'Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of from render. ' + 'Or maybe you meant to call this function rather than return it.%s', getCurrentFiberStackAddendum$1() || '');\n}\n\n// This wrapper function exists because I expect to clone the code in each path\n// to be able to optimize each path individually by branching early. This needs\n// a compiler or we can do it manually. Helpers that don't need this branching\n// live outside of this function.\nfunction ChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return;\n }\n // Deletions are added in reversed order so we add it to the front.\n // At this point, the return fiber's effect list is empty except for\n // deletions, so we can just append the deletion to the list. The remaining\n // effects aren't added until the complete phase. Once we implement\n // resuming, this may not be true.\n var last = returnFiber.lastEffect;\n if (last !== null) {\n last.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n childToDelete.nextEffect = null;\n childToDelete.effectTag = Deletion;\n }\n\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) {\n // Noop.\n return null;\n }\n\n // TODO: For the shouldClone case, this could be micro-optimized a bit by\n // assuming that after the first child we've already added everything.\n var childToDelete = currentFirstChild;\n while (childToDelete !== null) {\n deleteChild(returnFiber, childToDelete);\n childToDelete = childToDelete.sibling;\n }\n return null;\n }\n\n function mapRemainingChildren(returnFiber, currentFirstChild) {\n // Add the remaining children to a temporary map so that we can find them by\n // keys quickly. Implicit (null) keys get added to this set with their index\n var existingChildren = new Map();\n\n var existingChild = currentFirstChild;\n while (existingChild !== null) {\n if (existingChild.key !== null) {\n existingChildren.set(existingChild.key, existingChild);\n } else {\n existingChildren.set(existingChild.index, existingChild);\n }\n existingChild = existingChild.sibling;\n }\n return existingChildren;\n }\n\n function useFiber(fiber, pendingProps, expirationTime) {\n // We currently set sibling to null and index to 0 here because it is easy\n // to forget to do before returning it. E.g. for the single child case.\n var clone = createWorkInProgress(fiber, pendingProps, expirationTime);\n clone.index = 0;\n clone.sibling = null;\n return clone;\n }\n\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects) {\n // Noop.\n return lastPlacedIndex;\n }\n var current = newFiber.alternate;\n if (current !== null) {\n var oldIndex = current.index;\n if (oldIndex < lastPlacedIndex) {\n // This is a move.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n } else {\n // This item can stay in place.\n return oldIndex;\n }\n } else {\n // This is an insertion.\n newFiber.effectTag = Placement;\n return lastPlacedIndex;\n }\n }\n\n function placeSingleChild(newFiber) {\n // This is simpler for the single child case. We only need to do a\n // placement for inserting new children.\n if (shouldTrackSideEffects && newFiber.alternate === null) {\n newFiber.effectTag = Placement;\n }\n return newFiber;\n }\n\n function updateTextNode(returnFiber, current, textContent, expirationTime) {\n if (current === null || current.tag !== HostText) {\n // Insert\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateElement(returnFiber, current, element, expirationTime) {\n if (current !== null && current.type === element.type) {\n // Move based on index\n var existing = useFiber(current, element.props, expirationTime);\n existing.ref = coerceRef(current, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n // Insert\n var created = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n created.ref = coerceRef(current, element);\n created['return'] = returnFiber;\n return created;\n }\n }\n\n function updateCall(returnFiber, current, call, expirationTime) {\n // TODO: Should this also compare handler to determine whether to reuse?\n if (current === null || current.tag !== CallComponent) {\n // Insert\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateReturn(returnFiber, current, returnNode, expirationTime) {\n if (current === null || current.tag !== ReturnComponent) {\n // Insert\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n } else {\n // Move based on index\n var existing = useFiber(current, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updatePortal(returnFiber, current, portal, expirationTime) {\n if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {\n // Insert\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function updateFragment(returnFiber, current, fragment, expirationTime, key) {\n if (current === null || current.tag !== Fragment) {\n // Insert\n var created = createFiberFromFragment(fragment, returnFiber.internalContextTag, expirationTime, key);\n created['return'] = returnFiber;\n return created;\n } else {\n // Update\n var existing = useFiber(current, fragment, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n }\n\n function createChild(returnFiber, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n var created = createFiberFromText('' + newChild, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n var _created = createFiberFromFragment(newChild.props.children, returnFiber.internalContextTag, expirationTime, newChild.key);\n _created['return'] = returnFiber;\n return _created;\n } else {\n var _created2 = createFiberFromElement(newChild, returnFiber.internalContextTag, expirationTime);\n _created2.ref = coerceRef(null, newChild);\n _created2['return'] = returnFiber;\n return _created2;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n var _created3 = createFiberFromCall(newChild, returnFiber.internalContextTag, expirationTime);\n _created3['return'] = returnFiber;\n return _created3;\n }\n\n case REACT_RETURN_TYPE:\n {\n var _created4 = createFiberFromReturn(newChild, returnFiber.internalContextTag, expirationTime);\n _created4.type = newChild.value;\n _created4['return'] = returnFiber;\n return _created4;\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _created5 = createFiberFromPortal(newChild, returnFiber.internalContextTag, expirationTime);\n _created5['return'] = returnFiber;\n return _created5;\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _created6 = createFiberFromFragment(newChild, returnFiber.internalContextTag, expirationTime, null);\n _created6['return'] = returnFiber;\n return _created6;\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {\n // Update the fiber if the keys match, otherwise return null.\n\n var key = oldFiber !== null ? oldFiber.key : null;\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a text\n // node.\n if (key !== null) {\n return null;\n }\n return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n if (newChild.key === key) {\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);\n }\n return updateElement(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_CALL_TYPE:\n {\n if (newChild.key === key) {\n return updateCall(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys. If the previous node is implicitly keyed\n // we can continue to replace it without aborting even if it is not a\n // yield.\n if (key === null) {\n return updateReturn(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n\n case REACT_PORTAL_TYPE:\n {\n if (newChild.key === key) {\n return updatePortal(returnFiber, oldFiber, newChild, expirationTime);\n } else {\n return null;\n }\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n if (key !== null) {\n return null;\n }\n\n return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n // Text nodes don't have keys, so we neither have to check the old nor\n // new node for the key. If both are text nodes, they match.\n var matchedFiber = existingChildren.get(newIdx) || null;\n return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);\n }\n\n if (typeof newChild === 'object' && newChild !== null) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n {\n var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n if (newChild.type === REACT_FRAGMENT_TYPE) {\n return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);\n }\n return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);\n }\n\n case REACT_CALL_TYPE:\n {\n var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updateCall(returnFiber, _matchedFiber2, newChild, expirationTime);\n }\n\n case REACT_RETURN_TYPE:\n {\n // Returns don't have keys, so we neither have to check the old nor\n // new node for the key. If both are returns, they match.\n var _matchedFiber3 = existingChildren.get(newIdx) || null;\n return updateReturn(returnFiber, _matchedFiber3, newChild, expirationTime);\n }\n\n case REACT_PORTAL_TYPE:\n {\n var _matchedFiber4 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;\n return updatePortal(returnFiber, _matchedFiber4, newChild, expirationTime);\n }\n }\n\n if (isArray$1(newChild) || getIteratorFn(newChild)) {\n var _matchedFiber5 = existingChildren.get(newIdx) || null;\n return updateFragment(returnFiber, _matchedFiber5, newChild, expirationTime, null);\n }\n\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n\n return null;\n }\n\n /**\n * Warns if there is a duplicate or missing key\n */\n function warnOnInvalidKey(child, knownKeys) {\n {\n if (typeof child !== 'object' || child === null) {\n return knownKeys;\n }\n switch (child.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_CALL_TYPE:\n case REACT_PORTAL_TYPE:\n warnForMissingKey(child);\n var key = child.key;\n if (typeof key !== 'string') {\n break;\n }\n if (knownKeys === null) {\n knownKeys = new Set();\n knownKeys.add(key);\n break;\n }\n if (!knownKeys.has(key)) {\n knownKeys.add(key);\n break;\n }\n warning(false, 'Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.%s', key, getCurrentFiberStackAddendum$1());\n break;\n default:\n break;\n }\n }\n return knownKeys;\n }\n\n function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {\n // This algorithm can't optimize by searching from boths ends since we\n // don't have backpointers on fibers. I'm trying to see how far we can get\n // with that model. If it ends up not being worth the tradeoffs, we can\n // add it later.\n\n // Even with a two ended optimization, we'd want to optimize for the case\n // where there are few changes and brute force the comparison instead of\n // going for the Map. It'd like to explore hitting that path first in\n // forward-only mode and only go for the Map once we notice that we need\n // lots of look ahead. This doesn't handle reversal as well as two ended\n // search but that's unusual. Besides, for the two ended optimization to\n // work on Iterables, we'd need to copy the whole set.\n\n // In this first iteration, we'll just live with hitting the bad case\n // (adding everything to a Map) in for every insert/move.\n\n // If you change this code, also update reconcileChildrenIterator() which\n // uses the same algorithm.\n\n {\n // First, validate keys.\n var knownKeys = null;\n for (var i = 0; i < newChildren.length; i++) {\n var child = newChildren[i];\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (oldFiber === null) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (newIdx === newChildren.length) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);\n if (!_newFiber) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber;\n } else {\n previousNewFiber.sibling = _newFiber;\n }\n previousNewFiber = _newFiber;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; newIdx < newChildren.length; newIdx++) {\n var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);\n if (_newFiber2) {\n if (shouldTrackSideEffects) {\n if (_newFiber2.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber2.key === null ? newIdx : _newFiber2.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber2;\n } else {\n previousNewFiber.sibling = _newFiber2;\n }\n previousNewFiber = _newFiber2;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {\n // This is the same implementation as reconcileChildrenArray(),\n // but using the iterator instead.\n\n var iteratorFn = getIteratorFn(newChildrenIterable);\n !(typeof iteratorFn === 'function') ? invariant(false, 'An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n {\n // Warn about using Maps as children\n if (typeof newChildrenIterable.entries === 'function') {\n var possibleMap = newChildrenIterable;\n if (possibleMap.entries === iteratorFn) {\n warning(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', getCurrentFiberStackAddendum$1());\n didWarnAboutMaps = true;\n }\n }\n\n // First, validate keys.\n // We'll get a different iterator later for the main pass.\n var _newChildren = iteratorFn.call(newChildrenIterable);\n if (_newChildren) {\n var knownKeys = null;\n var _step = _newChildren.next();\n for (; !_step.done; _step = _newChildren.next()) {\n var child = _step.value;\n knownKeys = warnOnInvalidKey(child, knownKeys);\n }\n }\n }\n\n var newChildren = iteratorFn.call(newChildrenIterable);\n !(newChildren != null) ? invariant(false, 'An iterable object provided no iterator.') : void 0;\n\n var resultingFirstChild = null;\n var previousNewFiber = null;\n\n var oldFiber = currentFirstChild;\n var lastPlacedIndex = 0;\n var newIdx = 0;\n var nextOldFiber = null;\n\n var step = newChildren.next();\n for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {\n if (oldFiber.index > newIdx) {\n nextOldFiber = oldFiber;\n oldFiber = null;\n } else {\n nextOldFiber = oldFiber.sibling;\n }\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);\n if (newFiber === null) {\n // TODO: This breaks on empty slots like null children. That's\n // unfortunate because it triggers the slow path all the time. We need\n // a better way to communicate whether this was a miss or null,\n // boolean, undefined, etc.\n if (!oldFiber) {\n oldFiber = nextOldFiber;\n }\n break;\n }\n if (shouldTrackSideEffects) {\n if (oldFiber && newFiber.alternate === null) {\n // We matched the slot, but we didn't reuse the existing fiber, so we\n // need to delete the existing child.\n deleteChild(returnFiber, oldFiber);\n }\n }\n lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = newFiber;\n } else {\n // TODO: Defer siblings if we're not at the right index for this slot.\n // I.e. if we had null values before, then we want to defer this\n // for each null value. However, we also don't want to call updateSlot\n // with the previous one.\n previousNewFiber.sibling = newFiber;\n }\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n\n if (step.done) {\n // We've reached the end of the new children. We can delete the rest.\n deleteRemainingChildren(returnFiber, oldFiber);\n return resultingFirstChild;\n }\n\n if (oldFiber === null) {\n // If we don't have any more existing children we can choose a fast path\n // since the rest will all be insertions.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber3 = createChild(returnFiber, step.value, expirationTime);\n if (_newFiber3 === null) {\n continue;\n }\n lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n // TODO: Move out of the loop. This only happens for the first run.\n resultingFirstChild = _newFiber3;\n } else {\n previousNewFiber.sibling = _newFiber3;\n }\n previousNewFiber = _newFiber3;\n }\n return resultingFirstChild;\n }\n\n // Add all children to a key map for quick lookups.\n var existingChildren = mapRemainingChildren(returnFiber, oldFiber);\n\n // Keep scanning and use the map to restore deleted items as moves.\n for (; !step.done; newIdx++, step = newChildren.next()) {\n var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);\n if (_newFiber4 !== null) {\n if (shouldTrackSideEffects) {\n if (_newFiber4.alternate !== null) {\n // The new fiber is a work in progress, but if there exists a\n // current, that means that we reused the fiber. We need to delete\n // it from the child list so that we don't add it to the deletion\n // list.\n existingChildren['delete'](_newFiber4.key === null ? newIdx : _newFiber4.key);\n }\n }\n lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);\n if (previousNewFiber === null) {\n resultingFirstChild = _newFiber4;\n } else {\n previousNewFiber.sibling = _newFiber4;\n }\n previousNewFiber = _newFiber4;\n }\n }\n\n if (shouldTrackSideEffects) {\n // Any existing children that weren't consumed above were deleted. We need\n // to add them to the deletion list.\n existingChildren.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n }\n\n return resultingFirstChild;\n }\n\n function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {\n // There's no need to check for keys on text nodes since we don't have a\n // way to define them.\n if (currentFirstChild !== null && currentFirstChild.tag === HostText) {\n // We already have an existing node so let's just update it and delete\n // the rest.\n deleteRemainingChildren(returnFiber, currentFirstChild.sibling);\n var existing = useFiber(currentFirstChild, textContent, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n }\n // The existing first child is not a text node so we need to create one\n // and delete the existing ones.\n deleteRemainingChildren(returnFiber, currentFirstChild);\n var created = createFiberFromText(textContent, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {\n var key = element.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === Fragment ? element.type === REACT_FRAGMENT_TYPE : child.type === element.type) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, element.type === REACT_FRAGMENT_TYPE ? element.props.children : element.props, expirationTime);\n existing.ref = coerceRef(child, element);\n existing['return'] = returnFiber;\n {\n existing._debugSource = element._source;\n existing._debugOwner = element._owner;\n }\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n if (element.type === REACT_FRAGMENT_TYPE) {\n var created = createFiberFromFragment(element.props.children, returnFiber.internalContextTag, expirationTime, element.key);\n created['return'] = returnFiber;\n return created;\n } else {\n var _created7 = createFiberFromElement(element, returnFiber.internalContextTag, expirationTime);\n _created7.ref = coerceRef(currentFirstChild, element);\n _created7['return'] = returnFiber;\n return _created7;\n }\n }\n\n function reconcileSingleCall(returnFiber, currentFirstChild, call, expirationTime) {\n var key = call.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === CallComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, call, expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromCall(call, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSingleReturn(returnFiber, currentFirstChild, returnNode, expirationTime) {\n // There's no need to check for keys on yields since they're stateless.\n var child = currentFirstChild;\n if (child !== null) {\n if (child.tag === ReturnComponent) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, null, expirationTime);\n existing.type = returnNode.value;\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n }\n }\n\n var created = createFiberFromReturn(returnNode, returnFiber.internalContextTag, expirationTime);\n created.type = returnNode.value;\n created['return'] = returnFiber;\n return created;\n }\n\n function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {\n var key = portal.key;\n var child = currentFirstChild;\n while (child !== null) {\n // TODO: If key === null and child.key === null, then this only applies to\n // the first item in the list.\n if (child.key === key) {\n if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {\n deleteRemainingChildren(returnFiber, child.sibling);\n var existing = useFiber(child, portal.children || [], expirationTime);\n existing['return'] = returnFiber;\n return existing;\n } else {\n deleteRemainingChildren(returnFiber, child);\n break;\n }\n } else {\n deleteChild(returnFiber, child);\n }\n child = child.sibling;\n }\n\n var created = createFiberFromPortal(portal, returnFiber.internalContextTag, expirationTime);\n created['return'] = returnFiber;\n return created;\n }\n\n // This API will tag the children with the side-effect of the reconciliation\n // itself. They will be added to the side-effect list as we pass through the\n // children and the parent.\n function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {\n // This function is not recursive.\n // If the top level item is an array, we treat it as a set of children,\n // not as a fragment. Nested arrays on the other hand will be treated as\n // fragment nodes. Recursion happens at the normal flow.\n\n // Handle top level unkeyed fragments as if they were arrays.\n // This leads to an ambiguity between <>{[...]} and <>....\n // We treat the ambiguous cases above the same.\n if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {\n newChild = newChild.props.children;\n }\n\n // Handle object types\n var isObject = typeof newChild === 'object' && newChild !== null;\n\n if (isObject) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));\n\n case REACT_CALL_TYPE:\n return placeSingleChild(reconcileSingleCall(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_RETURN_TYPE:\n return placeSingleChild(reconcileSingleReturn(returnFiber, currentFirstChild, newChild, expirationTime));\n case REACT_PORTAL_TYPE:\n return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));\n }\n }\n\n if (typeof newChild === 'string' || typeof newChild === 'number') {\n return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));\n }\n\n if (isArray$1(newChild)) {\n return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (getIteratorFn(newChild)) {\n return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);\n }\n\n if (isObject) {\n throwOnInvalidObjectType(returnFiber, newChild);\n }\n\n {\n if (typeof newChild === 'function') {\n warnOnFunctionType();\n }\n }\n if (typeof newChild === 'undefined') {\n // If the new child is undefined, and the return fiber is a composite\n // component, throw an error. If Fiber return types are disabled,\n // we already threw above.\n switch (returnFiber.tag) {\n case ClassComponent:\n {\n {\n var instance = returnFiber.stateNode;\n if (instance.render._isMockFunction) {\n // We allow auto-mocks to proceed as if they're returning null.\n break;\n }\n }\n }\n // Intentionally fall through to the next case, which handles both\n // functions and classes\n // eslint-disable-next-lined no-fallthrough\n case FunctionalComponent:\n {\n var Component = returnFiber.type;\n invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', Component.displayName || Component.name || 'Component');\n }\n }\n }\n\n // Remaining cases are all treated as empty.\n return deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n\n return reconcileChildFibers;\n}\n\nvar reconcileChildFibers = ChildReconciler(true);\nvar mountChildFibers = ChildReconciler(false);\n\nfunction cloneChildFibers(current, workInProgress) {\n !(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;\n\n if (workInProgress.child === null) {\n return;\n }\n\n var currentChild = workInProgress.child;\n var newChild = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);\n workInProgress.child = newChild;\n\n newChild['return'] = workInProgress;\n while (currentChild.sibling !== null) {\n currentChild = currentChild.sibling;\n newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps, currentChild.expirationTime);\n newChild['return'] = workInProgress;\n }\n newChild.sibling = null;\n}\n\n{\n var warnedAboutStatelessRefs = {};\n}\n\nvar ReactFiberBeginWork = function (config, hostContext, hydrationContext, scheduleWork, computeExpirationForFiber) {\n var shouldSetTextContent = config.shouldSetTextContent,\n useSyncScheduling = config.useSyncScheduling,\n shouldDeprioritizeSubtree = config.shouldDeprioritizeSubtree;\n var pushHostContext = hostContext.pushHostContext,\n pushHostContainer = hostContext.pushHostContainer;\n var enterHydrationState = hydrationContext.enterHydrationState,\n resetHydrationState = hydrationContext.resetHydrationState,\n tryToClaimNextHydratableInstance = hydrationContext.tryToClaimNextHydratableInstance;\n\n var _ReactFiberClassCompo = ReactFiberClassComponent(scheduleWork, computeExpirationForFiber, memoizeProps, memoizeState),\n adoptClassInstance = _ReactFiberClassCompo.adoptClassInstance,\n constructClassInstance = _ReactFiberClassCompo.constructClassInstance,\n mountClassInstance = _ReactFiberClassCompo.mountClassInstance,\n updateClassInstance = _ReactFiberClassCompo.updateClassInstance;\n\n // TODO: Remove this and use reconcileChildrenAtExpirationTime directly.\n\n\n function reconcileChildren(current, workInProgress, nextChildren) {\n reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, workInProgress.expirationTime);\n }\n\n function reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime) {\n if (current === null) {\n // If this is a fresh new component that hasn't been rendered yet, we\n // won't update its child set by applying minimal side-effects. Instead,\n // we will add them all to the child before it gets rendered. That means\n // we can optimize this reconciliation pass by not tracking side-effects.\n workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n } else {\n // If the current child is the same as the work in progress, it means that\n // we haven't yet started any work on these children. Therefore, we use\n // the clone algorithm to create a copy of all the current children.\n\n // If we had any progressed work already, that is invalid at this point so\n // let's throw it out.\n workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);\n }\n }\n\n function updateFragment(current, workInProgress) {\n var nextChildren = workInProgress.pendingProps;\n if (hasContextChanged()) {\n // Normally we can bail out on props equality but if context has changed\n // we don't do the bailout and we have to reuse existing props instead.\n if (nextChildren === null) {\n nextChildren = workInProgress.memoizedProps;\n }\n } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n reconcileChildren(current, workInProgress, nextChildren);\n memoizeProps(workInProgress, nextChildren);\n return workInProgress.child;\n }\n\n function markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (ref !== null && (!current || current.ref !== ref)) {\n // Schedule a Ref effect\n workInProgress.effectTag |= Ref;\n }\n }\n\n function updateFunctionalComponent(current, workInProgress) {\n var fn = workInProgress.type;\n var nextProps = workInProgress.pendingProps;\n\n var memoizedProps = workInProgress.memoizedProps;\n if (hasContextChanged()) {\n // Normally we can bail out on props equality but if context has changed\n // we don't do the bailout and we have to reuse existing props instead.\n if (nextProps === null) {\n nextProps = memoizedProps;\n }\n } else {\n if (nextProps === null || memoizedProps === nextProps) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n // TODO: consider bringing fn.shouldComponentUpdate() back.\n // It used to be here.\n }\n\n var unmaskedContext = getUnmaskedContext(workInProgress);\n var context = getMaskedContext(workInProgress, unmaskedContext);\n\n var nextChildren;\n\n {\n ReactCurrentOwner.current = workInProgress;\n ReactDebugCurrentFiber.setCurrentPhase('render');\n nextChildren = fn(nextProps, context);\n ReactDebugCurrentFiber.setCurrentPhase(null);\n }\n // React DevTools reads this flag.\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren);\n memoizeProps(workInProgress, nextProps);\n return workInProgress.child;\n }\n\n function updateClassComponent(current, workInProgress, renderExpirationTime) {\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n var hasContext = pushContextProvider(workInProgress);\n\n var shouldUpdate = void 0;\n if (current === null) {\n if (!workInProgress.stateNode) {\n // In the initial pass we might need to construct the instance.\n constructClassInstance(workInProgress, workInProgress.pendingProps);\n mountClassInstance(workInProgress, renderExpirationTime);\n shouldUpdate = true;\n } else {\n invariant(false, 'Resuming work not yet implemented.');\n // In a resume, we'll already have an instance we can reuse.\n // shouldUpdate = resumeMountClassInstance(workInProgress, renderExpirationTime);\n }\n } else {\n shouldUpdate = updateClassInstance(current, workInProgress, renderExpirationTime);\n }\n return finishClassComponent(current, workInProgress, shouldUpdate, hasContext);\n }\n\n function finishClassComponent(current, workInProgress, shouldUpdate, hasContext) {\n // Refs should update even if shouldComponentUpdate returns false\n markRef(current, workInProgress);\n\n if (!shouldUpdate) {\n // Context providers should defer to sCU for rendering\n if (hasContext) {\n invalidateContextProvider(workInProgress, false);\n }\n\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n\n var instance = workInProgress.stateNode;\n\n // Rerender\n ReactCurrentOwner.current = workInProgress;\n var nextChildren = void 0;\n {\n ReactDebugCurrentFiber.setCurrentPhase('render');\n nextChildren = instance.render();\n if (debugRenderPhaseSideEffects) {\n instance.render();\n }\n ReactDebugCurrentFiber.setCurrentPhase(null);\n }\n // React DevTools reads this flag.\n workInProgress.effectTag |= PerformedWork;\n reconcileChildren(current, workInProgress, nextChildren);\n // Memoize props and state using the values we just used to render.\n // TODO: Restructure so we never read values from the instance.\n memoizeState(workInProgress, instance.state);\n memoizeProps(workInProgress, instance.props);\n\n // The context might have changed so we need to recalculate it.\n if (hasContext) {\n invalidateContextProvider(workInProgress, true);\n }\n\n return workInProgress.child;\n }\n\n function pushHostRootContext(workInProgress) {\n var root = workInProgress.stateNode;\n if (root.pendingContext) {\n pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);\n } else if (root.context) {\n // Should always be set\n pushTopLevelContextObject(workInProgress, root.context, false);\n }\n pushHostContainer(workInProgress, root.containerInfo);\n }\n\n function updateHostRoot(current, workInProgress, renderExpirationTime) {\n pushHostRootContext(workInProgress);\n var updateQueue = workInProgress.updateQueue;\n if (updateQueue !== null) {\n var prevState = workInProgress.memoizedState;\n var state = processUpdateQueue(current, workInProgress, updateQueue, null, null, renderExpirationTime);\n if (prevState === state) {\n // If the state is the same as before, that's a bailout because we had\n // no work that expires at this time.\n resetHydrationState();\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n var element = state.element;\n var root = workInProgress.stateNode;\n if ((current === null || current.child === null) && root.hydrate && enterHydrationState(workInProgress)) {\n // If we don't have any current children this might be the first pass.\n // We always try to hydrate. If this isn't a hydration pass there won't\n // be any children to hydrate which is effectively the same thing as\n // not hydrating.\n\n // This is a bit of a hack. We track the host root as a placement to\n // know that we're currently in a mounting state. That way isMounted\n // works as expected. We must reset this before committing.\n // TODO: Delete this when we delete isMounted and findDOMNode.\n workInProgress.effectTag |= Placement;\n\n // Ensure that children mount into this root without tracking\n // side-effects. This ensures that we don't store Placement effects on\n // nodes that will be hydrated.\n workInProgress.child = mountChildFibers(workInProgress, null, element, renderExpirationTime);\n } else {\n // Otherwise reset hydration state in case we aborted and resumed another\n // root.\n resetHydrationState();\n reconcileChildren(current, workInProgress, element);\n }\n memoizeState(workInProgress, state);\n return workInProgress.child;\n }\n resetHydrationState();\n // If there is no update queue, that's a bailout because the root has no props.\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n\n function updateHostComponent(current, workInProgress, renderExpirationTime) {\n pushHostContext(workInProgress);\n\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n\n var type = workInProgress.type;\n var memoizedProps = workInProgress.memoizedProps;\n var nextProps = workInProgress.pendingProps;\n if (nextProps === null) {\n nextProps = memoizedProps;\n !(nextProps !== null) ? invariant(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n var prevProps = current !== null ? current.memoizedProps : null;\n\n if (hasContextChanged()) {\n // Normally we can bail out on props equality but if context has changed\n // we don't do the bailout and we have to reuse existing props instead.\n } else if (nextProps === null || memoizedProps === nextProps) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n\n var nextChildren = nextProps.children;\n var isDirectTextChild = shouldSetTextContent(type, nextProps);\n\n if (isDirectTextChild) {\n // We special case a direct text child of a host node. This is a common\n // case. We won't handle it as a reified child. We will instead handle\n // this in the host environment that also have access to this prop. That\n // avoids allocating another HostText fiber and traversing it.\n nextChildren = null;\n } else if (prevProps && shouldSetTextContent(type, prevProps)) {\n // If we're switching from a direct text child to a normal child, or to\n // empty, we need to schedule the text content to be reset.\n workInProgress.effectTag |= ContentReset;\n }\n\n markRef(current, workInProgress);\n\n // Check the host config to see if the children are offscreen/hidden.\n if (renderExpirationTime !== Never && !useSyncScheduling && shouldDeprioritizeSubtree(type, nextProps)) {\n // Down-prioritize the children.\n workInProgress.expirationTime = Never;\n // Bailout and come back to this fiber later.\n return null;\n }\n\n reconcileChildren(current, workInProgress, nextChildren);\n memoizeProps(workInProgress, nextProps);\n return workInProgress.child;\n }\n\n function updateHostText(current, workInProgress) {\n if (current === null) {\n tryToClaimNextHydratableInstance(workInProgress);\n }\n var nextProps = workInProgress.pendingProps;\n if (nextProps === null) {\n nextProps = workInProgress.memoizedProps;\n }\n memoizeProps(workInProgress, nextProps);\n // Nothing to do here. This is terminal. We'll do the completion step\n // immediately after.\n return null;\n }\n\n function mountIndeterminateComponent(current, workInProgress, renderExpirationTime) {\n !(current === null) ? invariant(false, 'An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n var fn = workInProgress.type;\n var props = workInProgress.pendingProps;\n var unmaskedContext = getUnmaskedContext(workInProgress);\n var context = getMaskedContext(workInProgress, unmaskedContext);\n\n var value;\n\n {\n if (fn.prototype && typeof fn.prototype.render === 'function') {\n var componentName = getComponentName(workInProgress);\n warning(false, \"The <%s /> component appears to have a render method, but doesn't extend React.Component. \" + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);\n }\n ReactCurrentOwner.current = workInProgress;\n value = fn(props, context);\n }\n // React DevTools reads this flag.\n workInProgress.effectTag |= PerformedWork;\n\n if (typeof value === 'object' && value !== null && typeof value.render === 'function') {\n // Proceed under the assumption that this is a class instance\n workInProgress.tag = ClassComponent;\n\n // Push context providers early to prevent context stack mismatches.\n // During mounting we don't know the child context yet as the instance doesn't exist.\n // We will invalidate the child context in finishClassComponent() right after rendering.\n var hasContext = pushContextProvider(workInProgress);\n adoptClassInstance(workInProgress, value);\n mountClassInstance(workInProgress, renderExpirationTime);\n return finishClassComponent(current, workInProgress, true, hasContext);\n } else {\n // Proceed under the assumption that this is a functional component\n workInProgress.tag = FunctionalComponent;\n {\n var Component = workInProgress.type;\n\n if (Component) {\n warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component');\n }\n if (workInProgress.ref !== null) {\n var info = '';\n var ownerName = ReactDebugCurrentFiber.getCurrentFiberOwnerName();\n if (ownerName) {\n info += '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n var warningKey = ownerName || workInProgress._debugID || '';\n var debugSource = workInProgress._debugSource;\n if (debugSource) {\n warningKey = debugSource.fileName + ':' + debugSource.lineNumber;\n }\n if (!warnedAboutStatelessRefs[warningKey]) {\n warnedAboutStatelessRefs[warningKey] = true;\n warning(false, 'Stateless function components cannot be given refs. ' + 'Attempts to access this ref will fail.%s%s', info, ReactDebugCurrentFiber.getCurrentFiberStackAddendum());\n }\n }\n }\n reconcileChildren(current, workInProgress, value);\n memoizeProps(workInProgress, props);\n return workInProgress.child;\n }\n }\n\n function updateCallComponent(current, workInProgress, renderExpirationTime) {\n var nextCall = workInProgress.pendingProps;\n if (hasContextChanged()) {\n // Normally we can bail out on props equality but if context has changed\n // we don't do the bailout and we have to reuse existing props instead.\n if (nextCall === null) {\n nextCall = current && current.memoizedProps;\n !(nextCall !== null) ? invariant(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n } else if (nextCall === null || workInProgress.memoizedProps === nextCall) {\n nextCall = workInProgress.memoizedProps;\n // TODO: When bailing out, we might need to return the stateNode instead\n // of the child. To check it for work.\n // return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n\n var nextChildren = nextCall.children;\n\n // The following is a fork of reconcileChildrenAtExpirationTime but using\n // stateNode to store the child.\n if (current === null) {\n workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);\n } else {\n workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);\n }\n\n memoizeProps(workInProgress, nextCall);\n // This doesn't take arbitrary time so we could synchronously just begin\n // eagerly do the work of workInProgress.child as an optimization.\n return workInProgress.stateNode;\n }\n\n function updatePortalComponent(current, workInProgress, renderExpirationTime) {\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n var nextChildren = workInProgress.pendingProps;\n if (hasContextChanged()) {\n // Normally we can bail out on props equality but if context has changed\n // we don't do the bailout and we have to reuse existing props instead.\n if (nextChildren === null) {\n nextChildren = current && current.memoizedProps;\n !(nextChildren != null) ? invariant(false, 'We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n }\n } else if (nextChildren === null || workInProgress.memoizedProps === nextChildren) {\n return bailoutOnAlreadyFinishedWork(current, workInProgress);\n }\n\n if (current === null) {\n // Portals are special because we don't append the children during mount\n // but at commit. Therefore we need to track insertions which the normal\n // flow doesn't do during mount. This doesn't happen at the root because\n // the root always starts with a \"current\" with a null child.\n // TODO: Consider unifying this with how the root works.\n workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);\n memoizeProps(workInProgress, nextChildren);\n } else {\n reconcileChildren(current, workInProgress, nextChildren);\n memoizeProps(workInProgress, nextChildren);\n }\n return workInProgress.child;\n }\n\n /*\n function reuseChildrenEffects(returnFiber : Fiber, firstChild : Fiber) {\n let child = firstChild;\n do {\n // Ensure that the first and last effect of the parent corresponds\n // to the children's first and last effect.\n if (!returnFiber.firstEffect) {\n returnFiber.firstEffect = child.firstEffect;\n }\n if (child.lastEffect) {\n if (returnFiber.lastEffect) {\n returnFiber.lastEffect.nextEffect = child.firstEffect;\n }\n returnFiber.lastEffect = child.lastEffect;\n }\n } while (child = child.sibling);\n }\n */\n\n function bailoutOnAlreadyFinishedWork(current, workInProgress) {\n cancelWorkTimer(workInProgress);\n\n // TODO: We should ideally be able to bail out early if the children have no\n // more work to do. However, since we don't have a separation of this\n // Fiber's priority and its children yet - we don't know without doing lots\n // of the same work we do anyway. Once we have that separation we can just\n // bail out here if the children has no more work at this priority level.\n // if (workInProgress.priorityOfChildren <= priorityLevel) {\n // // If there are side-effects in these children that have not yet been\n // // committed we need to ensure that they get properly transferred up.\n // if (current && current.child !== workInProgress.child) {\n // reuseChildrenEffects(workInProgress, child);\n // }\n // return null;\n // }\n\n cloneChildFibers(current, workInProgress);\n return workInProgress.child;\n }\n\n function bailoutOnLowPriority(current, workInProgress) {\n cancelWorkTimer(workInProgress);\n\n // TODO: Handle HostComponent tags here as well and call pushHostContext()?\n // See PR 8590 discussion for context\n switch (workInProgress.tag) {\n case HostRoot:\n pushHostRootContext(workInProgress);\n break;\n case ClassComponent:\n pushContextProvider(workInProgress);\n break;\n case HostPortal:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n }\n // TODO: What if this is currently in progress?\n // How can that happen? How is this not being cloned?\n return null;\n }\n\n // TODO: Delete memoizeProps/State and move to reconcile/bailout instead\n function memoizeProps(workInProgress, nextProps) {\n workInProgress.memoizedProps = nextProps;\n }\n\n function memoizeState(workInProgress, nextState) {\n workInProgress.memoizedState = nextState;\n // Don't reset the updateQueue, in case there are pending updates. Resetting\n // is handled by processUpdateQueue.\n }\n\n function beginWork(current, workInProgress, renderExpirationTime) {\n if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {\n return bailoutOnLowPriority(current, workInProgress);\n }\n\n switch (workInProgress.tag) {\n case IndeterminateComponent:\n return mountIndeterminateComponent(current, workInProgress, renderExpirationTime);\n case FunctionalComponent:\n return updateFunctionalComponent(current, workInProgress);\n case ClassComponent:\n return updateClassComponent(current, workInProgress, renderExpirationTime);\n case HostRoot:\n return updateHostRoot(current, workInProgress, renderExpirationTime);\n case HostComponent:\n return updateHostComponent(current, workInProgress, renderExpirationTime);\n case HostText:\n return updateHostText(current, workInProgress);\n case CallHandlerPhase:\n // This is a restart. Reset the tag to the initial phase.\n workInProgress.tag = CallComponent;\n // Intentionally fall through since this is now the same.\n case CallComponent:\n return updateCallComponent(current, workInProgress, renderExpirationTime);\n case ReturnComponent:\n // A return component is just a placeholder, we can just run through the\n // next one immediately.\n return null;\n case HostPortal:\n return updatePortalComponent(current, workInProgress, renderExpirationTime);\n case Fragment:\n return updateFragment(current, workInProgress);\n default:\n invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n function beginFailedWork(current, workInProgress, renderExpirationTime) {\n // Push context providers here to avoid a push/pop context mismatch.\n switch (workInProgress.tag) {\n case ClassComponent:\n pushContextProvider(workInProgress);\n break;\n case HostRoot:\n pushHostRootContext(workInProgress);\n break;\n default:\n invariant(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');\n }\n\n // Add an error effect so we can handle the error during the commit phase\n workInProgress.effectTag |= Err;\n\n // This is a weird case where we do \"resume\" work — work that failed on\n // our first attempt. Because we no longer have a notion of \"progressed\n // deletions,\" reset the child to the current child to make sure we delete\n // it again. TODO: Find a better way to handle this, perhaps during a more\n // general overhaul of error handling.\n if (current === null) {\n workInProgress.child = null;\n } else if (workInProgress.child !== current.child) {\n workInProgress.child = current.child;\n }\n\n if (workInProgress.expirationTime === NoWork || workInProgress.expirationTime > renderExpirationTime) {\n return bailoutOnLowPriority(current, workInProgress);\n }\n\n // If we don't bail out, we're going be recomputing our children so we need\n // to drop our effect list.\n workInProgress.firstEffect = null;\n workInProgress.lastEffect = null;\n\n // Unmount the current children as if the component rendered null\n var nextChildren = null;\n reconcileChildrenAtExpirationTime(current, workInProgress, nextChildren, renderExpirationTime);\n\n if (workInProgress.tag === ClassComponent) {\n var instance = workInProgress.stateNode;\n workInProgress.memoizedProps = instance.props;\n workInProgress.memoizedState = instance.state;\n }\n\n return workInProgress.child;\n }\n\n return {\n beginWork: beginWork,\n beginFailedWork: beginFailedWork\n };\n};\n\nvar ReactFiberCompleteWork = function (config, hostContext, hydrationContext) {\n var createInstance = config.createInstance,\n createTextInstance = config.createTextInstance,\n appendInitialChild = config.appendInitialChild,\n finalizeInitialChildren = config.finalizeInitialChildren,\n prepareUpdate = config.prepareUpdate,\n mutation = config.mutation,\n persistence = config.persistence;\n var getRootHostContainer = hostContext.getRootHostContainer,\n popHostContext = hostContext.popHostContext,\n getHostContext = hostContext.getHostContext,\n popHostContainer = hostContext.popHostContainer;\n var prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance,\n prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance,\n popHydrationState = hydrationContext.popHydrationState;\n\n\n function markUpdate(workInProgress) {\n // Tag the fiber with an update effect. This turns a Placement into\n // an UpdateAndPlacement.\n workInProgress.effectTag |= Update;\n }\n\n function markRef(workInProgress) {\n workInProgress.effectTag |= Ref;\n }\n\n function appendAllReturns(returns, workInProgress) {\n var node = workInProgress.stateNode;\n if (node) {\n node['return'] = workInProgress;\n }\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText || node.tag === HostPortal) {\n invariant(false, 'A call cannot have host component children.');\n } else if (node.tag === ReturnComponent) {\n returns.push(node.type);\n } else if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === workInProgress) {\n return;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n }\n\n function moveCallToHandlerPhase(current, workInProgress, renderExpirationTime) {\n var call = workInProgress.memoizedProps;\n !call ? invariant(false, 'Should be resolved by now. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n // First step of the call has completed. Now we need to do the second.\n // TODO: It would be nice to have a multi stage call represented by a\n // single component, or at least tail call optimize nested ones. Currently\n // that requires additional fields that we don't want to add to the fiber.\n // So this requires nested handlers.\n // Note: This doesn't mutate the alternate node. I don't think it needs to\n // since this stage is reset for every pass.\n workInProgress.tag = CallHandlerPhase;\n\n // Build up the returns.\n // TODO: Compare this to a generator or opaque helpers like Children.\n var returns = [];\n appendAllReturns(returns, workInProgress);\n var fn = call.handler;\n var props = call.props;\n var nextChildren = fn(props, returns);\n\n var currentFirstChild = current !== null ? current.child : null;\n workInProgress.child = reconcileChildFibers(workInProgress, currentFirstChild, nextChildren, renderExpirationTime);\n return workInProgress.child;\n }\n\n function appendAllChildren(parent, workInProgress) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendInitialChild(parent, node.stateNode);\n } else if (node.tag === HostPortal) {\n // If we have a portal child, then we don't want to traverse\n // down its children. Instead, we'll get insertions from each child in\n // the portal directly.\n } else if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === workInProgress) {\n return;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === workInProgress) {\n return;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n }\n\n var updateHostContainer = void 0;\n var updateHostComponent = void 0;\n var updateHostText = void 0;\n if (mutation) {\n if (enableMutatingReconciler) {\n // Mutation mode\n updateHostContainer = function (workInProgress) {\n // Noop\n };\n updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {\n // TODO: Type this specific to this type of component.\n workInProgress.updateQueue = updatePayload;\n // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update. All the work is done in commitWork.\n if (updatePayload) {\n markUpdate(workInProgress);\n }\n };\n updateHostText = function (current, workInProgress, oldText, newText) {\n // If the text differs, mark it as an update. All the work in done in commitWork.\n if (oldText !== newText) {\n markUpdate(workInProgress);\n }\n };\n } else {\n invariant(false, 'Mutating reconciler is disabled.');\n }\n } else if (persistence) {\n if (enablePersistentReconciler) {\n // Persistent host tree mode\n var cloneInstance = persistence.cloneInstance,\n createContainerChildSet = persistence.createContainerChildSet,\n appendChildToContainerChildSet = persistence.appendChildToContainerChildSet,\n finalizeContainerChildren = persistence.finalizeContainerChildren;\n\n // An unfortunate fork of appendAllChildren because we have two different parent types.\n\n var appendAllChildrenToContainer = function (containerChildSet, workInProgress) {\n // We only have the top Fiber that was created but we need recurse down its\n // children to find all the terminal nodes.\n var node = workInProgress.child;\n while (node !== null) {\n if (node.tag === HostComponent || node.tag === HostText) {\n appendChildToContainerChildSet(containerChildSet, node.stateNode);\n } else if (node.tag === HostPortal) {\n // If we have a portal child, then we don't want to traverse\n // down its children. Instead, we'll get insertions from each child in\n // the portal directly.\n } else if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === workInProgress) {\n return;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === workInProgress) {\n return;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n };\n updateHostContainer = function (workInProgress) {\n var portalOrRoot = workInProgress.stateNode;\n var childrenUnchanged = workInProgress.firstEffect === null;\n if (childrenUnchanged) {\n // No changes, just reuse the existing instance.\n } else {\n var container = portalOrRoot.containerInfo;\n var newChildSet = createContainerChildSet(container);\n if (finalizeContainerChildren(container, newChildSet)) {\n markUpdate(workInProgress);\n }\n portalOrRoot.pendingChildren = newChildSet;\n // If children might have changed, we have to add them all to the set.\n appendAllChildrenToContainer(newChildSet, workInProgress);\n // Schedule an update on the container to swap out the container.\n markUpdate(workInProgress);\n }\n };\n updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {\n // If there are no effects associated with this node, then none of our children had any updates.\n // This guarantees that we can reuse all of them.\n var childrenUnchanged = workInProgress.firstEffect === null;\n var currentInstance = current.stateNode;\n if (childrenUnchanged && updatePayload === null) {\n // No changes, just reuse the existing instance.\n // Note that this might release a previous clone.\n workInProgress.stateNode = currentInstance;\n } else {\n var recyclableInstance = workInProgress.stateNode;\n var newInstance = cloneInstance(currentInstance, updatePayload, type, oldProps, newProps, workInProgress, childrenUnchanged, recyclableInstance);\n if (finalizeInitialChildren(newInstance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n workInProgress.stateNode = newInstance;\n if (childrenUnchanged) {\n // If there are no other effects in this tree, we need to flag this node as having one.\n // Even though we're not going to use it for anything.\n // Otherwise parents won't know that there are new children to propagate upwards.\n markUpdate(workInProgress);\n } else {\n // If children might have changed, we have to add them all to the set.\n appendAllChildren(newInstance, workInProgress);\n }\n }\n };\n updateHostText = function (current, workInProgress, oldText, newText) {\n if (oldText !== newText) {\n // If the text content differs, we'll create a new text instance for it.\n var rootContainerInstance = getRootHostContainer();\n var currentHostContext = getHostContext();\n workInProgress.stateNode = createTextInstance(newText, rootContainerInstance, currentHostContext, workInProgress);\n // We'll have to mark it as having an effect, even though we won't use the effect for anything.\n // This lets the parents know that at least one of their children has changed.\n markUpdate(workInProgress);\n }\n };\n } else {\n invariant(false, 'Persistent reconciler is disabled.');\n }\n } else {\n if (enableNoopReconciler) {\n // No host operations\n updateHostContainer = function (workInProgress) {\n // Noop\n };\n updateHostComponent = function (current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance) {\n // Noop\n };\n updateHostText = function (current, workInProgress, oldText, newText) {\n // Noop\n };\n } else {\n invariant(false, 'Noop reconciler is disabled.');\n }\n }\n\n function completeWork(current, workInProgress, renderExpirationTime) {\n // Get the latest props.\n var newProps = workInProgress.pendingProps;\n if (newProps === null) {\n newProps = workInProgress.memoizedProps;\n } else if (workInProgress.expirationTime !== Never || renderExpirationTime === Never) {\n // Reset the pending props, unless this was a down-prioritization.\n workInProgress.pendingProps = null;\n }\n\n switch (workInProgress.tag) {\n case FunctionalComponent:\n return null;\n case ClassComponent:\n {\n // We are leaving this subtree, so pop context if any.\n popContextProvider(workInProgress);\n return null;\n }\n case HostRoot:\n {\n popHostContainer(workInProgress);\n popTopLevelContextObject(workInProgress);\n var fiberRoot = workInProgress.stateNode;\n if (fiberRoot.pendingContext) {\n fiberRoot.context = fiberRoot.pendingContext;\n fiberRoot.pendingContext = null;\n }\n\n if (current === null || current.child === null) {\n // If we hydrated, pop so that we can delete any remaining children\n // that weren't hydrated.\n popHydrationState(workInProgress);\n // This resets the hacky state to fix isMounted before committing.\n // TODO: Delete this when we delete isMounted and findDOMNode.\n workInProgress.effectTag &= ~Placement;\n }\n updateHostContainer(workInProgress);\n return null;\n }\n case HostComponent:\n {\n popHostContext(workInProgress);\n var rootContainerInstance = getRootHostContainer();\n var type = workInProgress.type;\n if (current !== null && workInProgress.stateNode != null) {\n // If we have an alternate, that means this is an update and we need to\n // schedule a side-effect to do the updates.\n var oldProps = current.memoizedProps;\n // If we get updated because one of our children updated, we don't\n // have newProps so we'll have to reuse them.\n // TODO: Split the update API as separate for the props vs. children.\n // Even better would be if children weren't special cased at all tho.\n var instance = workInProgress.stateNode;\n var currentHostContext = getHostContext();\n var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);\n\n updateHostComponent(current, workInProgress, updatePayload, type, oldProps, newProps, rootContainerInstance);\n\n if (current.ref !== workInProgress.ref) {\n markRef(workInProgress);\n }\n } else {\n if (!newProps) {\n !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n // This can happen when we abort work.\n return null;\n }\n\n var _currentHostContext = getHostContext();\n // TODO: Move createInstance to beginWork and keep it on a context\n // \"stack\" as the parent. Then append children as we go in beginWork\n // or completeWork depending on we want to add then top->down or\n // bottom->up. Top->down is faster in IE11.\n var wasHydrated = popHydrationState(workInProgress);\n if (wasHydrated) {\n // TODO: Move this and createInstance step into the beginPhase\n // to consolidate.\n if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext)) {\n // If changes to the hydrated node needs to be applied at the\n // commit-phase we mark this as such.\n markUpdate(workInProgress);\n }\n } else {\n var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);\n\n appendAllChildren(_instance, workInProgress);\n\n // Certain renderers require commit-time effects for initial mount.\n // (eg DOM renderer supports auto-focus for certain elements).\n // Make sure such renderers get scheduled for later work.\n if (finalizeInitialChildren(_instance, type, newProps, rootContainerInstance)) {\n markUpdate(workInProgress);\n }\n workInProgress.stateNode = _instance;\n }\n\n if (workInProgress.ref !== null) {\n // If there is a ref on a host node we need to schedule a callback\n markRef(workInProgress);\n }\n }\n return null;\n }\n case HostText:\n {\n var newText = newProps;\n if (current && workInProgress.stateNode != null) {\n var oldText = current.memoizedProps;\n // If we have an alternate, that means this is an update and we need\n // to schedule a side-effect to do the updates.\n updateHostText(current, workInProgress, oldText, newText);\n } else {\n if (typeof newText !== 'string') {\n !(workInProgress.stateNode !== null) ? invariant(false, 'We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n // This can happen when we abort work.\n return null;\n }\n var _rootContainerInstance = getRootHostContainer();\n var _currentHostContext2 = getHostContext();\n var _wasHydrated = popHydrationState(workInProgress);\n if (_wasHydrated) {\n if (prepareToHydrateHostTextInstance(workInProgress)) {\n markUpdate(workInProgress);\n }\n } else {\n workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext2, workInProgress);\n }\n }\n return null;\n }\n case CallComponent:\n return moveCallToHandlerPhase(current, workInProgress, renderExpirationTime);\n case CallHandlerPhase:\n // Reset the tag to now be a first phase call.\n workInProgress.tag = CallComponent;\n return null;\n case ReturnComponent:\n // Does nothing.\n return null;\n case Fragment:\n return null;\n case HostPortal:\n popHostContainer(workInProgress);\n updateHostContainer(workInProgress);\n return null;\n // Error cases\n case IndeterminateComponent:\n invariant(false, 'An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.');\n // eslint-disable-next-line no-fallthrough\n default:\n invariant(false, 'Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n return {\n completeWork: completeWork\n };\n};\n\nvar invokeGuardedCallback$2 = ReactErrorUtils.invokeGuardedCallback;\nvar hasCaughtError$1 = ReactErrorUtils.hasCaughtError;\nvar clearCaughtError$1 = ReactErrorUtils.clearCaughtError;\n\n\nvar ReactFiberCommitWork = function (config, captureError) {\n var getPublicInstance = config.getPublicInstance,\n mutation = config.mutation,\n persistence = config.persistence;\n\n\n var callComponentWillUnmountWithTimer = function (current, instance) {\n startPhaseTimer(current, 'componentWillUnmount');\n instance.props = current.memoizedProps;\n instance.state = current.memoizedState;\n instance.componentWillUnmount();\n stopPhaseTimer();\n };\n\n // Capture errors so they don't interrupt unmounting.\n function safelyCallComponentWillUnmount(current, instance) {\n {\n invokeGuardedCallback$2(null, callComponentWillUnmountWithTimer, null, current, instance);\n if (hasCaughtError$1()) {\n var unmountError = clearCaughtError$1();\n captureError(current, unmountError);\n }\n }\n }\n\n function safelyDetachRef(current) {\n var ref = current.ref;\n if (ref !== null) {\n {\n invokeGuardedCallback$2(null, ref, null, null);\n if (hasCaughtError$1()) {\n var refError = clearCaughtError$1();\n captureError(current, refError);\n }\n }\n }\n }\n\n function commitLifeCycles(current, finishedWork) {\n switch (finishedWork.tag) {\n case ClassComponent:\n {\n var instance = finishedWork.stateNode;\n if (finishedWork.effectTag & Update) {\n if (current === null) {\n startPhaseTimer(finishedWork, 'componentDidMount');\n instance.props = finishedWork.memoizedProps;\n instance.state = finishedWork.memoizedState;\n instance.componentDidMount();\n stopPhaseTimer();\n } else {\n var prevProps = current.memoizedProps;\n var prevState = current.memoizedState;\n startPhaseTimer(finishedWork, 'componentDidUpdate');\n instance.props = finishedWork.memoizedProps;\n instance.state = finishedWork.memoizedState;\n instance.componentDidUpdate(prevProps, prevState);\n stopPhaseTimer();\n }\n }\n var updateQueue = finishedWork.updateQueue;\n if (updateQueue !== null) {\n commitCallbacks(updateQueue, instance);\n }\n return;\n }\n case HostRoot:\n {\n var _updateQueue = finishedWork.updateQueue;\n if (_updateQueue !== null) {\n var _instance = finishedWork.child !== null ? finishedWork.child.stateNode : null;\n commitCallbacks(_updateQueue, _instance);\n }\n return;\n }\n case HostComponent:\n {\n var _instance2 = finishedWork.stateNode;\n\n // Renderers may schedule work to be done after host components are mounted\n // (eg DOM renderer may schedule auto-focus for inputs and form controls).\n // These effects should only be committed when components are first mounted,\n // aka when there is no current/alternate.\n if (current === null && finishedWork.effectTag & Update) {\n var type = finishedWork.type;\n var props = finishedWork.memoizedProps;\n commitMount(_instance2, type, props, finishedWork);\n }\n\n return;\n }\n case HostText:\n {\n // We have no life-cycles associated with text.\n return;\n }\n case HostPortal:\n {\n // We have no life-cycles associated with portals.\n return;\n }\n default:\n {\n invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n }\n\n function commitAttachRef(finishedWork) {\n var ref = finishedWork.ref;\n if (ref !== null) {\n var instance = finishedWork.stateNode;\n switch (finishedWork.tag) {\n case HostComponent:\n ref(getPublicInstance(instance));\n break;\n default:\n ref(instance);\n }\n }\n }\n\n function commitDetachRef(current) {\n var currentRef = current.ref;\n if (currentRef !== null) {\n currentRef(null);\n }\n }\n\n // User-originating errors (lifecycles and refs) should not interrupt\n // deletion, so don't let them throw. Host-originating errors should\n // interrupt deletion, so it's okay\n function commitUnmount(current) {\n if (typeof onCommitUnmount === 'function') {\n onCommitUnmount(current);\n }\n\n switch (current.tag) {\n case ClassComponent:\n {\n safelyDetachRef(current);\n var instance = current.stateNode;\n if (typeof instance.componentWillUnmount === 'function') {\n safelyCallComponentWillUnmount(current, instance);\n }\n return;\n }\n case HostComponent:\n {\n safelyDetachRef(current);\n return;\n }\n case CallComponent:\n {\n commitNestedUnmounts(current.stateNode);\n return;\n }\n case HostPortal:\n {\n // TODO: this is recursive.\n // We are also not using this parent because\n // the portal will get pushed immediately.\n if (enableMutatingReconciler && mutation) {\n unmountHostComponents(current);\n } else if (enablePersistentReconciler && persistence) {\n emptyPortalContainer(current);\n }\n return;\n }\n }\n }\n\n function commitNestedUnmounts(root) {\n // While we're inside a removed host node we don't want to call\n // removeChild on the inner nodes because they're removed by the top\n // call anyway. We also want to call componentWillUnmount on all\n // composites before this host node is removed from the tree. Therefore\n var node = root;\n while (true) {\n commitUnmount(node);\n // Visit children because they may contain more composite or host nodes.\n // Skip portals because commitUnmount() currently visits them recursively.\n if (node.child !== null && (\n // If we use mutation we drill down into portals using commitUnmount above.\n // If we don't use mutation we drill down into portals here instead.\n !mutation || node.tag !== HostPortal)) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === root) {\n return;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === root) {\n return;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n }\n\n function detachFiber(current) {\n // Cut off the return pointers to disconnect it from the tree. Ideally, we\n // should clear the child pointer of the parent alternate to let this\n // get GC:ed but we don't know which for sure which parent is the current\n // one so we'll settle for GC:ing the subtree of this child. This child\n // itself will be GC:ed when the parent updates the next time.\n current['return'] = null;\n current.child = null;\n if (current.alternate) {\n current.alternate.child = null;\n current.alternate['return'] = null;\n }\n }\n\n if (!mutation) {\n var commitContainer = void 0;\n if (persistence) {\n var replaceContainerChildren = persistence.replaceContainerChildren,\n createContainerChildSet = persistence.createContainerChildSet;\n\n var emptyPortalContainer = function (current) {\n var portal = current.stateNode;\n var containerInfo = portal.containerInfo;\n\n var emptyChildSet = createContainerChildSet(containerInfo);\n replaceContainerChildren(containerInfo, emptyChildSet);\n };\n commitContainer = function (finishedWork) {\n switch (finishedWork.tag) {\n case ClassComponent:\n {\n return;\n }\n case HostComponent:\n {\n return;\n }\n case HostText:\n {\n return;\n }\n case HostRoot:\n case HostPortal:\n {\n var portalOrRoot = finishedWork.stateNode;\n var containerInfo = portalOrRoot.containerInfo,\n _pendingChildren = portalOrRoot.pendingChildren;\n\n replaceContainerChildren(containerInfo, _pendingChildren);\n return;\n }\n default:\n {\n invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n };\n } else {\n commitContainer = function (finishedWork) {\n // Noop\n };\n }\n if (enablePersistentReconciler || enableNoopReconciler) {\n return {\n commitResetTextContent: function (finishedWork) {},\n commitPlacement: function (finishedWork) {},\n commitDeletion: function (current) {\n // Detach refs and call componentWillUnmount() on the whole subtree.\n commitNestedUnmounts(current);\n detachFiber(current);\n },\n commitWork: function (current, finishedWork) {\n commitContainer(finishedWork);\n },\n\n commitLifeCycles: commitLifeCycles,\n commitAttachRef: commitAttachRef,\n commitDetachRef: commitDetachRef\n };\n } else if (persistence) {\n invariant(false, 'Persistent reconciler is disabled.');\n } else {\n invariant(false, 'Noop reconciler is disabled.');\n }\n }\n var commitMount = mutation.commitMount,\n commitUpdate = mutation.commitUpdate,\n resetTextContent = mutation.resetTextContent,\n commitTextUpdate = mutation.commitTextUpdate,\n appendChild = mutation.appendChild,\n appendChildToContainer = mutation.appendChildToContainer,\n insertBefore = mutation.insertBefore,\n insertInContainerBefore = mutation.insertInContainerBefore,\n removeChild = mutation.removeChild,\n removeChildFromContainer = mutation.removeChildFromContainer;\n\n\n function getHostParentFiber(fiber) {\n var parent = fiber['return'];\n while (parent !== null) {\n if (isHostParent(parent)) {\n return parent;\n }\n parent = parent['return'];\n }\n invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.');\n }\n\n function isHostParent(fiber) {\n return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;\n }\n\n function getHostSibling(fiber) {\n // We're going to search forward into the tree until we find a sibling host\n // node. Unfortunately, if multiple insertions are done in a row we have to\n // search past them. This leads to exponential search for the next sibling.\n var node = fiber;\n siblings: while (true) {\n // If we didn't find anything, let's try the next sibling.\n while (node.sibling === null) {\n if (node['return'] === null || isHostParent(node['return'])) {\n // If we pop out of the root or hit the parent the fiber we are the\n // last sibling.\n return null;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n while (node.tag !== HostComponent && node.tag !== HostText) {\n // If it is not host node and, we might have a host node inside it.\n // Try to search down until we find one.\n if (node.effectTag & Placement) {\n // If we don't have a child, try the siblings instead.\n continue siblings;\n }\n // If we don't have a child, try the siblings instead.\n // We also skip portals because they are not part of this host tree.\n if (node.child === null || node.tag === HostPortal) {\n continue siblings;\n } else {\n node.child['return'] = node;\n node = node.child;\n }\n }\n // Check if this host node is stable or about to be placed.\n if (!(node.effectTag & Placement)) {\n // Found it!\n return node.stateNode;\n }\n }\n }\n\n function commitPlacement(finishedWork) {\n // Recursively insert all host nodes into the parent.\n var parentFiber = getHostParentFiber(finishedWork);\n var parent = void 0;\n var isContainer = void 0;\n switch (parentFiber.tag) {\n case HostComponent:\n parent = parentFiber.stateNode;\n isContainer = false;\n break;\n case HostRoot:\n parent = parentFiber.stateNode.containerInfo;\n isContainer = true;\n break;\n case HostPortal:\n parent = parentFiber.stateNode.containerInfo;\n isContainer = true;\n break;\n default:\n invariant(false, 'Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.');\n }\n if (parentFiber.effectTag & ContentReset) {\n // Reset the text content of the parent before doing any insertions\n resetTextContent(parent);\n // Clear ContentReset from the effect tag\n parentFiber.effectTag &= ~ContentReset;\n }\n\n var before = getHostSibling(finishedWork);\n // We only have the top Fiber that was inserted but we need recurse down its\n // children to find all the terminal nodes.\n var node = finishedWork;\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n if (before) {\n if (isContainer) {\n insertInContainerBefore(parent, node.stateNode, before);\n } else {\n insertBefore(parent, node.stateNode, before);\n }\n } else {\n if (isContainer) {\n appendChildToContainer(parent, node.stateNode);\n } else {\n appendChild(parent, node.stateNode);\n }\n }\n } else if (node.tag === HostPortal) {\n // If the insertion itself is a portal, then we don't want to traverse\n // down its children. Instead, we'll get insertions from each child in\n // the portal directly.\n } else if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n if (node === finishedWork) {\n return;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === finishedWork) {\n return;\n }\n node = node['return'];\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n }\n\n function unmountHostComponents(current) {\n // We only have the top Fiber that was inserted but we need recurse down its\n var node = current;\n\n // Each iteration, currentParent is populated with node's host parent if not\n // currentParentIsValid.\n var currentParentIsValid = false;\n var currentParent = void 0;\n var currentParentIsContainer = void 0;\n\n while (true) {\n if (!currentParentIsValid) {\n var parent = node['return'];\n findParent: while (true) {\n !(parent !== null) ? invariant(false, 'Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n switch (parent.tag) {\n case HostComponent:\n currentParent = parent.stateNode;\n currentParentIsContainer = false;\n break findParent;\n case HostRoot:\n currentParent = parent.stateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n case HostPortal:\n currentParent = parent.stateNode.containerInfo;\n currentParentIsContainer = true;\n break findParent;\n }\n parent = parent['return'];\n }\n currentParentIsValid = true;\n }\n\n if (node.tag === HostComponent || node.tag === HostText) {\n commitNestedUnmounts(node);\n // After all the children have unmounted, it is now safe to remove the\n // node from the tree.\n if (currentParentIsContainer) {\n removeChildFromContainer(currentParent, node.stateNode);\n } else {\n removeChild(currentParent, node.stateNode);\n }\n // Don't visit children because we already visited them.\n } else if (node.tag === HostPortal) {\n // When we go into a portal, it becomes the parent to remove from.\n // We will reassign it back when we pop the portal on the way up.\n currentParent = node.stateNode.containerInfo;\n // Visit children because portals might contain host components.\n if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n } else {\n commitUnmount(node);\n // Visit children because we may find more host components below.\n if (node.child !== null) {\n node.child['return'] = node;\n node = node.child;\n continue;\n }\n }\n if (node === current) {\n return;\n }\n while (node.sibling === null) {\n if (node['return'] === null || node['return'] === current) {\n return;\n }\n node = node['return'];\n if (node.tag === HostPortal) {\n // When we go out of the portal, we need to restore the parent.\n // Since we don't keep a stack of them, we will search for it.\n currentParentIsValid = false;\n }\n }\n node.sibling['return'] = node['return'];\n node = node.sibling;\n }\n }\n\n function commitDeletion(current) {\n // Recursively delete all host nodes from the parent.\n // Detach refs and call componentWillUnmount() on the whole subtree.\n unmountHostComponents(current);\n detachFiber(current);\n }\n\n function commitWork(current, finishedWork) {\n switch (finishedWork.tag) {\n case ClassComponent:\n {\n return;\n }\n case HostComponent:\n {\n var instance = finishedWork.stateNode;\n if (instance != null) {\n // Commit the work prepared earlier.\n var newProps = finishedWork.memoizedProps;\n // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n var oldProps = current !== null ? current.memoizedProps : newProps;\n var type = finishedWork.type;\n // TODO: Type the updateQueue to be specific to host components.\n var updatePayload = finishedWork.updateQueue;\n finishedWork.updateQueue = null;\n if (updatePayload !== null) {\n commitUpdate(instance, updatePayload, type, oldProps, newProps, finishedWork);\n }\n }\n return;\n }\n case HostText:\n {\n !(finishedWork.stateNode !== null) ? invariant(false, 'This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n var textInstance = finishedWork.stateNode;\n var newText = finishedWork.memoizedProps;\n // For hydration we reuse the update path but we treat the oldProps\n // as the newProps. The updatePayload will contain the real change in\n // this case.\n var oldText = current !== null ? current.memoizedProps : newText;\n commitTextUpdate(textInstance, oldText, newText);\n return;\n }\n case HostRoot:\n {\n return;\n }\n default:\n {\n invariant(false, 'This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n }\n\n function commitResetTextContent(current) {\n resetTextContent(current.stateNode);\n }\n\n if (enableMutatingReconciler) {\n return {\n commitResetTextContent: commitResetTextContent,\n commitPlacement: commitPlacement,\n commitDeletion: commitDeletion,\n commitWork: commitWork,\n commitLifeCycles: commitLifeCycles,\n commitAttachRef: commitAttachRef,\n commitDetachRef: commitDetachRef\n };\n } else {\n invariant(false, 'Mutating reconciler is disabled.');\n }\n};\n\nvar NO_CONTEXT = {};\n\nvar ReactFiberHostContext = function (config) {\n var getChildHostContext = config.getChildHostContext,\n getRootHostContext = config.getRootHostContext;\n\n\n var contextStackCursor = createCursor(NO_CONTEXT);\n var contextFiberStackCursor = createCursor(NO_CONTEXT);\n var rootInstanceStackCursor = createCursor(NO_CONTEXT);\n\n function requiredContext(c) {\n !(c !== NO_CONTEXT) ? invariant(false, 'Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n return c;\n }\n\n function getRootHostContainer() {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n return rootInstance;\n }\n\n function pushHostContainer(fiber, nextRootInstance) {\n // Push current root instance onto the stack;\n // This allows us to reset root when portals are popped.\n push(rootInstanceStackCursor, nextRootInstance, fiber);\n\n var nextRootContext = getRootHostContext(nextRootInstance);\n\n // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor, nextRootContext, fiber);\n }\n\n function popHostContainer(fiber) {\n pop(contextStackCursor, fiber);\n pop(contextFiberStackCursor, fiber);\n pop(rootInstanceStackCursor, fiber);\n }\n\n function getHostContext() {\n var context = requiredContext(contextStackCursor.current);\n return context;\n }\n\n function pushHostContext(fiber) {\n var rootInstance = requiredContext(rootInstanceStackCursor.current);\n var context = requiredContext(contextStackCursor.current);\n var nextContext = getChildHostContext(context, fiber.type, rootInstance);\n\n // Don't push this Fiber's context unless it's unique.\n if (context === nextContext) {\n return;\n }\n\n // Track the context and the Fiber that provided it.\n // This enables us to pop only Fibers that provide unique contexts.\n push(contextFiberStackCursor, fiber, fiber);\n push(contextStackCursor, nextContext, fiber);\n }\n\n function popHostContext(fiber) {\n // Do not pop unless this Fiber provided the current context.\n // pushHostContext() only pushes Fibers that provide unique contexts.\n if (contextFiberStackCursor.current !== fiber) {\n return;\n }\n\n pop(contextStackCursor, fiber);\n pop(contextFiberStackCursor, fiber);\n }\n\n function resetHostContainer() {\n contextStackCursor.current = NO_CONTEXT;\n rootInstanceStackCursor.current = NO_CONTEXT;\n }\n\n return {\n getHostContext: getHostContext,\n getRootHostContainer: getRootHostContainer,\n popHostContainer: popHostContainer,\n popHostContext: popHostContext,\n pushHostContainer: pushHostContainer,\n pushHostContext: pushHostContext,\n resetHostContainer: resetHostContainer\n };\n};\n\nvar ReactFiberHydrationContext = function (config) {\n var shouldSetTextContent = config.shouldSetTextContent,\n hydration = config.hydration;\n\n // If this doesn't have hydration mode.\n\n if (!hydration) {\n return {\n enterHydrationState: function () {\n return false;\n },\n resetHydrationState: function () {},\n tryToClaimNextHydratableInstance: function () {},\n prepareToHydrateHostInstance: function () {\n invariant(false, 'Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');\n },\n prepareToHydrateHostTextInstance: function () {\n invariant(false, 'Expected prepareToHydrateHostTextInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.');\n },\n popHydrationState: function (fiber) {\n return false;\n }\n };\n }\n\n var canHydrateInstance = hydration.canHydrateInstance,\n canHydrateTextInstance = hydration.canHydrateTextInstance,\n getNextHydratableSibling = hydration.getNextHydratableSibling,\n getFirstHydratableChild = hydration.getFirstHydratableChild,\n hydrateInstance = hydration.hydrateInstance,\n hydrateTextInstance = hydration.hydrateTextInstance,\n didNotMatchHydratedContainerTextInstance = hydration.didNotMatchHydratedContainerTextInstance,\n didNotMatchHydratedTextInstance = hydration.didNotMatchHydratedTextInstance,\n didNotHydrateContainerInstance = hydration.didNotHydrateContainerInstance,\n didNotHydrateInstance = hydration.didNotHydrateInstance,\n didNotFindHydratableContainerInstance = hydration.didNotFindHydratableContainerInstance,\n didNotFindHydratableContainerTextInstance = hydration.didNotFindHydratableContainerTextInstance,\n didNotFindHydratableInstance = hydration.didNotFindHydratableInstance,\n didNotFindHydratableTextInstance = hydration.didNotFindHydratableTextInstance;\n\n // The deepest Fiber on the stack involved in a hydration context.\n // This may have been an insertion or a hydration.\n\n var hydrationParentFiber = null;\n var nextHydratableInstance = null;\n var isHydrating = false;\n\n function enterHydrationState(fiber) {\n var parentInstance = fiber.stateNode.containerInfo;\n nextHydratableInstance = getFirstHydratableChild(parentInstance);\n hydrationParentFiber = fiber;\n isHydrating = true;\n return true;\n }\n\n function deleteHydratableInstance(returnFiber, instance) {\n {\n switch (returnFiber.tag) {\n case HostRoot:\n didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);\n break;\n case HostComponent:\n didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);\n break;\n }\n }\n\n var childToDelete = createFiberFromHostInstanceForDeletion();\n childToDelete.stateNode = instance;\n childToDelete['return'] = returnFiber;\n childToDelete.effectTag = Deletion;\n\n // This might seem like it belongs on progressedFirstDeletion. However,\n // these children are not part of the reconciliation list of children.\n // Even if we abort and rereconcile the children, that will try to hydrate\n // again and the nodes are still in the host tree so these will be\n // recreated.\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = childToDelete;\n returnFiber.lastEffect = childToDelete;\n } else {\n returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;\n }\n }\n\n function insertNonHydratedInstance(returnFiber, fiber) {\n fiber.effectTag |= Placement;\n {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n switch (fiber.tag) {\n case HostComponent:\n var type = fiber.type;\n var props = fiber.pendingProps;\n didNotFindHydratableContainerInstance(parentContainer, type, props);\n break;\n case HostText:\n var text = fiber.pendingProps;\n didNotFindHydratableContainerTextInstance(parentContainer, text);\n break;\n }\n break;\n }\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n switch (fiber.tag) {\n case HostComponent:\n var _type = fiber.type;\n var _props = fiber.pendingProps;\n didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type, _props);\n break;\n case HostText:\n var _text = fiber.pendingProps;\n didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);\n break;\n }\n break;\n }\n default:\n return;\n }\n }\n }\n\n function tryHydrate(fiber, nextInstance) {\n switch (fiber.tag) {\n case HostComponent:\n {\n var type = fiber.type;\n var props = fiber.pendingProps;\n var instance = canHydrateInstance(nextInstance, type, props);\n if (instance !== null) {\n fiber.stateNode = instance;\n return true;\n }\n return false;\n }\n case HostText:\n {\n var text = fiber.pendingProps;\n var textInstance = canHydrateTextInstance(nextInstance, text);\n if (textInstance !== null) {\n fiber.stateNode = textInstance;\n return true;\n }\n return false;\n }\n default:\n return false;\n }\n }\n\n function tryToClaimNextHydratableInstance(fiber) {\n if (!isHydrating) {\n return;\n }\n var nextInstance = nextHydratableInstance;\n if (!nextInstance) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n if (!tryHydrate(fiber, nextInstance)) {\n // If we can't hydrate this instance let's try the next one.\n // We use this as a heuristic. It's based on intuition and not data so it\n // might be flawed or unnecessary.\n nextInstance = getNextHydratableSibling(nextInstance);\n if (!nextInstance || !tryHydrate(fiber, nextInstance)) {\n // Nothing to hydrate. Make it an insertion.\n insertNonHydratedInstance(hydrationParentFiber, fiber);\n isHydrating = false;\n hydrationParentFiber = fiber;\n return;\n }\n // We matched the next one, we'll now assume that the first one was\n // superfluous and we'll delete it. Since we can't eagerly delete it\n // we'll have to schedule a deletion. To do that, this node needs a dummy\n // fiber associated with it.\n deleteHydratableInstance(hydrationParentFiber, nextHydratableInstance);\n }\n hydrationParentFiber = fiber;\n nextHydratableInstance = getFirstHydratableChild(nextInstance);\n }\n\n function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {\n var instance = fiber.stateNode;\n var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);\n // TODO: Type this specific to this type of component.\n fiber.updateQueue = updatePayload;\n // If the update payload indicates that there is a change or if there\n // is a new ref we mark this as an update.\n if (updatePayload !== null) {\n return true;\n }\n return false;\n }\n\n function prepareToHydrateHostTextInstance(fiber) {\n var textInstance = fiber.stateNode;\n var textContent = fiber.memoizedProps;\n var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);\n {\n if (shouldUpdate) {\n // We assume that prepareToHydrateHostTextInstance is called in a context where the\n // hydration parent is the parent host component of this host text.\n var returnFiber = hydrationParentFiber;\n if (returnFiber !== null) {\n switch (returnFiber.tag) {\n case HostRoot:\n {\n var parentContainer = returnFiber.stateNode.containerInfo;\n didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);\n break;\n }\n case HostComponent:\n {\n var parentType = returnFiber.type;\n var parentProps = returnFiber.memoizedProps;\n var parentInstance = returnFiber.stateNode;\n didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);\n break;\n }\n }\n }\n }\n }\n return shouldUpdate;\n }\n\n function popToNextHostParent(fiber) {\n var parent = fiber['return'];\n while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot) {\n parent = parent['return'];\n }\n hydrationParentFiber = parent;\n }\n\n function popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) {\n // We're deeper than the current hydration context, inside an inserted\n // tree.\n return false;\n }\n if (!isHydrating) {\n // If we're not currently hydrating but we're in a hydration context, then\n // we were an insertion and now need to pop up reenter hydration of our\n // siblings.\n popToNextHostParent(fiber);\n isHydrating = true;\n return false;\n }\n\n var type = fiber.type;\n\n // If we have any remaining hydratable nodes, we need to delete them now.\n // We only do this deeper than head and body since they tend to have random\n // other nodes in them. We also ignore components with pure text content in\n // side of them.\n // TODO: Better heuristic.\n if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {\n var nextInstance = nextHydratableInstance;\n while (nextInstance) {\n deleteHydratableInstance(fiber, nextInstance);\n nextInstance = getNextHydratableSibling(nextInstance);\n }\n }\n\n popToNextHostParent(fiber);\n nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;\n return true;\n }\n\n function resetHydrationState() {\n hydrationParentFiber = null;\n nextHydratableInstance = null;\n isHydrating = false;\n }\n\n return {\n enterHydrationState: enterHydrationState,\n resetHydrationState: resetHydrationState,\n tryToClaimNextHydratableInstance: tryToClaimNextHydratableInstance,\n prepareToHydrateHostInstance: prepareToHydrateHostInstance,\n prepareToHydrateHostTextInstance: prepareToHydrateHostTextInstance,\n popHydrationState: popHydrationState\n };\n};\n\n// This lets us hook into Fiber to debug what it's doing.\n// See https://github.com/facebook/react/pull/8033.\n// This is not part of the public API, not even for React DevTools.\n// You may only inject a debugTool if you work on React Fiber itself.\nvar ReactFiberInstrumentation = {\n debugTool: null\n};\n\nvar ReactFiberInstrumentation_1 = ReactFiberInstrumentation;\n\nvar defaultShowDialog = function (capturedError) {\n return true;\n};\n\nvar showDialog = defaultShowDialog;\n\nfunction logCapturedError(capturedError) {\n var logError = showDialog(capturedError);\n\n // Allow injected showDialog() to prevent default console.error logging.\n // This enables renderers like ReactNative to better manage redbox behavior.\n if (logError === false) {\n return;\n }\n\n var error = capturedError.error;\n var suppressLogging = error && error.suppressReactErrorLogging;\n if (suppressLogging) {\n return;\n }\n\n {\n var componentName = capturedError.componentName,\n componentStack = capturedError.componentStack,\n errorBoundaryName = capturedError.errorBoundaryName,\n errorBoundaryFound = capturedError.errorBoundaryFound,\n willRetry = capturedError.willRetry;\n\n\n var componentNameMessage = componentName ? 'The above error occurred in the <' + componentName + '> component:' : 'The above error occurred in one of your React components:';\n\n var errorBoundaryMessage = void 0;\n // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.\n if (errorBoundaryFound && errorBoundaryName) {\n if (willRetry) {\n errorBoundaryMessage = 'React will try to recreate this component tree from scratch ' + ('using the error boundary you provided, ' + errorBoundaryName + '.');\n } else {\n errorBoundaryMessage = 'This error was initially handled by the error boundary ' + errorBoundaryName + '.\\n' + 'Recreating the tree from scratch failed so React will unmount the tree.';\n }\n } else {\n errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';\n }\n var combinedMessage = '' + componentNameMessage + componentStack + '\\n\\n' + ('' + errorBoundaryMessage);\n\n // In development, we provide our own message with just the component stack.\n // We don't include the original error message and JS stack because the browser\n // has already printed it. Even if the application swallows the error, it is still\n // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.\n console.error(combinedMessage);\n }\n}\n\nvar invokeGuardedCallback$1 = ReactErrorUtils.invokeGuardedCallback;\nvar hasCaughtError = ReactErrorUtils.hasCaughtError;\nvar clearCaughtError = ReactErrorUtils.clearCaughtError;\n\n\n{\n var didWarnAboutStateTransition = false;\n var didWarnSetStateChildContext = false;\n var didWarnStateUpdateForUnmountedComponent = {};\n\n var warnAboutUpdateOnUnmounted = function (fiber) {\n var componentName = getComponentName(fiber) || 'ReactClass';\n if (didWarnStateUpdateForUnmountedComponent[componentName]) {\n return;\n }\n warning(false, 'Can only update a mounted or mounting ' + 'component. This usually means you called setState, replaceState, ' + 'or forceUpdate on an unmounted component. This is a no-op.\\n\\nPlease ' + 'check the code for the %s component.', componentName);\n didWarnStateUpdateForUnmountedComponent[componentName] = true;\n };\n\n var warnAboutInvalidUpdates = function (instance) {\n switch (ReactDebugCurrentFiber.phase) {\n case 'getChildContext':\n if (didWarnSetStateChildContext) {\n return;\n }\n warning(false, 'setState(...): Cannot call setState() inside getChildContext()');\n didWarnSetStateChildContext = true;\n break;\n case 'render':\n if (didWarnAboutStateTransition) {\n return;\n }\n warning(false, 'Cannot update during an existing state transition (such as within ' + \"`render` or another component's constructor). Render methods should \" + 'be a pure function of props and state; constructor side-effects are ' + 'an anti-pattern, but can be moved to `componentWillMount`.');\n didWarnAboutStateTransition = true;\n break;\n }\n };\n}\n\nvar ReactFiberScheduler = function (config) {\n var hostContext = ReactFiberHostContext(config);\n var hydrationContext = ReactFiberHydrationContext(config);\n var popHostContainer = hostContext.popHostContainer,\n popHostContext = hostContext.popHostContext,\n resetHostContainer = hostContext.resetHostContainer;\n\n var _ReactFiberBeginWork = ReactFiberBeginWork(config, hostContext, hydrationContext, scheduleWork, computeExpirationForFiber),\n beginWork = _ReactFiberBeginWork.beginWork,\n beginFailedWork = _ReactFiberBeginWork.beginFailedWork;\n\n var _ReactFiberCompleteWo = ReactFiberCompleteWork(config, hostContext, hydrationContext),\n completeWork = _ReactFiberCompleteWo.completeWork;\n\n var _ReactFiberCommitWork = ReactFiberCommitWork(config, captureError),\n commitResetTextContent = _ReactFiberCommitWork.commitResetTextContent,\n commitPlacement = _ReactFiberCommitWork.commitPlacement,\n commitDeletion = _ReactFiberCommitWork.commitDeletion,\n commitWork = _ReactFiberCommitWork.commitWork,\n commitLifeCycles = _ReactFiberCommitWork.commitLifeCycles,\n commitAttachRef = _ReactFiberCommitWork.commitAttachRef,\n commitDetachRef = _ReactFiberCommitWork.commitDetachRef;\n\n var now = config.now,\n scheduleDeferredCallback = config.scheduleDeferredCallback,\n cancelDeferredCallback = config.cancelDeferredCallback,\n useSyncScheduling = config.useSyncScheduling,\n prepareForCommit = config.prepareForCommit,\n resetAfterCommit = config.resetAfterCommit;\n\n // Represents the current time in ms.\n\n var startTime = now();\n var mostRecentCurrentTime = msToExpirationTime(0);\n\n // Represents the expiration time that incoming updates should use. (If this\n // is NoWork, use the default strategy: async updates in async mode, sync\n // updates in sync mode.)\n var expirationContext = NoWork;\n\n var isWorking = false;\n\n // The next work in progress fiber that we're currently working on.\n var nextUnitOfWork = null;\n var nextRoot = null;\n // The time at which we're currently rendering work.\n var nextRenderExpirationTime = NoWork;\n\n // The next fiber with an effect that we're currently committing.\n var nextEffect = null;\n\n // Keep track of which fibers have captured an error that need to be handled.\n // Work is removed from this collection after componentDidCatch is called.\n var capturedErrors = null;\n // Keep track of which fibers have failed during the current batch of work.\n // This is a different set than capturedErrors, because it is not reset until\n // the end of the batch. This is needed to propagate errors correctly if a\n // subtree fails more than once.\n var failedBoundaries = null;\n // Error boundaries that captured an error during the current commit.\n var commitPhaseBoundaries = null;\n var firstUncaughtError = null;\n var didFatal = false;\n\n var isCommitting = false;\n var isUnmounting = false;\n\n // Used for performance tracking.\n var interruptedBy = null;\n\n function resetContextStack() {\n // Reset the stack\n reset$1();\n // Reset the cursors\n resetContext();\n resetHostContainer();\n }\n\n function commitAllHostEffects() {\n while (nextEffect !== null) {\n {\n ReactDebugCurrentFiber.setCurrentFiber(nextEffect);\n }\n recordEffect();\n\n var effectTag = nextEffect.effectTag;\n if (effectTag & ContentReset) {\n commitResetTextContent(nextEffect);\n }\n\n if (effectTag & Ref) {\n var current = nextEffect.alternate;\n if (current !== null) {\n commitDetachRef(current);\n }\n }\n\n // The following switch statement is only concerned about placement,\n // updates, and deletions. To avoid needing to add a case for every\n // possible bitmap value, we remove the secondary effects from the\n // effect tag and switch on that value.\n var primaryEffectTag = effectTag & ~(Callback | Err | ContentReset | Ref | PerformedWork);\n switch (primaryEffectTag) {\n case Placement:\n {\n commitPlacement(nextEffect);\n // Clear the \"placement\" from effect tag so that we know that this is inserted, before\n // any life-cycles like componentDidMount gets called.\n // TODO: findDOMNode doesn't rely on this any more but isMounted\n // does and isMounted is deprecated anyway so we should be able\n // to kill this.\n nextEffect.effectTag &= ~Placement;\n break;\n }\n case PlacementAndUpdate:\n {\n // Placement\n commitPlacement(nextEffect);\n // Clear the \"placement\" from effect tag so that we know that this is inserted, before\n // any life-cycles like componentDidMount gets called.\n nextEffect.effectTag &= ~Placement;\n\n // Update\n var _current = nextEffect.alternate;\n commitWork(_current, nextEffect);\n break;\n }\n case Update:\n {\n var _current2 = nextEffect.alternate;\n commitWork(_current2, nextEffect);\n break;\n }\n case Deletion:\n {\n isUnmounting = true;\n commitDeletion(nextEffect);\n isUnmounting = false;\n break;\n }\n }\n nextEffect = nextEffect.nextEffect;\n }\n\n {\n ReactDebugCurrentFiber.resetCurrentFiber();\n }\n }\n\n function commitAllLifeCycles() {\n while (nextEffect !== null) {\n var effectTag = nextEffect.effectTag;\n\n if (effectTag & (Update | Callback)) {\n recordEffect();\n var current = nextEffect.alternate;\n commitLifeCycles(current, nextEffect);\n }\n\n if (effectTag & Ref) {\n recordEffect();\n commitAttachRef(nextEffect);\n }\n\n if (effectTag & Err) {\n recordEffect();\n commitErrorHandling(nextEffect);\n }\n\n var next = nextEffect.nextEffect;\n // Ensure that we clean these up so that we don't accidentally keep them.\n // I'm not actually sure this matters because we can't reset firstEffect\n // and lastEffect since they're on every node, not just the effectful\n // ones. So we have to clean everything as we reuse nodes anyway.\n nextEffect.nextEffect = null;\n // Ensure that we reset the effectTag here so that we can rely on effect\n // tags to reason about the current life-cycle.\n nextEffect = next;\n }\n }\n\n function commitRoot(finishedWork) {\n // We keep track of this so that captureError can collect any boundaries\n // that capture an error during the commit phase. The reason these aren't\n // local to this function is because errors that occur during cWU are\n // captured elsewhere, to prevent the unmount from being interrupted.\n isWorking = true;\n isCommitting = true;\n startCommitTimer();\n\n var root = finishedWork.stateNode;\n !(root.current !== finishedWork) ? invariant(false, 'Cannot commit the same tree as before. This is probably a bug related to the return field. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n root.isReadyForCommit = false;\n\n // Reset this to null before calling lifecycles\n ReactCurrentOwner.current = null;\n\n var firstEffect = void 0;\n if (finishedWork.effectTag > PerformedWork) {\n // A fiber's effect list consists only of its children, not itself. So if\n // the root has an effect, we need to add it to the end of the list. The\n // resulting list is the set that would belong to the root's parent, if\n // it had one; that is, all the effects in the tree including the root.\n if (finishedWork.lastEffect !== null) {\n finishedWork.lastEffect.nextEffect = finishedWork;\n firstEffect = finishedWork.firstEffect;\n } else {\n firstEffect = finishedWork;\n }\n } else {\n // There is no effect on the root.\n firstEffect = finishedWork.firstEffect;\n }\n\n prepareForCommit();\n\n // Commit all the side-effects within a tree. We'll do this in two passes.\n // The first pass performs all the host insertions, updates, deletions and\n // ref unmounts.\n nextEffect = firstEffect;\n startCommitHostEffectsTimer();\n while (nextEffect !== null) {\n var didError = false;\n var _error = void 0;\n {\n invokeGuardedCallback$1(null, commitAllHostEffects, null);\n if (hasCaughtError()) {\n didError = true;\n _error = clearCaughtError();\n }\n }\n if (didError) {\n !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n captureError(nextEffect, _error);\n // Clean-up\n if (nextEffect !== null) {\n nextEffect = nextEffect.nextEffect;\n }\n }\n }\n stopCommitHostEffectsTimer();\n\n resetAfterCommit();\n\n // The work-in-progress tree is now the current tree. This must come after\n // the first pass of the commit phase, so that the previous tree is still\n // current during componentWillUnmount, but before the second pass, so that\n // the finished work is current during componentDidMount/Update.\n root.current = finishedWork;\n\n // In the second pass we'll perform all life-cycles and ref callbacks.\n // Life-cycles happen as a separate pass so that all placements, updates,\n // and deletions in the entire tree have already been invoked.\n // This pass also triggers any renderer-specific initial effects.\n nextEffect = firstEffect;\n startCommitLifeCyclesTimer();\n while (nextEffect !== null) {\n var _didError = false;\n var _error2 = void 0;\n {\n invokeGuardedCallback$1(null, commitAllLifeCycles, null);\n if (hasCaughtError()) {\n _didError = true;\n _error2 = clearCaughtError();\n }\n }\n if (_didError) {\n !(nextEffect !== null) ? invariant(false, 'Should have next effect. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n captureError(nextEffect, _error2);\n if (nextEffect !== null) {\n nextEffect = nextEffect.nextEffect;\n }\n }\n }\n\n isCommitting = false;\n isWorking = false;\n stopCommitLifeCyclesTimer();\n stopCommitTimer();\n if (typeof onCommitRoot === 'function') {\n onCommitRoot(finishedWork.stateNode);\n }\n if (true && ReactFiberInstrumentation_1.debugTool) {\n ReactFiberInstrumentation_1.debugTool.onCommitWork(finishedWork);\n }\n\n // If we caught any errors during this commit, schedule their boundaries\n // to update.\n if (commitPhaseBoundaries) {\n commitPhaseBoundaries.forEach(scheduleErrorRecovery);\n commitPhaseBoundaries = null;\n }\n\n if (firstUncaughtError !== null) {\n var _error3 = firstUncaughtError;\n firstUncaughtError = null;\n onUncaughtError(_error3);\n }\n\n var remainingTime = root.current.expirationTime;\n\n if (remainingTime === NoWork) {\n capturedErrors = null;\n failedBoundaries = null;\n }\n\n return remainingTime;\n }\n\n function resetExpirationTime(workInProgress, renderTime) {\n if (renderTime !== Never && workInProgress.expirationTime === Never) {\n // The children of this component are hidden. Don't bubble their\n // expiration times.\n return;\n }\n\n // Check for pending updates.\n var newExpirationTime = getUpdateExpirationTime(workInProgress);\n\n // TODO: Calls need to visit stateNode\n\n // Bubble up the earliest expiration time.\n var child = workInProgress.child;\n while (child !== null) {\n if (child.expirationTime !== NoWork && (newExpirationTime === NoWork || newExpirationTime > child.expirationTime)) {\n newExpirationTime = child.expirationTime;\n }\n child = child.sibling;\n }\n workInProgress.expirationTime = newExpirationTime;\n }\n\n function completeUnitOfWork(workInProgress) {\n while (true) {\n // The current, flushed, state of this fiber is the alternate.\n // Ideally nothing should rely on this, but relying on it here\n // means that we don't need an additional field on the work in\n // progress.\n var current = workInProgress.alternate;\n {\n ReactDebugCurrentFiber.setCurrentFiber(workInProgress);\n }\n var next = completeWork(current, workInProgress, nextRenderExpirationTime);\n {\n ReactDebugCurrentFiber.resetCurrentFiber();\n }\n\n var returnFiber = workInProgress['return'];\n var siblingFiber = workInProgress.sibling;\n\n resetExpirationTime(workInProgress, nextRenderExpirationTime);\n\n if (next !== null) {\n stopWorkTimer(workInProgress);\n if (true && ReactFiberInstrumentation_1.debugTool) {\n ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);\n }\n // If completing this work spawned new work, do that next. We'll come\n // back here again.\n return next;\n }\n\n if (returnFiber !== null) {\n // Append all the effects of the subtree and this fiber onto the effect\n // list of the parent. The completion order of the children affects the\n // side-effect order.\n if (returnFiber.firstEffect === null) {\n returnFiber.firstEffect = workInProgress.firstEffect;\n }\n if (workInProgress.lastEffect !== null) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;\n }\n returnFiber.lastEffect = workInProgress.lastEffect;\n }\n\n // If this fiber had side-effects, we append it AFTER the children's\n // side-effects. We can perform certain side-effects earlier if\n // needed, by doing multiple passes over the effect list. We don't want\n // to schedule our own side-effect on our own list because if end up\n // reusing children we'll schedule this effect onto itself since we're\n // at the end.\n var effectTag = workInProgress.effectTag;\n // Skip both NoWork and PerformedWork tags when creating the effect list.\n // PerformedWork effect is read by React DevTools but shouldn't be committed.\n if (effectTag > PerformedWork) {\n if (returnFiber.lastEffect !== null) {\n returnFiber.lastEffect.nextEffect = workInProgress;\n } else {\n returnFiber.firstEffect = workInProgress;\n }\n returnFiber.lastEffect = workInProgress;\n }\n }\n\n stopWorkTimer(workInProgress);\n if (true && ReactFiberInstrumentation_1.debugTool) {\n ReactFiberInstrumentation_1.debugTool.onCompleteWork(workInProgress);\n }\n\n if (siblingFiber !== null) {\n // If there is more work to do in this returnFiber, do that next.\n return siblingFiber;\n } else if (returnFiber !== null) {\n // If there's no more work in this returnFiber. Complete the returnFiber.\n workInProgress = returnFiber;\n continue;\n } else {\n // We've reached the root.\n var root = workInProgress.stateNode;\n root.isReadyForCommit = true;\n return null;\n }\n }\n\n // Without this explicit null return Flow complains of invalid return type\n // TODO Remove the above while(true) loop\n // eslint-disable-next-line no-unreachable\n return null;\n }\n\n function performUnitOfWork(workInProgress) {\n // The current, flushed, state of this fiber is the alternate.\n // Ideally nothing should rely on this, but relying on it here\n // means that we don't need an additional field on the work in\n // progress.\n var current = workInProgress.alternate;\n\n // See if beginning this work spawns more work.\n startWorkTimer(workInProgress);\n {\n ReactDebugCurrentFiber.setCurrentFiber(workInProgress);\n }\n\n var next = beginWork(current, workInProgress, nextRenderExpirationTime);\n {\n ReactDebugCurrentFiber.resetCurrentFiber();\n }\n if (true && ReactFiberInstrumentation_1.debugTool) {\n ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);\n }\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n next = completeUnitOfWork(workInProgress);\n }\n\n ReactCurrentOwner.current = null;\n\n return next;\n }\n\n function performFailedUnitOfWork(workInProgress) {\n // The current, flushed, state of this fiber is the alternate.\n // Ideally nothing should rely on this, but relying on it here\n // means that we don't need an additional field on the work in\n // progress.\n var current = workInProgress.alternate;\n\n // See if beginning this work spawns more work.\n startWorkTimer(workInProgress);\n {\n ReactDebugCurrentFiber.setCurrentFiber(workInProgress);\n }\n var next = beginFailedWork(current, workInProgress, nextRenderExpirationTime);\n {\n ReactDebugCurrentFiber.resetCurrentFiber();\n }\n if (true && ReactFiberInstrumentation_1.debugTool) {\n ReactFiberInstrumentation_1.debugTool.onBeginWork(workInProgress);\n }\n\n if (next === null) {\n // If this doesn't spawn new work, complete the current work.\n next = completeUnitOfWork(workInProgress);\n }\n\n ReactCurrentOwner.current = null;\n\n return next;\n }\n\n function workLoop(expirationTime) {\n if (capturedErrors !== null) {\n // If there are unhandled errors, switch to the slow work loop.\n // TODO: How to avoid this check in the fast path? Maybe the renderer\n // could keep track of which roots have unhandled errors and call a\n // forked version of renderRoot.\n slowWorkLoopThatChecksForFailedWork(expirationTime);\n return;\n }\n if (nextRenderExpirationTime === NoWork || nextRenderExpirationTime > expirationTime) {\n return;\n }\n\n if (nextRenderExpirationTime <= mostRecentCurrentTime) {\n // Flush all expired work.\n while (nextUnitOfWork !== null) {\n nextUnitOfWork = performUnitOfWork(nextUnitOfWork);\n }\n } else {\n // Flush asynchronous work until the deadline runs out of time.\n while (nextUnitOfWork !== null && !shouldYield()) {\n nextUnitOfWork = performUnitOfWork(nextUnitOfWork);\n }\n }\n }\n\n function slowWorkLoopThatChecksForFailedWork(expirationTime) {\n if (nextRenderExpirationTime === NoWork || nextRenderExpirationTime > expirationTime) {\n return;\n }\n\n if (nextRenderExpirationTime <= mostRecentCurrentTime) {\n // Flush all expired work.\n while (nextUnitOfWork !== null) {\n if (hasCapturedError(nextUnitOfWork)) {\n // Use a forked version of performUnitOfWork\n nextUnitOfWork = performFailedUnitOfWork(nextUnitOfWork);\n } else {\n nextUnitOfWork = performUnitOfWork(nextUnitOfWork);\n }\n }\n } else {\n // Flush asynchronous work until the deadline runs out of time.\n while (nextUnitOfWork !== null && !shouldYield()) {\n if (hasCapturedError(nextUnitOfWork)) {\n // Use a forked version of performUnitOfWork\n nextUnitOfWork = performFailedUnitOfWork(nextUnitOfWork);\n } else {\n nextUnitOfWork = performUnitOfWork(nextUnitOfWork);\n }\n }\n }\n }\n\n function renderRootCatchBlock(root, failedWork, boundary, expirationTime) {\n // We're going to restart the error boundary that captured the error.\n // Conceptually, we're unwinding the stack. We need to unwind the\n // context stack, too.\n unwindContexts(failedWork, boundary);\n\n // Restart the error boundary using a forked version of\n // performUnitOfWork that deletes the boundary's children. The entire\n // failed subree will be unmounted. During the commit phase, a special\n // lifecycle method is called on the error boundary, which triggers\n // a re-render.\n nextUnitOfWork = performFailedUnitOfWork(boundary);\n\n // Continue working.\n workLoop(expirationTime);\n }\n\n function renderRoot(root, expirationTime) {\n !!isWorking ? invariant(false, 'renderRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n isWorking = true;\n\n // We're about to mutate the work-in-progress tree. If the root was pending\n // commit, it no longer is: we'll need to complete it again.\n root.isReadyForCommit = false;\n\n // Check if we're starting from a fresh stack, or if we're resuming from\n // previously yielded work.\n if (root !== nextRoot || expirationTime !== nextRenderExpirationTime || nextUnitOfWork === null) {\n // Reset the stack and start working from the root.\n resetContextStack();\n nextRoot = root;\n nextRenderExpirationTime = expirationTime;\n nextUnitOfWork = createWorkInProgress(nextRoot.current, null, expirationTime);\n }\n\n startWorkLoopTimer(nextUnitOfWork);\n\n var didError = false;\n var error = null;\n {\n invokeGuardedCallback$1(null, workLoop, null, expirationTime);\n if (hasCaughtError()) {\n didError = true;\n error = clearCaughtError();\n }\n }\n\n // An error was thrown during the render phase.\n while (didError) {\n if (didFatal) {\n // This was a fatal error. Don't attempt to recover from it.\n firstUncaughtError = error;\n break;\n }\n\n var failedWork = nextUnitOfWork;\n if (failedWork === null) {\n // An error was thrown but there's no current unit of work. This can\n // happen during the commit phase if there's a bug in the renderer.\n didFatal = true;\n continue;\n }\n\n // \"Capture\" the error by finding the nearest boundary. If there is no\n // error boundary, we use the root.\n var boundary = captureError(failedWork, error);\n !(boundary !== null) ? invariant(false, 'Should have found an error boundary. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n if (didFatal) {\n // The error we just captured was a fatal error. This happens\n // when the error propagates to the root more than once.\n continue;\n }\n\n didError = false;\n error = null;\n {\n invokeGuardedCallback$1(null, renderRootCatchBlock, null, root, failedWork, boundary, expirationTime);\n if (hasCaughtError()) {\n didError = true;\n error = clearCaughtError();\n continue;\n }\n }\n // We're finished working. Exit the error loop.\n break;\n }\n\n var uncaughtError = firstUncaughtError;\n\n // We're done performing work. Time to clean up.\n stopWorkLoopTimer(interruptedBy);\n interruptedBy = null;\n isWorking = false;\n didFatal = false;\n firstUncaughtError = null;\n\n if (uncaughtError !== null) {\n onUncaughtError(uncaughtError);\n }\n\n return root.isReadyForCommit ? root.current.alternate : null;\n }\n\n // Returns the boundary that captured the error, or null if the error is ignored\n function captureError(failedWork, error) {\n // It is no longer valid because we exited the user code.\n ReactCurrentOwner.current = null;\n {\n ReactDebugCurrentFiber.resetCurrentFiber();\n }\n\n // Search for the nearest error boundary.\n var boundary = null;\n\n // Passed to logCapturedError()\n var errorBoundaryFound = false;\n var willRetry = false;\n var errorBoundaryName = null;\n\n // Host containers are a special case. If the failed work itself is a host\n // container, then it acts as its own boundary. In all other cases, we\n // ignore the work itself and only search through the parents.\n if (failedWork.tag === HostRoot) {\n boundary = failedWork;\n\n if (isFailedBoundary(failedWork)) {\n // If this root already failed, there must have been an error when\n // attempting to unmount it. This is a worst-case scenario and\n // should only be possible if there's a bug in the renderer.\n didFatal = true;\n }\n } else {\n var node = failedWork['return'];\n while (node !== null && boundary === null) {\n if (node.tag === ClassComponent) {\n var instance = node.stateNode;\n if (typeof instance.componentDidCatch === 'function') {\n errorBoundaryFound = true;\n errorBoundaryName = getComponentName(node);\n\n // Found an error boundary!\n boundary = node;\n willRetry = true;\n }\n } else if (node.tag === HostRoot) {\n // Treat the root like a no-op error boundary\n boundary = node;\n }\n\n if (isFailedBoundary(node)) {\n // This boundary is already in a failed state.\n\n // If we're currently unmounting, that means this error was\n // thrown while unmounting a failed subtree. We should ignore\n // the error.\n if (isUnmounting) {\n return null;\n }\n\n // If we're in the commit phase, we should check to see if\n // this boundary already captured an error during this commit.\n // This case exists because multiple errors can be thrown during\n // a single commit without interruption.\n if (commitPhaseBoundaries !== null && (commitPhaseBoundaries.has(node) || node.alternate !== null && commitPhaseBoundaries.has(node.alternate))) {\n // If so, we should ignore this error.\n return null;\n }\n\n // The error should propagate to the next boundary -— we keep looking.\n boundary = null;\n willRetry = false;\n }\n\n node = node['return'];\n }\n }\n\n if (boundary !== null) {\n // Add to the collection of failed boundaries. This lets us know that\n // subsequent errors in this subtree should propagate to the next boundary.\n if (failedBoundaries === null) {\n failedBoundaries = new Set();\n }\n failedBoundaries.add(boundary);\n\n // This method is unsafe outside of the begin and complete phases.\n // We might be in the commit phase when an error is captured.\n // The risk is that the return path from this Fiber may not be accurate.\n // That risk is acceptable given the benefit of providing users more context.\n var _componentStack = getStackAddendumByWorkInProgressFiber(failedWork);\n var _componentName = getComponentName(failedWork);\n\n // Add to the collection of captured errors. This is stored as a global\n // map of errors and their component stack location keyed by the boundaries\n // that capture them. We mostly use this Map as a Set; it's a Map only to\n // avoid adding a field to Fiber to store the error.\n if (capturedErrors === null) {\n capturedErrors = new Map();\n }\n\n var capturedError = {\n componentName: _componentName,\n componentStack: _componentStack,\n error: error,\n errorBoundary: errorBoundaryFound ? boundary.stateNode : null,\n errorBoundaryFound: errorBoundaryFound,\n errorBoundaryName: errorBoundaryName,\n willRetry: willRetry\n };\n\n capturedErrors.set(boundary, capturedError);\n\n try {\n logCapturedError(capturedError);\n } catch (e) {\n // Prevent cycle if logCapturedError() throws.\n // A cycle may still occur if logCapturedError renders a component that throws.\n var suppressLogging = e && e.suppressReactErrorLogging;\n if (!suppressLogging) {\n console.error(e);\n }\n }\n\n // If we're in the commit phase, defer scheduling an update on the\n // boundary until after the commit is complete\n if (isCommitting) {\n if (commitPhaseBoundaries === null) {\n commitPhaseBoundaries = new Set();\n }\n commitPhaseBoundaries.add(boundary);\n } else {\n // Otherwise, schedule an update now.\n // TODO: Is this actually necessary during the render phase? Is it\n // possible to unwind and continue rendering at the same priority,\n // without corrupting internal state?\n scheduleErrorRecovery(boundary);\n }\n return boundary;\n } else if (firstUncaughtError === null) {\n // If no boundary is found, we'll need to throw the error\n firstUncaughtError = error;\n }\n return null;\n }\n\n function hasCapturedError(fiber) {\n // TODO: capturedErrors should store the boundary instance, to avoid needing\n // to check the alternate.\n return capturedErrors !== null && (capturedErrors.has(fiber) || fiber.alternate !== null && capturedErrors.has(fiber.alternate));\n }\n\n function isFailedBoundary(fiber) {\n // TODO: failedBoundaries should store the boundary instance, to avoid\n // needing to check the alternate.\n return failedBoundaries !== null && (failedBoundaries.has(fiber) || fiber.alternate !== null && failedBoundaries.has(fiber.alternate));\n }\n\n function commitErrorHandling(effectfulFiber) {\n var capturedError = void 0;\n if (capturedErrors !== null) {\n capturedError = capturedErrors.get(effectfulFiber);\n capturedErrors['delete'](effectfulFiber);\n if (capturedError == null) {\n if (effectfulFiber.alternate !== null) {\n effectfulFiber = effectfulFiber.alternate;\n capturedError = capturedErrors.get(effectfulFiber);\n capturedErrors['delete'](effectfulFiber);\n }\n }\n }\n\n !(capturedError != null) ? invariant(false, 'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n switch (effectfulFiber.tag) {\n case ClassComponent:\n var instance = effectfulFiber.stateNode;\n\n var info = {\n componentStack: capturedError.componentStack\n };\n\n // Allow the boundary to handle the error, usually by scheduling\n // an update to itself\n instance.componentDidCatch(capturedError.error, info);\n return;\n case HostRoot:\n if (firstUncaughtError === null) {\n firstUncaughtError = capturedError.error;\n }\n return;\n default:\n invariant(false, 'Invalid type of work. This error is likely caused by a bug in React. Please file an issue.');\n }\n }\n\n function unwindContexts(from, to) {\n var node = from;\n while (node !== null) {\n switch (node.tag) {\n case ClassComponent:\n popContextProvider(node);\n break;\n case HostComponent:\n popHostContext(node);\n break;\n case HostRoot:\n popHostContainer(node);\n break;\n case HostPortal:\n popHostContainer(node);\n break;\n }\n if (node === to || node.alternate === to) {\n stopFailedWorkTimer(node);\n break;\n } else {\n stopWorkTimer(node);\n }\n node = node['return'];\n }\n }\n\n function computeAsyncExpiration() {\n // Given the current clock time, returns an expiration time. We use rounding\n // to batch like updates together.\n // Should complete within ~1000ms. 1200ms max.\n var currentTime = recalculateCurrentTime();\n var expirationMs = 1000;\n var bucketSizeMs = 200;\n return computeExpirationBucket(currentTime, expirationMs, bucketSizeMs);\n }\n\n function computeExpirationForFiber(fiber) {\n var expirationTime = void 0;\n if (expirationContext !== NoWork) {\n // An explicit expiration context was set;\n expirationTime = expirationContext;\n } else if (isWorking) {\n if (isCommitting) {\n // Updates that occur during the commit phase should have sync priority\n // by default.\n expirationTime = Sync;\n } else {\n // Updates during the render phase should expire at the same time as\n // the work that is being rendered.\n expirationTime = nextRenderExpirationTime;\n }\n } else {\n // No explicit expiration context was set, and we're not currently\n // performing work. Calculate a new expiration time.\n if (useSyncScheduling && !(fiber.internalContextTag & AsyncUpdates)) {\n // This is a sync update\n expirationTime = Sync;\n } else {\n // This is an async update\n expirationTime = computeAsyncExpiration();\n }\n }\n return expirationTime;\n }\n\n function scheduleWork(fiber, expirationTime) {\n return scheduleWorkImpl(fiber, expirationTime, false);\n }\n\n function checkRootNeedsClearing(root, fiber, expirationTime) {\n if (!isWorking && root === nextRoot && expirationTime < nextRenderExpirationTime) {\n // Restart the root from the top.\n if (nextUnitOfWork !== null) {\n // This is an interruption. (Used for performance tracking.)\n interruptedBy = fiber;\n }\n nextRoot = null;\n nextUnitOfWork = null;\n nextRenderExpirationTime = NoWork;\n }\n }\n\n function scheduleWorkImpl(fiber, expirationTime, isErrorRecovery) {\n recordScheduleUpdate();\n\n {\n if (!isErrorRecovery && fiber.tag === ClassComponent) {\n var instance = fiber.stateNode;\n warnAboutInvalidUpdates(instance);\n }\n }\n\n var node = fiber;\n while (node !== null) {\n // Walk the parent path to the root and update each node's\n // expiration time.\n if (node.expirationTime === NoWork || node.expirationTime > expirationTime) {\n node.expirationTime = expirationTime;\n }\n if (node.alternate !== null) {\n if (node.alternate.expirationTime === NoWork || node.alternate.expirationTime > expirationTime) {\n node.alternate.expirationTime = expirationTime;\n }\n }\n if (node['return'] === null) {\n if (node.tag === HostRoot) {\n var root = node.stateNode;\n\n checkRootNeedsClearing(root, fiber, expirationTime);\n requestWork(root, expirationTime);\n checkRootNeedsClearing(root, fiber, expirationTime);\n } else {\n {\n if (!isErrorRecovery && fiber.tag === ClassComponent) {\n warnAboutUpdateOnUnmounted(fiber);\n }\n }\n return;\n }\n }\n node = node['return'];\n }\n }\n\n function scheduleErrorRecovery(fiber) {\n scheduleWorkImpl(fiber, Sync, true);\n }\n\n function recalculateCurrentTime() {\n // Subtract initial time so it fits inside 32bits\n var ms = now() - startTime;\n mostRecentCurrentTime = msToExpirationTime(ms);\n return mostRecentCurrentTime;\n }\n\n function deferredUpdates(fn) {\n var previousExpirationContext = expirationContext;\n expirationContext = computeAsyncExpiration();\n try {\n return fn();\n } finally {\n expirationContext = previousExpirationContext;\n }\n }\n\n function syncUpdates(fn) {\n var previousExpirationContext = expirationContext;\n expirationContext = Sync;\n try {\n return fn();\n } finally {\n expirationContext = previousExpirationContext;\n }\n }\n\n // TODO: Everything below this is written as if it has been lifted to the\n // renderers. I'll do this in a follow-up.\n\n // Linked-list of roots\n var firstScheduledRoot = null;\n var lastScheduledRoot = null;\n\n var callbackExpirationTime = NoWork;\n var callbackID = -1;\n var isRendering = false;\n var nextFlushedRoot = null;\n var nextFlushedExpirationTime = NoWork;\n var deadlineDidExpire = false;\n var hasUnhandledError = false;\n var unhandledError = null;\n var deadline = null;\n\n var isBatchingUpdates = false;\n var isUnbatchingUpdates = false;\n\n // Use these to prevent an infinite loop of nested updates\n var NESTED_UPDATE_LIMIT = 1000;\n var nestedUpdateCount = 0;\n\n var timeHeuristicForUnitOfWork = 1;\n\n function scheduleCallbackWithExpiration(expirationTime) {\n if (callbackExpirationTime !== NoWork) {\n // A callback is already scheduled. Check its expiration time (timeout).\n if (expirationTime > callbackExpirationTime) {\n // Existing callback has sufficient timeout. Exit.\n return;\n } else {\n // Existing callback has insufficient timeout. Cancel and schedule a\n // new one.\n cancelDeferredCallback(callbackID);\n }\n // The request callback timer is already running. Don't start a new one.\n } else {\n startRequestCallbackTimer();\n }\n\n // Compute a timeout for the given expiration time.\n var currentMs = now() - startTime;\n var expirationMs = expirationTimeToMs(expirationTime);\n var timeout = expirationMs - currentMs;\n\n callbackExpirationTime = expirationTime;\n callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });\n }\n\n // requestWork is called by the scheduler whenever a root receives an update.\n // It's up to the renderer to call renderRoot at some point in the future.\n function requestWork(root, expirationTime) {\n if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {\n invariant(false, 'Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.');\n }\n\n // Add the root to the schedule.\n // Check if this root is already part of the schedule.\n if (root.nextScheduledRoot === null) {\n // This root is not already scheduled. Add it.\n root.remainingExpirationTime = expirationTime;\n if (lastScheduledRoot === null) {\n firstScheduledRoot = lastScheduledRoot = root;\n root.nextScheduledRoot = root;\n } else {\n lastScheduledRoot.nextScheduledRoot = root;\n lastScheduledRoot = root;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n }\n } else {\n // This root is already scheduled, but its priority may have increased.\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork || expirationTime < remainingExpirationTime) {\n // Update the priority.\n root.remainingExpirationTime = expirationTime;\n }\n }\n\n if (isRendering) {\n // Prevent reentrancy. Remaining work will be scheduled at the end of\n // the currently rendering batch.\n return;\n }\n\n if (isBatchingUpdates) {\n // Flush work at the end of the batch.\n if (isUnbatchingUpdates) {\n // ...unless we're inside unbatchedUpdates, in which case we should\n // flush it now.\n nextFlushedRoot = root;\n nextFlushedExpirationTime = Sync;\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n }\n return;\n }\n\n // TODO: Get rid of Sync and use current time?\n if (expirationTime === Sync) {\n performWork(Sync, null);\n } else {\n scheduleCallbackWithExpiration(expirationTime);\n }\n }\n\n function findHighestPriorityRoot() {\n var highestPriorityWork = NoWork;\n var highestPriorityRoot = null;\n\n if (lastScheduledRoot !== null) {\n var previousScheduledRoot = lastScheduledRoot;\n var root = firstScheduledRoot;\n while (root !== null) {\n var remainingExpirationTime = root.remainingExpirationTime;\n if (remainingExpirationTime === NoWork) {\n // This root no longer has work. Remove it from the scheduler.\n\n // TODO: This check is redudant, but Flow is confused by the branch\n // below where we set lastScheduledRoot to null, even though we break\n // from the loop right after.\n !(previousScheduledRoot !== null && lastScheduledRoot !== null) ? invariant(false, 'Should have a previous and last root. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n if (root === root.nextScheduledRoot) {\n // This is the only root in the list.\n root.nextScheduledRoot = null;\n firstScheduledRoot = lastScheduledRoot = null;\n break;\n } else if (root === firstScheduledRoot) {\n // This is the first root in the list.\n var next = root.nextScheduledRoot;\n firstScheduledRoot = next;\n lastScheduledRoot.nextScheduledRoot = next;\n root.nextScheduledRoot = null;\n } else if (root === lastScheduledRoot) {\n // This is the last root in the list.\n lastScheduledRoot = previousScheduledRoot;\n lastScheduledRoot.nextScheduledRoot = firstScheduledRoot;\n root.nextScheduledRoot = null;\n break;\n } else {\n previousScheduledRoot.nextScheduledRoot = root.nextScheduledRoot;\n root.nextScheduledRoot = null;\n }\n root = previousScheduledRoot.nextScheduledRoot;\n } else {\n if (highestPriorityWork === NoWork || remainingExpirationTime < highestPriorityWork) {\n // Update the priority, if it's higher\n highestPriorityWork = remainingExpirationTime;\n highestPriorityRoot = root;\n }\n if (root === lastScheduledRoot) {\n break;\n }\n previousScheduledRoot = root;\n root = root.nextScheduledRoot;\n }\n }\n }\n\n // If the next root is the same as the previous root, this is a nested\n // update. To prevent an infinite loop, increment the nested update count.\n var previousFlushedRoot = nextFlushedRoot;\n if (previousFlushedRoot !== null && previousFlushedRoot === highestPriorityRoot) {\n nestedUpdateCount++;\n } else {\n // Reset whenever we switch roots.\n nestedUpdateCount = 0;\n }\n nextFlushedRoot = highestPriorityRoot;\n nextFlushedExpirationTime = highestPriorityWork;\n }\n\n function performAsyncWork(dl) {\n performWork(NoWork, dl);\n }\n\n function performWork(minExpirationTime, dl) {\n deadline = dl;\n\n // Keep working on roots until there's no more work, or until the we reach\n // the deadline.\n findHighestPriorityRoot();\n\n if (enableUserTimingAPI && deadline !== null) {\n var didExpire = nextFlushedExpirationTime < recalculateCurrentTime();\n stopRequestCallbackTimer(didExpire);\n }\n\n while (nextFlushedRoot !== null && nextFlushedExpirationTime !== NoWork && (minExpirationTime === NoWork || nextFlushedExpirationTime <= minExpirationTime) && !deadlineDidExpire) {\n performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);\n // Find the next highest priority work.\n findHighestPriorityRoot();\n }\n\n // We're done flushing work. Either we ran out of time in this callback,\n // or there's no more work left with sufficient priority.\n\n // If we're inside a callback, set this to false since we just completed it.\n if (deadline !== null) {\n callbackExpirationTime = NoWork;\n callbackID = -1;\n }\n // If there's work left over, schedule a new callback.\n if (nextFlushedExpirationTime !== NoWork) {\n scheduleCallbackWithExpiration(nextFlushedExpirationTime);\n }\n\n // Clean-up.\n deadline = null;\n deadlineDidExpire = false;\n nestedUpdateCount = 0;\n\n if (hasUnhandledError) {\n var _error4 = unhandledError;\n unhandledError = null;\n hasUnhandledError = false;\n throw _error4;\n }\n }\n\n function performWorkOnRoot(root, expirationTime) {\n !!isRendering ? invariant(false, 'performWorkOnRoot was called recursively. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n\n isRendering = true;\n\n // Check if this is async work or sync/expired work.\n // TODO: Pass current time as argument to renderRoot, commitRoot\n if (expirationTime <= recalculateCurrentTime()) {\n // Flush sync work.\n var finishedWork = root.finishedWork;\n if (finishedWork !== null) {\n // This root is already complete. We can commit it.\n root.finishedWork = null;\n root.remainingExpirationTime = commitRoot(finishedWork);\n } else {\n root.finishedWork = null;\n finishedWork = renderRoot(root, expirationTime);\n if (finishedWork !== null) {\n // We've completed the root. Commit it.\n root.remainingExpirationTime = commitRoot(finishedWork);\n }\n }\n } else {\n // Flush async work.\n var _finishedWork = root.finishedWork;\n if (_finishedWork !== null) {\n // This root is already complete. We can commit it.\n root.finishedWork = null;\n root.remainingExpirationTime = commitRoot(_finishedWork);\n } else {\n root.finishedWork = null;\n _finishedWork = renderRoot(root, expirationTime);\n if (_finishedWork !== null) {\n // We've completed the root. Check the deadline one more time\n // before committing.\n if (!shouldYield()) {\n // Still time left. Commit the root.\n root.remainingExpirationTime = commitRoot(_finishedWork);\n } else {\n // There's no time left. Mark this root as complete. We'll come\n // back and commit it later.\n root.finishedWork = _finishedWork;\n }\n }\n }\n }\n\n isRendering = false;\n }\n\n // When working on async work, the reconciler asks the renderer if it should\n // yield execution. For DOM, we implement this with requestIdleCallback.\n function shouldYield() {\n if (deadline === null) {\n return false;\n }\n if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {\n // Disregard deadline.didTimeout. Only expired work should be flushed\n // during a timeout. This path is only hit for non-expired work.\n return false;\n }\n deadlineDidExpire = true;\n return true;\n }\n\n // TODO: Not happy about this hook. Conceptually, renderRoot should return a\n // tuple of (isReadyForCommit, didError, error)\n function onUncaughtError(error) {\n !(nextFlushedRoot !== null) ? invariant(false, 'Should be working on a root. This error is likely caused by a bug in React. Please file an issue.') : void 0;\n // Unschedule this root so we don't work on it again until there's\n // another update.\n nextFlushedRoot.remainingExpirationTime = NoWork;\n if (!hasUnhandledError) {\n hasUnhandledError = true;\n unhandledError = error;\n }\n }\n\n // TODO: Batching should be implemented at the renderer level, not inside\n // the reconciler.\n function batchedUpdates(fn, a) {\n var previousIsBatchingUpdates = isBatchingUpdates;\n isBatchingUpdates = true;\n try {\n return fn(a);\n } finally {\n isBatchingUpdates = previousIsBatchingUpdates;\n if (!isBatchingUpdates && !isRendering) {\n performWork(Sync, null);\n }\n }\n }\n\n // TODO: Batching should be implemented at the renderer level, not inside\n // the reconciler.\n function unbatchedUpdates(fn) {\n if (isBatchingUpdates && !isUnbatchingUpdates) {\n isUnbatchingUpdates = true;\n try {\n return fn();\n } finally {\n isUnbatchingUpdates = false;\n }\n }\n return fn();\n }\n\n // TODO: Batching should be implemented at the renderer level, not within\n // the reconciler.\n function flushSync(fn) {\n var previousIsBatchingUpdates = isBatchingUpdates;\n isBatchingUpdates = true;\n try {\n return syncUpdates(fn);\n } finally {\n isBatchingUpdates = previousIsBatchingUpdates;\n !!isRendering ? invariant(false, 'flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering.') : void 0;\n performWork(Sync, null);\n }\n }\n\n return {\n computeAsyncExpiration: computeAsyncExpiration,\n computeExpirationForFiber: computeExpirationForFiber,\n scheduleWork: scheduleWork,\n batchedUpdates: batchedUpdates,\n unbatchedUpdates: unbatchedUpdates,\n flushSync: flushSync,\n deferredUpdates: deferredUpdates\n };\n};\n\n{\n var didWarnAboutNestedUpdates = false;\n}\n\n// 0 is PROD, 1 is DEV.\n// Might add PROFILE later.\n\n\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) {\n return emptyObject;\n }\n\n var fiber = get(parentComponent);\n var parentContext = findCurrentUnmaskedContext(fiber);\n return isContextProvider(fiber) ? processChildContext(fiber, parentContext) : parentContext;\n}\n\nvar ReactFiberReconciler$1 = function (config) {\n var getPublicInstance = config.getPublicInstance;\n\n var _ReactFiberScheduler = ReactFiberScheduler(config),\n computeAsyncExpiration = _ReactFiberScheduler.computeAsyncExpiration,\n computeExpirationForFiber = _ReactFiberScheduler.computeExpirationForFiber,\n scheduleWork = _ReactFiberScheduler.scheduleWork,\n batchedUpdates = _ReactFiberScheduler.batchedUpdates,\n unbatchedUpdates = _ReactFiberScheduler.unbatchedUpdates,\n flushSync = _ReactFiberScheduler.flushSync,\n deferredUpdates = _ReactFiberScheduler.deferredUpdates;\n\n function scheduleTopLevelUpdate(current, element, callback) {\n {\n if (ReactDebugCurrentFiber.phase === 'render' && ReactDebugCurrentFiber.current !== null && !didWarnAboutNestedUpdates) {\n didWarnAboutNestedUpdates = true;\n warning(false, '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.\\n\\n' + 'Check the render method of %s.', getComponentName(ReactDebugCurrentFiber.current) || 'Unknown');\n }\n }\n\n callback = callback === undefined ? null : callback;\n {\n warning(callback === null || typeof callback === 'function', 'render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);\n }\n\n var expirationTime = void 0;\n // Check if the top-level element is an async wrapper component. If so,\n // treat updates to the root as async. This is a bit weird but lets us\n // avoid a separate `renderAsync` API.\n if (enableAsyncSubtreeAPI && element != null && element.type != null && element.type.prototype != null && element.type.prototype.unstable_isAsyncReactComponent === true) {\n expirationTime = computeAsyncExpiration();\n } else {\n expirationTime = computeExpirationForFiber(current);\n }\n\n var update = {\n expirationTime: expirationTime,\n partialState: { element: element },\n callback: callback,\n isReplace: false,\n isForced: false,\n nextCallback: null,\n next: null\n };\n insertUpdateIntoFiber(current, update);\n scheduleWork(current, expirationTime);\n }\n\n function findHostInstance(fiber) {\n var hostFiber = findCurrentHostFiber(fiber);\n if (hostFiber === null) {\n return null;\n }\n return hostFiber.stateNode;\n }\n\n return {\n createContainer: function (containerInfo, hydrate) {\n return createFiberRoot(containerInfo, hydrate);\n },\n updateContainer: function (element, container, parentComponent, callback) {\n // TODO: If this is a nested container, this won't be the root.\n var current = container.current;\n\n {\n if (ReactFiberInstrumentation_1.debugTool) {\n if (current.alternate === null) {\n ReactFiberInstrumentation_1.debugTool.onMountContainer(container);\n } else if (element === null) {\n ReactFiberInstrumentation_1.debugTool.onUnmountContainer(container);\n } else {\n ReactFiberInstrumentation_1.debugTool.onUpdateContainer(container);\n }\n }\n }\n\n var context = getContextForSubtree(parentComponent);\n if (container.context === null) {\n container.context = context;\n } else {\n container.pendingContext = context;\n }\n\n scheduleTopLevelUpdate(current, element, callback);\n },\n\n\n batchedUpdates: batchedUpdates,\n\n unbatchedUpdates: unbatchedUpdates,\n\n deferredUpdates: deferredUpdates,\n\n flushSync: flushSync,\n\n getPublicRootInstance: function (container) {\n var containerFiber = container.current;\n if (!containerFiber.child) {\n return null;\n }\n switch (containerFiber.child.tag) {\n case HostComponent:\n return getPublicInstance(containerFiber.child.stateNode);\n default:\n return containerFiber.child.stateNode;\n }\n },\n\n\n findHostInstance: findHostInstance,\n\n findHostInstanceWithNoPortals: function (fiber) {\n var hostFiber = findCurrentHostFiberWithNoPortals(fiber);\n if (hostFiber === null) {\n return null;\n }\n return hostFiber.stateNode;\n },\n injectIntoDevTools: function (devToolsConfig) {\n var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;\n\n return injectInternals(_assign({}, devToolsConfig, {\n findHostInstanceByFiber: function (fiber) {\n return findHostInstance(fiber);\n },\n findFiberByHostInstance: function (instance) {\n if (!findFiberByHostInstance) {\n // Might not be implemented by the renderer.\n return null;\n }\n return findFiberByHostInstance(instance);\n }\n }));\n }\n };\n};\n\nvar ReactFiberReconciler$2 = Object.freeze({\n\tdefault: ReactFiberReconciler$1\n});\n\nvar ReactFiberReconciler$3 = ( ReactFiberReconciler$2 && ReactFiberReconciler$1 ) || ReactFiberReconciler$2;\n\n// TODO: bundle Flow types with the package.\n\n\n\n// TODO: decide on the top-level export form.\n// This is hacky but makes it work with both Rollup and Jest.\nvar reactReconciler = ReactFiberReconciler$3['default'] ? ReactFiberReconciler$3['default'] : ReactFiberReconciler$3;\n\nfunction createPortal$1(children, containerInfo,\n// TODO: figure out the API for cross-renderer implementation.\nimplementation) {\n var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n return {\n // This tag allow us to uniquely identify this as a React Portal\n $$typeof: REACT_PORTAL_TYPE,\n key: key == null ? null : '' + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\n\n// TODO: this is special because it gets imported during build.\n\nvar ReactVersion = '16.2.0';\n\n// a requestAnimationFrame, storing the time for the start of the frame, then\n// scheduling a postMessage which gets scheduled after paint. Within the\n// postMessage handler do as much work as possible until time + frame rate.\n// By separating the idle call into a separate event tick we ensure that\n// layout, paint and other browser work is counted against the available time.\n// The frame rate is dynamically adjusted.\n\n{\n if (ExecutionEnvironment.canUseDOM && typeof requestAnimationFrame !== 'function') {\n warning(false, 'React depends on requestAnimationFrame. Make sure that you load a ' + 'polyfill in older browsers. http://fb.me/react-polyfills');\n }\n}\n\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\n\nvar now = void 0;\nif (hasNativePerformanceNow) {\n now = function () {\n return performance.now();\n };\n} else {\n now = function () {\n return Date.now();\n };\n}\n\n// TODO: There's no way to cancel, because Fiber doesn't atm.\nvar rIC = void 0;\nvar cIC = void 0;\n\nif (!ExecutionEnvironment.canUseDOM) {\n rIC = function (frameCallback) {\n return setTimeout(function () {\n frameCallback({\n timeRemaining: function () {\n return Infinity;\n }\n });\n });\n };\n cIC = function (timeoutID) {\n clearTimeout(timeoutID);\n };\n} else if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') {\n // Polyfill requestIdleCallback and cancelIdleCallback\n\n var scheduledRICCallback = null;\n var isIdleScheduled = false;\n var timeoutTime = -1;\n\n var isAnimationFrameScheduled = false;\n\n var frameDeadline = 0;\n // We start out assuming that we run at 30fps but then the heuristic tracking\n // will adjust this value to a faster fps if we get more frequent animation\n // frames.\n var previousFrameTime = 33;\n var activeFrameTime = 33;\n\n var frameDeadlineObject;\n if (hasNativePerformanceNow) {\n frameDeadlineObject = {\n didTimeout: false,\n timeRemaining: function () {\n // We assume that if we have a performance timer that the rAF callback\n // gets a performance timer value. Not sure if this is always true.\n var remaining = frameDeadline - performance.now();\n return remaining > 0 ? remaining : 0;\n }\n };\n } else {\n frameDeadlineObject = {\n didTimeout: false,\n timeRemaining: function () {\n // Fallback to Date.now()\n var remaining = frameDeadline - Date.now();\n return remaining > 0 ? remaining : 0;\n }\n };\n }\n\n // We use the postMessage trick to defer idle work until after the repaint.\n var messageKey = '__reactIdleCallback$' + Math.random().toString(36).slice(2);\n var idleTick = function (event) {\n if (event.source !== window || event.data !== messageKey) {\n return;\n }\n\n isIdleScheduled = false;\n\n var currentTime = now();\n if (frameDeadline - currentTime <= 0) {\n // There's no time left in this idle period. Check if the callback has\n // a timeout and whether it's been exceeded.\n if (timeoutTime !== -1 && timeoutTime <= currentTime) {\n // Exceeded the timeout. Invoke the callback even though there's no\n // time left.\n frameDeadlineObject.didTimeout = true;\n } else {\n // No timeout.\n if (!isAnimationFrameScheduled) {\n // Schedule another animation callback so we retry later.\n isAnimationFrameScheduled = true;\n requestAnimationFrame(animationTick);\n }\n // Exit without invoking the callback.\n return;\n }\n } else {\n // There's still time left in this idle period.\n frameDeadlineObject.didTimeout = false;\n }\n\n timeoutTime = -1;\n var callback = scheduledRICCallback;\n scheduledRICCallback = null;\n if (callback !== null) {\n callback(frameDeadlineObject);\n }\n };\n // Assumes that we have addEventListener in this environment. Might need\n // something better for old IE.\n window.addEventListener('message', idleTick, false);\n\n var animationTick = function (rafTime) {\n isAnimationFrameScheduled = false;\n var nextFrameTime = rafTime - frameDeadline + activeFrameTime;\n if (nextFrameTime < activeFrameTime && previousFrameTime < activeFrameTime) {\n if (nextFrameTime < 8) {\n // Defensive coding. We don't support higher frame rates than 120hz.\n // If we get lower than that, it is probably a bug.\n nextFrameTime = 8;\n }\n // If one frame goes long, then the next one can be short to catch up.\n // If two frames are short in a row, then that's an indication that we\n // actually have a higher frame rate than what we're currently optimizing.\n // We adjust our heuristic dynamically accordingly. For example, if we're\n // running on 120hz display or 90hz VR display.\n // Take the max of the two in case one of them was an anomaly due to\n // missed frame deadlines.\n activeFrameTime = nextFrameTime < previousFrameTime ? previousFrameTime : nextFrameTime;\n } else {\n previousFrameTime = nextFrameTime;\n }\n frameDeadline = rafTime + activeFrameTime;\n if (!isIdleScheduled) {\n isIdleScheduled = true;\n window.postMessage(messageKey, '*');\n }\n };\n\n rIC = function (callback, options) {\n // This assumes that we only schedule one callback at a time because that's\n // how Fiber uses it.\n scheduledRICCallback = callback;\n if (options != null && typeof options.timeout === 'number') {\n timeoutTime = now() + options.timeout;\n }\n if (!isAnimationFrameScheduled) {\n // If rAF didn't already schedule one, we need to schedule a frame.\n // TODO: If this rAF doesn't materialize because the browser throttles, we\n // might want to still have setTimeout trigger rIC as a backup to ensure\n // that we keep performing work.\n isAnimationFrameScheduled = true;\n requestAnimationFrame(animationTick);\n }\n return 0;\n };\n\n cIC = function () {\n scheduledRICCallback = null;\n isIdleScheduled = false;\n timeoutTime = -1;\n };\n} else {\n rIC = window.requestIdleCallback;\n cIC = window.cancelIdleCallback;\n}\n\n/**\n * Forked from fbjs/warning:\n * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js\n *\n * Only change is we use console.warn instead of console.error,\n * and do nothing when 'console' is not supported.\n * This really simplifies the code.\n * ---\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar lowPriorityWarning = function () {};\n\n{\n var printWarning = function (format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.warn(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n lowPriorityWarning = function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\nvar lowPriorityWarning$1 = lowPriorityWarning;\n\n// isAttributeNameSafe() is currently duplicated in DOMMarkupOperations.\n// TODO: Find a better place for this.\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {\n return true;\n }\n if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {\n return false;\n }\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n illegalAttributeNameCache[attributeName] = true;\n {\n warning(false, 'Invalid attribute name: `%s`', attributeName);\n }\n return false;\n}\n\n// shouldIgnoreValue() is currently duplicated in DOMMarkupOperations.\n// TODO: Find a better place for this.\nfunction shouldIgnoreValue(propertyInfo, value) {\n return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;\n}\n\n/**\n * Operations for dealing with DOM properties.\n */\n\n\n\n\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected) {\n {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod || propertyInfo.mustUseProperty) {\n return node[propertyInfo.propertyName];\n } else {\n var attributeName = propertyInfo.attributeName;\n\n var stringValue = null;\n\n if (propertyInfo.hasOverloadedBooleanValue) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n if (value === '') {\n return true;\n }\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return value;\n }\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldIgnoreValue(propertyInfo, expected)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n if (propertyInfo.hasBooleanValue) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n }\n // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldIgnoreValue(propertyInfo, expected)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n }\n}\n\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n var value = node.getAttribute(name);\n if (value === '' + expected) {\n return expected;\n }\n return value;\n }\n}\n\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\nfunction setValueForProperty(node, name, value) {\n var propertyInfo = getPropertyInfo(name);\n\n if (propertyInfo && shouldSetAttribute(name, value)) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, value);\n } else if (shouldIgnoreValue(propertyInfo, value)) {\n deleteValueForProperty(node, name);\n return;\n } else if (propertyInfo.mustUseProperty) {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyInfo.propertyName] = value;\n } else {\n var attributeName = propertyInfo.attributeName;\n var namespace = propertyInfo.attributeNamespace;\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n if (namespace) {\n node.setAttributeNS(namespace, attributeName, '' + value);\n } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {\n node.setAttribute(attributeName, '');\n } else {\n node.setAttribute(attributeName, '' + value);\n }\n }\n } else {\n setValueForAttribute(node, name, shouldSetAttribute(name, value) ? value : null);\n return;\n }\n\n {\n \n }\n}\n\nfunction setValueForAttribute(node, name, value) {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n if (value == null) {\n node.removeAttribute(name);\n } else {\n node.setAttribute(name, '' + value);\n }\n\n {\n \n }\n}\n\n/**\n * Deletes an attributes from a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\nfunction deleteValueForAttribute(node, name) {\n node.removeAttribute(name);\n}\n\n/**\n * Deletes the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n */\nfunction deleteValueForProperty(node, name) {\n var propertyInfo = getPropertyInfo(name);\n if (propertyInfo) {\n var mutationMethod = propertyInfo.mutationMethod;\n if (mutationMethod) {\n mutationMethod(node, undefined);\n } else if (propertyInfo.mustUseProperty) {\n var propName = propertyInfo.propertyName;\n if (propertyInfo.hasBooleanValue) {\n node[propName] = false;\n } else {\n node[propName] = '';\n }\n } else {\n node.removeAttribute(propertyInfo.attributeName);\n }\n } else {\n node.removeAttribute(name);\n }\n}\n\nvar ReactControlledValuePropTypes = {\n checkPropTypes: null\n};\n\n{\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n\n var propTypes = {\n value: function (props, propName, componentName) {\n if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n 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`.');\n },\n checked: function (props, propName, componentName) {\n if (!props[propName] || props.onChange || props.readOnly || props.disabled) {\n return null;\n }\n 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`.');\n }\n };\n\n /**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\n ReactControlledValuePropTypes.checkPropTypes = function (tagName, props, getStack) {\n checkPropTypes(propTypes, props, 'prop', tagName, getStack);\n };\n}\n\n// TODO: direct imports like some-package/src/* are bad. Fix me.\nvar getCurrentFiberOwnerName$2 = ReactDebugCurrentFiber.getCurrentFiberOwnerName;\nvar getCurrentFiberStackAddendum$3 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n\n/**\n * Implements an host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\nfunction getHostProps(element, props) {\n var node = element;\n var value = props.value;\n var checked = props.checked;\n\n var hostProps = _assign({\n // Make sure we set .type before any other properties (setting .value\n // before .type means .value is lost in IE11 and below)\n type: undefined,\n // Make sure we set .step before .value (setting .value before .step\n // means .value is rounded on mount, based upon step precision)\n step: undefined,\n // Make sure we set .min & .max before .value (to ensure proper order\n // in corner cases such as min or max deriving from value, e.g. Issue #7170)\n min: undefined,\n max: undefined\n }, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: value != null ? value : node._wrapperState.initialValue,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\n\nfunction initWrapperState(element, props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('input', props, getCurrentFiberStackAddendum$3);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n warning(false, '%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$2() || 'A component', props.type);\n didWarnCheckedDefaultChecked = true;\n }\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n warning(false, '%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerName$2() || 'A component', props.type);\n didWarnValueDefaultValue = true;\n }\n }\n\n var defaultValue = props.defaultValue;\n var node = element;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: props.value != null ? props.value : defaultValue,\n controlled: isControlled(props)\n };\n}\n\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n if (checked != null) {\n setValueForProperty(node, 'checked', checked);\n }\n}\n\nfunction updateWrapper(element, props) {\n var node = element;\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n warning(false, 'A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$3());\n didWarnUncontrolledToControlled = true;\n }\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n warning(false, 'A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components%s', props.type, getCurrentFiberStackAddendum$3());\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n\n var value = props.value;\n if (value != null) {\n if (value === 0 && node.value === '') {\n node.value = '0';\n // Note: IE9 reports a number inputs as 'text', so check props instead.\n } else if (props.type === 'number') {\n // Simulate `input.valueAsNumber`. IE9 does not support it\n var valueAsNumber = parseFloat(node.value) || 0;\n\n if (\n // eslint-disable-next-line\n value != valueAsNumber ||\n // eslint-disable-next-line\n value == valueAsNumber && node.value != value) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n node.value = '' + value;\n }\n } else if (node.value !== '' + value) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n node.value = '' + value;\n }\n } else {\n if (props.value == null && props.defaultValue != null) {\n // In Chrome, assigning defaultValue to certain input types triggers input validation.\n // For number inputs, the display value loses trailing decimal points. For email inputs,\n // Chrome raises \"The specified value is not a valid email address\".\n //\n // Here we check to see if the defaultValue has actually changed, avoiding these problems\n // when the user is inputting text\n //\n // https://github.com/facebook/react/issues/7253\n if (node.defaultValue !== '' + props.defaultValue) {\n node.defaultValue = '' + props.defaultValue;\n }\n }\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\n\nfunction postMountWrapper(element, props) {\n var node = element;\n\n // Detach value from defaultValue. We won't do anything if we're working on\n // submit or reset inputs as those values & defaultValues are linked. They\n // are not resetable nodes so this operation doesn't matter and actually\n // removes browser-default values (eg \"Submit Query\") when no value is\n // provided.\n\n switch (props.type) {\n case 'submit':\n case 'reset':\n break;\n case 'color':\n case 'date':\n case 'datetime':\n case 'datetime-local':\n case 'month':\n case 'time':\n case 'week':\n // This fixes the no-show issue on iOS Safari and Android Chrome:\n // https://github.com/facebook/react/issues/7233\n node.value = '';\n node.value = node.defaultValue;\n break;\n default:\n node.value = node.value;\n break;\n }\n\n // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n var name = node.name;\n if (name !== '') {\n node.name = '';\n }\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !node.defaultChecked;\n if (name !== '') {\n node.name = name;\n }\n}\n\nfunction restoreControlledState$1(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n }\n\n // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n }\n // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n var otherProps = getFiberCurrentPropsFromNode$1(otherNode);\n !otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;\n\n // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n updateValueIfChanged(otherNode);\n\n // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n updateWrapper(otherNode, otherProps);\n }\n }\n}\n\nfunction flattenChildren(children) {\n var content = '';\n\n // Flatten children and warn if they aren't strings or numbers;\n // invalid types are ignored.\n // We can silently skip them because invalid DOM nesting warning\n // catches these cases in Fiber.\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n if (typeof child === 'string' || typeof child === 'number') {\n content += child;\n }\n });\n\n return content;\n}\n\n/**\n * Implements an