From 30c8371cd56478bb4035162cf1bc9e8706eb5929 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Tue, 7 Mar 2017 16:21:22 +0000
Subject: [PATCH 001/170] WIP
---
.babelrc | 1 -
package.json | 7 ++-
scripts/rollup/babel.js | 13 ++++
scripts/rollup/build.js | 38 ++++++++++++
scripts/rollup/bundles.js | 31 ++++++++++
scripts/rollup/moduleMap.js | 33 +++++++++++
yarn.lock | 114 +++++++++++++++++++++++++++---------
7 files changed, 207 insertions(+), 30 deletions(-)
create mode 100644 scripts/rollup/babel.js
create mode 100644 scripts/rollup/build.js
create mode 100644 scripts/rollup/bundles.js
create mode 100644 scripts/rollup/moduleMap.js
diff --git a/.babelrc b/.babelrc
index cda595ba6528..873fb28dc04d 100644
--- a/.babelrc
+++ b/.babelrc
@@ -19,7 +19,6 @@
"transform-es2015-parameters",
["transform-es2015-destructuring", { "loose": true }],
["transform-es2015-block-scoping", { "throwIfClosureRequired": true }],
- "transform-es2015-modules-commonjs",
"transform-es3-member-expression-literals",
"transform-es3-property-literals",
"./scripts/babel/transform-object-assign-require",
diff --git a/package.json b/package.json
index 2ca46b1b15ed..806421095e23 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
"fbjs": "^0.8.9",
"fbjs-scripts": "^0.6.0",
"flow-bin": "^0.37.0",
- "glob": "^6.0.1",
+ "glob": "^6.0.4",
"glob-stream": "^6.1.0",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
@@ -70,6 +70,11 @@
"merge-stream": "^1.0.0",
"object-assign": "^4.1.1",
"platform": "^1.1.0",
+ "rollup": "^0.41.4",
+ "rollup-plugin-alias": "^1.2.0",
+ "rollup-plugin-babel": "^2.7.1",
+ "rollup-plugin-commonjs": "^7.0.0",
+ "rollup-plugin-node-resolve": "^2.0.0",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
"tmp": "~0.0.28",
diff --git a/scripts/rollup/babel.js b/scripts/rollup/babel.js
new file mode 100644
index 000000000000..2986e1d34513
--- /dev/null
+++ b/scripts/rollup/babel.js
@@ -0,0 +1,13 @@
+'use strict';
+
+const devExpressionWithCodes = require('../error-codes/dev-expression-with-codes');
+
+const babelOptsReact = {
+ plugins: [
+ devExpressionWithCodes, // this pass has to run before `rewrite-modules`
+ ],
+};
+
+module.exports = {
+ babelOptsReact,
+};
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
new file mode 100644
index 000000000000..327aa11dfbc3
--- /dev/null
+++ b/scripts/rollup/build.js
@@ -0,0 +1,38 @@
+"use strict";
+
+const { rollup } = require('rollup');
+const bundles = require('./bundles');
+const babel = require('rollup-plugin-babel');
+const commonjs = require('rollup-plugin-commonjs');
+const alias = require('rollup-plugin-alias');
+const { createModuleMap } = require('./moduleMap');
+// const nodeResolve = require('rollup-plugin-node-resolve');
+
+const external = [];
+
+function getAliases(paths) {
+ return Object.assign(
+ createModuleMap(paths),
+ {
+ // ...
+ }
+ );
+}
+
+function getPlugins(entry, babelOpts, paths) {
+ return [
+ babel(babelOpts),
+ alias(getAliases(paths)),
+ // nodeResolve({ jsnext: true, main: true }),
+ commonjs(),
+ ];
+}
+
+bundles.forEach(({babelOpts, entry, config, paths}) => (
+ rollup({
+ entry,
+ plugins: getPlugins(entry, babelOpts, paths),
+ external,
+ }).then(({ write }) => write(config)).catch(console.error)
+));
+
diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js
new file mode 100644
index 000000000000..64c4ef642121
--- /dev/null
+++ b/scripts/rollup/bundles.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const {
+ babelOptsReact,
+} = require('./babel');
+
+const bundles = [
+ {
+ config: {
+ dest: 'build/rollup/react.js',
+ format: 'umd',
+ moduleName: 'React',
+ sourceMap: false,
+ },
+ entry: 'src/umd/ReactUMDEntry.js',
+ babelOpts: babelOptsReact,
+ paths: [
+ 'src/umd/ReactUMDEntry.js',
+ 'src/umd/ReactWithAddonsUMDEntry.js',
+ 'src/umd/shims/**/*.js',
+
+ 'src/isomorphic/**/*.js',
+ 'src/addons/**/*.js',
+
+ 'src/ReactVersion.js',
+ 'src/shared/**/*.js',
+ ],
+ },
+];
+
+module.exports = bundles;
diff --git a/scripts/rollup/moduleMap.js b/scripts/rollup/moduleMap.js
new file mode 100644
index 000000000000..cad176f2469d
--- /dev/null
+++ b/scripts/rollup/moduleMap.js
@@ -0,0 +1,33 @@
+"use strict";
+
+const { resolve, basename } = require('path');
+const { sync } = require('glob');
+
+const exclude = [
+ 'src/**/__benchmarks__/**/*.js',
+ 'src/**/__tests__/**/*.js',
+ 'src/**/__mocks__/**/*.js',
+]
+
+function createModuleMap(paths) {
+ const moduleMap = {};
+
+ paths.forEach(path => {
+ const files = sync(path, exclude);
+
+ files.forEach(file => {
+ const moduleName = basename(file, '.js');
+
+ if (moduleName === 'ReactElementSymbol') {
+ console.log(file)
+ }
+
+ moduleMap[moduleName] = resolve(file);
+ });
+ });
+ return moduleMap;
+}
+
+module.exports = {
+ createModuleMap,
+};
diff --git a/yarn.lock b/yarn.lock
index ca3626dbbe80..d5c2137e98d8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -45,7 +45,7 @@ acorn@^3.0.0, acorn@^3.0.4, acorn@^3.1.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
-acorn@^4.0.3, acorn@^4.0.4:
+acorn@^4.0.1, acorn@^4.0.3, acorn@^4.0.4:
version "4.0.11"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0"
@@ -313,6 +313,30 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.22.0:
esutils "^2.0.2"
js-tokens "^3.0.0"
+babel-core@6, babel-core@^6.0.0, babel-core@^6.0.2, babel-core@^6.22.0, babel-core@^6.22.1:
+ version "6.22.1"
+ resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648"
+ dependencies:
+ babel-code-frame "^6.22.0"
+ babel-generator "^6.22.0"
+ babel-helpers "^6.22.0"
+ babel-messages "^6.22.0"
+ babel-register "^6.22.0"
+ babel-runtime "^6.22.0"
+ babel-template "^6.22.0"
+ babel-traverse "^6.22.1"
+ babel-types "^6.22.0"
+ babylon "^6.11.0"
+ convert-source-map "^1.1.0"
+ debug "^2.1.1"
+ json5 "^0.5.0"
+ lodash "^4.2.0"
+ minimatch "^3.0.2"
+ path-is-absolute "^1.0.0"
+ private "^0.1.6"
+ slash "^1.0.0"
+ source-map "^0.5.0"
+
babel-core@^5.6.21:
version "5.8.38"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-5.8.38.tgz#1fcaee79d7e61b750b00b8e54f6dfc9d0af86558"
@@ -364,30 +388,6 @@ babel-core@^5.6.21:
trim-right "^1.0.0"
try-resolve "^1.0.0"
-babel-core@^6.0.0, babel-core@^6.0.2, babel-core@^6.22.0, babel-core@^6.22.1:
- version "6.22.1"
- resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.22.1.tgz#9c5fd658ba1772d28d721f6d25d968fc7ae21648"
- dependencies:
- babel-code-frame "^6.22.0"
- babel-generator "^6.22.0"
- babel-helpers "^6.22.0"
- babel-messages "^6.22.0"
- babel-register "^6.22.0"
- babel-runtime "^6.22.0"
- babel-template "^6.22.0"
- babel-traverse "^6.22.1"
- babel-types "^6.22.0"
- babylon "^6.11.0"
- convert-source-map "^1.1.0"
- debug "^2.1.1"
- json5 "^0.5.0"
- lodash "^4.2.0"
- minimatch "^3.0.2"
- path-is-absolute "^1.0.0"
- private "^0.1.6"
- slash "^1.0.0"
- source-map "^0.5.0"
-
babel-eslint@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2"
@@ -629,7 +629,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0:
babel-types "^6.23.0"
lodash "^4.2.0"
-babel-plugin-transform-es2015-classes@^6.5.2:
+babel-plugin-transform-es2015-classes@^6.5.2, babel-plugin-transform-es2015-classes@^6.9.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.22.0.tgz#54d44998fd823d9dca15292324161c331c1b6f14"
dependencies:
@@ -1159,7 +1159,7 @@ buffer@^4.1.0:
ieee754 "^1.1.4"
isarray "^1.0.0"
-builtin-modules@^1.0.0:
+builtin-modules@^1.0.0, builtin-modules@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
@@ -1959,6 +1959,14 @@ estraverse@~4.1.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2"
+estree-walker@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.2.1.tgz#bdafe8095383d8414d5dc2ecf4c9173b6db9412e"
+
+estree-walker@^0.3.0:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.3.1.tgz#e6b1a51cf7292524e7237c312e5fe6660c1ce1aa"
+
esutils@^2.0.0, esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -3734,6 +3742,12 @@ lru-cache@^4.0.0:
pseudomap "^1.0.1"
yallist "^2.0.0"
+magic-string@^0.19.0:
+ version "0.19.0"
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.19.0.tgz#198948217254e3e0b93080e01146b7c73b2a06b2"
+ dependencies:
+ vlq "^0.2.1"
+
makeerror@1.0.x:
version "1.0.11"
resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
@@ -4606,6 +4620,46 @@ ripemd160@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e"
+rollup-plugin-babel@^2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-babel/-/rollup-plugin-babel-2.7.1.tgz#16528197b0f938a1536f44683c7a93d573182f57"
+ dependencies:
+ babel-core "6"
+ babel-plugin-transform-es2015-classes "^6.9.0"
+ object-assign "^4.1.0"
+ rollup-pluginutils "^1.5.0"
+
+rollup-plugin-commonjs@^7.0.0:
+ version "7.0.0"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-7.0.0.tgz#510762d5c423c761cd16d8e8451715b39f0ceb08"
+ dependencies:
+ acorn "^4.0.1"
+ estree-walker "^0.3.0"
+ magic-string "^0.19.0"
+ resolve "^1.1.7"
+ rollup-pluginutils "^1.5.1"
+
+rollup-plugin-node-resolve@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.0.0.tgz#07e0ae94ac002a3ea36e8f33ca121d9f836b1309"
+ dependencies:
+ browser-resolve "^1.11.0"
+ builtin-modules "^1.1.0"
+ resolve "^1.1.6"
+
+rollup-pluginutils@^1.5.0, rollup-pluginutils@^1.5.1:
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408"
+ dependencies:
+ estree-walker "^0.2.1"
+ minimatch "^3.0.2"
+
+rollup@^0.41.4:
+ version "0.41.4"
+ resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.4.tgz#a970580176329f9ead86854d7fd4c46de752aef8"
+ dependencies:
+ source-map-support "^0.4.0"
+
run-async@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389"
@@ -4737,7 +4791,7 @@ source-map-support@^0.2.10:
dependencies:
source-map "0.1.32"
-source-map-support@^0.4.2:
+source-map-support@^0.4.0, source-map-support@^0.4.2:
version "0.4.11"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.11.tgz#647f939978b38535909530885303daf23279f322"
dependencies:
@@ -5272,6 +5326,10 @@ vinyl@^0.5.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"
+vlq@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.1.tgz#14439d711891e682535467f8587c5630e4222a6c"
+
vm-browserify@~0.0.1:
version "0.0.4"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
From 9d78fa8c1d819bdc40bd9427c62c2699831cf040 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Tue, 7 Mar 2017 16:27:36 +0000
Subject: [PATCH 002/170] fbjs support
---
package.json | 1 +
scripts/rollup/build.js | 15 +++++++++------
scripts/rollup/fbjs.js | 27 +++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 6 deletions(-)
create mode 100644 scripts/rollup/fbjs.js
diff --git a/package.json b/package.json
index 806421095e23..a305ae8cae53 100644
--- a/package.json
+++ b/package.json
@@ -74,6 +74,7 @@
"rollup-plugin-alias": "^1.2.0",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^7.0.0",
+ "rollup-plugin-inject": "^2.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
index 327aa11dfbc3..543158439bea 100644
--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -1,29 +1,33 @@
"use strict";
const { rollup } = require('rollup');
+const { resolve } = require('path');
const bundles = require('./bundles');
const babel = require('rollup-plugin-babel');
const commonjs = require('rollup-plugin-commonjs');
const alias = require('rollup-plugin-alias');
+const inject = require('rollup-plugin-inject');
const { createModuleMap } = require('./moduleMap');
-// const nodeResolve = require('rollup-plugin-node-resolve');
+const { getFbjsModuleAliases } = require('./fbjs');
+const nodeResolve = require('rollup-plugin-node-resolve');
const external = [];
function getAliases(paths) {
return Object.assign(
createModuleMap(paths),
- {
- // ...
- }
+ getFbjsModuleAliases()
);
}
function getPlugins(entry, babelOpts, paths) {
return [
babel(babelOpts),
+ inject({
+ 'Object.assign': resolve('./node_modules/object-assign/index.js'),
+ }),
alias(getAliases(paths)),
- // nodeResolve({ jsnext: true, main: true }),
+ // nodeResolve({ jsnext: false, main: true }),
commonjs(),
];
}
@@ -35,4 +39,3 @@ bundles.forEach(({babelOpts, entry, config, paths}) => (
external,
}).then(({ write }) => write(config)).catch(console.error)
));
-
diff --git a/scripts/rollup/fbjs.js b/scripts/rollup/fbjs.js
new file mode 100644
index 000000000000..831b34d2d067
--- /dev/null
+++ b/scripts/rollup/fbjs.js
@@ -0,0 +1,27 @@
+"use strict";
+
+const { resolve } = require('path');
+
+function getFbjsModuleAliases() {
+ return {
+ hyphenateStyleName: resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
+ getUnboundedScrollPosition: resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
+ emptyFunction: resolve('./node_modules/fbjs/lib/emptyFunction.js'),
+ emptyObject: resolve('./node_modules/fbjs/lib/emptyObject.js'),
+ camelizeStyleName: resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
+ containsNode: resolve('./node_modules/fbjs/lib/containsNode.js'),
+ shallowEqual: resolve('./node_modules/fbjs/lib/shallowEqual.js'),
+ getActiveElement: resolve('./node_modules/fbjs/lib/getActiveElement.js'),
+ focusNode: resolve('./node_modules/fbjs/lib/focusNode.js'),
+ EventListener: resolve('./node_modules/fbjs/lib/EventListener.js'),
+ memoizeStringOnly: resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
+ ExecutionEnvironment: resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
+ warning: resolve('./node_modules/fbjs/lib/warning.js'),
+ reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
+ invariant: resolve('./test/stub.js'),
+ };
+}
+
+module.exports = {
+ getFbjsModuleAliases,
+};
From 3c24a4ca53fdc55df96fdd091837922a4c646f36 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Tue, 7 Mar 2017 16:52:53 +0000
Subject: [PATCH 003/170] WIP
---
scripts/rollup/build.js | 6 +++---
scripts/rollup/fbjs.js | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
index 543158439bea..bc2a9e3a93c6 100644
--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -9,9 +9,10 @@ const alias = require('rollup-plugin-alias');
const inject = require('rollup-plugin-inject');
const { createModuleMap } = require('./moduleMap');
const { getFbjsModuleAliases } = require('./fbjs');
-const nodeResolve = require('rollup-plugin-node-resolve');
-const external = [];
+const external = [
+ 'fbjs/lib/warning',
+];
function getAliases(paths) {
return Object.assign(
@@ -27,7 +28,6 @@ function getPlugins(entry, babelOpts, paths) {
'Object.assign': resolve('./node_modules/object-assign/index.js'),
}),
alias(getAliases(paths)),
- // nodeResolve({ jsnext: false, main: true }),
commonjs(),
];
}
diff --git a/scripts/rollup/fbjs.js b/scripts/rollup/fbjs.js
index 831b34d2d067..7b544e40f471 100644
--- a/scripts/rollup/fbjs.js
+++ b/scripts/rollup/fbjs.js
@@ -6,8 +6,8 @@ function getFbjsModuleAliases() {
return {
hyphenateStyleName: resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
getUnboundedScrollPosition: resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
- emptyFunction: resolve('./node_modules/fbjs/lib/emptyFunction.js'),
- emptyObject: resolve('./node_modules/fbjs/lib/emptyObject.js'),
+ 'fbjs/lib/emptyFunction': resolve('./node_modules/fbjs/lib/emptyFunction.js'),
+ 'fbjs/lib/emptyObject': resolve('./node_modules/fbjs/lib/emptyObject.js'),
camelizeStyleName: resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
containsNode: resolve('./node_modules/fbjs/lib/containsNode.js'),
shallowEqual: resolve('./node_modules/fbjs/lib/shallowEqual.js'),
@@ -16,9 +16,9 @@ function getFbjsModuleAliases() {
EventListener: resolve('./node_modules/fbjs/lib/EventListener.js'),
memoizeStringOnly: resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
ExecutionEnvironment: resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
- warning: resolve('./node_modules/fbjs/lib/warning.js'),
+ 'fbjs/lib/warning': resolve('./node_modules/fbjs/lib/warning.js'),
reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
- invariant: resolve('./test/stub.js'),
+ 'fbjs/lib/invariant': resolve('./node_modules/fbjs/lib/invariant.js'),
};
}
From d00cf558dcdd67dd0789121f977dfdb8c2fe41de Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Tue, 7 Mar 2017 17:42:00 +0000
Subject: [PATCH 004/170] dev/prod mode WIP
---
package.json | 4 ++++
scripts/rollup/babel.js | 1 +
scripts/rollup/build.js | 48 ++++++++++++++++++++++++++++---------
scripts/rollup/bundles.js | 3 ++-
scripts/rollup/fbjs.js | 1 +
scripts/rollup/moduleMap.js | 4 ----
6 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/package.json b/package.json
index a305ae8cae53..a26ad933a394 100644
--- a/package.json
+++ b/package.json
@@ -34,8 +34,10 @@
"babel-preset-react": "^6.5.0",
"babel-traverse": "^6.9.0",
"babylon": "6.15.0",
+ "boxen": "^1.0.0",
"browserify": "^13.0.0",
"bundle-collapser": "^1.1.1",
+ "chalk": "^1.1.3",
"coffee-script": "^1.8.0",
"core-js": "^2.2.1",
"coveralls": "^2.11.6",
@@ -74,8 +76,10 @@
"rollup-plugin-alias": "^1.2.0",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^7.0.0",
+ "rollup-plugin-filesize": "^1.0.1",
"rollup-plugin-inject": "^2.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
+ "rollup-plugin-uglify": "^1.0.1",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
"tmp": "~0.0.28",
diff --git a/scripts/rollup/babel.js b/scripts/rollup/babel.js
index 2986e1d34513..f37b9c9b3200 100644
--- a/scripts/rollup/babel.js
+++ b/scripts/rollup/babel.js
@@ -3,6 +3,7 @@
const devExpressionWithCodes = require('../error-codes/dev-expression-with-codes');
const babelOptsReact = {
+ exclude: 'node_modules/**',
plugins: [
devExpressionWithCodes, // this pass has to run before `rewrite-modules`
],
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
index bc2a9e3a93c6..17446faff248 100644
--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -1,12 +1,14 @@
"use strict";
const { rollup } = require('rollup');
-const { resolve } = require('path');
const bundles = require('./bundles');
const babel = require('rollup-plugin-babel');
const commonjs = require('rollup-plugin-commonjs');
const alias = require('rollup-plugin-alias');
-const inject = require('rollup-plugin-inject');
+const filesize = require('rollup-plugin-filesize');
+const uglify = require('rollup-plugin-uglify');
+const chalk = require('chalk');
+const boxen = require('boxen');
const { createModuleMap } = require('./moduleMap');
const { getFbjsModuleAliases } = require('./fbjs');
@@ -21,21 +23,45 @@ function getAliases(paths) {
);
}
-function getPlugins(entry, babelOpts, paths) {
- return [
+function setDest(config, filename) {
+ return Object.assign({}, config, {
+ dest: config.destDir + filename,
+ });
+}
+
+function getPlugins(entry, babelOpts, paths, filename, dev) {
+ const plugins = [
babel(babelOpts),
- inject({
- 'Object.assign': resolve('./node_modules/object-assign/index.js'),
- }),
alias(getAliases(paths)),
commonjs(),
];
+ if (!dev) {
+ plugins.push(uglify());
+ }
+ // this needs to come last
+ plugins.push(filesize({
+ render: (options, size, gzip) => (
+ boxen(chalk.green.bold(`"${filename}" size: `) + chalk.yellow.bold(size) + ', ' +
+ chalk.green.bold('gzip size: ') + chalk.yellow.bold(gzip), { padding: 1 }
+ )
+ ),
+ }));
+
+ return plugins;
}
-bundles.forEach(({babelOpts, entry, config, paths}) => (
- rollup({
+function createBundle({babelOpts, entry, config, paths, name}, dev) {
+ const filename = dev ? `${name}.js` : `${name}.min.js`;
+
+ return rollup({
entry,
- plugins: getPlugins(entry, babelOpts, paths),
+ plugins: getPlugins(entry, babelOpts, paths, filename, dev),
external,
- }).then(({ write }) => write(config)).catch(console.error)
+ }).then(({ write }) => write(setDest(config, filename))).catch(console.error);
+}
+
+bundles.forEach(bundle => (
+ createBundle(bundle, true).then(() =>
+ createBundle(bundle, false)
+ )
));
diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js
index 64c4ef642121..e74e309a3f30 100644
--- a/scripts/rollup/bundles.js
+++ b/scripts/rollup/bundles.js
@@ -6,8 +6,9 @@ const {
const bundles = [
{
+ name: 'react',
config: {
- dest: 'build/rollup/react.js',
+ destDir: 'build/rollup/',
format: 'umd',
moduleName: 'React',
sourceMap: false,
diff --git a/scripts/rollup/fbjs.js b/scripts/rollup/fbjs.js
index 7b544e40f471..cb9174df8e13 100644
--- a/scripts/rollup/fbjs.js
+++ b/scripts/rollup/fbjs.js
@@ -19,6 +19,7 @@ function getFbjsModuleAliases() {
'fbjs/lib/warning': resolve('./node_modules/fbjs/lib/warning.js'),
reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
'fbjs/lib/invariant': resolve('./node_modules/fbjs/lib/invariant.js'),
+ 'object-assign': resolve('./node_modules/object-assign/index.js'),
};
}
diff --git a/scripts/rollup/moduleMap.js b/scripts/rollup/moduleMap.js
index cad176f2469d..076315762c2b 100644
--- a/scripts/rollup/moduleMap.js
+++ b/scripts/rollup/moduleMap.js
@@ -18,10 +18,6 @@ function createModuleMap(paths) {
files.forEach(file => {
const moduleName = basename(file, '.js');
- if (moduleName === 'ReactElementSymbol') {
- console.log(file)
- }
-
moduleMap[moduleName] = resolve(file);
});
});
From 238dcf743d7c32423b45887a9f18303068cba174 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Tue, 7 Mar 2017 19:34:46 +0000
Subject: [PATCH 005/170] More WIP
---
package.json | 1 +
scripts/rollup/build.js | 75 +++++++++++++++++++++++++++++--------
scripts/rollup/bundles.js | 75 +++++++++++++++++++++++++++++++++++--
scripts/rollup/external.js | 30 +++++++++++++++
scripts/rollup/fbjs.js | 28 +++++++-------
scripts/rollup/moduleMap.js | 2 +-
6 files changed, 177 insertions(+), 34 deletions(-)
create mode 100644 scripts/rollup/external.js
diff --git a/package.json b/package.json
index a26ad933a394..276c04626902 100644
--- a/package.json
+++ b/package.json
@@ -79,6 +79,7 @@
"rollup-plugin-filesize": "^1.0.1",
"rollup-plugin-inject": "^2.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
+ "rollup-plugin-replace": "^1.1.1",
"rollup-plugin-uglify": "^1.0.1",
"run-sequence": "^1.1.4",
"through2": "^2.0.0",
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
index 17446faff248..b3dad4235829 100644
--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -7,38 +7,78 @@ const commonjs = require('rollup-plugin-commonjs');
const alias = require('rollup-plugin-alias');
const filesize = require('rollup-plugin-filesize');
const uglify = require('rollup-plugin-uglify');
+const replace = require('rollup-plugin-replace');
const chalk = require('chalk');
const boxen = require('boxen');
const { createModuleMap } = require('./moduleMap');
const { getFbjsModuleAliases } = require('./fbjs');
+const {
+ getExternalModules,
+ replaceExternalModules,
+} = require('./external');
-const external = [
- 'fbjs/lib/warning',
-];
+const bundleTypes = {
+ DEV: 'DEV',
+ PROD: 'PROD',
+ NODE: 'NODE',
+};
function getAliases(paths) {
return Object.assign(
- createModuleMap(paths),
+ createModuleMap(paths, false),
+ getExternalModules(),
getFbjsModuleAliases()
);
}
-function setDest(config, filename) {
+function updateConfig(config, filename, format) {
return Object.assign({}, config, {
dest: config.destDir + filename,
+ format,
});
}
-function getPlugins(entry, babelOpts, paths, filename, dev) {
+function stripDevCode() {
+ return {
+ '__DEV__': 'false',
+ 'process.env.NODE_ENV': "'production'",
+ };
+}
+
+function uglifyConfig() {
+ return {
+ warnings: false,
+ compress: {
+ screw_ie8: true,
+ dead_code: true,
+ unused: true,
+ drop_debugger: true,
+ booleans: true,
+ },
+ mangle: {
+ screw_ie8: true,
+ },
+ };
+}
+
+function getPlugins(entry, babelOpts, paths, filename, bundleType) {
const plugins = [
+ replace(
+ replaceExternalModules()
+ ),
babel(babelOpts),
alias(getAliases(paths)),
commonjs(),
];
- if (!dev) {
- plugins.push(uglify());
+ if (bundleType === bundleTypes.PROD) {
+ plugins.push(
+ uglify(uglifyConfig()),
+ replace(
+ stripDevCode()
+ )
+ );
}
- // this needs to come last
+ // this needs to come last or it doesn't report sizes correctly
plugins.push(filesize({
render: (options, size, gzip) => (
boxen(chalk.green.bold(`"${filename}" size: `) + chalk.yellow.bold(size) + ', ' +
@@ -50,18 +90,21 @@ function getPlugins(entry, babelOpts, paths, filename, dev) {
return plugins;
}
-function createBundle({babelOpts, entry, config, paths, name}, dev) {
- const filename = dev ? `${name}.js` : `${name}.min.js`;
+function createBundle({babelOpts, entry, config, paths, name, umd}, bundleType) {
+ const filename = bundleType === bundleTypes.PROD ? `${name}.min.js` : `${name}.js`;
+ const format = umd ? 'umd' : 'cjs';
return rollup({
entry,
- plugins: getPlugins(entry, babelOpts, paths, filename, dev),
- external,
- }).then(({ write }) => write(setDest(config, filename))).catch(console.error);
+ plugins: getPlugins(entry, babelOpts, paths, filename, bundleType),
+ external: [
+ 'react',
+ ],
+ }).then(({write}) => write(updateConfig(config, filename, format))).catch(console.error);
}
bundles.forEach(bundle => (
- createBundle(bundle, true).then(() =>
- createBundle(bundle, false)
+ createBundle(bundle, bundleTypes.DEV).then(() =>
+ createBundle(bundle, bundleTypes.PROD)
)
));
diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js
index e74e309a3f30..f162a6757888 100644
--- a/scripts/rollup/bundles.js
+++ b/scripts/rollup/bundles.js
@@ -6,15 +6,14 @@ const {
const bundles = [
{
- name: 'react',
+ babelOpts: babelOptsReact,
config: {
destDir: 'build/rollup/',
- format: 'umd',
moduleName: 'React',
sourceMap: false,
},
entry: 'src/umd/ReactUMDEntry.js',
- babelOpts: babelOptsReact,
+ name: 'react',
paths: [
'src/umd/ReactUMDEntry.js',
'src/umd/ReactWithAddonsUMDEntry.js',
@@ -26,7 +25,77 @@ const bundles = [
'src/ReactVersion.js',
'src/shared/**/*.js',
],
+ umd: true,
+ },
+ {
+ babelOpts: babelOptsReact,
+ config: {
+ destDir: 'build/rollup/',
+ globals: {
+ 'react': 'React',
+ },
+ moduleName: 'ReactDOM',
+ sourceMap: false,
+ },
+ entry: 'src/umd/ReactDOMUMDEntry.js',
+ name: 'react-dom',
+ paths: [
+ 'src/umd/ReactDOMUMDEntry.js',
+ 'src/umd/ReactDOMServerUMDEntry.js',
+
+ 'src/renderers/dom/**/*.js',
+ 'src/renderers/shared/**/*.js',
+ 'src/test/**/*.js', // ReactTestUtils is currently very coupled to DOM.
+
+ 'src/ReactVersion.js',
+ 'src/shared/**/*.js',
+ ],
+ umd: true,
},
+ {
+ babelOpts: babelOptsReact,
+ config: {
+ destDir: 'build/rollup/',
+ globals: {
+ 'react': 'React',
+ },
+ moduleName: 'ReactDOMFiber',
+ sourceMap: false,
+ },
+ entry: 'src/renderers/dom/fiber/ReactDOMFiber.js',
+ name: 'react-dom-fiber',
+ paths: [
+ 'src/renderers/dom/**/*.js',
+ 'src/renderers/shared/**/*.js',
+ 'src/test/**/*.js', // ReactTestUtils is currently very coupled to DOM.
+
+ 'src/ReactVersion.js',
+ 'src/shared/**/*.js',
+ ],
+ umd: true,
+ },
+ // {
+ // babelOpts: babelOptsReact,
+ // config: {
+ // destDir: 'build/rollup/',
+ // moduleName: 'ReactNative',
+ // sourceMap: false,
+ // },
+ // entry: 'src/umd/ReactDOMUMDEntry.js',
+ // name: 'react-native-renderer',
+ // paths: [
+ // 'src/umd/ReactDOMUMDEntry.js',
+ // 'src/umd/ReactDOMServerUMDEntry.js',
+
+ // 'src/renderers/dom/**/*.js',
+ // 'src/renderers/shared/**/*.js',
+ // 'src/test/**/*.js', // ReactTestUtils is currently very coupled to DOM.
+
+ // 'src/ReactVersion.js',
+ // 'src/shared/**/*.js',
+ // ],
+ // umd: false,
+ // },
];
module.exports = bundles;
diff --git a/scripts/rollup/external.js b/scripts/rollup/external.js
new file mode 100644
index 000000000000..aa1f644862e8
--- /dev/null
+++ b/scripts/rollup/external.js
@@ -0,0 +1,30 @@
+"use strict";
+
+const { resolve } = require('path');
+
+function getExternalModules() {
+ return {
+ reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
+ 'object-assign': resolve('./node_modules/object-assign/index.js'),
+ 'ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
+ 'ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
+ 'react/lib/ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
+ 'react/lib/checkPropTypes': resolve('./src/isomorphic/classic/types/checkPropTypes.js'),
+ 'react/lib/ReactDebugCurrentFrame': resolve('./src/isomorphic/classic/element/ReactDebugCurrentFrame.js'),
+ 'react/lib/ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
+ };
+}
+
+function replaceExternalModules() {
+ return {
+ 'react-dom/lib/ReactPerf': resolve('./src/renderers/shared/ReactPerf.js'),
+ 'react-dom/lib/ReactTestUtils': resolve('./src/test/ReactTestUtils.js'),
+ 'react-dom/lib/ReactInstanceMap': resolve('./src/renderers/shared/shared/ReactInstanceMap.js'),
+ 'react-dom': resolve('./src/renderers/dom/ReactDOM.js'),
+ };
+}
+
+module.exports = {
+ getExternalModules,
+ replaceExternalModules,
+};
diff --git a/scripts/rollup/fbjs.js b/scripts/rollup/fbjs.js
index cb9174df8e13..6b1dee1f5611 100644
--- a/scripts/rollup/fbjs.js
+++ b/scripts/rollup/fbjs.js
@@ -4,22 +4,22 @@ const { resolve } = require('path');
function getFbjsModuleAliases() {
return {
- hyphenateStyleName: resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
- getUnboundedScrollPosition: resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
- 'fbjs/lib/emptyFunction': resolve('./node_modules/fbjs/lib/emptyFunction.js'),
- 'fbjs/lib/emptyObject': resolve('./node_modules/fbjs/lib/emptyObject.js'),
- camelizeStyleName: resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
- containsNode: resolve('./node_modules/fbjs/lib/containsNode.js'),
- shallowEqual: resolve('./node_modules/fbjs/lib/shallowEqual.js'),
- getActiveElement: resolve('./node_modules/fbjs/lib/getActiveElement.js'),
- focusNode: resolve('./node_modules/fbjs/lib/focusNode.js'),
- EventListener: resolve('./node_modules/fbjs/lib/EventListener.js'),
- memoizeStringOnly: resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
- ExecutionEnvironment: resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
'fbjs/lib/warning': resolve('./node_modules/fbjs/lib/warning.js'),
- reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
'fbjs/lib/invariant': resolve('./node_modules/fbjs/lib/invariant.js'),
- 'object-assign': resolve('./node_modules/object-assign/index.js'),
+ 'fbjs/lib/emptyFunction': resolve('./node_modules/fbjs/lib/emptyFunction.js'),
+ 'fbjs/lib/emptyObject': resolve('./node_modules/fbjs/lib/emptyObject.js'),
+ 'fbjs/lib/hyphenateStyleName': resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
+ 'fbjs/lib/getUnboundedScrollPosition': resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
+ 'fbjs/lib/camelizeStyleName': resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
+ 'fbjs/lib/containsNode': resolve('./node_modules/fbjs/lib/containsNode.js'),
+ 'fbjs/lib/shallowEqual': resolve('./node_modules/fbjs/lib/shallowEqual.js'),
+ 'fbjs/lib/getActiveElement': resolve('./node_modules/fbjs/lib/getActiveElement.js'),
+ 'fbjs/lib/focusNode': resolve('./node_modules/fbjs/lib/focusNode.js'),
+ 'fbjs/lib/EventListener': resolve('./node_modules/fbjs/lib/EventListener.js'),
+ 'fbjs/lib/memoizeStringOnly': resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
+ 'fbjs/lib/ExecutionEnvironment': resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
+ 'fbjs/lib/createNodesFromMarkup': resolve('./node_modules/fbjs/lib/createNodesFromMarkup.js'),
+ 'fbjs/lib/performanceNow': resolve('./node_modules/fbjs/lib/performanceNow.js'),
};
}
diff --git a/scripts/rollup/moduleMap.js b/scripts/rollup/moduleMap.js
index 076315762c2b..87a0c7d22a48 100644
--- a/scripts/rollup/moduleMap.js
+++ b/scripts/rollup/moduleMap.js
@@ -7,7 +7,7 @@ const exclude = [
'src/**/__benchmarks__/**/*.js',
'src/**/__tests__/**/*.js',
'src/**/__mocks__/**/*.js',
-]
+];
function createModuleMap(paths) {
const moduleMap = {};
From 15b13cd99c6aaf9dca3282c2d9f8f9a5b2640d03 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Wed, 8 Mar 2017 14:51:16 +0000
Subject: [PATCH 006/170] builds a cjs bundle
---
package.json | 4 +-
scripts/rollup/babel.js | 14 -------
scripts/rollup/build.js | 72 ++++++++++++++++++++++-----------
scripts/rollup/bundles.js | 17 +++++---
scripts/rollup/external.js | 30 --------------
scripts/rollup/fbjs.js | 28 -------------
scripts/rollup/moduleMap.js | 29 -------------
scripts/rollup/modules.js | 81 +++++++++++++++++++++++++++++++++++++
8 files changed, 143 insertions(+), 132 deletions(-)
delete mode 100644 scripts/rollup/babel.js
delete mode 100644 scripts/rollup/external.js
delete mode 100644 scripts/rollup/fbjs.js
delete mode 100644 scripts/rollup/moduleMap.js
create mode 100644 scripts/rollup/modules.js
diff --git a/package.json b/package.json
index 276c04626902..570e1878a85d 100644
--- a/package.json
+++ b/package.json
@@ -73,9 +73,9 @@
"object-assign": "^4.1.1",
"platform": "^1.1.0",
"rollup": "^0.41.4",
- "rollup-plugin-alias": "^1.2.0",
+ "rollup-plugin-alias": "^1.2.1",
"rollup-plugin-babel": "^2.7.1",
- "rollup-plugin-commonjs": "^7.0.0",
+ "rollup-plugin-commonjs": "^7.1.0",
"rollup-plugin-filesize": "^1.0.1",
"rollup-plugin-inject": "^2.0.0",
"rollup-plugin-node-resolve": "^2.0.0",
diff --git a/scripts/rollup/babel.js b/scripts/rollup/babel.js
deleted file mode 100644
index f37b9c9b3200..000000000000
--- a/scripts/rollup/babel.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-const devExpressionWithCodes = require('../error-codes/dev-expression-with-codes');
-
-const babelOptsReact = {
- exclude: 'node_modules/**',
- plugins: [
- devExpressionWithCodes, // this pass has to run before `rewrite-modules`
- ],
-};
-
-module.exports = {
- babelOptsReact,
-};
diff --git a/scripts/rollup/build.js b/scripts/rollup/build.js
index b3dad4235829..f1cabea931c6 100644
--- a/scripts/rollup/build.js
+++ b/scripts/rollup/build.js
@@ -10,12 +10,13 @@ const uglify = require('rollup-plugin-uglify');
const replace = require('rollup-plugin-replace');
const chalk = require('chalk');
const boxen = require('boxen');
-const { createModuleMap } = require('./moduleMap');
-const { getFbjsModuleAliases } = require('./fbjs');
-const {
+const {
+ createModuleMap,
getExternalModules,
- replaceExternalModules,
-} = require('./external');
+ getInternalModules,
+ replaceInternalModules,
+ getFbjsModuleAliases,
+} = require('./modules');
const bundleTypes = {
DEV: 'DEV',
@@ -23,11 +24,12 @@ const bundleTypes = {
NODE: 'NODE',
};
-function getAliases(paths) {
+function getAliases(paths, bundleType) {
return Object.assign(
- createModuleMap(paths, false),
- getExternalModules(),
- getFbjsModuleAliases()
+ createModuleMap(paths),
+ getInternalModules(),
+ bundleType !== bundleTypes.NODE ? getExternalModules() : {},
+ bundleType !== bundleTypes.NODE ? getFbjsModuleAliases() : {}
);
}
@@ -35,16 +37,28 @@ function updateConfig(config, filename, format) {
return Object.assign({}, config, {
dest: config.destDir + filename,
format,
+ interop: false,
});
}
-function stripDevCode() {
+function stripEnvVariables(production) {
return {
- '__DEV__': 'false',
- 'process.env.NODE_ENV': "'production'",
+ '__DEV__': production ? 'false' : 'true',
+ 'process.env.NODE_ENV': production ? "'production'" : "'development'",
};
}
+function getFilename(name, bundleType) {
+ switch (bundleType) {
+ case bundleTypes.PROD:
+ return `${name}.min.js`;
+ case bundleTypes.DEV:
+ return `${name}.js`;
+ case bundleTypes.NODE:
+ return `${name}.cjs.js`;
+ }
+}
+
function uglifyConfig() {
return {
warnings: false,
@@ -64,17 +78,23 @@ function uglifyConfig() {
function getPlugins(entry, babelOpts, paths, filename, bundleType) {
const plugins = [
replace(
- replaceExternalModules()
+ replaceInternalModules()
),
babel(babelOpts),
- alias(getAliases(paths)),
+ alias(getAliases(paths, bundleType)),
commonjs(),
];
if (bundleType === bundleTypes.PROD) {
plugins.push(
uglify(uglifyConfig()),
replace(
- stripDevCode()
+ stripEnvVariables(true)
+ )
+ );
+ } else if (bundleType === bundleTypes.DEV) {
+ plugins.push(
+ replace(
+ stripEnvVariables(false)
)
);
}
@@ -90,9 +110,9 @@ function getPlugins(entry, babelOpts, paths, filename, bundleType) {
return plugins;
}
-function createBundle({babelOpts, entry, config, paths, name, umd}, bundleType) {
- const filename = bundleType === bundleTypes.PROD ? `${name}.min.js` : `${name}.js`;
- const format = umd ? 'umd' : 'cjs';
+function createBundle({babelOpts, entry, config, paths, name}, bundleType) {
+ const filename = getFilename(name, bundleType);
+ const format = bundleType === bundleTypes.NODE ? 'cjs' : 'umd';
return rollup({
entry,
@@ -103,8 +123,14 @@ function createBundle({babelOpts, entry, config, paths, name, umd}, bundleType)
}).then(({write}) => write(updateConfig(config, filename, format))).catch(console.error);
}
-bundles.forEach(bundle => (
- createBundle(bundle, bundleTypes.DEV).then(() =>
- createBundle(bundle, bundleTypes.PROD)
- )
-));
+bundles.forEach(bundle => {
+ if (bundle.createUMDBundles) {
+ createBundle(bundle, bundleTypes.DEV).then(() =>
+ createBundle(bundle, bundleTypes.PROD).then(() =>
+ createBundle(bundle, bundleTypes.NODE)
+ )
+ );
+ } else {
+ createBundle(bundle, bundleTypes.NODE);
+ }
+});
diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js
index f162a6757888..873e20a817f7 100644
--- a/scripts/rollup/bundles.js
+++ b/scripts/rollup/bundles.js
@@ -1,8 +1,13 @@
'use strict';
-const {
- babelOptsReact,
-} = require('./babel');
+const devExpressionWithCodes = require('../error-codes/dev-expression-with-codes');
+
+const babelOptsReact = {
+ exclude: 'node_modules/**',
+ plugins: [
+ devExpressionWithCodes, // this pass has to run before `rewrite-modules`
+ ],
+};
const bundles = [
{
@@ -25,7 +30,7 @@ const bundles = [
'src/ReactVersion.js',
'src/shared/**/*.js',
],
- umd: true,
+ createUMDBundles: true,
},
{
babelOpts: babelOptsReact,
@@ -50,7 +55,7 @@ const bundles = [
'src/ReactVersion.js',
'src/shared/**/*.js',
],
- umd: true,
+ createUMDBundles: true,
},
{
babelOpts: babelOptsReact,
@@ -72,7 +77,7 @@ const bundles = [
'src/ReactVersion.js',
'src/shared/**/*.js',
],
- umd: true,
+ createUMDBundles: true,
},
// {
// babelOpts: babelOptsReact,
diff --git a/scripts/rollup/external.js b/scripts/rollup/external.js
deleted file mode 100644
index aa1f644862e8..000000000000
--- a/scripts/rollup/external.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"use strict";
-
-const { resolve } = require('path');
-
-function getExternalModules() {
- return {
- reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
- 'object-assign': resolve('./node_modules/object-assign/index.js'),
- 'ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
- 'ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
- 'react/lib/ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
- 'react/lib/checkPropTypes': resolve('./src/isomorphic/classic/types/checkPropTypes.js'),
- 'react/lib/ReactDebugCurrentFrame': resolve('./src/isomorphic/classic/element/ReactDebugCurrentFrame.js'),
- 'react/lib/ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
- };
-}
-
-function replaceExternalModules() {
- return {
- 'react-dom/lib/ReactPerf': resolve('./src/renderers/shared/ReactPerf.js'),
- 'react-dom/lib/ReactTestUtils': resolve('./src/test/ReactTestUtils.js'),
- 'react-dom/lib/ReactInstanceMap': resolve('./src/renderers/shared/shared/ReactInstanceMap.js'),
- 'react-dom': resolve('./src/renderers/dom/ReactDOM.js'),
- };
-}
-
-module.exports = {
- getExternalModules,
- replaceExternalModules,
-};
diff --git a/scripts/rollup/fbjs.js b/scripts/rollup/fbjs.js
deleted file mode 100644
index 6b1dee1f5611..000000000000
--- a/scripts/rollup/fbjs.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-
-const { resolve } = require('path');
-
-function getFbjsModuleAliases() {
- return {
- 'fbjs/lib/warning': resolve('./node_modules/fbjs/lib/warning.js'),
- 'fbjs/lib/invariant': resolve('./node_modules/fbjs/lib/invariant.js'),
- 'fbjs/lib/emptyFunction': resolve('./node_modules/fbjs/lib/emptyFunction.js'),
- 'fbjs/lib/emptyObject': resolve('./node_modules/fbjs/lib/emptyObject.js'),
- 'fbjs/lib/hyphenateStyleName': resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
- 'fbjs/lib/getUnboundedScrollPosition': resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
- 'fbjs/lib/camelizeStyleName': resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
- 'fbjs/lib/containsNode': resolve('./node_modules/fbjs/lib/containsNode.js'),
- 'fbjs/lib/shallowEqual': resolve('./node_modules/fbjs/lib/shallowEqual.js'),
- 'fbjs/lib/getActiveElement': resolve('./node_modules/fbjs/lib/getActiveElement.js'),
- 'fbjs/lib/focusNode': resolve('./node_modules/fbjs/lib/focusNode.js'),
- 'fbjs/lib/EventListener': resolve('./node_modules/fbjs/lib/EventListener.js'),
- 'fbjs/lib/memoizeStringOnly': resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
- 'fbjs/lib/ExecutionEnvironment': resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
- 'fbjs/lib/createNodesFromMarkup': resolve('./node_modules/fbjs/lib/createNodesFromMarkup.js'),
- 'fbjs/lib/performanceNow': resolve('./node_modules/fbjs/lib/performanceNow.js'),
- };
-}
-
-module.exports = {
- getFbjsModuleAliases,
-};
diff --git a/scripts/rollup/moduleMap.js b/scripts/rollup/moduleMap.js
deleted file mode 100644
index 87a0c7d22a48..000000000000
--- a/scripts/rollup/moduleMap.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"use strict";
-
-const { resolve, basename } = require('path');
-const { sync } = require('glob');
-
-const exclude = [
- 'src/**/__benchmarks__/**/*.js',
- 'src/**/__tests__/**/*.js',
- 'src/**/__mocks__/**/*.js',
-];
-
-function createModuleMap(paths) {
- const moduleMap = {};
-
- paths.forEach(path => {
- const files = sync(path, exclude);
-
- files.forEach(file => {
- const moduleName = basename(file, '.js');
-
- moduleMap[moduleName] = resolve(file);
- });
- });
- return moduleMap;
-}
-
-module.exports = {
- createModuleMap,
-};
diff --git a/scripts/rollup/modules.js b/scripts/rollup/modules.js
new file mode 100644
index 000000000000..cfd2c590e4f9
--- /dev/null
+++ b/scripts/rollup/modules.js
@@ -0,0 +1,81 @@
+"use strict";
+
+const { resolve, basename } = require('path');
+const { sync } = require('glob');
+
+const exclude = [
+ 'src/**/__benchmarks__/**/*.js',
+ 'src/**/__tests__/**/*.js',
+ 'src/**/__mocks__/**/*.js',
+];
+
+function createModuleMap(paths) {
+ const moduleMap = {};
+
+ paths.forEach(path => {
+ const files = sync(path, exclude);
+
+ files.forEach(file => {
+ const moduleName = basename(file, '.js');
+
+ moduleMap[moduleName] = resolve(file);
+ });
+ });
+ return moduleMap;
+}
+
+function getExternalModules() {
+ return {
+ 'object-assign': resolve('./node_modules/object-assign/index.js'),
+ };
+}
+
+function getInternalModules() {
+ return {
+ reactProdInvariant: resolve('./src/shared/utils/reactProdInvariant.js'),
+ 'ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
+ 'ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
+ 'react/lib/ReactCurrentOwner': resolve('./src/isomorphic/classic/element/ReactCurrentOwner.js'),
+ 'react/lib/checkPropTypes': resolve('./src/isomorphic/classic/types/checkPropTypes.js'),
+ 'react/lib/ReactDebugCurrentFrame': resolve('./src/isomorphic/classic/element/ReactDebugCurrentFrame.js'),
+ 'react/lib/ReactComponentTreeHook': resolve('./src/isomorphic/hooks/ReactComponentTreeHook.js'),
+ };
+}
+
+function replaceInternalModules() {
+ return {
+ 'react-dom/lib/ReactPerf': resolve('./src/renderers/shared/ReactPerf.js'),
+ 'react-dom/lib/ReactTestUtils': resolve('./src/test/ReactTestUtils.js'),
+ 'react-dom/lib/ReactInstanceMap': resolve('./src/renderers/shared/shared/ReactInstanceMap.js'),
+ 'react-dom': resolve('./src/renderers/dom/ReactDOM.js'),
+ };
+}
+
+function getFbjsModuleAliases() {
+ return {
+ 'fbjs/lib/warning': resolve('./node_modules/fbjs/lib/warning.js'),
+ 'fbjs/lib/invariant': resolve('./node_modules/fbjs/lib/invariant.js'),
+ 'fbjs/lib/emptyFunction': resolve('./node_modules/fbjs/lib/emptyFunction.js'),
+ 'fbjs/lib/emptyObject': resolve('./node_modules/fbjs/lib/emptyObject.js'),
+ 'fbjs/lib/hyphenateStyleName': resolve('./node_modules/fbjs/lib/hyphenateStyleName.js'),
+ 'fbjs/lib/getUnboundedScrollPosition': resolve('./node_modules/fbjs/lib/getUnboundedScrollPosition.js'),
+ 'fbjs/lib/camelizeStyleName': resolve('./node_modules/fbjs/lib/camelizeStyleName.js'),
+ 'fbjs/lib/containsNode': resolve('./node_modules/fbjs/lib/containsNode.js'),
+ 'fbjs/lib/shallowEqual': resolve('./node_modules/fbjs/lib/shallowEqual.js'),
+ 'fbjs/lib/getActiveElement': resolve('./node_modules/fbjs/lib/getActiveElement.js'),
+ 'fbjs/lib/focusNode': resolve('./node_modules/fbjs/lib/focusNode.js'),
+ 'fbjs/lib/EventListener': resolve('./node_modules/fbjs/lib/EventListener.js'),
+ 'fbjs/lib/memoizeStringOnly': resolve('./node_modules/fbjs/lib/memoizeStringOnly.js'),
+ 'fbjs/lib/ExecutionEnvironment': resolve('./node_modules/fbjs/lib/ExecutionEnvironment.js'),
+ 'fbjs/lib/createNodesFromMarkup': resolve('./node_modules/fbjs/lib/createNodesFromMarkup.js'),
+ 'fbjs/lib/performanceNow': resolve('./node_modules/fbjs/lib/performanceNow.js'),
+ };
+}
+
+module.exports = {
+ createModuleMap,
+ getExternalModules,
+ replaceInternalModules,
+ getInternalModules,
+ getFbjsModuleAliases,
+};
From 690a72b870e18f36dafce37f5548eca592b8c051 Mon Sep 17 00:00:00 2001
From: Dominic Gannaway
Date: Wed, 8 Mar 2017 18:49:56 +0000
Subject: [PATCH 007/170] adding forwarding modules
---
.babelrc | 1 -
examples/basic/index.html | 6 +-
scripts/rollup/build.js | 120 +++++++++++++-----
scripts/rollup/bundles.js | 18 ++-
.../forwarding/ReactBrowserEventEmitter.js | 19 +++
scripts/rollup/forwarding/ReactChildren.js | 19 +++
.../rollup/forwarding/ReactCurrentOwner.js | 19 +++
scripts/rollup/forwarding/ReactElement.js | 19 +++
.../rollup/forwarding/ReactInputSelection.js | 19 +++
scripts/rollup/forwarding/ReactInstanceMap.js | 19 +++
scripts/rollup/forwarding/SyntheticEvent.js | 19 +++
scripts/rollup/forwarding/getComponentName.js | 19 +++
scripts/rollup/forwarding/getEventCharCode.js | 19 +++
.../forwarding/getVendorPrefixedEventName.js | 19 +++
scripts/rollup/forwarding/isEventSupported.js | 19 +++
.../forwarding/renderSubtreeIntoContainer.js | 16 +++
scripts/rollup/forwarding/sliceChildren.js | 34 +++++
scripts/rollup/modules.js | 92 ++++++++++----
src/fb/ReactDOMFBEntry.js | 32 +++++
src/fb/ReactDOMFiberFBEntry.js | 25 ++++
src/fb/ReactFBEntry.js | 35 +++++
21 files changed, 531 insertions(+), 57 deletions(-)
create mode 100644 scripts/rollup/forwarding/ReactBrowserEventEmitter.js
create mode 100644 scripts/rollup/forwarding/ReactChildren.js
create mode 100644 scripts/rollup/forwarding/ReactCurrentOwner.js
create mode 100644 scripts/rollup/forwarding/ReactElement.js
create mode 100644 scripts/rollup/forwarding/ReactInputSelection.js
create mode 100644 scripts/rollup/forwarding/ReactInstanceMap.js
create mode 100644 scripts/rollup/forwarding/SyntheticEvent.js
create mode 100644 scripts/rollup/forwarding/getComponentName.js
create mode 100644 scripts/rollup/forwarding/getEventCharCode.js
create mode 100644 scripts/rollup/forwarding/getVendorPrefixedEventName.js
create mode 100644 scripts/rollup/forwarding/isEventSupported.js
create mode 100644 scripts/rollup/forwarding/renderSubtreeIntoContainer.js
create mode 100644 scripts/rollup/forwarding/sliceChildren.js
create mode 100644 src/fb/ReactDOMFBEntry.js
create mode 100644 src/fb/ReactDOMFiberFBEntry.js
create mode 100644 src/fb/ReactFBEntry.js
diff --git a/.babelrc b/.babelrc
index 873fb28dc04d..d545679b5226 100644
--- a/.babelrc
+++ b/.babelrc
@@ -21,7 +21,6 @@
["transform-es2015-block-scoping", { "throwIfClosureRequired": true }],
"transform-es3-member-expression-literals",
"transform-es3-property-literals",
- "./scripts/babel/transform-object-assign-require",
"transform-react-jsx-source"
]
}
diff --git a/examples/basic/index.html b/examples/basic/index.html
index 9fc1fb3c30cd..faace88bdc91 100644
--- a/examples/basic/index.html
+++ b/examples/basic/index.html
@@ -23,8 +23,8 @@ Example Details
Learn more about React at
facebook.github.io/react.
-
-
+
+
";var s=l.firstChild;o=l.removeChild(s)}else o=t.is?a.createElement(e,t.is):a.createElement(e);else o=a.createElementNS(i,e);return o},setInitialProperties:function(e,t,n,r){var o,a=isCustomComponent(t,n);switch(t){case"audio":case"form":case"iframe":case"img":case"image":case"link":case"object":case"source":case"video":case"details":trapBubbledEventsLocal(e,t),o=n;break;case"input":ReactDOMFiberInput.mountWrapper(e,n),o=ReactDOMFiberInput.getHostProps(e,n),trapBubbledEventsLocal(e,t),ensureListeningTo(r,"onChange");break;case"option":ReactDOMFiberOption.mountWrapper(e,n),o=ReactDOMFiberOption.getHostProps(e,n);break;case"select":ReactDOMFiberSelect.mountWrapper(e,n),o=ReactDOMFiberSelect.getHostProps(e,n),trapBubbledEventsLocal(e,t),ensureListeningTo(r,"onChange");break;case"textarea":ReactDOMFiberTextarea.mountWrapper(e,n),o=ReactDOMFiberTextarea.getHostProps(e,n),trapBubbledEventsLocal(e,t),ensureListeningTo(r,"onChange");break;default:o=n}switch(assertValidProps(t,o),setInitialDOMProperties(e,r,o,a),t){case"input":inputValueTracking_1.trackNode(e),ReactDOMFiberInput.postMountWrapper(e,n);break;case"textarea":inputValueTracking_1.trackNode(e),ReactDOMFiberTextarea.postMountWrapper(e,n);break;case"option":ReactDOMFiberOption.postMountWrapper(e,n);break;default:"function"==typeof o.onClick&&trapClickOnNonInteractiveElement(e)}},diffProperties:function(e,t,n,r,o){var a,i,l=null;switch(t){case"input":a=ReactDOMFiberInput.getHostProps(e,n),i=ReactDOMFiberInput.getHostProps(e,r),l=[];break;case"option":a=ReactDOMFiberOption.getHostProps(e,n),i=ReactDOMFiberOption.getHostProps(e,r),l=[];break;case"select":a=ReactDOMFiberSelect.getHostProps(e,n),i=ReactDOMFiberSelect.getHostProps(e,r),l=[];break;case"textarea":a=ReactDOMFiberTextarea.getHostProps(e,n),i=ReactDOMFiberTextarea.getHostProps(e,r),l=[];break;default:a=n,i=r,"function"!=typeof a.onClick&&"function"==typeof i.onClick&&trapClickOnNonInteractiveElement(e)}assertValidProps(t,i);var s,u,c=null;for(s in a)if(!i.hasOwnProperty(s)&&a.hasOwnProperty(s)&&null!=a[s])if(s===STYLE){var p=a[s];for(u in p)p.hasOwnProperty(u)&&(c||(c={}),c[u]="")}else s===DANGEROUSLY_SET_INNER_HTML||s===CHILDREN||s===SUPPRESS_CONTENT_EDITABLE_WARNING||(registrationNameModules.hasOwnProperty(s)?l||(l=[]):(l=l||[]).push(s,null));for(s in i){var d=i[s],f=null!=a?a[s]:void 0;if(i.hasOwnProperty(s)&&d!==f&&(null!=d||null!=f))if(s===STYLE)if(f){for(u in f)!f.hasOwnProperty(u)||d&&d.hasOwnProperty(u)||(c||(c={}),c[u]="");for(u in d)d.hasOwnProperty(u)&&f[u]!==d[u]&&(c||(c={}),c[u]=d[u])}else c||(l||(l=[]),l.push(s,c)),c=d;else if(s===DANGEROUSLY_SET_INNER_HTML){var m=d?d[HTML]:void 0,v=f?f[HTML]:void 0;null!=m&&v!==m&&(l=l||[]).push(s,""+m)}else s===CHILDREN?f===d||"string"!=typeof d&&"number"!=typeof d||(l=l||[]).push(s,""+d):s===SUPPRESS_CONTENT_EDITABLE_WARNING||(registrationNameModules.hasOwnProperty(s)?(d&&ensureListeningTo(o,s),l||f===d||(l=[])):(l=l||[]).push(s,d))}return c&&(l=l||[]).push(STYLE,c),l},updateProperties:function(e,t,n,r,o){var a=isCustomComponent(n,r),i=isCustomComponent(n,o);switch(updateDOMProperties(e,t,a,i),n){case"input":ReactDOMFiberInput.updateWrapper(e,o);break;case"textarea":ReactDOMFiberTextarea.updateWrapper(e,o);break;case"select":ReactDOMFiberSelect.postUpdateWrapper(e,o)}},restoreControlledState:function(e,t,n){switch(t){case"input":return void ReactDOMFiberInput.restoreControlledState(e,n);case"textarea":return void ReactDOMFiberTextarea.restoreControlledState(e,n);case"select":return void ReactDOMFiberSelect.restoreControlledState(e,n)}}},ReactDOMFiberComponent_1=ReactDOMFiberComponent,rAF=void 0,rIC=void 0;if("function"!=typeof requestAnimationFrame)invariant(!1,"React depends on requestAnimationFrame. Make sure that you load a polyfill in older browsers.");else if("function"!=typeof requestIdleCallback){var scheduledRAFCallback=null,scheduledRICCallback=null,isIdleScheduled=!1,isAnimationFrameScheduled=!1,frameDeadline=0,previousFrameTime=33,activeFrameTime=33,frameDeadlineObject={timeRemaining:"object"==typeof performance&&"function"==typeof performance.now?function(){return frameDeadline-performance.now()}:function(){return frameDeadline-Date.now()}},messageKey="__reactIdleCallback$"+Math.random().toString(36).slice(2),idleTick=function(e){if(e.source===window&&e.data===messageKey){isIdleScheduled=!1;var t=scheduledRICCallback;scheduledRICCallback=null,t&&t(frameDeadlineObject)}};window.addEventListener("message",idleTick,!1);var animationTick=function(e){isAnimationFrameScheduled=!1;var t=e-frameDeadline+activeFrameTime;t1?1-t:void 0;return this._fallbackText=o.slice(e,l),this._fallbackText}}),PooledClass_1.addPoolingTo(FallbackCompositionState);var FallbackCompositionState_1=FallbackCompositionState,shouldBeReleasedProperties=["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"],EventInterface={type:null,target:null,currentTarget:emptyFunction.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};_assign(SyntheticEvent.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=emptyFunction.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=emptyFunction.thatReturnsTrue)},persist:function(){this.isPersistent=emptyFunction.thatReturnsTrue},isPersistent:emptyFunction.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n8&&documentMode<=11),SPACEBAR_CODE=32,SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE),eventTypes={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},hasSpaceKeypress=!1,currentComposition=null,BeforeInputEventPlugin={eventTypes:eventTypes,extractEvents:function(e,t,n,r){return[extractCompositionEvent(e,t,n,r),extractBeforeInputEvent(e,t,n,r)]}},BeforeInputEventPlugin_1=BeforeInputEventPlugin,stackBatchedUpdates=function(e,t,n,r,o,a){return e(t,n,r,o,a)},fiberBatchedUpdates=function(e,t){return e(t)},isNestingBatched=!1,ReactGenericBatchingInjection={injectStackBatchedUpdates:function(e){stackBatchedUpdates=e},injectFiberBatchedUpdates:function(e){fiberBatchedUpdates=e}},ReactGenericBatching={batchedUpdates:batchedUpdatesWithControlledComponents,injection:ReactGenericBatchingInjection},ReactGenericBatching_1=ReactGenericBatching,getEventTarget_1=getEventTarget,supportedInputTypes={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},isTextInputElement_1=isTextInputElement,eventTypes$1={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},activeElement=null,activeElementInst=null,doesChangeEventBubble=!1;ExecutionEnvironment.canUseDOM&&(doesChangeEventBubble=isEventSupported_1("change")&&(!document.documentMode||document.documentMode>8));var isInputEventSupported=!1;ExecutionEnvironment.canUseDOM&&(isInputEventSupported=isEventSupported_1("input")&&(!document.documentMode||document.documentMode>9));var ChangeEventPlugin={eventTypes:eventTypes$1,_isInputEventSupported:isInputEventSupported,extractEvents:function(e,t,n,r){var o,a,i=t?ReactDOMComponentTree_1.getNodeFromInstance(t):window;if(shouldUseChangeEvent(i)?doesChangeEventBubble?o=getTargetInstForChangeEvent:a=handleEventsForChangeEventIE8:isTextInputElement_1(i)?isInputEventSupported?o=getTargetInstForInputOrChangeEvent:(o=getTargetInstForInputEventPolyfill,a=handleEventsForInputEventPolyfill):shouldUseClickEvent(i)&&(o=getTargetInstForClickEvent),o){var l=o(e,t);if(l){var s=createAndAccumulateChangeEvent(l,n,r);return s}}a&&a(e,i,t)}},ChangeEventPlugin_1=ChangeEventPlugin,DOMEventPluginOrder=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"],DOMEventPluginOrder_1=DOMEventPluginOrder,UIEventInterface={view:function(e){if(e.view)return e.view;var t=getEventTarget_1(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};SyntheticEvent_1.augmentClass(SyntheticUIEvent,UIEventInterface);var SyntheticUIEvent_1=SyntheticUIEvent,modifierKeyToProp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},getEventModifierState_1=getEventModifierState,MouseEventInterface={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:getEventModifierState_1,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+ViewportMetrics_1.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+ViewportMetrics_1.currentScrollTop}};SyntheticUIEvent_1.augmentClass(SyntheticMouseEvent,MouseEventInterface);var SyntheticMouseEvent_1=SyntheticMouseEvent,eventTypes$2={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},EnterLeaveEventPlugin={eventTypes:eventTypes$2,extractEvents:function(e,t,n,r){if("topMouseOver"===e&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==e&&"topMouseOver"!==e)return null;var o;if(r.window===r)o=r;else{var a=r.ownerDocument;o=a?a.defaultView||a.parentWindow:window}var i,l;if("topMouseOut"===e){i=t;var s=n.relatedTarget||n.toElement;l=s?ReactDOMComponentTree_1.getClosestInstanceFromNode(s):null}else i=null,l=t;if(i===l)return null;var u=null==i?o:ReactDOMComponentTree_1.getNodeFromInstance(i),c=null==l?o:ReactDOMComponentTree_1.getNodeFromInstance(l),p=SyntheticMouseEvent_1.getPooled(eventTypes$2.mouseLeave,i,n,r);p.type="mouseleave",p.target=u,p.relatedTarget=c;var d=SyntheticMouseEvent_1.getPooled(eventTypes$2.mouseEnter,l,n,r);return d.type="mouseenter",d.target=c,d.relatedTarget=u,EventPropagators_1.accumulateEnterLeaveDispatches(p,d,i,l),[p,d]}},EnterLeaveEventPlugin_1=EnterLeaveEventPlugin,MUST_USE_PROPERTY=DOMProperty_1.injection.MUST_USE_PROPERTY,HAS_BOOLEAN_VALUE=DOMProperty_1.injection.HAS_BOOLEAN_VALUE,HAS_NUMERIC_VALUE=DOMProperty_1.injection.HAS_NUMERIC_VALUE,HAS_POSITIVE_NUMERIC_VALUE=DOMProperty_1.injection.HAS_POSITIVE_NUMERIC_VALUE,HAS_OVERLOADED_BOOLEAN_VALUE=DOMProperty_1.injection.HAS_OVERLOADED_BOOLEAN_VALUE,HTMLDOMPropertyConfig={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+DOMProperty_1.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:HAS_BOOLEAN_VALUE,allowTransparency:0,alt:0,as:0,async:HAS_BOOLEAN_VALUE,autoComplete:0,autoPlay:HAS_BOOLEAN_VALUE,capture:HAS_BOOLEAN_VALUE,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,cite:0,classID:0,className:0,cols:HAS_POSITIVE_NUMERIC_VALUE,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:HAS_BOOLEAN_VALUE,coords:0,crossOrigin:0,data:0,dateTime:0,default:HAS_BOOLEAN_VALUE,defer:HAS_BOOLEAN_VALUE,dir:0,disabled:HAS_BOOLEAN_VALUE,download:HAS_OVERLOADED_BOOLEAN_VALUE,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:HAS_BOOLEAN_VALUE,formTarget:0,frameBorder:0,headers:0,height:0,hidden:HAS_BOOLEAN_VALUE,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:HAS_BOOLEAN_VALUE,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,muted:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,name:0,nonce:0,noValidate:HAS_BOOLEAN_VALUE,open:HAS_BOOLEAN_VALUE,optimum:0,pattern:0,placeholder:0,playsInline:HAS_BOOLEAN_VALUE,poster:0,preload:0,profile:0,radioGroup:0,readOnly:HAS_BOOLEAN_VALUE,referrerPolicy:0,rel:0,required:HAS_BOOLEAN_VALUE,reversed:HAS_BOOLEAN_VALUE,role:0,rows:HAS_POSITIVE_NUMERIC_VALUE,rowSpan:HAS_NUMERIC_VALUE,sandbox:0,scope:0,scoped:HAS_BOOLEAN_VALUE,scrolling:0,seamless:HAS_BOOLEAN_VALUE,selected:MUST_USE_PROPERTY|HAS_BOOLEAN_VALUE,shape:0,size:HAS_POSITIVE_NUMERIC_VALUE,sizes:0,slot:0,span:HAS_POSITIVE_NUMERIC_VALUE,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:HAS_NUMERIC_VALUE,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:HAS_BOOLEAN_VALUE,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}},HTMLDOMPropertyConfig_1=HTMLDOMPropertyConfig,HostRoot=ReactTypeOfWork.HostRoot;_assign(TopLevelCallbackBookKeeping.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.targetInst=null,this.ancestors.length=0}}),PooledClass_1.addPoolingTo(TopLevelCallbackBookKeeping,PooledClass_1.threeArgumentPooler);var ReactEventListener={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:ExecutionEnvironment.canUseDOM?window:null,setHandleTopLevel:function(e){ReactEventListener._handleTopLevel=e},setEnabled:function(e){ReactEventListener._enabled=!!e},isEnabled:function(){return ReactEventListener._enabled},trapBubbledEvent:function(e,t,n){return n?EventListener.listen(n,t,ReactEventListener.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){return n?EventListener.capture(n,t,ReactEventListener.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=scrollValueMonitor.bind(null,e);EventListener.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(ReactEventListener._enabled){var n=getEventTarget_1(t),r=ReactDOMComponentTree_1.getClosestInstanceFromNode(n),o=TopLevelCallbackBookKeeping.getPooled(e,t,r);try{ReactGenericBatching_1.batchedUpdates(handleTopLevelImpl,o)}finally{TopLevelCallbackBookKeeping.release(o)}}}},ReactEventListener_1=ReactEventListener,NS={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},ATTRS={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",
+bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},SVGDOMPropertyConfig={Properties:{},DOMAttributeNamespaces:{xlinkActuate:NS.xlink,xlinkArcrole:NS.xlink,xlinkHref:NS.xlink,xlinkRole:NS.xlink,xlinkShow:NS.xlink,xlinkTitle:NS.xlink,xlinkType:NS.xlink,xmlBase:NS.xml,xmlLang:NS.xml,xmlSpace:NS.xml},DOMAttributeNames:{}};Object.keys(ATTRS).forEach(function(e){SVGDOMPropertyConfig.Properties[e]=0,ATTRS[e]&&(SVGDOMPropertyConfig.DOMAttributeNames[e]=ATTRS[e])});var SVGDOMPropertyConfig_1=SVGDOMPropertyConfig,getNodeForCharacterOffset_1=getNodeForCharacterOffset,useIEOffsets=ExecutionEnvironment.canUseDOM&&"selection"in document&&!("getSelection"in window),ReactDOMSelection={getOffsets:useIEOffsets?getIEOffsets:getModernOffsets,setOffsets:useIEOffsets?setIEOffsets:setModernOffsets},ReactDOMSelection_1=ReactDOMSelection,ReactInputSelection={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=getActiveElement();return{focusedElem:e,selectionRange:ReactInputSelection.hasSelectionCapabilities(e)?ReactInputSelection.getSelection(e):null}},restoreSelection:function(e){var t=getActiveElement(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&isInDocument(n)){ReactInputSelection.hasSelectionCapabilities(n)&&ReactInputSelection.setSelection(n,r);for(var o=[],a=n;a=a.parentNode;)1===a.nodeType&&o.push({element:a,left:a.scrollLeft,top:a.scrollTop});focusNode(n);for(var i=0;i-1;)valueStack[index]=null,index--},ReactFiberStack={createCursor:createCursor$1,isEmpty:isEmpty,pop:pop$1,push:push$1,reset:reset},_extends$1=_assign||function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={$$typeof:REACT_COROUTINE_TYPE$1,key:null==r?null:""+r,children:e,handler:t,props:n};return o},createYield=function(e){var t={$$typeof:REACT_YIELD_TYPE$1,value:e};return t},isCoroutine=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===REACT_COROUTINE_TYPE$1},isYield=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===REACT_YIELD_TYPE$1},REACT_YIELD_TYPE_1=REACT_YIELD_TYPE$1,REACT_COROUTINE_TYPE_1=REACT_COROUTINE_TYPE$1,ReactCoroutine={createCoroutine:createCoroutine,createYield:createYield,isCoroutine:isCoroutine,isYield:isYield,REACT_YIELD_TYPE:REACT_YIELD_TYPE_1,REACT_COROUTINE_TYPE:REACT_COROUTINE_TYPE_1},REACT_PORTAL_TYPE$1="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.portal")||60106,createPortal=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:REACT_PORTAL_TYPE$1,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},isPortal=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===REACT_PORTAL_TYPE$1},REACT_PORTAL_TYPE_1=REACT_PORTAL_TYPE$1,ReactPortal={createPortal:createPortal,isPortal:isPortal,REACT_PORTAL_TYPE:REACT_PORTAL_TYPE_1},ITERATOR_SYMBOL="function"==typeof Symbol&&Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator",getIteratorFn_1=getIteratorFn,REACT_COROUTINE_TYPE=ReactCoroutine.REACT_COROUTINE_TYPE,REACT_YIELD_TYPE=ReactCoroutine.REACT_YIELD_TYPE,REACT_PORTAL_TYPE=ReactPortal.REACT_PORTAL_TYPE,cloneFiber$2=ReactFiber.cloneFiber,createFiberFromElement$1=ReactFiber.createFiberFromElement,createFiberFromFragment$1=ReactFiber.createFiberFromFragment,createFiberFromText$1=ReactFiber.createFiberFromText,createFiberFromCoroutine$1=ReactFiber.createFiberFromCoroutine,createFiberFromYield$1=ReactFiber.createFiberFromYield,createFiberFromPortal$1=ReactFiber.createFiberFromPortal,isArray=Array.isArray,FunctionalComponent$2=ReactTypeOfWork.FunctionalComponent,ClassComponent$6=ReactTypeOfWork.ClassComponent,HostText$5=ReactTypeOfWork.HostText,HostPortal$4=ReactTypeOfWork.HostPortal,CoroutineComponent$2=ReactTypeOfWork.CoroutineComponent,YieldComponent$3=ReactTypeOfWork.YieldComponent,Fragment$3=ReactTypeOfWork.Fragment,NoEffect$3=ReactTypeOfSideEffect.NoEffect,Placement$3=ReactTypeOfSideEffect.Placement,Deletion$1=ReactTypeOfSideEffect.Deletion,reconcileChildFibers$1=ChildReconciler(!0,!0),reconcileChildFibersInPlace$1=ChildReconciler(!1,!0),mountChildFibersInPlace$1=ChildReconciler(!1,!1),cloneChildFibers$1=function(e,t){if(t.child)if(null!==e&&t.child===e.child){var n=t.child,r=cloneFiber$2(n,n.pendingWorkPriority);for(t.child=r,r.return=t;null!==n.sibling;)n=n.sibling,r=r.sibling=cloneFiber$2(n,n.pendingWorkPriority),r.return=t;r.sibling=null}else for(var o=t.child;null!==o;)o.return=t,o=o.sibling},ReactChildFiber={reconcileChildFibers:reconcileChildFibers$1,reconcileChildFibersInPlace:reconcileChildFibersInPlace$1,mountChildFibersInPlace:mountChildFibersInPlace$1,cloneChildFibers:cloneChildFibers$1},Update$1=ReactTypeOfSideEffect.Update,cacheContext$1=ReactFiberContext.cacheContext,getMaskedContext$2=ReactFiberContext.getMaskedContext,getUnmaskedContext$2=ReactFiberContext.getUnmaskedContext,isContextConsumer$1=ReactFiberContext.isContextConsumer,addUpdate$1=ReactFiberUpdateQueue.addUpdate,addReplaceUpdate$1=ReactFiberUpdateQueue.addReplaceUpdate,addForceUpdate$1=ReactFiberUpdateQueue.addForceUpdate,beginUpdateQueue$2=ReactFiberUpdateQueue.beginUpdateQueue,_require4$3=ReactFiberContext,hasContextChanged$2=_require4$3.hasContextChanged,isMounted$1=ReactFiberTreeReflection.isMounted,isArray$1=Array.isArray,ReactFiberClassComponent=function(e,t,n,r){function o(e,t,n,r,o,a){if(null===t||null!==e.updateQueue&&e.updateQueue.hasForceUpdate)return!0;var i=e.stateNode;if("function"==typeof i.shouldComponentUpdate){var l=i.shouldComponentUpdate(n,o,a);return l}var s=e.type;return!s.prototype||!s.prototype.isPureReactComponent||(!shallowEqual(t,n)||!shallowEqual(r,o))}function a(e){var t=e.stateNode,n=t.state;n&&("object"!=typeof n||isArray$1(n))&&reactProdInvariant_1("106",getComponentName_1(e)),"function"==typeof t.getChildContext&&("object"!=typeof e.type.childContextTypes?reactProdInvariant_1("107",getComponentName_1(e)):void 0)}function i(e,t){t.props=e.memoizedProps,t.state=e.memoizedState}function l(e,t){t.updater=d,e.stateNode=t,ReactInstanceMap_1.set(t,e)}function s(e){var t=e.type,n=e.pendingProps,r=getUnmaskedContext$2(e),o=isContextConsumer$1(e),i=o?getMaskedContext$2(e,r):emptyObject,s=new t(n,i);return l(e,s),a(e),o&&cacheContext$1(e,r,i),s}function u(e,t){var n=e.stateNode,r=n.state||null,o=e.pendingProps;invariant(o,"There must be pending props for an initial mount. This error is likely caused by a bug in React. Please file an issue.");var a=getUnmaskedContext$2(e);if(n.props=o,n.state=r,n.refs=emptyObject,n.context=getMaskedContext$2(e,a),"function"==typeof n.componentWillMount){n.componentWillMount();var i=e.updateQueue;null!==i&&(n.state=beginUpdateQueue$2(e,i,n,r,o,t))}"function"==typeof n.componentDidMount&&(e.effectTag|=Update$1)}function c(e,t){var n=e.stateNode;i(e,n);var r=e.memoizedState,a=e.pendingProps;a||(a=e.memoizedProps,invariant(null!=a,"There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue."));var l=getUnmaskedContext$2(e),u=getMaskedContext$2(e,l);if(!o(e,e.memoizedProps,a,e.memoizedState,r,u))return n.props=a,n.state=r,n.context=u,!1;var c=s(e);c.props=a,c.state=r=c.state||null,c.context=u,"function"==typeof c.componentWillMount&&c.componentWillMount();var p=e.updateQueue;return null!==p&&(c.state=beginUpdateQueue$2(e,p,c,r,a,t)),"function"==typeof n.componentDidMount&&(e.effectTag|=Update$1),!0}function p(e,t,a){var l=t.stateNode;i(t,l);var s=t.memoizedProps,u=t.pendingProps;u||(u=s,invariant(null!=u,"There should always be pending or memoized props. This error is likely caused by a bug in React. Please file an issue."));var c=l.context,p=getUnmaskedContext$2(t),f=getMaskedContext$2(t,p);s===u&&c===f||"function"==typeof l.componentWillReceiveProps&&(l.componentWillReceiveProps(u,f),l.state!==t.memoizedState&&d.enqueueReplaceState(l,l.state,null));var m=t.updateQueue,v=t.memoizedState,g=void 0;if(g=null!==m?beginUpdateQueue$2(t,m,l,v,u,a):v,!(s!==u||v!==g||hasContextChanged$2()||null!==m&&m.hasForceUpdate))return"function"==typeof l.componentDidUpdate&&(s===e.memoizedProps&&v===e.memoizedState||(t.effectTag|=Update$1)),!1;var h=o(t,s,u,v,g,f);return h?("function"==typeof l.componentWillUpdate&&l.componentWillUpdate(u,g,f),"function"==typeof l.componentDidUpdate&&(t.effectTag|=Update$1)):("function"==typeof l.componentDidUpdate&&(s===e.memoizedProps&&v===e.memoizedState||(t.effectTag|=Update$1)),n(t,u),r(t,g)),l.props=u,l.state=g,l.context=f,h}var d={isMounted:isMounted$1,enqueueSetState:function(n,r,o){var a=ReactInstanceMap_1.get(n),i=t();o=void 0===o?null:o,addUpdate$1(a,r,o,i),e(a,i)},enqueueReplaceState:function(n,r,o){var a=ReactInstanceMap_1.get(n),i=t();o=void 0===o?null:o,addReplaceUpdate$1(a,r,o,i),e(a,i)},enqueueForceUpdate:function(n,r){var o=ReactInstanceMap_1.get(n),a=t();r=void 0===r?null:r,addForceUpdate$1(o,r,a),e(o,a)}};return{adoptClassInstance:l,constructClassInstance:s,mountClassInstance:u,resumeMountClassInstance:c,updateClassInstance:p}},mountChildFibersInPlace=ReactChildFiber.mountChildFibersInPlace,reconcileChildFibers=ReactChildFiber.reconcileChildFibers,reconcileChildFibersInPlace=ReactChildFiber.reconcileChildFibersInPlace,cloneChildFibers=ReactChildFiber.cloneChildFibers,beginUpdateQueue$1=ReactFiberUpdateQueue.beginUpdateQueue,getMaskedContext$1=ReactFiberContext.getMaskedContext,getUnmaskedContext$1=ReactFiberContext.getUnmaskedContext,hasContextChanged$1=ReactFiberContext.hasContextChanged,pushContextProvider$1=ReactFiberContext.pushContextProvider,pushTopLevelContextObject$1=ReactFiberContext.pushTopLevelContextObject,invalidateContextProvider$1=ReactFiberContext.invalidateContextProvider,IndeterminateComponent$2=ReactTypeOfWork.IndeterminateComponent,FunctionalComponent$1=ReactTypeOfWork.FunctionalComponent,ClassComponent$5=ReactTypeOfWork.ClassComponent,HostRoot$6=ReactTypeOfWork.HostRoot,HostComponent$7=ReactTypeOfWork.HostComponent,HostText$4=ReactTypeOfWork.HostText,HostPortal$3=ReactTypeOfWork.HostPortal,CoroutineComponent$1=ReactTypeOfWork.CoroutineComponent,CoroutineHandlerPhase=ReactTypeOfWork.CoroutineHandlerPhase,YieldComponent$2=ReactTypeOfWork.YieldComponent,Fragment$2=ReactTypeOfWork.Fragment,NoWork$3=ReactPriorityLevel.NoWork,OffscreenPriority$1=ReactPriorityLevel.OffscreenPriority,Placement$2=ReactTypeOfSideEffect.Placement,ContentReset$1=ReactTypeOfSideEffect.ContentReset,Err$1=ReactTypeOfSideEffect.Err,Ref$1=ReactTypeOfSideEffect.Ref,ReactFiberBeginWork=function(e,t,n,r){
+function o(e,t,n){t.progressedChild=t.child,t.progressedPriority=n,null!==e&&(e.progressedChild=t.progressedChild,e.progressedPriority=t.progressedPriority)}function a(e){e.progressedFirstDeletion=e.progressedLastDeletion=null}function i(e){e.firstEffect=e.progressedFirstDeletion,e.lastEffect=e.progressedLastDeletion}function l(e,t,n){var r=t.pendingWorkPriority;s(e,t,n,r)}function s(e,t,n,r){t.memoizedProps=null,null===e?t.child=mountChildFibersInPlace(t,t.child,n,r):e.child===t.child?(a(t),t.child=reconcileChildFibers(t,t.child,n,r),i(t)):(t.child=reconcileChildFibersInPlace(t,t.child,n,r),i(t)),o(e,t,r)}function u(e,t){var n=t.pendingProps;if(hasContextChanged$1())null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n)return y(e,t);return l(e,t,n),P(t,n),t.child}function c(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=Ref$1)}function p(e,t){var n=t.type,r=t.pendingProps,o=t.memoizedProps;if(hasContextChanged$1())null===r&&(r=o);else{if(null===r||o===r)return y(e,t);if("function"==typeof n.shouldComponentUpdate&&!n.shouldComponentUpdate(o,r))return P(t,r),y(e,t)}var a,i=getUnmaskedContext$1(t),s=getMaskedContext$1(t,i);return a=n(r,s),l(e,t,a),P(t,r),t.child}function d(e,t,n){var r=pushContextProvider$1(t),o=void 0;return null===e?t.stateNode?o=D(t,n):(M(t),A(t,n),o=!0):o=U(e,t,n),f(e,t,o,r)}function f(e,t,n,r){if(c(e,t),!n)return y(e,t);var o=t.stateNode;ReactCurrentOwnerRollupShim.current=t;var a=void 0;return a=o.render(),l(e,t,a),T(t,o.state),P(t,o.props),r&&invalidateContextProvider$1(t),t.child}function m(e,t,n){var r=t.stateNode;r.pendingContext?pushTopLevelContextObject$1(t,r.pendingContext,r.pendingContext!==r.context):r.context&&pushTopLevelContextObject$1(t,r.context,!1),I(t,r.containerInfo);var o=t.updateQueue;if(null!==o){var a=t.memoizedState,i=beginUpdateQueue$1(t,o,null,a,null,n);if(a===i)return y(e,t);var s=i.element;return l(e,t,s),T(t,i),t.child}return y(e,t)}function v(e,t){F(t);var n=t.pendingProps,r=null!==e?e.memoizedProps:null,o=t.memoizedProps;if(hasContextChanged$1())null===n&&(n=o,invariant(null!==n,"We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue."));else if(null===n||o===n){if(!O&&k(t.type,o)&&t.pendingWorkPriority!==OffscreenPriority$1){for(var a=t.progressedChild;null!==a;)a.pendingWorkPriority=OffscreenPriority$1,a=a.sibling;return null}return y(e,t)}var i=n.children,u=S(n);if(u?i=null:r&&S(r)&&(t.effectTag|=ContentReset$1),c(e,t),!O&&k(t.type,n)&&t.pendingWorkPriority!==OffscreenPriority$1){if(t.progressedPriority===OffscreenPriority$1&&(t.child=t.progressedChild),s(e,t,i,OffscreenPriority$1),P(t,n),t.child=null!==e?e.child:null,null===e)for(var p=t.progressedChild;null!==p;)p.effectTag=Placement$2,p=p.sibling;return null}return l(e,t,i),P(t,n),t.child}function g(e,t){var n=t.pendingProps;return null===n&&(n=t.memoizedProps),P(t,n),null}function h(e,t,n){invariant(null===e,"An indeterminate component should never have mounted. This error is likely caused by a bug in React. Please file an issue.");var r,o=t.type,a=t.pendingProps,i=getUnmaskedContext$1(t),s=getMaskedContext$1(t,i);if(r=o(a,s),"object"==typeof r&&null!==r&&"function"==typeof r.render){t.tag=ClassComponent$5;var u=pushContextProvider$1(t);return N(t,r),A(t,n),f(e,t,!0,u)}return t.tag=FunctionalComponent$1,l(e,t,r),P(t,a),t.child}function C(e,t){var n=t.pendingProps;hasContextChanged$1()?null===n&&(n=e&&e.memoizedProps,invariant(null!==n,"We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue.")):null!==n&&t.memoizedProps!==n||(n=t.memoizedProps);var r=n.children,o=t.pendingWorkPriority;return t.memoizedProps=null,null===e?t.stateNode=mountChildFibersInPlace(t,t.stateNode,r,o):e.child===t.child?(a(t),t.stateNode=reconcileChildFibers(t,t.stateNode,r,o),i(t)):(t.stateNode=reconcileChildFibersInPlace(t,t.stateNode,r,o),i(t)),P(t,n),t.stateNode}function E(e,t){I(t,t.stateNode.containerInfo);var n=t.pendingWorkPriority,r=t.pendingProps;if(hasContextChanged$1())null===r&&(r=e&&e.memoizedProps,invariant(null!=r,"We should always have pending or current props. This error is likely caused by a bug in React. Please file an issue."));else if(null===r||t.memoizedProps===r)return y(e,t);return null===e?(t.child=reconcileChildFibersInPlace(t,t.child,r,n),P(t,r),o(e,t,n)):(l(e,t,r),P(t,r)),t.child}function y(e,t){var n=t.pendingWorkPriority;return e&&t.child===e.child&&a(t),cloneChildFibers(e,t),o(e,t,n),t.child}function b(e,t){switch(t.tag){case ClassComponent$5:pushContextProvider$1(t);break;case HostPortal$3:I(t,t.stateNode.containerInfo)}return null}function P(e,t){e.memoizedProps=t,e.pendingProps=null}function T(e,t){e.memoizedState=t}function R(e,t,n){if(t.pendingWorkPriority===NoWork$3||t.pendingWorkPriority>n)return b(e,t);switch(t.firstEffect=null,t.lastEffect=null,t.progressedPriority===n&&(t.child=t.progressedChild),t.tag){case IndeterminateComponent$2:return h(e,t,n);case FunctionalComponent$1:return p(e,t);case ClassComponent$5:return d(e,t,n);case HostRoot$6:return m(e,t,n);case HostComponent$7:return v(e,t);case HostText$4:return g(e,t);case CoroutineHandlerPhase:t.tag=CoroutineComponent$1;case CoroutineComponent$1:return C(e,t);case YieldComponent$2:return null;case HostPortal$3:return E(e,t);case Fragment$2:return u(e,t);default:invariant(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}function _(e,t,n){if(invariant(t.tag===ClassComponent$5||t.tag===HostRoot$6,"Invalid type of work. This error is likely caused by a bug in React. Please file an issue."),t.effectTag|=Err$1,t.pendingWorkPriority===NoWork$3||t.pendingWorkPriority>n)return b(e,t);t.firstEffect=null,t.lastEffect=null;var r=null;if(l(e,t,r),t.tag===ClassComponent$5){var o=t.stateNode;t.memoizedProps=o.props,t.memoizedState=o.state,t.pendingProps=null}return t.child}var S=e.shouldSetTextContent,O=e.useSyncScheduling,k=e.shouldDeprioritizeSubtree,F=t.pushHostContext,I=t.pushHostContainer,x=ReactFiberClassComponent(n,r,P,T),N=x.adoptClassInstance,M=x.constructClassInstance,A=x.mountClassInstance,D=x.resumeMountClassInstance,U=x.updateClassInstance;return{beginWork:R,beginFailedWork:_}},reconcileChildFibers$2=ReactChildFiber.reconcileChildFibers,popContextProvider$2=ReactFiberContext.popContextProvider,IndeterminateComponent$3=ReactTypeOfWork.IndeterminateComponent,FunctionalComponent$3=ReactTypeOfWork.FunctionalComponent,ClassComponent$7=ReactTypeOfWork.ClassComponent,HostRoot$7=ReactTypeOfWork.HostRoot,HostComponent$8=ReactTypeOfWork.HostComponent,HostText$6=ReactTypeOfWork.HostText,HostPortal$5=ReactTypeOfWork.HostPortal,CoroutineComponent$3=ReactTypeOfWork.CoroutineComponent,CoroutineHandlerPhase$1=ReactTypeOfWork.CoroutineHandlerPhase,YieldComponent$4=ReactTypeOfWork.YieldComponent,Fragment$4=ReactTypeOfWork.Fragment,Ref$2=ReactTypeOfSideEffect.Ref,Update$2=ReactTypeOfSideEffect.Update,ReactFiberCompleteWork=function(e,t){function n(e,t,n){t.progressedChild=t.child,t.progressedPriority=n,null!==e&&(e.progressedChild=t.progressedChild,e.progressedPriority=t.progressedPriority)}function r(e){e.effectTag|=Update$2}function o(e){e.effectTag|=Ref$2}function a(e,t){var n=t.stateNode;for(n&&(n.return=t);null!==n;){if(n.tag===HostComponent$8||n.tag===HostText$6||n.tag===HostPortal$5)invariant(!1,"A coroutine cannot have host component children.");else if(n.tag===YieldComponent$4)e.push(n.type);else if(null!==n.child){n.child.return=n,n=n.child;continue}for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function i(e,t){var r=t.memoizedProps;invariant(r,"Should be resolved by now. This error is likely caused by a bug in React. Please file an issue."),t.tag=CoroutineHandlerPhase$1;var o=[];a(o,t);var i=r.handler,l=r.props,s=i(l,o),u=null!==e?e.child:null,c=t.pendingWorkPriority;return t.child=reconcileChildFibers$2(t,u,s,c),n(e,t,c),t.child}function l(e,t){for(var n=t.child;null!==n;){if(n.tag===HostComponent$8||n.tag===HostText$6)p(e,n.stateNode);else if(n.tag===HostPortal$5);else if(null!==n.child){n=n.child;continue}if(n===t)return;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n=n.sibling}}function s(e,t){switch(t.tag){case FunctionalComponent$3:return null;case ClassComponent$7:return popContextProvider$2(t),null;case HostRoot$7:var n=t.stateNode;return n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null;case HostComponent$8:v(t);var a=m(),s=t.type,p=t.memoizedProps;if(null!==e&&null!=t.stateNode){var C=e.memoizedProps,E=t.stateNode,y=g(),b=f(E,s,C,p,a,y);t.updateQueue=b,b&&r(t),e.ref!==t.ref&&o(t)}else{if(!p)return invariant(null!==t.stateNode,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."),null;var P=g(),T=u(s,p,a,P,t);l(T,t),d(T,s,p,a)&&r(t),t.stateNode=T,null!==t.ref&&o(t)}return null;case HostText$6:var R=t.memoizedProps;if(e&&null!=t.stateNode){var _=e.memoizedProps;_!==R&&r(t)}else{if("string"!=typeof R)return invariant(null!==t.stateNode,"We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."),null;var S=m(),O=g(),k=c(R,S,O,t);t.stateNode=k}return null;case CoroutineComponent$3:return i(e,t);case CoroutineHandlerPhase$1:return t.tag=CoroutineComponent$3,null;case YieldComponent$4:return null;case Fragment$4:return null;case HostPortal$5:return r(t),h(t),null;case IndeterminateComponent$3:invariant(!1,"An indeterminate component should have become determinate before completing. This error is likely caused by a bug in React. Please file an issue.");default:invariant(!1,"Unknown unit of work tag. This error is likely caused by a bug in React. Please file an issue.")}}var u=e.createInstance,c=e.createTextInstance,p=e.appendInitialChild,d=e.finalizeInitialChildren,f=e.prepareUpdate,m=t.getRootHostContainer,v=t.popHostContext,g=t.getHostContext,h=t.popHostContainer;return{completeWork:s}},rendererID=null,injectInternals$1=null,onCommitRoot$1=null,onCommitUnmount$1=null;if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&__REACT_DEVTOOLS_GLOBAL_HOOK__.supportsFiber){var inject$1=__REACT_DEVTOOLS_GLOBAL_HOOK__.inject,onCommitFiberRoot=__REACT_DEVTOOLS_GLOBAL_HOOK__.onCommitFiberRoot,onCommitFiberUnmount=__REACT_DEVTOOLS_GLOBAL_HOOK__.onCommitFiberUnmount;injectInternals$1=function(e){rendererID=inject$1(e)},onCommitRoot$1=function(e){if(null!=rendererID)try{onCommitFiberRoot(rendererID,e)}catch(e){}},onCommitUnmount$1=function(e){if(null!=rendererID)try{onCommitFiberUnmount(rendererID,e)}catch(e){}}}var injectInternals_1=injectInternals$1,onCommitRoot_1=onCommitRoot$1,onCommitUnmount_1=onCommitUnmount$1,ReactFiberDevToolsHook={injectInternals:injectInternals_1,onCommitRoot:onCommitRoot_1,onCommitUnmount:onCommitUnmount_1},ClassComponent$8=ReactTypeOfWork.ClassComponent,HostRoot$8=ReactTypeOfWork.HostRoot,HostComponent$9=ReactTypeOfWork.HostComponent,HostText$7=ReactTypeOfWork.HostText,HostPortal$6=ReactTypeOfWork.HostPortal,CoroutineComponent$4=ReactTypeOfWork.CoroutineComponent,commitCallbacks$1=ReactFiberUpdateQueue.commitCallbacks,onCommitUnmount=ReactFiberDevToolsHook.onCommitUnmount,Placement$4=ReactTypeOfSideEffect.Placement,Update$3=ReactTypeOfSideEffect.Update,Callback$1=ReactTypeOfSideEffect.Callback,ContentReset$2=ReactTypeOfSideEffect.ContentReset,ReactFiberCommitWork=function(e,t){function n(e,n){try{n.componentWillUnmount()}catch(n){t(e,n)}}function r(e){var n=e.ref;if(null!==n){try{n(null)}catch(n){t(e,n)}}}function o(e){for(var t=e.return;null!==t;){switch(t.tag){case HostComponent$9:return t.stateNode;case HostRoot$8:return t.stateNode.containerInfo;case HostPortal$6:return t.stateNode.containerInfo}t=t.return}invariant(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function a(e){for(var t=e.return;null!==t;){if(i(t))return t;t=t.return}invariant(!1,"Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function i(e){return e.tag===HostComponent$9||e.tag===HostRoot$8||e.tag===HostPortal$6}function l(e){var t=e;e:for(;;){for(;null===t.sibling;){if(null===t.return||i(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==HostComponent$9&&t.tag!==HostText$7;){if(t.effectTag&Placement$4)continue e;if(null===t.child||t.tag===HostPortal$6)continue e;t.child.return=t,t=t.child}if(!(t.effectTag&Placement$4))return t.stateNode}}function s(e){var t=a(e),n=void 0;switch(t.tag){case HostComponent$9:n=t.stateNode;break;case HostRoot$8:n=t.stateNode.containerInfo;break;case HostPortal$6:n=t.stateNode.containerInfo;break;default:invariant(!1,"Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}t.effectTag&ContentReset$2&&(E(n),t.effectTag&=~ContentReset$2);for(var r=l(e),o=e;;){if(o.tag===HostComponent$9||o.tag===HostText$7)r?P(n,o.stateNode,r):b(n,o.stateNode);else if(o.tag===HostPortal$6);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)return;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function u(e){for(var t=e;;)if(d(t),null===t.child||t.tag===HostPortal$6){if(t===e)return;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function c(e,t){for(var n=t;;){if(n.tag===HostComponent$9||n.tag===HostText$7)u(n),T(e,n.stateNode);else if(n.tag===HostPortal$6){if(e=n.stateNode.containerInfo,null!==n.child){n.child.return=n,n=n.child;continue}}else if(d(n),null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)return;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return,n.tag===HostPortal$6&&(e=o(n))}n.sibling.return=n.return,n=n.sibling}}function p(e){var t=o(e);c(t,e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)}function d(e){switch("function"==typeof onCommitUnmount&&onCommitUnmount(e),e.tag){case ClassComponent$8:r(e);var t=e.stateNode;return void("function"==typeof t.componentWillUnmount&&n(e,t));case HostComponent$9:return void r(e);case CoroutineComponent$4:return void u(e.stateNode);case HostPortal$6:var a=o(e);return void c(a,e)}}function f(e,t){switch(t.tag){case ClassComponent$8:return;case HostComponent$9:var n=t.stateNode;if(null!=n&&null!==e){var r=t.memoizedProps,o=e.memoizedProps,a=t.type,i=t.updateQueue;t.updateQueue=null,null!==i&&C(n,i,a,o,r,t)}return;case HostText$7:invariant(null!==t.stateNode&&null!==e,"This should only be done during updates. This error is likely caused by a bug in React. Please file an issue.");var l=t.stateNode,s=t.memoizedProps,u=e.memoizedProps;return void y(l,u,s);case HostRoot$8:return;case HostPortal$6:return;default:invariant(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function m(e,t){switch(t.tag){case ClassComponent$8:var n=t.stateNode;if(t.effectTag&Update$3)if(null===e)n.componentDidMount();else{var r=e.memoizedProps,o=e.memoizedState;n.componentDidUpdate(r,o)}return void(t.effectTag&Callback$1&&null!==t.updateQueue&&commitCallbacks$1(t,t.updateQueue,n));case HostRoot$8:var a=t.updateQueue;if(null!==a){var i=t.child&&t.child.stateNode;commitCallbacks$1(t,a,i)}return;case HostComponent$9:var l=t.stateNode;if(null===e&&t.effectTag&Update$3){var s=t.type,u=t.memoizedProps;h(l,s,u,t)}return;case HostText$7:return;case HostPortal$6:return;default:invariant(!1,"This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}function v(e){var t=e.ref;if(null!==t){var n=R(e.stateNode);t(n)}}function g(e){var t=e.ref;null!==t&&t(null)}var h=e.commitMount,C=e.commitUpdate,E=e.resetTextContent,y=e.commitTextUpdate,b=e.appendChild,P=e.insertBefore,T=e.removeChild,R=e.getPublicInstance;return{commitPlacement:s,commitDeletion:p,commitWork:f,commitLifeCycles:m,commitAttachRef:v,commitDetachRef:g}},createCursor$2=ReactFiberStack.createCursor,pop$2=ReactFiberStack.pop,push$2=ReactFiberStack.push,ReactFiberHostContext=function(e){function t(){var e=d.current;return invariant(null!==e,"Expected root container to exist. This error is likely caused by a bug in React. Please file an issue."),e}function n(e,t){push$2(d,t,e);var n=u(t);push$2(p,e,e),push$2(c,n,e)}function r(e){pop$2(c,e),pop$2(p,e),pop$2(d,e)}function o(){var e=c.current;return invariant(null!=e,"Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."),e}function a(e){var t=d.current;invariant(null!=t,"Expected root host context to exist. This error is likely caused by a bug in React. Please file an issue.");var n=null!==c.current?c.current:emptyObject,r=s(n,e.type,t);n!==r&&(push$2(p,e,e),push$2(c,r,e))}function i(e){p.current===e&&(pop$2(c,e),pop$2(p,e))}function l(){c.current=null,d.current=null}var s=e.getChildHostContext,u=e.getRootHostContext,c=createCursor$2(null),p=createCursor$2(null),d=createCursor$2(null);return{getHostContext:o,getRootHostContainer:t,popHostContainer:r,popHostContext:i,pushHostContainer:n,pushHostContext:a,resetHostContainer:l}},popContextProvider$1=ReactFiberContext.popContextProvider,reset$1=ReactFiberStack.reset,getStackAddendumByWorkInProgressFiber$4=ReactFiberComponentTreeHook.getStackAddendumByWorkInProgressFiber,logCapturedError=ReactFiberErrorLogger.logCapturedError,cloneFiber$1=ReactFiber.cloneFiber,onCommitRoot=ReactFiberDevToolsHook.onCommitRoot,NoWork$2=ReactPriorityLevel.NoWork,SynchronousPriority$1=ReactPriorityLevel.SynchronousPriority,TaskPriority$1=ReactPriorityLevel.TaskPriority,AnimationPriority=ReactPriorityLevel.AnimationPriority,HighPriority=ReactPriorityLevel.HighPriority,LowPriority=ReactPriorityLevel.LowPriority,OffscreenPriority=ReactPriorityLevel.OffscreenPriority,NoEffect$2=ReactTypeOfSideEffect.NoEffect,Placement$1=ReactTypeOfSideEffect.Placement,Update=ReactTypeOfSideEffect.Update,PlacementAndUpdate=ReactTypeOfSideEffect.PlacementAndUpdate,Deletion=ReactTypeOfSideEffect.Deletion,ContentReset=ReactTypeOfSideEffect.ContentReset,Callback=ReactTypeOfSideEffect.Callback,Err=ReactTypeOfSideEffect.Err,Ref=ReactTypeOfSideEffect.Ref,HostRoot$5=ReactTypeOfWork.HostRoot,HostComponent$6=ReactTypeOfWork.HostComponent,HostPortal$2=ReactTypeOfWork.HostPortal,ClassComponent$4=ReactTypeOfWork.ClassComponent,getPendingPriority$1=ReactFiberUpdateQueue.getPendingPriority,_require12=ReactFiberContext,resetContext$1=_require12.resetContext,ReactFiberInstrumentation$1,timeHeuristicForUnitOfWork=1,ReactFiberScheduler=function(e){function t(e){ue||(ue=!0,z(e))}function n(e){ce||(ce=!0,Q(e))}function r(){reset$1(),resetContext$1(),A()}function o(){for(;null!==le&&le.current.pendingWorkPriority===NoWork$2;){le.isScheduled=!1;var e=le.nextScheduledRoot;if(le.nextScheduledRoot=null,le===se)return le=null,se=null,oe=NoWork$2,null;le=e}for(var t=le,n=null,o=NoWork$2;null!==t;)t.current.pendingWorkPriority!==NoWork$2&&(o===NoWork$2||o>t.current.pendingWorkPriority)&&(o=t.current.pendingWorkPriority,n=t),t=t.nextScheduledRoot;return null!==n?(oe=o,Z=oe,r(),cloneFiber$1(n.current,o)):(oe=NoWork$2,null)}function a(){for(;null!==ae;){var t=ae.effectTag;if(t&ContentReset&&e.resetTextContent(ae.stateNode),t&Ref){var n=ae.alternate;null!==n&&K(n)}var r=t&~(Callback|Err|ContentReset|Ref);switch(r){case Placement$1:B(ae),ae.effectTag&=~Placement$1;break;case PlacementAndUpdate:B(ae),ae.effectTag&=~Placement$1;var o=ae.alternate;V(o,ae);break;case Update:var a=ae.alternate;V(a,ae);break;case Deletion:he=!0,W(ae),he=!1}ae=ae.nextEffect}}function i(){for(;null!==ae;){var e=ae.effectTag;if(e&(Update|Callback)){var t=ae.alternate;j(t,ae)}e&Ref&&Y(ae),e&Err&&y(ae);var n=ae.nextEffect;ae.nextEffect=null,ae=n}}function l(e){ge=!0,ie=null;var t=e.stateNode;invariant(t.current!==e,"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."),ReactCurrentOwnerRollupShim.current=null;var n=Z;Z=TaskPriority$1;var r=void 0;e.effectTag!==NoEffect$2?null!==e.lastEffect?(e.lastEffect.nextEffect=e,r=e.firstEffect):r=e:r=e.firstEffect;var o=G();for(ae=r;null!==ae;){var l=null;try{a(e)}catch(e){l=e}null!==l&&(invariant(null!==ae,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),h(ae,l),null!==ae&&(ae=ae.nextEffect))}for(X(o),t.current=e,ae=r;null!==ae;){var s=null;try{i(e)}catch(e){s=e}null!==s&&(invariant(null!==ae,"Should have next effect. This error is likely caused by a bug in React. Please file an issue."),h(ae,s),null!==ae&&(ae=ae.nextEffect))}ge=!1,"function"==typeof onCommitRoot&&onCommitRoot(e.stateNode),fe&&(fe.forEach(_),fe=null),Z=n}function s(e){var t=NoWork$2,n=e.updateQueue,r=e.tag;null===n||r!==ClassComponent$4&&r!==HostRoot$5||(t=getPendingPriority$1(n));for(var o=e.progressedChild;null!==o;)o.pendingWorkPriority!==NoWork$2&&(t===NoWork$2||t>o.pendingWorkPriority)&&(t=o.pendingWorkPriority),o=o.sibling;e.pendingWorkPriority=t}function u(e){for(;;){var t=e.alternate,n=L(t,e),r=e.return,o=e.sibling;if(s(e),null!==n)return n;if(null!==r&&(null===r.firstEffect&&(r.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==r.lastEffect&&(r.lastEffect.nextEffect=e.firstEffect),r.lastEffect=e.lastEffect),e.effectTag!==NoEffect$2&&(null!==r.lastEffect?r.lastEffect.nextEffect=e:r.firstEffect=e,r.lastEffect=e)),null!==o)return o;if(null===r)return oeTaskPriority$1)for(;null!==re&&!te;)t.timeRemaining()>timeHeuristicForUnitOfWork?(re=c(re),null===re&&null!==ie&&(t.timeRemaining()>timeHeuristicForUnitOfWork?(l(ie),re=o(),m()):te=!0)):te=!0;else for(;null!==re&&oe!==NoWork$2&&oe<=e;)re=c(re),null===re&&(re=o(),m());n&&console.timeEnd(n)}function g(e,r){invariant(!ee,"performWork was called recursively. This error is likely caused by a bug in React. Please file an issue."),ee=!0;for(var o=!!r;e!==NoWork$2&&!ve;){invariant(null!==r||er)&&(a=!0,o.pendingWorkPriority=r),null!==o.alternate&&(o.alternate.pendingWorkPriority===NoWork$2||o.alternate.pendingWorkPriority>r)&&(a=!0,o.alternate.pendingWorkPriority=r),null===o.return){if(o.tag!==HostRoot$5)return;var i=o.stateNode;switch(P(i,r),r){case SynchronousPriority$1:return void g(SynchronousPriority$1,null);case TaskPriority$1:return;case AnimationPriority:return void t(f);case HighPriority:case LowPriority:case OffscreenPriority:return void n(d)}}o=o.return}}function R(){return Z===SynchronousPriority$1&&(ee||ne)?TaskPriority$1:Z}function _(e){T(e,TaskPriority$1)}function S(e,t){var n=Z;Z=e;try{t()}finally{Z=n}}function O(e,t){var n=ne;ne=!0;try{return e(t)}finally{ne=n,ee||ne||g(TaskPriority$1,null)}}function k(e){var t=ne;ne=!1;try{return e()}finally{ne=t}}function F(e){var t=Z;Z=SynchronousPriority$1;try{return e()}finally{Z=t}}function I(e){var t=Z;Z=LowPriority;try{return e()}finally{Z=t}}var x=ReactFiberHostContext(e),N=x.popHostContainer,M=x.popHostContext,A=x.resetHostContainer,D=ReactFiberBeginWork(e,x,T,R),U=D.beginWork,$=D.beginFailedWork,w=ReactFiberCompleteWork(e,x),L=w.completeWork,H=ReactFiberCommitWork(e,h),B=H.commitPlacement,W=H.commitDeletion,V=H.commitWork,j=H.commitLifeCycles,Y=H.commitAttachRef,K=H.commitDetachRef,z=e.scheduleAnimationCallback,Q=e.scheduleDeferredCallback,q=e.useSyncScheduling,G=e.prepareForCommit,X=e.resetAfterCommit,Z=q?SynchronousPriority$1:LowPriority,J=NoWork$2,ee=!1,te=!1,ne=!1,re=null,oe=NoWork$2,ae=null,ie=null,le=null,se=null,ue=!1,ce=!1,pe=null,de=null,fe=null,me=null,ve=null,ge=!1,he=!1;return{scheduleUpdate:T,getPriorityContext:R,performWithPriority:S,batchedUpdates:O,unbatchedUpdates:k,syncUpdates:F,deferredUpdates:I}},getContextFiber=function(e){invariant(!1,"Missing injection for fiber getContextForSubtree")};getContextForSubtree._injectFiber=function(e){getContextFiber=e};var getContextForSubtree_1=getContextForSubtree,addTopLevelUpdate=ReactFiberUpdateQueue.addTopLevelUpdate,findCurrentUnmaskedContext=ReactFiberContext.findCurrentUnmaskedContext,isContextProvider=ReactFiberContext.isContextProvider,processChildContext=ReactFiberContext.processChildContext,createFiberRoot=ReactFiberRoot.createFiberRoot,findCurrentHostFiber=ReactFiberTreeReflection.findCurrentHostFiber;getContextForSubtree_1._injectFiber(function(e){var t=findCurrentUnmaskedContext(e);return isContextProvider(e)?processChildContext(e,t,!1):t});var ReactFiberReconciler=function(e){function t(e,t,n){var a=o(),i={element:t};n=void 0===n?null:n,addTopLevelUpdate(e,i,n,a),r(e,a)}var n=ReactFiberScheduler(e),r=n.scheduleUpdate,o=n.getPriorityContext,a=n.performWithPriority,i=n.batchedUpdates,l=n.unbatchedUpdates,s=n.syncUpdates,u=n.deferredUpdates;return{createContainer:function(e){return createFiberRoot(e)},updateContainer:function(e,n,r,o){var a=n.current,i=getContextForSubtree_1(r);null===n.context?n.context=i:n.pendingContext=i,t(a,e,o)},performWithPriority:a,batchedUpdates:i,unbatchedUpdates:l,syncUpdates:s,deferredUpdates:u,getPublicRootInstance:function(e){var t=e.current;return t.child?t.child.stateNode:null},findHostInstance:function(e){var t=findCurrentHostFiber(e);return null===t?null:t.stateNode}}},findFiber=function(e){invariant(!1,"Missing injection for fiber findDOMNode")},findStack=function(e){invariant(!1,"Missing injection for stack findDOMNode")},findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=ReactInstanceMap_1.get(e);return t?"number"==typeof t.tag?findFiber(t):findStack(t):void("function"==typeof e.render?invariant(!1,"Unable to find node on an unmounted component."):invariant(!1,"Element appears to be neither ReactComponent nor DOMNode. Keys: %s",Object.keys(e)))};findDOMNode._injectFiber=function(e){findFiber=e},findDOMNode._injectStack=function(e){findStack=e};var findDOMNode_1=findDOMNode,isValidElement=React.isValidElement,injectInternals=ReactFiberDevToolsHook.injectInternals,createElement=ReactDOMFiberComponent_1.createElement,getChildNamespace=ReactDOMFiberComponent_1.getChildNamespace,setInitialProperties=ReactDOMFiberComponent_1.setInitialProperties,diffProperties=ReactDOMFiberComponent_1.diffProperties,updateProperties=ReactDOMFiberComponent_1.updateProperties,precacheFiberNode=ReactDOMComponentTree_1.precacheFiberNode,updateFiberProps=ReactDOMComponentTree_1.updateFiberProps,DOCUMENT_NODE=9;ReactDOMInjection.inject(),ReactControlledComponent_1.injection.injectFiberControlledHostComponent(ReactDOMFiberComponent_1),findDOMNode_1._injectFiber(function(e){return DOMRenderer.findHostInstance(e)});var eventsEnabled=null,selectionInformation=null,ELEMENT_NODE_TYPE=1,DOC_NODE_TYPE=9,DOCUMENT_FRAGMENT_NODE_TYPE=11,DOMRenderer=ReactFiberReconciler({getRootHostContext:function(e){var t=e.namespaceURI||null,n=e.tagName,r=getChildNamespace(t,n);return r},getChildHostContext:function(e,t){var n=e;return getChildNamespace(n,t)},getPublicInstance:function(e){return e},prepareForCommit:function(){eventsEnabled=ReactBrowserEventEmitter_1.isEnabled(),selectionInformation=ReactInputSelection_1.getSelectionInformation(),ReactBrowserEventEmitter_1.setEnabled(!1)},resetAfterCommit:function(){ReactInputSelection_1.restoreSelection(selectionInformation),selectionInformation=null,ReactBrowserEventEmitter_1.setEnabled(eventsEnabled),eventsEnabled=null},createInstance:function(e,t,n,r,o){var a=void 0;a=r;var i=createElement(e,t,n,a);return precacheFiberNode(o,i),updateFiberProps(i,t),i},appendInitialChild:function(e,t){e.appendChild(t)},finalizeInitialChildren:function(e,t,n,r){return setInitialProperties(e,t,n,r),shouldAutoFocusHostComponent(t,n)},prepareUpdate:function(e,t,n,r,o,a){return diffProperties(e,t,n,r,o)},commitMount:function(e,t,n,r){e.focus()},commitUpdate:function(e,t,n,r,o,a){updateFiberProps(e,o),updateProperties(e,t,n,r,o)},shouldSetTextContent:function(e){return"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&"string"==typeof e.dangerouslySetInnerHTML.__html},resetTextContent:function(e){e.textContent=""},shouldDeprioritizeSubtree:function(e,t){return!!t.hidden},createTextInstance:function(e,t,n,r){var o=document.createTextNode(e);return precacheFiberNode(r,o),o},commitTextUpdate:function(e,t,n){e.nodeValue=n},appendChild:function(e,t){e.appendChild(t)},insertBefore:function(e,t,n){
+e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},scheduleAnimationCallback:ReactDOMFrameScheduling.rAF,scheduleDeferredCallback:ReactDOMFrameScheduling.rIC,useSyncScheduling:!ReactDOMFeatureFlags_1.fiberAsyncScheduling});ReactGenericBatching_1.injection.injectFiberBatchedUpdates(DOMRenderer.batchedUpdates);var warned=!1,ReactDOM={render:function(e,t,n){return validateContainer(t),ReactFeatureFlags_1.disableNewFiberFeatures&&(isValidElement(e)||("string"==typeof e?invariant(!1,"ReactDOM.render(): Invalid component element. Instead of passing a string like 'div', pass React.createElement('div') or ."):"function"==typeof e?invariant(!1,"ReactDOM.render(): Invalid component element. Instead of passing a class like Foo, pass React.createElement(Foo) or ."):null!=e&&"undefined"!=typeof e.props?invariant(!1,"ReactDOM.render(): Invalid component element. This may be caused by unintentionally loading two independent copies of React."):invariant(!1,"ReactDOM.render(): Invalid component element."))),renderSubtreeIntoContainer(null,e,t,n)},unstable_renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&ReactInstanceMap_1.has(e)?void 0:reactProdInvariant_1("38"),renderSubtreeIntoContainer(e,t,n,r)},unmountComponentAtNode:function(e){if(isValidContainer(e)?void 0:reactProdInvariant_1("40"),warnAboutUnstableUse(),e._reactRootContainer)return DOMRenderer.unbatchedUpdates(function(){return renderSubtreeIntoContainer(null,null,e,function(){e._reactRootContainer=null})})},findDOMNode:findDOMNode_1,unstable_createPortal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return ReactPortal.createPortal(e,t,null,n)},unstable_batchedUpdates:ReactGenericBatching_1.batchedUpdates,unstable_deferredUpdates:DOMRenderer.deferredUpdates};"function"==typeof injectInternals&&injectInternals({findFiberByHostInstance:ReactDOMComponentTree_1.getClosestInstanceFromNode,findHostInstanceByFiber:DOMRenderer.findHostInstance});var ReactDOMFiber=ReactDOM;module.exports=ReactDOMFiber;
+
+},{"fbjs/lib/EventListener":8,"fbjs/lib/ExecutionEnvironment":9,"fbjs/lib/camelizeStyleName":11,"fbjs/lib/containsNode":12,"fbjs/lib/emptyFunction":13,"fbjs/lib/emptyObject":14,"fbjs/lib/focusNode":15,"fbjs/lib/getActiveElement":16,"fbjs/lib/getUnboundedScrollPosition":17,"fbjs/lib/hyphenateStyleName":19,"fbjs/lib/invariant":20,"fbjs/lib/memoizeStringOnly":23,"fbjs/lib/performanceNow":25,"fbjs/lib/shallowEqual":26,"fbjs/lib/warning":27,"object-assign":28,"react":4}],4:[function(require,module,exports){
+'use strict';
+
+if ("production" === 'production') {
+ module.exports = require('./react.node-prod.min.js');
+} else {
+ module.exports = require('./react.node-dev.js');
+}
+
+},{"./react.node-dev.js":5,"./react.node-prod.min.js":6}],5:[function(require,module,exports){
+'use strict';
+
+var _assign = require('object-assign');
+var warning = require('fbjs/lib/warning');
+var emptyObject = require('fbjs/lib/emptyObject');
+var invariant = require('fbjs/lib/invariant');
+var emptyFunction = require('fbjs/lib/emptyFunction');
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule reactProdInvariant
+ *
+ */
+
+function warnNoop(publicInstance, callerName) {
+ {
+ var constructor = publicInstance.constructor;
+ warning(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, constructor && (constructor.displayName || constructor.name) || 'ReactClass');
+ }
+}
+
+/**
+ * This is the abstract API for an update queue.
+ */
+var ReactNoopUpdateQueue = {
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @param {ReactClass} publicInstance The instance we want to test.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function (publicInstance) {
+ return false;
+ },
+
+ /**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} Name of the calling function in the public API.
+ * @internal
+ */
+ enqueueForceUpdate: function (publicInstance, callback, callerName) {
+ warnNoop(publicInstance, 'forceUpdate');
+ },
+
+ /**
+ * Replaces all of the state. Always use this or `setState` to mutate state.
+ * You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} completeState Next state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} Name of the calling function in the public API.
+ * @internal
+ */
+ enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
+ warnNoop(publicInstance, 'replaceState');
+ },
+
+ /**
+ * Sets a subset of the state. This only exists because _pendingState is
+ * internal. This provides a merging strategy that is not available to deep
+ * properties which is confusing. TODO: Expose pendingState or don't use it
+ * during the merge.
+ *
+ * @param {ReactClass} publicInstance The instance that should rerender.
+ * @param {object} partialState Next partial state to be merged with state.
+ * @param {?function} callback Called after component is updated.
+ * @param {?string} Name of the calling function in the public API.
+ * @internal
+ */
+ enqueueSetState: function (publicInstance, partialState, callback, callerName) {
+ warnNoop(publicInstance, 'setState');
+ }
+};
+
+var ReactNoopUpdateQueue_1 = ReactNoopUpdateQueue;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ * @providesModule canDefineProperty
+ */
+
+var canDefineProperty = false;
+{
+ try {
+ // $FlowFixMe https://github.com/facebook/flow/issues/285
+ Object.defineProperty({}, 'x', { get: function () {} });
+ canDefineProperty = true;
+ } catch (x) {
+ // IE will fail on defineProperty
+ }
+}
+
+var canDefineProperty_1 = canDefineProperty;
+
+/**
+ * Base class helpers for the updating state of a component.
+ */
+function ReactComponent(props, context, updater) {
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ // We initialize the default updater but the real one gets injected by the
+ // renderer.
+ this.updater = updater || ReactNoopUpdateQueue_1;
+}
+
+ReactComponent.prototype.isReactComponent = {};
+
+/**
+ * Sets a subset of the state. Always use this to mutate
+ * state. You should treat `this.state` as immutable.
+ *
+ * There is no guarantee that `this.state` will be immediately updated, so
+ * accessing `this.state` after calling this method may return the old value.
+ *
+ * There is no guarantee that calls to `setState` will run synchronously,
+ * as they may eventually be batched together. You can provide an optional
+ * callback that will be executed when the call to setState is actually
+ * completed.
+ *
+ * When a function is provided to setState, it will be called at some point in
+ * the future (not synchronously). It will be called with the up to date
+ * component arguments (state, props, context). These values can be different
+ * from this.* because your function may be called after receiveProps but before
+ * shouldComponentUpdate, and this new state, props, and context will not yet be
+ * assigned to this.
+ *
+ * @param {object|function} partialState Next partial state or function to
+ * produce next partial state to be merged with current state.
+ * @param {?function} callback Called after state is updated.
+ * @final
+ * @protected
+ */
+ReactComponent.prototype.setState = function (partialState, callback) {
+ !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
+ this.updater.enqueueSetState(this, partialState, callback, 'setState');
+};
+
+/**
+ * Forces an update. This should only be invoked when it is known with
+ * certainty that we are **not** in a DOM transaction.
+ *
+ * You may want to call this when you know that some deeper aspect of the
+ * component's state has changed but `setState` was not called.
+ *
+ * This will not invoke `shouldComponentUpdate`, but it will invoke
+ * `componentWillUpdate` and `componentDidUpdate`.
+ *
+ * @param {?function} callback Called after update is complete.
+ * @final
+ * @protected
+ */
+ReactComponent.prototype.forceUpdate = function (callback) {
+ this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
+};
+
+/**
+ * Deprecated APIs. These APIs used to exist on classic React classes but since
+ * we would like to deprecate them, we're not going to move them over to this
+ * modern base class. Instead, we define a getter that warns if it's accessed.
+ */
+{
+ var deprecatedAPIs = {
+ isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
+ replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
+ };
+ var defineDeprecationWarning = function (methodName, info) {
+ if (canDefineProperty_1) {
+ Object.defineProperty(ReactComponent.prototype, methodName, {
+ get: function () {
+ warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
+ return undefined;
+ }
+ });
+ }
+ };
+ for (var fnName in deprecatedAPIs) {
+ if (deprecatedAPIs.hasOwnProperty(fnName)) {
+ defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
+ }
+ }
+}
+
+/**
+ * Base class helpers for the updating state of a component.
+ */
+function ReactPureComponent(props, context, updater) {
+ // Duplicated from ReactComponent.
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ // We initialize the default updater but the real one gets injected by the
+ // renderer.
+ this.updater = updater || ReactNoopUpdateQueue_1;
+}
+
+function ComponentDummy() {}
+ComponentDummy.prototype = ReactComponent.prototype;
+ReactPureComponent.prototype = new ComponentDummy();
+ReactPureComponent.prototype.constructor = ReactPureComponent;
+// Avoid an extra prototype jump for these methods.
+_assign(ReactPureComponent.prototype, ReactComponent.prototype);
+ReactPureComponent.prototype.isPureReactComponent = true;
+
+var ReactBaseClasses = {
+ Component: ReactComponent,
+ PureComponent: ReactPureComponent
+};
+
+/**
+ * Static poolers. Several custom versions for each potential number of
+ * arguments. A completely generic pooler is easy to implement, but would
+ * require accessing the `arguments` object. In each of these, `this` refers to
+ * the Class itself, not an instance. If any others are needed, simply add them
+ * here, or in their own files.
+ */
+var oneArgumentPooler = function (copyFieldsFrom) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, copyFieldsFrom);
+ return instance;
+ } else {
+ return new Klass(copyFieldsFrom);
+ }
+};
+
+var twoArgumentPooler$1 = function (a1, a2) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2);
+ return instance;
+ } else {
+ return new Klass(a1, a2);
+ }
+};
+
+var threeArgumentPooler = function (a1, a2, a3) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3);
+ }
+};
+
+var fourArgumentPooler$1 = function (a1, a2, a3, a4) {
+ var Klass = this;
+ if (Klass.instancePool.length) {
+ var instance = Klass.instancePool.pop();
+ Klass.call(instance, a1, a2, a3, a4);
+ return instance;
+ } else {
+ return new Klass(a1, a2, a3, a4);
+ }
+};
+
+var standardReleaser = function (instance) {
+ var Klass = this;
+ !(instance instanceof Klass) ? invariant(false, 'Trying to release an instance into a pool of a different type.') : void 0;
+ instance.destructor();
+ if (Klass.instancePool.length < Klass.poolSize) {
+ Klass.instancePool.push(instance);
+ }
+};
+
+var DEFAULT_POOL_SIZE = 10;
+var DEFAULT_POOLER = oneArgumentPooler;
+
+/**
+ * Augments `CopyConstructor` to be a poolable class, augmenting only the class
+ * itself (statically) not adding any prototypical fields. Any CopyConstructor
+ * you give this may have a `poolSize` property, and will look for a
+ * prototypical `destructor` on instances.
+ *
+ * @param {Function} CopyConstructor Constructor that can be used to reset.
+ * @param {Function} pooler Customizable pooler.
+ */
+var addPoolingTo = function (CopyConstructor, pooler) {
+ // Casting as any so that flow ignores the actual implementation and trusts
+ // it to match the type we declared
+ var NewKlass = CopyConstructor;
+ NewKlass.instancePool = [];
+ NewKlass.getPooled = pooler || DEFAULT_POOLER;
+ if (!NewKlass.poolSize) {
+ NewKlass.poolSize = DEFAULT_POOL_SIZE;
+ }
+ NewKlass.release = standardReleaser;
+ return NewKlass;
+};
+
+var PooledClass = {
+ addPoolingTo: addPoolingTo,
+ oneArgumentPooler: oneArgumentPooler,
+ twoArgumentPooler: twoArgumentPooler$1,
+ threeArgumentPooler: threeArgumentPooler,
+ fourArgumentPooler: fourArgumentPooler$1
+};
+
+var PooledClass_1 = PooledClass;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactCurrentOwner
+ *
+ */
+
+/**
+ * Keeps track of the current owner.
+ *
+ * The current owner is the component who should own any components that are
+ * currently being constructed.
+ */
+var ReactCurrentOwner = {
+ /**
+ * @internal
+ * @type {ReactComponent}
+ */
+ current: null
+};
+
+var ReactCurrentOwner_1 = ReactCurrentOwner;
+
+/**
+ * Copyright 2014-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactElementSymbol
+ *
+ */
+
+// The Symbol used to tag the ReactElement type. If there is no native Symbol
+// nor polyfill, then a plain number is used for performance.
+
+var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
+
+var ReactElementSymbol = REACT_ELEMENT_TYPE;
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+
+
+var RESERVED_PROPS = {
+ key: true,
+ ref: true,
+ __self: true,
+ __source: true
+};
+
+var specialPropKeyWarningShown;
+var specialPropRefWarningShown;
+
+function hasValidRef(config) {
+ {
+ if (hasOwnProperty.call(config, 'ref')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.ref !== undefined;
+}
+
+function hasValidKey(config) {
+ {
+ if (hasOwnProperty.call(config, 'key')) {
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
+ if (getter && getter.isReactWarning) {
+ return false;
+ }
+ }
+ }
+ return config.key !== undefined;
+}
+
+function defineKeyPropWarningGetter(props, displayName) {
+ var warnAboutAccessingKey = function () {
+ if (!specialPropKeyWarningShown) {
+ specialPropKeyWarningShown = true;
+ warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
+ }
+ };
+ warnAboutAccessingKey.isReactWarning = true;
+ Object.defineProperty(props, 'key', {
+ get: warnAboutAccessingKey,
+ configurable: true
+ });
+}
+
+function defineRefPropWarningGetter(props, displayName) {
+ var warnAboutAccessingRef = function () {
+ if (!specialPropRefWarningShown) {
+ specialPropRefWarningShown = true;
+ warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
+ }
+ };
+ warnAboutAccessingRef.isReactWarning = true;
+ Object.defineProperty(props, 'ref', {
+ get: warnAboutAccessingRef,
+ configurable: true
+ });
+}
+
+/**
+ * Factory method to create a new React element. This no longer adheres to
+ * the class pattern, so do not use new to call it. Also, no instanceof check
+ * will work. Instead test $$typeof field against Symbol.for('react.element') to check
+ * if something is a React Element.
+ *
+ * @param {*} type
+ * @param {*} key
+ * @param {string|object} ref
+ * @param {*} self A *temporary* helper to detect places where `this` is
+ * different from the `owner` when React.createElement is called, so that we
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
+ * functions, and as long as `this` and owner are the same, there will be no
+ * change in behavior.
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
+ * indicating filename, line number, and/or other information.
+ * @param {*} owner
+ * @param {*} props
+ * @internal
+ */
+var ReactElement = function (type, key, ref, self, source, owner, props) {
+ var element = {
+ // This tag allow us to uniquely identify this as a React Element
+ $$typeof: ReactElementSymbol,
+
+ // Built-in properties that belong on the element
+ type: type,
+ key: key,
+ ref: ref,
+ props: props,
+
+ // Record the component responsible for creating this element.
+ _owner: owner
+ };
+
+ {
+ // The validation flag is currently mutative. We put it on
+ // an external backing store so that we can freeze the whole object.
+ // This can be replaced with a WeakMap once they are implemented in
+ // commonly used development environments.
+ element._store = {};
+
+ // To make comparing ReactElements easier for testing purposes, we make
+ // the validation flag non-enumerable (where possible, which should
+ // include every environment we run tests in), so the test framework
+ // ignores it.
+ if (canDefineProperty_1) {
+ Object.defineProperty(element._store, 'validated', {
+ configurable: false,
+ enumerable: false,
+ writable: true,
+ value: false
+ });
+ // self and source are DEV only properties.
+ Object.defineProperty(element, '_self', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: self
+ });
+ // Two elements created in two different places should be considered
+ // equal for testing purposes and therefore we hide it from enumeration.
+ Object.defineProperty(element, '_source', {
+ configurable: false,
+ enumerable: false,
+ writable: false,
+ value: source
+ });
+ } else {
+ element._store.validated = false;
+ element._self = self;
+ element._source = source;
+ }
+ if (Object.freeze) {
+ Object.freeze(element.props);
+ Object.freeze(element);
+ }
+ }
+
+ return element;
+};
+
+/**
+ * Create and return a new ReactElement of the given type.
+ * See https://facebook.github.io/react/docs/react-api.html#createelement
+ */
+ReactElement.createElement = function (type, config, children) {
+ var propName;
+
+ // Reserved names are extracted
+ var props = {};
+
+ var key = null;
+ var ref = null;
+ var self = null;
+ var source = null;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ ref = config.ref;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ self = config.__self === undefined ? null : config.__self;
+ source = config.__source === undefined ? null : config.__source;
+ // Remaining properties are added to a new props object
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ props[propName] = config[propName];
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ {
+ if (Object.freeze) {
+ Object.freeze(childArray);
+ }
+ }
+ props.children = childArray;
+ }
+
+ // Resolve default props
+ if (type && type.defaultProps) {
+ var defaultProps = type.defaultProps;
+ for (propName in defaultProps) {
+ if (props[propName] === undefined) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ }
+ {
+ if (key || ref) {
+ if (typeof props.$$typeof === 'undefined' || props.$$typeof !== ReactElementSymbol) {
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
+ if (key) {
+ defineKeyPropWarningGetter(props, displayName);
+ }
+ if (ref) {
+ defineRefPropWarningGetter(props, displayName);
+ }
+ }
+ }
+ }
+ return ReactElement(type, key, ref, self, source, ReactCurrentOwner_1.current, props);
+};
+
+/**
+ * Return a function that produces ReactElements of a given type.
+ * See https://facebook.github.io/react/docs/react-api.html#createfactory
+ */
+ReactElement.createFactory = function (type) {
+ var factory = ReactElement.createElement.bind(null, type);
+ // Expose the type on the factory and the prototype so that it can be
+ // easily accessed on elements. E.g. `.type === Foo`.
+ // This should not be named `constructor` since this may not be the function
+ // that created the element, and it may not even be a constructor.
+ // Legacy hook TODO: Warn if this is accessed
+ factory.type = type;
+ return factory;
+};
+
+ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
+ var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
+
+ return newElement;
+};
+
+/**
+ * Clone and return a new ReactElement using element as the starting point.
+ * See https://facebook.github.io/react/docs/react-api.html#cloneelement
+ */
+ReactElement.cloneElement = function (element, config, children) {
+ var propName;
+
+ // Original props are copied
+ var props = _assign({}, element.props);
+
+ // Reserved names are extracted
+ var key = element.key;
+ var ref = element.ref;
+ // Self is preserved since the owner is preserved.
+ var self = element._self;
+ // Source is preserved since cloneElement is unlikely to be targeted by a
+ // transpiler, and the original source is probably a better indicator of the
+ // true owner.
+ var source = element._source;
+
+ // Owner will be preserved, unless ref is overridden
+ var owner = element._owner;
+
+ if (config != null) {
+ if (hasValidRef(config)) {
+ // Silently steal the ref from the parent.
+ ref = config.ref;
+ owner = ReactCurrentOwner_1.current;
+ }
+ if (hasValidKey(config)) {
+ key = '' + config.key;
+ }
+
+ // Remaining properties override existing props
+ var defaultProps;
+ if (element.type && element.type.defaultProps) {
+ defaultProps = element.type.defaultProps;
+ }
+ for (propName in config) {
+ if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
+ if (config[propName] === undefined && defaultProps !== undefined) {
+ // Resolve default props
+ props[propName] = defaultProps[propName];
+ } else {
+ props[propName] = config[propName];
+ }
+ }
+ }
+ }
+
+ // Children can be more than one argument, and those are transferred onto
+ // the newly allocated props object.
+ var childrenLength = arguments.length - 2;
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = Array(childrenLength);
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 2];
+ }
+ props.children = childArray;
+ }
+
+ return ReactElement(element.type, key, ref, self, source, owner, props);
+};
+
+/**
+ * Verifies the object is a ReactElement.
+ * See https://facebook.github.io/react/docs/react-api.html#isvalidelement
+ * @param {?object} object
+ * @return {boolean} True if `object` is a valid component.
+ * @final
+ */
+ReactElement.isValidElement = function (object) {
+ return typeof object === 'object' && object !== null && object.$$typeof === ReactElementSymbol;
+};
+
+var ReactElement_1 = ReactElement;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule getIteratorFn
+ *
+ */
+
+/* global Symbol */
+
+var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
+var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
+
+/**
+ * Returns the iterator method function contained on the iterable object.
+ *
+ * Be sure to invoke the function with the iterable as context:
+ *
+ * var iteratorFn = getIteratorFn(myIterable);
+ * if (iteratorFn) {
+ * var iterator = iteratorFn.call(myIterable);
+ * ...
+ * }
+ *
+ * @param {?object} maybeIterable
+ * @return {?function}
+ */
+function getIteratorFn(maybeIterable) {
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
+ if (typeof iteratorFn === 'function') {
+ return iteratorFn;
+ }
+}
+
+var getIteratorFn_1 = getIteratorFn;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule KeyEscapeUtils
+ *
+ */
+
+/**
+ * Escape and wrap key so it is safe to use as a reactid
+ *
+ * @param {string} key to be escaped.
+ * @return {string} the escaped key.
+ */
+
+function escape(key) {
+ var escapeRegex = /[=:]/g;
+ var escaperLookup = {
+ '=': '=0',
+ ':': '=2'
+ };
+ var escapedString = ('' + key).replace(escapeRegex, function (match) {
+ return escaperLookup[match];
+ });
+
+ return '$' + escapedString;
+}
+
+/**
+ * Unescape and unwrap key for human-readable display
+ *
+ * @param {string} key to unescape.
+ * @return {string} the unescaped key.
+ */
+function unescape(key) {
+ var unescapeRegex = /(=0|=2)/g;
+ var unescaperLookup = {
+ '=0': '=',
+ '=2': ':'
+ };
+ var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
+
+ return ('' + keySubstring).replace(unescapeRegex, function (match) {
+ return unescaperLookup[match];
+ });
+}
+
+var KeyEscapeUtils = {
+ escape: escape,
+ unescape: unescape
+};
+
+var KeyEscapeUtils_1 = KeyEscapeUtils;
+
+var SEPARATOR = '.';
+var SUBSEPARATOR = ':';
+
+/**
+ * This is inlined from ReactElement since this file is shared between
+ * isomorphic and renderers. We could extract this to a
+ *
+ */
+
+/**
+ * TODO: Test that a single child and an array with one item have the same key
+ * pattern.
+ */
+
+var didWarnAboutMaps = false;
+
+/**
+ * Generate a key string that identifies a component within a set.
+ *
+ * @param {*} component A component that could contain a manual key.
+ * @param {number} index Index that is used if a manual key is not provided.
+ * @return {string}
+ */
+function getComponentKey(component, index) {
+ // Do some typechecking here since we call this blindly. We want to ensure
+ // that we don't block potential future ES APIs.
+ if (component && typeof component === 'object' && component.key != null) {
+ // Explicit key
+ return KeyEscapeUtils_1.escape(component.key);
+ }
+ // Implicit key determined by the index in the set
+ return index.toString(36);
+}
+
+/**
+ * @param {?*} children Children tree container.
+ * @param {!string} nameSoFar Name of the key path so far.
+ * @param {!function} callback Callback to invoke with each child found.
+ * @param {?*} traverseContext Used to pass information throughout the traversal
+ * process.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
+ var type = typeof children;
+
+ if (type === 'undefined' || type === 'boolean') {
+ // All of the above are perceived as null.
+ children = null;
+ }
+
+ if (children === null || type === 'string' || type === 'number' ||
+ // The following is inlined from ReactElement. This means we can optimize
+ // some checks. React Fiber also inlines this logic for similar purposes.
+ type === 'object' && children.$$typeof === ReactElementSymbol) {
+ callback(traverseContext, children,
+ // If it's the only child, treat the name as if it was wrapped in an array
+ // so that it's consistent if the number of children grows.
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
+ return 1;
+ }
+
+ var child;
+ var nextName;
+ var subtreeCount = 0; // Count of children found in the current subtree.
+ var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
+
+ if (Array.isArray(children)) {
+ for (var i = 0; i < children.length; i++) {
+ child = children[i];
+ nextName = nextNamePrefix + getComponentKey(child, i);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ } else {
+ var iteratorFn = getIteratorFn_1(children);
+ if (iteratorFn) {
+ {
+ // Warn about using Maps as children
+ if (iteratorFn === children.entries) {
+ var mapsAsChildrenAddendum = '';
+ if (ReactCurrentOwner_1.current) {
+ var mapsAsChildrenOwnerName = ReactCurrentOwner_1.current.getName();
+ if (mapsAsChildrenOwnerName) {
+ mapsAsChildrenAddendum = '\n\nCheck the render method of `' + mapsAsChildrenOwnerName + '`.';
+ }
+ }
+ 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', mapsAsChildrenAddendum);
+ didWarnAboutMaps = true;
+ }
+ }
+
+ var iterator = iteratorFn.call(children);
+ var step;
+ var ii = 0;
+ while (!(step = iterator.next()).done) {
+ child = step.value;
+ nextName = nextNamePrefix + getComponentKey(child, ii++);
+ subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
+ }
+ } else if (type === 'object') {
+ var addendum = '';
+ {
+ addendum = ' If you meant to render a collection of children, use an array ' + 'instead.';
+ if (ReactCurrentOwner_1.current) {
+ var name = ReactCurrentOwner_1.current.getName();
+ if (name) {
+ addendum += '\n\nCheck the render method of `' + name + '`.';
+ }
+ }
+ }
+ var childrenString = '' + children;
+ invariant(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
+ }
+ }
+
+ return subtreeCount;
+}
+
+/**
+ * Traverses children that are typically specified as `props.children`, but
+ * might also be specified through attributes:
+ *
+ * - `traverseAllChildren(this.props.children, ...)`
+ * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
+ *
+ * The `traverseContext` is an optional argument that is passed through the
+ * entire traversal. It can be used to store accumulations or anything else that
+ * the callback might find relevant.
+ *
+ * @param {?*} children Children tree object.
+ * @param {!function} callback To invoke upon traversing each child.
+ * @param {?*} traverseContext Context for traversal.
+ * @return {!number} The number of children in this subtree.
+ */
+function traverseAllChildren(children, callback, traverseContext) {
+ if (children == null) {
+ return 0;
+ }
+
+ return traverseAllChildrenImpl(children, '', callback, traverseContext);
+}
+
+var traverseAllChildren_1 = traverseAllChildren;
+
+var twoArgumentPooler = PooledClass_1.twoArgumentPooler;
+var fourArgumentPooler = PooledClass_1.fourArgumentPooler;
+
+var userProvidedKeyEscapeRegex = /\/+/g;
+function escapeUserProvidedKey(text) {
+ return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
+}
+
+/**
+ * PooledClass representing the bookkeeping associated with performing a child
+ * traversal. Allows avoiding binding callbacks.
+ *
+ * @constructor ForEachBookKeeping
+ * @param {!function} forEachFunction Function to perform traversal with.
+ * @param {?*} forEachContext Context to perform context with.
+ */
+function ForEachBookKeeping(forEachFunction, forEachContext) {
+ this.func = forEachFunction;
+ this.context = forEachContext;
+ this.count = 0;
+}
+ForEachBookKeeping.prototype.destructor = function () {
+ this.func = null;
+ this.context = null;
+ this.count = 0;
+};
+PooledClass_1.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
+
+function forEachSingleChild(bookKeeping, child, name) {
+ var func = bookKeeping.func,
+ context = bookKeeping.context;
+
+ func.call(context, child, bookKeeping.count++);
+}
+
+/**
+ * Iterates through children that are typically specified as `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.foreach
+ *
+ * The provided forEachFunc(child, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} forEachFunc
+ * @param {*} forEachContext Context for forEachContext.
+ */
+function forEachChildren(children, forEachFunc, forEachContext) {
+ if (children == null) {
+ return children;
+ }
+ var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
+ traverseAllChildren_1(children, forEachSingleChild, traverseContext);
+ ForEachBookKeeping.release(traverseContext);
+}
+
+/**
+ * PooledClass representing the bookkeeping associated with performing a child
+ * mapping. Allows avoiding binding callbacks.
+ *
+ * @constructor MapBookKeeping
+ * @param {!*} mapResult Object containing the ordered map of results.
+ * @param {!function} mapFunction Function to perform mapping with.
+ * @param {?*} mapContext Context to perform mapping with.
+ */
+function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
+ this.result = mapResult;
+ this.keyPrefix = keyPrefix;
+ this.func = mapFunction;
+ this.context = mapContext;
+ this.count = 0;
+}
+MapBookKeeping.prototype.destructor = function () {
+ this.result = null;
+ this.keyPrefix = null;
+ this.func = null;
+ this.context = null;
+ this.count = 0;
+};
+PooledClass_1.addPoolingTo(MapBookKeeping, fourArgumentPooler);
+
+function mapSingleChildIntoContext(bookKeeping, child, childKey) {
+ var result = bookKeeping.result,
+ keyPrefix = bookKeeping.keyPrefix,
+ func = bookKeeping.func,
+ context = bookKeeping.context;
+
+
+ var mappedChild = func.call(context, child, bookKeeping.count++);
+ if (Array.isArray(mappedChild)) {
+ mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
+ } else if (mappedChild != null) {
+ if (ReactElement_1.isValidElement(mappedChild)) {
+ mappedChild = ReactElement_1.cloneAndReplaceKey(mappedChild,
+ // Keep both the (mapped) and old keys if they differ, just as
+ // traverseAllChildren used to do for objects as children
+ keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
+ }
+ result.push(mappedChild);
+ }
+}
+
+function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
+ var escapedPrefix = '';
+ if (prefix != null) {
+ escapedPrefix = escapeUserProvidedKey(prefix) + '/';
+ }
+ var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
+ traverseAllChildren_1(children, mapSingleChildIntoContext, traverseContext);
+ MapBookKeeping.release(traverseContext);
+}
+
+/**
+ * Maps children that are typically specified as `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.map
+ *
+ * The provided mapFunction(child, key, index) will be called for each
+ * leaf child.
+ *
+ * @param {?*} children Children tree container.
+ * @param {function(*, int)} func The map function.
+ * @param {*} context Context for mapFunction.
+ * @return {object} Object containing the ordered map of results.
+ */
+function mapChildren(children, func, context) {
+ if (children == null) {
+ return children;
+ }
+ var result = [];
+ mapIntoWithKeyPrefixInternal(children, result, null, func, context);
+ return result;
+}
+
+function forEachSingleChildDummy(traverseContext, child, name) {
+ return null;
+}
+
+/**
+ * Count the number of children that are typically specified as
+ * `props.children`.
+ *
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.count
+ *
+ * @param {?*} children Children tree container.
+ * @return {number} The number of children.
+ */
+function countChildren(children, context) {
+ return traverseAllChildren_1(children, forEachSingleChildDummy, null);
+}
+
+/**
+ * Flatten a children object (typically specified as `props.children`) and
+ * return an array with appropriately re-keyed children.
+ *
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.toarray
+ */
+function toArray(children) {
+ var result = [];
+ mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
+ return result;
+}
+
+var ReactChildren = {
+ forEach: forEachChildren,
+ map: mapChildren,
+ mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
+ count: countChildren,
+ toArray: toArray
+};
+
+var ReactChildren_1 = ReactChildren;
+
+var ReactComponent$1 = ReactBaseClasses.Component;
+
+var MIXINS_KEY = 'mixins';
+
+// Helper function to allow the creation of anonymous functions which do not
+// have .name set to the name of the variable being assigned to.
+function identity(fn) {
+ return fn;
+}
+
+/**
+ * Policies that describe methods in `ReactClassInterface`.
+ */
+
+
+/**
+ * Composite components are higher-level components that compose other composite
+ * or host components.
+ *
+ * To create a new type of `ReactClass`, pass a specification of
+ * your new class to `React.createClass`. The only requirement of your class
+ * specification is that you implement a `render` method.
+ *
+ * var MyComponent = React.createClass({
+ * render: function() {
+ * return Hello World
;
+ * }
+ * });
+ *
+ * The class specification supports a specific protocol of methods that have
+ * special meaning (e.g. `render`). See `ReactClassInterface` for
+ * more the comprehensive protocol. Any other properties and methods in the
+ * class specification will be available on the prototype.
+ *
+ * @interface ReactClassInterface
+ * @internal
+ */
+var ReactClassInterface = {
+ /**
+ * An array of Mixin objects to include when defining your component.
+ *
+ * @type {array}
+ * @optional
+ */
+ mixins: 'DEFINE_MANY',
+
+ /**
+ * An object containing properties and methods that should be defined on
+ * the component's constructor instead of its prototype (static methods).
+ *
+ * @type {object}
+ * @optional
+ */
+ statics: 'DEFINE_MANY',
+
+ /**
+ * Definition of prop types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ propTypes: 'DEFINE_MANY',
+
+ /**
+ * Definition of context types for this component.
+ *
+ * @type {object}
+ * @optional
+ */
+ contextTypes: 'DEFINE_MANY',
+
+ /**
+ * Definition of context types this component sets for its children.
+ *
+ * @type {object}
+ * @optional
+ */
+ childContextTypes: 'DEFINE_MANY',
+
+ // ==== Definition methods ====
+
+ /**
+ * Invoked when the component is mounted. Values in the mapping will be set on
+ * `this.props` if that prop is not specified (i.e. using an `in` check).
+ *
+ * This method is invoked before `getInitialState` and therefore cannot rely
+ * on `this.state` or use `this.setState`.
+ *
+ * @return {object}
+ * @optional
+ */
+ getDefaultProps: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Invoked once before the component is mounted. The return value will be used
+ * as the initial value of `this.state`.
+ *
+ * getInitialState: function() {
+ * return {
+ * isOn: false,
+ * fooBaz: new BazFoo()
+ * }
+ * }
+ *
+ * @return {object}
+ * @optional
+ */
+ getInitialState: 'DEFINE_MANY_MERGED',
+
+ /**
+ * @return {object}
+ * @optional
+ */
+ getChildContext: 'DEFINE_MANY_MERGED',
+
+ /**
+ * Uses props from `this.props` and state from `this.state` to render the
+ * structure of the component.
+ *
+ * No guarantees are made about when or how often this method is invoked, so
+ * it must not have side effects.
+ *
+ * render: function() {
+ * var name = this.props.name;
+ * return Hello, {name}!
;
+ * }
+ *
+ * @return {ReactComponent}
+ * @required
+ */
+ render: 'DEFINE_ONCE',
+
+ // ==== Delegate methods ====
+
+ /**
+ * Invoked when the component is initially created and about to be mounted.
+ * This may have side effects, but any external subscriptions or data created
+ * by this method must be cleaned up in `componentWillUnmount`.
+ *
+ * @optional
+ */
+ componentWillMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component has been mounted and has a DOM representation.
+ * However, there is no guarantee that the DOM node is in the document.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been mounted (initialized and rendered) for the first time.
+ *
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidMount: 'DEFINE_MANY',
+
+ /**
+ * Invoked before the component receives new props.
+ *
+ * Use this as an opportunity to react to a prop transition by updating the
+ * state using `this.setState`. Current props are accessed via `this.props`.
+ *
+ * componentWillReceiveProps: function(nextProps, nextContext) {
+ * this.setState({
+ * likesIncreasing: nextProps.likeCount > this.props.likeCount
+ * });
+ * }
+ *
+ * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
+ * transition may cause a state change, but the opposite is not true. If you
+ * need it, you are probably looking for `componentWillUpdate`.
+ *
+ * @param {object} nextProps
+ * @optional
+ */
+ componentWillReceiveProps: 'DEFINE_MANY',
+
+ /**
+ * Invoked while deciding if the component should be updated as a result of
+ * receiving new props, state and/or context.
+ *
+ * Use this as an opportunity to `return false` when you're certain that the
+ * transition to the new props/state/context will not require a component
+ * update.
+ *
+ * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
+ * return !equal(nextProps, this.props) ||
+ * !equal(nextState, this.state) ||
+ * !equal(nextContext, this.context);
+ * }
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @return {boolean} True if the component should update.
+ * @optional
+ */
+ shouldComponentUpdate: 'DEFINE_ONCE',
+
+ /**
+ * Invoked when the component is about to update due to a transition from
+ * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
+ * and `nextContext`.
+ *
+ * Use this as an opportunity to perform preparation before an update occurs.
+ *
+ * NOTE: You **cannot** use `this.setState()` in this method.
+ *
+ * @param {object} nextProps
+ * @param {?object} nextState
+ * @param {?object} nextContext
+ * @param {ReactReconcileTransaction} transaction
+ * @optional
+ */
+ componentWillUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component's DOM representation has been updated.
+ *
+ * Use this as an opportunity to operate on the DOM when the component has
+ * been updated.
+ *
+ * @param {object} prevProps
+ * @param {?object} prevState
+ * @param {?object} prevContext
+ * @param {DOMElement} rootNode DOM element representing the component.
+ * @optional
+ */
+ componentDidUpdate: 'DEFINE_MANY',
+
+ /**
+ * Invoked when the component is about to be removed from its parent and have
+ * its DOM representation destroyed.
+ *
+ * Use this as an opportunity to deallocate any external resources.
+ *
+ * NOTE: There is no `componentDidUnmount` since your component will have been
+ * destroyed by that point.
+ *
+ * @optional
+ */
+ componentWillUnmount: 'DEFINE_MANY',
+
+ // ==== Advanced methods ====
+
+ /**
+ * Updates the component's currently mounted DOM representation.
+ *
+ * By default, this implements React's rendering and reconciliation algorithm.
+ * Sophisticated clients may wish to override this.
+ *
+ * @param {ReactReconcileTransaction} transaction
+ * @internal
+ * @overridable
+ */
+ updateComponent: 'OVERRIDE_BASE'
+};
+
+/**
+ * Mapping from class specification keys to special processing functions.
+ *
+ * Although these are declared like instance properties in the specification
+ * when defining classes using `React.createClass`, they are actually static
+ * and are accessible on the constructor instead of the prototype. Despite
+ * being static, they must be defined outside of the "statics" key under
+ * which all other static methods are defined.
+ */
+var RESERVED_SPEC_KEYS = {
+ displayName: function (Constructor, displayName) {
+ Constructor.displayName = displayName;
+ },
+ mixins: function (Constructor, mixins) {
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ mixSpecIntoComponent(Constructor, mixins[i]);
+ }
+ }
+ },
+ childContextTypes: function (Constructor, childContextTypes) {
+ {
+ validateTypeDef(Constructor, childContextTypes, 'child context');
+ }
+ Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
+ },
+ contextTypes: function (Constructor, contextTypes) {
+ {
+ validateTypeDef(Constructor, contextTypes, 'context');
+ }
+ Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
+ },
+ /**
+ * Special case getDefaultProps which should move into statics but requires
+ * automatic merging.
+ */
+ getDefaultProps: function (Constructor, getDefaultProps) {
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
+ } else {
+ Constructor.getDefaultProps = getDefaultProps;
+ }
+ },
+ propTypes: function (Constructor, propTypes) {
+ {
+ validateTypeDef(Constructor, propTypes, 'prop');
+ }
+ Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
+ },
+ statics: function (Constructor, statics) {
+ mixStaticSpecIntoComponent(Constructor, statics);
+ },
+ autobind: function () {} };
+
+function validateTypeDef(Constructor, typeDef, location) {
+ for (var propName in typeDef) {
+ if (typeDef.hasOwnProperty(propName)) {
+ // use a warning instead of an invariant so components
+ // don't show up in prod but only in true
+ warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', location, propName);
+ }
+ }
+}
+
+function validateMethodOverride(isAlreadyDefined, name) {
+ var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
+
+ // Disallow overriding of base class methods unless explicitly allowed.
+ if (ReactClassMixin.hasOwnProperty(name)) {
+ !(specPolicy === 'OVERRIDE_BASE') ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : void 0;
+ }
+
+ // Disallow defining methods more than once unless explicitly allowed.
+ if (isAlreadyDefined) {
+ !(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED') ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : void 0;
+ }
+}
+
+/**
+ * Mixin helper which handles policy validation and reserved
+ * specification keys when building React classes.
+ */
+function mixSpecIntoComponent(Constructor, spec) {
+ if (!spec) {
+ {
+ var typeofSpec = typeof spec;
+ var isMixinValid = typeofSpec === 'object' && spec !== null;
+
+ warning(isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec);
+ }
+
+ return;
+ }
+
+ !(typeof spec !== 'function') ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : void 0;
+ !!ReactElement_1.isValidElement(spec) ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : void 0;
+
+ var proto = Constructor.prototype;
+ var autoBindPairs = proto.__reactAutoBindPairs;
+
+ // By handling mixins before any other properties, we ensure the same
+ // chaining order is applied to methods with DEFINE_MANY policy, whether
+ // mixins are listed before or after these methods in the spec.
+ if (spec.hasOwnProperty(MIXINS_KEY)) {
+ RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
+ }
+
+ for (var name in spec) {
+ if (!spec.hasOwnProperty(name)) {
+ continue;
+ }
+
+ if (name === MIXINS_KEY) {
+ // We have already handled mixins in a special case above.
+ continue;
+ }
+
+ var property = spec[name];
+ var isAlreadyDefined = proto.hasOwnProperty(name);
+ validateMethodOverride(isAlreadyDefined, name);
+
+ if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
+ RESERVED_SPEC_KEYS[name](Constructor, property);
+ } else {
+ // Setup methods on prototype:
+ // The following member methods should not be automatically bound:
+ // 1. Expected ReactClass methods (in the "interface").
+ // 2. Overridden methods (that were mixed in).
+ var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
+ var isFunction = typeof property === 'function';
+ var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
+
+ if (shouldAutoBind) {
+ autoBindPairs.push(name, property);
+ proto[name] = property;
+ } else {
+ if (isAlreadyDefined) {
+ var specPolicy = ReactClassInterface[name];
+
+ // These cases should already be caught by validateMethodOverride.
+ !(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY')) ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : void 0;
+
+ // For methods which are defined more than once, call the existing
+ // methods before calling the new property, merging if appropriate.
+ if (specPolicy === 'DEFINE_MANY_MERGED') {
+ proto[name] = createMergedResultFunction(proto[name], property);
+ } else if (specPolicy === 'DEFINE_MANY') {
+ proto[name] = createChainedFunction(proto[name], property);
+ }
+ } else {
+ proto[name] = property;
+ {
+ // Add verbose displayName to the function, which helps when looking
+ // at profiling tools.
+ if (typeof property === 'function' && spec.displayName) {
+ proto[name].displayName = spec.displayName + '_' + name;
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+function mixStaticSpecIntoComponent(Constructor, statics) {
+ if (!statics) {
+ return;
+ }
+ for (var name in statics) {
+ var property = statics[name];
+ if (!statics.hasOwnProperty(name)) {
+ continue;
+ }
+
+ var isReserved = name in RESERVED_SPEC_KEYS;
+ !!isReserved ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : void 0;
+
+ var isInherited = name in Constructor;
+ !!isInherited ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : void 0;
+ Constructor[name] = property;
+ }
+}
+
+/**
+ * Merge two objects, but throw if both contain the same key.
+ *
+ * @param {object} one The first object, which is mutated.
+ * @param {object} two The second object
+ * @return {object} one after it has been mutated to contain everything in two.
+ */
+function mergeIntoWithNoDuplicateKeys(one, two) {
+ !(one && two && typeof one === 'object' && typeof two === 'object') ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : void 0;
+
+ for (var key in two) {
+ if (two.hasOwnProperty(key)) {
+ !(one[key] === undefined) ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : void 0;
+ one[key] = two[key];
+ }
+ }
+ return one;
+}
+
+/**
+ * Creates a function that invokes two functions and merges their return values.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+function createMergedResultFunction(one, two) {
+ return function mergedResult() {
+ var a = one.apply(this, arguments);
+ var b = two.apply(this, arguments);
+ if (a == null) {
+ return b;
+ } else if (b == null) {
+ return a;
+ }
+ var c = {};
+ mergeIntoWithNoDuplicateKeys(c, a);
+ mergeIntoWithNoDuplicateKeys(c, b);
+ return c;
+ };
+}
+
+/**
+ * Creates a function that invokes two functions and ignores their return vales.
+ *
+ * @param {function} one Function to invoke first.
+ * @param {function} two Function to invoke second.
+ * @return {function} Function that invokes the two argument functions.
+ * @private
+ */
+function createChainedFunction(one, two) {
+ return function chainedFunction() {
+ one.apply(this, arguments);
+ two.apply(this, arguments);
+ };
+}
+
+/**
+ * Binds a method to the component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ * @param {function} method Method to be bound.
+ * @return {function} The bound method.
+ */
+function bindAutoBindMethod(component, method) {
+ var boundMethod = method.bind(component);
+ {
+ boundMethod.__reactBoundContext = component;
+ boundMethod.__reactBoundMethod = method;
+ boundMethod.__reactBoundArguments = null;
+ var componentName = component.constructor.displayName;
+ var _bind = boundMethod.bind;
+ boundMethod.bind = function (newThis) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ // User is trying to bind() an autobound method; we effectively will
+ // ignore the value of "this" that the user is trying to use, so
+ // let's warn.
+ if (newThis !== component && newThis !== null) {
+ warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance.\n\nSee %s', componentName);
+ } else if (!args.length) {
+ warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call.\n\nSee %s', componentName);
+ return boundMethod;
+ }
+ var reboundMethod = _bind.apply(boundMethod, arguments);
+ reboundMethod.__reactBoundContext = component;
+ reboundMethod.__reactBoundMethod = method;
+ reboundMethod.__reactBoundArguments = args;
+ return reboundMethod;
+ };
+ }
+ return boundMethod;
+}
+
+/**
+ * Binds all auto-bound methods in a component.
+ *
+ * @param {object} component Component whose method is going to be bound.
+ */
+function bindAutoBindMethods(component) {
+ var pairs = component.__reactAutoBindPairs;
+ for (var i = 0; i < pairs.length; i += 2) {
+ var autoBindKey = pairs[i];
+ var method = pairs[i + 1];
+ component[autoBindKey] = bindAutoBindMethod(component, method);
+ }
+}
+
+/**
+ * Add more to the ReactClass base class. These are all legacy features and
+ * therefore not already part of the modern ReactComponent.
+ */
+var ReactClassMixin = {
+ /**
+ * TODO: This will be deprecated because state should always keep a consistent
+ * type signature and the only use case for this, is to avoid that.
+ */
+ replaceState: function (newState, callback) {
+ this.updater.enqueueReplaceState(this, newState, callback, 'replaceState');
+ },
+
+ /**
+ * Checks whether or not this composite component is mounted.
+ * @return {boolean} True if mounted, false otherwise.
+ * @protected
+ * @final
+ */
+ isMounted: function () {
+ return this.updater.isMounted(this);
+ }
+};
+
+var ReactClassComponent = function () {};
+_assign(ReactClassComponent.prototype, ReactComponent$1.prototype, ReactClassMixin);
+
+/**
+ * Module for creating composite components.
+ *
+ * @class ReactClass
+ */
+var ReactClass = {
+ /**
+ * Creates a composite component class given a class specification.
+ * See https://facebook.github.io/react/docs/react-api.html#createclass
+ *
+ * @param {object} spec Class specification (which must define `render`).
+ * @return {function} Component constructor function.
+ * @public
+ */
+ createClass: function (spec) {
+ // To keep our warnings more understandable, we'll use a little hack here to
+ // ensure that Constructor.name !== 'Constructor'. This makes sure we don't
+ // unnecessarily identify a class without displayName as 'Constructor'.
+ var Constructor = identity(function (props, context, updater) {
+ // This constructor gets overridden by mocks. The argument is used
+ // by mocks to assert on what gets mounted.
+
+ {
+ warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory');
+ }
+
+ // Wire up auto-binding
+ if (this.__reactAutoBindPairs.length) {
+ bindAutoBindMethods(this);
+ }
+
+ this.props = props;
+ this.context = context;
+ this.refs = emptyObject;
+ this.updater = updater || ReactNoopUpdateQueue_1;
+
+ this.state = null;
+
+ // ReactClasses doesn't have constructors. Instead, they use the
+ // getInitialState and componentWillMount methods for initialization.
+
+ var initialState = this.getInitialState ? this.getInitialState() : null;
+ {
+ // We allow auto-mocks to proceed as if they're returning null.
+ if (initialState === undefined && this.getInitialState._isMockFunction) {
+ // This is probably bad practice. Consider warning here and
+ // deprecating this convenience.
+ initialState = null;
+ }
+ }
+ !(typeof initialState === 'object' && !Array.isArray(initialState)) ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : void 0;
+
+ this.state = initialState;
+ });
+ Constructor.prototype = new ReactClassComponent();
+ Constructor.prototype.constructor = Constructor;
+ Constructor.prototype.__reactAutoBindPairs = [];
+
+ mixSpecIntoComponent(Constructor, spec);
+
+ // Initialize the defaultProps property after all mixins have been merged.
+ if (Constructor.getDefaultProps) {
+ Constructor.defaultProps = Constructor.getDefaultProps();
+ }
+
+ {
+ // This is a tag to indicate that the use of these method names is ok,
+ // since it's used with createClass. If it's not, then it's likely a
+ // mistake so we'll warn you to use the static property, property
+ // initializer or constructor respectively.
+ if (Constructor.getDefaultProps) {
+ Constructor.getDefaultProps.isReactClassApproved = {};
+ }
+ if (Constructor.prototype.getInitialState) {
+ Constructor.prototype.getInitialState.isReactClassApproved = {};
+ }
+ }
+
+ !Constructor.prototype.render ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : void 0;
+
+ {
+ warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component');
+ warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component');
+ }
+
+ // Reduce time spent doing lookups by setting these on the prototype.
+ for (var methodName in ReactClassInterface) {
+ if (!Constructor.prototype[methodName]) {
+ Constructor.prototype[methodName] = null;
+ }
+ }
+
+ return Constructor;
+ }
+};
+
+var ReactClass_1 = ReactClass;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ * @providesModule ReactPropTypesSecret
+ */
+
+var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
+
+var ReactPropTypesSecret_1 = ReactPropTypesSecret;
+
+var loggedTypeFailures = {};
+
+/**
+ * Assert that the values match with the type specs.
+ * Error messages are memorized and will only be shown once.
+ *
+ * @param {object} typeSpecs Map of name to a ReactPropType
+ * @param {object} values Runtime values that need to be type-checked
+ * @param {string} location e.g. "prop", "context", "child context"
+ * @param {string} componentName Name of the component for error messages.
+ * @param {?Function} getStack Returns the component stack.
+ * @private
+ */
+function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
+ {
+ for (var typeSpecName in typeSpecs) {
+ if (typeSpecs.hasOwnProperty(typeSpecName)) {
+ var error;
+ // Prop type validation may throw. In case they do, we don't want to
+ // fail the render phase where it didn't fail before. So we log it.
+ // After these have been cleaned up, we'll let them throw.
+ try {
+ // This is intentionally an invariant that gets caught. It's the same
+ // behavior as without this statement except with a better message.
+ !(typeof typeSpecs[typeSpecName] === 'function') ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.', componentName || 'React class', location, typeSpecName) : void 0;
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret_1);
+ } catch (ex) {
+ error = ex;
+ }
+ 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);
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
+ // Only monitor this failure once because there tends to be a lot of the
+ // same error.
+ loggedTypeFailures[error.message] = true;
+
+ var stack = getStack ? getStack() : '';
+
+ warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
+ }
+ }
+ }
+ }
+}
+
+var checkPropTypes_1 = checkPropTypes;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactTypeOfWork
+ *
+ */
+
+var ReactTypeOfWork = {
+ IndeterminateComponent: 0, // Before we know whether it is functional or class
+ FunctionalComponent: 1,
+ ClassComponent: 2,
+ HostRoot: 3, // Root of a host tree. Could be nested inside another node.
+ HostPortal: 4, // A subtree. Could be an entry point to a different renderer.
+ HostComponent: 5,
+ HostText: 6,
+ CoroutineComponent: 7,
+ CoroutineHandlerPhase: 8,
+ YieldComponent: 9,
+ Fragment: 10
+};
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ * @providesModule getComponentName
+ */
+
+function getComponentName(instanceOrFiber) {
+ if (typeof instanceOrFiber.getName === 'function') {
+ // Stack reconciler
+ var instance = instanceOrFiber;
+ return instance.getName();
+ }
+ if (typeof instanceOrFiber.tag === 'number') {
+ // Fiber reconciler
+ var fiber = instanceOrFiber;
+ var type = fiber.type;
+
+ if (typeof type === 'string') {
+ return type;
+ }
+ if (typeof type === 'function') {
+ return type.displayName || type.name;
+ }
+ }
+ return null;
+}
+
+var getComponentName_1 = getComponentName;
+
+var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent;
+var FunctionalComponent = ReactTypeOfWork.FunctionalComponent;
+var ClassComponent = ReactTypeOfWork.ClassComponent;
+var HostComponent = ReactTypeOfWork.HostComponent;
+
+
+
+function describeComponentFrame$1(name, source, ownerName) {
+ return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
+}
+
+function describeFiber(fiber) {
+ switch (fiber.tag) {
+ case IndeterminateComponent:
+ case FunctionalComponent:
+ case ClassComponent:
+ case HostComponent:
+ var owner = fiber._debugOwner;
+ var source = fiber._debugSource;
+ var name = getComponentName_1(fiber);
+ var ownerName = null;
+ if (owner) {
+ ownerName = getComponentName_1(owner);
+ }
+ return describeComponentFrame$1(name, source, ownerName);
+ default:
+ return '';
+ }
+}
+
+// This function can only be called with a work-in-progress fiber and
+// only during begin or complete phase. Do not call it under any other
+// circumstances.
+function getStackAddendumByWorkInProgressFiber$2(workInProgress) {
+ var info = '';
+ var node = workInProgress;
+ do {
+ info += describeFiber(node);
+ // Otherwise this return pointer might point to the wrong tree:
+ node = node['return'];
+ } while (node);
+ return info;
+}
+
+var ReactFiberComponentTreeHook = {
+ getStackAddendumByWorkInProgressFiber: getStackAddendumByWorkInProgressFiber$2,
+ describeComponentFrame: describeComponentFrame$1
+};
+
+var getStackAddendumByWorkInProgressFiber$1 = ReactFiberComponentTreeHook.getStackAddendumByWorkInProgressFiber;
+var describeComponentFrame = ReactFiberComponentTreeHook.describeComponentFrame;
+
+
+
+
+
+function isNative(fn) {
+ // Based on isNative() from Lodash
+ var funcToString = Function.prototype.toString;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var reIsNative = RegExp('^' + funcToString
+ // Take an example native function source for comparison
+ .call(hasOwnProperty)
+ // Strip regex characters so we can use it for regex
+ .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ // Remove hasOwnProperty from the template to make it generic
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
+ try {
+ var source = funcToString.call(fn);
+ return reIsNative.test(source);
+ } catch (err) {
+ return false;
+ }
+}
+
+var canUseCollections =
+// Array.from
+typeof Array.from === 'function' &&
+// Map
+typeof Map === 'function' && isNative(Map) &&
+// Map.prototype.keys
+Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
+// Set
+typeof Set === 'function' && isNative(Set) &&
+// Set.prototype.keys
+Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
+
+var setItem;
+var getItem;
+var removeItem;
+var getItemIDs;
+var addRoot;
+var removeRoot;
+var getRootIDs;
+
+if (canUseCollections) {
+ var itemMap = new Map();
+ var rootIDSet = new Set();
+
+ setItem = function (id, item) {
+ itemMap.set(id, item);
+ };
+ getItem = function (id) {
+ return itemMap.get(id);
+ };
+ removeItem = function (id) {
+ itemMap['delete'](id);
+ };
+ getItemIDs = function () {
+ return Array.from(itemMap.keys());
+ };
+
+ addRoot = function (id) {
+ rootIDSet.add(id);
+ };
+ removeRoot = function (id) {
+ rootIDSet['delete'](id);
+ };
+ getRootIDs = function () {
+ return Array.from(rootIDSet.keys());
+ };
+} else {
+ var itemByKey = {};
+ var rootByKey = {};
+
+ // Use non-numeric keys to prevent V8 performance issues:
+ // https://github.com/facebook/react/pull/7232
+ var getKeyFromID = function (id) {
+ return '.' + id;
+ };
+ var getIDFromKey = function (key) {
+ return parseInt(key.substr(1), 10);
+ };
+
+ setItem = function (id, item) {
+ var key = getKeyFromID(id);
+ itemByKey[key] = item;
+ };
+ getItem = function (id) {
+ var key = getKeyFromID(id);
+ return itemByKey[key];
+ };
+ removeItem = function (id) {
+ var key = getKeyFromID(id);
+ delete itemByKey[key];
+ };
+ getItemIDs = function () {
+ return Object.keys(itemByKey).map(getIDFromKey);
+ };
+
+ addRoot = function (id) {
+ var key = getKeyFromID(id);
+ rootByKey[key] = true;
+ };
+ removeRoot = function (id) {
+ var key = getKeyFromID(id);
+ delete rootByKey[key];
+ };
+ getRootIDs = function () {
+ return Object.keys(rootByKey).map(getIDFromKey);
+ };
+}
+
+var unmountedIDs = [];
+
+function purgeDeep(id) {
+ var item = getItem(id);
+ if (item) {
+ var childIDs = item.childIDs;
+
+ removeItem(id);
+ childIDs.forEach(purgeDeep);
+ }
+}
+
+function getDisplayName(element) {
+ if (element == null) {
+ return '#empty';
+ } else if (typeof element === 'string' || typeof element === 'number') {
+ return '#text';
+ } else if (typeof element.type === 'string') {
+ return element.type;
+ } else {
+ return element.type.displayName || element.type.name || 'Unknown';
+ }
+}
+
+function describeID(id) {
+ var name = ReactComponentTreeHook.getDisplayName(id);
+ var element = ReactComponentTreeHook.getElement(id);
+ var ownerID = ReactComponentTreeHook.getOwnerID(id);
+ var ownerName = void 0;
+
+ if (ownerID) {
+ ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
+ }
+ warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id);
+ return describeComponentFrame(name || '', element && element._source, ownerName || '');
+}
+
+var ReactComponentTreeHook = {
+ onSetChildren: function (id, nextChildIDs) {
+ var item = getItem(id);
+ invariant(item, 'Item must have been set');
+ item.childIDs = nextChildIDs;
+
+ for (var i = 0; i < nextChildIDs.length; i++) {
+ var nextChildID = nextChildIDs[i];
+ var nextChild = getItem(nextChildID);
+ !nextChild ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : void 0;
+ !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : void 0;
+ !nextChild.isMounted ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : void 0;
+ if (nextChild.parentID == null) {
+ nextChild.parentID = id;
+ // TODO: This shouldn't be necessary but mounting a new root during in
+ // componentWillMount currently causes not-yet-mounted components to
+ // be purged from our tree data so their parent id is missing.
+ }
+ !(nextChild.parentID === id) ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : void 0;
+ }
+ },
+ onBeforeMountComponent: function (id, element, parentID) {
+ var item = {
+ element: element,
+ parentID: parentID,
+ text: null,
+ childIDs: [],
+ isMounted: false,
+ updateCount: 0
+ };
+ setItem(id, item);
+ },
+ onBeforeUpdateComponent: function (id, element) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.element = element;
+ },
+ onMountComponent: function (id) {
+ var item = getItem(id);
+ invariant(item, 'Item must have been set');
+ item.isMounted = true;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ addRoot(id);
+ }
+ },
+ onUpdateComponent: function (id) {
+ var item = getItem(id);
+ if (!item || !item.isMounted) {
+ // We may end up here as a result of setState() in componentWillUnmount().
+ // In this case, ignore the element.
+ return;
+ }
+ item.updateCount++;
+ },
+ onUnmountComponent: function (id) {
+ var item = getItem(id);
+ if (item) {
+ // We need to check if it exists.
+ // `item` might not exist if it is inside an error boundary, and a sibling
+ // error boundary child threw while mounting. Then this instance never
+ // got a chance to mount, but it still gets an unmounting event during
+ // the error boundary cleanup.
+ item.isMounted = false;
+ var isRoot = item.parentID === 0;
+ if (isRoot) {
+ removeRoot(id);
+ }
+ }
+ unmountedIDs.push(id);
+ },
+ purgeUnmountedComponents: function () {
+ if (ReactComponentTreeHook._preventPurging) {
+ // Should only be used for testing.
+ return;
+ }
+
+ for (var i = 0; i < unmountedIDs.length; i++) {
+ var id = unmountedIDs[i];
+ purgeDeep(id);
+ }
+ unmountedIDs.length = 0;
+ },
+ isMounted: function (id) {
+ var item = getItem(id);
+ return item ? item.isMounted : false;
+ },
+ getCurrentStackAddendum: function (topElement) {
+ var info = '';
+ if (topElement) {
+ var name = getDisplayName(topElement);
+ var owner = topElement._owner;
+ info += describeComponentFrame(name, topElement._source, owner && getComponentName_1(owner));
+ }
+
+ var currentOwner = ReactCurrentOwner_1.current;
+ if (currentOwner) {
+ if (typeof currentOwner.tag === 'number') {
+ var workInProgress = currentOwner;
+ // Safe because if current owner exists, we are reconciling,
+ // and it is guaranteed to be the work-in-progress version.
+ info += getStackAddendumByWorkInProgressFiber$1(workInProgress);
+ } else if (typeof currentOwner._debugID === 'number') {
+ info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
+ }
+ }
+ return info;
+ },
+ getStackAddendumByID: function (id) {
+ var info = '';
+ while (id) {
+ info += describeID(id);
+ id = ReactComponentTreeHook.getParentID(id);
+ }
+ return info;
+ },
+ getChildIDs: function (id) {
+ var item = getItem(id);
+ return item ? item.childIDs : [];
+ },
+ getDisplayName: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element) {
+ return null;
+ }
+ return getDisplayName(element);
+ },
+ getElement: function (id) {
+ var item = getItem(id);
+ return item ? item.element : null;
+ },
+ getOwnerID: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (!element || !element._owner) {
+ return null;
+ }
+ return element._owner._debugID;
+ },
+ getParentID: function (id) {
+ var item = getItem(id);
+ return item ? item.parentID : null;
+ },
+ getSource: function (id) {
+ var item = getItem(id);
+ var element = item ? item.element : null;
+ var source = element != null ? element._source : null;
+ return source;
+ },
+ getText: function (id) {
+ var element = ReactComponentTreeHook.getElement(id);
+ if (typeof element === 'string') {
+ return element;
+ } else if (typeof element === 'number') {
+ return '' + element;
+ } else {
+ return null;
+ }
+ },
+ getUpdateCount: function (id) {
+ var item = getItem(id);
+ return item ? item.updateCount : 0;
+ },
+
+
+ getRootIDs: getRootIDs,
+ getRegisteredIDs: getItemIDs
+};
+
+var ReactComponentTreeHook_1 = ReactComponentTreeHook;
+
+var ReactDebugCurrentFrame$1 = {};
+
+{
+ var _require$1 = ReactComponentTreeHook_1,
+ getStackAddendumByID = _require$1.getStackAddendumByID,
+ getCurrentStackAddendum$1 = _require$1.getCurrentStackAddendum;
+
+ var _require2 = ReactFiberComponentTreeHook,
+ getStackAddendumByWorkInProgressFiber = _require2.getStackAddendumByWorkInProgressFiber;
+
+ // Component that is being worked on
+
+
+ ReactDebugCurrentFrame$1.current = null;
+
+ // Element that is being cloned or created
+ ReactDebugCurrentFrame$1.element = null;
+
+ ReactDebugCurrentFrame$1.getStackAddendum = function () {
+ var stack = null;
+ var current = ReactDebugCurrentFrame$1.current;
+ var element = ReactDebugCurrentFrame$1.element;
+ if (current !== null) {
+ if (typeof current === 'number') {
+ // DebugID from Stack.
+ var debugID = current;
+ stack = getStackAddendumByID(debugID);
+ } else if (typeof current.tag === 'number') {
+ // This is a Fiber.
+ // The stack will only be correct if this is a work in progress
+ // version and we're calling it during reconciliation.
+ var workInProgress = current;
+ stack = getStackAddendumByWorkInProgressFiber(workInProgress);
+ }
+ } else if (element !== null) {
+ stack = getCurrentStackAddendum$1(element);
+ }
+ return stack;
+ };
+}
+
+var ReactDebugCurrentFrame_1 = ReactDebugCurrentFrame$1;
+
+var getStackAddendum = ReactDebugCurrentFrame_1.getStackAddendum;
+
+function checkReactTypeSpec(typeSpecs, values, location, componentName) {
+ checkPropTypes_1(typeSpecs, values, location, componentName, getStackAddendum);
+}
+
+var checkReactTypeSpec_1 = checkReactTypeSpec;
+
+{
+ var warning$2 = warning;
+ var ReactDebugCurrentFrame = ReactDebugCurrentFrame_1;
+
+ var _require = ReactComponentTreeHook_1,
+ getCurrentStackAddendum = _require.getCurrentStackAddendum;
+}
+
+function getDeclarationErrorAddendum() {
+ if (ReactCurrentOwner_1.current) {
+ var name = getComponentName_1(ReactCurrentOwner_1.current);
+ if (name) {
+ return '\n\nCheck the render method of `' + name + '`.';
+ }
+ }
+ return '';
+}
+
+function getSourceInfoErrorAddendum(elementProps) {
+ if (elementProps !== null && elementProps !== undefined && elementProps.__source !== undefined) {
+ var source = elementProps.__source;
+ var fileName = source.fileName.replace(/^.*[\\\/]/, '');
+ var lineNumber = source.lineNumber;
+ return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
+ }
+ return '';
+}
+
+/**
+ * Warn if there's no key explicitly set on dynamic arrays of children or
+ * object keys are not valid. This allows us to keep track of children between
+ * updates.
+ */
+var ownerHasKeyUseWarning = {};
+
+function getCurrentComponentErrorInfo(parentType) {
+ var info = getDeclarationErrorAddendum();
+
+ if (!info) {
+ var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
+ if (parentName) {
+ info = '\n\nCheck the top-level render call using <' + parentName + '>.';
+ }
+ }
+ return info;
+}
+
+/**
+ * Warn if the element doesn't have an explicit key assigned to it.
+ * This element is in an array. The array could grow and shrink or be
+ * reordered. All children that haven't already been validated are required to
+ * have a "key" property assigned to it. Error statuses are cached so a warning
+ * will only be shown once.
+ *
+ * @internal
+ * @param {ReactElement} element Element that requires a key.
+ * @param {*} parentType element's parent's type.
+ */
+function validateExplicitKey(element, parentType) {
+ if (!element._store || element._store.validated || element.key != null) {
+ return;
+ }
+ element._store.validated = true;
+
+ var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
+
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
+ if (memoizer[currentComponentErrorInfo]) {
+ return;
+ }
+ memoizer[currentComponentErrorInfo] = true;
+
+ // Usually the current owner is the offender, but if it accepts children as a
+ // property, it may be the creator of the child that's responsible for
+ // assigning it a key.
+ var childOwner = '';
+ if (element && element._owner && element._owner !== ReactCurrentOwner_1.current) {
+ // Give the component that originally created this child.
+ childOwner = ' It was passed a child from ' + getComponentName_1(element._owner) + '.';
+ }
+
+ warning$2(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getCurrentStackAddendum(element));
+}
+
+/**
+ * Ensure that every element either is passed in a static location, in an
+ * array with an explicit keys property defined, or in an object literal
+ * with valid key property.
+ *
+ * @internal
+ * @param {ReactNode} node Statically passed child of any type.
+ * @param {*} parentType node's parent's type.
+ */
+function validateChildKeys(node, parentType) {
+ if (typeof node !== 'object') {
+ return;
+ }
+ if (Array.isArray(node)) {
+ for (var i = 0; i < node.length; i++) {
+ var child = node[i];
+ if (ReactElement_1.isValidElement(child)) {
+ validateExplicitKey(child, parentType);
+ }
+ }
+ } else if (ReactElement_1.isValidElement(node)) {
+ // This element was passed in a valid location.
+ if (node._store) {
+ node._store.validated = true;
+ }
+ } else if (node) {
+ var iteratorFn = getIteratorFn_1(node);
+ // Entry iterators provide implicit keys.
+ if (iteratorFn) {
+ if (iteratorFn !== node.entries) {
+ var iterator = iteratorFn.call(node);
+ var step;
+ while (!(step = iterator.next()).done) {
+ if (ReactElement_1.isValidElement(step.value)) {
+ validateExplicitKey(step.value, parentType);
+ }
+ }
+ }
+ }
+ }
+}
+
+/**
+ * Given an element, validate that its props follow the propTypes definition,
+ * provided by the type.
+ *
+ * @param {ReactElement} element
+ */
+function validatePropTypes(element) {
+ var componentClass = element.type;
+ if (typeof componentClass !== 'function') {
+ return;
+ }
+ var name = componentClass.displayName || componentClass.name;
+ if (componentClass.propTypes) {
+ checkReactTypeSpec_1(componentClass.propTypes, element.props, 'prop', name);
+ }
+ if (typeof componentClass.getDefaultProps === 'function') {
+ warning$2(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
+ }
+}
+
+var ReactElementValidator$2 = {
+ createElement: function (type, props, children) {
+ var validType = typeof type === 'string' || typeof type === 'function';
+ // We warn in this case but don't throw. We expect the element creation to
+ // succeed and there will likely be errors in render.
+ if (!validType) {
+ var info = '';
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
+ info += ' You likely forgot to export your component from the file ' + "it's defined in.";
+ }
+
+ var sourceInfo = getSourceInfoErrorAddendum(props);
+ if (sourceInfo) {
+ info += sourceInfo;
+ } else {
+ info += getDeclarationErrorAddendum();
+ }
+
+ info += getCurrentStackAddendum();
+
+ warning$2(false, 'React.createElement: 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);
+ }
+
+ var element = ReactElement_1.createElement.apply(this, arguments);
+
+ // The result can be nullish if a mock or a custom function is used.
+ // TODO: Drop this when these are no longer allowed as the type argument.
+ if (element == null) {
+ return element;
+ }
+
+ {
+ ReactDebugCurrentFrame.element = element;
+ }
+
+ // Skip key warning if the type isn't valid since our key validation logic
+ // doesn't expect a non-string/function type and can throw confusing errors.
+ // We don't want exception behavior to differ between dev and prod.
+ // (Rendering will throw with a helpful message and as soon as the type is
+ // fixed, the key warnings will appear.)
+ if (validType) {
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], type);
+ }
+ }
+
+ validatePropTypes(element);
+
+ {
+ ReactDebugCurrentFrame.element = null;
+ }
+
+ return element;
+ },
+
+ createFactory: function (type) {
+ var validatedFactory = ReactElementValidator$2.createElement.bind(null, type);
+ // Legacy hook TODO: Warn if this is accessed
+ validatedFactory.type = type;
+
+ {
+ if (canDefineProperty_1) {
+ Object.defineProperty(validatedFactory, 'type', {
+ enumerable: false,
+ get: function () {
+ warning$2(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
+ Object.defineProperty(this, 'type', {
+ value: type
+ });
+ return type;
+ }
+ });
+ }
+ }
+
+ return validatedFactory;
+ },
+
+ cloneElement: function (element, props, children) {
+ var newElement = ReactElement_1.cloneElement.apply(this, arguments);
+ {
+ ReactDebugCurrentFrame.element = newElement;
+ }
+ for (var i = 2; i < arguments.length; i++) {
+ validateChildKeys(arguments[i], newElement.type);
+ }
+ validatePropTypes(newElement);
+ {
+ ReactDebugCurrentFrame.element = null;
+ }
+ return newElement;
+ }
+};
+
+var ReactElementValidator_1 = ReactElementValidator$2;
+
+/**
+ * Create a factory that creates HTML tag elements.
+ *
+ * @private
+ */
+var createDOMFactory = ReactElement_1.createFactory;
+{
+ var ReactElementValidator$1 = ReactElementValidator_1;
+ createDOMFactory = ReactElementValidator$1.createFactory;
+}
+
+/**
+ * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
+ * This is also accessible via `React.DOM`.
+ *
+ * @public
+ */
+var ReactDOMFactories = {
+ a: createDOMFactory('a'),
+ abbr: createDOMFactory('abbr'),
+ address: createDOMFactory('address'),
+ area: createDOMFactory('area'),
+ article: createDOMFactory('article'),
+ aside: createDOMFactory('aside'),
+ audio: createDOMFactory('audio'),
+ b: createDOMFactory('b'),
+ base: createDOMFactory('base'),
+ bdi: createDOMFactory('bdi'),
+ bdo: createDOMFactory('bdo'),
+ big: createDOMFactory('big'),
+ blockquote: createDOMFactory('blockquote'),
+ body: createDOMFactory('body'),
+ br: createDOMFactory('br'),
+ button: createDOMFactory('button'),
+ canvas: createDOMFactory('canvas'),
+ caption: createDOMFactory('caption'),
+ cite: createDOMFactory('cite'),
+ code: createDOMFactory('code'),
+ col: createDOMFactory('col'),
+ colgroup: createDOMFactory('colgroup'),
+ data: createDOMFactory('data'),
+ datalist: createDOMFactory('datalist'),
+ dd: createDOMFactory('dd'),
+ del: createDOMFactory('del'),
+ details: createDOMFactory('details'),
+ dfn: createDOMFactory('dfn'),
+ dialog: createDOMFactory('dialog'),
+ div: createDOMFactory('div'),
+ dl: createDOMFactory('dl'),
+ dt: createDOMFactory('dt'),
+ em: createDOMFactory('em'),
+ embed: createDOMFactory('embed'),
+ fieldset: createDOMFactory('fieldset'),
+ figcaption: createDOMFactory('figcaption'),
+ figure: createDOMFactory('figure'),
+ footer: createDOMFactory('footer'),
+ form: createDOMFactory('form'),
+ h1: createDOMFactory('h1'),
+ h2: createDOMFactory('h2'),
+ h3: createDOMFactory('h3'),
+ h4: createDOMFactory('h4'),
+ h5: createDOMFactory('h5'),
+ h6: createDOMFactory('h6'),
+ head: createDOMFactory('head'),
+ header: createDOMFactory('header'),
+ hgroup: createDOMFactory('hgroup'),
+ hr: createDOMFactory('hr'),
+ html: createDOMFactory('html'),
+ i: createDOMFactory('i'),
+ iframe: createDOMFactory('iframe'),
+ img: createDOMFactory('img'),
+ input: createDOMFactory('input'),
+ ins: createDOMFactory('ins'),
+ kbd: createDOMFactory('kbd'),
+ keygen: createDOMFactory('keygen'),
+ label: createDOMFactory('label'),
+ legend: createDOMFactory('legend'),
+ li: createDOMFactory('li'),
+ link: createDOMFactory('link'),
+ main: createDOMFactory('main'),
+ map: createDOMFactory('map'),
+ mark: createDOMFactory('mark'),
+ menu: createDOMFactory('menu'),
+ menuitem: createDOMFactory('menuitem'),
+ meta: createDOMFactory('meta'),
+ meter: createDOMFactory('meter'),
+ nav: createDOMFactory('nav'),
+ noscript: createDOMFactory('noscript'),
+ object: createDOMFactory('object'),
+ ol: createDOMFactory('ol'),
+ optgroup: createDOMFactory('optgroup'),
+ option: createDOMFactory('option'),
+ output: createDOMFactory('output'),
+ p: createDOMFactory('p'),
+ param: createDOMFactory('param'),
+ picture: createDOMFactory('picture'),
+ pre: createDOMFactory('pre'),
+ progress: createDOMFactory('progress'),
+ q: createDOMFactory('q'),
+ rp: createDOMFactory('rp'),
+ rt: createDOMFactory('rt'),
+ ruby: createDOMFactory('ruby'),
+ s: createDOMFactory('s'),
+ samp: createDOMFactory('samp'),
+ script: createDOMFactory('script'),
+ section: createDOMFactory('section'),
+ select: createDOMFactory('select'),
+ small: createDOMFactory('small'),
+ source: createDOMFactory('source'),
+ span: createDOMFactory('span'),
+ strong: createDOMFactory('strong'),
+ style: createDOMFactory('style'),
+ sub: createDOMFactory('sub'),
+ summary: createDOMFactory('summary'),
+ sup: createDOMFactory('sup'),
+ table: createDOMFactory('table'),
+ tbody: createDOMFactory('tbody'),
+ td: createDOMFactory('td'),
+ textarea: createDOMFactory('textarea'),
+ tfoot: createDOMFactory('tfoot'),
+ th: createDOMFactory('th'),
+ thead: createDOMFactory('thead'),
+ time: createDOMFactory('time'),
+ title: createDOMFactory('title'),
+ tr: createDOMFactory('tr'),
+ track: createDOMFactory('track'),
+ u: createDOMFactory('u'),
+ ul: createDOMFactory('ul'),
+ 'var': createDOMFactory('var'),
+ video: createDOMFactory('video'),
+ wbr: createDOMFactory('wbr'),
+
+ // SVG
+ circle: createDOMFactory('circle'),
+ clipPath: createDOMFactory('clipPath'),
+ defs: createDOMFactory('defs'),
+ ellipse: createDOMFactory('ellipse'),
+ g: createDOMFactory('g'),
+ image: createDOMFactory('image'),
+ line: createDOMFactory('line'),
+ linearGradient: createDOMFactory('linearGradient'),
+ mask: createDOMFactory('mask'),
+ path: createDOMFactory('path'),
+ pattern: createDOMFactory('pattern'),
+ polygon: createDOMFactory('polygon'),
+ polyline: createDOMFactory('polyline'),
+ radialGradient: createDOMFactory('radialGradient'),
+ rect: createDOMFactory('rect'),
+ stop: createDOMFactory('stop'),
+ svg: createDOMFactory('svg'),
+ text: createDOMFactory('text'),
+ tspan: createDOMFactory('tspan')
+};
+
+var ReactDOMFactories_1 = ReactDOMFactories;
+
+/**
+ * Collection of methods that allow declaration and validation of props that are
+ * supplied to React components. Example usage:
+ *
+ * var Props = require('ReactPropTypes');
+ * var MyArticle = React.createClass({
+ * propTypes: {
+ * // An optional string prop named "description".
+ * description: Props.string,
+ *
+ * // A required enum prop named "category".
+ * category: Props.oneOf(['News','Photos']).isRequired,
+ *
+ * // A prop named "dialog" that requires an instance of Dialog.
+ * dialog: Props.instanceOf(Dialog).isRequired
+ * },
+ * render: function() { ... }
+ * });
+ *
+ * A more formal specification of how these methods are used:
+ *
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
+ * decl := ReactPropTypes.{type}(.isRequired)?
+ *
+ * Each and every declaration produces a function with the same signature. This
+ * allows the creation of custom validation functions. For example:
+ *
+ * var MyLink = React.createClass({
+ * propTypes: {
+ * // An optional string or URI prop named "href".
+ * href: function(props, propName, componentName) {
+ * var propValue = props[propName];
+ * if (propValue != null && typeof propValue !== 'string' &&
+ * !(propValue instanceof URI)) {
+ * return new Error(
+ * 'Expected a string or an URI for ' + propName + ' in ' +
+ * componentName
+ * );
+ * }
+ * }
+ * },
+ * render: function() {...}
+ * });
+ *
+ * @internal
+ */
+
+var ANONYMOUS = '<>';
+
+var ReactPropTypes;
+
+{
+ // Keep in sync with production version below
+ ReactPropTypes = {
+ array: createPrimitiveTypeChecker('array'),
+ bool: createPrimitiveTypeChecker('boolean'),
+ func: createPrimitiveTypeChecker('function'),
+ number: createPrimitiveTypeChecker('number'),
+ object: createPrimitiveTypeChecker('object'),
+ string: createPrimitiveTypeChecker('string'),
+ symbol: createPrimitiveTypeChecker('symbol'),
+
+ any: createAnyTypeChecker(),
+ arrayOf: createArrayOfTypeChecker,
+ element: createElementTypeChecker(),
+ instanceOf: createInstanceTypeChecker,
+ node: createNodeChecker(),
+ objectOf: createObjectOfTypeChecker,
+ oneOf: createEnumTypeChecker,
+ oneOfType: createUnionTypeChecker,
+ shape: createShapeTypeChecker
+ };
+}
+
+/**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+/*eslint-disable no-self-compare*/
+function is(x, y) {
+ // SameValue algorithm
+ if (x === y) {
+ // Steps 1-5, 7-10
+ // Steps 6.b-6.e: +0 != -0
+ return x !== 0 || 1 / x === 1 / y;
+ } else {
+ // Step 6.a: NaN == NaN
+ return x !== x && y !== y;
+ }
+}
+/*eslint-enable no-self-compare*/
+
+/**
+ * We use an Error-like object for backward compatibility as people may call
+ * PropTypes directly and inspect their output. However, we don't use real
+ * Errors anymore. We don't inspect their stack anyway, and creating them
+ * is prohibitively expensive if they are created too often, such as what
+ * happens in oneOfType() for any type before the one that matched.
+ */
+function PropTypeError(message) {
+ this.message = message;
+ this.stack = '';
+}
+// Make `instanceof Error` still work for returned errors.
+PropTypeError.prototype = Error.prototype;
+
+function createChainableTypeChecker(validate) {
+ {
+ var manualPropTypeCallCache = {};
+ }
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
+ componentName = componentName || ANONYMOUS;
+ propFullName = propFullName || propName;
+ {
+ if (secret !== ReactPropTypesSecret_1 && typeof console !== 'undefined') {
+ var cacheKey = componentName + ':' + propName;
+ if (!manualPropTypeCallCache[cacheKey]) {
+ warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in production with the next major version. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.', propFullName, componentName);
+ manualPropTypeCallCache[cacheKey] = true;
+ }
+ }
+ }
+ if (props[propName] == null) {
+ if (isRequired) {
+ if (props[propName] === null) {
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
+ }
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
+ }
+ return null;
+ } else {
+ return validate(props, propName, componentName, location, propFullName);
+ }
+ }
+
+ var chainedCheckType = checkType.bind(null, false);
+ chainedCheckType.isRequired = checkType.bind(null, true);
+
+ return chainedCheckType;
+}
+
+function createPrimitiveTypeChecker(expectedType) {
+ function validate(props, propName, componentName, location, propFullName, secret) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== expectedType) {
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
+ // check, but we can offer a more precise error message here rather than
+ // 'of type `object`'.
+ var preciseType = getPreciseType(propValue);
+
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createAnyTypeChecker() {
+ return createChainableTypeChecker(emptyFunction.thatReturnsNull);
+}
+
+function createArrayOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
+ }
+ var propValue = props[propName];
+ if (!Array.isArray(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
+ }
+ for (var i = 0; i < propValue.length; i++) {
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
+ if (error instanceof Error) {
+ return error;
+ }
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createElementTypeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ if (!ReactElement_1.isValidElement(propValue)) {
+ var propType = getPropType(propValue);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createInstanceTypeChecker(expectedClass) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!(props[propName] instanceof expectedClass)) {
+ var expectedClassName = expectedClass.name || ANONYMOUS;
+ var actualClassName = getClassName(props[propName]);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createEnumTypeChecker(expectedValues) {
+ if (!Array.isArray(expectedValues)) {
+ warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.');
+ return emptyFunction.thatReturnsNull;
+ }
+
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ for (var i = 0; i < expectedValues.length; i++) {
+ if (is(propValue, expectedValues[i])) {
+ return null;
+ }
+ }
+
+ var valuesString = JSON.stringify(expectedValues);
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createObjectOfTypeChecker(typeChecker) {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (typeof typeChecker !== 'function') {
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
+ }
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
+ }
+ for (var key in propValue) {
+ if (propValue.hasOwnProperty(key)) {
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
+ if (error instanceof Error) {
+ return error;
+ }
+ }
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createUnionTypeChecker(arrayOfTypeCheckers) {
+ if (!Array.isArray(arrayOfTypeCheckers)) {
+ warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.');
+ return emptyFunction.thatReturnsNull;
+ }
+
+ function validate(props, propName, componentName, location, propFullName) {
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
+ var checker = arrayOfTypeCheckers[i];
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
+ return null;
+ }
+ }
+
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createNodeChecker() {
+ function validate(props, propName, componentName, location, propFullName) {
+ if (!isNode(props[propName])) {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function createShapeTypeChecker(shapeTypes) {
+ function validate(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ var propType = getPropType(propValue);
+ if (propType !== 'object') {
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
+ }
+ for (var key in shapeTypes) {
+ var checker = shapeTypes[key];
+ if (!checker) {
+ continue;
+ }
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
+ if (error) {
+ return error;
+ }
+ }
+ return null;
+ }
+ return createChainableTypeChecker(validate);
+}
+
+function isNode(propValue) {
+ switch (typeof propValue) {
+ case 'number':
+ case 'string':
+ case 'undefined':
+ return true;
+ case 'boolean':
+ return !propValue;
+ case 'object':
+ if (Array.isArray(propValue)) {
+ return propValue.every(isNode);
+ }
+ if (propValue === null || ReactElement_1.isValidElement(propValue)) {
+ return true;
+ }
+
+ var iteratorFn = getIteratorFn_1(propValue);
+ if (iteratorFn) {
+ var iterator = iteratorFn.call(propValue);
+ var step;
+ if (iteratorFn !== propValue.entries) {
+ while (!(step = iterator.next()).done) {
+ if (!isNode(step.value)) {
+ return false;
+ }
+ }
+ } else {
+ // Iterator will provide entry [k,v] tuples rather than values.
+ while (!(step = iterator.next()).done) {
+ var entry = step.value;
+ if (entry) {
+ if (!isNode(entry[1])) {
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+ default:
+ return false;
+ }
+}
+
+function isSymbol(propType, propValue) {
+ // Native Symbol.
+ if (propType === 'symbol') {
+ return true;
+ }
+
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
+ if (propValue['@@toStringTag'] === 'Symbol') {
+ return true;
+ }
+
+ // Fallback for non-spec compliant Symbols which are polyfilled.
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
+ return true;
+ }
+
+ return false;
+}
+
+// Equivalent of `typeof` but with special handling for array and regexp.
+function getPropType(propValue) {
+ var propType = typeof propValue;
+ if (Array.isArray(propValue)) {
+ return 'array';
+ }
+ if (propValue instanceof RegExp) {
+ // Old webkits (at least until Android 4.0) return 'function' rather than
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
+ // passes PropTypes.object.
+ return 'object';
+ }
+ if (isSymbol(propType, propValue)) {
+ return 'symbol';
+ }
+ return propType;
+}
+
+// This handles more types than `getPropType`. Only used for error messages.
+// See `createPrimitiveTypeChecker`.
+function getPreciseType(propValue) {
+ var propType = getPropType(propValue);
+ if (propType === 'object') {
+ if (propValue instanceof Date) {
+ return 'date';
+ } else if (propValue instanceof RegExp) {
+ return 'regexp';
+ }
+ }
+ return propType;
+}
+
+// Returns class name of the object, if any.
+function getClassName(propValue) {
+ if (!propValue.constructor || !propValue.constructor.name) {
+ return ANONYMOUS;
+ }
+ return propValue.constructor.name;
+}
+
+var ReactPropTypes_1 = ReactPropTypes;
+
+/**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactVersion
+ */
+
+var ReactVersion = '16.0.0-alpha.4';
+
+/**
+ * Returns the first child in a collection of children and verifies that there
+ * is only one child in the collection.
+ *
+ * See https://facebook.github.io/react/docs/react-api.html#react.children.only
+ *
+ * The current implementation of this function assumes that a single child gets
+ * passed without a wrapper, but the purpose of this helper function is to
+ * abstract away the particular structure of children.
+ *
+ * @param {?object} children Child collection structure.
+ * @return {ReactElement} The first and only `ReactElement` contained in the
+ * structure.
+ */
+function onlyChild(children) {
+ !ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0;
+ return children;
+}
+
+var onlyChild_1 = onlyChild;
+
+var createElement = ReactElement_1.createElement;
+var createFactory = ReactElement_1.createFactory;
+var cloneElement = ReactElement_1.cloneElement;
+
+{
+ var ReactElementValidator = ReactElementValidator_1;
+ createElement = ReactElementValidator.createElement;
+ createFactory = ReactElementValidator.createFactory;
+ cloneElement = ReactElementValidator.cloneElement;
+}
+
+var createMixin = function (mixin) {
+ return mixin;
+};
+
+{
+ var warnedForCreateMixin = false;
+
+ createMixin = function (mixin) {
+ warning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. You ' + 'can use this mixin directly instead.');
+ warnedForCreateMixin = true;
+ return mixin;
+ };
+}
+
+var React = {
+ // Modern
+
+ Children: {
+ map: ReactChildren_1.map,
+ forEach: ReactChildren_1.forEach,
+ count: ReactChildren_1.count,
+ toArray: ReactChildren_1.toArray,
+ only: onlyChild_1
+ },
+
+ Component: ReactBaseClasses.Component,
+ PureComponent: ReactBaseClasses.PureComponent,
+
+ createElement: createElement,
+ cloneElement: cloneElement,
+ isValidElement: ReactElement_1.isValidElement,
+
+ checkPropTypes: checkPropTypes_1,
+
+ // Classic
+
+ PropTypes: ReactPropTypes_1,
+ createClass: ReactClass_1.createClass,
+ createFactory: createFactory,
+ createMixin: createMixin,
+
+ // This looks DOM specific but these are actually isomorphic helpers
+ // since they are just generating DOM strings.
+ DOM: ReactDOMFactories_1,
+
+ version: ReactVersion
+};
+
+var React_1 = React;
+
+// `version` will be added here by the React module.
+var ReactUMDEntry = _assign({
+ __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
+ ReactCurrentOwner: ReactCurrentOwner_1
+ }
+}, React_1);
+
+{
+ _assign(ReactUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
+ // ReactComponentTreeHook should not be included in production.
+ ReactComponentTreeHook: ReactComponentTreeHook_1
+ });
+}
+
+var ReactUMDEntry_1 = ReactUMDEntry;
+
+module.exports = ReactUMDEntry_1;
+
+},{"fbjs/lib/emptyFunction":13,"fbjs/lib/emptyObject":14,"fbjs/lib/invariant":20,"fbjs/lib/warning":27,"object-assign":28}],6:[function(require,module,exports){
+"use strict";function reactProdInvariant(e){for(var t=arguments.length-1,r="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,o=0;o1){for(var s=Array(p),u=0;u1){for(var y=Array(u),d=0;d camelize('background-color')
+ * < "backgroundColor"
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function camelize(string) {
+ return string.replace(_hyphenPattern, function (_, character) {
+ return character.toUpperCase();
+ });
+}
+
+module.exports = camelize;
+},{}],11:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+'use strict';
+
+var camelize = require('./camelize');
+
+var msPattern = /^-ms-/;
+
+/**
+ * Camelcases a hyphenated CSS property name, for example:
+ *
+ * > camelizeStyleName('background-color')
+ * < "backgroundColor"
+ * > camelizeStyleName('-moz-transition')
+ * < "MozTransition"
+ * > camelizeStyleName('-ms-transition')
+ * < "msTransition"
+ *
+ * As Andi Smith suggests
+ * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
+ * is converted to lowercase `ms`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function camelizeStyleName(string) {
+ return camelize(string.replace(msPattern, 'ms-'));
+}
+
+module.exports = camelizeStyleName;
+},{"./camelize":10}],12:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+var isTextNode = require('./isTextNode');
+
+/*eslint-disable no-bitwise */
+
+/**
+ * Checks if a given DOM node contains or is another DOM node.
+ */
+function containsNode(outerNode, innerNode) {
+ if (!outerNode || !innerNode) {
+ return false;
+ } else if (outerNode === innerNode) {
+ return true;
+ } else if (isTextNode(outerNode)) {
+ return false;
+ } else if (isTextNode(innerNode)) {
+ return containsNode(outerNode, innerNode.parentNode);
+ } else if ('contains' in outerNode) {
+ return outerNode.contains(innerNode);
+ } else if (outerNode.compareDocumentPosition) {
+ return !!(outerNode.compareDocumentPosition(innerNode) & 16);
+ } else {
+ return false;
+ }
+}
+
+module.exports = containsNode;
+},{"./isTextNode":22}],13:[function(require,module,exports){
+"use strict";
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ */
+
+function makeEmptyFunction(arg) {
+ return function () {
+ return arg;
+ };
+}
+
+/**
+ * This function accepts and discards inputs; it has no side effects. This is
+ * primarily useful idiomatically for overridable function endpoints which
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
+ */
+var emptyFunction = function emptyFunction() {};
+
+emptyFunction.thatReturns = makeEmptyFunction;
+emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
+emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
+emptyFunction.thatReturnsNull = makeEmptyFunction(null);
+emptyFunction.thatReturnsThis = function () {
+ return this;
+};
+emptyFunction.thatReturnsArgument = function (arg) {
+ return arg;
+};
+
+module.exports = emptyFunction;
+},{}],14:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+var emptyObject = {};
+
+if ("production" !== 'production') {
+ Object.freeze(emptyObject);
+}
+
+module.exports = emptyObject;
+},{}],15:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+/**
+ * @param {DOMElement} node input/textarea to focus
+ */
+
+function focusNode(node) {
+ // IE8 can throw "Can't move focus to the control because it is invisible,
+ // not enabled, or of a type that does not accept the focus." for all kinds of
+ // reasons that are too expensive and fragile to test.
+ try {
+ node.focus();
+ } catch (e) {}
+}
+
+module.exports = focusNode;
+},{}],16:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+/* eslint-disable fb-www/typeof-undefined */
+
+/**
+ * Same as document.activeElement but wraps in a try-catch block. In IE it is
+ * not safe to call document.activeElement if there is nothing focused.
+ *
+ * The activeElement will be null only if the document or document body is not
+ * yet defined.
+ */
+function getActiveElement() /*?DOMElement*/{
+ if (typeof document === 'undefined') {
+ return null;
+ }
+ try {
+ return document.activeElement || document.body;
+ } catch (e) {
+ return document.body;
+ }
+}
+
+module.exports = getActiveElement;
+},{}],17:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+'use strict';
+
+/**
+ * Gets the scroll position of the supplied element or window.
+ *
+ * The return values are unbounded, unlike `getScrollPosition`. This means they
+ * may be negative or exceed the element boundaries (which is possible using
+ * inertial scrolling).
+ *
+ * @param {DOMWindow|DOMElement} scrollable
+ * @return {object} Map with `x` and `y` keys.
+ */
+
+function getUnboundedScrollPosition(scrollable) {
+ if (scrollable === window) {
+ return {
+ x: window.pageXOffset || document.documentElement.scrollLeft,
+ y: window.pageYOffset || document.documentElement.scrollTop
+ };
+ }
+ return {
+ x: scrollable.scrollLeft,
+ y: scrollable.scrollTop
+ };
+}
+
+module.exports = getUnboundedScrollPosition;
+},{}],18:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+var _uppercasePattern = /([A-Z])/g;
+
+/**
+ * Hyphenates a camelcased string, for example:
+ *
+ * > hyphenate('backgroundColor')
+ * < "background-color"
+ *
+ * For CSS style names, use `hyphenateStyleName` instead which works properly
+ * with all vendor prefixes, including `ms`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function hyphenate(string) {
+ return string.replace(_uppercasePattern, '-$1').toLowerCase();
+}
+
+module.exports = hyphenate;
+},{}],19:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+'use strict';
+
+var hyphenate = require('./hyphenate');
+
+var msPattern = /^ms-/;
+
+/**
+ * Hyphenates a camelcased CSS property name, for example:
+ *
+ * > hyphenateStyleName('backgroundColor')
+ * < "background-color"
+ * > hyphenateStyleName('MozTransition')
+ * < "-moz-transition"
+ * > hyphenateStyleName('msTransition')
+ * < "-ms-transition"
+ *
+ * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
+ * is converted to `-ms-`.
+ *
+ * @param {string} string
+ * @return {string}
+ */
+function hyphenateStyleName(string) {
+ return hyphenate(string).replace(msPattern, '-ms-');
+}
+
+module.exports = hyphenateStyleName;
+},{"./hyphenate":18}],20:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+/**
+ * Use invariant() to assert state which your program assumes to be true.
+ *
+ * Provide sprintf-style format (only %s is supported) and arguments
+ * to provide information about what broke and what you were
+ * expecting.
+ *
+ * The invariant message will be stripped in production, but the invariant
+ * will remain to ensure logic does not differ in production.
+ */
+
+var validateFormat = function validateFormat(format) {};
+
+if ("production" !== 'production') {
+ validateFormat = function validateFormat(format) {
+ if (format === undefined) {
+ throw new Error('invariant requires an error message argument');
+ }
+ };
+}
+
+function invariant(condition, format, a, b, c, d, e, f) {
+ validateFormat(format);
+
+ if (!condition) {
+ var error;
+ if (format === undefined) {
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
+ } else {
+ var args = [a, b, c, d, e, f];
+ var argIndex = 0;
+ error = new Error(format.replace(/%s/g, function () {
+ return args[argIndex++];
+ }));
+ error.name = 'Invariant Violation';
+ }
+
+ error.framesToPop = 1; // we don't care about invariant's own frame
+ throw error;
+ }
+}
+
+module.exports = invariant;
+},{}],21:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+/**
+ * @param {*} object The object to check.
+ * @return {boolean} Whether or not the object is a DOM node.
+ */
+function isNode(object) {
+ return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
+}
+
+module.exports = isNode;
+},{}],22:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+var isNode = require('./isNode');
+
+/**
+ * @param {*} object The object to check.
+ * @return {boolean} Whether or not the object is a DOM text node.
+ */
+function isTextNode(object) {
+ return isNode(object) && object.nodeType == 3;
+}
+
+module.exports = isTextNode;
+},{"./isNode":21}],23:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ *
+ * @typechecks static-only
+ */
+
+'use strict';
+
+/**
+ * Memoizes the return value of a function that accepts one string argument.
+ */
+
+function memoizeStringOnly(callback) {
+ var cache = {};
+ return function (string) {
+ if (!cache.hasOwnProperty(string)) {
+ cache[string] = callback.call(this, string);
+ }
+ return cache[string];
+ };
+}
+
+module.exports = memoizeStringOnly;
+},{}],24:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+'use strict';
+
+var ExecutionEnvironment = require('./ExecutionEnvironment');
+
+var performance;
+
+if (ExecutionEnvironment.canUseDOM) {
+ performance = window.performance || window.msPerformance || window.webkitPerformance;
+}
+
+module.exports = performance || {};
+},{"./ExecutionEnvironment":9}],25:[function(require,module,exports){
+'use strict';
+
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ */
+
+var performance = require('./performance');
+
+var performanceNow;
+
+/**
+ * Detect if we can use `window.performance.now()` and gracefully fallback to
+ * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
+ * because of Facebook's testing infrastructure.
+ */
+if (performance.now) {
+ performanceNow = function performanceNow() {
+ return performance.now();
+ };
+} else {
+ performanceNow = function performanceNow() {
+ return Date.now();
+ };
+}
+
+module.exports = performanceNow;
+},{"./performance":24}],26:[function(require,module,exports){
+/**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @typechecks
+ *
+ */
+
+/*eslint-disable no-self-compare */
+
+'use strict';
+
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+/**
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
+ */
+function is(x, y) {
+ // SameValue algorithm
+ if (x === y) {
+ // Steps 1-5, 7-10
+ // Steps 6.b-6.e: +0 != -0
+ // Added the nonzero y check to make Flow happy, but it is redundant
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
+ } else {
+ // Step 6.a: NaN == NaN
+ return x !== x && y !== y;
+ }
+}
+
+/**
+ * Performs equality by iterating through keys on an object and returning false
+ * when any key has values which are not strictly equal between the arguments.
+ * Returns true when the values of all keys are strictly equal.
+ */
+function shallowEqual(objA, objB) {
+ if (is(objA, objB)) {
+ return true;
+ }
+
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
+ return false;
+ }
+
+ var keysA = Object.keys(objA);
+ var keysB = Object.keys(objB);
+
+ if (keysA.length !== keysB.length) {
+ return false;
+ }
+
+ // Test for A's keys different from B.
+ for (var i = 0; i < keysA.length; i++) {
+ if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+module.exports = shallowEqual;
+},{}],27:[function(require,module,exports){
+/**
+ * Copyright 2014-2015, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ */
+
+'use strict';
+
+var emptyFunction = require('./emptyFunction');
+
+/**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+var warning = emptyFunction;
+
+if ("production" !== 'production') {
+ (function () {
+ var printWarning = function printWarning(format) {
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+ args[_key - 1] = arguments[_key];
+ }
+
+ var argIndex = 0;
+ var message = 'Warning: ' + format.replace(/%s/g, function () {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ };
+
+ warning = function warning(condition, format) {
+ if (format === undefined) {
+ throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
+ }
+
+ if (format.indexOf('Failed Composite propType: ') === 0) {
+ return; // Ignore CompositeComponent proptype check.
+ }
+
+ if (!condition) {
+ for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
+ args[_key2 - 2] = arguments[_key2];
+ }
+
+ printWarning.apply(undefined, [format].concat(args));
+ }
+ };
+ })();
+}
+
+module.exports = warning;
+},{"./emptyFunction":13}],28:[function(require,module,exports){
+/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/
+
+'use strict';
+/* eslint-disable no-unused-vars */
+var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+var hasOwnProperty = Object.prototype.hasOwnProperty;
+var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+}
+
+function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+}
+
+module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+};
+
+},{}]},{},[7]);
diff --git a/fixtures/packaging/browserify/prod/package.json b/fixtures/packaging/browserify/prod/package.json
new file mode 100644
index 000000000000..e7589084d2f7
--- /dev/null
+++ b/fixtures/packaging/browserify/prod/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "webpack-test",
+ "private": true,
+ "dependencies": {
+ "browserify": "^13.3.0"
+ },
+ "scripts": {
+ "build": "rm -f output.js && NODE_PATH=../../../../build/rollup/packages browserify ./input.js -g [envify --NODE_ENV 'production'] -o output.js"
+ },
+ "devDependencies": {
+ "envify": "^4.0.0"
+ }
+}
diff --git a/fixtures/packaging/brunch/app/initialize.js b/fixtures/packaging/brunch/dev/app/initialize.js
similarity index 100%
rename from fixtures/packaging/brunch/app/initialize.js
rename to fixtures/packaging/brunch/dev/app/initialize.js
diff --git a/fixtures/packaging/brunch/config.js b/fixtures/packaging/brunch/dev/config.js
similarity index 100%
rename from fixtures/packaging/brunch/config.js
rename to fixtures/packaging/brunch/dev/config.js
diff --git a/fixtures/packaging/brunch/index.html b/fixtures/packaging/brunch/dev/index.html
similarity index 100%
rename from fixtures/packaging/brunch/index.html
rename to fixtures/packaging/brunch/dev/index.html
diff --git a/fixtures/packaging/webpack-alias/input.js b/fixtures/packaging/brunch/dev/input.js
similarity index 100%
rename from fixtures/packaging/webpack-alias/input.js
rename to fixtures/packaging/brunch/dev/input.js
diff --git a/fixtures/packaging/brunch/dev/package.json b/fixtures/packaging/brunch/dev/package.json
new file mode 100644
index 000000000000..32907bdcdb8e
--- /dev/null
+++ b/fixtures/packaging/brunch/dev/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "brunch-test",
+ "devDependencies": {
+ "brunch": "^2.9.1",
+ "javascript-brunch": "^2.0.0"
+ },
+ "scripts": {
+ "build": "rm -rf public && ln -fs ../../../../../build/rollup/packages/react node_modules/react && ln -fs ../../../../../build/rollup/packages/react-dom node_modules/react-dom && brunch build"
+ }
+}
\ No newline at end of file
diff --git a/fixtures/packaging/brunch/package.json b/fixtures/packaging/brunch/package.json
deleted file mode 100644
index 4713d27c21c3..000000000000
--- a/fixtures/packaging/brunch/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "name": "brunch-test",
- "devDependencies": {
- "brunch": "^2.9.1",
- "javascript-brunch": "^2.0.0"
- },
- "scripts": {
- "build": "rm -rf public && ln -fs ../../../../build/packages/react node_modules/react && ln -fs ../../../../build/packages/react-dom node_modules/react-dom && brunch build"
- }
-}
\ No newline at end of file
diff --git a/fixtures/packaging/webpack/input.js b/fixtures/packaging/brunch/prod/app/initialize.js
similarity index 100%
rename from fixtures/packaging/webpack/input.js
rename to fixtures/packaging/brunch/prod/app/initialize.js
diff --git a/fixtures/packaging/brunch/prod/config.js b/fixtures/packaging/brunch/prod/config.js
new file mode 100644
index 000000000000..ba12fc72c23d
--- /dev/null
+++ b/fixtures/packaging/brunch/prod/config.js
@@ -0,0 +1,10 @@
+exports.config = {
+ paths: {
+ public: '.',
+ },
+ files: {
+ javascripts: {
+ joinTo: 'output.js',
+ },
+ },
+};
diff --git a/fixtures/packaging/brunch/prod/index.html b/fixtures/packaging/brunch/prod/index.html
new file mode 100644
index 000000000000..5902a1a6905d
--- /dev/null
+++ b/fixtures/packaging/brunch/prod/index.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fixtures/packaging/brunch/prod/input.js b/fixtures/packaging/brunch/prod/input.js
new file mode 100644
index 000000000000..93a0e76d43df
--- /dev/null
+++ b/fixtures/packaging/brunch/prod/input.js
@@ -0,0 +1,7 @@
+var React = require('react');
+var ReactDOM = require('react-dom');
+
+ReactDOM.render(
+ React.createElement('h1', null, 'Hello World!'),
+ document.getElementById('container')
+);
diff --git a/fixtures/packaging/brunch/prod/package.json b/fixtures/packaging/brunch/prod/package.json
new file mode 100644
index 000000000000..31f9a7725949
--- /dev/null
+++ b/fixtures/packaging/brunch/prod/package.json
@@ -0,0 +1,10 @@
+{
+ "name": "brunch-test",
+ "devDependencies": {
+ "brunch": "^2.9.1",
+ "javascript-brunch": "^2.0.0"
+ },
+ "scripts": {
+ "build": "rm -rf public && ln -fs ../../../../../build/rollup/packages/react node_modules/react && ln -fs ../../../../../build/rollup/packages/react-dom node_modules/react-dom && brunch build -p"
+ }
+}
\ No newline at end of file
diff --git a/fixtures/packaging/build-all.js b/fixtures/packaging/build-all.js
index b5620c0fa32e..126d90809113 100644
--- a/fixtures/packaging/build-all.js
+++ b/fixtures/packaging/build-all.js
@@ -1,25 +1,41 @@
-var fs = require('fs');
-var path = require('path');
-var { spawnSync } = require('child_process');
+const { existsSync, statSync, readdirSync } = require('fs');
+const { join } = require('path');
+const { spawnSync } = require('child_process');
-var fixtureDirs = fs.readdirSync(__dirname).filter((file) => {
- return fs.statSync(path.join(__dirname, file)).isDirectory();
+const fixtureDirs = readdirSync(__dirname).filter((file) => {
+ return statSync(join(__dirname, file)).isDirectory();
});
-var cmdArgs = [
+const cmdArgs = [
{cmd: 'npm', args: ['install']},
{cmd: 'npm', args: ['run', 'build']},
];
+
+function buildFixture(cmdArg, path) {
+ const opts = {
+ cwd: path,
+ stdio: 'inherit',
+ };
+ const result = spawnSync(cmdArg.cmd, cmdArg.args, opts);
+ if (result.status !== 0) {
+ throw new Error(`Failed to build fixtures!`);
+ }
+}
+
for (const dir of fixtureDirs) {
for (const cmdArg of cmdArgs) {
- const opts = {
- cwd: path.join(__dirname, dir),
- stdio: 'inherit',
- };
- let result = spawnSync(cmdArg.cmd, cmdArg.args, opts);
- if (result.status !== 0) {
- throw new Error('Failed to build fixtures.');
+ // we only care about directories that have DEV and PROD directories in
+ // otherwise they don't need to be built
+ const devPath = join(__dirname, dir, 'dev');
+
+ if (existsSync(devPath)) {
+ buildFixture(cmdArg, devPath);
+ }
+ const prodPath = join(__dirname, dir, 'prod');
+
+ if (existsSync(prodPath)) {
+ buildFixture(cmdArg, prodPath);
}
}
}
diff --git a/fixtures/packaging/globals.html b/fixtures/packaging/globals/dev.html
similarity index 54%
rename from fixtures/packaging/globals.html
rename to fixtures/packaging/globals/dev.html
index 3c80fbfe8d47..c484c658fe0f 100644
--- a/fixtures/packaging/globals.html
+++ b/fixtures/packaging/globals/dev.html
@@ -1,10 +1,10 @@
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fixtures/packaging/index.html b/fixtures/packaging/index.html
new file mode 100644
index 000000000000..6ced5f57bd36
--- /dev/null
+++ b/fixtures/packaging/index.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+ bundle packaging
+ If you see Hello World in each frame with no console errors, all is well!
+
+
globals (dev)
+
+
+
+
globals (prod)
+
+
+
+
requirejs (dev)
+
+
+
+
requirejs (prod)
+
+
+
+
systemjs (dev)
+
+
+
+
systemjs (prod)
+
+
+
+
browserify (dev)
+
+
+
+
browserify (prod)
+
+
+
+
brunch (dev)
+
+
+
+
brunch (prod)
+
+
+
+
rjs (dev)
+
+
+
+
rjs (prod)
+
+
+
+
systemjs-builder (dev)
+
+
+
+
systemjs-builder (prod)
+
+
+
+
webpack (dev)
+
+
+
+
webpack (prod)
+
+
+
+
webpack-alias (dev)
+
+
+
+
webpack-alias (prod)
+
+
+
+
\ No newline at end of file
diff --git a/fixtures/packaging/requirejs.html b/fixtures/packaging/requirejs/dev.html
similarity index 78%
rename from fixtures/packaging/requirejs.html
rename to fixtures/packaging/requirejs/dev.html
index 325a2f031a6e..ae8aa14d5162 100644
--- a/fixtures/packaging/requirejs.html
+++ b/fixtures/packaging/requirejs/dev.html
@@ -5,8 +5,8 @@
+
+
+